-
Notifications
You must be signed in to change notification settings - Fork 84
pallet-revive inherent handler #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: seun/pallet-revive-ismp-host
Are you sure you want to change the base?
pallet-revive inherent handler #574
Conversation
| DigestItem::PreRuntime(consensus_engine_id, value) | ||
| if *consensus_engine_id == AURA_ENGINE_ID => | ||
| { | ||
| if let Ok(slot) = Slot::decode(&mut &value[..]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets use the timestamp digest
| let topic_0_hash = keccak_256(b"StateMachineUpdated(bytes32,bytes)"); | ||
| let topic_0: H256 = H256::from(topic_0_hash); | ||
|
|
||
| let topic_1_hash = keccak_256(b"hyperbridge_state_machine"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this second topic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was thinking to tag it specifically as a hyperbridge state machine event, but yeah, seems redundant
This PR introduces a dedicated system for verifying Hyperbridge parachain proofs submitted via inherents and subsequently emitting an EVM-compatible log through pallet-revive.
The primary goal is to provide a standalone mechanism for verifying Hyperbridge consensus updates directly within the runtime while maintaining compatibility with the relayers and indexer that expects EVM log events (specifically StateMachineUpdated). Existing ISMP mechanisms were deemed unsuitable as we needed this inherent and inherent handler to reside upstream (in Polkadot SDK) without depending on ISMP pallets.
Implementation Details:
hyperbridge-ismp-parachain:InherentHandlertrait that resides inpallet-revivefor processing system log message so as to emit EVM log events.hyperbridge-ismp-parachain-inherent:HyperbridgeVerifierApiruntime API trait to allow querying the runtime for theHyperbridgeParaIdandcurrent_relay_chain_state.HyperbridgeConsensusProofdata under theINHERENT_IDENTIFIER(b"hypbridg").companion
introduce inherent handler in pallet revive paritytech/polkadot-sdk#10140