Bastian Köcher
fdd49f072c
Remove u32_trait ( #10850 )
...
* Remove `u32_trait`
This trait only existed because there wasn't any const generic support at time of creation. However,
we now have support for it :)
* FMT
2022-02-14 20:12:25 +00:00
Bastian Köcher
888131b651
subkey: Support --version cli command ( #10853 )
...
* subkey: Support `--version` cli command
* FMT 🤦
2022-02-14 20:31:52 +01:00
S E R A Y A
ac841927b8
fix broken link ( #10846 )
2022-02-13 23:14:32 +01:00
Arkadiy Paronyan
89d218448c
Don't create DB leaves when syncing historic blocks ( #10844 )
...
* Don't create DB leaves when syncing historic blocks
* Changed leaves check and added test
* fmt
2022-02-11 22:28:10 +01:00
André Silva
7393076df2
build-script-utils: allow reading the git commit hash from env var ( #10845 )
...
* build-script-utils: allow reading the git commit hash from env var
* build-script-utils: make the env var name substrate specific
2022-02-11 19:38:39 +00:00
Tarekk Mohamed Abdalla
89dfae9530
allow trailing comma ( #10841 )
2022-02-11 14:38:58 +00:00
Oliver Tale-Yazdi
b932e27e5b
Fix reentrancy of FrozenBalance::died hook ( #10473 )
...
* assets: execute `died` hook outside of mutate
Signed-off-by: Oliver Tale-Yazdi <oliver@tasty.limo >
* assets: extend tests for `died` hook
Signed-off-by: Oliver Tale-Yazdi <oliver@tasty.limo >
* assets: update doc of FrozenBalance::died
Signed-off-by: Oliver Tale-Yazdi <oliver@tasty.limo >
* assets: review fixes
- fix cases where `died` should not have been called
- use `Option<DeadConsequence>` instead of `DeadConsequence`
Signed-off-by: Oliver Tale-Yazdi <oliver@tasty.limo >
* assets: update comment in mock.rs
Signed-off-by: Oliver Tale-Yazdi <oliver@tasty.limo >
* assets: return `Remove` in dead_account
The return value is ignored in the only case that it is produced
by a call, but having it this way makes it more understandable.
Signed-off-by: Oliver Tale-Yazdi <oliver@tasty.limo >
2022-02-11 13:17:38 +00:00
Koute
e026077505
Reduce overhead of generating network event metrics ( #10839 )
2022-02-11 11:35:35 +00:00
Antonio Yang
b4b69798f3
Show Network ID when creating and inspecting ( #10838 )
...
Signed-off-by: Antonio Yang <yanganto@gmail.com >
2022-02-11 09:14:13 +00:00
Dmitry Kashitsyn
145abd7991
Separate wasmi and wasmer sandbox implementations into their own modules ( #10563 )
...
* Moves wasmi specific `ImportResolver` and `MemoryTransfer` impls to submodule
* Splits context store environmental, moves impl `Externals` to wasmi backend
* Adds wasmer sandbox backend stub module
* Move sandbox impl code to backend specific modules
* Moves wasmi stuff
* Fixes value conversion
* Makes it all compile
* Remove `with_context_store`
* Moves `WasmerBackend` to the impl
* Reformat the source
* Moves wasmer MemoryWrapper
* Reformats the source
* Fixes mutability
* Moves backend impls to a submodule
* Fix visibility
* Reformat the source
* Feature gate wasmer backend module
* Moves wasmi memory allocation to backend module
* Rename WasmerBackend to Backend
* Refactor dispatch result decoding, get rid of Wasmi types in common sandbox code
* Reformat the source
* Remove redundant prefixes in backend functions
* Remove wasmer-sandbox from default features
* Post-review changes
* Add conversion soundness proof
* Remove redundant prefix
* Removes now redundant clone_inner
* Add `Error::SandboxBackend`, refactor invoke result
* Fix comments
* Rename `Error::SandboxBackend` to `Sandbox`
* Simplifies logic in `wasmer_backend::invoke`
* Fixes memory management
2022-02-11 08:32:06 +00:00
Yarik Bratashchuk
e70ffbf44d
Upgradable contracts using set_code function ( #10690 )
...
* poc logic
* set_code_hash impl, tests, benchmark
* Address @xgreenx's comments
* Move func defs closer to set_storage
* Check if code exists
- increment/decrement codehash refcount
* Document error for non-existing code hash
* Revert unrelated change
* Changes due to @athei's review
* Fix error handling
- comment errors: ReturnCodes
- update mock ext implementation
- return Error::CodeNotFound when no code for such hash
* Emit ContractCodeUpdated when setting new code_hash
* Address @athei's comments
* Move related defs to the bottom
* Minor comment update
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Improve docs
* Improve docs
* Update frame/contracts/src/wasm/runtime.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Refactor set_code_hash test
* Minor change to benchmark
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Minor change to benchmark
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Minor comment refactor
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Address @HCastano's comments
* Update seal_set_code_hash comment
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Move set_code_hash after delegate_call
* Move function to the bottom
* Moved and changed banchmark, added verify block
* Bring back previous benchmark
* Remove skip_meta for seal_set_code_hash
* Bring back skip_meta for seal_set_storage_per_new_kb
* Apply weights
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2022-02-11 07:46:51 +00:00
Zeke Mostov
83eed8018b
pallet-staking: Add extrinsic force_apply_min_commission ( #10786 )
...
* pallet-staking: Add extrinsic `force_apply_min_commission`
* Add benchmarks
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Bound iteration by max_validator_count
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Only apply to 1 validator
* Update doc comments
* Uncomment tests
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Accept signed origins
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Remove contains_key check
* Add test for try_mutate_exists
* Impove try_mutate_exists docs
* Delete redundant try_mutate_exists tests;
* Delete residual from removed test
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Return an error when the stash does not exist
* Update try_mutate_exist doc wording
* Update frame/staking/src/pallet/mod.rs
* Apply suggestions from code review
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-02-10 21:22:26 +00:00
Bastian Köcher
20b2bba1cd
UncheckedExtrinsic: Harden decode and clarify EXTRINSIC_FORMAT_VERSION ( #10829 )
...
* UncheckedExtrinsic: Harden decode and clarify `EXTRINSIC_FORMAT_VERSION`
* Apply suggestions from code review
2022-02-10 12:34:35 +00:00
Shawn Tabrizi
8d783038c8
Allow SetBalance to handle error when trying to kill acount with reference counter. ( #10826 )
...
* bug found
* fix logic
* a little simpler
* add test
2022-02-10 11:08:05 +00:00
Arkadiy Paronyan
13b7c3ccdf
Add db params for export-state CLI command ( #10830 )
2022-02-09 23:55:26 +01:00
Koute
9a31b2c341
Add a new host function for reporting fatal errors; make WASM backtraces readable when printing out errors ( #10741 )
...
* Add a new host function for reporting fatal errors
* Fix one of the wasmtime executor tests
* Have `#[runtime_interface(wasm_only)]` actually mean WASM-only, and not no_std-only
* Print out errors through `Display` instead of `Debug`
* Switch one more trait to require `Error` for its error instead of only `Debug`
* Align to review comments
2022-02-09 09:12:55 +00:00
Shawn Tabrizi
bd261d57c4
--dev implies --tmp ( #10828 )
2022-02-09 08:37:43 +00:00
dependabot[bot]
2632cbb866
Bump serde from 1.0.132 to 1.0.136 ( #10816 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.132 to 1.0.136.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.136 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-08 19:27:08 +00:00
Zeke Mostov
b9947f4661
try-runtime-cli: Add to docs ( #10822 )
...
* try-runtime-cli: Add to docs of pre/post hooks
* Add note about --ws-max-out-buffer-capacity 1000
2022-02-08 19:05:34 +00:00
S E R A Y A
1b29ce0005
fixed regression in inline docs ( #10819 )
2022-02-08 14:24:20 +00:00
Shawn Tabrizi
f6f82d876b
Add Storage Info to Various Pallets ( #10810 )
...
* atomic swap
* bounties
* bounties fmt
* gilt
* indices
* nicks
* randomness-collective-flip
* recovery
* reuse maxapprovals
* Update tests.rs
* Update frame/randomness-collective-flip/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* use the correct bound
* complete recovery
* use `bounded_vec` macro
* Update tests.rs
* transaction payment
* uniques
* mmr
* example offchain worker
* beefy-mmr
* Update frame/recovery/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use BoundedVec instead of a type-parameterized BoundedString
* cargo fmt
* Update frame/atomic-swap/src/lib.rs
* use config const
* Update lib.rs
* update mel_bound
* fmt
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-02-08 14:10:35 +00:00
Yarik Bratashchuk
d14e1c641e
seal_delegate_call api function (support for library contracts) (#10617 )
...
* seal_call_code implementation
- tests
- benchmark
* Addressing @xgreenx's comments
* Fix test-linux-stable-int
* Rename seal_call_code to seal_delegate_call
* Pass value unchanged into lib contract
* Address @athei's comments
- whitespace .wat issues
- wrong/missing .wat comments
- redundant .wat calls/declarations
- change order of functions (seal_delegate_call right after seal_call)
in decls, tests, benchmark
- fix comments, move doc comments to enum variants
- remove unnecessary empty lines
- rename runtime cost DelegateCall to DelegateCallBase
- do not set CallFlags::ALLOW_REENTRY for delegate_call
* Do not pass CallFlags::ALLOWS_REENTRY for delegate_call
* Update comment for seal_delegate_call and CallFlags
* Addressing @athei's comments (minor)
* Allow reentry for a new frame after delegate_call (revert)
* Same seal_caller and seal_value_transferred for lib contract
- test
- refactor frame args due to review
- logic for seal_caller (please review)
* Put caller on frame for delegate_call, minor fixes
* Update comment for delegate_call
* Addressing @athei's comments
* Update weights generated by benchmark
* Improve comments
* Address @HCastano's comments
* Update weights, thanks @joao-paulo-parity
* Improve InvalidCallFlags error comment
2022-02-08 11:43:32 +00:00
Qinxuan Chen
1d62516fad
sp-maybe-compressed-blob: reduce boilerplate code ( #10814 )
...
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-02-08 08:52:20 +00:00
Heorhii Lutsenko
2fb4258890
Corrected description of clear_attribute extrinsic ( #10729 )
2022-02-07 12:47:56 +00:00
nanocryk
a2251208ef
make inner field of IdentityFields pub ( #10773 )
2022-02-07 12:33:24 +00:00
Arkadiy Paronyan
ca5daec14f
More efficient WASM instance memory decommit on macos ( #10801 )
...
* More efficient WASM instance memory decommit on macos
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Updated error message
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
2022-02-07 10:14:52 +01:00
Gavin Wood
a6891951fb
Referenda and Conviction Voting pallets ( #10195 )
...
* Initial draft of new referendum state machine.
* Docs
* Fixes
* Fixes
* Add conviction-voting pallet
* Basic build
* Building
* Some TODOs
* Tests building
* Add missing file
* Basic lifecycle test
* Add couple of tests
* Another test
* More tests
* Fixes
* Fixes
* Formatting
* Fixes
* Tests
* Fixes
* Fixes
* More tests
* Formatting
* First few benchmarks
* First few benchmarks
* Defered queue servicing
* More testing
* Benchmarks
* Fiddly benchmark
* Final nudge benchmarks
* Formatting
* Formatting
* Finished up benchmarks
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_referenda --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/referenda/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Events finished
* Missing file
* No GenesisConfig for Referenda
* Formatting
* Docs
* Docs
* Docs
* Per-class conviction voting
* New test & mock utils
* More tests
* Tests
* Tests finished 🎉
* Benchmarking stuff
* Fixes
* Test harness
* Test harness
* Benchmarks for Conviction=Voting
* Benchmarking pipeline complete
* Docs
* Formatting
* Remove unneeded warning
* Fix UI tests
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_conviction_voting --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/conviction-voting/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Docs
* Update frame/conviction-voting/src/vote.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* update sp-runtime version
* MEL Fixes for Referenda and Conviction Voting (#10725 )
* free maxencodedlen
* more maxencodedlen
* more MEL
* more mel
* disable storage info
* More Referenda Patches (#10760 )
* basic fixes
* fix benchmarking
* fix license
* prevent panic in curve math
* fmt
* bump crate versions
* Update mock.rs
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-02-06 12:51:12 +01:00
girazoki
074ff19dbc
maybe_total_supply in pallet-assets ( #10799 )
...
* maybe_total_supply in pallet-assets
* Update frame/assets/src/functions.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-02-05 11:06:44 +00:00
Alexander Gryaznov
d5c8593566
contracts: is_contract(address) and caller_is_origin() are added to API ( #10789 )
...
* is_contract() and caller_is_origin() added to Ext API
* is_contract() exposed in wasm runtime.rs
* + test for is_contract()
* + seal_is_contract benchmark
* caller_is_origin() exposed to wasm/runtime.rs and covered by a test
* + seal_caller_is_origin benchmark
* Update frame/contracts/src/exec.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Update frame/contracts/src/exec.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Update frame/contracts/src/exec.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Update frame/contracts/src/wasm/runtime.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Update frame/contracts/src/wasm/runtime.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Update frame/contracts/src/wasm/runtime.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Update frame/contracts/src/exec.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* identation fix for benchmark macroses; test cosmetic improvement
* benchmark fix
* + is_contract() wasm test
* + caller_is_origin() wasm test
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* is_contract() to borrow param instead of taking ownership
* phrasing improved
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* fixed wasm tests according to @athei feedback
* dead code warnings suppressed by unstable-interface attributes
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Parity Bot <admin@parity.io >
2022-02-04 19:13:00 +00:00
Keith Yeung
89fa61125e
Make some UI test expectations crisper ( #10791 )
...
* Make some UI test expectations crisper
* Update frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.rs
* Update UI test expectations
* Missing newlines
* More whitespace issues
2022-02-04 15:42:13 +00:00
Oliver Tale-Yazdi
24b796bfa4
Make offences benchmark runnable ( #10782 )
...
* Make offences benchmark runnable
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_offences --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/offences/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Revert bench-bot
This reverts commit 73d0cb2e47e93e035af80013991b6a2e5fe2b1ed.
Co-authored-by: Parity Bot <admin@parity.io >
2022-02-04 12:03:28 +00:00
Andrew Jones
07d4a6743e
Bump sp-keyring ( #10790 )
2022-02-03 16:58:16 +00:00
Shawn Tabrizi
21d0cf0eea
Introduce ModuleError struct ( #10776 )
...
* better partial eq impl
* introduce module error
* fmt
* import module error
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* fixes
* fmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-02-03 13:02:45 +00:00
Oliver Tale-Yazdi
99fae0cd57
bench-cli: Support JSON output ( #10771 )
...
* Add dependencies
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Make benchmark results serializable
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add `--json[-file]` options
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Enable JSON output
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use specific serde version
Polkadot does not compile otherwise.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review comments
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review comment: fs::write
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-02-02 14:25:13 +00:00
Pierre Besson
46f4396657
Substrate alerts rules update ( #10642 )
...
* .maintain/monitoring: Update substrate prometheus alert rules
* match the `substrate_` metrics prefix in alerts instead of `polkadot_`, following changes in #9543
* remove the filtering on polkadot|kusama domain for NumberOfFileDescriptorsHigh alert
* .maintain/monitoring: Update substrate Grafana dashboards
* match the `substrate_` metrics prefix instead of `polkadot_` in dashboards, following changes in #9543
* .maintain/monitoring: make the NumberOfFileDescriptorsHigh alert only apply for metrics tagged with 'chain'
2022-02-02 13:06:25 +01:00
Alexander Theißen
d1f490f454
wasm-builder: Fall back to release profile for unknown profiles ( #10775 )
2022-02-02 12:34:52 +01:00
Arkadiy Paronyan
e337f0be4b
Enable download of future forks ( #10739 )
...
* Enable download of future forks
* Fixed external tests
2022-02-02 11:29:36 +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
Oliver Tale-Yazdi
dbb3f24e3e
Add MaxEncodedLen to implement_fixed! ( #10768 )
...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-02-01 14:45:16 +01:00
Hussein Ait-Lahcen
ba3255376e
derive MaxEncodedLen for MultiSignature ( #10765 )
2022-02-01 09:34:53 +00:00
Alexander Theißen
0bfbf5a89f
Bump strum from 0.22 -> 0.23 ( #10758 )
2022-01-31 20:04:12 +00:00
Alexander Theißen
f3168c3fa0
Add production profile to substrate-wasm-builder ( #10747 )
...
* Add production profile to wasm builder
* Fix profile detection
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Replace panic! by println! + exit
* Default to `release` for wasm on debug builds
* Replaced unwrap by expect
* Update all weights
Rerun on the bm2 server.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Parity Bot <admin@parity.io >
2022-01-31 14:16:26 +00:00
Bastian Köcher
21d5573b25
pallet-scheduler: Fix migrations V2 to V3 ( #10757 )
...
* pallet-scheduler: Fix migrations V2 to V3
V2 already supported origins, so we need to move them over instead of setting it to `Root`. Besides
that it also removes the custom `Releases` enum and moves it over to `StorageVersion`.
* Fixes
* Fixes
* 🤦
2022-01-31 11:43:42 +00:00
Alexander Theißen
39704979fe
Bump wasm-instrument 0.1.0 -> 0.1.1 ( #10749 )
...
* Bump wasm-instrument 0.1.0 -> 0.1.1
* Fix benchmark
2022-01-31 10:05:30 +00:00
Piotr Mikołajczyk
ee557b769c
Fix lazy batch contract removal ( #10728 )
...
* Fix lazy batch contract removal
* Apply suggestions
* Qualify ChildInfo
* Negligible change to restart pipeline
* Revert "Negligible change to restart pipeline"
This reverts commit b38abb622a17de9f0d19b3eadcea611ead1a7251.
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Parity Bot <admin@parity.io >
2022-01-28 18:37:54 +00:00
Pierre Krieger
ffcd97807f
Add attributes and documentation to fork_id ( #10746 )
...
* Add attributes and documentation to fork_id
* Update client/chain-spec/src/chain_spec.rs
Co-authored-by: Sacha Lansky <sacha@parity.io >
Co-authored-by: Sacha Lansky <sacha@parity.io >
2022-01-28 12:25:12 +00:00
Niklas Adolfsson
3f69a2e1ff
remote ext: make it possible to use an existing ws connection ( #10737 )
...
* remote ext: make it possible to pass ws client
* grumbles: introduce `map_uri`
2022-01-28 09:04:52 +00:00
Davide Galassi
7f3bb8d0da
Add stale branches heads to finality notifications ( #10639 )
...
* Add stale branches heads to finality notifications
Warning. Previous implementation was sending a notification for
each block between the previous (explicitly) finalized block and
the new finalized one (with an hardcoded limit of 256).
Now finality notification is sent only for the new finalized head and it
contains the hash of the new finalized head, new finalized head header,
a list of all the implicitly finalized blocks and a list of stale
branches heads (i.e. the branches heads that are not part of the
canonical chain anymore).
* Add implicitly finalized blocks list to `ChainEvent::Finalized` message
The list contains all the blocks between the previously finalized block
up to the parent of the currently finalized one, sorted by block number.
`Finalized` messages handler, part of the `MaintainedTransactionPool`
implementation for `BasicPool`, still propagate full set of finalized
blocks to the txpool by iterating over implicitly finalized blocks list.
* Rust fmt
* Greedy evaluation of `stale_heads` during finalization
* Fix outdated assumption in a comment
* Removed a test optimization that is no more relevant
The loop was there to prevent sending to
`peer.network.on_block_finalized` the full list of finalized blocks.
Now only the finalized heads are received.
* Last finalized block lookup not required anymore
* Tests for block finality notifications payloads
* Document a bit tricky condition to avoid duplicate finalization notifications
* More idiomatic way to skip an iterator entry
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Cargo fmt iteration
* Typo fix
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Fix potential failure when a finalized orphan block is imported
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-01-27 18:21:58 +01:00
Kian Paimani
498c3a5ecc
better way to resolve Phase::Emergency via governance ( #10663 )
...
* better way to resolve Phase::Emergency via governance
* Update frame/election-provider-multi-phase/src/lib.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* review grumbles
* Update frame/election-provider-support/src/onchain.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* revert usize -> u32
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-01-27 10:00:48 +00: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