Shawn Tabrizi
7d5202341b
Basic TOML Lint ( #11348 )
...
* basic lint
* lint ordering
2022-05-04 13:38:54 +00:00
Shawn Tabrizi
e1e4894154
add missing features to node-template-runtime ( #11326 )
2022-04-30 23:49:57 +02: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
Bisola Olasehinde
aaf693f05a
Replace simple parameter_types ( #11254 )
...
* update bin/node-template/runtime/src/lib.rs
* update frame/contracts/src/tests.rs
* update frame/executive/src/lib.rs
* update frame/grandpa/src/mock.rs
* update frame/im-online/src/mock.rs
* update frame/offences/benchmarking/src/mock.rs
* update frame/recovery/src/mock.rs
* update frame/referenda/src/mock.rs
* update frame/session/benchmarking/src/mock.rs
* update frame/staking/src/mock.rs
* update frame/state-trie-migration/src/lib.rs
* update frame/support/test/compile_pass/src/lib.rs
* frame/treasury/src/tests.rs
* update frame/whitelist/src/mock.rs
* update frame/vesting/src/mock.rs
* update test-utils/runtime/src/lib.rs
* update bin/node-template/runtime/src/lib.rs
* Update frame/grandpa/src/mock.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* resolve failed checks 1518659 & 1518669
* resolve format check
* backtrack to resolve compile error
* check --all --tests ✅
* cargo +nightly fmt ✅
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-04-29 02:25:50 +00:00
Oliver Tale-Yazdi
9980d314b1
Follow ups for benchmark machine ( #11270 )
...
* Follow ups for the MachineCmd
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add to node-template
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test with feature flag
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Lower disk requirements
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add ExecutionLimit to the disk benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename DISK_WRITE_LIMIT -> DEFAULT_DISK_EXECUTION_LIMIT
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename POLKADOT_REFERENCE_HARDWARE -> SUBSTRATE_REFERENCE_HARDWARE
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix build profile + add license
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove deps
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Set tolerance to 10%
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Ignore test
I cannot reproduce the CI error, even with the full command:
cargo test --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path ./bin/node/cli/Cargo.toml
I will put an 'ignore' on that test for now, since it works for me and is worth having.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove test
Still cannot reproduce the error and it fails in the CI.
Removing it now.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-04-26 14:31:26 +00:00
tgmichel
5eb2e3292d
Add chain-info Subcommand ( #11250 )
...
* Add `blockchain-info` Subcommand
* Update comment
* Cleanup
* Cleanup
* Use `sync_run`
* Use `sc_client_db` utility fns instead service backend
* Use service `Backend` builder
* Impl `From<sp_blockchain::Info>`
* Rename to `chain-info`
* fmt
* Copyright year
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Expose `DatabaseParams`
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-04-25 21:07:26 +02:00
Oliver Tale-Yazdi
362dc50940
Add benchmark machine placeholder ( #11198 )
...
* Move new_rng to shared code
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add bechmark machine command
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use sc-sysinfo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add --no-hardware-benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Lockfile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Do not create components if not needed
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Revert "Add --no-hardware-benchmarks"
This reverts commit d4ee98222bf1a5ea62ac60dd7d5c62070e2d7f70.
* Fix tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update Cargo deps
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Move sr255119::verify bench to sc-sysinfo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Move sr255119::verify bench to sc-sysinfo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Switch benchmarks to return f64
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Hide command until completed
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use concrete rand implementation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Put clobber into a function
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add comment
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update cargo to match polkadot
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove doc that does not format in the console
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Limit benchmark by time
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add ExecutionLimit and make function infallible
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-04-15 12:09:16 +00:00
Davide Galassi
9090f0d2a2
Remove useless trait bound and move instructions ( #11193 )
...
* Remove useless trait bound and `move` instructions
* cargo fmt
2022-04-09 12:08:46 +00:00
Oliver Tale-Yazdi
a7261180ee
Sub-commands for benchmark ( #11164 )
...
* Restructure benchmark commands
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add benchmark block test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fixup imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Extend error message
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Apply suggestions from code review
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add commands to node-template
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
2022-04-07 19:33:11 +00:00
Stephen Shelton
ca1261ee21
Apply WeightToFeePolynomials to pallet_transaction_payment's length fee ( #10785 )
...
* Apply WeightToFeePolynomials to length fee
* Remove TransactionByteFee
* Add test cases for ConstantModifierFee
* Restore import
* Use pallet::constant_name
* Remove irrelevant TODO comment
* Update frame/support/src/weights.rs
* Update frame/transaction-payment/src/lib.rs
* Update frame/transaction-payment/src/lib.rs
* Update frame/transaction-payment/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* s/ConstantModifierFee/ConstantMultiplier/
* Impl LengthToFee for test configs
* fmt
* Remove unused import
* Impl WeightToFeePolynomial for byte fee in ExtBuilder
* Remove unused import
* fix doc
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-04-07 11:24:59 +00:00
Davide Galassi
2bdebbcb00
Grandpa revert procedure ( #11162 )
...
* Grandpa revert procedure
* Trigger ci pipeline
* Test rename
* Update client/finality-grandpa/src/authorities.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2022-04-06 16:23:57 +02:00
Davide Galassi
c534e00ffc
BABE's revert procedure ( #11022 )
...
* First rough draft for BABE revert
* Proper babe revert test
* Cleanup
* Test trivial cleanup
* Fix to make clippy happy
* Check polkadot companion
* Check cumulus companion
* Remove babe's blocks weight on revert
* Handle "empty" blockchain edge case
* Run companions
* Simplify the filter predicate
* Saturating sub is not required
* Run pipeline
* Run pipeline again...
2022-03-24 08:51:55 +00:00
Bastian Köcher
42484508d7
Update clap to the latest version ( #11017 )
...
* Update clap to the latest version
Besides that it also removes some `structopt` leftovers from some docs.
* Fix compile errors
* More fixes
2022-03-12 14:31:37 +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
omadoyeabraham
05877df724
Integrate try-runtime into substrate node template ( #10909 )
...
* [10892-integrate-try-runtime-into-node-template] - Integrated try-runtime into node template
* [10892-integrate-try-runtime-into-node-template] Added match arms for try-runtime in command.rs
* [10892-integrate-try-runtime-into-node-template] Added match arms for try-runtime in command.rs
* Added feature flag for try-runtime in node-template/node and enabled try-runtime for node-template/runtime
* Added missing type annotations for try-runtime SubCommand in node-template
* Added missing type annotations for try-runtime SubCommand in node-template
* Implemented frame_try_runtime::TryRuntime<Block> for the node-template Runtime
2022-02-28 09:47:04 +00: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
Shawn Tabrizi
bd261d57c4
--dev implies --tmp ( #10828 )
2022-02-09 08:37:43 +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
Dan Shields
2b9e3a73f6
Update Node Template ( #10710 )
...
* update node template from downsteam
template version = 4.0.0-dev
rust setup updated
* Update bin/node-template/runtime/Cargo.toml
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Review Rust setup README
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Sacha Lansky <sacha@parity.io >
2022-01-26 22:47:17 +00:00
Alexander Popiak
e6672ee2d9
add CheckNonZeroSender in node-template-runtime ( #10735 )
2022-01-26 12:12:20 +01:00
Qinxuan Chen
e327b734bc
use clap3 instead of structopt ( #10632 )
...
* use clap3 instead of structopt
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* format
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* update ss58-registry and revert some nits
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* Fix clippy and doc
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* update clap to 3.0.7
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* Apply review suggestions
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* remove useless option long name
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* cargo fmt
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-01-24 16:28:46 +00: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
Oliver Tale-Yazdi
c8c46fea96
Improve usability of add+list_benchmark! ( #10592 )
...
* Improve usability of add_benchmark and list_benchmark.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* node-template: use new define_benchmarks syntax
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* make CI happy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* remove old imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fix TryBuild tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Revert "fix TryBuild tests"
This reverts commit 82ea52fd25c0ef5efa46669217694835a7404d4e.
* review: remove blank lines
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-01-19 15:31:14 +00:00
Adrian Catangiu
c1865988df
Name changes for GrandPa and Beefy notifications protocols ( #10463 )
...
* grandpa: update notif protocol name
* grandpa: add chain id prefix to protocol name
* grandpa: beautify protocol name handling
* grandpa: prepend genesis hash to protocol name
* chain-spec: add optional 'fork_id'
'fork_id' is used to uniquely identify forks of the same chain/network
'ChainSpec' trait provides default 'None' implementation, meaning this
chain hasn't been forked.
* grandpa: protocol_name mod instead of struct
* beefy: add genesis hash prefix to protocol name
* chainspec: add fork_id
* grandpa: simplify protocol name
* grandpa: contain protocol name building logic
* beefy: contain protocol name building logic
* grandpa: fix tests
* fix merge damage
* fix docs reference visibility
Signed-off-by: acatangiu <adrian@parity.io >
* Update client/finality-grandpa/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/finality-grandpa/src/communication/mod.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/beefy/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/beefy/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* avoid using hash default, even for protocol names
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2022-01-05 17:01:44 +00:00
Squirrel
3dd32d5255
Make clippy _a little_ more annoying ( #10570 )
...
* Clippy: +complexity
* Update client/cli/src/arg_enums.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/inspect/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/keystore/src/testing.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/elections/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update primitives/npos-elections/fuzzer/src/reduce.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Incorporating feedback
* No need for Ok
* Additional
* Needed slice
* Wigy's suggestions on less derefs
* fix count
* reverting changes brought in by option_map_unit_fn
* add --all-targets
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-01-05 14:35:30 +00:00
Alejandro Martinez Andres
8a4fb36563
node-template README persistent db ( #10558 )
2021-12-30 19:32:59 +01:00
cheme
4c651637f2
Inner hashing of value in state trie (runtime versioning). ( #9732 )
...
* starting
* Updated from other branch.
* setting flag
* flag in storage struct
* fix flagging to access and insert.
* added todo to fix
* also missing serialize meta to storage proof
* extract meta.
* Isolate old trie layout.
* failing test that requires storing in meta when old hash scheme is used.
* old hash compatibility
* Db migrate.
* runing tests with both states when interesting.
* fix chain spec test with serde default.
* export state (missing trie function).
* Pending using new branch, lacking genericity on layout resolution.
* extract and set global meta
* Update to branch 4
* fix iterator with root flag (no longer insert node).
* fix trie root hashing of root
* complete basic backend.
* Remove old_hash meta from proof that do not use inner_hashing.
* fix trie test for empty (force layout on empty deltas).
* Root update fix.
* debug on meta
* Use trie key iteration that do not include value in proofs.
* switch default test ext to use inner hash.
* small integration test, and fix tx cache mgmt in ext.
test failing
* Proof scenario at state-machine level.
* trace for db upgrade
* try different param
* act more like iter_from.
* Bigger batches.
* Update trie dependency.
* drafting codec changes and refact
* before removing unused branch no value alt hashing.
more work todo rename all flag var to alt_hash, and remove extrinsic
replace by storage query at every storage_root call.
* alt hashing only for branch with value.
* fix trie tests
* Hash of value include the encoded size.
* removing fields(broken)
* fix trie_stream to also include value length in inner hash.
* triedbmut only using alt type if inner hashing.
* trie_stream to also only use alt hashing type when actually alt hashing.
* Refactor meta state, logic should work with change of trie treshold.
* Remove NoMeta variant.
* Remove state_hashed trigger specific functions.
* pending switching to using threshold, new storage root api does not
make much sense.
* refactoring to use state from backend (not possible payload changes).
* Applying from previous state
* Remove default from storage, genesis need a special build.
* rem empty space
* Catch problem: when using triedb with default: we should not revert
nodes: otherwhise thing as trie codec cannot decode-encode without
changing state.
* fix compilation
* Right logic to avoid switch on reencode when default layout.
* Clean up some todos
* remove trie meta from root upstream
* update upstream and fix benches.
* split some long lines.
* UPdate trie crate to work with new design.
* Finish update to refactored upstream.
* update to latest triedb changes.
* Clean up.
* fix executor test.
* rust fmt from master.
* rust format.
* rustfmt
* fix
* start host function driven versioning
* update state-machine part
* still need access to state version from runtime
* state hash in mem: wrong
* direction likely correct, but passing call to code exec for genesis
init seem awkward.
* state version serialize in runtime, wrong approach, just initialize it
with no threshold for core api < 4 seems more proper.
* stateversion from runtime version (core api >= 4).
* update trie, fix tests
* unused import
* clean some TODOs
* Require RuntimeVersionOf for executor
* use RuntimeVersionOf to resolve genesis state version.
* update runtime version test
* fix state-machine tests
* TODO
* Use runtime version from storage wasm with fast sync.
* rustfmt
* fmt
* fix test
* revert useless changes.
* clean some unused changes
* fmt
* removing useless trait function.
* remove remaining reference to state_hash
* fix some imports
* Follow chain state version management.
* trie update, fix and constant threshold for trie layouts.
* update deps
* Update to latest trie pr changes.
* fix benches
* Verify proof requires right layout.
* update trie_root
* Update trie deps to latest
* Update to latest trie versioning
* Removing patch
* update lock
* extrinsic for sc-service-test using layout v0.
* Adding RuntimeVersionOf to CallExecutor works.
* fmt
* error when resolving version and no wasm in storage.
* use existing utils to instantiate runtime code.
* Patch to delay runtime switch.
* Revert "Patch to delay runtime switch."
This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
* useless closure
* remove remaining state_hash variables.
* Remove outdated comment
* useless inner hash
* fmt
* fmt and opt-in feature to apply state change.
* feature gate core version, use new test feature for node and test node
* Use a 'State' api version instead of Core one.
* fix merge of test function
* use blake macro.
* Fix state api (require declaring the api in runtime).
* Opt out feature, fix macro for io to select a given version
instead of latest.
* run test nodes on new state.
* fix
* Apply review change (docs and error).
* fmt
* use explicit runtime_interface in doc test
* fix ui test
* fix doc test
* fmt
* use default for path and specname when resolving version.
* small review related changes.
* doc value size requirement.
* rename old_state feature
* Remove macro changes
* feature rename
* state version as host function parameter
* remove flag for client api
* fix tests
* switch storage chain proof to V1
* host functions, pass by state version enum
* use WrappedRuntimeCode
* start
* state_version in runtime version
* rust fmt
* Update storage proof of max size.
* fix runtime version rpc test
* right intent of convert from compat
* fix doc test
* fix doc test
* split proof
* decode without replay, and remove some reexports.
* Decode with compatibility by default.
* switch state_version to u8. And remove RuntimeVersionBasis.
* test
* use api when reading embedded version
* fix decode with apis
* extract core version instead
* test fix
* unused import
* review changes.
Co-authored-by: kianenigma <kian@parity.io >
2021-12-24 08:54:07 +00:00
dharjeezy
1b0be8ae06
Replace parameter_types with ConstU32 &c. ( #10402 )
...
* remove parameter types and use const type
* remove parameter types and use const type
* Delete {
* Delete count,
* refractor for beefy, benchmarking, child bounties, and collective pallets
* refractor for pallet contracts
* refractor for elections
* refractor for more pallets
* fix CI issues
* fix CI issues
* fix CI issues
* fix CI issues
* remove warning to fix CI issue
* remove warning to fix CI issue
refractor for pallet preimage
* remove warning to fix CI issue
refractor for pallet proxy
* remove warning to fix CI issue
refractor for pallet recovery
refractor for pallet randomness-collective-flip
* remove warning to fix CI issue
refractor for pallet scored-pool
refractor for pallet scheduler
refractor for pallet session
* remove warning to fix CI issue
refractor for pallet society, support, system, timestamp, tips
* remove warning to fix CI issue
refractor for pallet transaction_payment, transaction_storage, treasury, uniques, utility
* remove warning to fix CI issue
* cargo +nightly fmt
* CI fix
* more param refractor on beefy-mmr
* refractor for beefy
* Update frame/babe/src/mock.rs
* Update frame/babe/src/mock.rs
* Update frame/bounties/src/tests.rs
* Update frame/tips/src/tests.rs
* Delete mock.rs
* Update frame/examples/basic/src/tests.rs
* Apply suggestions from code review
* Update frame/im-online/src/mock.rs
* Update frame/im-online/src/mock.rs
* Update frame/offences/benchmarking/src/mock.rs
* Update frame/session/benchmarking/src/mock.rs
* Update frame/support/test/tests/pallet_compatibility.rs
* Update frame/support/test/tests/pallet_compatibility_instance.rs
* Update frame/treasury/src/tests.rs
* Update test-utils/runtime/src/lib.rs
* some cleanup
* fmt
* remove unused
Co-authored-by: Damilare <dakinlose@teamapt.com >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-12-16 03:06:11 +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
Gavin Wood
1e24e45ea1
Remove Default bound for AccountId ( #10403 )
...
* Remove Default for AccountId
* More removals of default
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* More work
* More work
* Remove old code
* More work
* pallet-asset-tx-payment
* tips
* sc-consensus-babe
* sc-finality-grandpa
* sc-consensus-babe-rpc
* sc-cli
* make npos crates accept non-default account (#10420 )
* minimal changes to make npos pallets all work
* make this pesky reduce.rs a bit cleaner
* more work
* more work
* Tests build
* Fix imonline tests
* Formatting
* Fixes
* Fixes
* Fix bench
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Formatting
* Fixes
* Formatting
* Fixes
* Formatting
* Fixes
* Formatting
* Fixes
* Formatting
* Update client/keystore/src/local.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/finality-grandpa/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/keystore/src/local.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/keystore/src/local.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/staking/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/staking/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Formatting
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: kianenigma <kian@parity.io >
2021-12-13 15:03:59 +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
Éloïs
3acd335a8d
Make wasm runtime cache size configurable ( #10177 )
...
* Make wasm runtime cache size configurable
* apply review comments
* remove VersionedRuntimeValue
* fix compilation
* VersionedRuntime: replace clone by Arc
* fmt
* fix warnings
* fix tests compilation
* fmt
2021-12-09 16:10:16 +01:00
Gavin Wood
3dd8f83a3a
Insufficient asset quota and deposits ( #10382 )
...
* Allow asset accounts to exist by deposit
* Place limit on consumers (and therefore freebie asset accounts)
* Maximum number of assets
* Fixes
* Fixes
* Formatting
* Docs
* Formatting
* Destroyed assets are properly tidied
* Update frame/assets/src/types.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Docs
* Docs
* Formatting
* Docs
* Docs
* Fixes
* Fixes
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-12-09 13:22:54 +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
zjb0807
db37fb04e8
use double quotes instead of single quotes & upgrade 2021 ( #10398 )
2021-12-01 05:37:30 +00:00
Guillaume Thiolliere
db28ba9dfd
Fix order of hook execution ( #10043 )
...
* fix order
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* format
* more accurate description
* format
* better explicit types
* fix tests
* address feedback
* add a type to ease non breaking implementation
* add comment about constraint
* fix test
* add test for generated types
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-12-01 00:59:09 +00:00
zjb0807
b5ed64684d
Add runtime-benchmarks for frame-benchmarking ( #10324 )
...
* update frame/benchmarking/src/baseline.rs
* add runtime-benchmarks feature
* add runtime-benchmarks for frame-benchmarking
* update frame-benchmarking/runtime-benchmarks
* trigger GitHub actions
2021-11-30 14:15:52 +01:00
Qinxuan Chen
69478639b3
Migrate all doc to new pallet macro ( #10187 )
...
* Migrate all doc to new pallet macro
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* Fix indent
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* Fix format
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2021-11-18 22:08:17 +00:00
dependabot[bot]
bae12f41b8
Bump structopt from 0.3.23 to 0.3.25 ( #10253 )
...
* Bump structopt from 0.3.23 to 0.3.25
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.23 to 0.3.25.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.23...v0.3.25 )
---
updated-dependencies:
- dependency-name: structopt
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* cargo fmt
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-11-13 02:35:07 +00:00
dependabot[bot]
423cde8ad0
Bump hex-literal from 0.3.3 to 0.3.4 ( #10246 )
...
Bumps [hex-literal](https://github.com/RustCrypto/utils ) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/RustCrypto/utils/releases )
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.3...hex-literal-v0.3.4 )
---
updated-dependencies:
- dependency-name: hex-literal
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-13 00:32:44 +00: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
sandreim
fdb3c64243
Add group name in task metrics ( #10196 )
...
* SpawnNamed: add new trait methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* Implement new methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* cargo fmt
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* SpawnNamed: add new trait methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* Implement new methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* cargo fmt
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* New approach - spaw() group param
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update traits: SpawnNamed and SpawnNamed
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update TaskManager tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update test TaskExecutor
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Fix typo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* grunt work: fix spawn() calls
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* remove old code
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo fmt - the right version
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Implement review feedback
- use Option group name in SpawnNamed methods
- switch to kebab case
- implement default group name
- add group name to some tasks
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
2021-11-11 17:15:09 +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
acc835acd3
Update node-template construct_runtime! syntax ( #10155 )
...
* update `construct_runtime!` syntax
* fix build
2021-11-04 13:37:26 +00:00
Shawn Tabrizi
2d556c4429
Add Baseline FRAME Benchmarks ( #9691 )
...
* create and add baseline
* fix import
* try a different name
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* increase repeats
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update baseline.rs
* Update baseline.rs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* improve hash benchmark
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Parity Bot <admin@parity.io >
2021-10-30 13:02:09 +00:00
Squirrel
744bc44de2
Removal of light client from substrate ( #9684 )
...
* Removal of light client from substrate
* add missing import
* These tests relate to there being light and non light clients.
* removing lightnodes from test
* cargo fmt
* not needed
* LightDataChecker not needed any longer
* cargo fmt
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* cargo fmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-30 12:38:27 +00:00
Dan Shields
aad0682c45
Move template to homepage = " https://substrate.io/ " , correct links ( #10006 )
...
* move to https://docs.substrate.io/
* cargo to https://docs.substrate.io/ homepage
* Update bin/node-template/pallets/template/src/lib.rs
Co-authored-by: Squirrel <gilescope@gmail.com >
* homepage = "https://docs.substrate.io/ "
Co-authored-by: Squirrel <gilescope@gmail.com >
2021-10-13 12:55:51 -06:00
Bastian Köcher
8f8b08871f
node-template: Do not provide benchmarking host functions by default ( #10005 )
2021-10-12 04:12:29 +00:00