1. Jan 17, 2023
    • Gavin Wood's avatar
      XCM v3 (#4097) · 1a1bfd2a
      Gavin Wood authored
      
      
      * cargo fmt
      
      * Create benchmarks for XCM instructions introduced in v3 (#4564)
      
      * Create benchmarks for BurnAsset and ExpectAsset
      
      * Add benchmarks for ExpectOrigin and ExpectError
      
      * Add benchmarks for QueryPallet and ExpectPallet
      
      * Add benchmarks for ReportTransactStatus and ClearTransactStatus
      
      * cargo fmt
      
      * Use AllPalletsWithSystem in mocks
      
      * Update XCM generic benchmarks for westend
      
      * Remove default impls for some XCM weight functions
      
      * Fix compilation error
      
      * Add weight_args helper attribute
      
      * Remove manually written XcmWeightInfo
      
      * Parse trailing comma
      
      * Revert "Add weight_args helper attribute"
      
      This reverts commit 3b7c47a6182e1b9227036c38b406d494c3fcf6fd.
      
      * Fixes
      
      * Fixes
      
      * XCM v3: Introduce querier field into `QueryReponse` (#4732)
      
      * Introduce querier field into QueryReponse
      
      * Convert &Option<MultiLocation> to Option<&MultiLocation>
      
      &Option<T> is almost always never quite useful, most of the time it
      still gets converted to an Option<&T> via `as_ref`, so we should simply
      make functions that accept Option<&T> instead.
      
      * Fix tests
      
      * cargo fmt
      
      * Fix benchmarks
      
      * Appease spellchecker
      
      * Fix test
      
      * Fix tests
      
      * Fix test
      
      * Fix mock
      
      * Fixes
      
      * Fix tests
      
      * Add test for response queriers
      
      * Update xcm/pallet-xcm/src/lib.rs
      
      * Test for non-existence of querier
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Fixes
      
      * Fixes
      
      * Add `starts_with` function to `MultiLocation` and `Junctions` (#4835)
      
      * add matches_prefix function to MultiLocation and Junctions
      
      * rename matches_prefix to starts_with
      
      * remove unnecessary main in doc comment
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Make use of starts_with in match_and_split
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * XCM v3: Bridge infrastructure (#4681)
      
      * XCM bridge infrastructure
      
      * Missing bit of cherry-pick
      
      * Revamped XCM proc macros; new NetworkIds
      
      * Fixes
      
      * Formatting
      
      * ExportMessage instruction and config type
      
      * Add MessageExporter definitions
      
      * Formatting
      
      * Missing files
      
      * Fixes
      
      * Initial bridging config API
      
      * Allow for two-stage XCM execution
      
      * Update xcm/src/v3/mod.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * XCM crate building again
      
      * Initial bridging primitive
      
      * Docs
      
      * Docs
      
      * More work
      
      * More work
      
      * Merge branch 'gav-xcm-v3' into gav-xcm-v3-bridging
      
      * Make build
      
      * WithComputedOrigin and SovereignPaidRemoteExporter
      
      * Remove TODOs
      
      * Slim bridge API and tests.
      
      * Fixes
      
      * More work
      
      * First bridge test passing
      
      * Formatting
      
      * Another test
      
      * Next round of bridging tests
      
      * Repot tests
      
      * Cleanups
      
      * Paid bridging
      
      * Formatting
      
      * Tests
      
      * Spelling
      
      * Formatting
      
      * Fees and refactoring
      
      * Fixes
      
      * Formatting
      
      * Refactor SendXcm to become two-phase
      
      * Fix tests
      
      * Refactoring of SendXcm and ExportXcm complete
      
      * Formatting
      
      * Rename CannotReachDestination -> NotApplicable
      
      * Remove XCM v0
      
      * Minor grumbles
      
      * Formatting
      
      * Formatting
      
      * Fixes
      
      * Fixes
      
      * Cleanup XCM config
      
      * Fee handling
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * Bump
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Bump Substrate
      
      * XCM v3: `ExchangeAsset` and Remote-locking (#4945)
      
      * Asset Exchange and Locks
      
      * Make sure XCM typers impl MaxEncodedLen
      
      * Basic implementation for locks
      
      * Bump Substrate
      
      * Missing files
      
      * Use new API
      
      * Introduce  instruction
      
      * Big refactor
      
      * Docs
      
      * Remove deprecated struct
      
      * Remove deprecated struct
      
      * Repot XCM builder tests
      
      * ExchangeAsset test
      
      * Exchange tests
      
      * Locking tests
      
      * Locking tests
      
      * Fixes and tests
      
      * Fixes
      
      * Formatting
      
      * Spelling
      
      * Add simulator test for remote locking
      
      * Fix tests
      
      * Bump
      
      * XCM v3: Support for non-fungibles (#4950)
      
      * NFT support and a test
      
      * New files.
      
      * Integration tests for sending NFTs
      
      * Formatting
      
      * Broken Cargo features
      
      * Use 2021 edition
      
      * Fixes
      
      * Formatting
      
      * Formatting
      
      * Update xcm/xcm-builder/src/asset_conversion.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update xcm/xcm-builder/src/nonfungibles_adapter.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update xcm/xcm-executor/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * XCM v3: Context & ID hash (#4756)
      
      * send_xcm returns message hash
      
      * cargo fmt
      
      * Create topic register and instructions
      
      * Fix weights
      
      * Use tabs
      
      * Sketch out XcmContext
      
      * Fix doc test
      
      * Add the XCM context as a parameter to executor trait fns
      
      * Fixes
      
      * Add XcmContext parameter
      
      * Revert adding context as an arg to SendXcm trait methods
      
      * Revert adding context argument to ConvertOrigin trait methods
      
      * cargo fmt
      
      * Do not change the API of XcmExecutor::execute
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Remove convenience method
      
      * Fixes
      
      * Fixes
      
      * cargo fmt
      
      * Fixes
      
      * Add benchmarks for XCM topic instructions
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
      
      * Remove context argument on FilterAssetLocation
      
      * Fixes
      
      * Remove unused import
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Accept XCM hash parameter in ExecuteXcm trait methods
      
      * cargo fmt
      
      * Properly enable sp-io/std
      
      * Fixes
      
      * default-features = false
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Make XcmContext optional in withdraw_asset
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Modify tests to check for the correct XCM hash
      
      * Small refactor
      
      * cargo fmt
      
      * Check for expected hash in xcm-builder unit tests
      
      * Add doc comment for the optionality of the XCM context in withdraw_asset
      
      * Update xcm/src/v3/traits.rs
      
      * Update xcm/src/v3/traits.rs
      
      * Store XcmContext and avoid rebuilding
      
      * Use ref for XcmContext
      
      * Formatting
      
      * Fix incorrect hash CC @KiChjang
      
      
      
      * Refactor and make clear fake hashes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fix broken hashing
      
      * Docs
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Remove unknowable hash
      
      * Formatting
      
      * Use message hash for greater identifiability
      
      * Formatting
      
      * Fixes
      
      * Formatting
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Formatting
      
      * Remove horrible names
      
      * Bump
      
      * Remove InvertLocation trait (#5092)
      
      * Remove InvertLocation trait
      
      * Remove unneeded functions
      
      * Formatting
      
      * Fixes
      
      * Remove XCMv1 (#5094)
      
      * Remove XCMv1
      
      * Remove XCMv1
      
      * Formatting
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * derive serialize/deserialize for xcm primitives (#5036)
      
      * derive serialize/deserialize for xcm primitives
      
      * derive serialize/deserialize for xcm primitives
      
      * update v3
      
      * update v2
      
      Co-authored-by: default avatarGav Wood <[email protected]>
      
      * Update lock
      
      * Fixes
      
      * Add benchmarks for the ExchangeAsset instruction
      
      * `AliasOrigin` instruction stub (#5122)
      
      * AliasOrigin instruction stub
      
      * Fixes
      
      * Fixes
      
      * Update substrate
      
      * Fixes
      
      * Ensure same array length before using copy_from_slice
      
      * Fixes
      
      * Add benchmarks for the UniversalOrigin instruction
      
      * Remove unused import
      
      * Remove unused import
      
      * Add benchmarks for SetFeesMode instruction
      
      * Add benchmarks for asset (un)locking instructions
      
      * Leave AliasOrigin unbenchmarked
      
      * Fixes after merge
      
      * cargo fmt
      
      * Fixes
      
      * Fixes
      
      * Set TrustedReserves to None on both Kusama and Westend
      
      * Remove extraneous reserve_asset_deposited benchmark
      
      * Fix universal_origin benchmark
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark pallet --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
      
      * Don't rely on skipped benchmark functions
      
      * Fixes
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark pallet --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
      
      * Fix unused variables
      
      * Fixes
      
      * Spelling
      
      * Fixes
      
      * Fix codec index of VersionedXcm
      
      * Allows to customize how calls are dispatched from XCM (#5657)
      
      * CallDispatcher trait
      
      * fmt
      
      * unused import
      
      * fix test-runtime
      
      * remove JustDispatch type
      
      * fix typo in test-runtime
      
      * missing CallDispatcher
      
      * more missing CallDispatcher
      
      * Update comment `NoteAssetLocked` -> `NoteUnlockable`
      
      * Fixes
      
      * Fixes
      
      * Adjust MultiAssets weights based on new wild card variants
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Some late fixes for XCMv3 (#5237)
      
      * Maximise chances that trapped assets can be reclaimed
      
      * Do origin check as part of ExportMessage for security
      
      * Formatting
      
      * Fixes
      
      * Cleanup export XCM APIs
      
      * Formatting
      
      * Update xcm/src/v3/junctions.rs
      
      * UnpaidExecution instruction and associated barrier.
      
      * Tighten barriers (ClearOrigin/QueryResponse)
      
      * Allow only 1 ClearOrigin instruction in AllowTopLevelPaidExecutionFrom
      
      * Bi-directional teleport accounting
      
      * Revert other fix
      
      * Build fixes]
      
      * Tests build
      
      * Benchmark fixes
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update Substrate
      
      * Re-export `pub` stuff from universal_exports.rs + removed unecessary clone (#6145)
      
      * Re-export `pub` stuff from universal_exports.rs
      
      * Removed unnecessary clone
      
      * Use 2D weights in XCM v3 (#6134)
      
      * Depend upon sp-core instead of sp-runtime
      
      * Make sp-io a dev-dependency
      
      * Use 2D weights in XCM v3
      
      * cargo fmt
      
      * Add XCM pallet migration to runtimes
      
      * Use from_parts
      
      * cargo fmt
      
      * Fixes
      
      * cargo fmt
      
      * Remove XCMWeight import
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Use translate in migration
      
      * Increase max upward message size in tests
      
      * Fix doc test
      
      * Remove most uses of from_ref_time
      
      * cargo fmt
      
      * Fixes
      
      * Fixes
      
      * Add extrinsic benchmarking to XCM pallet
      
      * cargo fmt
      
      * Fixes
      
      * Use old syntax
      
      * cargo fmt
      
      * Fixes
      
      * Remove hardcoded weights
      
      * Add XCM pallet to benchmarks
      
      * Use successful origin
      
      * Fix weird type parameter compilation issue
      
      * Fixes
      
      * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime rococo-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_xcm
      
      * Use benchmarked XCM pallet weights
      
      * Fixes
      
      * Fixes
      
      * Use override instead of skip
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_xcm
      
      * Fixes
      
      * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_xcm
      
      Co-authored-by: command-bot <>
      
      * Replace Weight::MAX with 100b weight units
      
      * Add test to ensure all_gte in barriers is correct
      
      * Update xcm/src/v3/junction.rs
      
      Co-authored-by: default avatarasynchronous rob <[email protected]>
      
      * Add more weight tests
      
      * cargo fmt
      
      * Create thread_local in XCM executor to limit recursion depth (#6304)
      
      * Create thread_local in XCM executor to limit recursion depth
      
      * Add unit test for recursion limit
      
      * Fix statefulness in tests
      
      * Remove panic
      
      * Use defer and environmental macro
      
      * Fix the implementation
      
      * Use nicer interface
      
      * Change ThisNetwork to AnyNetwork
      
      * Move recursion check up to top level
      
      * cargo fmt
      
      * Update comment
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Add upper limit on the number of overweight messages in the queue (#6298)
      
      * Add upper limit on the number of ovwerweight messages in the queue
      
      * Add newline
      
      * Introduce whitelist for Transact and limit UMP processing to 10 messages per block (#6280)
      
      * Add SafeCallFilter to XcmConfig
      
      * Limit UMP to receive 10 messages every block
      
      * Place 10 message limit on processing instead of receiving
      
      * Always increment the message_processed count whenever a message is processed
      
      * Add as_derivative to the Transact whitelist
      
      * cargo fmt
      
      * Fixes
      
      * Update xcm/xcm-builder/src/universal_exports.rs
      
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      
      * Fixes
      
      * Fixes
      
      * Remove topic register and instead use the topic field in XcmContext
      
      * Derive some common traits for DispatchBlobError
      
      * Fixes
      
      * cargo fmt
      
      * Fixes
      
      * Fixes
      
      * Fix comments
      
      * Fixes
      
      * Introduce WithOriginFilter and apply it as the CallDispatcher for runtimes
      
      * Fixes
      
      * Appease clippy and fixes
      
      * Fixes
      
      * Fix more clippy issues
      
      * Fixes
      
      * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_xcm
      
      * Add benchmark function for ExportMessage
      
      * Fix comment
      
      * Add upper limit to DownwardMessageQueues size
      
      * Add max size check for queue in can_queue_downward_message
      
      * Fixes
      
      * Make Transact runtime call configurable
      
      * Return Weight::MAX when there is no successful send XCM origin
      
      * Update substrate
      
      * Fixes
      
      * Fixes
      
      * Remove ExportMessage benchmark
      
      * Remove assertion on Transact instruction benchmark
      
      * Make reachable destination configurable in XCM pallet benchmarks
      
      * Fixes
      
      * Fixes
      
      * Remove cfg attribute in fuzzer
      
      * Fixes
      
      * Remove cfg attribute for XCM pallet in test runtime
      
      * Fixes
      
      * Use ReachableDest where possible
      
      * Fixes
      
      * Add benchmark for UnpaidExecution
      
      * Update substrate
      
      * Ensure benchmark functions pass filters
      
      * Add runtime-benchmarks feature to fuzzer
      
      * Ensure FixedRateOfFungible accounts for proof size weights
      
      * cargo fmt
      
      * Whitelist remark_with_event when runtime-benchmarks feature is enabled
      
      * Use remark_with_event for Transact benchmarks
      
      * Fix Cargo.lock
      
      * Allow up to 3 DescendOrigin instructions before UnpaidExecution
      
      * cargo fmt
      
      * Edit code comment
      
      * Check check_origin for unpaid execution privilege
      
      * Fixes
      
      * Small nits for xcm-v3 (#6408)
      
      * Add possibility to skip benchmark for export_message
      
      * ".git/.scripts/bench-bot.sh" xcm westend-dev pallet_xcm_benchmarks::generic
      
      * Revert
      
      * ".git/.scripts/bench-bot.sh" xcm westend-dev pallet_xcm_benchmarks::generic
      
      * Add HaulBlobError to `fn haul_blob`
      
      * ".git/.scripts/bench-bot.sh" xcm westend-dev pallet_xcm_benchmarks::generic
      
      Co-authored-by: command-bot <>
      
      * Revert changes to UnpaidExecution
      
      * Change AllowUnpaidExecutionFrom to be explicit
      
      * Fix log text
      
      * cargo fmt
      
      * Add benchmarks for XCM pallet version migration (#6448)
      
      * Add benchmarks for XCM pallet version migration
      
      * cargo fmt
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime rococo-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_xcm
      
      * Fix benchmarks
      
      * Fix benchmarks
      
      * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime rococo-dev pallet_xcm
      
      * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_xcm
      
      Co-authored-by: command-bot <>
      
      * Merge remote-tracking branch 'origin/master' into gav-xcm-v3
      
      * Fixes
      
      * Fix comments (#6470)
      
      * Specify Ethereum networks by their chain id (#6286)
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Use  for Kusama
      
      * Use WithComputedOrigin for Polkadot, Rococo and Westend
      
      * Update lock
      
      * Fix warning
      
      * Update xcm/pallet-xcm/src/tests.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update runtime/parachains/src/ump/migration.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update xcm/pallet-xcm/src/migration.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Fixes
      
      * cargo fmt
      
      * Typo
      
      * Update xcm/src/v3/mod.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Docs
      
      * Docs
      
      * Docs
      
      * Docs
      
      * Docs
      
      * Update xcm/src/v3/multiasset.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Add tests for MultiAssets::from_sorted_and_deduplicated
      
      * Fail gracefully when same instance NFTs are detected during push
      
      * Update Substrate to fix benchmarks
      
      * Apply suggestions from code review
      
      * Update runtime/kusama/src/xcm_config.rs
      
      * Rename arguments
      
      * Attempt to fix benchmark
      
      * ".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev runtime_parachains::ump
      
      * Use actual weights for UMP pallet in Polkadot
      
      * ".git/.scripts/commands/bench/bench.sh" runtime kusama-dev runtime_parachains::ump
      
      * ".git/.scripts/commands/bench/bench.sh" runtime westend-dev runtime_parachains::ump
      
      * ".git/.scripts/commands/bench/bench.sh" runtime rococo-dev runtime_parachains::ump
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarstanly-johnson <[email protected]>
      Co-authored-by: default avatarnanocryk <[email protected]>
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      Co-authored-by: default avatarasynchronous rob <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarVincent Geddes <[email protected]>
      Co-authored-by: default avatarSquirrel <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      1a1bfd2a
  2. Dec 08, 2022
  3. Dec 05, 2022
  4. Oct 26, 2022
  5. Oct 17, 2022
  6. Oct 11, 2022
    • Shawn Tabrizi's avatar
      Manual Para Lock (#5451) · bccffcad
      Shawn Tabrizi authored
      * remove para lock check for now
      
      * fmt
      
      * manual para lock
      
      * expose schedule_code_upgrade and set_current_head
      
      * extrinsics and benchmarks
      
      * use zero
      
      * add weights
      
      * fix variable name
      
      * add and fix comments
      
      * fix weights
      
      * add back default lock
      
      Co-authored-by: parity-processbot <>
      bccffcad
  7. Oct 05, 2022
  8. Sep 22, 2022
  9. Sep 12, 2022
  10. Sep 08, 2022
    • Ignacio Palacios's avatar
      Update Rococo to mirror Kusama (#5617) · 7f7f96a2
      Ignacio Palacios authored
      
      
      * upgrade to kusama base
      
      * rollback epoch and clean up
      
      * Substitue DOLLARS with UNITS
      
      * money constatns to mirror Kusama
      
      * fixing typo in test
      
      * scheduler+collective+membership+preimage
      
      * treasury+democracy+bounties+child_bounties+society
      
      * tips+claim+identity+elections_phragmen+vesting
      
      * recovery+gilt
      
      * proxy+slot+auction+registar+crowdloan
      
      * babe+epoch_time modificaction
      
      * xcm_config
      
      * xcm_config fix
      
      * constants
      
      * fix conflicts 2
      
      * fmt
      
      * update xcm_config
      
      * revert xcm_config change
      
      * fixing benchmarks
      
      * cargo.lock
      
      * Revert "babe+epoch_time modificaction"
      
      This reverts commit 663cb0292c42c8a084a8c1c36cb966389576989b.
      
      * fix benchamrks 2
      
      * fix benchmarks 3
      
      * typos
      
      * miscelaneous
      
      * fix constants test
      
      * rollback comments
      
      * rollback lease period
      
      * fmt
      
      * add ROC to spellcheck dictionary
      
      * fix cargo.toml + fixes
      
      * remove TODOs
      
      * nit fix
      
      * weights 1.5
      
      * Bumping number of perm/temp slots available
      
      Co-authored-by: default avataral3mart <[email protected]>
      Co-authored-by: default avataralvicsam <[email protected]>
      7f7f96a2
  11. Sep 02, 2022
  12. Sep 01, 2022
    • Shawn Tabrizi's avatar
      Companion for Weight v1.5 Follow Up (#5949) · e28bf2e4
      Shawn Tabrizi authored
      * updates
      
      * remove new
      
      * fix up some stuff
      
      * fix cargo files
      
      * fix
      
      * fix template
      
      * update lockfile for {"substrate"}
      
      * Update block_weights.rs
      
      * remove unused
      
      * remove unused
      
      Co-authored-by: parity-processbot <>
      e28bf2e4
  13. Aug 31, 2022
    • Shawn Tabrizi's avatar
      Companion for Weight v1.5 (#5943) · 28e94d97
      Shawn Tabrizi authored
      * fix to latest substrate pr
      
      * update weights
      
      * cargo build -p polkadot-runtime-parachains
      
      * fix xcm-builder
      
      * fix import
      
      * fix a bunch
      
      * fix a bunch of weight stuff
      
      * kusama compile
      
      * unused
      
      * builds
      
      * maybe fix
      
      * cargo test -p polkadot-runtime-parachains
      
      * xcm simulator example
      
      * fix tests
      
      * xcm sim fuzz
      
      * fix runtime tests
      
      * remove unused
      
      * fix integration tests
      
      * scalar div
      
      * update lockfile for {"substrate"}
      
      Co-authored-by: parity-processbot <>
      28e94d97
  14. Aug 25, 2022
    • Mara Broda's avatar
      update weights (#5911) · 83217b3e
      Mara Broda authored
      * rococo: update weigths
      
      * polkadot: update weigths
      
      * kusama: update weigths
      
      * westend: update weights
      
      Co-authored-by: parity-processbot <>
      83217b3e
  15. Aug 01, 2022
    • Mara Broda's avatar
      update weights (#5844) · cb82d217
      Mara Broda authored
      * westend: update weights
      
      * kusama: update weights
      
      * polkadot: update weights
      
      * rococo: update weights
      
      * update BlockExecutionWeight
      
      * kusama: readd phragmen remove_member_wrong_refund weight
      
      * polkadot: readd phragmen remove_member_wrong_refund weight
      cb82d217
  16. Jul 28, 2022
  17. Jun 21, 2022
    • Mara Broda's avatar
      update weights (#5704) · 8ef2b701
      Mara Broda authored
      * westend: update weights
      
      * kusama: update weights
      
      * polkadot: update weights
      
      * rococo: update weights
      8ef2b701
  18. May 30, 2022
    • Mara Broda's avatar
      update weights (#5601) · 3ea40ba1
      Mara Broda authored
      * polkadot: update weights
      
      * kusama: update weights
      
      * westend: update weights
      
      * rococo: update weights
      3ea40ba1
  19. May 12, 2022
    • Mara Broda's avatar
      update weights (#5507) · 5e458f6a
      Mara Broda authored
      * rococo: update weights
      
      * polkadot: update weights
      
      * kusama: update weights
      
      * westend: update weights
      5e458f6a
  20. May 05, 2022
  21. Apr 22, 2022
    • Mara Broda's avatar
      update weights (#5361) · bb3cc7b0
      Mara Broda authored
      * polkadot: update weights
      
      * kusama: update weights
      
      * rococo: update weights
      
      * westend: update weights
      bb3cc7b0
  22. Apr 06, 2022
  23. Mar 24, 2022
    • Sergei Shulepov's avatar
      paras: `include_pvf_check_statement` rt bench (#4938) · c8fda4f1
      Sergei Shulepov authored
      
      
      * paras: `include_pvf_check_statement` rt bench
      
      Resolves #4933
      
      This PR adds a benchmark for the `include_pvf_check_statement`
      dispatchable. This is a necessary step to make it work without
      modifications. That enables us to proceed with testing on Versi.
      
      This introduces 5 new benchmarks. Those measure performance of the
      `include_pvf_check_statement` under 2 different conditions:
      
      1. regular vote submission. That's the common case.
      2. submission of the last vote. That happens only once and leads to a
         heavy finalization stage.
      
      There are 2 different types of finalization (one for onboarding, one for
      upgrading) and there are two outcomes: accepted and rejected. Those 4
      are similar but I decided to cover them all and assign the maximum of
      all 4. This is to avoid a situation when one of those paths becomes more
      heavier than others and opens up an attack venue.
      
      The regular vote submission weight is drastically different from the
      submission last vote weight. That's why in case during runtime
      finalization was not executed the weight consumed value will be lowered
      down to the regular vote submission.
      
      The finalization weight is proportional to the number of "causes", i.e.
      the events that caused the PVF pre-checking vote in the first place, and
      here we assume that the maximum number of causes is 100.
      
      Theoretically, there is nothing that prevents an adversary to
      register/upgrade to more than 100 parachains. In that case, the consumed
      weight will be lower than the actual time consumed by the finalization
      process. That can enable a DoS vector.
      
      However, practically, it is not very possible. Right now it is very
      expensive to call `schedule_para_initialize` because it requires a very
      large lock up of funds. Moreover, finalizing a vote with 100 causes
      leads to around 31ms time spent. Finalizing more will require more time.
      However, finalizing with 200 causes will cause ≈62ms delay. This is not
      that bad since even though we had a full block and the adversary tried
      to finalize 200 causes it won't be able to even exceed the operational
      extrinsic boundary of 250ms and even if so it won't make big difference.
      
      That said, this should be addressed later on, esp. when we enable
      parathreads, which will make creating causes easier. One of potential
      solutions will be shifting the logic of finalization into
      `on_initialize`/`on_finalize`. Another is to create a maximum number of
      causes and then reject upgrades or onboardings if that was reached.
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --profile=production --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs
      
      * Fix import error
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarRobert Klotzner <[email protected]>
      Co-authored-by: default avatarLldenaurois <[email protected]>
      c8fda4f1
  24. Mar 22, 2022
    • Bruno Galvao's avatar
      add weights that need to be generated for rococo (#5052) · f8b979b7
      Bruno Galvao authored
      * add weights that need to be generated for rococo
      
      * remove frame_system
      
      * touch balances weight file
      
      * add empty im-online weight file
      
      * add empty pallet indices weight file
      
      * add empty pallet multisig weight file
      
      * add empty pallet proxy weight file
      
      * add empty pallet session weight file
      
      * add empty pallet timestamp weight file
      
      * add empty pallet utility weight file
      
      * add empty para pallets weight files
      
      * remove utility for now
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-im-online --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-multisig --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-proxy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_common_auctions.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-indices --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_common_paras_registrar.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_common_slots.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_configuration.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_hrmp.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::initializer --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_initializer.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs
      
      * update ump for weights sink_process_upward_message -> process_upward_message (#5103)
      
      * update ump for weights sink_process_upward_message -> process_upward_message
      
      * update autogen files
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::disputes --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_disputes.rs
      
      * add frame_system weights for Rococo
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * add pallet-utility runtime benchmarks
      
      * add utility benchmark
      
      * add utility pallet
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/
      
      * fix cargo format issues
      
      * add pallet_session weights
      
      - since pallet session benchmarking is coupled with pallet staking, for the time being we will use the weights from westend
      
      https://github.com/paritytech/polkadot/pull/5052#issuecomment-1072903719
      
      
      
      * remove newline
      
      * use some of the new weights
      
      * add pallet-utility/std
      
      * add collective and membership benchmarks
      
      * add WeightInfo
      
      * copy weights from Polkadot for now, needs to be updated with relevant weights
      
      * add weights
      
      * copy weights from Polkadot pallet session
      
      * remove newline
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarDan Shields <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      f8b979b7
  25. Feb 26, 2022
    • Falco Hirschenberger's avatar
      Add benchmarking for parachain runtime `ump` pallet (#3889) · fc919376
      Falco Hirschenberger authored
      
      
      * Claim grounds, not working yet.
      
      * still wip, nothing to see
      
      * Module visibility problem
      
      * Add benchmarks for all parachain-enabled chains
      
      * Add missing mock weights
      
      * Fix mock weight info
      
      * Add max-weight to extrinsic weight
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
      
      * sorting declarations
      
      * Use a maximum size message to benchmark worst-case
      
      * remove warning
      
      * Fix msg size overflow in tests
      
      * Use benchmarked weight in PostInfo
      
      * Update runtime/parachains/src/ump.rs
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      
      * Delete obsolete file
      
      * Compile fix
      
      * Fix spelling
      
      * Add benchmark for `UmpSink::process_upward_message`
      
      It benchmarks the time to process a message, mainly the size-dependent
      decoding time. This is used interally for refunding weight from
      `service_overweight`
      
      * Fix warning
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_ump.rs
      
      * Update runtime/parachains/src/ump.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Give mock weights for tests a name instead of ()
      
      * Add benchmark for `initializer_on_new_session` aka.
      `perform_outgoing_para_cleanup`
      
      * Remove unnescessary pub specifier and change folding to a for loop
      
      suggestions by @pepyakin
      
      
      
      * Update runtime/parachains/src/ump.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update runtime/parachains/src/ump.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Add comment on weight calculation and expected slight overestimation
      
      * Introduce a size bound constant for upward messages
      
      * Use KiB not kB for message size bound
      
      * Enforce max-message size bound
      
      * Use a const for upward message size bound.
      
      * Decrease max_upward_message_sizes to 50KiB as suggested by @pepyakin
      
      * Fix creating overweight messages
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_ump.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
      
      * Remove unused variable
      
      * Rename benchmark function to the function actually benchmarked and some
      code cleanup
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_ump.rs
      
      * Better variable naming
      
      * Fix build
      
      * Fix build
      
      * Fix some remarks from @pepyakin
      
      
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avataremostov <[email protected]>
      fc919376
  26. Jan 21, 2022
    • Kian Paimani's avatar
      HRMP benchmarks (#3876) · 3cb2d626
      Kian Paimani authored
      
      
      * wip template for hrmp benchmarks
      
      * add all of the benchmarks, first draft
      
      * File was not saved :/
      
      * cargo +nightly fmt
      
      * Use configs
      
      * add configs
      
      * Fix rococo
      
      * Final touches
      
      * revert fmt changes, one last time
      
      * Fix wrappings
      
      * Fix a bunch of tests
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs
      
      * add to westend
      
      * actually use everything
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_hrmp.rs
      
      * Update runtime/parachains/src/hrmp.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * use real weight in wnd
      
      * reorg
      
      * minor cleanup
      
      * weigh some of the internal stuff as well
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_hrmp.rs
      
      * add files
      
      * Master.into()
      
      * add validation
      
      * fmt
      
      * fmt
      
      * final fixes
      
      * all runtimes build
      
      * undo formatting
      
      * Update runtime/parachains/src/hrmp.rs
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * non-controversial changes
      
      * do it the parachain-way: use const instead of type configs for simplicity.
      
      * borrow assert_storage_consistency_exhaustive
      
      * move assert_storage_consistency_exhaustive to Pallet, so it can be reused for benchmarks as well.
      
      * fix typo
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarSergey Shulepov <[email protected]>
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      3cb2d626
  27. Dec 29, 2021
    • Sergey Pepyakin's avatar
      paras: add governance control dispatchables (#4575) · 4bf62d85
      Sergey Pepyakin authored
      * paras: add governance control dispatchables
      
      Adds a couple of functions for governance control for the paras module
      in the anticipation of PVF pre-checking enabling.
      
      Specifically, this commit adds a function for pre-registering a PVF that
      governance trusts enough. This function will come in handy in case there
      is a parachain that does not follow the GoAhead signal. That is, does
      not include https://github.com/paritytech/cumulus/pull/517
      
      .
      
      This may be not an exhaustive list of the functions that may come in
      handy. Any suggestions to add more are welcome.
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      4bf62d85
  28. Dec 16, 2021
    • Sergey Pepyakin's avatar
      pvf-precheck: Integrate PVF pre-checking into paras module (#4457) · 47810dca
      Sergey Pepyakin authored
      * pvf-precheck: Integrate PVF pre-checking into paras module
      
      Closes #4009
      
      This is the most of the runtime-side change needed for #3211.
      
      Here is how it works.
      
      The PVF pre-checking can be triggered either by an upgrade or by
      onboarding (i.e. calling `schedule_para_initialize`). The PVF
      pre-checking process is identified by the PVF code hash that is being
      voted on. If there is already PVF pre-checking process running, then no
      new PVF pre-checking process will be started. Instead, we just subscribe
      to the existing one.
      
      If there is no PVF pre-checking process running but the PVF code hash
      was already saved in the storage, that necessarily means (I invite the
      reviewers to double-check this invariant) that the PVF already passed
      pre-checking. This is equivalent to instant approving of the PVF.
      
      The pre-checking process can be concluded either by obtaining a
      supermajority or if it expires.
      
      Each validator checks the list of PVFs available for voting. The vote is
      binary, i.e. accept or reject a given PVF. As soon as the supermajority
      of votes are collected for one of the sides of the vote, the voting is
      concluded in that direction and the effects of the voting are enacted.
      
      Only validators from the active set can participate in the vote. The set
      of active validators can change each session. That's why we reset the
      votes each session. A voting that observed a certain number of sessions
      will be rejected.
      
      The effects of the PVF accepting depend on the operations requested it:
      
      1. All onboardings subscribed to the approved PVF pre-checking process will
      get scheduled and after passing 2 session boundaries they will be onboarded.
      2. All upgrades subscribed to the approved PVF pre-checking process will
      get scheduled very similarly to the existing process. Upgrades with
      pre-checking are really the same process that is just delayed by the
      time required for pre-checking voting. In case of instant approval the
      mechanism is exactly the same. This is important from parachains
      compatibility standpoint since following the delayed upgrade requires
      the parachain to implement
      https://github.com/paritytech/cumulus/pull/517
      
      .
      
      In case, PVF pre-checking process was concluded with rejection, then all
      the requesting operations get cancelled. For onboarding it means it gets
      without movement: the lifecycle of such parachain is terminated on the
      `Onboarding` state and after rejection the lifecycle is none. That in
      turn means that the caller can attempt registering the parachain once
      more. For upgrading it means that the upgrade process is aborted: that
      flashes go-ahead signal with `Abort` flag.
      
      Rejection leads to removing the allegedly bad validation code from the
      chain storage. Among other things, this implies that the operation can
      be re-requested. That allows for retrying an operation in case there was
      some bug. At the same time it does not look as a DoS vector due to the
      caching performed by the nodes.
      
      PVF pre-checking can be enabled and disabled. Initially, according to
      the changes in #4420, this mechanism is disabled. Triggering the PVF
      pre-checking when it is disabled just means that we insta approve the
      requesting operation. This should lead to the behavior being unchanged.
      
      Follow-ups:
      
      - expose runtime APIs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs
      
      * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs
      
      * Review fixes
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      47810dca
  29. Nov 23, 2021
    • Zeke Mostov's avatar
      Inherent filtering follow up (#4305) · 90e12734
      Zeke Mostov authored
      
      
      * Add feature more feature gating for benchmarking + tests
      
      * New line
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs
      
      * Do not assume we use max validators per core
      
      * Use kusama weights for rococo (hopefully temp)
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras_inherent.rs
      
      * Add more validity votes when neccesary
      
      * Some fixes for the last commit
      
      * Restore westend weights
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras_inherent.rs
      
      * Revert bad westend weights write
      
      * Make sure to update val idx before skipping
      
      * Fix validity vote range to max at group size'
      
      * Temp setup for rococo
      
      * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtime/rococo/src/weights/runtime_parachains_paras_inherent.rs --header=./file_header.txt
      
      * Augment generated Rococo weights
      
      * Make it compile
      
      * Revert range for enter_backed_candidates_variable
      
      * Delete runtime/kusama/src/weights/runtime_paras_paras_inherent.rs
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      90e12734
  30. Nov 16, 2021
    • Bernhard Schuster's avatar
      move paras inherent filtering to runtime (#4028) · 1aa6a4ab
      Bernhard Schuster authored
      
      
      * move things around, add filter methods
      
      * validator keys, modify availability bitfields according to disputes
      
      * simplify, keep the filter -> sanitize generic for both usecases
      
      * minor
      
      * assure tests still work, reduce changeset
      
      * integration
      
      * start entropy passing
      
      * fixins
      
      * compile, 1 failing test
      
      * filter with coverage
      
      * fixins
      
      * Update runtime/parachains/src/paras_inherent.rs
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      
      * slip of the pen
      
      * improve test cases
      
      * misc
      
      * fix
      
      * fixins
      
      * test avoid extra into() calls in assert_noop!
      
      * chores
      
      * ff
      
      * test fixup superfluous into call
      
      * chore: pfmt
      
      * improve apply_block_weight_limit to try to maximize the number of sufficiently backed
      
      blocks and add extra bitfields in a round-robin fashion
      
      * new code treats the lack of backed candidates as ok
      
      * Use vrf based entropy
      
      * fixup vrf random
      
      * add warn
      
      * slip of the pen
      
      * fixup
      
      * assure ordering
      
      * rethink apply_weights
      
      * mock
      
      * use a closure as predicate check
      
      * extract and use DisputedBitfield
      
      * chore: simplify
      
      * remove stray dbg
      
      * chore: fmt
      
      * address feedback
      
      * fix test, halfway there
      
      * stage1
      
      * dbg stuff
      
      * make group selection align
      
      * fix session index
      
      * fix wrongly returned candidates
      
      * cleanup
      
      * chore fmt
      
      * fix ensure check
      
      * make good case test work
      
      * more tests for bitfields
      
      * create sanitize_backed_candidates
      
      * fixup tests
      
      * update guide
      
      * add check referenced in the guide
      
      * improve weights code
      
      * fmt
      
      * fixins
      
      * Update roadmap/implementers-guide/src/runtime/inclusion.md
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * compiling + address review
      
      * add comments
      
      * fix weight calc
      
      * address review comments and test failure
      
      * fix
      
      * fix: condition
      
      * Fix random_sel function
      
      * Fix overlength block check
      
      * Zeke + Ladi commit for disputes filtering + integration test builder + runtime benchmarks + integration tests
      
      * Add benchmarks for code upgrades
      
      * Code upgrade bench; Feature gate TestWeightInfo
      
      * Try and make CI happier
      
      * Feature gate enter test to not(benchmarks)
      
      * Make sure no unused imports/fn
      
      * refactor, re-use, the beginning
      
      * Fix issue with frame benchmarking dep compilation
      
      * More precise feature gating for some derives
      
      * integrate piece-wise
      
      * foo
      
      * fixins
      
      * chore fmt
      
      * fixins
      
      * rename const generic
      
      * Update runtime/parachains/src/paras_inherent.rs
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * Fix compilation
      
      * limit to test
      
      * remove unused spam slots
      
      * spellcheck
      
      * remove a tick, fix a typo
      
      * Add Code upgrade weights
      
      * comment improvements + >=
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * remove another tick
      
      * Update runtime/parachains/src/paras_inherent/benchmarking.rs
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * saturating fixins + some spaces
      
      * fix
      
      * benchmarking - preliminary results
      
      * Add training wheels
      
      * Refactor some early exit logic for enter
      
      * Gracefully handle filtering bitfields & candidates (#4280)
      
      This updates the logic for sanitize_bitfields and sanitize_backed_candidates to never error when there is an issue, but instead to simply skip the problematic items.
      
      * Refactor inherent data weight limiting logic (#4287)
      
      * Apply suggestions from code review
      
      * Update runtime/parachains/src/builder.rs
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * Update runtime/parachains/src/builder.rs
      
      * Update runtime/parachains/src/paras_inherent.rs
      
      * final pass
      
      * Run cargo +nightly-2021-10-29 fmt
      
      * Update implementors guide with `sanitize_*` & `enter` (#4294)
      
      * Make spell check happier
      
      * Make wasm runtimes compile with benchmarks enabled (#4303)
      
      * comment stuff out, use old toml
      
      * Seems to be working?
      
      * Remove feature gating from builder
      
      * Remove commented out stuff
      
      * Remove generic from digest
      
      * Update weight files for runtime
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      Co-authored-by: default avatarLldenaurois <[email protected]>
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      1aa6a4ab
  31. Oct 06, 2021
    • Zeke Mostov's avatar
      Add benchmarking to rococo; Remove weights from runtime_parachains (#3914) · dc38cf89
      Zeke Mostov authored
      
      
      * Add benchmarking to rococo; Remove weights from runtime_parachains
      
      * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs --header=./file_header.txt
      
      * Impl TestWeightInfo for Paras and Configuration
      
      * fmt
      
      * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtime/rococo/src/weights/runtime_parachains_configuration.rs --header=./file_header.txt
      
      * Fix CI complaint: error: unused variable: `c`
      
      * polkadot-runtime-common & polkadot-test-runtime compile
      
      * xcm-simulator compile
      
      * change TestWeightInfo to max_block
      
      * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs --header=./file_header.txt
      
      * ordering
      
      * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs --header=./file_header.txt
      
      * Replace max_block with Weight::MAX
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      dc38cf89
  32. Sep 23, 2021