Skip to content

fix(test): wait for block template reset in RpcTruncate#5119

Open
eval-exec wants to merge 2 commits intonervosnetwork:developfrom
eval-exec:fix/rpc-truncate-wait-template-reset
Open

fix(test): wait for block template reset in RpcTruncate#5119
eval-exec wants to merge 2 commits intonervosnetwork:developfrom
eval-exec:fix/rpc-truncate-wait-template-reset

Conversation

@eval-exec
Copy link
Collaborator

@eval-exec eval-exec commented Mar 2, 2026

What problem does this PR solve?

Problem Summary:
https://github.com/nervosnetwork/ckb/actions/runs/21896507826/job/63217348878?pr=5107
RpcTruncate integration test can fail in CI after truncate when subsequent mining still follows a stale block-template parent from the pre-truncate tip, leading to cell1 staying unknown instead of live.

What is changed and how it works?

What's Changed:

  • Add a guard in test/src/specs/rpc/truncate.rs to wait until block-template parent_hash switches to the truncated tip.
  • Keep the existing tx-pool clear assertions and flow unchanged.

Related changes

  • PR to update owner/repo: N/A
  • Need to cherry-pick to the release branch: No

Check List

Tests

  • Integration test (CI)

Side effects

  • None expected

Copilot AI review requested due to automatic review settings March 2, 2026 05:24
@eval-exec eval-exec requested a review from a team as a code owner March 2, 2026 05:24
@eval-exec eval-exec requested review from doitian and removed request for a team March 2, 2026 05:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR stabilizes the RpcTruncate integration test by ensuring the node’s block-template parent is refreshed to the post-truncate tip before proceeding, preventing mining from using a stale pre-truncate parent and avoiding incorrect cell state assertions.

Changes:

  • Add a blocking wait after truncate until get_block_template reports parent_hash == to_truncate.
  • Keep the existing tx-pool synchronization and assertions unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zhangsoledad zhangsoledad added this pull request to the merge queue Mar 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 10, 2026
@zhangsoledad zhangsoledad added this pull request to the merge queue Mar 13, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 13, 2026
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.

3 participants