André Silva
d6d4068ccc
babe: only process vrf on module finalization ( #11113 )
...
* babe: only process vrf on block execution finalization
* babe: rename CurrentBlockRandomness to PreviousBlockRandomness
* babe: add test for initialization ordering
* babe: rename PreviousBlockRandomness to ParentBlockRandomness
* babe: re-add CurrentBlockRandomness with deprecation notice
* babe: export CurrentBlockRandomness
* babe: silence deprecation warning when exporting CurrentBlockRandomness
* babe: suggestion from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* babe: flatten nested option
* babe: rustfmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-05-04 16:14:58 +00:00
Shawn Tabrizi
7d5202341b
Basic TOML Lint ( #11348 )
...
* basic lint
* lint ordering
2022-05-04 13:38:54 +00:00
Falco Hirschenberger
b581604aa7
Apply some clippy lints ( #11154 )
...
* Apply some clippy hints
* Revert clippy ci changes
* Update client/cli/src/commands/generate.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/inspect_key.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/transactions.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/protocol.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Revert due to missing `or_default` function.
* Fix compilation and simplify code
* Undo change that corrupts benchmark.
* fix clippy
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
remove leftovers!
* Update client/tracing/src/logging/directives.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/fork-tree/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* added needed ref
* Update frame/referenda/src/benchmarking.rs
* Simplify byte-vec creation
* let's just not overlap the ranges
* Correction
* cargo fmt
* Update utils/frame/benchmarking-cli/src/shared/stats.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Giles Cope <gilescope@gmail.com >
2022-04-30 21:28:27 +00:00
dependabot[bot]
5c4fa55f09
Bump log from 0.4.14 to 0.4.16 ( #11236 )
...
Bumps [log](https://github.com/rust-lang/log ) from 0.4.14 to 0.4.16.
- [Release notes](https://github.com/rust-lang/log/releases )
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/log/commits )
---
updated-dependencies:
- dependency-name: log
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-20 15:39:28 +02:00
Qinxuan Chen
41c84b0b41
Remove useless imports ( #11136 )
...
Because `TryInto`/`TryFrom` are in prelude by default from edition 2021
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-04-03 21:44:29 +02:00
dependabot[bot]
98ed4afe45
Bump futures from 0.3.19 to 0.3.21 ( #11133 )
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.19 to 0.3.21.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.19...0.3.21 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 19:34:13 +00:00
dependabot[bot]
ee084279c8
Bump scale-info from 2.0.0 to 2.0.1 ( #10965 )
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/commits )
---
updated-dependencies:
- dependency-name: scale-info
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 21:13:24 +01:00
Andrew Jones
a3a7fe9041
Release primitive crates ( #10937 )
...
* cargo set-version --bump major -p pallet-contracts-primitives
* cargo set-version --bump major -p sp-core
* cargo set-version --bump major -p sp-runtime-interface
* cargo set-version --bump major -p sp-wasm-interface
* cargo set-version --bump major -p sp-runtime
* cargo set-version --bump major -p sp-storage
* cargo set-version --bump major -p sp-rpc
* cargo set-version --bump major -p sp-io
* cargo set-version --bump major -p sp-trie
* cargo set-version -p sp-state-machine -- 0.12.0
* cargo set-version -p sp-externalities -- 0.12.0
* cargo set-version -p sp-keystore -- 0.12.0
* cargo set-version --bump major -p sp-keyring
* cargo set-version --bump major -p sp-version
* cargo set-version --bump major -p sp-tracing
* cargo set-version --bump major -p sp-application-crypto
* cargo set-version --bump major -p sp-arithmetic
* cargo unleash version bump-major -p sp-runtime-interface-proc-macro
* Add codec max-encoded-len feature to sp-arithmetic
* cargo unleash version bump-major -p sp-core-hashing-proc-macro
2022-03-01 14:35:23 +01:00
dependabot[bot]
e3377ddc4e
Bump futures from 0.3.16 to 0.3.19 ( #10930 )
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.16 to 0.3.19.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.16...0.3.19 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-01 10:22:10 +01:00
wigy
535325d2e6
Upgrading parity-scale-codec to v3 ( #10825 )
...
* Upgraded dependencies
* Adapting code to scale v3
* Empty commit to trigger CI
* Triggering CI
* Fixing UI test
* Remove superfluous dev-dep added by #9228
* Cryout for CI
2022-02-24 15:34:34 +01:00
André Silva
2561e11ed7
consensus-slots: cleanup SlotDuration config ( #10878 )
...
* consensus-slots: cleanup the SlotDuration config
* fix tests
* address review comments
2022-02-22 19:39:16 +00:00
Koute
9a31b2c341
Add a new host function for reporting fatal errors; make WASM backtraces readable when printing out errors ( #10741 )
...
* Add a new host function for reporting fatal errors
* Fix one of the wasmtime executor tests
* Have `#[runtime_interface(wasm_only)]` actually mean WASM-only, and not no_std-only
* Print out errors through `Display` instead of `Debug`
* Switch one more trait to require `Error` for its error instead of only `Debug`
* Align to review comments
2022-02-09 09:12:55 +00:00
dependabot[bot]
2632cbb866
Bump serde from 1.0.132 to 1.0.136 ( #10816 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.132 to 1.0.136.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.136 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-08 19:27:08 +00:00
Alexander Theißen
3938c1cb62
Release pallet-contracts-primitives ( #10772 )
...
* Bump sp-storage
* Bump sp-rpc
* Bump sp-io
* Bump sp-trie
* Bump sp-state-machine
* Bump sp-externalities
* Bump sp-keystore
* Bump sp-application-crypto
* Bump pallet-contracts-primitives
* Bump sp-core
* Bump sp-runtime-interface
* Bump sp-wasm-interface
* Bump sp-runtime
* Bump sp-storage
* Update lock file
* Revert "Bump sp-storage"
This reverts commit f86c6db1ae334e28207b658fd90714ade0332e3b.
* Update lock file
2022-02-01 20:38:02 +01:00
Nazar Mokrynskyi
6b60c3dbff
Relax types on DigestItemRef, such that byte slices can be used in addition to vector references ( #10536 )
...
* Relax types on `DigestItemRef`, such that byte slices can be used in addition to vector references
* Apply clippy suggestions
2022-01-20 11:02:22 +01:00
Bastian Köcher
f3662b4bba
Happy new year 2022 ( #10573 )
2022-01-03 09:22:14 +01:00
dependabot[bot]
03d726aac3
Bump serde from 1.0.131 to 1.0.132 ( #10517 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.131 to 1.0.132.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.131...v1.0.132 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 11:17:06 +01:00
Bastian Köcher
494dee7c7b
SlotDuration: Always fetch the slot duration from the runtime ( #10509 )
...
* SlotDuration: Always fetch the slot duration from the runtime
The slot duration should always be fetched from the runtime instead of being cached in the db. The
slot duration is only fetched on startup of the node, so the performance isn't that important. This
is especially helpful for the case when the slot duration of a chain should be changed through a
runtime upgrade (there be dragons, so take care).
* Fix docs
* Remove logging
* Fix warning
2021-12-20 19:49:18 +00:00
dependabot[bot]
d2e9026444
Bump serde from 1.0.130 to 1.0.131 ( #10500 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.130 to 1.0.131.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.130...v1.0.131 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-17 08:30:58 +00:00
David
edf73199ab
Prepare sp-runtime for publication ( #10451 )
...
* Bump versions of sp-core and dependencies to v4.0.0
* Update references from `4.0.0-dev` –> `4.0.0`
* Funny whitespace
* Funny whitespace 2
* Prepare `sp-runtime` for publication
2021-12-15 12:36:17 +01:00
Bastian Köcher
f6f58f95e1
inspect-key: Adds support for expect-public (#10430 )
...
* Introduce `SecretUri`
* `inspect-key`: Adds support for `expect-public`
`expect-public` can be used to check that a given secret uri corresponds to the given public key.
This is mainly useful when the secret uri is protected by a password and a new derived account
should be generated. With `--expect-public` the user can pass the public key/account-id of the
"base" secret uri aka the one without any derivation to ensure the correct password was inserted.
* Fixes
* 🤦
* Apply suggestions from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
* Review feedback
* FMT
* Bump the versions
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2021-12-11 08:13:18 +01:00
David
92dc635f3c
Release sp-core 4.0.0 ( #10447 )
...
* Bump versions of sp-core and dependencies to v4.0.0
* Update references from `4.0.0-dev` –> `4.0.0`
* Funny whitespace
* Funny whitespace 2
2021-12-08 21:06:50 +01:00
Arkadiy Paronyan
4cbbf0cf43
Kill the light client, CHTs and change tries. ( #10080 )
...
* Remove light client, change tries and CHTs
* Update tests
* fmt
* Restore changes_root
* Fixed benches
* Cargo fmt
* fmt
* fmt
2021-11-12 14:15:01 +01:00
dependabot[bot]
4aae801ccf
Bump thiserror from 1.0.26 to 1.0.30 ( #10240 )
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.26 to 1.0.30.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.26...1.0.30 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-11 23:32:27 +00:00
Liu-Cheng Xu
63d2ff0c36
Add serde support for Slot type ( #10204 )
...
Add serde support for the `Slot` type as we'd like to use it directly in our RPC.
2021-11-07 23:29:51 +00:00
Bastian Köcher
b08d3017a8
Switch to Rust 2021 ( #10170 )
...
* Switch to Rust 2021
* Update trybuild to fix errors
2021-11-04 19:54:48 +01:00
Dan Shields
8db7ec9cc9
Migrate to docs.substrate.io throughout ( #10007 )
...
* all reverences of substrate.dev replaced with *correct* docs.substrate.io links
* fix links in non-cargo files, errors in replace
* homepage https://substrate.io
* cargo +nightly fmt
* FMT
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-10-13 12:56:56 -06:00
Liu-Cheng Xu
802afa9f22
Return target_hash for finality_target instead of an Option ( #9867 )
...
* .
cargo +nightly fmt --all
* Fix test
* Simplify test
* They are already imported
* Needless clone()
2021-09-29 13:03:09 +00:00
Georges
5922da95e5
Generate storage info for pallet babe ( #9760 )
...
* Adding MaxEncodedLen for:
* NextConfigDescriptor
* AllowedSlots
* BabeEpochConfiguration
In prepation for adding storage information on pallet babe
* Adding stotage_info to pallet babe
Refactored UNDER_CONSTRUCTION_SEGMENT_LENGTH to become a runtime
parameter MaxSegmentLength
* Reinstate Slice as opposed to Vec
* Refactoring code to make it neater
* Replace `MaxSegmentLength` by
`UNDER_CONSTRUCTION_SEGMENT_LENGTH`
Stop exposing the bounds to the runtime
* Removing extra line
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2021-09-22 22:49:36 +00:00
Andrew Jones
49b6dfd2e5
Enrich metadata with type information ( #8615 )
...
* Cargo.lock after merge
* Restore scale-info feature
* Fully qualify TypeInfo derive
* Skip PendingSwap T
* Add missing skip_type_params attr
* metadata docs features
* Reduce pallet event attribute to struct
* Cargo.lock
* Update frame/balances/src/tests_composite.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Line widths check
* Cargo.lock
* Add scale-info/std
* Update frame/system/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Use `skip_type_params` to remove `TypeInfo` requirements on checks
* Revert "Remove unused Call metadata stuff"
This reverts commit 41311f85
* Skip BalanceSwapAction type parameter
* Remove unused event metadata macro
* Update frame-metadata
* Update primitives/npos-elections/compact/src/codec.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Manual TypeInfo for Header
* Remove TypeInfo requirement for consts in BoundedVec etc.
* Another TypeInfo bound removed
* review: fix indentation
* TypeInfo impls for Identity types
* Add some todos to add custom TypeInfo impls
* Update frame/support/procedural/src/pallet/expand/pallet_struct.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Add some todos to add custom TypeInfo impls
* Add a test for manual Data TypeInfo impl
* Add custom TypeInfo impl for Vote
* Era custom TypeInfo crimes
* Revert finality-grandpa version to 0.14.z
* review: renamed module to pallet_constants_metadata
* New line at end of file
* Add missing scale-info/std
* Update frame/support/src/storage/types/mod.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Remove StorageEntryType::Map unused flag
* Add missing scale-info dependency after merge
* SignedExtension::AdditionalSigned metadata
* Update frame-metadata, use abbreviated docs and args fields
* Update frame/example/Cargo.toml
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Add scale_info/std and remove unused scale-info dependency
* Remove scale-info dependency
* Remove treasury pallet::metadata
* Remove redundant Event test
* Add back scale-info as dev dependency
* fix error metadata when no error defined in decl_module
* Add Module3 to tests
* Fix metadata test
* Add docs feature to frame-support test
* WIP fixing pallet metadata test
* Remove redundant FunctionMetadata, FunctionArgumentMetadata as per https://github.com/paritytech/frame-metadata/pull/20
* Use main branch of frame-metadata
* Use patch of scale-info for latest changes
* Use latest patched scale-info
* Manual TypeInfo for DigestItem
* Manual TypeInfo for DigestItem
* Update scale-info
* Skip __Ignore variants for Error, depends on https://github.com/paritytech/scale-info/pull/117
* Named fields for FRAME v2 pallet Call variants
* Named fields for FRAME v1 pallet Call variants
* Add missing scale-info dependency
* WIP expand benchmark call variant
* fix benchmark with new function
create a new function for each variant of a pallet call.
This function is called by benchmarking macro in order not to break call
creation with unnamed argument
* fix tests
* more fix
* Fix staking tests
* Fix offchain workers calls
* Cherry pick rustfmt.toml from master
* cargo +nightly-2021-06-22 fmt --all
* Update to new call variant structs
* More call variant struct updates
* Remove unused import
* More call variant structs
* More call variant structs
* Even more call variant structs
* Mooar variant structs
* Evermore variant structs
* Call variant structs ad infinitum
* Fmt
* More call variants
* Last call variant
* Call variants all done?
* Fix SS58Prefix type
* Potential workaround for BitFlags<IdentityFields> TypeInfo
* Enable docs capturing for Call, Event, and Error types
* Fix IdentityFields TypeInfo
* Remove metadata-docs feature
* Add capture_docs = true for legacy Call, Event and Error types
* Fmt
* Fix metadata test type
* Update benchmarks with call struct variants
* Fmt
* More test fixes
* Fmt
* Fix benches
* Use latest capture_docs attr
* Latest scale_info
* Fmt
* review: change &Vec to &[]
* Remove pallet metadata attr
* review: remove commented out test code
* review: skip_type_params trailing comma suggestion
* Update to scale-info 0.10.0
* Update construct_runtime ui tests, different because of metadata TypeInfo impls
* Add some TypeInfo derives for UI tests
* Update storage ensure span ui stderrs
* Update call argument bound ui tests
Possibly changed because change from tuple to struct variants?
* Add scale-info dev dependency
* Update to latest finality-grandpa release
* review: missing newline
* review: missing scale-info/std
* review: remove duplicate scale-info/std
* review: remove fully qualified TypeInfo
* review: add missing scale-info/std
* review: remove unnecessary imports.
* Fmt
* Use crates.io RC version of frame-metadata
* Remove scale-info/std because it is a dev dependency
* Add missing scale_info dev-dependency for test
* Delete empty metadata folder
* Fix sp_std import
* review: improve manual UncheckedExtrinsic TypeInfo impl
* review: use full scale-info for dev-dependency
* Remove DefaultByteGetter impl
* review: derive TypeInfo for generic header
* Fmt
* Update primitives/runtime/src/generic/unchecked_extrinsic.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update primitives/runtime/src/generic/unchecked_extrinsic.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update bin/node/executor/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/identity/src/types.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/src/dispatch.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove redundant derive
* Simplify scale-info dependency
* Strip underscore prefix from call variant struct names
* Another underscore field
* More underscore fields
* Another underscore field
* Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map
* Fmt
* Revert weights formatting
* Fix up some tests
* Fix up some tests for StorageEntryTypeMetadata
* scale-info dev dependency
* Fix test error
* Add missing TypeInfo derives
* Add back missing scale-info dependency
* Add back missing scale-info dependency
* Fix npos compact impls
* Cargo.lock
* Fmt
* Fix errors
* Fmt
* Fix renamed raw_solution field
* Fix error
* Fmt
* Fix some benchmarks
* Fmt
* Stray R
* Fix
* Add missing TypeInfos
* ui test fix
* Fix line widths
* Revert "ui test fix"
This reverts commit 2d15ec058a216e3f92d713f1174603a2bb1eac65.
* Upgrade to scale-info 0.11.0
* Revert "Upgrade to scale-info 0.11.0"
This reverts commit 047bb179085a0059c36cd20ab405f55cf0867e28.
* Add Runtime type
* Update to scale-info 0.12
* Update to scale-info 1.0
* Update frame-metadata to version 14.0.0
* Patch finality-grandpa until release available
* Fix metadata tests
* Fix metadata tests
* Fmt
* Remove patched finality-grandpa
* Fix tests, use scale_info imports
* Fix pallet tests
* Add BlockNumber TypeInfo bound
* ui test fix
* Cargo.lock
* Remove pallet metadata
* Cargo.lock
* Add missing scale-info dependency
* Remove pallet event metadata
* Fix error
* Fix collective errors
* Semicolol
* Fmt
* Remove another metadata attribute
* Add new variant to custom digest TypeInfo
* Fmt
* Cargo.lock from master
* Remove comma lol
* Fix example call error
* Fix example call error properly
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-09-15 11:40:41 +00:00
Keith Yeung
886825a5c0
Generate storage info for aura pallet ( #9371 )
...
* Generate storage info for aura pallet
* Add MaxAuthorities to node-template aura pallet config
* Fix compilation errors on node-template
* Use WeakBoundedVec instead of BoundedVec
* Improve comment on BoundedSlice's EncodeLike impl
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Bump MaxAuthorities count to 32 for node template
* cargo fmt
* cargo fmt
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-09-02 01:24:08 +00:00
Georges
ac2468c47b
Generate storage info for pallet authority_discovery ( #9428 )
...
* Migrate Aura pallet to BoundedVec
Implementing issue #8629
* Fixed aura tests after BoundedVec change
* Moved Vec to BoundedVec in authority-discovery
* Merging into the main branch
* Added MaxEncodedLen to crypto
Need this without full_crypto to be able to add generate_store_info
* Add generate_store_info for aura
* Adding changes to Slot to add MaxEncodedLen
* Adding generate_store_info to authority discovery
* fmt
* removing panics in runtime if vec size too large
* authority-discovery: Remove panics in runtime
Can happen if vec size is too large, so truncate the vec in that case
* Adding logging when I truncate Vecs
* Got the sign the other way around
* Reverting pallet_aura changes
This is already being addressed by PR #9371
* Change BoundedVec to WeakBoundedVec
More robust implementation following @thiolliere recommendation.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-08-30 06:11:59 +00:00
Squirrel
7e9b8d278e
depend-o-pocalipse ( #9450 )
...
Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.
Updated code related to deprecated warning on tracing-subscriber `scope()`
( See https://github.com/tokio-rs/tracing/issues/1429 )
2021-08-13 15:18:37 +01:00
Kian Paimani
abd08e29ce
Rewrap all comments to 100 line width ( #9490 )
...
* reformat everything again
* manual formatting
* last manual fix
* Fix build
2021-08-11 14:56:55 +00:00
Chevdor
61c0a65c9b
Remove dependency on substrate-prometheus-endpoint that is no longer required ( #9521 )
...
* remove dependency that is no longer required
* remove unused deps
2021-08-11 11:52:25 +02:00
Ashley
394c2817d5
Refactor sc_executor::RuntimeInfo trait into 2 parts ( #9498 )
...
* Split native executor stuff from wasm executor stuff
* Remove `native_runtime_version` in places
* Fix warning
* Fix test warning
* Remove redundant NativeRuntimeInfo trait
* Add a warning for use_native
* Run cargo fmt
* Revert "Add a warning for use_native"
This reverts commit 9494f765a06037e991dd60524f2ed1b14649bfd6.
2021-08-10 13:23:09 +00:00
Bastian Köcher
3b471704d9
Use correct ExecutionContext for check_inherents ( #9483 )
...
Before we used the `other` context, while we are actually either in the
import or sync context.
2021-08-03 11:12:21 +00:00
Squirrel
df59596ec0
Move client consensus parts out of primitives and into client/consensus/api ( #9319 )
...
* moved client code out of primitives
* bump ci
* Fixup from merge.
* Removed unused deps thanks to review feedback
* Removing unneeded deps
* updating lock file
* note about rustfmt
* fixed typo to bump ci
* Move lonely CacheKeyId to parent
* cargo fmt
* updating import style
* Update docs/STYLE_GUIDE.md
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2021-07-30 13:27:17 +00:00
Bastian Köcher
7b56ab15b4
Run cargo fmt on the whole code base ( #9394 )
...
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-07-21 14:32:32 +00:00
Arkadiy Paronyan
5a65bf5515
Storage chains sync ( #9171 )
...
* Sync storage chains
* Test
* Apply suggestions from code review
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* Separate block body and indexed body
* Update client/db/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2021-07-17 10:58:37 +02:00
dependabot[bot]
ea7c79dac4
Bump async-trait from 0.1.48 to 0.1.50 ( #8977 )
...
Bumps [async-trait](https://github.com/dtolnay/async-trait ) from 0.1.48 to 0.1.50.
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.48...0.1.50 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-13 09:48:59 +00:00
dependabot[bot]
31011e7a03
Bump serde from 1.0.124 to 1.0.126 ( #9099 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.124 to 1.0.126.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.124...v1.0.126 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-13 08:09:05 +00:00
Benjamin Kampmann
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 >
2021-07-11 12:17:53 +00:00
Bastian Köcher
d489bd70b5
Do not call initialize_block before any runtime api ( #8953 )
...
* Do not call `initialize_block` before any runtime api
Before this change we always called `initialize_block` before calling
into the runtime. There was already support with `skip_initialize` to skip
the initialization. Almost no runtime_api requires that
`initialize_block` is called before. Actually this only leads to higher
execution times most of the time, because all runtime modules are
initialized and this is especially expensive when the block contained a
runtime upgrade.
TLDR: Do not call `initialize_block` before calling a runtime api.
* Change `validate_transaction` interface
* Fix rpc test
* Fixes and comments
* Some docs
2021-07-01 15:50:42 +00:00
André Silva
4069877c1c
consensus: remove unused offline tracker ( #9178 )
2021-06-23 05:01:11 +00:00
Arkadiy Paronyan
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 >
2021-06-22 09:32:43 +00:00
André Silva
a26ec52450
make SelectChain async ( #9128 )
...
* make SelectChain async
* make JustificationImport async
2021-06-20 11:01:09 +00:00
André Silva
0417e4e37f
babe: add comments to block weight and expose block_weight function ( #9145 )
...
* babe: add comments to block weight and expose block_weight function
* babe: expose function for block weight key
2021-06-19 12:40:53 +00:00
Bastian Köcher
1278b9a6d4
Aura: Skip initialize block & remove cache ( #9132 )
...
This instructs the Aura runtime api to skip initialize block, when
requesting the authorities. This is important, as we don't want to use
the new authorities that should be used from the next block on.
Besides that, it removes the caching stuff. The cache is not available
on full nodes anyway. In the future we should store the authorities
probably in the aux store.
2021-06-17 07:27:53 +00:00
André Silva
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
2021-06-04 21:31:06 +00:00