Conversation
Adds parachain_hop_promotion_bitswap_test under a new `zombie-hop-tests` feature flag. The test: - spawns a single HOP-enabled collator (small RP, small HOP retention, promotion buffer > retention so entries are promotable immediately) - authorizes Alice, submits `hop_submit` over JSON-RPC, waits for the collator's maintenance task to land the `HopPromotion::promote` extrinsic (detected via the Stored event) - after the retention period, asserts a `ProofChecked` event fired - compares the bitswap-served content to the original both before and after promotion -- this assertion is expected to fail and is the whole point of the test (surfacing the HOP -> col11/bitswap gap) Also adds a `utils::hop_rpc` helper that reconstructs the on-chain submit signing payload + SCALE-encoded MultiSigner/MultiSignature so the test can drive `hop_submit` without depending on `sc-hop` from polkadot-sdk, plus a `just test-zombienet-hop` recipe.
Move `current_best_block`, `current_finalized_block`, `block_hash_at`, `finalized_block_hash_at`, and `assert_proof_checked_at` out of `auto_renew_storage.rs` and `hop_promotion_storage.rs` into a new `utils::blocks` module. Both test files now use the shared implementation -- net diff is -128 lines.
…ted blob Before asserting `ProofChecked` at `store_block + RetentionPeriod`, read `TransactionByContentHash[content_hash]` at the proof block and assert it equals `(store_block, 0)`. The runtime's storage-proof inherent at block N proves `Transactions[N - RetentionPeriod]`, so tying the index back to our HOP content_hash at the proof block's state guarantees the upcoming ProofChecked event covers our promoted blob and not some unrelated extrinsic that happened to land in the same slot. Refactor `canonical_store_block` to share its decode path with a new `transaction_location_at` helper that returns both `(block, index)` from the same `TransactionByContentHash` read.
Drop the `transaction_location_at` helper -- the HOP test only needs the block number, so it can call the existing `canonical_store_block` directly. Single `assert_eq!(indexed_at, store_block, ...)` before `assert_proof_checked_at` ties the ProofChecked event back to the HOP-promoted blob.
karolk91
approved these changes
May 29, 2026
Add a matching CI job for the new HOP suite, mirroring the `zombienet-sync-tests` shape: matrix over westend + paseo, label-gated so it doesn't run on every PR. The HOP test is currently designed to fail (it surfaces the HOP -> col11/bitswap gap), so unconditional execution would block every PR. Trigger with the `zombienet-hop-tests` label or `workflow_dispatch`.
CI: - Drop the `if:` gate on `zombienet-hop-tests` so it runs on every PR push, the same as `zombienet-auto-renew-tests`. - README CI matrix row updated. Logging: - `verify_data_matches` (called from every bitswap probe) now logs the full hex of expected + fetched on mismatch, plus both byte-len and hex-string-len so postmortems can see where the data diverges.
Collaborator
Author
|
nice, locally this fails as expected: |
Collaborator
Author
Collaborator
Author
Collaborator
Author
|
merged as a part of #574 |
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.
Summary
Adds
parachain_hop_promotion_bitswap_testunder a newzombie-hop-testsfeature flag. The test exercises the end-to-end HOP (Hand-Off Protocol) promotion path on a single-collator parachain network and is deliberately designed to fail at the bitswap step, surfacing the HOP -> col11 / bitswap gap.What the test does:
--enable-hop --hop-disable-rate-limit --hop-retention-secs=10 --hop-promotion-buffer-secs=60 --hop-check-interval=5) so submitted entries are promotable on the first maintenance tick.RetentionPeriodto 10 blocks via sudo and authorizes Alice.hop_submitover JSON-RPC with Alice's sr25519 signature, then waits for the maintenance task to land theHopPromotion::promoteextrinsic (detected via theTransactionStorage::Storedevent).store_block + RetentionPeriodand asserts the storage-proof inherent fired (ProofCheckedevent). This passes.Also adds:
utils::hop_rpchelper that reconstructs the on-chain submit signing payload and SCALE-encodedMultiSigner/MultiSignatureso the test can drivehop_submitdirectly via JSON-RPC without depending onsc-hopfrom polkadot-sdk.just test-zombienet-hoprecipe and README matrix entry.