Skip to content
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

fix: panic when building bitcoin state in bootstrap script #291

Closed
wants to merge 3 commits into from

Conversation

ielashi
Copy link
Collaborator

@ielashi ielashi commented Apr 8, 2024

When trying to build the bitcoin state from the bootstrap scripts, the last step (./6_compute_canister_state.sh) fails with the following:

Shuffling...
Writing to stable structure...
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', bootstrap/state-builder/src/build_balances.rs:97:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This is because, previously insert on StableBTreeMap returned a result. Currently, insert doesn't fail and that unwrap is no longer needed.

@ielashi ielashi requested a review from a team as a code owner April 8, 2024 13:24
@ielashi ielashi marked this pull request as draft April 8, 2024 13:31
Copy link

github-actions bot commented Apr 8, 2024

canbench 🏋

No significant performance changes detected ✅

./canbench_results.yml is up to date ✅

~/work/bitcoin-canister/bitcoin-canister/scripts ~/work/bitcoin-canister/bitcoin-canister
~/work/bitcoin-canister/bitcoin-canister

---------------------------------------------------

Benchmark: insert_300_blocks
  total:
    instructions: 561.77 M (-0.00%) (change within noise threshold)
    heap_increase: 6 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: get_metrics
  total:
    instructions: 87.00 M (-0.00%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: insert_block_headers
  total:
    instructions: 3.90 B (-0.00%) (change within noise threshold)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: insert_block_headers_multiple_times
  total:
    instructions: 13.90 B (-0.00%) (change within noise threshold)
    heap_increase: 7 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

@ielashi ielashi closed this Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant