Skip to content

Commit

Permalink
chore: update replica version to 4ba58348 (#4082)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfinity-bot authored Jan 29, 2025
1 parent 314fec1 commit 53f4075
Show file tree
Hide file tree
Showing 14 changed files with 214 additions and 168 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,11 @@ Updated Motoko to [0.13.6](https://github.com/dfinity/motoko/releases/tag/0.13.6

### Replica

Updated replica to elected commit 233c1ee2ef68c1c8800b8151b2b9f38e17b8440a.
Updated replica to elected commit 4ba583480e05a518aa2bcf36f5a0e48475e8edc2.
This incorporates the following executed proposals:

- [134967](https://dashboard.internetcomputer.org/proposal/134967)
- [134966](https://dashboard.internetcomputer.org/proposal/134966)
- [134900](https://dashboard.internetcomputer.org/proposal/134900)
- [134773](https://dashboard.internetcomputer.org/proposal/134773)
- [134684](https://dashboard.internetcomputer.org/proposal/134684)
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ license = "Apache-2.0"
candid = "0.10.11"
candid_parser = "0.1.4"
dfx-core = { path = "src/dfx-core", version = "0.1.0" }
ic-agent = { version = "0.39", git = "https://github.com/dfinity/agent-rs", rev = "a96022bd185e97f52c5cde1c82c7592abddcff86" }
ic-agent = { version = "0.39", git = "https://github.com/dfinity/agent-rs", rev = "9ebf6314ce2fcb36772c7d81d6d414b4628d6101" }
ic-asset = { path = "src/canisters/frontend/ic-asset", version = "0.21.0" }
ic-cdk = "0.13.1"
ic-identity-hsm = { version = "0.39", git = "https://github.com/dfinity/agent-rs", rev = "a96022bd185e97f52c5cde1c82c7592abddcff86" }
ic-utils = { version = "0.39", git = "https://github.com/dfinity/agent-rs", rev = "a96022bd185e97f52c5cde1c82c7592abddcff86" }
ic-identity-hsm = { version = "0.39", git = "https://github.com/dfinity/agent-rs", rev = "9ebf6314ce2fcb36772c7d81d6d414b4628d6101" }
ic-utils = { version = "0.39", git = "https://github.com/dfinity/agent-rs", rev = "9ebf6314ce2fcb36772c7d81d6d414b4628d6101" }

aes-gcm = "0.10.3"
anyhow = "1.0.56"
Expand Down
1 change: 1 addition & 0 deletions e2e/assets/playground_backend/mops.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ splay = "0.1.0"
[[canister]]
candid = "service/wasm-utils/wasm-utils.did"
output = "service/pool/Wasm-utils.mo"

21 changes: 19 additions & 2 deletions e2e/assets/playground_backend/service/pool/IC.mo
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module {
#reinstall;
#upgrade : ?{
wasm_memory_persistence : ?{
#Keep;
#Replace;
#keep;
#replace;
};
};
#install;
Expand Down Expand Up @@ -85,6 +85,22 @@ module {
message_hash : Blob;
};
public type sign_with_ecdsa_result = { signature : Blob };
public type schnorr_algorithm = {
#bip340secp256k1;
#ed25519;
};
public type schnorr_aux = {
#bip341: {
merkle_root_hash: Blob
}
};
public type sign_with_schnorr_args = {
message : Blob;
derivation_path : [Blob];
key_id : { algorithm : schnorr_algorithm; name : Text };
aux: ?schnorr_aux;
};
public type sign_with_schnorr_result = { signature : Blob };
public type user_id = Principal;
public type wasm_module = Blob;
public type Self = actor {
Expand Down Expand Up @@ -116,6 +132,7 @@ module {
} -> async ();
raw_rand : shared () -> async Blob;
sign_with_ecdsa : shared sign_with_ecdsa_args -> async sign_with_ecdsa_result;
sign_with_schnorr : shared sign_with_schnorr_args -> async sign_with_schnorr_result;
start_canister : shared { canister_id : canister_id } -> async ();
stop_canister : shared { canister_id : canister_id } -> async ();
uninstall_code : shared { canister_id : canister_id } -> async ();
Expand Down
9 changes: 8 additions & 1 deletion e2e/assets/playground_backend/service/pool/Main.mo
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ shared (creator) actor class Self(opt_params : ?Types.InitParams) = this {
mode = args.mode;
canister_id = args.canister_id;
};
Debug.print("install mode: " # debug_show(args.mode));
await IC.install_code newArgs;
stats := Logs.updateStats(stats, #install);

Expand Down Expand Up @@ -710,6 +709,12 @@ shared (creator) actor class Self(opt_params : ?Types.InitParams) = this {
await* pool.addCycles(caller, #refund);
res
};
public shared ({ caller }) func sign_with_schnorr(arg: ICType.sign_with_schnorr_args) : async ICType.sign_with_schnorr_result {
await* pool.addCycles(caller, #method "sign_with_schnorr");
let res = await IC.sign_with_schnorr(arg);
await* pool.addCycles(caller, #refund);
res
};
public shared ({ caller }) func _ttp_request(request : ICType.http_request_args) : async ICType.http_request_result {
await* pool.addCycles(caller, #method "http_request");
let new_request = switch (request.transform) {
Expand Down Expand Up @@ -832,6 +837,7 @@ shared (creator) actor class Self(opt_params : ?Types.InitParams) = this {
#_ttp_request : Any;
#__transform : Any;
#sign_with_ecdsa: Any;
#sign_with_schnorr: Any;
#eth_call: Any;
#eth_feeHistory: Any;
#eth_getBlockByNumber: Any;
Expand All @@ -856,6 +862,7 @@ shared (creator) actor class Self(opt_params : ?Types.InitParams) = this {
case (#_ttp_request _) false;
case (#__transform _) false;
case (#sign_with_ecdsa _) false;
case (#sign_with_schnorr _) false;
case (#eth_call _) false;
case (#eth_feeHistory _) false;
case (#eth_getBlockByNumber _) false;
Expand Down
3 changes: 2 additions & 1 deletion e2e/assets/playground_backend/wasm-utils.did
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
type Config = record {
profiling : bool;
profiling : opt record { start_page: opt nat32; page_limit: opt nat32 };
remove_cycles_add : bool;
limit_stable_memory_page : opt nat32;
limit_heap_memory_page : opt nat32;
backend_canister_id : opt principal;
};

Expand Down
Binary file modified e2e/assets/playground_backend/wasm-utils.wasm
100644 → 100755
Binary file not shown.
12 changes: 6 additions & 6 deletions e2e/tests-dfx/call.bash
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function impersonate_sender() {

# test management canister call failure (setting memory allocation to a low value)
assert_command_fail dfx canister update-settings hello_backend --memory-allocation 1 --impersonate "${IDENTITY_PRINCIPAL}"
assert_contains "Management canister call failed: IC0402: Canister was given 1 B memory allocation but at least"
assert_contains "Canister was given 1 B memory allocation but at least"

# canister status fails because the default identity does not control the canister anymore
assert_command_fail dfx canister status hello_backend
Expand All @@ -334,22 +334,22 @@ function impersonate_sender() {

# test management canister call submission failure
assert_command_fail dfx canister status hello_backend --impersonate "${IDENTITY_PRINCIPAL}"
assert_contains "Failed to submit management canister call: IC0207: Canister $CANISTER_ID is out of cycles"
assert_contains "Failed to submit management canister call: Canister $CANISTER_ID is out of cycles"

# test update call submission failure
assert_command_fail dfx canister call aaaaa-aa canister_status "(record { canister_id=principal\"$CANISTER_ID\" })" --update --impersonate "${IDENTITY_PRINCIPAL}"
assert_contains "Failed to submit canister call: IC0207: Canister $CANISTER_ID is out of cycles"
assert_contains "Failed to submit canister call: Canister $CANISTER_ID is out of cycles"

# test async call submission failure
assert_command_fail dfx canister call aaaaa-aa canister_status "(record { canister_id=principal\"$CANISTER_ID\" })" --async --impersonate "${IDENTITY_PRINCIPAL}"
assert_contains "Failed to submit canister call: IC0207: Canister $CANISTER_ID is out of cycles"
assert_contains "Failed to submit canister call: Canister $CANISTER_ID is out of cycles"

# unfreeze the canister
assert_command dfx canister update-settings hello_backend --freezing-threshold 0 --impersonate "${IDENTITY_PRINCIPAL}"

# test update call failure
assert_command_fail dfx canister call aaaaa-aa delete_canister "(record { canister_id=principal\"$CANISTER_ID\" })" --update --impersonate "${IDENTITY_PRINCIPAL}"
assert_contains "Canister call failed: IC0510: Canister $CANISTER_ID must be stopped before it is deleted."
assert_contains "Canister call failed: Canister $CANISTER_ID must be stopped before it is deleted."

# test update call
assert_command dfx canister call aaaaa-aa start_canister "(record { canister_id=principal\"$CANISTER_ID\" })" --update --impersonate "${IDENTITY_PRINCIPAL}"
Expand All @@ -361,7 +361,7 @@ function impersonate_sender() {

# test query call failure
assert_command_fail dfx canister call aaaaa-aa fetch_canister_logs "(record { canister_id=principal\"$CANISTER_ID\" })" --query --impersonate "$CANISTER_ID"
assert_contains "Failed to perform query call: IC0406: Caller $CANISTER_ID is not allowed to query ic00 method fetch_canister_logs"
assert_contains "Failed to perform query call: Caller $CANISTER_ID is not allowed to query ic00 method fetch_canister_logs"

# test query call
assert_command dfx canister call aaaaa-aa fetch_canister_logs "(record { canister_id=principal\"$CANISTER_ID\" })" --query --impersonate "${IDENTITY_PRINCIPAL}"
Expand Down
Loading

0 comments on commit 53f4075

Please sign in to comment.