Skip to content

Commit

Permalink
chore: Upgrade drun (#4678)
Browse files Browse the repository at this point in the history
Using IC 2024-08-16 with some adjustments:
* `drun` adjustments for better testing
   - dfinity/ic#662 (Lift 8GB memory boundary from drun)
   - dfinity/ic#988 (Enable Wasm64 with 16GB main memory capacity)
   - dfinity/ic#991 (Disable DTS for deterministic debug outputs)
   - dfinity/ic#992 (Increase batch limit for longer running tests)
   - dfinity/ic#1240 (Enable canister snapshots)
* IC build fixes for `nix`:
   - Remove duplicate entries of same crate with same versions in `Cargo.toml`.
   - dfinity/ic#993 (Fix MacOS `rocksdb` dependency).
* Other IC fixes:
   - dfinity/ic#1250 (Fix canister snapshots)
  • Loading branch information
luc-blaeser committed Sep 9, 2024
1 parent adb31da commit 32a7bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 49 deletions.
46 changes: 1 addition & 45 deletions nix/drun.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ pkgs:
lockFile = "${pkgs.sources.ic}/Cargo.lock";
outputHashes = {
"build-info-0.0.27" = "sha256-SkwWwDNrTsntkNiCv6rsyTFGazhpRDnKtVzPpYLKF9U=";
"cloudflare-0.11.0" = "sha256-bJYiypmDI4KEy/VWt/7UcOv+g2CZLb9qUA9c1xlLxhM=";
"ic-agent-0.36.0" = "sha256-vDONIVjz0cwVgiszVRIjTKcqRUMHdVwTURflAMqmzHM=";
"cloudflare-0.12.0" = "sha256-FxCAK7gUKp/63fdvzI5Ufsy4aur74fO4R/K3YFiUw0Y=";
"icrc1-test-env-0.1.1" = "sha256-2PB7e64Owin/Eji3k8UoeWs+pfDfOOTaAyXjvjOZ/4g=";
"jsonrpc-0.12.1" = "sha256-3FtdZlt2PqVDkE5iKWYIp1eiIELsaYlUPRSP2Xp8ejM=";
"lmdb-rkv-0.14.99" = "sha256-5WcUzapkrc/s3wCBNCuUDhtbp17n67rTbm2rx0qtITg=";
Expand All @@ -43,49 +42,6 @@ pkgs:
EOF
cd -
# Disable DTS for `drun`
patch rs/config/src/subnet_config.rs << EOF
@@ -290,9 +290,9 @@ impl SchedulerConfig {
}
pub fn system_subnet() -> Self {
- let max_instructions_per_message_without_dts = NumInstructions::from(50 * B);
+ let max_instructions_per_message_without_dts =
+ MAX_INSTRUCTIONS_PER_MESSAGE_WITHOUT_DTS * SYSTEM_SUBNET_FACTOR;
let max_instructions_per_install_code = NumInstructions::from(1_000 * B);
- let max_instructions_per_slice = NumInstructions::from(10 * B);
Self {
scheduler_cores: NUMBER_OF_EXECUTION_THREADS,
max_paused_executions: MAX_PAUSED_EXECUTIONS,
@@ -300,20 +300,19 @@ impl SchedulerConfig {
// TODO(RUN-993): Enable heap delta rate limiting for system subnets.
// Setting initial reserve to capacity effectively disables the rate limiting.
heap_delta_initial_reserve: SUBNET_HEAP_DELTA_CAPACITY,
- // Round limit is set to allow on average 2B instructions.
- // See also comment about \`MAX_INSTRUCTIONS_PER_ROUND\`.
- max_instructions_per_round: max_instructions_per_message_without_dts
- .max(max_instructions_per_slice)
- + NumInstructions::from(2 * B),
+ max_instructions_per_round: MAX_INSTRUCTIONS_PER_ROUND * SYSTEM_SUBNET_FACTOR,
+ // Effectively disable DTS on system subnets.
max_instructions_per_message: max_instructions_per_message_without_dts,
max_instructions_per_message_without_dts,
- max_instructions_per_slice,
+ // Effectively disable DTS on system subnets.
+ max_instructions_per_slice: max_instructions_per_message_without_dts,
instruction_overhead_per_execution: INSTRUCTION_OVERHEAD_PER_EXECUTION,
instruction_overhead_per_canister: INSTRUCTION_OVERHEAD_PER_CANISTER,
instruction_overhead_per_canister_for_finalization:
INSTRUCTION_OVERHEAD_PER_CANISTER_FOR_FINALIZATION,
max_instructions_per_install_code,
- max_instructions_per_install_code_slice: max_instructions_per_slice,
+ // Effectively disable DTS on system subnets.
+ max_instructions_per_install_code_slice: max_instructions_per_install_code,
max_heap_delta_per_iteration: MAX_HEAP_DELTA_PER_ITERATION * SYSTEM_SUBNET_FACTOR,
max_message_duration_before_warn_in_seconds:
MAX_MESSAGE_DURATION_BEFORE_WARN_IN_SECONDS,
EOF
# static linking of libunwind fails under nix Linux
patch rs/monitoring/backtrace/build.rs << EOF
@@ -1,8 +1,2 @@
Expand Down
8 changes: 4 additions & 4 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
"version": "3.2.25"
},
"ic": {
"branch": "luc/latest-ic-wasm64-test",
"branch": "luc/adjust-drun",
"description": "Internet Computer blockchain source: the client/replica software run by nodes",
"homepage": "",
"owner": "luc-blaeser",
"repo": "ic",
"rev": "7921f5f3dc0d9fb774e3222f8ff6b1c00a086f1a",
"sha256": "1ykawbpaqnf1y508vh81m30p813ykmnbffxc3p0hw0p0k1ynq6zz",
"rev": "6c718b80e04ad1930a08e6c53440c15021ca9c3d",
"sha256": "0iglm7m69d836wipzi25xza25l84dmjq9b4s1y6rwa8xnmiipnbh",
"type": "tarball",
"url": "https://github.com/luc-blaeser/ic/archive/7921f5f3dc0d9fb774e3222f8ff6b1c00a086f1a.tar.gz",
"url": "https://github.com/luc-blaeser/ic/archive/6c718b80e04ad1930a08e6c53440c15021ca9c3d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ic-hs": {
Expand Down

0 comments on commit 32a7bb1

Please sign in to comment.