fix: overhaul proposal selection and prioritization logic#5023
Merged
zhangsoledad merged 8 commits intodevelopfrom Mar 12, 2026
Merged
fix: overhaul proposal selection and prioritization logic#5023zhangsoledad merged 8 commits intodevelopfrom
zhangsoledad merged 8 commits intodevelopfrom
Conversation
e61a27e to
e4018fc
Compare
c8e5857 to
df212c2
Compare
c44d17e to
eadfec1
Compare
02a0c91 to
e41f04c
Compare
chenyukang
reviewed
Feb 25, 2026
eval-exec
reviewed
Feb 28, 2026
Collaborator
eval-exec
left a comment
There was a problem hiding this comment.
A integration test failed: https://github.com/nervosnetwork/ckb/actions/runs/22430288900/job/64950185639?pr=5023
2026-02-26 06:49:59.153 +00:00 *unnamed* ERROR panic thread 'unnamed' panicked at 'assertion failed: matches!(res.tx_status.status, Status::Pending)': test/src/specs/tx_pool/limit.rs:126 0: ckb_logger_service::setup_panic_logger::{{closure}}
1: std::panicking::panic_with_hook
2: std::panicking::panic_handler::{{closure}}
3: std::sys::backtrace::__rust_end_short_backtrace
4: __rustc::rust_begin_unwind
5: core::panicking::panic_fmt
6: core::panicking::panic
7: <ckb_test::specs::tx_pool::limit::TxPoolLimitAncestorCount as ckb_test::specs::Spec>::run
8: ckb_test::worker::Worker::run_spec
9: std::sys::backtrace::__rust_begin_short_backtrace
10: core::ops::function::FnOnce::call_once{{vtable.shim}}
11: std::sys::thread::unix::Thread::new::thread_start
12: <unknown>
13: <unknown>
2026-02-26 06:49:59.160 +00:00 *unnamed* DEBUG ckb_test::node Successfully killed ckb process (TxPoolLimitAncestorCount_node0097a136 to
5cebae7
Compare
…ing deduplication
…uplicate proposals against previous block
<!-- Thank you for contributing to nervosnetwork/ckb! If you haven't already, please read [CONTRIBUTING](https://github.com/nervosnetwork/ckb/blob/develop/CONTRIBUTING.md) document. If you're unsure about anything, just ask; somebody should be along to answer within a day or two. **Important**: We use Squash Merge to merge PRs, so the PR title will become the commit message. Please ensure your PR title follows the [Conventional Commit Messages](https://www.conventionalcommits.org/) format. The most important prefixes you should use: - `fix:`: represents bug fixes, and results in a SemVer patch bump. - `feat:`: represents a new feature, and results in a SemVer minor bump. - `<prefix>!:` (e.g. `feat!:`): represents a breaking change (indicated by the !) and results in a SemVer major bump. Other conventional prefixes are also acceptable (e.g., `docs:`, `refactor:`, `test:`, `chore:`, etc.). --> Issue Number: close #xxx <!-- REMOVE this line if no issue to close --> Problem Summary: Proposal: [xxx](url) <!-- REMOVE this line if not applicable --> What's Changed: - PR to update `owner/repo`: - Need to cherry-pick to the release branch Tests <!-- At least one of them must be included. --> - Unit test - Integration test - Manual test (add detailed scripts or steps below) - No code Side effects - Performance regression - Breaking backward compatibility
5cebae7 to
4741475
Compare
eval-exec
approved these changes
Mar 10, 2026
Merged
eval-exec
pushed a commit
to eval-exec/ckb
that referenced
this pull request
Apr 28, 2026
## 🤖 New release * `ckb-constant`: 1.1.0 -> 1.1.1 * `ckb-types`: 1.1.0 -> 1.1.1 * `ckb-resource`: 1.1.0 -> 1.1.1 * `ckb-app-config`: 1.2.0 -> 1.2.1 * `ckb-network`: 1.2.0 -> 1.2.1 * `ckb-tx-pool`: 1.2.0 -> 1.2.1 * `ckb-shared`: 1.1.0 -> 1.1.1 * `ckb-chain`: 1.2.0 -> 1.2.1 * `ckb-rich-indexer`: 1.1.0 -> 1.1.1 * `ckb-rpc`: 1.2.1 -> 1.2.2 <details><summary><i><b>Changelog</b></i></summary><p> ## `ckb-constant` <blockquote> ## [1.1.1](nervosnetwork/ckb@ckb-constant-v1.1.0...ckb-constant-v1.1.1) - 2026-04-24 ### Changed - update assume valid target (by @doitian) ### Contributors - @doitian </blockquote> ## `ckb-types` <blockquote> ## [1.1.1](nervosnetwork/ckb@ckb-types-v1.1.0...ckb-types-v1.1.1) - 2026-04-24 ### Fixed - overhaul proposal selection and prioritization logic (nervosnetwork#5023) (by @zhangsoledad) ### Contributors - @zhangsoledad </blockquote> ## `ckb-resource` <blockquote> ## [1.1.1](nervosnetwork/ckb@ckb-resource-v1.1.0...ckb-resource-v1.1.1) - 2026-04-24 ### Changed - update testnet bootnodes (nervosnetwork#5176) (by @jiangxianliang007) - sort WalkDir entries in resource bundling (nervosnetwork#5156) (by @eval-exec) ### Contributors - @jiangxianliang007 - @eval-exec </blockquote> ## `ckb-app-config` <blockquote> ## [1.2.1](nervosnetwork/ckb@ckb-app-config-v1.2.0...ckb-app-config-v1.2.1) - 2026-04-24 ### Fixed - overhaul proposal selection and prioritization logic (nervosnetwork#5023) (by @zhangsoledad) ### Contributors - @zhangsoledad </blockquote> ## `ckb-network` <blockquote> ## [1.2.1](nervosnetwork/ckb@ckb-network-v1.2.0...ckb-network-v1.2.1) - 2026-04-24 ### Changed - upgrade deps (nervosnetwork#5132) (by @driftluo) ### Contributors - @driftluo </blockquote> ## `ckb-tx-pool` <blockquote> ## [1.2.1](nervosnetwork/ckb@ckb-tx-pool-v1.2.0...ckb-tx-pool-v1.2.1) - 2026-04-24 ### Fixed - overhaul proposal selection and prioritization logic (nervosnetwork#5023) (by @zhangsoledad) ### Contributors - @zhangsoledad </blockquote> ## `ckb-shared` <blockquote> ## [1.1.1](nervosnetwork/ckb@ckb-shared-v1.1.0...ckb-shared-v1.1.1) - 2026-04-24 ### Fixed - ensure temporary directories are cleaned up after tests (nervosnetwork#5163) (by @jetjinser) ### Contributors - @jetjinser </blockquote> ## `ckb-chain` <blockquote> ## [1.2.1](nervosnetwork/ckb@ckb-chain-v1.2.0...ckb-chain-v1.2.1) - 2026-04-24 ### Fixed - overhaul proposal selection and prioritization logic (nervosnetwork#5023) (by @zhangsoledad) ### Contributors - @zhangsoledad </blockquote> ## `ckb-rich-indexer` <blockquote> ## [1.1.1](nervosnetwork/ckb@ckb-rich-indexer-v1.1.0...ckb-rich-indexer-v1.1.1) - 2026-04-24 ### Fixed - preserve leading zero bytes and handle all-0xFF overflow in rich-indexer prefix search upper bound (nervosnetwork#5166) (by @Copilot) ### Contributors - @Copilot </blockquote> ## `ckb-rpc` <blockquote> ## [1.2.2](nervosnetwork/ckb@ckb-rpc-v1.2.1...ckb-rpc-v1.2.2) - 2026-04-24 ### Changed - *(rpc)* correct PRC typo in docs and comments (nervosnetwork#5130) (by @eval-exec) ### Fixed - ensure temporary directories are cleaned up after tests (nervosnetwork#5163) (by @jetjinser) - generate GitHub-compatible RPC doc anchors (nervosnetwork#5136) (by @eval-exec) - overhaul proposal selection and prioritization logic (nervosnetwork#5023) (by @zhangsoledad) ### Contributors - @jetjinser - @eval-exec - @zhangsoledad </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: nervos-bot[bot] <46313439+nervos-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed:
This PR fixes a series of logical issues in the tx-pool and block-template construction related to proposal transactions:
Prioritize proposal transactions
Proposals are now given the highest priority in the txpool.
Allow compact block recovery to use transactions from verify_queue
Compact-block reconstruction previously only searched the main pool, leading to unnecessary “missing transaction” failures when a proposal was already in verify_queue. The reconciler now checks pool_map, verify_queue, and the orphan set (when relevant).
Fix proposal selection logic in block template
The previous implementation had several severe bugs:
Related changes
owner/repo:Check List
Tests
Release note