Use BABE instead of AuRa in node (#3171)
* babe: add babe module trait * babe: track current slot and epoch start slot * babe: implement ShouldEndSession based on epochs * babe: rename weight type to avoid ambiguities * babe: expose epoch start slot in Epoch digest * babe: use epoch start for validating epoch transitions * babe: make the epoch duration a parameter type * babe: remove unused fields from config * node: update runtime to use babe instead of aura * node: use babe instead of aura * core: generate sr25519 keys from seed and add to keystore * core: remove AuthorityKeyring * node: remove unused primitive types related to babe crypto * uniform babe primitives crate import name * wrap long lines * babe: fix find_epoch_digest * fork-tree: fix find_node_where * node: set babe epoch duration to "10 minutes" * babe: cleanup import key cache if authorities don't change * node: make integration test compile (but fail) * node: bump spec_version * node: fix import * babe: don't use constants in storage fields array sizes * babe: account for first epoch slot way in the past * babe: signal next epoch change (not current) * babe: calculate next epoch randomness with next epoch index * babe: track next epoch in node * babe: cache current epoch and authorities separately * babe: generate valid babe vrf proofs in integration test * babe: cleanup claim_slot * babe: perform threshold calculation according to spec * babe: compute relative weight in threshold * babe: more precise threshold calculation * babe: use floats for threshold exponent calculation * babe: update constant c
Showing
- substrate/Cargo.lock 29 additions, 4 deletionssubstrate/Cargo.lock
- substrate/core/cli/src/params.rs 4 additions, 4 deletionssubstrate/core/cli/src/params.rs
- substrate/core/client/src/genesis.rs 4 additions, 4 deletionssubstrate/core/client/src/genesis.rs
- substrate/core/consensus/babe/Cargo.toml 7 additions, 1 deletionsubstrate/core/consensus/babe/Cargo.toml
- substrate/core/consensus/babe/primitives/src/lib.rs 20 additions, 24 deletionssubstrate/core/consensus/babe/primitives/src/lib.rs
- substrate/core/consensus/babe/src/lib.rs 198 additions, 108 deletionssubstrate/core/consensus/babe/src/lib.rs
- substrate/core/consensus/babe/src/tests.rs 13 additions, 5 deletionssubstrate/core/consensus/babe/src/tests.rs
- substrate/core/consensus/common/src/lib.rs 3 additions, 0 deletionssubstrate/core/consensus/common/src/lib.rs
- substrate/core/consensus/rhd/src/lib.rs 36 additions, 28 deletionssubstrate/core/consensus/rhd/src/lib.rs
- substrate/core/consensus/rhd/src/misbehaviour_check.rs 5 additions, 5 deletionssubstrate/core/consensus/rhd/src/misbehaviour_check.rs
- substrate/core/finality-grandpa/src/communication/tests.rs 4 additions, 4 deletionssubstrate/core/finality-grandpa/src/communication/tests.rs
- substrate/core/finality-grandpa/src/import.rs 1 addition, 1 deletionsubstrate/core/finality-grandpa/src/import.rs
- substrate/core/finality-grandpa/src/light_import.rs 1 addition, 1 deletionsubstrate/core/finality-grandpa/src/light_import.rs
- substrate/core/finality-grandpa/src/tests.rs 51 additions, 45 deletionssubstrate/core/finality-grandpa/src/tests.rs
- substrate/core/keyring/src/lib.rs 4 additions, 4 deletionssubstrate/core/keyring/src/lib.rs
- substrate/core/keyring/src/sr25519.rs 6 additions, 1 deletionsubstrate/core/keyring/src/sr25519.rs
- substrate/core/service/src/lib.rs 2 additions, 1 deletionsubstrate/core/service/src/lib.rs
- substrate/core/service/test/src/lib.rs 2 additions, 1 deletionsubstrate/core/service/test/src/lib.rs
- substrate/core/test-client/src/lib.rs 5 additions, 1 deletionsubstrate/core/test-client/src/lib.rs
- substrate/core/test-runtime/Cargo.toml 4 additions, 4 deletionssubstrate/core/test-runtime/Cargo.toml
Please register or sign in to comment