Jegor Sidorenko
c4e880c155
Refactor the asset-conversion-tx-payment pallet ( #14558 )
...
* Code refactoring
* Fix imports
* Typo
* Update frame/asset-conversion/src/types.rs
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Sync docs
---------
Co-authored-by: parity-processbot <>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
2023-07-13 13:44:05 +00:00
gupnik
5e7b27e98c
Moves Block to frame_system instead of construct_runtime and removes Header and BlockNumber ( #14437 )
...
* Initial setup
* Adds node block
* Uses UncheckedExtrinsic and removes Where section
* Updates frame_system to use Block
* Adds deprecation warning
* Fixes pallet-timestamp
* Removes Header and BlockNumber
* Addresses review comments
* Addresses review comments
* Adds comment about compiler bug
* Removes where clause
* Refactors code
* Fixes errors in cargo check
* Fixes errors in cargo check
* Fixes warnings in cargo check
* Formatting
* Fixes construct_runtime tests
* Uses import instead of full path for BlockNumber
* Uses import instead of full path for Header
* Formatting
* Fixes construct_runtime tests
* Fixes imports in benchmarks
* Formatting
* Fixes construct_runtime tests
* Formatting
* Minor updates
* Fixes construct_runtime ui tests
* Fixes construct_runtime ui tests with 1.70
* Fixes docs
* Fixes docs
* Adds u128 mock block type
* Fixes split example
* fixes for cumulus
* ".git/.scripts/commands/fmt/fmt.sh"
* Updates new tests
* Fixes fully-qualified path in few places
* Formatting
* Update frame/examples/default-config/src/lib.rs
Co-authored-by: Juan <juangirini@gmail.com >
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Juan <juangirini@gmail.com >
* ".git/.scripts/commands/fmt/fmt.sh"
* Addresses some review comments
* Fixes build
* ".git/.scripts/commands/fmt/fmt.sh"
* Update frame/democracy/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/democracy/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Addresses review comments
* Updates trait bounds
* Minor fix
* ".git/.scripts/commands/fmt/fmt.sh"
* Removes unnecessary bound
* ".git/.scripts/commands/fmt/fmt.sh"
* Updates test
* Fixes build
* Adds a bound for header
* ".git/.scripts/commands/fmt/fmt.sh"
* Removes where block
* Minor fix
* Minor fix
* Fixes tests
* ".git/.scripts/commands/update-ui/update-ui.sh" 1.70
* Updates test
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Updates doc
* Updates doc
---------
Co-authored-by: command-bot <>
Co-authored-by: Juan <juangirini@gmail.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-07-13 12:01:34 +00:00
Liam Aharon
e42a669c50
Fix Society v2 migration ( #14421 )
...
* fix society v2 migration
* Update frame/society/src/migrations.rs
* Update frame/society/src/migrations.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Update frame/society/src/migrations.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* update for versioned upgrade
* fix society v2 migration
* remove references to members being sorted from commnets
* fix type
* fix can_migrate check
* add sanity log
* fix sanity check
* kick ci
* kick ci
* run tests with --experimental flag
* versioned migration cleanup
* revert pipeline change
* use defensive!
* semicolons
* defensive and doc comment
* address pr comment
* feature gate the versioned migration
* defensive_unwrap_or
* fix test
* fix doc comment
* change defensive to a log warning
* remove can_migrate anti-pattern
* Update frame/society/Cargo.toml
Co-authored-by: Bastian Köcher <git@kchr.de >
* add experimental feature warning to doc comment
* update doc comment
* bump ci
* kick ci
* kick ci
* kick ci
---------
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-07-13 10:08:45 +00:00
Sam Johnson
3ee352b109
update to docify 0.2.0 / crate-relative embed paths ( #14570 )
2023-07-13 09:05:04 +00:00
Toufeeq Pasha
0457c1a9e3
[pallet_collective] Enforce prime is a valid member of collective in set_members extrinsic ( #14354 )
...
* Updated set_members extrinsic to enforce prime is valid member of collective
* Added additional tests for set_members extrinsic
* applied the code review suggestions
2023-07-12 16:01:08 +00:00
Branislav Kontur
d3c42b2e8d
Fix refund benchmark for pallet_assets ( #14561 )
...
* Fix refund benchmark for pallet_assets
* Update frame/assets/src/benchmarking.rs
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Re-added docs
* Another "fix"
---------
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
Co-authored-by: parity-processbot <>
2023-07-12 13:41:46 +00:00
Nuke
474b773a6c
Update subkey README.md ( #14552 )
...
* Update `subkey` README.md
getsubstrate.io is not maintained.
Perhaps other things should be updated here in this PR too - open to suggestions!
* Update README.md
2023-07-12 11:48:21 +00:00
Michal Kucharczyk
87d41d0a89
GenesisBuild<T,I> deprecated. BuildGenesisConfig added. (#14306 )
...
* frame::support: GenesisConfig types for Runtime enabled
* frame::support: macro generating GenesisBuild::build for RuntimeGenesisConfig
* frame: ambiguity BuildStorage vs GenesisBuild fixed
* fix
* RuntimeGenesisBuild added
* Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
* Revert "fix"
This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
* Revert "RuntimeGenesisBuild added"
This reverts commit 3c131b618138ced29c01ab8d15d8c6410c9e128b.
* Revert "Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed""
This reverts commit 2b1ecd467231eddec69f8d328039ba48a380da3d.
* Revert "Revert "fix""
This reverts commit fd7fa629adf579d83e30e6ae9fd162637fc45e30.
* Code review suggestions
* frame: BuildGenesisConfig added, BuildGenesis deprecated
* frame: some pallets updated with BuildGenesisConfig
* constuct_runtime: support for BuildGenesisConfig
* frame::support: genesis_build macro supports BuildGenesisConfig
* frame: BuildGenesisConfig added, BuildGenesis deprecated
* Cargo.lock update
* test-runtime: fixes
* Revert "fix"
This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
* Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
* self review
* doc fixed
* ui tests fixed
* fmt
* tests fixed
* genesis_build macrto fixed for non-generic GenesisConfig
* BuildGenesisConfig constraints added
* warning fixed
* some duplication removed
* fmt
* fix
* doc tests fix
* doc fix
* cleanup: remove BuildModuleGenesisStorage
* self review comments
* fix
* Update frame/treasury/src/tests.rs
Co-authored-by: Sebastian Kunert <skunert49@gmail.com >
* Update frame/support/src/traits/hooks.rs
Co-authored-by: Sebastian Kunert <skunert49@gmail.com >
* doc fix: GenesisBuild exposed
* ".git/.scripts/commands/fmt/fmt.sh"
* frame: more serde(skip) + cleanup
* Update frame/support/src/traits/hooks.rs
Co-authored-by: Davide Galassi <davxy@datawok.net >
* frame: phantom fields moved to the end of structs
* chain-spec: Default::default cleanup
* test-runtime: phantom at the end
* merge master fixes
* fix
* fix
* fix
* fix
* fix (facepalm)
* Update frame/support/procedural/src/pallet/expand/genesis_build.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* fmt
* fix
* fix
---------
Co-authored-by: parity-processbot <>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com >
Co-authored-by: Davide Galassi <davxy@datawok.net >
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-07-12 10:22:12 +00:00
PG Herveou
49150ee583
quick updates ( #14557 )
2023-07-12 08:59:01 +00:00
PG Herveou
1818bb130e
Contracts rename v9 to v09 ( #14533 )
2023-07-12 08:33:22 +00:00
Bastian Köcher
ca5970e582
node-template: Remove accidentally added dependency ( #14553 )
...
`sc-statement-store` isn't used by the template and thus, should not appear in the `Cargo.toml`.
2023-07-11 20:55:38 +02:00
Bastian Köcher
5eb816d7a6
Removal of execution strategies ( #14387 )
...
* 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 >
2023-07-11 14:21:38 +00:00
Bastian Köcher
a2b01c061b
CI: Do not fail on junit upload failure ( #14545 )
...
* CI: Do not fail on junit upload failure
* fix yaml for test-linux-stable
---------
Co-authored-by: alvicsam <alvicsam@gmail.com >
2023-07-11 11:26:44 +02:00
Oliver Tale-Yazdi
d0215bb04f
Add missing workspace members ( #14537 )
...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-07-10 14:34:05 +00:00
Guillaume Yu Thiolliere
4674aeda07
Better handling of error in inherents logic. ( #14521 )
...
* impl
* trigger CI
* Revert "trigger CI"
This reverts commit 9426361416cb051b0507576b010efbc1a6ac65b7.
* Fix
* fix
* fix
* fix
2023-07-10 09:39:37 +02:00
Qinxuan Chen
6d2c1ed719
replace lru with schnellru ( #14539 )
2023-07-09 23:24:23 +02:00
Kian Paimani
6dd625d568
remove OnStakerSlash replace with OnStakingEvents ( #14527 )
...
* remove 'OnStakerSlash', replace with 'OnStakingEvents'
* fix other features in pallets
* small fixes
* fix docs
* fix docs
* fix docs
* Update primitives/staking/src/lib.rs
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
---------
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
2023-07-09 12:46:18 +00:00
Oliver Tale-Yazdi
53244d64bd
Fix spellcheck for benchmarking comments ( #14535 )
...
* Benchmarking spellcheck fix
Put everything that could cause spellcheck issues into backticks.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Also in templates
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet-balances
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: command-bot <>
2023-07-07 15:33:17 +00:00
PG Herveou
d3ef2badcb
contracts: Refactor instantiate with code ( #14503 )
...
* wip
* fixes
* rm comment
* join fns
* clippy
* Fix limits
* reduce diff
* fix
* fix
* fix typo
* refactor store to use self
* refactor run to take self by value
* pass tests
* rm comment
* fixes
* fix typo
* rm
* fix fmt
* clippy
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* Update frame/contracts/src/lib.rs
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com >
* Update frame/contracts/src/wasm/mod.rs
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com >
* Update frame/contracts/src/wasm/mod.rs
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com >
* PR review, rm duplicate increment_refcount
* PR review
* Update frame/contracts/src/wasm/prepare.rs
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com >
* Add test for failing storage_deposit
* fix lint
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
---------
Co-authored-by: command-bot <>
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com >
2023-07-07 13:46:16 +00:00
cuteolaf
9510ad7310
Update lib.rs ( #14528 )
2023-07-07 08:27:47 +00:00
Piotr Mikołajczyk
820949d38f
Add try-state hook to pallet aura ( #14363 )
...
* Add aura try-state hook
* Trigger checks after unit tests
2023-07-07 07:38:29 +00:00
Liam Aharon
cfe5e8a8df
run tests with --experimental flag ( #14502 )
2023-07-06 21:35:55 +00:00
Qinxuan Chen
e8e2048b88
chore: update some deps to prune duplicated deps ( #14515 )
...
* chore: update some deps to prune duplicated deps
- array-bytes: 4.1.0 => 6.1.0
- cid: 0.8.6 => 0.9.0
* fix
2023-07-06 16:46:44 +02:00
Liam Aharon
9c3ca04781
emit warn log on bad state ( #14513 )
2023-07-05 14:44:56 +00:00
Jegor Sidorenko
032aa05221
Use set_balance() instead of write_balance() in benchmark ( #14497 )
...
* Use set_balance instead of write_balance in benchmark
* Another approach
* Use BalanceOf::<T>::max_value() / 1000
* use a regular div instead of a checked one
2023-07-05 10:04:31 +00:00
Jegor Sidorenko
f5776f6897
Improve NFT locking ( #14510 )
...
* Update docs
* Prevent locking of the same NFT twice
* Validate item is not locked on burn
* Cover with tests
* chore
2023-07-05 09:17:08 +00:00
Bastian Köcher
1bf2504ebf
sc-cli: Remove SubstrateCli::native_runtime_version function ( #14511 )
...
The native runtime will be removed in the near future and thus this function will not be required
anymore.
\# Code changes
Downstream users just need to remove `native_runtime_version` from their implementation of the
`SubstrateCli` trait.
2023-07-05 07:38:06 +00:00
Sasha Gryaznov
f83fdeab53
contracts: switch from parity-wasm-based to wasmi-based module validation ( #14449 )
...
* upgrade to wasmi 0.29
* prepare cleanup
* sync ref_time w engine from the stack frame
* proc_macro: sync gas in host funcs
save: compiles, only gas pushing left to macro
WIP proc macro
proc macro: done
* clean benchmarks & schedule: w_base = w_i64const
* scale gas values btw engine and gas meter
* (re)instrumentation & code_cache removed
* remove gas() host fn, continue clean-up
save
* address review comments
* move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob
* refactor: no reftime_limit&schedule passes, no CodeStorage
* bugs fixing
* fix tests: expected deposit amount
* fix prepare::tests
* update tests and fix bugs
tests::run_out_of_gas_engine, need 2 more
save: 2 bugs with gas syncs: 1 of 2 tests done
gas_syncs_no_overcharge bug fixed, test passes!
cleaned out debug prints
second bug is not a bug
disabled_chain_extension test fix (err msg)
tests run_out_of_fuel_host, chain_extension pass
all tests pass
* update docs
* bump wasmi 0.30.0
* benchmarks updated, tests pass
* refactoring
* s/OwnerInfo/CodeInfo/g;
* migration: draft, compiles
* migration: draft, runs
* migration: draft, runs (fixing)
* deposits repaid non pro rata
* deposits repaid pro rata
* better try-runtime output
* even better try-runtime output
* benchmark migration
* fix merge leftover
* add forgotten fixtures, fix docs
* address review comments
* ci fixes
* cleanup
* benchmarks::prepare to return DispatchError
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* store memory limits to CodeInfo
* ci: roll back weights
* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
* drive-by: update Readme and pallet rustdoc
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* use wasmi 0.29
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* use wasmi 0.30 again
* query memory limits from wasmi
* save: scan_exports ported, compiles
* save (wip, not compiles)
* query memory limits from wasmi
* better migration types
* ci: pull weights from master
* refactoring
* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
* scan_imports ported
* scan_export ported, other checks removed
* tests fixed
tests fixed
* drop wasmparser and parity-wasm dependencies
* typo fix
* addressing review comments
* refactor
* address review comments
* optimize migration
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* another review round comments addressed
* ci fix one
* clippy fix
* ci fix two
* allow stored modules to have no memory imports
* rollback: allow stored modules to have no memory imports
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* address review comments
---------
Co-authored-by: command-bot <>
2023-07-04 21:38:47 +00:00
Bastian Köcher
79f600db70
Revert k256 removal ( #14499 )
...
* Revert "Remove k256 crate from frame-support dependencies (#14452 )"
This reverts commit 4d426214af .
* Keep the test
2023-07-03 23:38:51 +02:00
Ross Bulat
fc36e04dfa
Nomination pools: disallow setting above global max commission ( #14496 )
...
* add CommissionExceedsGlobalMaximum
* rename test
* amend set_commission_max_works_with_error_tests
* fmt
2023-07-03 21:22:12 +00:00
Hugo Trentesaux
7a2a1b93cb
Fix typo ( #14479 ) ( #14480 )
2023-07-03 17:09:29 +00:00
Sasha Gryaznov
fda86dd501
contracts: switch to wasmi gas metering ( #14084 )
...
* upgrade to wasmi 0.29
* prepare cleanup
* sync ref_time w engine from the stack frame
* proc_macro: sync gas in host funcs
save: compiles, only gas pushing left to macro
WIP proc macro
proc macro: done
* clean benchmarks & schedule: w_base = w_i64const
* scale gas values btw engine and gas meter
* (re)instrumentation & code_cache removed
* remove gas() host fn, continue clean-up
save
* address review comments
* move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob
* refactor: no reftime_limit&schedule passes, no CodeStorage
* bugs fixing
* fix tests: expected deposit amount
* fix prepare::tests
* update tests and fix bugs
tests::run_out_of_gas_engine, need 2 more
save: 2 bugs with gas syncs: 1 of 2 tests done
gas_syncs_no_overcharge bug fixed, test passes!
cleaned out debug prints
second bug is not a bug
disabled_chain_extension test fix (err msg)
tests run_out_of_fuel_host, chain_extension pass
all tests pass
* update docs
* bump wasmi 0.30.0
* benchmarks updated, tests pass
* refactoring
* s/OwnerInfo/CodeInfo/g;
* migration: draft, compiles
* migration: draft, runs
* migration: draft, runs (fixing)
* deposits repaid non pro rata
* deposits repaid pro rata
* better try-runtime output
* even better try-runtime output
* benchmark migration
* fix merge leftover
* add forgotten fixtures, fix docs
* address review comments
* ci fixes
* cleanup
* benchmarks::prepare to return DispatchError
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* store memory limits to CodeInfo
* ci: roll back weights
* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
* drive-by: update Readme and pallet rustdoc
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* use wasmi 0.29
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* use wasmi 0.30 again
* query memory limits from wasmi
* better migration types
* ci: pull weights from master
* refactoring
* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
* addressing review comments
* refactor
* address review comments
* optimize migration
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* another review round comments addressed
* ci fix one
* clippy fix
* ci fix two
---------
Co-authored-by: command-bot <>
2023-07-03 11:04:10 +00:00
gupnik
e42768ea34
Removes pallet::call_index from dev_mode example ( #14492 )
...
* Removes call_index
* Adds UI test and updates doc
* Update frame/examples/dev-mode/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/examples/dev-mode/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-07-03 10:00:44 +00:00
Bastian Köcher
42243fb346
wasm-builder: Make hash and date optional ( #14490 )
...
* wasm-builder: Make `hash` and `date` optional
Apparently there are installations where the `hash` and `date` is optional.
Closes: https://github.com/paritytech/substrate/issues/14335
* ".git/.scripts/commands/fmt/fmt.sh"
---------
Co-authored-by: command-bot <>
2023-07-03 09:58:42 +00:00
Bastian Köcher
698a6d1aa8
sp-api: Put frame-metadata behind some feature ( #14398 )
...
* sp-api: Put `frame-metadata` behind some feature
Closes: https://github.com/paritytech/substrate/issues/14296
* ".git/.scripts/commands/fmt/fmt.sh"
* Review feedback
---------
Co-authored-by: command-bot <>
2023-07-03 11:54:28 +02:00
Bastian Köcher
d124c90734
sc-tracing: Only print events for whitelisted targets ( #14487 )
...
* sc-tracing: Only print events for whitelisted targets
We should only print events for whitelisted targets, otherwise we may run into some stack overflow
while printing the event.
* Update client/tracing/src/lib.rs
Co-authored-by: Koute <koute@users.noreply.github.com >
* Fix
---------
Co-authored-by: Koute <koute@users.noreply.github.com >
2023-07-03 09:47:42 +00:00
Cyrill Leutwiler
6005d19905
stabilize instantiation_nonce ( #14493 )
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2023-07-03 09:25:17 +00:00
Oliver Tale-Yazdi
234ceca1cc
Whitelist 'intrablock_entropy' ( #14489 )
...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-07-02 14:18:10 +00:00
Liam Aharon
4137aa687d
migrations: VersionedRuntimeUpgrade ( #14311 )
...
* VersionedRuntimeUpgrade
* only require one version and add a pre-upgrade check
* add docs
* improve warning log
* improve comments
* fix log
* use associated constants
* allow passing from and to versions
* test versioned_runtime_upgrade
* fix typo
* improve docs
* docs
* docs
* remove event from dummy pallet
* remove pre_upgrade current storage version check
* derive_impl
* skip pre/post checks if the actual migration will not run
* improve variable naming
* docs
* fix post_upgrade 'should run' logic
* fix comments
* pre and post hook tests
* feature gate try-runtime stuff
* remove deprecated macro
* Update frame/support/src/migrations.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* decode_all
* make experimental
* use rust generics
* add info log when running
* simplify tests
* improve log
* improve log
* cleaner pre_upgrade encoding
* Update frame/support/src/migrations.rs
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
* Update frame/support/src/migrations.rs
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
* Update frame/support/src/migrations.rs
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
* Update frame/support/src/migrations.rs
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
* Update frame/support/src/migrations.rs
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
* VersionedPostUpgradeData enum
* move versioned runtime upgrade tests to test/tests
* fix rust doc
* clarify comment
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
2023-07-02 08:36:14 +00:00
Muharem Ismailov
2f98b56393
Pallets: Assets destroy_accounts releases the deposit ( #14443 )
...
* assset accounts destroy releases the deposit
* enumerate
* Update frame/assets/src/functions.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* import defensive from frame_support
---------
Co-authored-by: Gavin Wood <gavin@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: parity-processbot <>
2023-07-01 15:48:53 +00:00
Alexandru Vasile
de52e76d52
Stabilize V15 Metadata ( #14481 )
...
* Update frame-metadata to latest branch
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Stabilize V15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Use frame-metadata from crates.io
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* test: Adjust frame-support metadata docs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update primitives/metadata-ir/src/lib.rs
Co-authored-by: James Wilson <james@jsdw.me >
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: James Wilson <james@jsdw.me >
Co-authored-by: parity-processbot <>
2023-06-30 12:33:35 +03:00
Bastian Köcher
448989f5ec
sp-api: Support nested transactions ( #14447 )
...
* 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
2023-06-29 18:01:45 +02:00
Bastian Köcher
83caca85b6
frame-benchmarking-cli: Remove native dispatch requirement ( #14474 )
...
* frame-benchmarking-cli: Remove native dispatch requirement
No need for this, we can just use the `WasmExecutor` directly.
* Fixes
* Pass benchmarking host functions
* Ensure we can pass custom host functions
2023-06-29 17:56:25 +02:00
Aaro Altonen
0e58bd91b6
Inject FromSwarm::NewListenAddr to mDNS ( #14478 )
2023-06-29 17:28:32 +02:00
Nazar Mokrynskyi
ff7e8b6b17
Unify SyncMode data structures under one ( #14465 )
2023-06-29 17:25:41 +02:00
Oliver Tale-Yazdi
f1c16d05e7
Update Reference Hardware Specs ( #13317 )
...
* Remove Polkadot Wiki
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update requirements for new ref hardware
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add test
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: parity-processbot <>
2023-06-28 21:16:55 +00:00
Liam Aharon
a7d82e1eb1
fix on-runtime-upgrade checks docs ( #14467 )
2023-06-28 15:53:33 +00:00
Sebastian Kunert
30a7e6788c
Make triecache generic and work for no-std environments ( #14403 )
...
* Remove `AsLocalTrieCache` trait
* Introduce new trait AsTrieDbCache
* Use AsTrieDbCache trait
* Make it compile
* Docs
* Improve naming of associated type, implement cache usage for no-std
* Improve naming
* Improve docs
* Allow construction with optional cache
* FMT
* Remove unused variable
* Revert unwanted change
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <git@kchr.de >
* More comment adjustments
* Docs
* Trigger CI
* ".git/.scripts/commands/fmt/fmt.sh"
* Apply suggestions from code review
Co-authored-by: Koute <koute@users.noreply.github.com >
* Review comments
* Review comments
* Apply suggestions from code review
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com >
* fmt
* Bump trie-db again
---------
Co-authored-by: Bastian Köcher <git@kchr.de >
Co-authored-by: command-bot <>
Co-authored-by: Koute <koute@users.noreply.github.com >
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com >
2023-06-28 12:57:41 +00:00
Alexandru Vasile
943697fa69
Metadata V15: Enrich extrinsic type info for decoding ( #14123 )
...
* metadata-ir: Add extrinsic type info to decode address, call, sig
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frame-metadata: Point to unreleased branch
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata-ir: Include addrees, call, signature in V15 conversion
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata-ir: Include extra ty
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* construct_runtime: Extract address,call,sig,extra ty from tx type
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frame/tests: Check metadata populates xt types correctly
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata-ir/tests: Add extra fields on ExtrinsicMetadataIR
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* primitives/traits: Expand the `Extrinsic::SignaturePayload`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* primitives: Adjust to new `Extrinsic` associated types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frame/metadata: Simplify metadata generation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frame/example: Adjust to new interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frame/tests: Adjust `extrinsic_metadata_ir_types`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Revert the additional Extrinsic' associated types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* primitives: Add `SignaturePayload` marker trait
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* primitives: Implement SignaturePayload for empty tuple
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust to new SignaturePayload trait
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Adjust `extrinsic_metadata_ir_types` to new interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frame/support: Adjust pallet test
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frame: Add Extrinsic length prefix to the metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* primitives: Populate `ExtrinsicMetadataIR` with `len_ty`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Apply cargo fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* v15: Remove len type of the extrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* cargo: Update frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: Bastian Köcher <git@kchr.de >
Co-authored-by: parity-processbot <>
2023-06-28 12:44:20 +00:00
Bastian Köcher
b4e863c472
sc-network: Improve invalid boot node reporting ( #14455 )
...
This improves the reporting of invalid boot nodes. First, it will only report each boot node once
as invalid and not every time we try to connect to the node. Second, the node will only report for
addresses that we added as startup and not for addresses of the boot node that the node learned from
other nodes.
Closes: https://github.com/paritytech/substrate/issues/13584
Closes: https://github.com/paritytech/polkadot/issues/7385
2023-06-28 13:21:05 +02:00