- Mar 30, 2021
-
-
Bastian Köcher authored
* Make grandpa work * Introduce `SharedData` * Add test and fix bugs * Switch to `SharedData` * Make grandpa tests working * More Babe work * Make it async * Fix fix * Use `async_trait` in sc-consensus-slots This makes the code a little bit easier to read and also expresses that there can always only be one call at a time to `on_slot`. * Make grandpa tests compile * More Babe tests work * Fix network test * Start fixing service test * Finish service-test * Fix sc-consensus-aura * Fix fix fix * More fixes * Make everything compile *yeah* * Fix build when we have Rust 1.51 * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/babe/src/tests.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/babe/src/tests.rs Co-authored-by: André Silva <[email protected]> * Fix warning Co-authored-by: André Silva <[email protected]>
-
Bastian Köcher authored
This is not really required and having a special `test-helpers` feature is a bad idea anyway.
-
- Mar 27, 2021
-
-
Bastian Köcher authored
* Use `async_trait` in sc-consensus-slots This makes the code a little bit easier to read and also expresses that there can always only be one call at a time to `on_slot`. * slots: remove mutex around BlockImport in SlotWorker Co-authored-by: André Silva <[email protected]>
-
- Mar 26, 2021
-
-
Pierre Krieger authored
-
Pierre Krieger authored
-
- Mar 24, 2021
-
-
Pierre Krieger authored
-
Roman Borschel authored
* Update to libp2p-0.36 * Some more Cargo.lock updates.
-
Seun Lanlege authored
-
André Silva authored
* grandpa: tests: add peers with authority role * grandpa: tests: manually wake-up poll_fn future
-
- Mar 23, 2021
-
-
Pierre Krieger authored
* Refactor a bit NotifsHandler::poll * Avoid some spurious wake-ups
-
- Mar 22, 2021
-
-
Pierre Krieger authored
* Only allocate slots for the relevant peer set * Do a pre-check before calling has_free_outgoing_slot * Oops, fix infinite loop
-
Pierre Krieger authored
* Rename GenericProto to Notifications * Small comment fix
-
- Mar 18, 2021
-
-
Arkadiy Paronyan authored
* Transaction indexing * Tests and fixes * Fixed a comment * Style * Build * Style * Apply suggestions from code review Co-authored-by: cheme <[email protected]> * Code review suggestions * Add missing impl * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * impl JoinInput * Don't store empty slices * JoinInput operates on slices Co-authored-by: cheme <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Bastian Köcher authored
* Improve logging in network gossip This adds some more information to the logging output to get a better understanding when something fails. * Update client/network-gossip/src/state_machine.rs Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>
-
- Mar 17, 2021
-
-
Bastian Köcher authored
* Make slot duration being exposed as `Duration` to the outside * Some slot info love * Add `build_aura_worker` utility function * Copy copy copy
-
Jon Häggblad authored
* primitives/runtime: initial changes on supporting multiple Justifications * primitives/runtime: make Justifications strongly typed * Encode/decode Justifications * primitives/runtime: add Justification type * backend: apply_finality and finalize_block takes a single Justification * manual-seal: create engine id and let rpc take encoded justification * backend: skeleton functions for appending justifications * backend: initial implementation append_justification Initial implementation of append_justification on the Backend trait, and also remove unused skeleton functions for append_justificaton on Finaziler trait. k * backend: guard against duplicate consensus engine id * client/db: add check for block finality * client/api: add append_justification to in_mem db * client/light: add no-op append_justification * network: fix decode call for Justification * network: only send a single Justification in BlockData * network: minor comment update * protocol: update field names to distinguish single justification * client: further field renames to plural * client: update function names to plural justifications * client/db: upgrade existing database for new format * network: remove dependency on grandpa crate * db: fix check for finalized block * grandpa: check for multiple grandpa justifications hwne importing * backend: update Finalizer trait to take multiple Justifications * db: remove debugging statements in migration code * manual-seal: update note about engine id * db: fix check for finalized block * client: update variable name to reflect it is now plural * grandpa: fix incorrect empty Justications in test * primitives: make Justifications opaque to avoid being empty * network: fix detecting empty Justification * runtime: doc strings for Justifications functions * runtime: add into_justifications * primitives: check for duplicates in when adding to Justifications * network/test: use real grandpa engine id in test * client: fix reviewer comments * primitives: rename Justifications::push to append * backend: revert changes to Finalizer trait * backend: revert mark_finalized * backend: revert changes to finalize_block * backend: revert finalized_blocks * db: add a quick early return for performance * client: minor reviewer comments * service/test: use local ConsensusEngineId * network: add link to issue for sending multiple Justifications * Apply suggestions from code review Co-authored-by: Pierre Krieger <[email protected]> * Apply suggestions from code review Co-authored-by: Pierre Krieger <[email protected]> * network: tweaks to review suggestions * network: revert change to BlockData for backwards compatibility * Apply suggestion from code review Co-authored-by: Pierre Krieger <[email protected]> * Apply suggestions from code review Co-authored-by: André Silva <[email protected]> * primitives: update doc comment for Justifications * client/db/upgrade: avoid grandpa crate dependency * consensus: revert to single Justification for import_justification * primitives: improve justifications docs * style cleanups * use and_then * client: rename JUSTIFICATIONS db column * network: revert to using FRNK in network-test Co-authored-by: Pierre Krieger <[email protected]> Co-authored-by: André Silva <[email protected]> Co-authored-by: André Silva <[email protected]>
-
- Mar 12, 2021
-
-
Robert Klotzner authored
-
Bastian Köcher authored
We introduced banning of peers who spam us with the same request (more than 2 times). However, we missed that it is completely legal to send the same request multiple times as long as we did not provide any answer. An example for that is the justification request. This request is send multiple times until we could fetch the justification from one of our peers. So, the solution to this problem is to tag requests as fulfilled and to start counting these fulfilled requests. If the number is higher than what we allow, the peer should be banned.
-
- Mar 11, 2021
-
-
Bastian Köcher authored
The timestamp inherent type was up to now just a simple `u64`. This worked, but doesn't give you that much guarantees at compile time about the type. This pr changes that by converting this type to a unit type wrapper, similar to what we have done for `Slot`. This is required for some future pr that touches quite a lot of the inherents stuff :) Besides this unit wrapper type, this pr also moves the `OnTimestampSet` trait to `frame_support::traits`.
-
Pierre Krieger authored
-
Pierre Krieger authored
-
dependabot[bot] authored
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.22 to 0.1.25. - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.22...tracing-0.1.25) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
Cecile Tonglet authored
polkadot companion: paritytech/polkadot#2535
-
- Mar 10, 2021
-
-
Tomasz Drwięga authored
* Add MMR custom RPC. * Change RuntimeApi to avoid hardcoding leaf type. * Properly implement the new RuntimeAPI and wire up RPC. * Extract Offchain DB as separate execution extension. * Enable offchain DB access for offchain calls. * Fix offchain_election tests. * Skip block initialisation for proof generation. * Fix integration test setup. * Fix offchain tests. Not sure how I missed them earlier
🤷 . * Fix long line. * One more test missing. * Update mock for multi-phase. * Address review grumbbles. * Address review grumbles. * Fix line width of a comment -
Ashley authored
* Make changes * Add serialize/deserialize, copy babe epoch config defaults from node runtime * Fix line widths and turn default features off for serde * Remove ser/deser from Epoch, fix node-cli * Apply suggestions * Add comment to BABE_GENESIS_EPOCH_CONFIG in bin * Apply suggestions * Add a sketchy migration function * Add a migration test * Check for PendingEpochConfigChange as well * Make epoch_config in node-cli * Move updating EpochConfig out of the if * Fix executor tests * Calculate weight for add_epoch_configurations * Fix babe test * Apply suggestions from code review Co-authored-by: André Silva <[email protected]> * Add more asserts to tests, remove unused changes to primitives/slots * Allow setting the migration pallet prefix * Rename to BabePalletPrefix Co-authored-by: André Silva <[email protected]>
-
- Mar 09, 2021
-
-
Bastian Köcher authored
-
Bastian Köcher authored
* Introduce new concept of "slot portion for proposing" Currently when building a block we actually give the proposer all of the time in the slot, while this is wrong. The slot is actually split in at least two phases proposing and propagation or in the polkadot case into three phases validating pov's, proposing and propagation. As we don't want to bring that much polkadot concepts into Substrate, we only support splitting the slot into proposing and propagation. The portion can now be passed as parameter to AuRa and BABE to configure this value. However, this slot portion for propagation doesn't mean that the proposer can not go over this limit. When we miss slots we still apply the lenience factor to increase the proposing time, so that we have enough time to build a heavy block. Besides all what was said above, this is especially required for parachains. Parachains have a much more constraint proposing window. Currently the slot duration is at minimum 12 seconds, but we only have around 500ms for proposing. So, this slot portion for proposing is really required to make it working without hacks. * Offgit feedback * Cast cast cast
-
Liu-Cheng Xu authored
-
Bastian Köcher authored
* Decrease the peer reputation on invalid block requests This pr changes the block request handler to decrease the reputation of peers when they send the same request multiple times or they send us an invalid block request. * Review feedback * Change log target * Remove unused code
-
- Mar 05, 2021
-
-
Bastian Köcher authored
* AuRa improvements Hot and fresh AuRa improvements. This pr does the following: - Move code belonging to the import queue etc to import_queue.rs - Introduce `ImportQueueParams` and `StartAuraParams` structs to make it more easier to understand what parameters we pass to AuRa. - Introduce `CheckForEquivocation` to tell AuRa if it should check for equivocation on block import. This is required for parachains, because they are allowed to equivocate when they build two blocks for the same slot, but for different relay chain parents. * Update client/consensus/aura/src/import_queue.rs Co-authored-by: André Silva <[email protected]> * Fix compilation * AAA Co-authored-by: André Silva <[email protected]>
-
thiolliere authored
* implement * make default pre/post_upgrade * simplify Cargo.toml * revert removal of outdated/private links * link in pallet-mmr
-
Bastian Köcher authored
We were using the wrong syntax and that will be dropped with Rust 2021. The compiler already starts to hint the wrong syntax with warnings. So, we fix this here.
-
- Mar 04, 2021
-
-
asynchronous rob authored
* babe: introduce a request-answering mechanic * gromble * send method
-
- Mar 03, 2021
-
-
Bastian Köcher authored
* Move AuRa digest from client to primitives This makes the digest stuff usable from inside the runtime ;) * Update primitives/runtime/src/generic/digest.rs Co-authored-by: André Silva <[email protected]> * Review feedback * Make BABE use the new functionality Co-authored-by: André Silva <[email protected]>
-
- Mar 01, 2021
-
-
Pierre Krieger authored
-
- Feb 28, 2021
-
-
André Silva authored
* grandpa: maintain invariants when evaluating aggregated voting rules * grandpa: update comment on VotingRules::restrict_vote * grandpa: simplify comment
-
- Feb 26, 2021
-
-
Pierre Krieger authored
-
- Feb 25, 2021
-
-
Pierre Krieger authored
* Fix networking debug_asserts * Fix comment
-
Ashley authored
-
André Silva authored
* grandpa: use AuthoritySetChanges to generate warp sync proof * node: init grandpa warp sync protocol * grandpa: iterator for AuthoritySetChanges * grandpa: rewrite warp sync proof generation * grandpa: remove old code for warp sync generation * grandpa: fix indentation * grandpa: fix off by one * grandpa: use binary search to find start idx when generating warp sync proof * grandpa: add method to verify warp sync proofs * grandpa: remove unnecessary code to skip authority set changes * grandpa: add test for warp sync proof generation and verification * grandpa: add missing docs * grandpa: remove trailing comma
-