Skip to content
  1. Jul 26, 2022
    • Kian Paimani's avatar
      Properly defer slashes (#11823) · ff2c4ca0
      Kian Paimani authored
      
      
      * initial draft of fixing slashing
      
      * fix test
      
      * Update frame/staking/src/tests.rs
      
      Co-authored-by: default avatarPiotr Mikołajczyk <[email protected]>
      
      * last touches
      
      * add more detail about unbonding
      
      * add migration
      
      * fmt
      
      Co-authored-by: default avatarPiotr Mikołajczyk <[email protected]>
      Co-authored-by: parity-processbot <>
      ff2c4ca0
    • Sebastian Kunert's avatar
      Prepare for rust 1.62.1 (#11903) · 9f409dc0
      Sebastian Kunert authored
      
      
      * Update UI test output for rust 1.62.1
      
      * switch ci to staging image to check that everything works
      
      * fix artifacts node-bench-regression-guard
      
      * Imeplement `scale_info::TypeInfo` manually to silence aggressive rust warning
      
      * Fix more clippy lints
      
      * Make clippy happy by relying on auto-deref were possible
      
      * Add tracking issue to the comments
      
      * pin ci image
      
      Co-authored-by: default avataralvicsam <[email protected]>
      9f409dc0
    • Sergej Sakac's avatar
      Rpc for pending rewards (#11831) · cdfd2da0
      Sergej Sakac authored
      
      
      * rpc pending rewards
      
      * commit
      
      * remove unused imports
      
      * fix
      
      * fix
      
      * fmt
      
      * fix
      
      * fmt
      
      * fix
      
      * docs
      
      * docs & formatting
      
      * better formatting
      
      * temporary fix
      
      * error handling
      
      * fix?
      
      * fmt
      
      * use to_string
      
      * fmt
      
      * fixed error handling
      
      * fix
      
      * rpc added to client
      
      * Update Cargo.toml
      
      * Update Cargo.toml
      
      * fix wrong reward counter
      
      * expose function
      
      * move implementation
      
      * docs
      
      * docs
      
      * docs
      
      * Update lib.rs
      
      * Update lib.rs
      
      * unexpose functions
      
      * unused dependency
      
      * update Cargo.lock
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update lib.rs
      
      * Update lib.rs
      
      * Update frame/nomination-pools/rpc/runtime-api/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * remove rpc
      
      * remove rpc directory
      
      * final fix
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      cdfd2da0
  2. Jul 25, 2022
  3. Jul 24, 2022
  4. Jul 23, 2022
  5. Jul 21, 2022
    • Robert Hambrock's avatar
      pallet-mmr: fix batch proof failures (#11840) · 05c71381
      Robert Hambrock authored
      * pallet-mmr: extend batch proof verification test
      
      covers all possible 2-leaf combinations now, including current
      verification failures that batch proof item count limit is too low
      sometimes.
      
      * raise upper bound on proof item number
      
      as described in
      https://github.com/paritytech/substrate/issues/11753#issuecomment-1179838174
      
      * test for powerset of leaves
      
      * refactor batch proof verification test
      
      * test all batch proofs for mmr sizes up to n=13
      
      * limit mmr size to reduce batch proof test duration
      
      * use saturating integer addition for proof check
      
      * extract common chain building in batch proof tests
      
      note: right now, since not killing old chain, it keeps growing by 7
      blocks for every leaf selection (added after proof generation), hence
      heavier to compute.
      
      * only add blocks after a proof generation once
      
      * increase batch proof testing range
      
      * register offchain extensions only once
      
      * fmt & remove unused util
      05c71381
  6. Jul 18, 2022
  7. Jul 17, 2022
  8. Jul 14, 2022
    • Alexander Theißen's avatar
      contracts: Composable `ChainExtension` (#11816) · 8dbfcd39
      Alexander Theißen authored
      
      
      * Add `RegisteredChainExtension`
      
      * Add tests
      
      * Update frame/contracts/src/chain_extension.rs
      
      Co-authored-by: default avatarMichael Müller <[email protected]>
      
      * Add more docs
      
      * Remove debugging leftover
      
      * Make ChainExtension-registry lowercase
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarHernando Castano <[email protected]>
      
      * Improve clarity of test inputs
      
      Co-authored-by: default avatarMichael Müller <[email protected]>
      Co-authored-by: default avatarHernando Castano <[email protected]>
      8dbfcd39
    • Kian Paimani's avatar
      Fix nomination pools unbonding logic (#11746) · a98010a8
      Kian Paimani authored
      
      
      * make pool roles optional
      
      * undo lock file changes?
      
      * add migration
      
      * add the ability for pools to chill themselves
      
      * boilerplate of tests
      
      * somewhat stable, but I think I found another bug as well
      
      * Fix it all
      
      * Add more more sophisticated test + capture one more bug.
      
      * Update frame/staking/src/lib.rs
      
      * reduce the diff a little bit
      
      * add some test for the slashing bug
      
      * cleanup
      
      * fix lock file?
      
      * Fix
      
      * fmt
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/mock.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Fix build
      
      * fix some fishy tests..
      
      * add one last integrity check for MinCreateBond
      
      * remove bad assertion -- needs to be dealt with later
      
      * nits
      
      * fix tests and add benchmarks for chill
      
      * remove stuff
      
      * fix benchmarks
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * remove defensive
      
      * first working version
      
      * bring back all tests
      
      * ALL new tests work now
      
      * cleanup
      
      * make sure benchmarks and all work
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * round of self-review, make arithmetic safe
      
      * fix warn
      
      * add migration code
      
      * Fix doc
      
      * add precision notes
      
      * make arithmetic fallible
      
      * fix node runtime
      
      * a lot of precision tests and notes and stuff
      
      * document MaxPOintsToBalance better
      
      * :round of self-review
      
      * fmt
      
      * fix some comments
      
      * new logic, some broken tests
      
      * Check if after unbonding remaining balance is more or equal to MinJoinBond and is not zero
      
      * incorporate nikos' work
      
      * make it work again
      
      * merge
      
      * Fix all tests
      
      * fix all tests
      
      * some updates
      
      * Add tests
      
      * remove erroneoysly placed comment
      
      * Try to make lint pass
      
      * Try to make lint pass
      
      * revamp the tests for unbond
      
      * fix docs
      
      * Fix proportional slashing logic
      
      * Update frame/nomination-pools/src/tests.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/tests.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * track poinst in migration
      
      * fix
      
      * fmt
      
      * fix migration
      
      * remove event read
      
      * Apply suggestions from code review
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * remove log
      
      * Update frame/staking/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * update
      
      * fmt
      
      * fmt
      
      * add one last test
      
      * fmrt
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/tests.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarwirednkod <[email protected]>
      a98010a8
    • Emre Surmeli's avatar
      Fix typo (#11832) · 4cacae72
      Emre Surmeli authored
      4cacae72
  9. Jul 13, 2022
    • Kian Paimani's avatar
      Revamp nomination pool reward scheme (#11669) · f8d4b999
      Kian Paimani authored
      
      
      * make pool roles optional
      
      * undo lock file changes?
      
      * add migration
      
      * add the ability for pools to chill themselves
      
      * boilerplate of tests
      
      * somewhat stable, but I think I found another bug as well
      
      * Fix it all
      
      * Add more more sophisticated test + capture one more bug.
      
      * Update frame/staking/src/lib.rs
      
      * reduce the diff a little bit
      
      * add some test for the slashing bug
      
      * cleanup
      
      * fix lock file?
      
      * Fix
      
      * fmt
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/mock.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Fix build
      
      * fix some fishy tests..
      
      * add one last integrity check for MinCreateBond
      
      * remove bad assertion -- needs to be dealt with later
      
      * nits
      
      * fix tests and add benchmarks for chill
      
      * remove stuff
      
      * fix benchmarks
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * remove defensive
      
      * first working version
      
      * bring back all tests
      
      * ALL new tests work now
      
      * cleanup
      
      * make sure benchmarks and all work
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * round of self-review, make arithmetic safe
      
      * fix warn
      
      * add migration code
      
      * Fix doc
      
      * add precision notes
      
      * make arithmetic fallible
      
      * fix node runtime
      
      * a lot of precision tests and notes and stuff
      
      * document MaxPOintsToBalance better
      
      * :round of self-review
      
      * fmt
      
      * fix some comments
      
      * Fix proportional slashing logic
      
      * Update frame/nomination-pools/src/tests.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/tests.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * track poinst in migration
      
      * fix
      
      * fmt
      
      * fix migration
      
      * remove event read
      
      * Apply suggestions from code review
      
      * Update frame/staking/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/nomination-pools/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * update
      
      * fmt
      
      * fmt
      
      * add one last test
      
      * fmt
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      f8d4b999
    • Jegor Sidorenko's avatar
      Buy&Sell methods for Uniques (#11398) · 5d96c0a0
      Jegor Sidorenko authored
      
      
      * Allow to set item's price
      
      * Clean the state when we transfer/burn an item or destroy a collection
      
      * Allow to buy an item
      
      * Remove redundant checks
      
      * Improve events
      
      * Cover with tests
      
      * Add comments
      
      * Apply suggestions
      
      * Fmt
      
      * Improvements for price validation
      
      * Improve validation
      
      * Update to use the new terminology
      
      * Remove multi-assets support
      
      * Chore
      
      * Weights + benchmarking
      
      * Shield against human error
      
      * Test when we pass the higher item's price
      
      * fmt fix
      
      * Chore
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Remove is_frozen check when setting the price
      
      * Try to fix benchmarking
      
      * Fix benchmarking
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Add transactional
      
      * Add 'allow deprecated' flag for transactional
      
      * Remove #[allow(deprecated)]
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_uniques
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: command-bot <>
      5d96c0a0
    • Kian Paimani's avatar
      Fix off by one error in proportional slashing (#11782) · 3ea6a88e
      Kian Paimani authored
      
      
      * Fix proportional slashing logic
      
      * Update frame/nomination-pools/test-staking/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update frame/staking/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update frame/staking/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update frame/staking/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * fmt
      
      * Update frame/nomination-pools/test-staking/src/lib.rs
      
      * clean
      
      * fix
      
      * last fixes
      
      * doc
      
      Co-authored-by: default avatarDavid <[email protected]>
      3ea6a88e
  10. Jul 12, 2022
  11. Jul 09, 2022
  12. Jul 07, 2022
    • Adrian Catangiu's avatar
      pallet-mmr: handle forks without collisions in offchain storage (#11594) · 27b53822
      Adrian Catangiu authored
      
      
      * pallet-mmr: fix some typos
      
      * pallet-mmr: make the MMR resilient to chain forks
      
      * pallet-mmr: get hash for block that added node
      
      * beefy-mmr: add debug logging
      
      * add explanatory comment
      
      * account for block offset of pallet activation
      
      * add support for finding all nodes added by leaf
      
      * minor improvements
      
      * add helper to return all nodes added to mmr with a leaf append
      
      * simplify leaf_node_index_to_leaf_index
      
      summing the (shifted) differences in peak positions adds up to the (shifted) final position, so
      don't need to fold over positions.
      
      * dead fish: this also doesn't work
      
      The idea was to keep a rolling window of `(parent_hash, pos)` leaf
      entries in the offchain db, with the window matching the one
      that provides `block_num -> block_hash` mappings in `frame_system`.
      
      Once a leaf exits the window it would be "canonicalized" by switching
      its offchain db key from `(parent_hash, pos)` to simple `pos`.
      
      This doesn't work however because there's no way to get leaf contents
      from offchain db while in runtime context.. so no way to get+clear+set
      leaf to change its key in offchain db.
      
      Ideas:
      1. move the "canonicalization" logic to offchain worker
      2. enhance IndexingApi with "offchain::move(old_key, new_key)"
         This is weird, but correct, deterministic and safe AFAICT, so
         it could be exposed to runtime.
      
      * simplify rightmost_leaf_node_index_from_pos
      
      * minor fix
      
      * move leaf canonicalization to offchain worker
      
      * move storage related code to storage.rs
      
      * on offchain reads use canonic key for old leaves
      
      * fix offchain worker write using canon key
      
      * fix pallet-mmr tests
      
      * add documentation and fix logging
      
      * add offchain mmr canonicalization test
      
      * test canon + generate + verify
      
      * fix pallet-beefy-mmr tests
      
      * implement review suggestions
      
      * improve test
      
      * pallet-mmr: add offchain pruning of forks
      
      * pallet-mmr: improve offchain pruning
      
      Instead of keeping pruning map as single blob in offchain db,
      keep individual parent-hash lists with block-num identifier as part
      of the offchain key.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      * pallet-mmr: improve MMRStore<OffchainStorage>::get()
      
      Do the math and retrieve node using correct (canon or non-canon)
      offchain db key, instead of blindly looking in both canon and non-canon
      offchain db locations for each node.
      
      Still fallback on looking at both if for any reason it's not where
      expected.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      * pallet-mmr: storage: improve logs
      
      * fix tests: correctly persist overlay
      
      runtime indexing API works on overlay, whereas offchain context
      bypasses overlay, so for loops > canon-window, canon would fail.
      
      * pallet-mmr: fix numeric typo in test
      
      * add comment around LeafData requirements
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      Co-authored-by: default avatarRobert Hambrock <[email protected]>
      27b53822
  13. Jul 05, 2022
  14. Jun 30, 2022
  15. Jun 29, 2022
  16. Jun 27, 2022
  17. Jun 24, 2022
  18. Jun 23, 2022
    • Sasha Gryaznov's avatar
      [contracts] Implement transparent hashing for contract storage (#11501) · 68ea2ab0
      Sasha Gryaznov authored
      
      
      * save
      
      * builds and old tests pass
      
      save:  temporary value dropped while borrowed
      
      save: finally builds
      
      test updated but still fails
      
      * type names enhanced
      
      * VarSizedKey bounded to new Config param
      
      * improved wasm runtime updated funcs
      
      * unstable-interface tests fixed
      
      * benchmarks fixed
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * fixes on feedback
      
      * fixes on feedback applied + make it build
      
      * benchmarks build but fail (old)
      
      * "Original code too large"
      
      * seal_clear_storage bench fixed (code size workaround hack removal tbd)
      
      * bench_seal_clear_storage pass
      
      * bench_seal_take_storage ... ok
      
      * added new seal_set_storage + updated benchmarks
      
      * added new seal_get_storage + updated benchmarks
      
      * added new seal_contains_storage + updated benchmarks
      
      * added tests for _transparent exec functions
      
      * wasm test for clear_storage
      
      * wasm test for take_storage
      
      * wasm test for new set_storage
      
      * wasm test for new get_storage
      
      * wasm test for new contains_storage
      
      * CI fix
      
      * ci fix
      
      * ci fix
      
      * ci fix
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --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
      
      * fixes according to the review feedback
      
      * tests & benchmarks fixed
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --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
      
      * refactoring
      
      * fix to runtime api
      
      * ci fix
      
      * ctx.get_storage() factored out
      
      * ctx.contains_storage() factored out
      
      * number of batches reduced for transparent hashing storage benchmarks
      
      * contracts RPC & pallet::get_storage to use transparent hashing
      
      * node and rpc updated to use get_storage with VarSizedKey
      
      * refactored (more concize)
      
      * refactored contains_storage (DRYed)
      
      * refactored contains_storage (DRYed)
      
      * fix rpc
      
      * fmt fix
      
      * more fixes in rpc
      
      * rollback `Pallet:get_storage` to Vec<u8> and rpc and node parts related to it
      
      * added `KeyDecodingFailed` error
      
      * Revert weird "fmt fix"
      
      This reverts commit c582cfff4b5cb2c9929fd5e3b45519bb24aeb657.
      
      * node-executor basic test update
      
      * fix node-executor basic test
      
      * benchmarks fix
      
      * more benchmarks fix
      
      * FixedSizedKey is hidden from pub, VarSizedKey is exported as StorageKey
      
      * ci fix
      
      * set_storage benchmark fix
      
      * ci fix
      
      * ci fix
      
      * comments improved
      
      * new error code to rpc: KEY_DECODING_FAILED
      
      * Put `rusty-cachier` before PR merge into `master` for `cargo-check-benches` job
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --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
      
      * minor optimization
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: Vladimir Istyufeev's avatarVladimir Istyufeev <[email protected]>
      Co-authored-by: command-bot <>
      68ea2ab0
    • Doordashcon's avatar
      make pallet-tips & pallet-bounties instantiable (#11473) · 7d2ecc89
      Doordashcon authored
      
      
      * make pallet-tips & pallet-bounties instantiable
      
      * update test
      
      * add default instance
      
      * update
      
      * cargo fmt
      
      * update
      
      * update
      
      * update
      
      * update
      
      * fix merge
      
      * fix tests
      
      * bounties benchmarking instantiable
      
      * fix benchmarks
      
      * make tips benchmarks instantible
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      7d2ecc89
  19. Jun 22, 2022
    • Adrian Catangiu's avatar
      pallet-beefy-mmr: add API for BEEFY Authority Sets (#11406) · 3018051c
      Adrian Catangiu authored
      
      
      * pallet-beefy: add Config::OnNewValidatorSet type
      
      Add a hook to pallet-beefy for doing specific work when
      BEEFY validator set changes.
      
      For example, this can be used by pallet-beefy-mmr to cache
      a lightweight MMR root over validators and make it available
      to light clients.
      
      * pallet-beefy-mmr: implement OnNewValidatorSet
      
      Implement pallet-beefy::OnNewValidatorSet to be notified of BEEFY
      validator set changes. Use the notifications to compute and cache
      a light weight 'BEEFY authority set' which is an MMR root over
      BEEFY validator set plus some extra info.
      
      Previously, pallet-beefy-mmr was interogating pallet-beefy about
      validator set id on every block to find out when it needs to recompute
      the authority set.
      By using the event-driven approach in this commit, we also save one
      extra state interogation per block.
      
      * pallet-beefy-mmr: add new authority_set() API
      
      Expose current and next BEEFY authority sets through runtime API.
      These can be directly used by light clients to avoid having them
      compute them themselves based on BEEFY validator sets.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      * rename BeefyMmr exposed runtime api
      3018051c
    • Bastian Köcher's avatar
      WrapperOpaque: Use `decode_all` to decode from the `Vec<u8>` (#11726) · acc8cf6e
      Bastian Köcher authored
      This ensures that there isn't any extra data attached that isn't used.
      acc8cf6e
  20. Jun 21, 2022
  21. Jun 20, 2022
  22. Jun 19, 2022
  23. Jun 18, 2022
  24. Jun 16, 2022