Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dd0ddd3
Add migrated scenario-1-pocketic as a separate crate alongside the ex…
mbjorkqvist May 13, 2026
4790193
Replace the old dfx test with the new pocketic test for scenario-1
mbjorkqvist May 13, 2026
58d3600
Get stable_height from metrics as before instead of blindly ticking 1…
mbjorkqvist May 13, 2026
2abba8e
Remove redundant candid dev-dependency in scenario-1
mbjorkqvist May 13, 2026
aa942af
Store source_id in Setup
mbjorkqvist May 13, 2026
811dc81
Panic with error body on non-200 metrics response
mbjorkqvist May 13, 2026
c935b0f
Parse stable_height metric as f64 before casting to u32
mbjorkqvist May 13, 2026
0fe2247
Document the rationale behind max_ticks values
mbjorkqvist May 13, 2026
8257a34
Run scenario-1 via cargo test in CI
mbjorkqvist May 13, 2026
8ccec7f
Drop unused source_id field from Setup
mbjorkqvist May 13, 2026
725dca1
Move scenario-1 address constants into a shared lib
mbjorkqvist May 13, 2026
29b99e7
Run scenario-1 test on an application subnet
mbjorkqvist May 13, 2026
d53ae2f
Accept labeled stable_height metric
mbjorkqvist May 13, 2026
757c295
Surface errors in tick_until_main_chain_height
mbjorkqvist May 13, 2026
b81e4f9
Sort use statements alphabetically
mbjorkqvist May 13, 2026
741c786
Note that fee-percentile calls are not asserted
mbjorkqvist May 13, 2026
220690c
rustfmt
mbjorkqvist May 13, 2026
43f9034
Reuse HttpRequest/HttpResponse from ic-btc-canister
mbjorkqvist May 15, 2026
1869e1c
Install bitcoin canister on a bitcoin subnet
mbjorkqvist May 18, 2026
4aa4d0c
Rename e2e-tests/scenario-1/tests/integration.rs to tests.rs
mbjorkqvist May 18, 2026
ade73f9
Drop the unchecked bitcoin_get_current_fee_percentiles calls
mbjorkqvist May 18, 2026
6c35d3f
Use dfinity/pocketic action to install PocketIC in scenario-1 job
mbjorkqvist May 18, 2026
e226323
Stop swallowing errors in get_stable_height
mbjorkqvist May 18, 2026
ec2b304
Clippy
mbjorkqvist May 18, 2026
1a60f6a
Co-locate source canister with bitcoin canister on the bitcoin subnet
mbjorkqvist May 18, 2026
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
33 changes: 19 additions & 14 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Run Tests
shell: bash
run: |
cargo test --release --all-targets --workspace --exclude benchmarks --exclude e2e-cdk-bitcoin-canister -- --color always
cargo test --release --all-targets --workspace --exclude benchmarks --exclude e2e-cdk-bitcoin-canister --exclude scenario-1 -- --color always
env:
RUST_BACKTRACE: 1

Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:

e2e-scenario-1:
runs-on: ubuntu-latest
needs: [cargo-build, canister-build-reproducibility]
needs: canister-build-reproducibility

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
Expand All @@ -167,26 +167,31 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1

- name: Install Rust
run: |
rustup update ${RUST_VERSION} --no-self-update
rustup default ${RUST_VERSION}
rustup target add wasm32-unknown-unknown

- name: Install PocketIC server
uses: dfinity/pocketic@20c33db1aa87cc6ece50857ac632c37acf5e0322 # main
with:
pocket-ic-server-version: ${{ env.POCKET_IC_SERVER_VERSION }}

- name: Download WASMs
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: wasms
path: ./wasms

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown

- name: Install dfx
uses: dfinity/setup-dfx@e50c04f104ee4285ec010f10609483cf41e4d365 # main
with:
dfx-version: $DFX_VERSION
- name: Build scenario-1 source canister WASM
run: bash scripts/build-canister.sh scenario-1

- name: Run scenario 1
run: |
bash e2e-tests/scenario-1.sh
run: cargo test --release -p scenario-1
env:
IC_BTC_CANISTER_WASM_PATH: ${{ github.workspace }}/wasms/ic-btc-canister.wasm.gz
E2E_SCENARIO_1_WASM_PATH: ${{ github.workspace }}/target/wasm32-unknown-unknown/release/scenario-1.wasm.gz

e2e-scenario-2:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions Cargo.lock

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

214 changes: 0 additions & 214 deletions e2e-tests/scenario-1.sh

This file was deleted.

6 changes: 6 additions & 0 deletions e2e-tests/scenario-1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ candid = { workspace = true }
ic-btc-test-utils = { workspace = true }
ic-cdk = { workspace = true }
serde = { workspace = true }

[dev-dependencies]
ic-btc-canister = { workspace = true }
ic-btc-interface = { workspace = true }
pocket-ic = { workspace = true }
serde_bytes = { workspace = true }
6 changes: 6 additions & 0 deletions e2e-tests/scenario-1/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pub const MINER_ADDRESS: &str = "mwSSBD3NCriNXNMgd6dr2N2rxX9M9zXqrp";
pub const ADDRESS_1: &str = "bcrt1qg4cvn305es3k8j69x06t9hf4v5yx4mxdaeazl8";
pub const ADDRESS_2: &str = "bcrt1qxp8ercrmfxlu0s543najcj6fe6267j97tv7rgf";
pub const ADDRESS_3: &str = "bcrt1qp045tvzkxx0292645rxem9eryc7jpwsk3dy60h";
pub const ADDRESS_4: &str = "bcrt1qjft8fhexv4znxu22hed7gxtpy2wazjn0x079mn";
pub const ADDRESS_5: &str = "bcrt1qenhfslne5vdqld0djs0h0tfw225tkkzzc60exh";
8 changes: 1 addition & 7 deletions e2e-tests/scenario-1/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use bitcoin::{
use candid::CandidType;
use ic_btc_test_utils::{BlockBuilder, TransactionBuilder};
use ic_cdk::{init, update};
use scenario_1::{ADDRESS_1, ADDRESS_2, ADDRESS_3, ADDRESS_4, ADDRESS_5, MINER_ADDRESS};
use serde::{Deserialize, Serialize};
use std::cell::{Cell, RefCell};
use std::str::FromStr;
Expand All @@ -13,13 +14,6 @@ type BlockBlob = Vec<u8>;
type BlockHeaderBlob = Vec<u8>;
type BlockHash = Vec<u8>;

const MINER_ADDRESS: &str = "mwSSBD3NCriNXNMgd6dr2N2rxX9M9zXqrp";
const ADDRESS_1: &str = "bcrt1qg4cvn305es3k8j69x06t9hf4v5yx4mxdaeazl8";
const ADDRESS_2: &str = "bcrt1qxp8ercrmfxlu0s543najcj6fe6267j97tv7rgf";
const ADDRESS_3: &str = "bcrt1qp045tvzkxx0292645rxem9eryc7jpwsk3dy60h";
const ADDRESS_4: &str = "bcrt1qjft8fhexv4znxu22hed7gxtpy2wazjn0x079mn";
const ADDRESS_5: &str = "bcrt1qenhfslne5vdqld0djs0h0tfw225tkkzzc60exh";

#[derive(CandidType, Clone, Copy, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)]
enum Network {
#[serde(rename = "mainnet")]
Expand Down
Loading
Loading