Skip to content

Conversation

@bkontur
Copy link
Contributor

@bkontur bkontur commented Oct 29, 2025

This PR:

  • Fixes check_proof and its binary_search_by_key chunk
  • Adds the ensure_chunk_proof_works test, which covers all possible chunk index build/verify proof roundtrips (to catch all corner cases)
  • Improves docs around pallet-transaction-storage

@bkontur bkontur requested a review from a team as a code owner October 29, 2025 09:56
@bkontur bkontur added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Oct 29, 2025
@bkontur
Copy link
Contributor Author

bkontur commented Oct 29, 2025

/cmd fmt

@bkontur
Copy link
Contributor Author

bkontur commented Oct 29, 2025

/cmd prdoc --audience runtime_dev --bump patch

@bkontur bkontur requested a review from arkpar October 29, 2025 10:27
Comment on lines 199 to 202
if total_chunks.is_zero() {
const MSG: &str = "No chunks to build proof for.";
return Err(Error::Application(Box::from(MSG)));
}
Copy link
Member

Choose a reason for hiding this comment

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

Why is this now an error? This will make the block production fail. Before it was just not providing any proof, which is the sensible thing to do here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why is this now an error? This will make the block production fail. Before it was just not providing any proof, which is the sensible thing to do here.

oh, good point, thank you, you're right, my bad, please check here: 04cb7d7

I also tried to remove that .unwrap( and change return type to Result<Option, but I am not sure about the end (looks ok-ish and should not happen):

debug_assert!(false, "No chunk matched the target_chunk_index; logic error");
Ok(None)

@bkchr What would you suggest here?


I also talked to @arkpar and added an early return when the chunk is found, since we don’t need to process the subsequent transactions.

@bkontur
Copy link
Contributor Author

bkontur commented Oct 29, 2025

/cmd fmt

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/18988758493
Failed job name: test-linux-stable

1 similar comment
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/18988758493
Failed job name: test-linux-stable

@bkontur
Copy link
Contributor Author

bkontur commented Nov 4, 2025

/cmd bench --pallet pallet_transaction_storage --runtime dev

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Command "bench --pallet pallet_transaction_storage --runtime dev" has started 🚀 See logs here

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Command "bench --pallet pallet_transaction_storage --runtime dev" has failed ❌! See logs here

@bkontur bkontur enabled auto-merge November 4, 2025 14:39
@bkontur bkontur added this pull request to the merge queue Nov 4, 2025
Merged via the queue into master with commit 41bc46f Nov 4, 2025
238 of 239 checks passed
@bkontur bkontur deleted the bko-pallet-tx-storage-nits branch November 4, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T1-FRAME This PR/Issue is related to core FRAME, the framework.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants