Skip to content

fix: deflake scenario-1 e2e test#511

Open
mducroux wants to merge 11 commits into
masterfrom
mducroux/fix-flaky-scenario-1-e2e-test
Open

fix: deflake scenario-1 e2e test#511
mducroux wants to merge 11 commits into
masterfrom
mducroux/fix-flaky-scenario-1-e2e-test

Conversation

@mducroux
Copy link
Copy Markdown
Contributor

@mducroux mducroux commented Mar 31, 2026

Root Cause

The scenario-1 e2e tests in e2e-tests was flaky because it was not waiting enough time to ingest all the stable block in stable memory.

Fix

Increase the number of attempts from 60 to 120 (2 minutes) to ingest stable blocks in stable memory in the scenario-1 e2e test.

@mducroux mducroux changed the title fix: flaky scenario-1 e2e test fix: deflake scenario-1 e2e test Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

canbench 🏋 (dir: .) bc3d596 2026-04-13 07:47:54 UTC

./canbench_results.yml is up to date
📦 canbench_results_benchmark.csv available in artifacts

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

Benchmark: insert_300_blocks
  total:
    instructions: 418.81 M (no change)
    heap_increase: 12 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate (scope):
    calls: 300 (no change)
    instructions: 368.05 M (no change)
    heap_increase: 4 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block (scope):
    calls: 300 (no change)
    instructions: 18.31 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block/check_merkle_root (scope):
    calls: 300 (no change)
    instructions: 8.00 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block/ensure_unique_transactions (scope):
    calls: 300 (no change)
    instructions: 8.47 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_header (scope):
    calls: 300 (no change)
    instructions: 348.62 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: get_metrics
  total:
    instructions: 10.11 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: insert_block_headers
  total:
    instructions: 2.85 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_header (scope):
    calls: 100 (no change)
    instructions: 2.81 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: insert_block_headers_multiple_times
  total:
    instructions: 10.30 B (no change)
    heap_increase: 7 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_header (scope):
    calls: 1000 (no change)
    instructions: 8.99 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: insert_block_with_10k_transactions
  total:
    instructions: 1.38 B (no change)
    heap_increase: 73 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate (scope):
    calls: 1 (no change)
    instructions: 149.63 M (no change)
    heap_increase: 20 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block (scope):
    calls: 1 (no change)
    instructions: 149.52 M (no change)
    heap_increase: 20 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block/check_merkle_root (scope):
    calls: 1 (no change)
    instructions: 70.70 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block/ensure_unique_transactions (scope):
    calls: 1 (no change)
    instructions: 78.82 M (no change)
    heap_increase: 20 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_header (scope):
    calls: 1 (no change)
    instructions: 102.94 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: insert_block_with_1k_transactions
  total:
    instructions: 114.34 M (no change)
    heap_increase: 7 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate (scope):
    calls: 1 (no change)
    instructions: 15.14 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block (scope):
    calls: 1 (no change)
    instructions: 15.04 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block/check_merkle_root (scope):
    calls: 1 (no change)
    instructions: 7.12 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_block/ensure_unique_transactions (scope):
    calls: 1 (no change)
    instructions: 7.91 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  validate_header (scope):
    calls: 1 (no change)
    instructions: 102.94 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: pre_upgrade_with_many_unstable_blocks
  total:
    instructions: 5.38 B (no change)
    heap_increase: 4088 pages (no change)
    stable_memory_increase: 1792 pages (no change)

  serialize_blocktree_flatten (scope):
    calls: 1 (no change)
    instructions: 188.08 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  serialize_blocktree_serialize_seq (scope):
    calls: 1 (no change)
    instructions: 1.92 B (no change)
    heap_increase: 2039 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: get_blockchain_info_single_chain
  total:
    instructions: 3.54 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: get_blockchain_info_with_forks
  total:
    instructions: 3.63 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: get_blockchain_info_many_branches
  total:
    instructions: 5.32 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: bitcoin_get_balance_baseline
  total:
    instructions: 6.32 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: bitcoin_get_balance_stress
  total:
    instructions: 254.45 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: bitcoin_get_utxos_baseline
  total:
    instructions: 7.90 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: bitcoin_get_utxos_stress
  total:
    instructions: 4.70 B (no change)
    heap_increase: 34 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: bitcoin_get_current_fee_percentiles
  total:
    instructions: 172.62 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: bitcoin_get_block_headers_baseline
  total:
    instructions: 535.50 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: bitcoin_get_block_headers_stress
  total:
    instructions: 12.51 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Summary:
  instructions:
    status:   No significant changes 👍
    counts:   [total 17 | regressed 0 | improved 0 | new 0 | unchanged 17]
    change:   [max 0 | p75 0 | median 0 | p25 0 | min 0]
    change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]

  heap_increase:
    status:   No significant changes 👍
    counts:   [total 17 | regressed 0 | improved 0 | new 0 | unchanged 17]
    change:   [max 0 | p75 0 | median 0 | p25 0 | min 0]
    change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]

  stable_memory_increase:
    status:   No significant changes 👍
    counts:   [total 17 | regressed 0 | improved 0 | new 0 | unchanged 17]
    change:   [max 0 | p75 0 | median 0 | p25 0 | min 0]
    change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]

---------------------------------------------------
CSV results saved to canbench_results.csv

@mducroux mducroux requested a review from a team as a code owner April 13, 2026 06:25
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.

2 participants