Skip to content

Simplify poseidon usage#571

Open
illuzen wants to merge 3 commits into
mainfrom
illuzen/simpler-poseidon
Open

Simplify poseidon usage#571
illuzen wants to merge 3 commits into
mainfrom
illuzen/simpler-poseidon

Conversation

@illuzen
Copy link
Copy Markdown
Contributor

@illuzen illuzen commented May 27, 2026

shouldn't change any hashes, but simplifies Header definition

depends on the new qp-poseidon PR Quantus-Network/qp-poseidon#74


Note

High Risk
Changes block header typing and Poseidon dependency wiring across runtime and consensus-critical qp-header; a wrong hash would fork the chain despite the stability test.

Overview
This PR drops the qp-poseidon crate from the workspace and standardizes on qp-poseidon-core 2.0.2 (workspace Cargo.toml / lockfile), removing that dependency from node, runtime, wormhole, mining-rewards, dilithium-crypto, and related crates.

qp_header::Header is simplified from Header<Number, BlockHashHasher, StateHasher> to Header<Number, Hashing>: header fields and block hash are H256, Poseidon block hashing is implemented via qp_poseidon_core inside qp-header, and the lone type parameter is the state trie / extrinsics root hasher (still BlakeTwo256 at runtime). Runtime and mocks now use Header<BlockNumber, BlakeTwo256> instead of PoseidonHasher + Blake2.

pallet-wormhole no longer depends on ToFelts / qp_poseidon for config bounds (native balance, asset id, transfer count, wormhole account id). Tests use BlakeTwo256 for TestExternalities instead of PoseidonHasher.

A consensus regression guard replaces the old dual-path hash comparison: poseidon_header_hash_is_stable asserts a fixed devnet header hash (b7dbfd39…).

Reviewed by Cursor Bugbot for commit a3cdcab. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

1 participant