1. May 05, 2023
    • Liam Aharon's avatar
      try-runtime-cli: 'instant' snapshots, threading refactor, better progress logs (#14057) · ead46b9e
      Liam Aharon authored
      * remote externalities refactor
      
      * remove redundant logs
      
      * use const for parallel requests
      
      * prefer functional
      
      * improve variable naming
      
      * handle requests error
      
      * use overlayedchanges
      
      * Revert "use overlayedchanges"
      
      This reverts commit c0ddb87a5abdd52207597f5df66cbbdf9d79badc.
      
      * Revert "Revert "use overlayedchanges""
      
      This reverts commit 1d49362d9b999c045c8f970a0ab8b486bc47a90a.
      
      * Revert "Revert "Revert "use overlayedchanges"""
      
      This reverts commit 06df786488d94f249e9abccffac4af445f76e5a7.
      
      * backup/load raw storage values
      
      * test raw storage drain and restore
      
      * update snapshot tests
      
      * improve logs
      
      * clippy suggestions
      
      * address comments
      
      * fix example
      
      * fix test
      
      * clippy
      ead46b9e
  2. May 04, 2023
    • Bastian Köcher's avatar
      Improve handling of unset `StorageVersion` (#13417) · e2547f50
      Bastian Köcher authored
      
      
      * Improve handling of unset `StorageVersion`
      
      When a user is forgetting to set the storage version in a pallet and calls
      `current_storage_version` to compare it against the `on_chain_storage_version` it will now fail to
      compile the code. Before the pallet macro just returned `StorageVersion::default()` for
      `current_storage_version` leading to potential issues with migrations. Besides that it also checks
      in `post_upgrade` that the pallet storage version was upgraded and thus, no migration was missed.
      
      * Use correct `Cargo.lock`
      
      * Fixes
      
      * Fix test
      
      * Update frame/support/test/tests/pallet.rs
      
      * Ensure we don't set a storage version when the pallet is missing the attribute
      
      * Fix merge conflict
      
      * Update frame/support/procedural/src/pallet/expand/hooks.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/support/procedural/src/pallet/expand/hooks.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Fix compilation
      
      * Do not run everything with `try-runtime`
      
      * Fix test
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Fix `no-metadata-docs`
      
      ---------
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: parity-processbot <>
      e2547f50
    • Ross Bulat's avatar
      add fast unstake (#14077) · 0e55bace
      Ross Bulat authored
      Co-authored-by: parity-processbot <>
      0e55bace
    • Liam Aharon's avatar
      fungible conformance tests: Inspect and Mutate (#13852) · 9c53fd72
      Liam Aharon authored
      
      
      * typo
      
      * - create test files for each fungile trait
      - begin implementing tests for the Inspect trait
      
      * wrap inspect tests in a macro
      
      * first run of mutate tests
      
      * move test implementation out of ballances
      
      * make tests more generic
      
      * transfer tests
      
      * combine inspect and mutate tests
      
      * set balance failing tests
      
      * can_deposit tests
      
      * can_withdraw tests
      
      * test reducible_balance
      
      * remove balanced stub
      
      * revert set_balance return val fix
      
      * typo
      
      * macro and dust trap tests
      
      * disable test when it doesn't make sense
      
      * remove debug comment
      
      * reduce macro boilerplate
      
      * improved var naming
      
      * improve variable naming
      
      * remove redundant comment
      
      * remove placeholder tests
      
      * remove placeholder tests
      
      * simplify macro
      
      * Update frame/balances/src/tests/fungible_conformance_tests.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * use Balance from T
      
      * fix copyright
      
      * add test doc comments
      
      * improve test naming
      
      * clippy
      
      * fix rustdoc errors
      
      * fix rustdoc
      
      * improve macro
      
      * improve variable naming
      
      * remove redundant comment
      
      * use path
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      9c53fd72
    • Michal Kucharczyk's avatar
      substrate-test-runtime migrated to "pure" frame runtime (#13737) · 6a295e7c
      Michal Kucharczyk authored
      * substrate-test-runtime migrated to pure-frame based
      
      * test block builder: helpers added
      
      * simple renaming
      
      * basic_authorship test adjusted
      
      * block_building storage_proof test adjusted
      
      * babe: tests: should_panic expected added
      
      * babe: tests adjusted
      
      ConsensusLog::NextEpochData is now added by pallet_babe as
      pallet_babe::SameAuthoritiesForever trigger is used in runtime config.
      
      * beefy: tests adjusted
      
      test-substrate-runtime is now using frame::executive to finalize the
      block. during finalization the digests stored during block execution are
      checked against header digests:
      https://github.com/paritytech/substrate/blob/91bb2d29ca905599098a5b35eaf24867c4fbd60a/frame/executive/src/lib.rs#L585-L591
      
      It makes impossible to directly manipulate header's digets, w/o
      depositing logs into system pallet storage `Digest<T: Config>`.
      
      Instead of this dedicated extrinsic allowing to store logs items
      (MmrRoot / AuthoritiesChange) is used.
      
      * grandpa: tests adjusted
      
      test-substrate-runtime is now using frame::executive to finalize the
      block. during finalization the digest logs stored during block execution are
      checked against header digest logs:
      https://github.com/paritytech/substrate/blob/91bb2d29ca905599098a5b35eaf24867c4fbd60a/frame/executive/src/lib.rs#L585-L591
      
      
      
      It makes impossible to directly manipulate header's digets, w/o
      depositing logs into system pallet storage `Digest<T: Config>`.
      
      Instead of this dedicated extrinsic allowing to store logs items
      (ScheduledChange / ForcedChange and DigestItem::Other) is used.
      
      * network:bitswap: test adjusted
      
      The size of unchecked extrinsic was increased. The pattern used in test will
      be placed at the end of scale-encoded buffer.
      
      * runtime apis versions adjusted
      
      * storage keys used in runtime adjusted
      
      * wasm vs native tests removed
      
      * rpc tests: adjusted
      
      Transfer transaction processing was slightly improved, test was
      adjusted.
      
      * tests: sizes adjusted
      
      Runtime extrinsic size was increased. Size of data read during block
      execution was also increased due to usage of new pallets in runtime.
      
      Sizes were adjusted in tests.
      
      * cargo.lock update
      
      cargo update -p substrate-test-runtime -p substrate-test-runtime-client
      
      * warnings fixed
      
      * builders cleanup: includes / std
      
      * extrinsic validation cleanup
      
      * txpool: benches performance fixed
      
      * fmt
      
      * spelling
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * Apply code review suggestions
      
      * Apply code review suggestions
      
      * get rid of 1063 const
      
      * renaming: UncheckedExtrinsic -> Extrinsic
      
      * test-utils-runtime: further step to pure-frame
      
      * basic-authorship: tests OK
      
      * CheckSubstrateCall added + tests fixes
      
      * test::Transfer call removed
      
      * priority / propagate / no sudo+root-testing
      
      * fixing warnings + format
      
      * cleanup: build2/nonce + format
      
      * final tests fixes
      
      all tests are passing
      
      * logs/comments removal
      
      * should_not_accept_old_signatures test removed
      
      * make txpool benches work again
      
      * Cargo.lock reset
      
      * format
      
      * sudo hack removed
      
      * txpool benches fix+cleanup
      
      * .gitignore reverted
      
      * rebase fixing + unsigned cleanup
      
      * Cargo.toml/Cargo.lock cleanup
      
      * force-debug feature removed
      
      * mmr tests fixed
      
      * make cargo-clippy happy
      
      * network sync test uses unsigned extrinsic
      
      * cleanup
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * push_storage_change signed call remove
      
      * GenesisConfig cleanup
      
      * fix
      
      * fix
      
      * GenesisConfig simplified
      
      * storage_keys_works: reworked
      
      * storage_keys_works: expected keys in vec
      
      * storage keys list moved to substrate-test-runtime
      
      * substrate-test: some sanity tests + GenesisConfigBuilder rework
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Apply suggestions from code review
      
      * Review suggestions
      
      * fix
      
      * fix
      
      * beefy: generate_blocks_and_sync block_num sync with actaul value
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * Update test-utils/runtime/src/genesismap.rs
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * cargo update -p sc-rpc -p sc-transaction-pool
      
      * Review suggestions
      
      * fix
      
      * doc added
      
      * slot_duration adjusted for Babe::slot_duration
      
      * small doc fixes
      
      * array_bytes::hex used instead of hex
      
      * tiny -> medium name fix
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      
      * TransferData::try_from_unchecked_extrinsic -> try_from
      
      * Update Cargo.lock
      
      ---------
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      6a295e7c
    • Davide Galassi's avatar
      Refinements to VRF types (#14036) · 3a90728d
      Davide Galassi authored
      * Allow extra signing data
      
      * Fix tests after renaming
      
      * Rename VrfSecret/VrfVerifier to VrfSecret/VrfPublic
      
      * Further encrapsulation of 'transcript' type to the sr25519 implementation
      
      * Keystore sr25519 pre-output
      
      * Leave additional custom input field hidden in the associated VrfInput type
      
      * Fix test
      
      * More ergonomic output_bytes
      
      * Trigger pipeline
      
      * Define a separated type for vrf signature data
      
      * Fix docs
      
      * Fix doc
      
      * Remove annotation
      
      * Directly use dleq_proove and dleq_verify in sr25519
      
      * Trigger CI
      
      * Remove cruft before merge
      3a90728d
    • Vladimir Istyufeev's avatar
    • Arkadiy Paronyan's avatar
      Statement store (#13701) · bfafbf7b
      Arkadiy Paronyan authored
      
      
      * WIP Statement store
      
      * Sync with networking changes in master
      
      * WIP statement pallet
      
      * Statement validation
      
      * pallet tests
      
      * Validation queue
      
      * Store maintenance
      
      * Basic statement refactoring + tests + docs
      
      * Store metrics
      
      * Store tests
      
      * Store maintenance test
      
      * cargo fmt
      
      * Build fix
      
      * OCW Api
      
      * Offchain worker
      
      * Enable host functions
      
      * fmt
      
      * Minor tweaks
      
      * Fixed a warning
      
      * Removed tracing
      
      * Manual expiration
      
      * Reworked constraint management
      
      * Updated pallet constraint calculation
      
      * Added small test
      
      * Added remove function to the APIs
      
      * Copy-paste spec into readme
      
      * Comments
      
      * Made the store optional
      
      * Removed network protocol controller
      
      * fmt
      
      * Clippy fixes
      
      * fmt
      
      * fmt
      
      * More clippy fixes
      
      * More clippy fixes
      
      * More clippy fixes
      
      * Update client/statement-store/README.md
      
      Co-authored-by: default avatarcheme <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Removed sstore from node-template
      
      * Sort out data path
      
      * Added offline check
      
      * Removed dispatch_statement
      
      * Renamed into_generic
      
      * Fixed commit placement
      
      * Use HashSet for tracking peers/statements
      
      * fmt
      
      * Use ExtendedHostFunctions
      
      * Fixed benches
      
      * Tweaks
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarcheme <[email protected]>
      
      * Fixed priority mixup
      
      * Rename
      
      * newtypes for priorities
      
      * Added MAX_TOPICS
      
      * Fixed key filtering logic
      
      * Remove empty entrie
      
      * Removed prefix from signing
      
      * More documentation
      
      * fmt
      
      * Moved store setup from sc-service to node
      
      * Handle maintenance task in sc-statement-store
      
      * Use statement iterator
      
      * Renamed runtime API mod
      
      * fmt
      
      * Remove dump_encoded
      
      * fmt
      
      * 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]>
      
      * Fixed build after applying review suggestions
      
      * License exceptions
      
      * fmt
      
      * Store options
      
      * Moved pallet consts to config trait
      
      * Removed global priority
      
      * Validate fields when decoding
      
      * Limit validation channel size
      
      * Made a comment into module doc
      
      * Removed submit_encoded
      
      ---------
      
      Co-authored-by: default avatarcheme <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      bfafbf7b
  3. May 03, 2023
    • Niklas Adolfsson's avatar
      rpc server: break legacy CLI options and remove "backward compatible HTTP server" (#13384) · 5a107471
      Niklas Adolfsson authored
      
      
      * jsonrpsee v0.16
      
      * breaking: remove old CLI configs
      
      * remove patch.crates-io
      
      * fix bad merge
      
      * fix clippy
      
      * fix bad merge
      
      * fix grumbles
      
      * Update client/service/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * revert block_in_place
      
      * add issue link in todo
      
      * Update client/cli/src/config.rs
      
      Co-authored-by: default avatarDmitry Markin <[email protected]>
      
      * grumbles: add ipv6 loopback address
      
      * Revert "grumbles: add ipv6 loopback address"
      
      This reverts commit 3a0b1ece6c4e36055d666896c29d1da55ffa1c4f.
      
      * remove nits
      
      * bump zombienet version
      
      * adress grumbles: provide structopt default_val_t
      
      * remove duplicate from structopt
      
      * bump zombienet v1.3.47
      
      * bump zombienet version
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarDmitry Markin <[email protected]>
      Co-authored-by: default avatarJavier Viola <[email protected]>
      5a107471
    • juangirini's avatar
      contracts: add events to ContractResult (#13807) · b8a01127
      juangirini authored
      * contracts: add events to ContractResult
      
      * contracts: add encoded events to ContractResult
      
      * contracts: add generic Event to ContractResult
      
      * contracts: test bare_call events
      
      * contracts: update bare_call test name
      
      * contracts: add better comments to dry run events
      
      * contracts: fix pallet contracts primitives implementation
      
      * contracts: add EventRecord generic to ContractInstantiateResult
      
      * contracts: make event collection optional
      
      * contracts: impreved notes on `collect_events`
      
      * contracts: update benchmarking calls
      
      * contracts: change bare_call and bare_instantiate to accept enums instead of bools
      
      * contracts: add partial eq to new enums
      
      * contracts: improve comments
      
      * contracts: improve comments
      
      * contracts: fix bare_call benchmarking
      
      * contracts: fix bare call and instantiate in impl_runtime_apis
      
      * contracts: add api versioning to new ContractsApi functions
      
      * contracts: modify api versioning to new ContractsApi functions
      
      * contracts: create new contracts api trait
      
      * contracts: clean up code
      
      * contracts: remove the contract results with events
      
      * contracts: undo contracts api v3
      
      * contracts: remove commented out code
      
      * contracts: add new test bare call result does not return events
      
      * contracts: add code review improvements
      
      * contracts: remove type imports
      
      * contracts: minor code review improvements
      b8a01127
    • Bastian Köcher's avatar
      test-staking-e2e: Add to main `Cargo.toml`. (#14062) · 13cab3a4
      Bastian Köcher authored
      This ensures that it is actually tested as part of the CI. There is also no need to have it separate.
      13cab3a4
    • Sebastian Kunert's avatar
      Only calculate tree route during finalization when there are multiple leaves (#14067) · d3b3a46d
      Sebastian Kunert authored
      
      
      * Only calculate tree route when there are multiple leaves
      
      * Update client/service/src/client/client.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      d3b3a46d
    • Mira Ressel's avatar
      Don't run `check-crates-publishing` job on prs (#14064) · 45a86476
      Mira Ressel authored
      * Restore `check-crates-publishing-pipeline` job
      
      This job was errorneously deleted in lieu of the
      `check-crates-publishing` job.
      
      This reverts commit 202836cb.
      
      * Don't run `check-crate-publishing` job on prs.
      
      Originally attempted in #14044. It's been broken for a while and we're
      not sure yet how to move forward in the longer term.
      45a86476
  4. May 02, 2023
  5. May 01, 2023
  6. Apr 29, 2023
  7. Apr 28, 2023
  8. Apr 27, 2023
  9. Apr 26, 2023
    • Gavin Wood's avatar
      Various minor fixes (#13945) · 781ea7cb
      Gavin Wood authored
      
      
      * Fix: Incorrect implementation of can_reserve check
      
      * Fix: Incorrect migration of consumer counting for existing accounts with frozen amounts
      
      * Fix: Inconsistent implementation between assets can_deposit and new_account
      
      * Fixes
      
      * Fixes
      
      * Another fix
      
      * Update tests.rs
      
      * Update fungible_tests.rs
      
      * Use `can_accrue_consumers` in the body of `can_inc_consumer`
      
      ---------
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: parity-processbot <>
      781ea7cb
    • Sasha Gryaznov's avatar
      fix a test (#14021) · 356b752d
      Sasha Gryaznov authored
      356b752d
    • Qinxuan Chen's avatar
      bed8c87c
    • Sasha Gryaznov's avatar
      [contracts] Port host functions to Weight V2 and storage deposit limit (#13565) · 60310de7
      Sasha Gryaznov authored
      
      
      * added [unstable][seal2] call()
      
      * updated test to cover new seal_call proof_limit
      
      * docs updated
      
      * add [seal2][unstable] instantiate() and test
      
      * add [seal2][unstable] weight_to_fee() + docs and test
      
      * add [seal2][unstable] gas_left() + docs and test
      
      * update benchmarks
      
      * add DefaultDepositLimit to pallet Config
      
      * specify deposit limit for nested call
      
      add test for nested call deposit limit
      
      save: separate deposit limit for nested calls
      
      * specify deposit limit for nested instantiate
      
      save: works with test
      
      cleaned up debugging outputs
      
      * update benchmarks
      
      * added missing fixtures
      
      * fix benches
      
      * pass explicit deposit limit to storage bench
      
      * explicit deposit limit for another set_storage bench
      
      * add more deposit limit for storage benches
      
      * moving to simplified benchmarks
      
      * moved to simplified benchmarks
      
      * fix seal_weight_to_fee bench
      
      * fix seal_instantiate benchmark
      
      * doc typo fix
      
      * default dl for benchmarking
      
      more dl for tests
      
      dl for tests to max
      
      deposit_limit fix in instantiate bench
      
      fix instantiate bench
      
      fix instantiate benchmark
      
      fix instantiate bench again
      
      remove dbg
      
      fix seal bench again
      
      fixing it still
      
      seal_instantiate zero deposit
      
      less runs to check if deposit enough
      
      try
      
      try 2
      
      try 3
      
      try 4
      
      * max_runtime_mem to Schedule limits
      
      * add default deposit limit fallback check to test
      
      * weight params renaming
      
      * fmt
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      
      * prettify inputs in tests
      
      * typestate param refactored
      
      ---------
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      60310de7
  10. Apr 25, 2023
    • Squirrel's avatar
      01c66da0
    • gupnik's avatar
      Removes ReportsByKindIndex (#13936) · 6c8acaa5
      gupnik authored
      * Removes ReportsByKind
      
      * Minor build fixes
      
      * adds migration
      
      * Addresses review comment
      
      * Uses clear but weight check fails
      
      * Uses unique
      
      * Updates test to commit the change before migration
      
      * Uses reads_writes
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Fixes build
      
      * Addresses review comments
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * fixes typo
      
      ---------
      
      Co-authored-by: command-bot <>
      6c8acaa5