* Frame no longer needs to be mutable (refactoring artifact)
* Remove Contract/Tombstone deposit
* Add StorageMeter
* cargo fmt
* Fix weight annotation
* cargo run --quiet --release --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
* Simplify keep check for contract accounts
- Make sure that the "base deposit" for each contract >= ed
- Remove now obsolete checks when sneding away free balance
* Remove unused imports and functions
* Rename storage_limit to storage_deposit_limit
* cargo fmt
* Fix typo
Co-authored-by: Michael Müller <michi@parity.io>
* Finish up rename of storage_limit
* Fix rpc tests
* Make use of `StorageDepositLimitTooHigh`
* Add tests and fix bugs discovered by tests
* Add storage migration
* Don't use u128 in RPC
* Fix weight of migration
* Rename `endowment` to `value`
* Fix bug where contract couldn't get funded by a storage deposit
- Make sure that contract gets funded from deposits before value is transferred
- Don't reserve value at origin because otherwise funding isn't possible
- Just transfer free balance and reserve it after the transfer
- When refunding make sure that this refund can't dust the contract
- Can only happen after a runtime upgrade where costs where upped
- Add more tests
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Remove unused `fn storage_meter`
* Fix copy pasta doc error
* Import `MaxEncodeLen` from codec
* Beautify RPC trait bounds
* Add re-instrument behaviour to dispatchable doc
* Make sure a account won't be destroyed a refund after a slash
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Update `Storage::write` docs
* Improve doc
* Remove superflous conditional
* Typos
* Remove superflous clone (refactoring artifact)
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Changed named fields to struct variants
* Fixed errors.
* Made adjustments as per `cargo +nightly fmt`.
* Update frame/uniques/src/lib.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Removed redundant comments for structs.
* Moved frame-support to dev dependencies
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* sp-sandbox: convert executors into normal `mod`s instead of using `include!`
* sp-sandbox: run `cargo fmt` on `host_executor.rs`
* sp-sandbox: abstract away the executors behind traits
* sp_sandbox: always compile both executors when possible
* sc-executor: make sure all sandbox tests run on both sandbox executors
* sc-executor: fix brainfart: actually call into the sandbox through the trait
* sc-runtime-test: fix cargo fmt
* sc-runtime-test: deduplicate executor-specific sandbox test entrypoints
* sc-executor: test each sandbox executor in a separate test
* cargo fmt (Github's conflict resolving thingy broke indentation)
* Generate one #[test] fn per bench case.
* Update benchmark macro syntax in frame pallets.
* Explain new benchmark macro syntax in example pallet.
* support with and without a semicolon
* update pallets to use individual tests
* migrate staking too
* migrate more pallets
* fix up democracy and use individual tests
* Fix comment
* Put println message in panic
* Remove `another_set_dummy` from doc
`another_set_dummy` is not present in the benchmarking.rs (anymore).
* Update doc for benchmarks macro
* Update doc for impl_benchmark_test_suite macro
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Prepare UI tests for rust 1.54
* Delete wrong_page.stderr
* CI: run with a staging CI image
* Revert "CI: run with a staging CI image"
This reverts commit 66f5b00d14b50fd9d8fbf773f7e884f380697591.
* CI: debug, again
* LOG_TARGET is only used in std
* Remove unnecessary unsafe
* Fixes
* Use correct rustc locally
* FMT
* Compile with benchmarking
* Review feedback
* Some ui tests
* I know...
* Fix wasm tests
Co-authored-by: Denis P <denis.pisarev@parity.io>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* dont convert benchmark error
* fix warning
* fix more warnings
* more fixes
* more fixes
* add missing feature deps
* Update frame/election-provider-multi-phase/src/benchmarking.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Update frame/election-provider-multi-phase/src/benchmarking.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* use from
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Implemented `seal_ecdsa_recovery` function in the contract pallet.
Added benchmark and unit test.
* Run `cargo fmt`
* Skip fmt for slices
* Changes according comments in pull request.
* Fix build without `unstable-interface` feature
* Applied suggestion from the review
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Changed RecoveryFailed to EcdsaRecoverFailed
* Manually updated weights.rs
* Apply suggestions from code review
Co-authored-by: Michael Müller <mich@elmueller.net>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Michael Müller <mich@elmueller.net>
Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.
Updated code related to deprecated warning on tracing-subscriber `scope()`
( See https://github.com/tokio-rs/tracing/issues/1429 )
* Move `PalletVersion` away from the crate version
Before this pr, `PalletVersion` was referring to the crate version that
hosted the pallet. This pr introduces a custom `package.metadata.frame`
section in the `Cargo.toml` that can contain a `pallet-version` key
value pair. While the value is expected to be a valid u16. If this
key/value pair isn't given, the version is set to 1.
It also changes the `PalletVersion` declaration. We now only have one
`u16` that represents the version. Not a major/minor/patch version. As
the old `PalletVersion` was starting with the `u16` major, decoding the
old values will work.
* Overhaul the entire implementation
- Drop PalletVersion
- Introduce StorageVersion
- StorageVersion needs to be set in the crate and set for the macros
- Added migration
* Fix migrations
* Review feedback
* Remove unneeded dep
* remove pub consts
* Brings back logging and implements `GetStorageVersion`
* Return weight from migration
* Fmt and remove unused import
* Update frame/support/src/dispatch.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/support/src/traits/metadata.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com>
* Update impl-codec to use new upstream MaxEncodedLen trait
* Adapt crates to use the updated codec crate for `MaxEncodedLen`
* Remove max-encoded-len crate altogether
* Fix test compilation in `pallet-proxy`
* reorganize import (#9186)
* Fix remaining `MaxEncodedLen` imports
* Fix remaining old usages of max-encoded-len crate
* Fix UI test
* Manually depend on new impl-codec to fix Polkadot companion build
* Use newly released primitive-types v0.9.1 that has new codec impls
* Make sure codec deps are up-to-date in crates that use them
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Remove pre-charging for code size
* Remove pre charging when reading values of fixed size
* Add new versions of API functions that leave out parameters
* Update CHANGELOG.md
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Add v1 for seal_set_rent_allowance
* Remove unneeded trait bound
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Emit error when construct_runtime imports a non-existent Call part
* Reword and display pallet name when emitting part not found error
* Migrate decl_outer_dispatch to a proc macro
* Rename calls.rs to call.rs
* Create new construct_runtime_v2 macro
* Add UI test for importing non-existent call part in construct_runtime
* Emit error when construct_runtime imports a non-existent Config part
* Emit error when construct_runtime imports a non-existent Event part
* Migrate decl_outer_inherent to a proc macro
* Emit error when construct_runtime imports a non-existent Inherent part
* Migrate decl_outer_validate_unsigned to a proc macro
* Emit error when construct_runtime imports a non-existent ValidateUnsigned part
* impl for old macro
* fix line width
* add doc
* hide macroes and use unique counter everywhere
* Remove construct_runtime_v2
* Encapsulate pallet part check macros in a module
* Fix macro definitions in dummy part checker
* Tag ProvideInherent impl with #[pallet::inherent] properly for authorship pallet
* Remove Call part from pallets that do not define it
* Add Call part unit tests
* Remove undefined Call part import from offences pallet
* Add tests for expand_outer_inherent
* Remove Call part from pallets that do not define them
* Remove Call part imports from pallets that do not have it defined
* Remove Call part import of the offences pallet from grandpa pallet mocks
* Update frame/support/test/tests/pallet.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Remove Call part imports for pallets that do not define them
* Move inherent tests to inherent_expand
* Add unit tests for expand_outer_validate_unsigned
* Add newline at the end of file
* fix ui test
* Small prayer to RNGsus for fixing CI
* Remove Call part from construct_runtime for randomness collective flip pallet
* Remove Call part import for randomness collective flip pallet
* Summon Laplace's demon instead of praying to RNGsus
* Update test expectations
* fix ui test and make sure it's flaky
* Revert "fix ui test and make sure it's flaky"
This reverts commit 362b6881389c911ef8d9ef85d71c9463f5694b20.
* Comment out test instead of putting it in conditional compilation
* Update UI test expectations
* Update UI test expectations
* Emit error when construct_runtime imports a non-existent Origin part
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Denis P <denis.pisarev@parity.io>
* Remove unused event_metadata variable
* Eliminate mod_name and use pallet names to name enum variants
* Rename field name `pallet` to `path`
* Use only the pallet name to generate variant names
* Use new naming scheme for Event enum in sudo pallet tests
* Use new naming scheme for Event enum in offences pallet tests
* Use new naming scheme for Event enum in contracts pallet tests
* Use new naming scheme for Event enum in collective pallet tests
* Use new naming scheme for Event enum in bounties pallet tests
* Use new naming scheme for Event enum in balances pallet tests
* Use new naming scheme for Event enum in assets pallet tests
* Use new naming scheme for Event enum in frame support tests
* Use new naming scheme for Event enum in tips pallet tests
* Use new naming scheme for Event enum in transaction payment pallet tests
* Use new naming scheme for GenesisConfig fields in example pallet tests
* Use new naming scheme for GenesisConfig fields in elections pallet tests
* Use new naming scheme for Event enum in election provider multi-phase pallet tests
* Use new naming scheme for Event enum in elections phragmen pallet tests
* Use new naming scheme for GenesisConfig fields in chain spec
* Use new naming scheme for Event enum in staking pallet mock
* Use new naming scheme for GenesisConfig fields in node-template chain spec
* Use new naming scheme for GenesisConfig fields in node-testing chain spec
* Use new naming scheme for Event enum in node executor tests
* Use new naming scheme for GenesisConfig fields in transaction storage pallet mock
* Refactor match conditions
* Add new `seal_call` that offers new features
* Fix doc typo
Co-authored-by: Michael Müller <michi@parity.io>
* Fix doc typos
Co-authored-by: Michael Müller <michi@parity.io>
* Fix comment on assert
* Update CHANGELOG.md
Co-authored-by: Michael Müller <michi@parity.io>