* Remove the Incoming enum
* Use tokio in the protocol background thread
* Some internal protocol logic simplifications
* Merge the protocol thread with the network thread
* More the status_sinks logic to Service
* Remove FromNetworkMsg
* Add basic BABE consensus type
* Update core/consensus/babe/slots/Cargo.toml
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Fix parameterization and run `rustfmt`
* Respond to review comments
* Update various Cargo.lock files
* Revert "Update various Cargo.lock files"
This reverts commit af53d7624752a744320e9cbb25749fdd8e6f46d2.
* `BabeSealSignature` → `BabeSeal`
* Move slot code to its own crate
This was highly non-trivial, due to cyclic dependencies.
* Remove redundancy between AuRa and BABE
Some of the code duplication was removed using a macro.
* Fix build error
* Avoid non-`#[doc(hidden)]` re-exports
Also, bump some library versions in `Cargo.toml`.
* Remove dead code in AuRa
* Remove impl_slot macro
It was more trouble than it was worth.
Also, delete useless dependencies on Serde.
* AuRa and BABE need different DB keys
* Bring back `aura::Network`, but deprecate it.
* Improve docs and add `slot_duration` inherent method
* Add docs to `substrate_consensus_aura::SlotDuration`
* Add missing documentation and #![forbid(missing_docs, unsafe_code)]
* Add a #![forbid(missing_docs)]
* Remove dependency of `test-runtime` on `slots`
* Update core/consensus/babe/src/lib.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Remove wrongly added file
* Fix copyright notice
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Bump `impl_version` and `spec_version`
* Add more code to BABE
Most of it is copied from AuRa code, but at least the initial core is
there.
* Stuck on horrible compiler error message
* add missing files
* Spaces → tabs
* Simplify code
* Fix compilation
This involved fixing dependencies and adding a `Mutex`.
* More work on BABE
* Fix deprecation version
* Fix deprecation version; remove spurious carets
* Fix Cargo.toml
* Implement VRF signing logic
* The import queue code compiles, though it probably doesn’t work.
* Add VRF verification
* Update Cargo.lock
* Update dependencies
* Move test network to sr25519 authority keys
* Fix accidental build bustage
* Trying to get the tests to work
* Add logging messages and remove dead code
There seems to be a problem with the test network. Since AuRa and BABE
are both affected, this is most likely due to the switch from ed25519 to
sr25519.
* Trying to get the tests to work
* Add logging messages and remove dead code
There seems to be a problem with the test network. Since AuRa and BABE
are both affected, this is most likely due to the switch from ed25519 to
sr25519.
* Working testsuite at last!
The problem was with serialization and deserialization. Normally,
those functions are generated automatically, but those for `BabeSeal`
had to be written manually. The hand-written versions were not
correct, however, as shown by the decoder not being able to decode the
output of the encoder.
* Enable BabeSeal::Encode asserts in --release tests
* Bump runtime and dependency versions
* Fix wasm compilation
The wasm build was broken because of a typo in
`core/test-runtime/src/lib.rs`, and missing gates on the `std` feature
in `core/consensus/{aura,babe}/primitives/Cargo.toml`. Additionally,
improve the quotation in the build scripts.
* Merge Cargo.lock
* Change expected JSON string
The test was also broken on `master`, so I suspect that the test was
incorrect.
* Responded to review
* Remove hard-coded threshold from production code
A hard-coded threshold is now only used in tests.
* Fix swapped doc comments
* Fix unused import warnings
* fix ci error
* fix typo
* Fix spacing in docs
* Minor changes suggested by @joepetrowski
on https://github.com/paritytech/substrate/pull/2372
* Remove unnecessary getters
* fix compile error
* Fix silly unused-variable error
* Improve documentation formatting
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Add issue links
* Revert excess verbosity and #![forbid(warnings)]
* Apply suggestions from code review
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Reformat some comments
* Threshold should depend on number of validators
Also, respond to code review
* Fix silly compilation errors
* Reduce logging verbosity
* Fix missing import
* Add a substrate-peerset crate
* Some adjustements
* More adjustements
* Use a temporary libp2p branch
* Add back-off mechanism
* Fix RPC tests
* Some adjustements
* Another libp2p bugfix
* Do a round-robin in the peerset
* Use a real dependency instead of a patch for libp2p
* Initialize reserved nodes correctly
* Better diagnostic for no address
* Don't allocate slots if in reserved only
* Ban node on dial failure
* Fix indentation
* first implementation
* remove done comment
* origin done
* impl log for instance
* impl inherent for instance
* Fix wasm build + full example build
this requires parity codec implements codec for core::marker::PhantomData
* patch parity-codec link to github branch
* improve internal names and fix instance prefix
* Fix in macros
* add test modules for support
this allow to test for construct_runtime as well.
The reason to have put that in another crate is:
* if we put test in `tests/` dir of srml/support then decl_storage fails to get
srml-support access because it believes it is inside srml-support
crate and so derive access to `quote!{ crate }` but this is wrong
(and I don't see any way to prevent that, and it only bother us so I
don't think that matters that much)
* if we put test inside lib.rs then contruct_runtime cannot be used
because it call some macros that are defined with macros
(decl_outer_event and decl_outer_origin) and thus rustc complains.
* defaultinstance to its own struct to avoid errors
* enforce <T, I> for Event and Config, impl test
* add origin, log, inherent to test
* test more code generation
* basic storage test
* fix typo
* rename a few imports and field
* delete wip test in example and runtime
* change default prefix to make it backward compatible with test
* rename Instance to I and Instantiable to Instance
note: the name of generic parameter I is only enforce by decl_module!
and this could be rewritten
* doc
* clean old TODOs
* update parity-codec to 3.2
* update node impl version + builds
* fix warning
* fix unrelated grandpa test
* refactor code
* Make use of parity-codec "derive" crate feature
* Bump impl_version
* Update wasm files and Cargo.lock files
* Transferred to parity_codec derive feature for the rest of the crates
* Update wasm binaries and lock files
* Update core and node wasm binaries
* Limit the set of known extrinsics and blocks.
* Update Cargo.lock
* Always insert and pop oldest entry if needed.
Always inserting first ensures that the element's LRU position is
updated.
* core: implement logic for tracking dag of possible pending changes
* core: move pending justifications dag to its own crate
* core: remove unnecessary clone bounds on dag
* core: request justifications in-order from the dag
* core: dag: rename changes variables to node
* core: dag: allow finalizing blocks not part of dag
* core: dag: track best finalized number
* core: dag: add more tests
* core: sync: clean up pending justifications dag
* core: dag: derive codec decode encode
* core: dag: better error support
* core: dag: add finalization guarded by predicate
* core: grandpa: track multiple authority set changes in dag
* core: dag: add pre-order iterator
* core: grandpa: request justifications on startup
* core: dag: rearrange order of definitions
* core: rename util/dag to util/fork_tree
* core: fork_tree: add docs
* core: fork_tree: add more tests
* core: fork_tree: fix issues found in tests
* core: grandpa: fix authorities tests
* core: grandpa: add docs for is_descendent_of
* core: sync: add docs for PendingJustifications
* core: sync: add test for justification requests across forks
* core: sync: don't resend import or finality notifications in tests
* core: grandpa: add test for importing multiple change blocks
* core: grandpa: fix logic for checking if a block enacts a change
* core: grandpa: fix authorities tests
* rewrite network protocol/service to use channels
* remove use of unwrap
* re-introduce with_spec
* remove unnecessary mut
* remove unused param
* improve with_spec, add with_gossip
* rename job to task
* style: re-add comma
* remove extra string allocs
* rename use of channel
* turn TODO into FIXME
* remove mut in match
* remove Self in new
* pass headers by value to network service
* remove network sender from service
* remove TODO
* better expect
* rationalize use of network sender in ondemand
* core: fix predicate for dropping grandpa round messages
* core: grandpa: drop commits topic on authority set change
* core: gossip: only drop known messages based on expiration time
* core: grandpa: don't broadcast commit messages
* core: gossip: don't assume topics are header hashes
* core: gossip: expire messages more agressively
* core: grandpa: fix test environment
* core: gossip: fix tests
* core: gossip: track dead topics (and ignore messages)
* core: gossip: test dead topic pruning
* impl Compact<> and HasCompact for Permill Perbill
* update parity-codec to 2.2
* add Cargo.lock
* add lock and build for runtime
* rebuild Cargo.lock after rebase
* Generalize BlockImport
- move ImportBlock, BlockOrigin, ImportResult into shared sr-primitives
- let Consensus provide and traits again
- update consensus traits to latest development
- implement traits on client::Client, test_client::TestClient
- update RHD to use the new import_block API
* Move ImportBlock into consensus-common
* Send import notification in aura tests
* Integrating aura into service
* Make Signatures more generic
* Aura Block Production with the given key
* run aura on the thread pool
* start at exact step start in aura
* Add needed wasm blob, in leiu of better solutions.
* Make API ids consistent with traits and bring upstream for sharing.
* Add decrease_free_balance to Balances module
* Encode `Metadata` once instead of two times
* Bitops include xor
* Upgrade key module.
* Default pages to somewhat bigger.
* Introduce upgrade key into node
* Add `Created` event
* Try to make everything compact
* Make `Clone` work
* Fix
* Move contracts and balances over to compact encoding
* Session and timestamp are compact
* Sataking uses compact numbers
* Treasury now compact
* Compact Democracy
* Council is compact
* Fix
* implement grandpa client
* consensus gossip with arbitrary topics
* defer GRANDPA messages until referenced blocks imported
* set up communication for voter in a transparent way
* instantiate GRANDPA voter
* keep last round state on disk
* switch back to crates.io finality-grandpa
* update cargo.lock
* use new `collect_garbage` API
* update sync test framework and make public
* test that observers can observe
* fix warning
* use more idiomatic predicate for collecting garbage in gossip
* kill spaces
* fix date
* First effort
* API versioning
* Introduce validate_transaction
* Introduce the API plus fixes.
* Docs
* Typo
* Add longevity parameter to transaction validity info.
* Remove unneeded script
* Rename Substrate Demo -> Substrate
* Rename demo -> node
* Build wasm from last rename.
* Merge ed25519 into substrate-primitives
* Minor tweak
* Rename substrate -> core
* Move substrate-runtime-support to core/runtime/support
* Rename/move substrate-runtime-version
* Move codec up a level
* Rename substrate-codec -> parity-codec
* Move environmental up a level
* Move pwasm-* up to top, ready for removal
* Remove requirement of s-r-support from s-r-primitives
* Move core/runtime/primitives into core/runtime-primitives
* Remove s-r-support dep from s-r-version
* Remove dep of s-r-support from bft
* Remove dep of s-r-support from node/consensus
* Sever all other core deps from s-r-support
* Forgot the no_std directive
* Rename non-SRML modules to sr-* to avoid match clashes
* Move runtime/* to srml/*
* Rename substrate-runtime-* -> srml-*
* Move srml to top-level