* value ranges in consensus cache
* skip values in cache
* read epoch0 + epoch1 data from genesis in babe
* sync authorities + session validators at genesis
* removed some debug printlns
* fixed cache encoding
* Revert "skip values in cache"
This reverts commit ce451c32823aaa4b67d99ca5b58f1bf3984df4db.
* Revert "value ranges in consensus cache"
This reverts commit 9062f9434cddd14a01275ddbfcd904b04282e63b.
* get rid of cache::AUTHORITIES in Babe
* cleaning up
* cleaning up
* update spec version
* lost changes
* fixed tests
* Update node/runtime/src/lib.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* fix once-per-block condition
* fix standalone babe + temp_storage in BuildGenesis
* fix benhes compilation
* fixed comment
* re-added light nodes to integration tests
* finalize_with_ancestors from extra_requests
* post-merge fix
* aaand removed debug code
* (another one)
* fix warn in logs (do not call ForkTree::finalize twice for the same block)
* sync digest.next_authorities with actual next authorities
* more docs
* reverting all commits affecting storage
* also remove keys from babe trait
* fixed warnings
* post-merge fixes
* reverted some redundant changes
* reverted more changes
* 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
* Add `epoch` field to `SlotInfo`
* Add slot calculations
* More work on epochs in BABE
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Typo: `/` not `%` for division
* Delete useless `LastSlotInEpoch::put(false)`
* Bump `spec_version`
* Make test suite pass again
* Implement BABE epoch randomness signing
* Try to fix compilation
Currently causes a stack overflow in the compiler
* Fix rustc stack overflow
* Add missing `PartialEq` and `Eq` implementations
* Fix compile errors in test suite
* Another silly compile error
* Clone `epoch`
* Fix compile error in benchmarks
* Implement `clone` for `Epoch`
* Merge master
* AUTHORING TEST PASSES!!!
* Fix compilation
* Bump `spec_version`
* Fix compilation
* Fix compilation (again)
* Remove an outdated FIXME
* Fix run.sh and move it to scripts/
* Delete commented-out code
* Fix documentation
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Fix BABE initialization and refactor
* Respond to review
* typo
* Remove useless data in `CheckedHeader::Deferred`
* Remove `slot_number` from Epoch
It is not needed, and only served to waste space and cause confusion.
* Remove epoch from BABE digests
* Move digest.rs to primitives
* Fix incorrect warning names
* Fix compile error
* Consistent field naming for BABE digests
* More compiler error fixex
* Unbound variable
* more compile errors
* another compile error
* Fix compile errors in runtime
* another compile error
* Another compile error
* Fix wasm build
* missing import
* Fix more compile errors
* yet another compile error
* compile fix in test runtime
* Fix and simplify the BABE runtime
The BABE runtime was massively overcomplicated and also wrong. It
assumed it needed to:
1. delay new authorities taking effect until the next epoch
2. not delay emitting `Consensus` digests to mark epoch changes
However, the first is handled by the `srml_session` crate, and the
second is flat-out incorrect: `Consensus` digests take effect
immediately. Furthermore, `srml_babe` tried to duplicate the
functionality of `srml_session::PeriodicSession`, but did it both
clumsily and incorrectly. Fortunately, the new code is simpler and far
more likely to be correct.
* Use `system` to get the test authorities
The genesis block used by tests defines no authorities. Only the test
suite is affected.
* Fix test runtime impl for BabeApi::epoch() with std
* Fix compilation
* Cached authorities are in the form of an epoch
not a `Vec<AuthorityId>`.
* `slots_per_epoch` is not fixed in general
The BABE code previously assumed `slots_per_epoch` to be a constant,
but that assumption is false in general. Furthermore, removing this
assumption also allows a lot of code to go away.
* fix compile error
* Implement epoch checker
* Fix runtime compilation
* fork-tree: add method for finding a node in the tree
* babe: register epoch transitions in fork tree and validate them
* fork-tree: add method for arbitrary pruning
* Expose the queued validator set to SRML modules
BABE needs to know not only what the current validator set is, but also
what the next validator set will be. Expose this to clients of the
session module.
* Bump hex-literal
Hopefully this will fix the panic
* babe: prune epoch change fork tree on finality
* babe: validate epoch index on transition
* babe: persist epoch changes tree
* Fix compile error in tests
* Fix compile error in tests
* Another compile error in tests
* Fix compilation of tests
* core: move grandpa::is_descendent_of to client utils
* babe: use is_descendent_of from client utils
* babe: extract slot_number from pre_digest in import_block
* Move BABE testsuite to its own file
* Initial part of test code
* Missing `WeightMultiplierUpdate` in test-runtime
* bump `spec_version`
* Add a test that a very bogus is rejected
* Run the tests again
* Fix compiler diagnostics
* Bump `spec_version`
* Initial infrastructure for mutation testing
* Mutation testing of block import
* babe: revert epoch changes in case of block import error
* babe: fix logging target
* babe: BabeBlockImport doesn't box inner BlockImport
* babe: fix epoch check in block import
* babe: populate authorities cache on block authorship
* babe: remove unused functions
* babe: use RANDOMNESS_LENGTH const
* babe: remove unneeded config parameters
* core: revert change to hex dependency version
* cleanup gitignore
* babe: add docs to aux_schema
* babe: remove useless drops in tests
* babe: remove annoying macos smart quotes
* fork-tree: docs
* fork-tree: add tests
* babe: style
* babe: rename randomness config variable
* babe: remove randomness helper function
* babe: style fixes
* babe: add docs
* babe: fix tests
* node: bump spec_version
* babe: fix tests
* End build when `wasm-builder` does not find a prerequisite
Using `compile_error!` was a stupid idea by me, as rust would not
re-execute the build.rs.
* Increment the `wasm-builder` version
* Update core/utils/wasm-builder/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Introduce `wasm-builder` and `wasm-builder-runner` to retire `build.sh`
Make use of `wasm-builder` in `test-runtime`.
* Add build script and remove the wasm project
* Port `node-runtime` to new wasm-builder
* Make `substrate-executor` tests work with `wasm-builder`
* Move `node-template` to `wasm-builder`
* Remove `build.sh` :)
* Remove the last include_bytes
* Adds the missing build.rs files
* Remove `build.sh` from CI
* Debug CI
* Make it work in CI
* CI attempt 3
* Make `substrate-runtime-test` compile on stable
* Ahhh, some missed `include_bytes!`
* AHH
* Add suggestions
* Improve search for `Cargo.lock` and don't panic if it is not found
* Searching from manifest path was no good idea
* Make the `wasm-builder` source better configurable
* Expose the bloaty wasm binary as well
* Make sure to rerun WASM recompilation on changes in dependencies
* Introduce new `WASM_BUILD_TYPE` env and make sure to call `build.rs` on
changes to env variables
* Remove `build.sh` from READMEs
* Rename the projects
* Fixes CI
* Update lock file
* Fixes merge-conflict
* Apply suggestions from code review
Co-Authored-By: TriplEight <denis.pisarev@parity.io>
* Try to make windows happy
* Replace all back slashes in paths with slashes
* Apply suggestions from code review
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
* Use cargo from `CARGO` env variable
* Fix compilation
* Use `rustup` for running the nightly build
* Make individual projects skipable
* Fix compilation
* Fixes compilation
* Build all WASM projects in one workspace
* Replace more back slashes!
* Remove `inlcude_bytes!`
* Adds some documentation
* Apply suggestions from code review
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
* Apply suggestions from code review
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
* More review comments
* Update `Cargo.lock`
* Set license
* Apply suggestions from code review
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* More review comments + adds `TRIGGER_WASM_BUILD` env
* Fix doc tests
* Increase version + update README
* Switch crates.io version of `wasm-builder`
* Update README
* Switch to released version of `wasm-builder-runner`