Backport: Implement basic equivocations detection loop (#2375)

* Implement basic equivocations detection loop (#2367)

* FinalityProofsBuf adjustments

- store a Vec<FinalityProof>
- transform prune `buf_limit` to Option

* FinalityProof: add target_header_hash()

* Target client: implement best_synced_header_hash()

* Implement first version of the equivocations detection loop

* Address code review comments

* Leftover

* polkadot-staging adjustments
This commit is contained in:
Serban Iorga authored and Bastian Köcher committed 2024-04-10 10:28:37 +02:00
1 parent cc3bbc690b
commit 588508acd4
18 files changed
+572 -79

No files matched your search

@@ -97,7 +97,11 @@ impl<H: HeaderT> GrandpaJustification<H> {
}
}
impl<H: HeaderT> crate::FinalityProof<H::Number> for GrandpaJustification<H> {
impl<H: HeaderT> crate::FinalityProof<H::Hash, H::Number> for GrandpaJustification<H> {
fn target_header_hash(&self) -> H::Hash {
self.commit.target_hash
}
fn target_header_number(&self) -> H::Number {
self.commit.target_number
}