* 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
* ignore light nodes in ConsensusGossip
* fixed method name
* temporary disabled penalty when block is announced
* remove traces of BLOCK_ANNOUNCE_REPUTATION_CHANGE
* 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
* send neighbor packets in more generic way
* integrate periodic neighbor-packet rebroadcaster
* integrate reporting
* attach callbacks to commit messages for rebroadcasting and reporting
* Tests for commit relay
* crunch up some nice warnings
* exit-scope sub-futures of grandpa
* address small grumbles
* some changes to commit handling
* Introduction of PeersetHandle
* integrate PeersetHandle with the rest of the codebase
* fix compilation errors
* more tests for peerset, fixed overwriting bug in add_reserved_peer
* Slots data structure and bugfixes for peerset
* bend to pressure
* updated lru-cache to 0.1.2 and updated linked-hash-map to 0.5.2
* peerset discovered list is now a LinkedHashMap
* fix review suggestions
* split back Peerset and PeersetHandle
* test for Peerset::discovered
* applied review suggestions
* fixes to peerset::incoming
* peerset disconnects are all instantaneous
* instantaneous drop in peerset finished
* Peerset::set_reserved_only can also reconnect nodes
* Peerset scores cache uses lru-cache
* remove redundant function call and comment from Peerset::on_set_reserved_only
* add_peer returns SlotState enum
* apply review suggestions
* is_reserved -> is_connected_and_reserved
* Consensus status packet
* Allow for repropagation after status
* More generic gossip
* add a basic view struct and gossip module
* move gossip stuff to the gossip module
* integrate view into gossip
* some reshuffling
* alter rules for keeping one commit at a time in view
* Allow sending addressed messages
* don't cast outgoing votes if we know that we voted before
* Handle one hop messages
* initial run at polite grandpa
* build WASM
* handle neighbor messages
* refactor validator's internals into an Inner struct
* gossip only knows to keep or discard messages. optimize should_send_to
* Periodic rebroadcast
* implement `should_send_to` and message_expired
* track peers' best received commit height
* Pass peer id to topic steam
* kill rebroadcasting network
* Notify about existing peers
* clean up network APIs a bunch
* implement gossip::send_message for direct messages
* refactor network trait
* implement gossip::send_message for direct messages
* get all non set-change tests passing
* treat unknown rebroadcasts as broadcasts
* get all other main tests passing
* remove unimplemented test
* everything compiles
* treat unknown rebroadcasts as broadcasts
* Rebradcast interval
* Apply suggestions from code review
Style
Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
* Style
* some module docs
* address some grumbles + docs
* allow rebroadcast every few minutes
* send_topic && generic context
* some tests for view change
* more grumbles & tests
* use send_peer
* Move authorities interface from Core to consensus
f
* notify all caches of block insert + create with up-to-date best_fin
* merged authorities_are_cached from light_grandpa_import2
* Add ProvideCache trait
* Create helper function for 'get_cache'
* Fix some formatting
* Bump impl version
* Resolve wasm conflicts
* Apply review comments
* Use try_for_each
* Move authorities interface from Core to consensus
f
* notify all caches of block insert + create with up-to-date best_fin
* merged authorities_are_cached from light_grandpa_import2
* Add ProvideCache trait
* Create helper function for 'get_cache'
* Fix some formatting
* Bump impl version
* Resolve wasm conflicts
* Apply review comments
* Use try_for_each
* Move authorities interface from Core to consensus
f
* notify all caches of block insert + create with up-to-date best_fin
* merged authorities_are_cached from light_grandpa_import2
* Add ProvideCache trait
* Create helper function for 'get_cache'
* Fix some formatting
* Bump impl version
* Resolve wasm conflicts
* Apply review comments
* Use try_for_each
* Increment impl_version
* Update lib.rs
* all the ise
* forgot a misspelling
* a few more replacements
* bump impl
* rollback and fixes
* bump impl again
* Add aliases for RPC
* Update on_demand.rs
* Add `start_aura2`.
* .gitignore patch conflict files
and remove one that accidentally got committed
* Fix build
The tests still don’t work.
* Fix compilation errors
* Fix compile errors (again)
* Try (and fail) to fix tests
* Properly deserialize data
Previously, `DigestItem::Consensus` had no separate `DigestItemType`,
so it did not get properly serialized and deserialized.
* Add extra debug logging. Always allow old seals.
A `RUST_LOG=substrate_aura_consensus cargo test --all -- --nocapture \
tests::authoring_blocks` revealed that old seals were being and
rejected, causing the test to hang. As a temporary debug measure, allow
old seals unconditionally, so that CI can test if this fixes the
problem.
* Forcibly disable rejection of old seals
* Use old trait, but newer serialization
The old trait for `CompatibleDigestItem` actually worked. By changing
its implementation, one can ensure that all *new* seals have the modern
form, but *legacy* seals are still decoded correctly.
* Bump impl version
* Squash spurious deprecation warning
`rustc` should not be emitting a deprecation warning in deprecated
code, but it does, so silence it.
* Rip out unused Cargo feature
* Move AURA to aura_primitives
* Respond to code review
* Wrap overly-long line
* Reduce logging verbosity and add target
* Add dependency on `sr-primitives` to `aura_primitives`
* Fix build
It failed with a message about Cargo.lock being out of date.
* core: aura: rename aura engine id const
* core: aura: remove superfluous logging
* core: primitives: add removed semicolons
* core: aura: remove unused import
* core: network: style fix
* runtime: update wasm blobs
* runtime: bump impl_version
* core: primitives: tag all DigestItemType variants explicitly
* util: fork-tree: check predicate first while traversing tree
* core: sync: keep track of justifications sent to the import queue
* core: grandpa: verify authority set changes dependencies
* core: fork-tree: add more tests
* core: grandpa: extend enacts_standard_change tests
* 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
* Update libp2p. Add support for ed25519 node (network) keys.
* Update networking to the changes from https://github.com/libp2p/rust-libp2p/pull/972.
* Add support for using ed25519 keys for libp2p networking.
* Add support for reading libp2p secret keys from (external) files.
* Adapt to changes from https://github.com/libp2p/rust-libp2p/pull/992
* More tests.
* Cosmetics
* Deduplicate tests.
* Remove quickcheck from tests that don't use extra random inputs.
* Remove quickcheck.
* Swap new/default impls for NetworkConfiguration.
* Use libp2p-0.5.0 from crates.io.
* Post-rebase update.
* Remove unnecessary wildcard pattern.
* Combine two overlapping tests.
* 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
* Support skipping the interactive purge prompt
Skip it via `cargo run -- purge-chain -y`.
* Fix typos
* Add Grandpa telemetry
* Address comments
* Revert unnecessary version bump
* Version bump to make CI run
* Remove unnecessary cast
* Do not bump version
* 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