-
Notifications
You must be signed in to change notification settings - Fork 86
BEEFY Consensus Client #553
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: main
Are you sure you want to change the base?
Conversation
| #![cfg_attr(not(feature = "std"), no_std)] | ||
| #![allow(clippy::all)] | ||
| #![deny(missing_docs)] | ||
| //#![deny(missing_docs)] |
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.
| //#![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"))? |
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 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) |
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.
make this generic since this library will run on near
| let proof_hashes: Vec<[u8; 32]> = | ||
| parachain_proof.proof.iter().flatten().map(|node| node.1.into()).collect(); |
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.
Doesn't seem like we use the u32 index in the proof
|
Looks like a great start, lets get tests |
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.