grandpa: rewrite warp sync proof generation (#8148)

* grandpa: use AuthoritySetChanges to generate warp sync proof

* node: init grandpa warp sync protocol

* grandpa: iterator for AuthoritySetChanges

* grandpa: rewrite warp sync proof generation

* grandpa: remove old code for warp sync generation

* grandpa: fix indentation

* grandpa: fix off by one

* grandpa: use binary search to find start idx when generating warp sync proof

* grandpa: add method to verify warp sync proofs

* grandpa: remove unnecessary code to skip authority set changes

* grandpa: add test for warp sync proof generation and verification

* grandpa: add missing docs

* grandpa: remove trailing comma
This commit is contained in:
André Silva
2021-02-25 08:44:51 +00:00
committed by GitHub
parent 8a0e8ea9a6
commit 94c29ff666
10 changed files with 463 additions and 538 deletions
+7
View File
@@ -7254,18 +7254,25 @@ name = "sc-finality-grandpa-warp-sync"
version = "0.9.0"
dependencies = [
"derive_more",
"finality-grandpa",
"futures 0.3.12",
"log",
"num-traits",
"parity-scale-codec",
"parking_lot 0.11.1",
"prost",
"rand 0.8.3",
"sc-block-builder",
"sc-client-api",
"sc-finality-grandpa",
"sc-network",
"sc-service",
"sp-blockchain",
"sp-consensus",
"sp-finality-grandpa",
"sp-keyring",
"sp-runtime",
"substrate-test-runtime-client",
]
[[package]]