- Mar 11, 2021
-
-
Cecile Tonglet authored
polkadot companion: paritytech/polkadot#2535
-
- Mar 10, 2021
-
-
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
* 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
-
- 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]>
-
- 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]>
-
- Feb 24, 2021
-
-
Bastian Köcher authored
* Start * Finish!!!! * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <[email protected]> * Review comments Co-authored-by: André Silva <[email protected]>
-
Bastian Köcher authored
* Make `on_slot` return the block with the post header Before this pr `on_slot` returned the pre block. However this is wrong, because adding some post digest changes the hash of the header. Thus, we need to make sure to return the correct block that uses the post header. * Update primitives/consensus/common/src/block_import.rs Co-authored-by: André Silva <[email protected]> Co-authored-by: André Silva <[email protected]>
-
- Feb 22, 2021
-
-
Bastian Köcher authored
* Make keystore return `None` when a key doesn't exist * Fixes * More fixes * Update comment * Update primitives/keystore/src/lib.rs Co-authored-by: André Silva <[email protected]> * Update client/keystore/src/local.rs Co-authored-by: André Silva <[email protected]> * Address comments * Update client/keystore/src/local.rs Co-authored-by: André Silva <[email protected]> Co-authored-by: André Silva <[email protected]>
-
- Feb 19, 2021
-
-
Bastian Köcher authored
* Ensure we spawn the block import worker as an essential task This pr ensures that we spawn the block import worker as an essential task. This is quite important as we need to bring down the node when the block import is done. Besides that it adds some debug output to the block import worker. * Don't be stupid :D
-
- Feb 18, 2021
-
-
Bastian Köcher authored
Currently we always use a boxed future everywhere anyway. This also enables us to use a boxed `SlotWorker` (which is required for Cumulus).
-
- Feb 15, 2021
-
-
Bastian Köcher authored
* Ahh * Work work work * Fix all the compilation errors * Fix test * More fixes...
-
- Feb 10, 2021
-
-
Benjamin Kampmann authored
* bumping version for next release * add changelog * add guide
-
- Feb 04, 2021
-
-
André Silva authored
* transaction-pool: drop unpropagable txs if local node cant author blocks * fix test compilation * transaction-pool: remove unnecessary static bound on CanAuthor Co-authored-by: Tomasz Drwięga <[email protected]> * rpc-api: add translation for PoolError::Unactionable * transaction-pool: add test for rejecting unactionable transactions * basic-authorship: fix doc test * transaction-pool: fix benchmark compilation * transaction-pool: rename CanAuthor to IsValidator * transaction-pool: nit in error message Co-authored-by: Tomasz Drwięga <[email protected]>
-
- Jan 29, 2021
-
-
thiolliere authored
* update cargo.toml * use 2.0 in mmmr
-
- Jan 28, 2021
-
-
Bastian Köcher authored
* Introduce a `Slot` type Instead of having some type definition that only was used in half of the code or directly using `u64`, this adds a new unit type wrapper `Slot`. This makes it especially easy for the outside api to know what type is expected/returned. * Change epoch duratioC * rename all instances of slot number to slot * Make the constructor private Co-authored-by: André Silva <[email protected]>
-
- Jan 18, 2021
-
-
André Silva authored
* babe: log block and slot number on verification * babe: debug log formatting Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Jan 12, 2021
-
-
dependabot[bot] authored
Bumps [retain_mut](https://github.com/upsuper/retain_mut) from 0.1.1 to 0.1.2. - [Release notes](https://github.com/upsuper/retain_mut/releases) - [Commits](https://github.com/upsuper/retain_mut/compare/v0.1.1...v0.1.2) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
thiolliere authored
-
- Jan 11, 2021
-
-
Igor Matuszewski authored
* Backport paritytech/substrate#7381 * Bring back genesis storage build in aura/timestamp To not change spec version, see https://github.com/paritytech/substrate/pull/7686#discussion_r540032743 * Backport paritytech/substrate#7238 * Backport paritytech/substrate#7395 * Bump impl_version * Fix UI tests and bump trybuild dep See https://github.com/rust-lang/rust/pull/73996 Backports: https://github.com/paritytech/substrate/pull/7764 https://github.com/paritytech/substrate/pull/7656 * Partially backport paritytech/substrate#7838 * Release frame-support with a dep compilation fix * Bump patch level for remaining crates This is done because at the time of writing cargo-unleash does not fully support partial workspace publishing and mixes both local and crates.io versions of the packages, leading to errors in the release check workflow. * Backport paritytech/substrate#7854 ...to fix compilation error when using futures-* v0.3.9. * Adding Changelog entry for patch release Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Benjamin Kampmann <[email protected]>
-
- Jan 08, 2021
-
-
Pierre Krieger authored
-
- Jan 06, 2021
-
-
ordian authored
* upgrade a few dependencies * make it compile at the expense of duplicate deps * fix web-wasm and a warning * introduce activate-wasm-bindgen-features crate * Revert "introduce activate-wasm-bindgen-features crate" This reverts commit 5a6e41e683f8a4844c0a735dcd08caabb2313f11. * add getrandom feature to sc-consensus-aura
-
- Jan 05, 2021
-
-
kaichao authored
-
- Jan 04, 2021
-
-
Bastian Köcher authored
* Happy new year Updates the copyright years and fixes wrong license headers. * Fix the template * Split HEADER into HEADER-APACHE & HEADER-GPL
-
- Dec 28, 2020
-
-
asynchronous rob authored
-
- Dec 17, 2020
-
-
honeywest authored
-
- Nov 30, 2020
-
-
Bernhard Schuster authored
* handle executor should_panic test better * Revert "reduce should panic, due to extended error messages" This reverts commit c0805940184a62cd9302603ad911c3591e70a60c. * remove excessive constraints * remove duplicate documentation messages for error variants * reduce T: constraints to the abs minimum * whoops * fewer bounds again Co-authored-by: Bernhard Schuster <[email protected]>
-
- Nov 27, 2020
-
-
Bernhard Schuster authored
* chore/error: remove from str conversion and add deprecation notifications * fixup changes * fix test looking for gone ::Msg variant * another test fix * one is duplicate, the other is not, so duplicates reported are n-1 * darn spaces Co-authored-by: Andronik Ordian <[email protected]> * remove pointless doc comments of error variants without any value * low hanging fruits (for a tall person) * moar error type variants * avoid the storage modules for now They are in need of a refactor, and the pain is rather large removing all String error and DefaultError occurences. * chore remove pointless error generic * fix test for mocks, add a bunch of non_exhaustive * max line width * test fixes due to error changes * fin * error outputs... again * undo stderr adjustments * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * remove closure clutter Co-authored-by: Bastian Köcher <[email protected]> * more error types * introduce ApiError * extract Mock error * ApiError refactor * even more error types * the last for now * chore unused deps * another extraction * reduce should panic, due to extended error messages * error test happiness * shift error lines by one * doc tests * white space Co-authored-by: Bastian Köcher <[email protected]> * Into -> From Co-authored-by: Bastian Köcher <[email protected]> * remove pointless codec Co-authored-by: Bastian Köcher <[email protected]> * avoid pointless self import Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bernhard Schuster <[email protected]> Co-authored-by: Andronik Ordian <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Bastian Köcher authored
This prevents nodes from executing the same block 2 times.
-
- Nov 23, 2020
-
-
André Silva authored
* grandpa: remove light-client specific block import * consensus, network: remove finality proofs
-
- Nov 11, 2020
-
-
Jon Häggblad authored
* babe: backoff authoring blocks when finality lags * babe: move backoff authoring params to default constructor * babe: deduplicate the test a bit * babe: set backoff constants in service * babe: use better names for backoff authoring block parameters * babe: remove last unwrap * babe: slight style tweak * babe: fix comment * slots: move backoff block authorship logic to SimpleSlotWorker * aura: append SlotInfo in on_slot * slots: use the correct types for parameters * slots: fix review comments * aura: add missing backoff authoring blocks parameters * slots: add comments for default values * slots: add additional checks in test * slots: update implementation for new master * slots: revert the change to SlotInfo * Fix review comments * slots: rework unit tests for backing off claiming slots * slots: add test for asymptotic behaviour for slot claims * slots: address review comments * slots: add test for max_interval * slots: add assertion for intervals between between claimed slots * slots: remove rustfmt directive * slots: another attempt at explaining authoring_rate * slots: up unfinalized_slack to 50 by default * slots: add tests for time to reach max_interval * slots: fix typo in comments * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * slots: additional tweaks to comments and info calls * slots: rename to BackoffAuthoringOnFinalizedHeadLagging * slots: make the backing off strategy generic * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * slots: implement backoff trait for () for simplicity * slots: move logging inside backing off function to make it more specific * aura: add missing function parameter Co-authored-by: Bastian Köcher <[email protected]>
-
Bastian Köcher authored
The genesis header doesn't have the BABE pre-digest and we insert `0` as slot number. The slot lenience calculation will return the maximum in this situation. Besides returning the maximum which is not bad at all, it also prints some a debug message that can be confusing in the first moment. To prevent printing this debug message, we now just return early when we see that the parent block is the genesis block.
-
- Nov 05, 2020
-
-
Denis_P authored
* change (CI): markdown link checker * Fix some invalid doc links (re-run of cargo-unleash gen-readme w/ fixes). * Fix some invalid doc links * Fix some invalid doc links * Fix some links * Fix some links * Apply @bkchr suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * Fix more links * Fix more links * typo * Fix more links * Fix more links * Ignore valid link .. check wrongly sees it as invalid * Fix style issue * Fix style issue * change (CI): update style guide link * change (lib): suggestions Co-authored-by: Dan Forbes <[email protected]> Co-authored-by: Steve Degosserie <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Nov 04, 2020
-
-
Web3 Philosopher authored
* parent affbc38a author Seun Lanlege <[email protected]> 1599568164 +0100 committer Seun Lanlege <[email protected]> 1604321289 +0100 gpgsig -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEECvQ02MnjnssnSbjr3HzzEhjN254FAl+gAAkACgkQ3HzzEhjN 254soAv+KO5JA0HXSe0R0XS5TnwA3IxYsW+UvdF5dXFeC3jFdGTMvor818uoBePD dxzYEsUK6gjsNcM9+hpFhoy5JnUrUPInd2BZ7pmZiDuXmYJrHi0s7K5qL0EYDoe0 m1egPNNyRR125ozJ24M+09c3OQsi3bvTx1TJaV9Aov8hK4So8UmlJTHWpkLw97ku HuTre2IPSFbV4GwJE40V+KNuDVHxaKL7zrInYScqbr6/hOTqBCvFn4ib3CjpF5HG zDAA5S2PrcbL9NQOothVcVB/TZr3IkhglCFqEjVyCX80IL0JkNZkw8jAh0B8uqXx Ug/c1/Mssa8F1jLZMmW45Cway60txqVbcWntPJAymGJbrRErOO/++oUrV0u1C65u LW7gXAaIJWQTX9KnX0SEyejNod7ubZktBz7n5WfkJAPIzdw5wtJalhLa673YTgQ9 zyTPKiWjJj2myCq1AYrJvlK8hSsIBqbBFcUf1zX4SzZWKS+5mtp51o4gfVzcCRPd z/6/iPbB =g5tx -----END PGP SIGNATURE----- BabeConsensusDataProvider works with existing chains Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Oct 27, 2020
-
-
Bastian Köcher authored
* Make consensus `SlotWorker` don't assume a slot is time / duration This removes the last bit of assumption that a slot is always `time / duration`. This will be required by parachains where a slot will be the relay chain block number. Besides this there are also some other drive by changes. One more notable is that `on_slot` now returns a `SlotResult` that holds the block and a potential storage proof. To simplify the implementation and usage of the `SimpleSlotWorker` the `SlotWorker` trait is now implemented for each type that implements `SimpleSlotWorker`. * Update client/consensus/slots/src/lib.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/slots/src/lib.rs Co-authored-by: André Silva <[email protected]> Co-authored-by: André Silva <[email protected]>
-
- Oct 21, 2020
-
-
Cecile Tonglet authored
* Initial commit Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * Add notes to original source code * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * WIP Forked at: 601e2fa1 Parent branch: origin/master * Some doc * Test with trybuild * Revert "Test with trybuild" (issue with trybuild atm) This reverts commit 9055ec2206808ba3ddce6e3d87eb358907fa5e42. https://github.com/dtolnay/trybuild/issues/53 * Apply suggestions * Rename derive to proc-macro * Remove "prefix" feature from informant * Blocking task should use SpawnHandle::spawn_blocking * Improve doc as suggested * Fixes Forked at: 601e2fa1 Parent branch: origin/master * Apply suggestion * Update client/cli/proc-macro/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * More suggestions * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * Improve error message * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * Fix async issue * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * CLEANUP Forked at: 601e2fa1 Parent branch: origin/master * Add test * fix doc test * Update client/cli/src/logging.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <[email protected]> * Apply suggestions * Suggestions * Clarify doc * WIP Forked at: 601e2fa1 Parent branch: origin/master Co-authored-by: Bastian Köcher <[email protected]>
-
- Oct 15, 2020
-
-
Ashley authored
* Initial draft * Add an iterator that helps us get most items * Revert changes to grandpa * Change fields to just be the grandpa authority set and babe epoch changes * Only use the fields we need from the shared authority set * Switch to RPC call * Revert "Only use the fields we need from the shared authority set" This reverts commit 6ede87b0c5fe53f251d7cb45951006a7dc8f9b83. * Add babe_finalized_block_weight from `ashley-improve-sync-state-WIP-loading` * Fix rpc test * Move sync state rpc stuff into sc-sync-state-rpc * Remove as_json_value and remove unwraps from sc-sync-state-rpc * Add clone_inner to SharedAuthoritySet
-
- Oct 08, 2020
-
-
Rakan Alhneiti authored
* Asyncify sign_with * Asyncify generate/get keys * Complete BareCryptoStore asyncification * Cleanup * Rebase * Add Proxy * Inject keystore proxy into extensions * Implement some methods * Await on send * Cleanup * Send result over the oneshot channel sender * Process one future at a time * Fix cargo stuff * Asyncify sr25519_vrf_sign * Cherry-pick and fix changes * Introduce SyncCryptoStore * SQUASH ME WITH THE first commit * Implement into SyncCryptoStore * Implement BareCryptoStore for KeystoreProxyAdapter * authority-discovery * AURA * BABE * finality-grandpa * offchain-workers * benchmarking-cli * sp_io * test-utils * application-crypto * Extensions and RPC * Client Service * bin * Update cargo.lock * Implement BareCryptoStore on proxy directly * Simplify proxy setup * Fix authority-discover * Pass async keystore to authority-discovery * Fix tests * Use async keystore in authority-discovery * Rename BareCryptoStore to CryptoStore * WIP * Remote mutable borrow in CryptoStore trait * Implement Keystore with backends * Remove Proxy implementation * Fix service builder and keystore user-crates * Fix tests * Rework authority-discovery after refactoring * futures::select! * Fix multiple mut borrows in authority-discovery * Merge fixes * Require sync * Restore Cargo.lock * PR feedback - round 1 * Remove Keystore and use LocalKeystore directly Also renamed KeystoreParams to KeystoreContainer * Join * Remove sync requirement * Fix keystore tests * Fix tests * client/authority-discovery: Remove event stream dynamic dispatching With authority-discovery moving from a poll based future to an `async` future Rust has difficulties propagating the `Sync` trade through the generated state machine. Instead of using dynamic dispatching, use a trait parameter to specify the DHT event stream. * Make it compile * Fix submit_transaction * Fix block_on issue * Use await in async context * Fix manual seal keystore * Fix authoring_blocks test * fix aura authoring_blocks * Try to fix tests for auth-discovery * client/authority-discovery: Fix lookup_throttling test * client/authority-discovery: Fix triggers_dht_get_query test * Fix epoch_authorship_works * client/authority-discovery: Remove timing assumption in unit test * client/authority-discovery: Revert changes to termination test * PR feedback * Remove deadcode and mark test code * Fix test_sync * Use the correct keyring type * Return when from_service stream is closed * Convert SyncCryptoStore to a trait * Fix line width * Fix line width - take 2 * Remove unused import * Fix keystore instantiation * PR feedback * Remove KeystoreContainer * Revert "Remove KeystoreContainer" This reverts commit ea4a37c7d74f9772b93d974e05e4498af6192730. * Take a ref of keystore * Move keystore to dev-dependencies * Address some PR feedback * Missed one * Pass keystore reference - take 2 * client/finality-grandpa: Use `Arc<dyn CryptoStore>` instead of SyncXXX Instead of using `SyncCryptoStorePtr` within `client/finality-grandpa`, which is a type alias for `Arc<dyn SyncCryptoStore>`, use `Arc<dyn CryptoStore>`. Benefits are: 1. No additional mental overhead of a `SyncCryptoStorePtr`. 2. Ability for new code to use the asynchronous methods of `CryptoStore` instead of the synchronous `SyncCryptoStore` methods within `client/finality-granpa` without the need for larger refactorings. Note: This commit uses `Arc<dyn CryptoStore>` instead of `CryptoStorePtr`, as I find the type signature more descriptive. This is subjective and in no way required. * Remove SyncCryptoStorePtr * Remove KeystoreContainer & SyncCryptoStorePtr * PR feedback * *: Use CryptoStorePtr whereever possible * *: Define SyncCryptoStore as a pure extension trait of CryptoStore * Follow up to SyncCryptoStore extension trait * Adjust docs for SyncCryptoStore as Ben suggested * Cleanup unnecessary requirements * sp-keystore * Use async_std::task::block_on in keystore * Fix block_on std requirement * Update primitives/keystore/src/lib.rs Co-authored-by: Max Inden <[email protected]> * Fix wasm build * Remove unused var * Fix wasm compilation - take 2 * Revert async-std in keystore * Fix indent * Fix version and copyright * Cleanup feature = "std" * Auth Discovery: Ignore if from_service is cloed * Max's suggestion * Revert async-std usage for block_on * Address PR feedback * Fix example offchain worker build * Address PR feedback * Update Cargo.lock * Move unused methods to test helper functions * Restore accidentally deleted cargo.lock files * Fix unused imports Co-authored-by: Max Inden <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Sep 23, 2020
-
-
Kian Paimani authored
* Revamp npos-elections and implement phragmms * Update primitives/npos-elections/src/phragmms.rs * Fix build * Some review grumbles * Add some stuff for remote testing * fix some of the grumbles. * Add remote testing stuff. * Cleanup * fix docs * Update primitives/arithmetic/src/rational.rs Co-authored-by: Dan Forbes <[email protected]> * Small config change * Better handling of approval_stake == 0 * Final touhces. * Clean fuzzer a bit * Clean fuzzer a bit * Update primitives/npos-elections/src/balancing.rs Co-authored-by: Shawn Tabrizi <[email protected]> * Fix fuzzer. * Better api for normalize * Add noramlize_up * A large number of small fixes. * make it merge ready * Fix warns * bump * Fix fuzzers a bit. * Fix warns as well. * Fix more tests. Co-authored-by: Dan Forbes <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]>
-