chore: update ic-agent to latest master#1056
Conversation
|
There is some exports from ic-agent that might be better to push up to the root module, but at least everything is accessible. The toughest part of the API is for some builder methods that doesn't take Nothing blocking this from going in and ic-agent to be published today. |
src/dfx/Cargo.toml
Outdated
| git = "ssh://git@github.com/dfinity-lab/agent-rust.git" | ||
| branch = "next" | ||
| rev = "9d611f08cb55923fc6ff5bf0136e8f4b848dd2cc" | ||
| rev = "ce7751e99d3d0ff76c66ad0796f7385afceeda17" |
There was a problem hiding this comment.
Just a drive-by comment: the rev doesn't quite work. Cargo will just fetch the latest from next branch if it decides to update ic-agent. I noticed this earlier when I bump Candid, ic-agent also gets updated to the latest even though rev is unchanged.
There was a problem hiding this comment.
rev is for hydra IIRC. Cargo ignores it when a branch is provided.
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
This adds the `dfx canister set-controller` subcommand
```
➜ hello git:(master) dfx canister set-controller --help
dfx-canister-set-controller
Sets the provided identity's name or its principal as the new controller of a canister on the Internet Computer network.
USAGE:
dfx canister set-controller <canister> <new-controller>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<canister> Specifies the canister name or the canister identifier for the canister to be controlled.
<new-controller> Specifies the identity name or the principal of the new controller.
```
An example use case:
```
➜ hello git:(master) dfx identity whoami
default
➜ hello git:(master) dfx identity list
default *
prithvi
➜ hello git:(master) dfx canister create hello
Creating canister "hello"...
"hello" canister created with canister id: "75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q"
➜ hello git:(master) dfx build hello
Building canisters...
➜ hello git:(master)
➜ hello git:(master) dfx canister set-controller hello prithvi
Set "prithvi" as controller of "hello".
➜ hello git:(master)
➜ hello git:(master) dfx canister install hello
Installing code for canister hello, with canister_id 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q
Replica error (code 5): IC0512: Only the controller of canister 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q can control it.
Expected controller: jxpuf-o4cfi-2zfqa-3svif-yxdiz-tuj3p-ctl6m-qsrfv-7zctw-z3bwc-2ae
Actual controller: 5gg4n-o6ooe-5zmlh-ac2kx-ntmkd-kamti-a3rqe-okecn-knil3-ord3t-mae
```
Note: Waiting for #1056 to get merged first (therefore, creating a PR against that branch)
- [x] push local e2e tests which is blocked because of #1057 (comment)
- [ ] update to a replica version which doesn't expose the expected controller's principal
- [x] update to agent-rs after this is merged dfinity/agent-rs#51
This adds the `dfx canister set-controller` subcommand
```
➜ hello git:(master) dfx canister set-controller --help
dfx-canister-set-controller
Sets the provided identity's name or its principal as the new controller of a canister on the Internet Computer network.
USAGE:
dfx canister set-controller <canister> <new-controller>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<canister> Specifies the canister name or the canister identifier for the canister to be controlled.
<new-controller> Specifies the identity name or the principal of the new controller.
```
An example use case:
```
➜ hello git:(master) dfx identity whoami
default
➜ hello git:(master) dfx identity list
default *
prithvi
➜ hello git:(master) dfx canister create hello
Creating canister "hello"...
"hello" canister created with canister id: "75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q"
➜ hello git:(master) dfx build hello
Building canisters...
➜ hello git:(master)
➜ hello git:(master) dfx canister set-controller hello prithvi
Set "prithvi" as controller of "hello".
➜ hello git:(master)
➜ hello git:(master) dfx canister install hello
Installing code for canister hello, with canister_id 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q
Replica error (code 5): IC0512: Only the controller of canister 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q can control it.
Expected controller: jxpuf-o4cfi-2zfqa-3svif-yxdiz-tuj3p-ctl6m-qsrfv-7zctw-z3bwc-2ae
Actual controller: 5gg4n-o6ooe-5zmlh-ac2kx-ntmkd-kamti-a3rqe-okecn-knil3-ord3t-mae
```
Note: Waiting for #1056 to get merged first (therefore, creating a PR against that branch)
- [x] push local e2e tests which is blocked because of #1057 (comment)
- [ ] update to a replica version which doesn't expose the expected controller's principal
- [x] update to agent-rs after this is merged dfinity/agent-rs#51
## Changelog for advisory-db: Branch: main Commits: [rustsec/advisory-db@f1fc2c3e...653bd139](rustsec/advisory-db@f1fc2c3...653bd13) * [`0e04678a`](rustsec/advisory-db@0e04678) `#[zeroize(drop)]` not working for `enum`s ([RustSec/advisory-db#1054](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1054)) * [`b5319a3d`](rustsec/advisory-db@b5319a3) Assigned RUSTSEC-2021-0115 to zeroize_derive ([RustSec/advisory-db#1055](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1055)) * [`653bd139`](rustsec/advisory-db@653bd13) Fix RUSTSEC-2018-0020 GHSA alias ([RustSec/advisory-db#1056](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1056))
## Changelog for advisory-db: Branch: main Commits: [rustsec/advisory-db@f1fc2c3e...653bd139](rustsec/advisory-db@f1fc2c3...653bd13) * [`0e04678a`](rustsec/advisory-db@0e04678) `#[zeroize(drop)]` not working for `enum`s ([RustSec/advisory-db#1054](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1054)) * [`b5319a3d`](rustsec/advisory-db@b5319a3) Assigned RUSTSEC-2021-0115 to zeroize_derive ([RustSec/advisory-db#1055](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1055)) * [`653bd139`](rustsec/advisory-db@653bd13) Fix RUSTSEC-2018-0020 GHSA alias ([RustSec/advisory-db#1056](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/1056))
No description provided.