Grandpa warp sync request-response protocol (#7711)
* Made a start * So the proof between authority set is phragmen one, this is crazy big, or is there some signing of the result : that is the storage key, damn? * ok getting from header digest seems doable. * for testing * get set id from storage directly (should use runtime to handler change). * move test to init * correct auth key * fix iteration * Correct proof content * actually update block number. * actually check last justif against its header * justification relation to new authorities through header hash check is needed here. This assumes the hash from header is calculated. * Few changes * Connected up cheme's branch * Clean up * Move things around a bit so that adding the grandpa warp sync request response protocol happens in the node code * Nits * Changes to comments * Cheme changes * Remove todos and test compile. * Rename _authority_ related proof function to _warp_sync_ . * Update client/grandpa-warp-sync/src/lib.rs quick fix * Put the warp sync request response protocol behind a feature flag because we dont' need it on a light client. * Update client/grandpa-warp-sync/src/lib.rs Quick fix * Update Cargo.lock * Adding test, comment on limitation related to 'delay', this could be implemented but with a cost. * Set between a delay override last fragment. * Check for pending authority set change at start. * adjust index * custom cache is not a good idea. * Use a simple cache instead. * restore broken indentation * Address crate rename * Merge conflict badly resolved, sorry Co-authored-by:cheme <emericchevalier.pro@gmail.com> Co-authored-by:
Pierre Krieger <pierre.krieger1708@gmail.com>
Showing
- substrate/Cargo.lock 70 additions, 17 deletionssubstrate/Cargo.lock
- substrate/Cargo.toml 1 addition, 0 deletionssubstrate/Cargo.toml
- substrate/bin/node/cli/Cargo.toml 2 additions, 0 deletionssubstrate/bin/node/cli/Cargo.toml
- substrate/bin/node/cli/src/service.rs 5 additions, 0 deletionssubstrate/bin/node/cli/src/service.rs
- substrate/client/finality-grandpa-warp-sync/Cargo.toml 28 additions, 0 deletionssubstrate/client/finality-grandpa-warp-sync/Cargo.toml
- substrate/client/finality-grandpa-warp-sync/src/lib.rs 161 additions, 0 deletionssubstrate/client/finality-grandpa-warp-sync/src/lib.rs
- substrate/client/finality-grandpa/Cargo.toml 1 addition, 0 deletionssubstrate/client/finality-grandpa/Cargo.toml
- substrate/client/finality-grandpa/src/finality_proof.rs 483 additions, 1 deletionsubstrate/client/finality-grandpa/src/finality_proof.rs
- substrate/client/finality-grandpa/src/import.rs 2 additions, 2 deletionssubstrate/client/finality-grandpa/src/import.rs
- substrate/client/finality-grandpa/src/lib.rs 1 addition, 0 deletionssubstrate/client/finality-grandpa/src/lib.rs
- substrate/client/service/src/builder.rs 2 additions, 13 deletionssubstrate/client/service/src/builder.rs
- substrate/client/service/src/config.rs 14 additions, 0 deletionssubstrate/client/service/src/config.rs
Please register or sign in to comment