Skip to content

feat: support ic0.root_key #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
279de07
feat: struct Call to support best effort responses (#496)
lwshang Jun 18, 2024
36c837b
Merge branch 'main' into next
lwshang Sep 3, 2024
107fa7d
feat!: ic0 handles 32/64-bit system API (#514)
lwshang Sep 3, 2024
1d99280
Merge branch 'main' into next
lwshang Sep 18, 2024
b10be57
Merge branch 'main' into next
lwshang Oct 4, 2024
3d06c9e
non-beta dfx in examples.yml
lwshang Oct 4, 2024
7a64c21
refactor!: crates architecture (#522)
lwshang Oct 9, 2024
69a459d
bump crates to alpha.1 (#524)
lwshang Oct 11, 2024
69d98b0
fix: update/query macro could not handle function arguments with the …
lwshang Oct 11, 2024
907b7d9
Merge branch 'main' into next
lwshang Nov 12, 2024
a061429
move back management_canister mod (#533)
lwshang Dec 4, 2024
605abca
Merge branch 'main' into next
lwshang Dec 4, 2024
9f9c0f7
feat: root call mod with new CallError (#535)
lwshang Dec 11, 2024
d98a6ff
feat: no more tuples in Call (#539)
lwshang Dec 16, 2024
0ab2864
feat: root management canister mod with new bindings (#538)
lwshang Dec 18, 2024
65443f9
refactor: api module overhaul (#540)
lwshang Dec 19, 2024
921c858
Merge branch 'main' into next
lwshang Dec 19, 2024
e2bbc39
chore: e2e wasm64 (#534)
lwshang Dec 20, 2024
c2ba198
chore: deprecate old call API (#542)
lwshang Dec 20, 2024
14e10db
chore: deprecate other APIs in api/call.rs (#543)
lwshang Jan 3, 2025
3184c9c
feat: macros that decoding arguments can set custom decoder using dec…
lwshang Jan 10, 2025
5fb07f5
feat: safe binding for msg_deadline (#545)
lwshang Jan 13, 2025
710fc59
chore: deprecate remaining items in api/call.rs (#546)
lwshang Jan 15, 2025
68f98ce
feat: CallError redesign (#548)
lwshang Jan 16, 2025
4e287ce
chore: call module followup (#549)
lwshang Jan 17, 2025
7349253
refactor: type crates (#550)
lwshang Jan 22, 2025
d823cb5
feat: simplify Call implementation and enable retry logic (#551)
lwshang Jan 24, 2025
b8f9b27
feat: executor v3 (#555)
adamspofford-dfinity Feb 12, 2025
d31d821
feat: management canister types v0.2.0 which ensures Candid equality …
michael-weigelt Feb 18, 2025
2255afa
feat: finalize call api (#557)
lwshang Feb 21, 2025
fc8959a
feat: add _with_cycles postfix to management canister methods that re…
lwshang Feb 25, 2025
fb24332
docs: version guide for v0.18 (#561)
lwshang Feb 26, 2025
5563c31
chore: MSRV back to 1.75.0 (#564)
lwshang Feb 28, 2025
8e806ee
feat: Add types for fetching canister logs (#563)
michael-weigelt Feb 28, 2025
9a45b5c
feat: update/query can set custom result encoder (#565)
lwshang Feb 28, 2025
dfca4bd
fix: set the executor context when invoking functions via canister ti…
hpeebles Mar 3, 2025
bb1e805
test: update pocket-ic and simplify server caching (#568)
lwshang Mar 4, 2025
b2596b5
fix: only call `call_cycles_add128` if cycles amount > 0 (#567)
hpeebles Mar 5, 2025
4a1fe68
feat: call bitcoin canisters (#569)
lwshang Mar 5, 2025
be90d32
feat!: switch RejectCode to ic-error-types and deprecate ic-response-…
lwshang Mar 5, 2025
37cd64f
feat: add cost_* System API and methods that calculate cycles cost un…
lwshang Mar 10, 2025
f3edbd4
feat: select (un)bounded_wait for management functions (#575)
lwshang Mar 11, 2025
995abe5
feat: subnet_self in ic0 and api (#576)
lwshang Mar 11, 2025
d0f4607
perf: bounded_wait default to 300s timeout (#577)
lwshang Mar 17, 2025
f6c7cd2
feat!: update management types (#578)
lwshang Mar 17, 2025
6929b2f
feat: canister_liquid_cycle_balance (#579)
lwshang Mar 19, 2025
3a1b608
chore: release v0.18.0-alpha.2 (#580)
lwshang Mar 19, 2025
586b943
fix: custom decoder/encoder should be blob in Candid (#581)
lwshang Mar 26, 2025
e9a4633
fix: run user destructors outside refcell context (#582)
adamspofford-dfinity Apr 1, 2025
3cc18cc
flock pocketic tag file (#584)
adamspofford-dfinity Apr 1, 2025
7e8e7f2
Add paragraph to documentation about background traps (#585)
adamspofford-dfinity Apr 1, 2025
9c9bea9
update ic0.txt to include root_key_*
lwshang Apr 3, 2025
53c1e60
bump ic0 to alpha.4
lwshang Apr 3, 2025
ba7caea
add binding in api.rs
lwshang Apr 3, 2025
25f431b
e2e test (failure expected)
lwshang Apr 3, 2025
2e27f0b
root_key is a Vec
lwshang Apr 3, 2025
ec44ac1
revert ci.yml to try fix ubuntu test
lwshang Apr 3, 2025
aaa2212
revert pocket-ic tag to try fix
lwshang Apr 3, 2025
f27d678
ci: fix pocket-ic server download (#587)
lwshang Apr 4, 2025
eb937a9
temp link of pocket-ic that supports root_key
lwshang Apr 4, 2025
69a2730
Revert "temp link of pocket-ic that supports root_key"
lwshang Apr 4, 2025
0099116
Merge branch 'next' into lwshang/SDK-2058_root_key
lwshang Apr 4, 2025
d9ca1bb
temp link of pocket-ic that supports root_key
lwshang Apr 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 92 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,19 @@ concurrency:
cancel-in-progress: true

jobs:
build:
name: cargo build
runs-on: ubuntu-24.04
msrv:
name: cargo build with MSRV
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-13-large]
fail-fast: false
steps:
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.75.0 # MSRV, should sync with `rust-toolchain` in `Cargo.toml`
target: wasm32-unknown-unknown
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
Expand All @@ -28,14 +37,14 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
key: ${{ runner.os }}-msrv-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-msrv-
${{ runner.os }}-
- name: Run builds
run: |
cargo build --workspace --exclude ic-cdk-e2e-tests --exclude candid-extractor --target wasm32-unknown-unknown
cargo build --workspace --exclude ic-cdk-e2e-tests --exclude candid-extractor --target wasm32-unknown-unknown --release
cargo build --workspace --exclude ic-cdk-e2e-tests --target wasm32-unknown-unknown
cargo build --workspace --exclude ic-cdk-e2e-tests --target wasm32-unknown-unknown --release
cargo build --example=work

test:
Expand All @@ -44,7 +53,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04, macos-13-large]
fail-fast: false
steps:
- name: Install Rust toolchain
run: rustup show active-toolchain || rustup toolchain install
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
Expand All @@ -60,19 +72,69 @@ jobs:
restore-keys: |
${{ runner.os }}-test-
${{ runner.os }}-
- name: Download pocket-ic
- name: Download pocket-ic server
run: bash scripts/download_pocket_ic_server.sh
- name: Install protoc (macOS)
if: runner.os == 'macOS'
run: brew install protobuf
- name: Install protoc (Ubuntu)
if: runner.os == 'Linux'
run: |
bash scripts/download_pocket_ic.sh
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Run tests
run:
| # https://github.com/rust-lang/cargo/issues/6669 we have to run ALL tests with two commands
cargo test --all-targets
cargo test --all-targets --no-fail-fast
cargo test --doc

wasm64:
name: wasm64 e2e
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-13-large]
fail-fast: false
steps:
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rust-src
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-wasm64-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-wasm64-
${{ runner.os }}-
- name: Download pocket-ic server
run: bash scripts/download_pocket_ic_server.sh
- name: Install protoc (macOS)
if: runner.os == 'macOS'
run: brew install protobuf
- name: Install protoc (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Run tests
run: WASM64=1 cargo test --package ic-cdk-e2e-tests --no-fail-fast

fmt:
name: cargo fmt
runs-on: ubuntu-24.04
steps:
- name: Install Rust toolchain
run: rustup show active-toolchain || rustup toolchain install
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
Expand All @@ -96,6 +158,8 @@ jobs:
name: cargo clippy
runs-on: ubuntu-24.04
steps:
- name: Install Rust toolchain
run: rustup show active-toolchain || rustup toolchain install
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
Expand All @@ -111,6 +175,11 @@ jobs:
restore-keys: |
${{ runner.os }}-clippy-
${{ runner.os }}-
- name: Install protoc (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Run clippy
run: |
cargo clippy --tests --benches -- -D warnings
Expand All @@ -119,6 +188,8 @@ jobs:
name: cargo doc
runs-on: ubuntu-24.04
steps:
- name: Install Rust toolchain
run: rustup show active-toolchain || rustup toolchain install
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
Expand All @@ -134,22 +205,30 @@ jobs:
restore-keys: |
${{ runner.os }}-doc-
${{ runner.os }}-
- name: Install protoc (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Run doc
run: |
RUSTDOCFLAGS="-D warnings" cargo doc

aggregate:
name: ci:required
if: ${{ always() }}
needs: [build, test, fmt, clippy, doc]
needs: [msrv, test, wasm64, fmt, clippy, doc]
runs-on: ubuntu-24.04
steps:
- name: check build result
if: ${{ needs.build.result != 'success' }}
- name: check msrv result
if: ${{ needs.msrv.result != 'success' }}
run: exit 1
- name: check test result
if: ${{ needs.test.result != 'success' }}
run: exit 1
- name: check wasm64 result
if: ${{ needs.wasm64.result != 'success' }}
run: exit 1
- name: check fmt result
if: ${{ needs.fmt.result != 'success' }}
run: exit 1
Expand Down
132 changes: 0 additions & 132 deletions .github/workflows/examples.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/release-candid-extractor.yml

This file was deleted.

13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@ target/
# DFX
.dfx/

# Include root Cargo.toml to build candid-extractor with `--locked`
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
examples/*/Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
.DS_Store

e2e-tests/pocket-ic
# The root Cargo.lock is ignored because the workspace only has library crates.
# The candid-extractor has its own Cargo.lock file which is tracked to build the binary.
Cargo.lock

# Generated bindings
**/declarations/
Loading
Loading