Skip to content

Commit

Permalink
fix!: change number of subnet nodes from 31 to 34 (#282)
Browse files Browse the repository at this point in the history
This PR preemptively increases the built-in number of fiduciary subnet
nodes from 31 to 34. This equates to about a 20-30% cost increase from
the original 28-node subnet size.
  • Loading branch information
rvanasa authored Sep 17, 2024
1 parent e6db092 commit 4a15f9f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can find extensive documentation for the EVM RPC canister in the [ICP develo

## Canister

The EVM RPC canister runs on the 31-node fiduciary subnet with the following principal: [`7hfb6-caaaa-aaaar-qadga-cai`](https://dashboard.internetcomputer.org/canister/7hfb6-caaaa-aaaar-qadga-cai).
The EVM RPC canister runs on the [fiduciary subnet](https://internetcomputer.org/docs/current/concepts/subnet-types#fiduciary-subnets) with the following principal: [`7hfb6-caaaa-aaaar-qadga-cai`](https://dashboard.internetcomputer.org/canister/7hfb6-caaaa-aaaar-qadga-cai).

Refer to the [Reproducible Builds](#reproducible-builds) section for information on how to verify the hash of the deployed WebAssembly module.

Expand Down
8 changes: 3 additions & 5 deletions e2e/motoko/main.mo
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ shared ({ caller = installer }) actor class Main() {

// (`subnet name`, `nodes in subnet`, `expected cycles for JSON-RPC call`)
type SubnetTarget = (Text, Nat32, Nat);
let collateralCycles = 10_000_000;
let fiduciarySubnet : SubnetTarget = ("fiduciary", 31, 270344800);
let fiduciarySubnet : SubnetTarget = ("fiduciary", 34, 642_627_200);

let testTargets = [
// (`canister module`, `canister type`, `subnet`)
Expand Down Expand Up @@ -79,9 +78,8 @@ shared ({ caller = installer }) actor class Main() {
};
};

let expectedCyclesWithCollateral = expectedCycles + collateralCycles * Nat32.toNat(nodesInSubnet);
if (cycles != expectedCyclesWithCollateral) {
addError("Unexpected number of cycles: " # debug_show cycles # " (expected " # debug_show expectedCyclesWithCollateral # ")");
if (cycles != expectedCycles) {
addError("Unexpected number of cycles: " # debug_show cycles # " (expected " # debug_show expectedCycles # ")");
};

// `request()` without cycles
Expand Down
2 changes: 1 addition & 1 deletion src/accounting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod test {
get_http_request_cost(123, 4567890),
get_http_request_cost(890, 4567890),
],
[240932000, 253133600, 113533755200, 113590820000]
[270368000, 283750400, 124527012800, 124589600000]
);
}
}
2 changes: 1 addition & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub const WASM_PAGE_SIZE: u64 = 65536;

pub const ETH_GET_LOGS_MAX_BLOCKS: u32 = 500;

pub const NODES_IN_SUBNET: u32 = 31;
pub const NODES_IN_SUBNET: u32 = 34;

pub const API_KEY_REPLACE_STRING: &str = "{API_KEY}";
pub const VALID_API_KEY_CHARS: &str =
Expand Down

0 comments on commit 4a15f9f

Please sign in to comment.