Open
Conversation
E2E workflow stub
shamil-gadelshin
approved these changes
Feb 20, 2026
Contributor
|
Seems it introduces the problem that the Ink contract doesn't work. I am not sure what is issue yet. Everything is fine in my local. #2450 created to debug it. |
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
Companion PR to opentensor/polkadot-sdk#6
Reworks the MEV Shield from a store-then-decrypt model to a decrypt-at-proposal model.
Previously, encrypted transactions were stored on-chain (
Submissions) and decrypted by the block author in a separate step, leaving a window where decrypted transactions sat in the pool before inclusion. Now, encrypted transactions travel through the pool as opaque ciphertext and the block proposer decrypts them inline during block building, including the inner extrinsic in the same block. There is no point where a decrypted transaction is visible before it lands in a finalized block.Encryption uses ML-KEM-768 + XChaCha20-Poly1305 with per-block ephemeral keys rotated via an inherent.
Changes
pallet-shield(reworked)announce_next_keyinherent: rotatesCurrentKey <- NextKeyeach block and publishes the next block author's ML-KEM public keysubmit_encryptedextrinsic: accepts an encrypted ciphertext wrapper — the block proposer decrypts and includes the inner extrinsic in the same blocktry_decode_shielded_tx/try_unshield_tx: runtime helpers called by the block proposer via theShieldApiruntime APICheckShieldedTxValiditytransaction extension: pool validation checks ciphertext structure; block import additionally validateskey_hashagainstCurrentKey/NextKeyFindAuthorstrait for resolving current and next block authorSubmissions,KeyHashByBlock)stp-io(new crate — host functions)mlkem768_decapsulate: ML-KEM-768 decapsulation via theShieldKeystoreextensionaead_decrypt: XChaCha20-Poly1305 decryption via theShieldKeystoreextensionSubtensorHostFunctionsfor registration in the nodeNode integration
ShieldKeystorecreated inservice.rsand threaded through to the proposer and inherent providersShieldInherentDataProvideradded to Aura consensus configurationKeyRotationServicegenerates a new ML-KEM keypair on each own-block importSubtensorHostFunctionsregistered in the client executorRuntime integration
ShieldApiruntime API implementedCheckShieldedTxValidityadded to the transaction extension pipelineE2E test infrastructure (new)
e2e/with shared utilities (node management, chain spec generation, client helpers)e2e-shieldtest suite: 14 tests across 3 files covering key rotation, encrypted transactions (happy path, failure cases, rejection), 3-node and 6-node topologies.github/workflows/e2e.yml) that auto-discovers testable packages and runs them in parallelTests
try_decode_shielded_tx,try_unshield_tx, depth-limit protection, inherent creation,CheckShieldedTxValidityextension (key_hash matching, malformed rejection, pool vs in-block source)