Skip to content

use prevalidate proof in validate_unsigned#453

Merged
n13 merged 4 commits intomainfrom
wormhole_verification_in_node
Mar 24, 2026
Merged

use prevalidate proof in validate_unsigned#453
n13 merged 4 commits intomainfrom
wormhole_verification_in_node

Conversation

@n13
Copy link
Collaborator

@n13 n13 commented Mar 23, 2026

this prevents fake proofs from getting into the chain

Wormhole proof pre-validation before transaction pool entry

Unsigned wormhole proof extrinsics previously only checked for non-empty bytes before entering the tx pool, making it trivial to DDoS by spamming random byte sequences.

Changes

Extract pre_validate_proof helper in the wormhole pallet that runs all cheap checks -- proof deserialization against circuit common data, public input parsing, asset ID, volume fee rate, block hash existence/match, and nullifier replay -- and call it from both validate_unsigned (pool gating) and the dispatch function (defense-in-depth), eliminating duplicated validation logic.

What this prevents

Random bytes and malformed proofs are now rejected at pool entry before propagation. Deserialization against the circuit's CommonCircuitData is the strongest filter -- an attacker would need to reverse-engineer the embedded circuit structure just to get past it. The full ZK verification remains at dispatch time only to avoid becoming a CPU-exhaustion vector itself.

n13 added 4 commits March 23, 2026 11:40
@n13 n13 merged commit 0327548 into main Mar 24, 2026
4 checks passed
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.

2 participants