This PR updates:
- trie-db from 0.27.1 to 0.28.0
- trie-bench from 0.37.0 to 0.38.0 (deb-dependency)
While at it, also adapts the recorder to take into account the newly
added `TrieAccess::InlineValue`.
Needed by:
- https://github.com/paritytech/polkadot-sdk/pull/1153
@paritytech/subxt-team
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
* allow spinning up dev node in background without binary
* improve comments
* restore rust-toolchain
* remove rust-toolchain
* tweak start_node_without_binary api
* Update test-utils/cli/src/lib.rs
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
* address commends
* use &str
* update example
* update comment
* update docs
* Revert "update docs"
This reverts commit e18677f081247dd9672f64ea34d2c651daf401c2.
* use node-cli instead of node-template
* fix feature
* fix feature
* fix features
---------
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
* Fix std, runtime-benchmarks and try-runtime features
zepter lint propagate-feature --feature try-runtime --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="try-runtime:frame-try-runtime"
zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="runtime-benchmarks:frame-benchmarking"
zepter lint propagate-feature --feature std --left-side-feature-missing=ignore --workspace --fix
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add propagate feature CI check
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test CI by adding an error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use --locked
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add help msg
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "Test CI by adding an error"
This reverts commit cf4ff6cc0632269b0a109e547686e5e3314b02de.
* Test CI by adding an error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* No newline in help msg
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "Test CI by adding an error"
This reverts commit 5daa06ada8e01f5bebafb9d1c76804dd79bc1006.
* Test CI by adding an error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "Test CI by adding an error"
This reverts commit ca15de5729507a564f140a10ec2e87b19516ec4c.
* Fix msg
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert back to master
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Re-do with Zepter v0.7.4
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update Zepter to 0.7.4
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Disable rococo try-runtime check
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <git@kchr.de>
* More review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
* add doc-only substrate entry point crate
* document a few more things
* add more
* fix width
* Update primitives/io/src/lib.rs
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
* add link
* update cargo toml file
* fix sp-io docs
* improve
* small update
* add license
* satisfy license job
* add a line about FRAME
* CI happy now
* make CI more happy
* Let the check run for the whole workspace
* Forward the substrate node again as default run
* update binary names
* upate verison test
* Fix fix fix
* Fix
* rename to substrate-node in more places
* Revert "rename to substrate-node in more places"
This reverts commit 66960f84a1b6f1f7c638b4040e28e9fbabb8adf5.
* fix
* Fix build pipeline
* Fix properly plus add some docs
---------
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* wip
* remove index in lieu of nonce
* wip
* remove accountnonce in lieu of nonce
* add minor improvement
* rebase and merge conflicts
* Start
* More work!
* Moar
* More changes
* More fixes
* More worrk
* More fixes
* More fixes to make it compile
* Adds `NoOffchainStorage`
* Pass the extensions
* Small basti making small progress
* Fix merge errors and remove `ExecutionContext`
* Move registration of `ReadRuntimeVersionExt` to `ExecutionExtension`
Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to
`ExecutionExtension` which provides the default extensions.
* Fix compilation
* Register the global extensions inside runtime api instance
* Fixes
* Fix `generate_initial_session_keys` by passing the keystore extension
* Fix the grandpa tests
* Fix more tests
* Fix more tests
* Don't set any heap pages if there isn't an override
* Fix small fallout
* FMT
* Fix tests
* More tests
* Offchain worker custom extensions
* More fixes
* Make offchain tx pool creation reusable
Introduces an `OffchainTransactionPoolFactory` for creating offchain transactions pools that can be
registered in the runtime externalities context. This factory will be required for a later pr to
make the creation of offchain transaction pools easier.
* Fixes
* Fixes
* Set offchain transaction pool in BABE before using it in the runtime
* Add the `offchain_tx_pool` to Grandpa as well
* Fix the nodes
* Print some error when using the old warnings
* Fix merge issues
* Fix compilation
* Rename `babe_link`
* Rename to `offchain_tx_pool_factory`
* Cleanup
* FMT
* Fix benchmark name
* Fix `try-runtime`
* Remove `--execution` CLI args
* Make clippy happy
* Forward bls functions
* Fix docs
* Update UI tests
* Update client/api/src/execution_extensions.rs
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Koute <koute@users.noreply.github.com>
* Update client/cli/src/params/import_params.rs
Co-authored-by: Koute <koute@users.noreply.github.com>
* Update client/api/src/execution_extensions.rs
Co-authored-by: Koute <koute@users.noreply.github.com>
* Pass the offchain storage to the MMR RPC
* Update client/api/src/execution_extensions.rs
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* Review comments
* Fixes
---------
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* sp-api: Support nested transactions
Adds support for nested transactions in `sp-api` by using `execute_in_transaction`. This was working
until a recent refactor, but this was actually not intended. However, supporting nested transactions
is a worthwhile feature to have. So, this pr "brings it back" and adds a test to ensure it will not break.
* Make clippy happy
* Assert that the runtime api type is not unwind safe
* Count number of transactions
In the cases where a reorg happens we might receive notifications
for different blocks at the same level, so instead of the chain having
count new blocks it has less and that will break the tests which use this
function.
So, use the block number to identify that `count` blocks have been built in the
chain.
Examples where this issue was hit:
https://github.com/paritytech/polkadot/issues/7267
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
* frame: GenesisBuild::build allowed in no_std
i`GenesisBuild::build` function will be required for no_std in no native
runtime world.
`GenesisBuild::build` macro generated function allows to build the runtime
GenesisConfig assembled from all pallets' GenesisConfigs.
* fixes
* GenesisBuild::build avaiable in no-std
- #[cfg(feature = "std")] is not longer added to GenesisBuild implementation.
* system: hash69 available for no-std
* elections-phragmen: panic message fixed for no_std
* frame::suport: doc updated
* test-runtime: default for GenesisConfig
* frame::test-pallet: serde/std added to std feature deps
* Cargo.toml: deps sorted
* Cargo.lock update
cargo update -p frame-support-test-pallet -p frame-support-test
* frame ui tests: cleanup
---------
Co-authored-by: parity-processbot <>
* HoldReason: Improve usage
`HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.
* Update frame/nis/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Review comment
* Fixes
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This is required to make different unsigned extrinsics resolve to different transactions in the tx
pool by having `provides` set to theh hash of the call.
* substrate-test-runtime migrated to pure-frame based
* test block builder: helpers added
* simple renaming
* basic_authorship test adjusted
* block_building storage_proof test adjusted
* babe: tests: should_panic expected added
* babe: tests adjusted
ConsensusLog::NextEpochData is now added by pallet_babe as
pallet_babe::SameAuthoritiesForever trigger is used in runtime config.
* beefy: tests adjusted
test-substrate-runtime is now using frame::executive to finalize the
block. during finalization the digests stored during block execution are
checked against header digests:
https://github.com/paritytech/substrate/blob/91bb2d29ca905599098a5b35eaf24867c4fbd60a/frame/executive/src/lib.rs#L585-L591
It makes impossible to directly manipulate header's digets, w/o
depositing logs into system pallet storage `Digest<T: Config>`.
Instead of this dedicated extrinsic allowing to store logs items
(MmrRoot / AuthoritiesChange) is used.
* grandpa: tests adjusted
test-substrate-runtime is now using frame::executive to finalize the
block. during finalization the digest logs stored during block execution are
checked against header digest logs:
https://github.com/paritytech/substrate/blob/91bb2d29ca905599098a5b35eaf24867c4fbd60a/frame/executive/src/lib.rs#L585-L591
It makes impossible to directly manipulate header's digets, w/o
depositing logs into system pallet storage `Digest<T: Config>`.
Instead of this dedicated extrinsic allowing to store logs items
(ScheduledChange / ForcedChange and DigestItem::Other) is used.
* network:bitswap: test adjusted
The size of unchecked extrinsic was increased. The pattern used in test will
be placed at the end of scale-encoded buffer.
* runtime apis versions adjusted
* storage keys used in runtime adjusted
* wasm vs native tests removed
* rpc tests: adjusted
Transfer transaction processing was slightly improved, test was
adjusted.
* tests: sizes adjusted
Runtime extrinsic size was increased. Size of data read during block
execution was also increased due to usage of new pallets in runtime.
Sizes were adjusted in tests.
* cargo.lock update
cargo update -p substrate-test-runtime -p substrate-test-runtime-client
* warnings fixed
* builders cleanup: includes / std
* extrinsic validation cleanup
* txpool: benches performance fixed
* fmt
* spelling
* Apply suggestions from code review
Co-authored-by: Davide Galassi <davxy@datawok.net>
* Apply code review suggestions
* Apply code review suggestions
* get rid of 1063 const
* renaming: UncheckedExtrinsic -> Extrinsic
* test-utils-runtime: further step to pure-frame
* basic-authorship: tests OK
* CheckSubstrateCall added + tests fixes
* test::Transfer call removed
* priority / propagate / no sudo+root-testing
* fixing warnings + format
* cleanup: build2/nonce + format
* final tests fixes
all tests are passing
* logs/comments removal
* should_not_accept_old_signatures test removed
* make txpool benches work again
* Cargo.lock reset
* format
* sudo hack removed
* txpool benches fix+cleanup
* .gitignore reverted
* rebase fixing + unsigned cleanup
* Cargo.toml/Cargo.lock cleanup
* force-debug feature removed
* mmr tests fixed
* make cargo-clippy happy
* network sync test uses unsigned extrinsic
* cleanup
* ".git/.scripts/commands/fmt/fmt.sh"
* push_storage_change signed call remove
* GenesisConfig cleanup
* fix
* fix
* GenesisConfig simplified
* storage_keys_works: reworked
* storage_keys_works: expected keys in vec
* storage keys list moved to substrate-test-runtime
* substrate-test: some sanity tests + GenesisConfigBuilder rework
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <git@kchr.de>
* Apply suggestions from code review
* Review suggestions
* fix
* fix
* beefy: generate_blocks_and_sync block_num sync with actaul value
* Apply suggestions from code review
Co-authored-by: Davide Galassi <davxy@datawok.net>
* Update test-utils/runtime/src/genesismap.rs
Co-authored-by: Davide Galassi <davxy@datawok.net>
* cargo update -p sc-rpc -p sc-transaction-pool
* Review suggestions
* fix
* doc added
* slot_duration adjusted for Babe::slot_duration
* small doc fixes
* array_bytes::hex used instead of hex
* tiny -> medium name fix
* Apply suggestions from code review
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* TransferData::try_from_unchecked_extrinsic -> try_from
* Update Cargo.lock
---------
Co-authored-by: parity-processbot <>
Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* globally upgrade quote to latest 1.0.x (1.0.26)
* globally upgrade syn to final 1.0.x version (1.0.109)
* globally upgrade proc-macro2 to 1.0.56
* upgrade to syn v2.0.13 and fix everything except NestedMeta
* fix parse nested metadata code in decl_runtime_apis.rs
* Port more stuff to syn 2.0
* Make the rest compile
* Ignore error
* update to syn 2.0.14
---------
Co-authored-by: Bastian Köcher <info@kchr.de>
* TrieRecorder: Start adding support for transactions
* Adds `transactions` functions and some test
* More tests
* Docs
* Ensure that we rollback failed transactions in the storage proof
* FMT
* Update primitives/trie/src/recorder.rs
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
* Review comments
* Update primitives/trie/src/recorder.rs
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* ".git/.scripts/commands/fmt/fmt.sh"
* For the holy clippy!
* Update primitives/trie/src/recorder.rs
Co-authored-by: Anton <anton.kalyaev@gmail.com>
---------
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: command-bot <>
Co-authored-by: Anton <anton.kalyaev@gmail.com>
This removes the deprecated batch verification. This was actually never really activated.
Nevertheless, we need to keep the host functions around to support old runtimes which may import
these host functions. However, we do not give access to these functions anymore. This means that any new
runtime can not call them anymore. The host function implementations we keep will not do batch verification and will
instead fall back to the always existing option of directly verifying the passed signature.
`finish_batch_verification` will return the combined result of all the batch verify calls.
This removes the `TaskExecutorExt` which only existed to support the batch verification. So, any
code that used this extension can just remove the registration of them. It also removes
`SignatureBatching` that was used by `frame-executive` to control the batch verification.
However, there wasn't any `Verify` implementation that called the batch verification functions.
* impl_runtime_apis: Generate getters for `metadata_at` functions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* runtime: Implement new `Metadata` runtime trait
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* runtime: Move `metadata_at` functions to construct_runtime macro
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* contruct_runtime: Use `OpaqueMetadata` from hidden imports
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Add tests for the new API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Adjust metdata naming
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Expose `metadata-v14` feature flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Expose metadata only under feature flags
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Expose v14 metadata by default
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Expose metadata feature for testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Test metadata under different feature flags
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update primitives/api/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* client/tests: Adjust testing to reflect trait Metadata change
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata-ir: Add intermediate representation types for metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata-ir: Convert metadata to V14
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata-ir: Add API to convert metadata to multiple versions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata-ir: Expose V14 under feature flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Adjust to metadata IR
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: More adjustments
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Guard v14 details under feature flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* CI: Ensure `quick-benchmarks` uses `metadata-v14`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Use `metadata-v14` for benchmarks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust cargo fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* kitchensink-runtime: Add feature flag for `metadata-v14`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support/test: Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support/test: Check crates locally
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Activate metadata-v14 for pallets
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Remove metadata-v14 feature flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata_ir: Move `api.rs` to `mod.rs`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Handle latest metadata conversion via IR
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Add constant for metadata version 14
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support/test: Fix merge conflict
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame/support/Cargo.toml
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update frame/support/src/metadata_ir/mod.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update frame/support/test/Cargo.toml
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* frame/metadata: Collect pallet documentation for MetadataIR
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Check pallet documentation is propagated to MetadataIR
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Improve documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Bastian Köcher <git@kchr.de>