1. Mar 01, 2022
    • Andrew Jones's avatar
      Release primitive crates (#10937) · a3a7fe90
      Andrew Jones authored
      * cargo set-version --bump major -p pallet-contracts-primitives
      
      * cargo set-version --bump major -p sp-core
      
      * cargo set-version --bump major -p sp-runtime-interface
      
      * cargo set-version --bump major -p sp-wasm-interface
      
      * cargo set-version --bump major -p sp-runtime
      
      * cargo set-version --bump major -p sp-storage
      
      * cargo set-version --bump major -p sp-rpc
      
      * cargo set-version --bump major -p sp-io
      
      * cargo set-version --bump major -p sp-trie
      
      * cargo set-version -p sp-state-machine  -- 0.12.0
      
      * cargo set-version -p sp-externalities  -- 0.12.0
      
      * cargo set-version -p sp-keystore -- 0.12.0
      
      * cargo set-version --bump major -p sp-keyring
      
      * cargo set-version --bump major -p sp-version
      
      * cargo set-version --bump major -p sp-tracing
      
      * cargo set-version --bump major -p sp-application-crypto
      
      * cargo set-version --bump major -p sp-arithmetic
      
      * cargo unleash version bump-major -p sp-runtime-interface-proc-macro
      
      * Add codec max-encoded-len feature to sp-arithmetic
      
      * cargo unleash version bump-major -p sp-core-hashing-proc-macro
      a3a7fe90
    • thiolliere's avatar
      new pallet: whitelist pallet (#10159) · e71c7b25
      thiolliere authored
      
      
      * pallet whitelist
      
      * refactor a bit
      
      * fmt
      
      * address audit
      
      * improve tests
      
      * return Ok + refund
      
      * add test for dispatching failing
      
      * add dispatch_whitelisted_call_with_preimage
      
      * fmt
      
      * better name
      
      * Consume all data on decode
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Add error docs
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Remove phantom data
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Use rust 2021
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update crate features
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Fmt
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Make compile
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_whitelist --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/whitelist/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Bump Preimage max size
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_whitelist --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/whitelist/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Fmt
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      e71c7b25
  2. Feb 24, 2022
    • wigy's avatar
      Upgrading parity-scale-codec to v3 (#10825) · 535325d2
      wigy authored
      * Upgraded dependencies
      
      * Adapting code to scale v3
      
      * Empty commit to trigger CI
      
      * Triggering CI
      
      * Fixing UI test
      
      * Remove superfluous dev-dep added by #9228
      
      * Cryout for CI
      535325d2
  3. Feb 14, 2022
    • Bastian Köcher's avatar
      wasm-builder: Support latest nightly (#10837) · 47622d69
      Bastian Köcher authored
      * wasm-builder: Support latest nightly
      
      With latest nightly, aka rust version 1.60+ namespaced features are added. This changes the handling
      of optional dependencies. We currently have features that enable optional dependencies when `std` is
      enabled. This was before no problem, but now the wasm-builder detects them as enabled. To support
      the transition period until 1.60 is released as stable, this pr adds an heuristic to not enable these
      optional crates in the wasm build when they are enabled in the `std` feature. This heuristic fails
      when someones enables these optional dependencies from the outside as well as via the `std` feature,
      however we hope that no one is doing this at the moment. When namespaced features are enabled, these
      dependencies needs to be enabled using `dep:dependency-name` to solve this properly.
      
      https://doc.rust-lang.org/cargo/reference/unstable.html#namespaced-features
      
      * Remove accidentally added features
      47622d69
    • Bastian Köcher's avatar
      Remove `u32_trait` (#10850) · fdd49f07
      Bastian Köcher authored
      * 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
      fdd49f07
  4. Feb 06, 2022
    • Gavin Wood's avatar
      Referenda and Conviction Voting pallets (#10195) · a6891951
      Gavin Wood authored
      * 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: default avatarShawn Tabrizi <[email protected]>
      
      * 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: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      a6891951
  5. Feb 03, 2022
  6. Feb 01, 2022
    • Alexander Theißen's avatar
      Release `pallet-contracts-primitives` (#10772) · 3938c1cb
      Alexander Theißen authored
      * 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
      3938c1cb
  7. Jan 27, 2022
  8. Jan 25, 2022
  9. Jan 20, 2022
  10. Jan 19, 2022
  11. Jan 17, 2022
  12. Jan 03, 2022
  13. Dec 24, 2021
    • cheme's avatar
      Inner hashing of value in state trie (runtime versioning). (#9732) · 4c651637
      cheme authored
      
      
      * starting
      
      * Updated from other branch.
      
      * setting flag
      
      * flag in storage struct
      
      * fix flagging to access and insert.
      
      * added todo to fix
      
      * also missing serialize meta to storage proof
      
      * extract meta.
      
      * Isolate old trie layout.
      
      * failing test that requires storing in meta when old hash scheme is used.
      
      * old hash compatibility
      
      * Db migrate.
      
      * runing tests with both states when interesting.
      
      * fix chain spec test with serde default.
      
      * export state (missing trie function).
      
      * Pending using new branch, lacking genericity on layout resolution.
      
      * extract and set global meta
      
      * Update to branch 4
      
      * fix iterator with root flag (no longer insert node).
      
      * fix trie root hashing of root
      
      * complete basic backend.
      
      * Remove old_hash meta from proof that do not use inner_hashing.
      
      * fix trie test for empty (force layout on empty deltas).
      
      * Root update fix.
      
      * debug on meta
      
      * Use trie key iteration that do not include value in proofs.
      
      * switch default test ext to use inner hash.
      
      * small integration test, and fix tx cache mgmt in ext.
      test  failing
      
      * Proof scenario at state-machine level.
      
      * trace for db upgrade
      
      * try different param
      
      * act more like iter_from.
      
      * Bigger batches.
      
      * Update trie dependency.
      
      * drafting codec changes and refact
      
      * before removing unused branch no value alt hashing.
      more work todo rename all flag var to alt_hash, and remove extrinsic
      replace by storage query at every storage_root call.
      
      * alt hashing only for branch with value.
      
      * fix trie tests
      
      * Hash of value include the encoded size.
      
      * removing fields(broken)
      
      * fix trie_stream to also include value length in inner hash.
      
      * triedbmut only using alt type if inner hashing.
      
      * trie_stream to also only use alt hashing type when actually alt hashing.
      
      * Refactor meta state, logic should work with change of trie treshold.
      
      * Remove NoMeta variant.
      
      * Remove state_hashed trigger specific functions.
      
      * pending switching to using threshold, new storage root api does not
      make much sense.
      
      * refactoring to use state from backend (not possible payload changes).
      
      * Applying from previous state
      
      * Remove default from storage, genesis need a special build.
      
      * rem empty space
      
      * Catch problem: when using triedb with default: we should not revert
      nodes: otherwhise thing as trie codec cannot decode-encode without
      changing state.
      
      * fix compilation
      
      * Right logic to avoid switch on reencode when default layout.
      
      * Clean up some todos
      
      * remove trie meta from root upstream
      
      * update upstream and fix benches.
      
      * split some long lines.
      
      * UPdate trie crate to work with new design.
      
      * Finish update to refactored upstream.
      
      * update to latest triedb changes.
      
      * Clean up.
      
      * fix executor test.
      
      * rust fmt from master.
      
      * rust format.
      
      * rustfmt
      
      * fix
      
      * start host function driven versioning
      
      * update state-machine part
      
      * still need access to state version from runtime
      
      * state hash in mem: wrong
      
      * direction likely correct, but passing call to code exec for genesis
      init seem awkward.
      
      * state version serialize in runtime, wrong approach, just initialize it
      with no threshold for core api < 4 seems more proper.
      
      * stateversion from runtime version (core api >= 4).
      
      * update trie, fix tests
      
      * unused import
      
      * clean some TODOs
      
      * Require RuntimeVersionOf for executor
      
      * use RuntimeVersionOf to resolve genesis state version.
      
      * update runtime version test
      
      * fix state-machine tests
      
      * TODO
      
      * Use runtime version from storage wasm with fast sync.
      
      * rustfmt
      
      * fmt
      
      * fix test
      
      * revert useless changes.
      
      * clean some unused changes
      
      * fmt
      
      * removing useless trait function.
      
      * remove remaining reference to state_hash
      
      * fix some imports
      
      * Follow chain state version management.
      
      * trie update, fix and constant threshold for trie layouts.
      
      * update deps
      
      * Update to latest trie pr changes.
      
      * fix benches
      
      * Verify proof requires right layout.
      
      * update trie_root
      
      * Update trie deps to  latest
      
      * Update to latest trie versioning
      
      * Removing patch
      
      * update lock
      
      * extrinsic for sc-service-test using layout v0.
      
      * Adding RuntimeVersionOf to CallExecutor works.
      
      * fmt
      
      * error when resolving version and no wasm in storage.
      
      * use existing utils to instantiate runtime code.
      
      * Patch to delay runtime switch.
      
      * Revert "Patch to delay runtime switch."
      
      This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
      
      * useless closure
      
      * remove remaining state_hash variables.
      
      * Remove outdated comment
      
      * useless inner hash
      
      * fmt
      
      * fmt and opt-in feature to apply state change.
      
      * feature gate core version, use new test feature for node and test node
      
      * Use a 'State' api version instead of Core one.
      
      * fix merge of test function
      
      * use blake macro.
      
      * Fix state api (require declaring the api in runtime).
      
      * Opt out feature, fix macro for io to select a given version
      instead of latest.
      
      * run test nodes on new state.
      
      * fix
      
      * Apply review change (docs and error).
      
      * fmt
      
      * use explicit runtime_interface in doc test
      
      * fix ui test
      
      * fix doc test
      
      * fmt
      
      * use default for path and specname when resolving version.
      
      * small review related changes.
      
      * doc value size requirement.
      
      * rename old_state feature
      
      * Remove macro changes
      
      * feature rename
      
      * state version as host function parameter
      
      * remove flag for client api
      
      * fix tests
      
      * switch storage chain proof to V1
      
      * host functions, pass by state version enum
      
      * use WrappedRuntimeCode
      
      * start
      
      * state_version in runtime version
      
      * rust fmt
      
      * Update storage proof of max size.
      
      * fix runtime version rpc test
      
      * right intent of convert from compat
      
      * fix doc test
      
      * fix doc test
      
      * split proof
      
      * decode without replay, and remove some reexports.
      
      * Decode with compatibility by default.
      
      * switch state_version to u8. And remove RuntimeVersionBasis.
      
      * test
      
      * use api when reading embedded version
      
      * fix decode with apis
      
      * extract core version instead
      
      * test fix
      
      * unused import
      
      * review changes.
      
      Co-authored-by: default avatarkianenigma <[email protected]>
      4c651637
  14. Dec 23, 2021
  15. Dec 16, 2021
    • dharjeezy's avatar
      Replace parameter_types with ConstU32 &c. (#10402) · 1b0be8ae
      dharjeezy authored
      
      
      * remove parameter types and use const type
      
      * remove parameter types and use const type
      
      * Delete {
      
      * Delete count,
      
      * refractor for beefy, benchmarking, child bounties, and collective pallets
      
      * refractor for pallet contracts
      
      * refractor for elections
      
      * refractor for more pallets
      
      * fix CI issues
      
      * fix CI issues
      
      * fix CI issues
      
      * fix CI issues
      
      * remove warning to fix CI issue
      
      * remove warning to fix CI issue
      refractor for pallet preimage
      
      * remove warning to fix CI issue
      refractor for pallet proxy
      
      * remove warning to fix CI issue
      refractor for pallet recovery
      refractor for pallet randomness-collective-flip
      
      * remove warning to fix CI issue
      refractor for pallet scored-pool
      refractor for pallet scheduler
      refractor for pallet session
      
      * remove warning to fix CI issue
      refractor for pallet society, support, system, timestamp, tips
      
      * remove warning to fix CI issue
      refractor for pallet transaction_payment, transaction_storage, treasury, uniques, utility
      
      * remove warning to fix CI issue
      
      * cargo +nightly fmt
      
      * CI fix
      
      * more param refractor on beefy-mmr
      
      * refractor for beefy
      
      * Update frame/babe/src/mock.rs
      
      * Update frame/babe/src/mock.rs
      
      * Update frame/bounties/src/tests.rs
      
      * Update frame/tips/src/tests.rs
      
      * Delete mock.rs
      
      * Update frame/examples/basic/src/tests.rs
      
      * Apply suggestions from code review
      
      * Update frame/im-online/src/mock.rs
      
      * Update frame/im-online/src/mock.rs
      
      * Update frame/offences/benchmarking/src/mock.rs
      
      * Update frame/session/benchmarking/src/mock.rs
      
      * Update frame/support/test/tests/pallet_compatibility.rs
      
      * Update frame/support/test/tests/pallet_compatibility_instance.rs
      
      * Update frame/treasury/src/tests.rs
      
      * Update test-utils/runtime/src/lib.rs
      
      * some cleanup
      
      * fmt
      
      * remove unused
      
      Co-authored-by: default avatarDamilare <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      1b0be8ae
  16. Dec 15, 2021
    • David's avatar
      Prepare `sp-runtime` for publication (#10451) · edf73199
      David authored
      * Bump versions of sp-core and dependencies to v4.0.0
      
      * Update references from `4.0.0-dev` –> `4.0.0`
      
      * Funny whitespace
      
      * Funny whitespace 2
      
      * Prepare `sp-runtime` for publication
      edf73199
  17. Dec 13, 2021
  18. Dec 11, 2021
    • Gavin Wood's avatar
      Preimage registrar and Scheduler integration (#10356) · 5e50e0bc
      Gavin Wood authored
      
      
      * initial idea
      
      * more
      
      * fix compile
      
      * add clear and request logic
      
      * improve some docs
      
      * Add and implement trait
      
      * continuing to improve
      
      * refcount type
      
      * infallible system preimage upload
      
      * fmt
      
      * fix requests
      
      * Make it simple
      
      * Make it simple
      
      * Formatting
      
      * Initial draft
      
      * request when scheduled
      
      * Docs
      
      * Scheduler good
      
      * Scheduler good
      
      * Scheduler tests working
      
      * Add new files
      
      * Missing stuff
      
      * Repotting, add weights.
      
      * Add some tests to preimage pallet
      
      * More tests
      
      * Fix benchmarks
      
      * preimage benchmarks
      
      * All preimage benchmarks
      
      * Tidy cargo
      
      * Update weights.rs
      
      * Allow hash provision in benchmarks
      
      * Initial work on new benchmarks for Scheduler
      
      * Tests working, refactor looks good
      
      * Tests for new Scheduler functionality
      
      * Use real weight, make tests work with runtimes without Preimage
      
      * Rename
      
      * Update benchmarks
      
      * Formatting
      
      * Formatting
      
      * Fix weird formatting
      
      * Update frame/preimage/src/lib.rs
      
      * Fix try-runtime build
      
      * Fixes
      
      * Fixes
      
      * Update frame/support/src/traits/tokens/currency.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/support/src/traits/tokens/currency/reservable.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/support/src/traits/tokens/imbalance.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/preimage/src/mock.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/scheduler/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/preimage/src/lib.rs
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * Fixes
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/scheduler/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/preimage/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      5e50e0bc
    • Bastian Köcher's avatar
      `inspect-key`: Adds support for `expect-public` (#10430) · f6f58f95
      Bastian Köcher authored
      * Introduce `SecretUri`
      
      * `inspect-key`: Adds support for `expect-public`
      
      `expect-public` can be used to check that a given secret uri corresponds to the given public key.
      This is mainly useful when the secret uri is protected by a password and a new derived account
      should be generated. With `--expect-public` the user can pass the public key/account-id of the
      "base" secret uri aka the one without any derivation to ensure the correct password was inserted.
      
      * Fixes
      
      * 🤦
      
      
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Review feedback
      
      * FMT
      
      * Bump the versions
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      f6f58f95
  19. Dec 09, 2021
  20. Dec 08, 2021
  21. Dec 07, 2021
    • Gautam Dhameja's avatar
      Add child-bounties pallet. (#10309) · 752e050c
      Gautam Dhameja authored
      
      
      * Extract child-bounties as a separate pallet.
      
      * Initial tests added.
      
      * More tests.
      
      * Tests complete. Fixed curator fee issue.
      
      * Fixed comments.
      
      * Added benchmarks for child-bounties pallet.
      
      * Added weights.
      
      * Fixed formatting.
      
      * Fixed comments.
      
      * Re-run benchmarks for bounties pallet.
      
      * Make cargo fmt happy again
      
      * add max encoded len
      
      * use event structs
      
      * fmt
      
      * fix compile
      
      * Addressed review comments.
      
      * Use config type instead of const in benchmarking.
      
      * Addressed more review comments.
      
      * Use ensure_can_withdraw instead of just checking min balance.
      
      * fmt.
      
      * Introduce ChildBountyCuratorDepositBase to avoid zero curator deposits for child bounties.
      
      * Fix unassign curator logic for child-bounties.
      
      * Added more tests for unassign curator.
      
      * Reduce bounty description max length in node runtime.
      
      * Updated weights for child bounties pallet.
      
      * reduce indentation of unassign_curator
      
      * more indentation reduction
      
      * deduplicate slashing arms
      
      * reintroduce ensure check
      
      * add assertion to check that bad unassign origin fails
      
      * formatting
      
      * Updated comments.
      
      Co-authored-by: default avatarRicardo Rius <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      752e050c
    • Alexander Theißen's avatar
      contracts: Add storage deposits (#10082) · 68634766
      Alexander Theißen authored
      
      
      * 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: default avatarMichael Müller <[email protected]>
      
      * 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: default avatarAndrew Jones <[email protected]>
      
      * 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: default avatarAndrew Jones <[email protected]>
      
      * Update `Storage::write` docs
      
      * Improve doc
      
      * Remove superflous conditional
      
      * Typos
      
      * Remove superflous clone (refactoring artifact)
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarMichael Müller <[email protected]>
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      68634766
  22. Dec 01, 2021
  23. Nov 30, 2021
  24. Nov 28, 2021
  25. Nov 23, 2021
    • Xavier Lau's avatar
      Support MMR Pruning (#9700) · f9122a87
      Xavier Lau authored
      
      
      * Use `0.3.2`
      
      * Replace `u64` with `NodeIndex`
      
      * Fix Typo
      
      * Add Pruning Logic
      
      * Fix Some Tests
      
      * Remove Comment
      
      * Log Only Under STD
      
      * Return while No Element to Append
      
      * Optimize Pruning Algorithm
      
      * Update Doc
      
      * Update Doc
      
      * Zero Copy Algorithm
      
      * Import Missing Type
      
      * Fix Merge Mistake
      
      * Import Missing Item
      
      * Make `verify` Off-Chain
      
      * `cargo fmt`
      
      * Avoid using NodeIndex in incorrect places.
      
      * Simplify pruning.
      
      * Format
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      f9122a87
  26. Nov 19, 2021
    • Georges's avatar
      Moving `pallet-asset-tx-payment` from cumulus to substrate (#10127) · 439af98e
      Georges authored
      
      
      * Moving `pallet-asset-tx-payment` from cumulus
      
      * move pallet-asset-tx-payment into transaction payment directory
      
      * cargo +nightly fmt
      
      * Adding `pallet-asset-tx-payment` to node runtime
      I had to change the Balance type to u128.
      Also harmonised that pallet's version
      
      * Updating cargo.lock after merge
      
      * forgot this
      
      * Adding tx-payment signature
      
      * Missed one more
      
      * `transaction-payment` replaced in`SignedExtension`
      by `asset-tx-payment` and not added
      
      * Fixing benches
      
      * add test to verify that we don't charge on post-dispatch if we didn't on pre-dispatch
      
      * add (failing) test for asset tx payment of unsigned extrinsics
      
      * fix test by removing debug_assert
      
      * cargo +nightly fmt
      
      * typo in `Cargo.lock`
      
      * Object defined twice in lock file
      
      * cargo update
      
      * remove todo
      
      * Apply formatting suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Refactoring `post_dispatch` of `asset-tx-payment`
      to reuse `post_dispatch` of `transaction-payment` if the fee asset is
      native
      Removing unneeded imports.
      
      * Removing redundant `TODO`
      
      * Reverting an accidental bump of `impl-serde`
       from `0.3.1` to `0.3.2`
      
      * Revert unneeded changes to `cargo.lock`
      
      * Update frame/transaction-payment/asset-tx-payment/src/payment.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fixing cargo fmt
      
      Reverting changes which broke cargo fmt
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      439af98e
  27. Nov 16, 2021
  28. Nov 13, 2021
  29. Nov 10, 2021
  30. Nov 04, 2021
  31. Oct 31, 2021
    • thiolliere's avatar
      Automatic pallet parts in construct_runtime (#9681) · 4292e18e
      thiolliere authored
      
      
      * implement automatic parts
      
      * ui tests
      
      * rename
      
      * remove unnecessary exclude
      
      * better doc
      
      * better doc
      
      * fix genesis config
      
      * fix UI tests
      
      * fix UI test
      
      * Revert "fix UI test"
      
      This reverts commit a910351c0b24cfe42195cfd97d83a416640e3259.
      
      * implemented used_parts
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * doc + fmt
      
      * Update frame/support/procedural/src/construct_runtime/parse.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * add doc in the macro
      
      * remove yet some more parts
      
      * fix ui test
      
      * more determnistic error message + fix ui tests
      
      * fix ui test
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * do refactor + fix ui tests
      
      * fmt
      
      * fix test
      
      * fix test
      
      * fix ui test
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * refactor
      
      * remove even more part in node-runtime
      
      * fix test
      
      * Add flow chart for the construct_runtime! execution flow
      
      * Fix typo
      
      * Ignore snippets that don't contain code
      
      * Refactor some code in expand_after
      
      * Rename expand_after to match_and_insert
      
      * cargo fmt
      
      * Fix rename
      
      * Remove frame_support argument to construct_runtime_parts
      
      * Make use of tt-call to simplify intermediate expansions
      
      * cargo fmt
      
      * Update match_and_insert documentation
      
      * Reset cursor to 0 when no matching patterns are found
      
      * Reorder struct fields on MatchAndInsertDef
      
      * Add test for dependency renames and fix frame-support import
      
      * Add more doc comments
      
      * Update frame/support/test/compile_pass/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      4292e18e