1. Nov 15, 2022
    • Artemka374's avatar
      `seal_reentrant_count` returns contract reentrant count (#12695) · 103ea38f
      Artemka374 authored
      * Add logic, test, broken benchmark
      
      * account_entrance_count
      
      * Addressing comments
      
      * Address @agryaznov
      
      's comments
      
      * Add test for account_entrance_count, fix ci
      
      * Cargo fmt
      
      * Fix tests
      
      * Fix tests
      
      * Remove delegated call from test, address comments
      
      * Minor fixes and indentation in wat files
      
      * Update test for account_entrance_count
      
      * Update reentrant_count_call test
      
      * Delegate call test
      
      * Cargo +nightly fmt
      
      * Address comments
      
      * Update reentrant_count_works test
      
      * Apply weights diff
      
      * Add fixture descriptions
      
      * Update comments as suggested
      
      * Update reentrant_count_call test to use seal_address
      
      * add missing code
      
      * cargo fmt
      
      * account_entrance_count -> account_reentrance_count
      
      * fix tests
      
      * fmt
      
      * normalize signatures
      
      Co-authored-by: default avataryarikbratashchuk <[email protected]>
      103ea38f
    • Anthony Alaribe's avatar
      Asset Pallet: Support repeated destroys to safely destroy large assets (#12310) · 679d2dcd
      Anthony Alaribe authored
      
      
      * Support repeated destroys to safely destroy large assets
      
      * require freezing accounts before destroying
      
      * support only deleting asset as final stage when there's no assets left
      
      * pre: introduce the RemoveKeyLimit config parameter
      
      * debug_ensure empty account in the right if block
      
      * update to having separate max values for accounts and approvals
      
      * add tests and use RemoveKeyLimit constant
      
      * add useful comments to the extrinsics, and calculate returned weight
      
      * add benchmarking for start_destroy and finish destroy
      
      * push failing benchmark logic
      
      * add benchmark tests for new functions
      
      * update weights via local benchmarks
      
      * remove extra weight file
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/assets/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * effect some changes from codereview
      
      * use NotFrozen error
      
      * remove origin checks, as anyone can complete destruction after owner has begun the process; Add live check for other extrinsics
      
      * fix comments about Origin behaviour
      
      * add AssetStatus docs
      
      * modularize logic to allow calling logic in on_idle and on_initialize hooks
      
      * introduce simple migration for assets details
      
      * reintroduce logging in the migrations
      
      * move deposit_Event out of the mutate block
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/assets/src/migration.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * move AssetNotLive checkout out of the mutate blocks
      
      * rename RemoveKeysLimit to RemoveItemsLimit
      
      * update docs
      
      * fix event name in benchmark
      
      * fix cargo fmt.
      
      * fix lint in benchmarking
      
      * Empty commit to trigger CI
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * effect change suggested during code review
      
      * move limit to a single location
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * rename events
      
      * fix weight typo, using rocksdb instead of T::DbWeight. Pending generating weights
      
      * switch to using dead_account.len()
      
      * rename event in the benchmarks
      
      * empty to retrigger CI
      
      * trigger CI to check cumulus dependency
      
      * trigger CI for dependent cumulus
      
      * Update frame/assets/src/migration.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * move is-frozen to the assetStatus enum (#12547)
      
      * add pre and post migration hooks
      
      * update do_transfer logic to add new assert for more correct error messages
      
      * trigger CI
      
      * switch checking AssetStatus from checking Destroying state to checking live state
      
      * fix error type in tests from Frozen to AssetNotLive
      
      * trigger CI
      
      * change ensure check for fn reducible_balance()
      
      * change the error type to Error:<T,I>::IncorrectStatus to be clearer
      
      * Trigger CI
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      679d2dcd
    • Amar Singh's avatar
      Make public is_passing and ReferendumStatus (#12667) · 8fef631a
      Amar Singh authored
      * init
      
      * clean
      
      * remove manual getter for ReferendumStatus in favor of changing pub crate to pub for ReferendumStatus DecidingStatus Deposit types
      
      * rm status getters because fields are pub now
      8fef631a
    • Alexander Samusev's avatar
      a9e85ecd
  2. Nov 14, 2022
  3. Nov 13, 2022
  4. Nov 11, 2022
  5. Nov 10, 2022
  6. Nov 09, 2022
  7. Nov 08, 2022
  8. Nov 07, 2022
    • Aaro Altonen's avatar
      Do not update peer information if ancestor search is in progress (#12631) · df544635
      Aaro Altonen authored
      * Do not update peer information if ancestor search is in progress
      
      If block announcement is received from a peer while ancestor search
      for that same peer is still in progress, do not update the peer's best
      hash and best number as that causes the ancestor search to yield
      different information from what was expected and can cause, for example,
      a fork of lower height not be be downloaded.
      
      * Block until peers are in sync
      df544635
    • Michal Kucharczyk's avatar
      BlockId removal: &Hash to Hash (#12626) · 1ed70004
      Michal Kucharczyk authored
      It changes &Block::Hash argument to Block::Hash.
      
      This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
      1ed70004
    • Sam Johnson's avatar
      Add pallet dev mode (#12536) · 7c4bfc97
      Sam Johnson authored
      
      
      * stub for construct_dev_runtime!
      
      * revert
      
      * stub for dev_mode proc macro
      
      * preliminary docs for pallet::dev_mode (attribute) proc macro
      
      * add dev_mode to pallet_macros module
      
      * add docs item for dev_mode to frame_support
      
      * parsing of #[pallet(dev_mode)]
      
      * strip out dev_mode stub since it will be an arg for pallet instead
      
      * make pallet Def struct aware of dev mode
      
      * WIP
      
      * revert changes to call.rs
      
      * pass dev_mode to pallet parsing code
      
      * auto-specify default weights when in dev mode if not specified
      
      * add proof / expect for syn::parse in dev mode weight processing
      
      * set all storages to unbounded when in dev mode
      
      * just use 0
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * add invalid pallet arg test
      
      * add passing dev mode pallet test
      
      * add test confirming that dev mode features only work in dev mode
      
      * cargo fmt + clean up
      
      * bump CI
      
      * fix pallet ui test
      
      * add docs for dev mode
      
      * add warning about using dev mode in production circumstances
      
      * remove comment about no other attributes being supported
      
      * fix unneeded assignment
      
      * make warning more explicit
      
      * more explicit warning about using dev mode in production
      
      * simpler assignment for dev_mode boolean
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add note about MEL requirement
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add comment specifying why weights can be omitted in example
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * tweak wording of comments
      
      * bump ci
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      7c4bfc97
    • Michal Kucharczyk's avatar
      txpool: enactment state forced update (#12632) · cf5c78db
      Michal Kucharczyk authored
      * txpool: enactment state forced update
      
      When `tree_route` computation fails, we still need to update the
      `enactment_state` to be aligned with last known finalized/best block.
      
      We do not execute enactment phase of maintain procedure, but we do
      update the state.
      
      * error -> debug
      
      * test added
      cf5c78db