mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
e01ac8cea089bde046e6122fa7fbcccdea1bd2c9
139 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c78c2892a4 |
Attempting to fix publishing (#9140)
* mark template and utils as non-publish * switch to development version for testing * activate unleash check * maybe if I disable all rules... * Fix isolated compilation of `max-encoded-len-derive` with `syn` error[E0369]: binary operation `==` cannot be applied to type `syn::Path` --> src/lib.rs:88:29 | 88 | .filter(|attr| attr.path == parse_quote!(max_encoded_len_crate)) | --------- ^^ ----------------------------------- _ | | | syn::Path error: aborting due to previous error For more information about this error, try `rustc --explain E0369`. Error: could not compile `max-encoded-len-derive` * WIP: bump changes crates since v3 tag to next breaking cargo unleash version bump-breaking --changed-since v3.0.0 cargo unleash version set-pre dev --changed-since v3.0.0 FIXME: Don't modify crates that are not yet released, e.g. `max-encoded-len-derive` * Update lockfile * WIP: Bump sp-transaction-pool as well * WIP: Bump sp-offchain as well * WIP: Bump frame-system-rpc-runtime-api as well * WIP: Bump sp-authority-discovery as well * Manually deactivate dev-deps before `cargo unleash check` Otherwise we run into `Cycle detected` error. * Bump sp-consensus-slots * Add missing Cargo.lock change * Bump sp-consensus-vrf as well * Bump sp-keyring as well * Bump sp-consensus-pow as well * Try to speed up the `unleash-check` job Previously, the job took 106 minutes - let's see if explicitly specifying a `CARGO_TARGET_DIR` will help * fixup: Ensure the temp target dir exists for unleash check * Bump pallet-transaction-payment-rpc-runtime-api as well Needed for Polkadot * Bump pallet-transaction-payment-rpc as well Needed for Polkadot * Try updating crates after patching in the Polkadot CI job * Use another approach to update patched Substrate crates * Try to update all sp-core versions in Polkadot CI job * Simplify sp-core version checking * Apply another shellcheck lint * Just do the simplest thing I guess * Welp don't do --offline then * Clean up `unleash-check` job triggers Co-authored-by: Denis Pisarev <denis.pisarev@parity.io> * Fix a note in unleash-check cache step * Add a note about temporary optimization in cargo-unleash * Pin a newer version of cargo-unleash Co-authored-by: Igor Matuszewski <xanewok@gmail.com> Co-authored-by: Denis Pisarev <denis.pisarev@parity.io> |
||
|
|
4069877c1c | consensus: remove unused offline tracker (#9178) | ||
|
|
77a4b980ae |
Fast sync (#8884)
* State sync * Importing state fixes * Bugfixes * Sync with proof * Status reporting * Unsafe sync mode * Sync test * Cleanup * Apply suggestions from code review Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> * set_genesis_storage * Extract keys from range proof * Detect iter completion * Download and import bodies with fast sync * Replaced meta updates tuple with a struct * Fixed reverting finalized state * Reverted timeout * Typo * Doc * Doc * Fixed light client test * Fixed error handling * Tweaks * More UpdateMeta changes * Rename convert_transaction * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Code review suggestions * Fixed count handling Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> |
||
|
|
a26ec52450 |
make SelectChain async (#9128)
* make SelectChain async * make JustificationImport async |
||
|
|
c44b552d8f |
consensus: handle justification sync for blocks authored locally (#8698)
* consensus: add trait to control justification sync process * network: implement JustificationSyncLink for NetworkService * slots: handle justification sync in slot worker * babe: fix slot worker instantiation * aura: fix slot worker instantiation * pow: handle justification sync in miner * babe: fix tests * aura: fix tests * node: fix compilation * node-template: fix compilation * consensus: rename justification sync link parameter * aura: fix test compilation * consensus: slots: move JustificationSyncLink out of on_slot |
||
|
|
2675741a09 |
Rework inherent data client side (#8526)
* Lol * Yeah * Moare * adaasda * Convert AURA to new pallet macro * AURA: Switch to `CurrentSlot` instead of `LastTimestamp` This switches AURA to use `CurrentSlot` instead of `LastTimestamp`. * Add missing file * Update frame/aura/src/migrations.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Remove the runtime side provide inherent code * Use correct weight * Add TODO * Remove the Inherent from AURA * 🤦 * Remove unused stuff * Update primitives authorship * Fix babe inherent data provider * Fix consensus-uncles * Fix BABE * Do some further changes to authorship primitives... :D * More work * Make it compile the happy path * Make it async! * Take hash * More stuff * Hacks * Revert "Hacks" This reverts commit cfffad88668cfdebf632a59c4fbfada001ef8251. * Fix * Make `execute_block` return the final block header * Move Aura digest stuff * Make it possible to disable equivocation checking * Fix fix fix * Some refactorings * Comment * Fixes fixes fixes * More cleanups * Some love * Better love * Make slot duration being exposed as `Duration` to the outside * Some slot info love * Add `build_aura_worker` utility function * Copy copy copy * Some stuff * Start fixing pow * Fix pow * Remove some bounds * More work * Make grandpa work * Make slots use `async_trait` * Introduce `SharedData` * Add test and fix bugs * Switch to `SharedData` * Make grandpa tests working * More Babe work * 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* * Make manual-seal compile * More fixes * Start fixing Aura * Fix Aura tests * Fix Babe tests * Make everything compile * Move code around and switch to async_trait * Fix Babe * Docs docs docs * Move to FRAME * Fix fix fix * Make everything compile * Last cleanups * Fix integration test * Change slot usage of the timestamp * We really need to switch to `impl-trait-for-tuples` * Update primitives/inherents/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update primitives/inherents/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update primitives/inherents/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Some extra logging * Remove dbg! * Update primitives/consensus/common/src/import_queue/basic_queue.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
052be8bbef |
Simplify some Option / Result / ? operator patterns (#8653)
* Simplify some Option / Result / ? operator patterns When those match a combinator exactly. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust). * adjust after review * adjust post-review |
||
|
|
d64f79924a |
Update to libp2p 0.37 (#8625)
* Update to libp2p 0.37 * Line widths * Fix tests |
||
|
|
14b5acab86 |
Introduce a "dynamic" block size limit for proposing (#8588)
* Introduce a "dynamic" block size limit for proposing This adds support for using a dynamic block size limit per call to `propose`. This is required for Cumulus/Parachains to always use stay in the limits of the maximum allowed PoV size. As described in the docs, the block limit is only checked in the process of pushing transactions. As we normally do some other operations in `on_finalize`, it can happen that the block size still grows when there is some proof being collected (as we do for parachains). This means, that the given block limit needs to be rather conservative on the actual value and should not be the upper limit. * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Andronik Ordian <write@reusable.software> * More future proof encoded size updating * Use `ProofRecorderInner` * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/slots/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/slots/src/slots.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
217c4be226 |
Make BlockImport and Verifier async (#8472)
* 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 <123550+andresilva@users.noreply.github.com> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/common/src/shared_data.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/babe/src/tests.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/babe/src/tests.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Fix warning Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
e1570b9ab4 |
Update to libp2p-0.36 (#8420)
* Update to libp2p-0.36 * Some more Cargo.lock updates. |
||
|
|
15e15e7d8e |
Aura and Slots refactoring (#8386)
* Make slot duration being exposed as `Duration` to the outside * Some slot info love * Add `build_aura_worker` utility function * Copy copy copy |
||
|
|
0d6884b919 |
Storing multiple Justifications per block (#7640)
* 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 <pierre.krieger1708@gmail.com> * Apply suggestions from code review Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> * network: tweaks to review suggestions * network: revert change to BlockData for backwards compatibility * Apply suggestion from code review Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> * Apply suggestions from code review Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * 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 <pierre.krieger1708@gmail.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <andrerfosilva@gmail.com> |
||
|
|
8a0e8ea9a6 |
Move proof generation to the type system level (#8185)
* Start * Finish!!!! * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Review comments Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
76d3814e90 |
Make on_slot return the block with the post header (#8188)
* 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 <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
fbd3148bba | Update to libp2p-0.35.1 (#8141) | ||
|
|
821e018d75 |
Ensure we spawn the block import worker as an essential task (#8155)
* 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 |
||
|
|
6a964c5df0 |
Releasing 3.0 (#8098)
* bumping version for next release * add changelog * add guide |
||
|
|
d40f9c166f |
Sync: Fix issue of not freeing a block announcement slot (#8006)
* Sync: Fix issue of not freeing a block announcement slot
There was a bug that when the block announcement validation returned an
error, the slot reserved for this validation wasn't freed. This could
lead to a situation where we rejected any block announcement from such a
peer for that the block announcement returned an error multiple times.
* Better logging
* Fuck I'm dumb
* 🤦
|
||
|
|
f48296e9ad |
Update parity-scale-codec to 2.0 (#7994)
* update cargo.toml * use 2.0 in mmmr |
||
|
|
e21a61eac8 |
Rewrite the async code in BasicQueue (#7988)
* Rewrite the async code in `BasicQueue` This is some smaller change to rewrite the async code in `BasicQueue`. I require this for some other pr I'm working on ;) * Update primitives/consensus/common/src/import_queue/basic_queue.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update primitives/consensus/common/src/import_queue/basic_queue.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update primitives/consensus/common/src/import_queue/basic_queue.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Hmm :D Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
3927b649cb |
*: Update to libp2p v0.34.0 (#7888)
* *: Update to libp2p v0.34.0 * client/network: Update bytes, unsigned-varint and asynchronous-codec * client: Update to prost v0.7 |
||
|
|
014e6f03c6 | bumpd minor version (#7873) | ||
|
|
028f3d2674 |
Merge 2.0.1 backport branch into mainline master (#7842)
* 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 <git@kchr.de> Co-authored-by: Benjamin Kampmann <ben@parity.io> |
||
|
|
a4032b1dfb | Update to futures 0.3.9 (#7854) | ||
|
|
2b48e09b24 |
upgrade a few dependencies (#7831)
* 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 |
||
|
|
f0b99dd2f2 |
*: Update to libp2p v0.33.0 (#7759)
* *: Update to libp2p v0.33.0 * client/network: Consistently track request arrival time With https://github.com/libp2p/rust-libp2p/pull/1886/ one is guaranteed to receive either a `ResponseSent` or a `InboundFailure` event for each received inbound request via `RequestResponseEvent::Message`. Given this guarantee there is no need to track arrival times in a best-effort manner and thus there is no need to use a LRU cache for arrival times. * client/offchain: Adjust to PeerId API changes |
||
|
|
e3e651f72c |
Happy new year (#7814)
* Happy new year Updates the copyright years and fixes wrong license headers. * Fix the template * Split HEADER into HEADER-APACHE & HEADER-GPL |
||
|
|
d3c7a99d3c |
Update common block in sync after importing blocks of a peer, please read UPDATE (#7733)
* Update common block in sync after importing blocks of a peer This updates the sync code to update the common block of a peer, after we have imported blocks from this peer. This fixes a bug for when we are connected to one or more nodes that are doing a full sync as our node. Nodes in full sync will not announce new blocks, as we don't send import notifications on full sync. The problem as now that we were connected to some peer that reported some low number as its best and we tried to sync these blocks. But, as we did not update the common block of this peer, we would sync these blocks over and over again. Being captured in some time warp. The solution to this problem is that we increase the common number as we import blocks from this peer. * Test * Test name.. * Fix test * Cleanup some code and write some new regression test * Implement the ancestor search * Check that the common number is smaller than the last finalized block * Update client/network/src/protocol/sync.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/network/src/protocol/sync.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/network/src/protocol/sync.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Change the way we build the status messages * Start some new test... * Finish test * Rename test * Update client/network/src/protocol.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
570a4a81d6 | delete primitives in Cargo in primitives (#7751) | ||
|
|
059746183d |
Default block announce validation should reject additional data (#7726)
If we are using the default block announce validator and receive additional data alongside the block announcement, we should disconnect this peer. |
||
|
|
e4e120e9b3 |
*: Update to libp2p v0.32.2 (#7708)
Version v0.32.2 pins async-tls to the semver compliant v0.11.0 instead of the yanked async-tls v0.10.2. |
||
|
|
0a2636d20c |
*: Update to libp2p v0.32.0 (#7696)
* *: Update to libp2p v0.32.0 * Cargo.lock: Update async-tls to 0.10.2 * client/network/request_response: Adjust to new request response events * client/network/request_response.rs: Clean up silently failing responses * client/network/discovery: Lazily instantiate mdns * client/network/discovery: Exclude MdnsWrapper for target_os unknown * client/network/discovery: Fix indentation * client/network/request-response: Use LruCache to track pending resp time * client/network/request_responses: Fix early connection closed error * client/network/request-response: Replace debug_assert with debug * client/network/request-response: Fix typo * client/network/request-response: Don't emit event on send_response fail * client/network/request-response: Revert waker.wake_by_ref() * client/network/request-resp: Make duration in InboundRequest optional * client/network/req-resp: Don't emit two events for busy builder When a response builder is busy incoming requests are dropped. Previously this was reported both via a `ResponseFailure::Busy` and a `ReponseFailure::Network(InboundFailure::Omisssion)` event. With this commit the former is removed, leaving only the latter in place. |
||
|
|
b149b1fdc0 | *: Update to libp2p v0.31.2 (#7658) | ||
|
|
8c7d217091 |
chore/error: remove from str conversion and add deprecation notificat… (#7472)
* 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 <write@reusable.software> * 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 <bkchr@users.noreply.github.com> * remove closure clutter Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * 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 <bkchr@users.noreply.github.com> * Into -> From Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * remove pointless codec Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * avoid pointless self import Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bernhard Schuster <bernhard@parity.io> Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> |
||
|
|
b4ee48ee18 |
Upgrade to libp2p-0.31. (#7606)
* Upgrade to libp2p-0.31. * Address line width. * Add generous incoming connection limit. * Remove old noise configuration. |
||
|
|
d698d01378 |
Inform sync explicitly about new best block (#7604)
* Inform sync explicitly about new best block Instead of "fishing" the new best block out of the processed blocks, we now tell sync directly that there is a new best block. It also makes sure that we update the corresponding sync handshake to the new best block. This is required for parachains as they first import blocks and declare the new best block after being made aware of it by the relay chain. * Adds test * Make sure async stuff had time to run |
||
|
|
1871a95088 |
grandpa: remove light-client specific block import pipeline (#7546)
* grandpa: remove light-client specific block import * consensus, network: remove finality proofs |
||
|
|
cd2490f56d |
Bump wasm-timer from 0.2.4 to 0.2.5 (#7578)
Bumps [wasm-timer](https://github.com/tomaka/wasm-timer) from 0.2.4 to 0.2.5. - [Release notes](https://github.com/tomaka/wasm-timer/releases) - [Commits](https://github.com/tomaka/wasm-timer/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
75e365a59b |
*: Update to libp2p v0.30.0 (#7508)
* *: Update to libp2p v0.30.0 * Cargo.lock: Update * *: Update to libp2p v0.30.1 |
||
|
|
6ded31477d |
Make the maximum block size configurable (#7499)
* Make the maximum block size configurable This pr makes the maximum block size configurable. The maximum block size is used after proposing a new block to check if the new block is not exceeding the maximum. * Update primitives/consensus/common/src/evaluation.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Added comment Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
ff1707cc7f |
Update to libp2p-0.29. (#7341)
* Update to libp2p-0.29. * Update dependencies. * Update Cargo.toml Co-authored-by: Max Inden <mail@max-inden.de> * Fix tests. * Fix tests. * Fix more tests. * Update to 0.29.1 * Update ed25519-dalek dependency of sp-core. * Update Cargo.lock. Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> |
||
|
|
9687759774 |
error rework, for polkadot convenience (#7446)
Co-authored-by: Bernhard Schuster <bernhard@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> |
||
|
|
05af334bbc |
Make consensus SlotWorker don't assume a slot is time / duration (#7441)
* 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 <123550+andresilva@users.noreply.github.com> * Update client/consensus/slots/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> |
||
|
|
463ba54d00 |
consensus: prioritize finality work over block import in queue (#7307)
* consensus: prioritize finality work over block import in queue * consensus: add test for import queue task priority |
||
|
|
c40cfe917e |
Split block announce processing into two parts (#6958)
* Split block announce processing into two parts
This pull requests splits the block announce processing into two parts.
Into a phase that is called pre-validation that will be async and call
the block announce validator and into a second phase that processes the
result of the pre-validation.
The important change here is that the pre-validation phase is async.
This will be required by Cumulus/parachains. When a parachain announces
a block, it adds the candidate message send by the relay chain as extra
data into the block announcement. To verify this candidate message, the
relay chain parent is required that was used when building this message.
Now it can happen that we first receive the block announcement before
fully importing the relay chain block and this leads to the parachain
block not being imported. By making the pre-validation async, we will be
able to wait for the relay chain block to be imported to verify the
candidate message.
* Apply suggestions from code review
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
* Update client/network/src/protocol/sync.rs
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
* client/authority-discovery: Append PeerId to Multiaddr at most once (#6933)
* client/authority-discovery/worker: Extract address getter
* client/authority-discovery: Test for no duplicate p2p components
* client/authority-discovery: Append PeerId to Multiaddr at most once
When collecting the addresses to be published for the local node,
`addresses_to_publish` adds the local nodes `PeerId` to each
`Multiaddr`. Before doing so, ensure the `Multiaddr` does not already
contain one.
* client/authority-discovery: Remove explicit return
* expose Deposit (#6943)
* Add a `LightSyncState` field to the chain spec (#6894)
* Reset code, almost ready for PR
* Improved build_hardcoded_spec
* Fix line widths
* Fix tests
* Fix sc-service-test
* Suggestions from code review
* Rename to LightSyncState
* It's not syncing :^(
* It syncs!
* Remove rpc call
* Convert spaces to tabs
* Moved sc-service things to export_sync_state.rs
* Fix tests
* Wait for syncing with network_status_sinks
* Remove sc-network from node-template
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Various changes, split the flag up into 2 pieces to make testing easier.
* Update client/cli/src/commands/build_spec_cmd.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Revert a lot of changes
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Dynamically generate CHT roots on a full client (#6944)
* Generate CHT roots on a full client
* add changes_trie_root function
* Add a test
* Line widths
* Fix sc-service-test
* Clarify comments
* Revert comments
* Enable verification logic when executing benchmarks (#6929)
* Add `--verify` flag to benchmark execution
* make it so `--verify` can be used for getting the actual benchmarks
* undo manual testing
* oops
* use benchmark config struct
* verify is default on, docs update
* remove clone
* improve formatting
* fix test
* bump impl for ci
* grandpa: always create and send justification if there are any subscribers (#6935)
* grandpa: use bytes type for justification rpc notification
* grandpa: always create justification if there are rpc subscribers
* grandpa: wording
* grandpa: replace notify_justification macro with function
* grandpa: prefer Option<&T> over &Option<T>
* .maintain/monitoring/alerting-rules: Add fd alert (#6946)
Alert on high file descriptor allocation.
* Fix benchmark read/write key tracker for keys in child storages. (#6905)
* WIP: read child trie and write child trie
* add test
* refactor a bit + improve log
* better naming
* trigger CI
* Revert "trigger CI"
This reverts commit d0aadaeb6a12fc6c39f01b3c1b5725d19f085865.
* client/authority-discovery: Limit number of addresses per authority (#6947)
* client/authority-discovery: Test addresses per authority limit
* client/authority-discovery: Limit number of addresses per authority
* ⛓ ✨Add ShiftNrg Network SS58 address type (#6942)
* update tracing attribute (#6950)
* Fix unwraps and other issues with benchmarks (#6957)
* Fix unwraps and other issues with benchmarks
* undo changes to contracts pallet
* Remove implementation of `Randomness for ()` (#6959)
* Fix staking fuzzer. (#6954)
* Enforce that ProtocolId is a string (#6953)
* Enforce that ProtocolId is a string
* Fix test
* Support Staking Payout to Any Account (#6832)
* Support staking payout to any account
* fix offences benchmarks
* Better prime election. (#6939)
* Better prime election.
* improve docs
* more sensible variable names
* link to Borda count wiki
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* babe: fix report_equivocation weight (#6936)
* babe: fix report_equivocation weight
* node: bump spec_version
* babe: fix floor in report_equivocation weight calculation
Co-authored-by: Gavin Wood <gavin@parity.io>
* grandpa: fix floor in report_equivocation weight calculation
* babe, grandpa: add test for weight_for::report_equivocation
Co-authored-by: Gavin Wood <gavin@parity.io>
* fix bench db wipe (#6965)
* Implement request-responses protocols (#6634)
* Implement request-responses protocols
* Add tests
* Fix sc-cli
* Apply suggestions from code review
Co-authored-by: Max Inden <mail@max-inden.de>
* Fix naming
* Fix other issues
* Other naming fix
* Fix error logging
* Max sizes to u64
* Don't kill connections on refusal to process
* Adjust comment
Co-authored-by: Max Inden <mail@max-inden.de>
* add generated weight info for pallet-collective (#6789)
* add benchmark for disapprove_proposal
* use generated WeightInfo for pallet-collective weights
* order collective benchmark params alphabetically to get a consistent ordering
* address review comments
* remove default impl of WeightInfo for ()
* remove comments about weight changes
* add default weights
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* whitelist voter account in benchmark
* update weights
* MaxMembers configurable
* remove base weight comment
* add weight to technical collective
* another DB whitelist optimization
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* client/*: Treat protocol name as str and not [u8] (#6967)
* client/*: Treat protocol name as str and not [u8]
Notification protocol names are in practice always valid utf8 strings.
Instead of treating them as such in the type system, thus far they were
casted to a [u8] at creation time.
With this commit protocol names are instead treated as valid utf8
strings throughout the codebase and passed as `Cow<'static, str>`
instead of `Cow<'static, [u8]>`. Among other things this eliminates the
need for string casting when logging.
* client/network: Don't allocate when protocol name is borrowed
* update kvdb-rocksdb to 0.9.1 and rocksdb to 6.11.4 (#6963)
* Use AsyncReadExt::read_exact, not just read (#6977)
* client/cli/src/config: Warn on low file descriptor limit (#6956)
* client/cli/src/config: Warn on low file descriptor limit
Substrate sets the soft file descriptor limit to the hard limit at
startup. In the case of the latter being low already (< 10_000) a
Substrate node under high demand might run into issues e.g. when opening
up new TCP connections or persisting data to the database.
With this commit a warn message is printed to stderr.
* client/cli/Cargo.toml: Update to fdlimit 0.2.0
* Update substrate bip39 version. (#6955)
* update bip39 version
* and lock
* Inverting events set and changed in nicks pallet (#6989)
Fixing #6988
* Silence the error about non-registered protocols (#6987)
* Silence the error about non-registered protocols
* Silence the other two locations as well
* Change browser-demo build.sh to use python 3 again (#6992)
* fix pallet-evm features (#6995)
* Move subcommands from sc-cli to nodes (#6948)
* ci: deploy alerting rules: fix run on changes (#6998)
* ci: deploy alerting rules: fix run on changes
Co-authored-by: Max Inden <mail@max-inden.de>
* *: Update to Prometheus v0.10.0 (#6964)
* *: Update to Prometheus v0.10.0-rc.1
* *: Update to Prometheus v0.10.0
* Ensure that handshake is sent back even in case of back-pressure (#6979)
* Ensure that handshake is sent back even in case of back-pressure
* Update client/network/src/protocol/generic_proto/handler/group.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Also process OpenRequest and Closed
* Fix bad merge
* God I'm so lost with all these merges
* Immediately return Closed
Co-authored-by: Max Inden <mail@max-inden.de>
* frame/authority-discovery: Have authorities() return both current and next (#6788)
* frame/authority-discovery: Have authorities() return both current and next
Authority address lookups on the DHT happen periodically (every 10
mintues) and are rather slow (~10 seconds).
In order to smooth the transition period between two sessions, have the
runtime module return both the current as well as the next authority
set. Thereby the client authority module will:
1. Publish its addresses one session in advance.
2. Prefetch the addresses of authorities of the next session in advance.
* frame/authority-discovery: Deduplicate authority ids
* frame/authority-discovery: Don't dedup on_genesis authorities
* frame/authority-discovery: Remove mut and sort on comparison in tests
* frame/authority-discovery: Use BTreeSet for deduplication
* Stop sending messages on legacy substream altogether (#6975)
* Stop sending messages on legacy substream altogether
* Ensure that handshake is sent back even in case of back-pressure
* Update client/network/src/protocol/generic_proto/handler/group.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Also process OpenRequest and Closed
* Also process OpenRequest and Closed
* Fix bad merge
* God I'm so lost with all these merges
* Immediately return Closed
* Add warning for sending on non-registered protocol
* Register GrandPa protocol in tests
* Update client/network/src/protocol/generic_proto/handler/group.rs
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Max Inden <mail@max-inden.de>
* manual seal is now consensus agnostic (#7010)
* manual seal is now consensus agnostic
* pr grumbles
* grandpa: report metrics on prevotes and precommits cast (#6970)
* grandpa: report metrics on prevotes and precommits cast
* Update client/finality-grandpa/src/environment.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Update client/finality-grandpa/src/environment.rs
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Max Inden <mail@max-inden.de>
* Fix compact npos solution edge count calculation (#7021)
This edge count is used for weighing, and it is somewhat trivial to review and verify that the current implementation was ignoring `votes16` field of the struct. As reminder, the struct is like this:
```rust
struct Compact {
votes1: ... ,
votes2: ...,
...,
votes16: ...,
}
```
I already will fix this in https://github.com/paritytech/substrate/pull/7007, but since it might take a while, this one can go in asap and make it to the very next runtime.
* Refactor & detach network metrics. (#6986)
* Refactor sc-network/service metrics.
1. Aggregate sc-network metrics into a submodule, introducing
two more sourced metrics to avoid duplicate atomics.
2. Decouple periodic sc-service network metrics from other
metrics, so that they can be updated independently.
* Update client/service/src/metrics.rs
* Update client/service/src/metrics.rs
* Node template complete import pipeline (#7014)
* Use complete import pipeline
* Line length
Co-authored-by: Dan Forbes <dan@danforbes.dev>
* client/authority-discovery: Throttle DHT requests (#7018)
* client/authority-discovery: Throttle DHT requests
Instead of passing one DHT query for each authority down to the network
every query interval, only pass MAX_IN_FLIGHT_LOOKUPS at a given point
in time, triggering new ones when previous ones return.
* client/authority-discovery/worker/test: Fix wrong constant
* Update Nicks docs to clarify that it is not production-ready (#6990)
* Ignore wasm_gc for debug build. (#6962)
* Ignore gc for debug build.
* alternate implementation
* Update utils/wasm-builder/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* fix
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Make `--file` optional for `generate-node-key` (#7043)
This pr makes the `--file` argument optional to `generate-node-key`.
If the argument is not given, the secret node key will be printed to
`stdout`. The public node key will always be printed to `stderr`.
* Downgrade wabt = 0.9.1 (#7042)
* Add metadata shadows to multisig pallet (#7029)
* Add metadata shadows to multisig pallet
* Update frame/multisig/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix broken link to democracy pallet. (#7026)
Old link was broken, and I put a new one.
* Revert "Fix broken link to democracy pallet. (#7026)" (#7047)
This reverts commit
|
||
|
|
1b350a050c | Add more metrics to the import queue (#7207) | ||
|
|
ecdc94420e |
Releasing 2.0 – two dot 😮 (#7182)
Tagging the release of substrate 2.0 [ci: skip-checks] |
||
|
|
22632efc5f |
Update READMEs, fix links (#7176)
* Re-generate READMEs to fix doc links; set readme field in package manifests * Re-generate READMEs to fix doc links; set readme field in package manifests * Re-generate READMEs to fix doc links; set readme field in package manifests * Re-generate READMEs to fix doc links; set readme field in package manifests * Revert stuff that shouldn't have been committed * Revert stuff that shouldn't have been committed * Fix parent relative link generation * Manually remove this incorrect link for now. |
||
|
|
51706a7620 |
Upgrade to libp2p-0.28. (#7077)
* Upgrade to libp2p-0.28 * Clean up test imports. * CI * CI * CI? * CI once more. * One more. * CI * CI * CI |