Skip to content
  1. Feb 11, 2022
    • Dmitry Kashitsyn's avatar
      Separate wasmi and wasmer sandbox implementations into their own modules (#10563) · 145abd79
      Dmitry Kashitsyn authored
      * Moves wasmi specific `ImportResolver` and `MemoryTransfer` impls to submodule
      
      * Splits context store environmental, moves impl `Externals` to wasmi backend
      
      * Adds wasmer sandbox backend stub module
      
      * Move sandbox impl code to backend specific modules
      
      * Moves wasmi stuff
      
      * Fixes value conversion
      
      * Makes it all compile
      
      * Remove `with_context_store`
      
      * Moves `WasmerBackend` to the impl
      
      * Reformat the source
      
      * Moves wasmer MemoryWrapper
      
      * Reformats the source
      
      * Fixes mutability
      
      * Moves backend impls to a submodule
      
      * Fix visibility
      
      * Reformat the source
      
      * Feature gate wasmer backend module
      
      * Moves wasmi memory allocation to backend module
      
      * Rename WasmerBackend to Backend
      
      * Refactor dispatch result decoding, get rid of Wasmi types in common sandbox code
      
      * Reformat the source
      
      * Remove redundant prefixes in backend functions
      
      * Remove wasmer-sandbox from default features
      
      * Post-review changes
      
      * Add conversion soundness proof
      
      * Remove redundant prefix
      
      * Removes now redundant clone_inner
      
      * Add `Error::SandboxBackend`, refactor invoke result
      
      * Fix comments
      
      * Rename `Error::SandboxBackend` to `Sandbox`
      
      * Simplifies logic in `wasmer_backend::invoke`
      
      * Fixes memory management
      145abd79
    • Yarik Bratashchuk's avatar
      Upgradable contracts using `set_code` function (#10690) · e70ffbf4
      Yarik Bratashchuk authored
      * poc logic
      
      * set_code_hash impl, tests, benchmark
      
      * Address @xgreenx's comments
      
      * Move func defs closer to set_storage
      
      * Check if code exists
      
      - increment/decrement codehash refcount
      
      * Document error for non-existing code hash
      
      * Revert unrelated change
      
      * Changes due to @athei's review
      
      * Fix error handling
      
      - comment errors: ReturnCodes
      - update mock ext implementation
      - return Error::CodeNotFound when no code for such hash
      
      * Emit ContractCodeUpdated when setting new code_hash
      
      * Address @athei
      
      's comments
      
      * Move related defs to the bottom
      
      * Minor comment update
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Improve docs
      
      * Improve docs
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Refactor set_code_hash test
      
      * Minor change to benchmark
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Minor change to benchmark
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Minor comment refactor
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Address @HCastano
      
      's comments
      
      * Update seal_set_code_hash comment
      
      Co-authored-by: default avatarHernando Castano <[email protected]>
      
      * Move set_code_hash after delegate_call
      
      * Move function to the bottom
      
      * Moved and changed banchmark, added verify block
      
      * Bring back previous benchmark
      
      * Remove skip_meta for seal_set_code_hash
      
      * Bring back skip_meta for seal_set_storage_per_new_kb
      
      * Apply weights
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarHernando Castano <[email protected]>
      e70ffbf4
  2. Feb 10, 2022
    • Zeke Mostov's avatar
      pallet-staking: Add extrinsic `force_apply_min_commission` (#10786) · 83eed801
      Zeke Mostov authored
      
      
      * pallet-staking: Add extrinsic `force_apply_min_commission`
      
      * Add benchmarks
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Bound iteration by  max_validator_count
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Only apply to 1 validator
      
      * Update doc comments
      
      * Uncomment tests
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Accept signed origins
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Remove contains_key check
      
      * Add test for try_mutate_exists
      
      * Impove try_mutate_exists docs
      
      * Delete redundant try_mutate_exists tests;
      
      * Delete residual from removed test
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Return an error when the stash does not exist
      
      * Update try_mutate_exist doc wording
      
      * Update frame/staking/src/pallet/mod.rs
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      83eed801
    • Bastian Köcher's avatar
      UncheckedExtrinsic: Harden decode and clarify `EXTRINSIC_FORMAT_VERSION` (#10829) · 20b2bba1
      Bastian Köcher authored
      * UncheckedExtrinsic: Harden decode and clarify `EXTRINSIC_FORMAT_VERSION`
      
      * Apply suggestions from code review
      20b2bba1
    • Shawn Tabrizi's avatar
      Allow `SetBalance` to handle error when trying to kill acount with reference counter. (#10826) · 8d783038
      Shawn Tabrizi authored
      * bug found
      
      * fix logic
      
      * a little simpler
      
      * add test
      8d783038
  3. Feb 09, 2022
  4. Feb 08, 2022
  5. Feb 07, 2022
  6. 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
  7. Feb 05, 2022
  8. Feb 04, 2022
  9. Feb 03, 2022
  10. Feb 02, 2022
  11. Feb 01, 2022
  12. Jan 31, 2022
  13. Jan 28, 2022
  14. Jan 27, 2022
    • Davide Galassi's avatar
      Add stale branches heads to finality notifications (#10639) · 7f3bb8d0
      Davide Galassi authored
      
      
      * Add stale branches heads to finality notifications
      
      Warning. Previous implementation was sending a notification for
      each block between the previous (explicitly) finalized block and
      the new finalized one (with an hardcoded limit of 256).
      
      Now finality notification is sent only for the new finalized head and it
      contains the hash of the new finalized head, new finalized head header,
      a list of all the implicitly finalized blocks and a list of stale
      branches heads (i.e. the branches heads that are not part of the
      canonical chain anymore).
      
      * Add implicitly finalized blocks list to `ChainEvent::Finalized` message
      
      The list contains all the blocks between the previously finalized block
      up to the parent of the currently finalized one, sorted by block number.
      
      `Finalized` messages handler, part of the `MaintainedTransactionPool`
      implementation for `BasicPool`, still propagate full set of finalized
      blocks to the txpool by iterating over implicitly finalized blocks list.
      
      * Rust fmt
      
      * Greedy evaluation of `stale_heads` during finalization
      
      * Fix outdated assumption in a comment
      
      * Removed a test optimization that is no more relevant
      
      The loop was there to prevent sending to
      `peer.network.on_block_finalized` the full list of finalized blocks.
      
      Now only the finalized heads are received.
      
      * Last finalized block lookup not required anymore
      
      * Tests for block finality notifications payloads
      
      * Document a bit tricky condition to avoid duplicate finalization notifications
      
      * More idiomatic way to skip an iterator entry
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Cargo fmt iteration
      
      * Typo fix
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Fix potential failure when a finalized orphan block is imported
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      7f3bb8d0
    • Kian Paimani's avatar
      better way to resolve `Phase::Emergency` via governance (#10663) · 498c3a5e
      Kian Paimani authored
      
      
      * better way to resolve Phase::Emergency via governance
      
      * Update frame/election-provider-multi-phase/src/lib.rs
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * review grumbles
      
      * Update frame/election-provider-support/src/onchain.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * revert usize -> u32
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      498c3a5e