Skip to content

Conversation

@dharjeezy
Copy link
Contributor

@dharjeezy dharjeezy commented Oct 9, 2025

This pull request introduces the ismp-beefy pallet, a consensus client for ISMP designed to verify Polkadot's BEEFY finality proofs. This implementation allows ISMP to process consensus updates from BEEFY, making it possible to trustlessly verify state commitments.

#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::all)]
#![deny(missing_docs)]
//#![deny(missing_docs)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//#![deny(missing_docs)]
#![deny(missing_docs)]

let latest_height = relay_proof.signed_commitment.commitment.block_number;

if trusted_state.latest_beefy_height >= latest_height {
Err(anyhow!("Stale height"))?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use a typed enum for errors, we can use thiserror::Error

let mut authority_indices = Vec::new();

for sig in &relay_proof.signed_commitment.signatures {
let signature = ecdsa::Signature::from_slice(&sig.signature)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this generic since this library will run on near

Comment on lines 115 to 116
let proof_hashes: Vec<[u8; 32]> =
parachain_proof.proof.iter().flatten().map(|node| node.1.into()).collect();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like we use the u32 index in the proof

@seunlanlege
Copy link
Member

seunlanlege commented Oct 9, 2025

Looks like a great start, lets get tests

@seunlanlege seunlanlege changed the title Beefy Consensus Client BEEFY Consensus Client Oct 10, 2025
@dharjeezy dharjeezy requested a review from seunlanlege October 15, 2025 09:49
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.

3 participants