1. Dec 08, 2021
    • Zeke Mostov's avatar
      Add extrinsic to improve position in a bag of bags-list (#9829) · 4855eb6c
      Zeke Mostov authored
      
      
      * pallet-bags-list: Add `put_in_front_of` extrinsic
      
      This PR adds the extrinsic `put_in_front_of` which allows the user to specify a `lighter` and `heavier` account within the same bag. The extrinsic will move `heavier` directly in front of `lighter`.  The parameter names refer to the fact that `lighter` must have a lower `VoteWeight` then `heavier`. 
      
      In the ideal use case, where a user wants to improve the position of their account within a bag, the user would iterate the bag, starting from the head, and find the first node who's `VoteWeight` is less than theirs. They would then supply the `id` of the node as the `lighter` argument and their own `id` as the `heavier` argument.
      
      * Test & Benchmarks
      
      * Respect line width
      
      * Remove List::put_in_fron_of tests; Remove AlreadyHigher error
      
      * The dispatch origin for this call must be ...
      
      * Add some periods
      
      * Add back test to list module: put_in_front_of_exits_early_if_bag_not_found
      
      * add test tests::pallet::heavier_is_head_lighter_is_not_terminal
      
      * Cater for edge case of heavier being head
      
      * Add ExtBuilder::add_aux_data; try to make some tests use simpler data
      
      * Update frame/bags-list/src/list/tests.rs
      
      * make insert_at_unchecked infallible
      
      * Make it permissioned - only callable by heavier
      
      * Add test cases for insert_at_unchecked
      
      * Move counter update to insert_at; fix comments
      
      * Address some feedback
      
      * Make voteweight constructed with parameter_types
      
      * Always set vote weight for Ids in build
      
      * Add skip_genesis_ids
      
      * Do not pass weight fn to List put_in_front_of
      
      * Remove remants of CounterForListNodes
      
      * fmt
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Delete messed up weights file
      
      * Some place holder stuff so we can run bench in CI
      
      * Fix
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Update frame/bags-list/src/list/mod.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * fmt
      
      * Log + debug assert when refetching an Id
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      4855eb6c
  2. 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
      Clean up `pallet-contracts` documentation (#10438) · 35b82f91
      Alexander Theißen authored
      * Update CHANGELOG.md
      
      * Remove COMPLEXITY.md
      35b82f91
    • 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
    • Ayevbeosa Iyamu's avatar
      Used CountedStorageMap in pallet-staking (#10233) · 56fb1cfb
      Ayevbeosa Iyamu authored
      
      
      * Removed counters and used CountedStorageMap instead.
      
      * Little refactoring
      
      * Update frame/staking/src/migrations.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Removed redundant code to update counter for validator & nominator.
      
      * Removed redundant code to update counter for validator & nominator.
      
      * Removed unreachable code to inject the hashed prefix for nominator & validator.
      
      * Removed redundant check for nominator & validator count.
      
      * Generated `fn prefix_hash` for `CountedStorageMap`.
      
      * Applied changes from `cargo fmt`
      
      * Possible correct implementation of migration code
      
      * Implemented fn module_prefix, storage_prefix and prefix_hash.
      
      * Removed counted_map.rs
      
      * Renamed `fn storage_prefix` to `storage_counter_prefix`.
      
      * Update frame/support/src/storage/types/counted_map.rs
      
      * Update frame/bags-list/remote-tests/src/snapshot.rs
      
      * Update frame/support/src/storage/types/counted_map.rs
      
      * Fixed errors.
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      56fb1cfb
  3. Dec 06, 2021
  4. Dec 03, 2021
  5. Dec 02, 2021
    • Kian Paimani's avatar
      Minimum commission for validators (#10347) · e9a7dc3c
      Kian Paimani authored
      
      
      * Minimum commission for validators
      
      * rename
      
      * Fix benchmakrs
      
      * cargo run --quiet --release --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
      
      * Update frame/staking/src/pallet/mod.rs
      
      * cargo run --quiet --release --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
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      e9a7dc3c
  6. Dec 01, 2021
  7. Nov 30, 2021
    • Enoch Chejieh's avatar
      Add pallet names to Events (#10296) · d58aeb04
      Enoch Chejieh authored
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * fix: add fix to tests for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: updated transaction-storage pallet event variants
      
      * chore: updated transaction-storage pallet event variants
      
      * chore: formatted contracts pallet
      
      * chore: update treasury event variants
      d58aeb04
    • zjb0807's avatar
      Add runtime-benchmarks for frame-benchmarking (#10324) · b5ed6468
      zjb0807 authored
      * update frame/benchmarking/src/baseline.rs
      
      * add runtime-benchmarks feature
      
      * add runtime-benchmarks for frame-benchmarking
      
      * update frame-benchmarking/runtime-benchmarks
      
      * trigger GitHub actions
      b5ed6468
    • Joshy Orndorff's avatar
      Add `vote` and `seconded` events to Democracy pallet. (#10352) · a01004e1
      Joshy Orndorff authored
      
      
      * add the events
      
      * spec_version
      
      * Update bin/node/runtime/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      Co-authored-by: default avatarAlan Sapede <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      a01004e1
  8. Nov 29, 2021
  9. Nov 28, 2021
  10. Nov 26, 2021
  11. Nov 25, 2021
  12. Nov 24, 2021
  13. Nov 23, 2021
  14. Nov 22, 2021
  15. Nov 21, 2021
  16. Nov 20, 2021
    • Doordashcon's avatar
      tuple to struct event variants (#10257) · 09d351dd
      Doordashcon authored
      * AFNPEV recovery
      
      * AFNPEV session
      
      * cargo +nightly fmt && cargo fmt
      
      * removed redundant comments
      
      * update
      
      * update & cargo +nightly fmt
      
      * update & cargo +nightly fmt
      
      * update recovery/src/lib.rs
      
      * update session/src/lib.rs
      09d351dd
  17. Nov 19, 2021
  18. Nov 18, 2021
  19. Nov 17, 2021
  20. Nov 16, 2021
    • Kian Paimani's avatar
      Update mod.rs (#10277) · 256c35f4
      Kian Paimani authored
      As many people are unbonding, I've had to explain this to a handful of people recently. This improves the error message a bit and puts it in the error description, so that it is shown in the front page of all explorers if `unbond` fails, hopefully making it clear.
      256c35f4
    • Bastian Köcher's avatar
      Vesting: Fix `post_migration` check (#10280) · 41218ba1
      Bastian Köcher authored
      * Vesting: Fix `post_migration` check
      
      As the vesting migration could already have been done, people could already have started to merge schedules.
      
      * 🤦
      41218ba1
    • David Salami's avatar
      Add field names to pallet Event variants (#9993) · 120894fd
      David Salami authored
      * convert pallet-assets events to struct types
      
      * updated events of a couple pallets
      
      * updated pallet event field names
      
      * update pallet event field names
      
      * updated events in test files
      
      * cargo fmt
      
      * minorfixes
      
      * fix assertion error
      
      * minor fix
      
      * formatting fix
      
      * fmt
      120894fd
  21. Nov 15, 2021
  22. Nov 14, 2021