Skip to content
  • achimcc's avatar
    Contracts pallet: removal on idle (#11202) · f744a1a0
    achimcc authored
    
    
    * on_initialize -> on_idle
    
    * use remaining_weight info
    
    * no weight_limit for on_idle
    
    * call on_idle in tests
    
    * attempt to fix tests
    
    * run on_initiaize when queue full
    
    * add on_idle to weight info
    
    * add on_idle weight info to on_idle hook
    
    * add basic test for on_initialize with full queue
    
    * disbale check for all keys gone in full queue, full block test
    
    * queue_deth as usize, add comment
    
    * comment was removed by accident
    
    * Update frame/contracts/src/lib.rs
    
    Co-authored-by: default avatarAlexander Theißen <[email protected]>
    
    * cargo +nightly fmt
    
    * update lazy_removal_does_no_run_on_full_queue_and_full_block
    
    * remove changes in weights.rs
    
    * weights on_idle -> on_process_deletion_queue_batch
    
    * use block number for on_idle
    
    * use BlockNumber for on_initialize
    
    * 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
    
    * Update frame/contracts/src/lib.rs
    
    Co-authored-by: default avatarAlexander Theißen <[email protected]>
    
    * remove outcommented code
    
    * add check that queue still full for test
    
    * cargo fmt
    
    * cargo +nightly fmt
    
    * Update frame/contracts/src/benchmarking/mod.rs
    
    Co-authored-by: default avatarAlexander Gryaznov <[email protected]>
    
    * fix weights.rs
    
    * add lazy_removal_does_no_run_on_low_remaining_weight test
    
    * Apply suggestions from code review
    
    Co-authored-by: default avatarAlexander Gryaznov <[email protected]>
    
    Co-authored-by: default avatarAlexander Theißen <[email protected]>
    Co-authored-by: default avatarParity Bot <[email protected]>
    Co-authored-by: default avatarAlexander Gryaznov <[email protected]>
    f744a1a0