Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix benchmarks #985

Merged
merged 114 commits into from
May 4, 2023
Merged

chore: fix benchmarks #985

merged 114 commits into from
May 4, 2023

Conversation

sander2
Copy link
Member

@sander2 sander2 commented Mar 27, 2023

Closes #1043

  • Updated weight template to include proof size (copied from substrate master)
  • Allow benchmarks to run on kintsugi (by modifying the IdentifyChain impl)

We can generate the weights for an individual pallet using this command:

cargo run --bin interbtc-parachain --features runtime-benchmarks --release -- benchmark pallet --pallet escrow --extrinsic '*' --chain kintsugi-dev --execution=wasm --wasm-execution=compiled --steps 50 --repeat 20 --output crates/escrow/src/default_weights.rs --template .deploy/default-weight-template.hbs

Or for a runtime:

cargo run --bin interbtc-parachain --features runtime-benchmarks --release -- benchmark pallet --pallet escrow --extrinsic '*' --chain kintsugi-dev --execution=wasm --wasm-execution=compiled --steps 100 --repeat 10 --output parachain/runtime/kintsugi/src/weights/ --template .deploy/runtime-weight-template.hbs

Breaking Changes

BTCRelay

  • store_block_header now takes a fork_bound parameter which can be set to ChainCounter
  • Removed verify_and_validate_transaction
  • Removed verify_transaction_inclusion
  • Removed validate_transaction
  • Added Error::WrongForkBound and Error::BoundExceeded

ClientsInfo

  • client_name and uri are now bounded in set_current_client_release and set_pending_client_release

DexGeneral

  • Added Error::TooManyRewards and Error::TooManyLimits
  • Bounds some storage fields

DexStable

  • Added Error::TooManyCurrencies
  • Bounds some storage fields

DexSwapRouter

  • Removes the pallet entirely, consumers should use pallet-utility instead

Farming

  • Adds length_bound to deposit and withdraw
    • this can be set to the number of entries in FarmingRewards::RewardCurrencies

Issue

  • Adds length_bound to execute_issue which can be set to the formatted Bitcoin transaction size

Oracle

  • Name is now bounded

Redeem

  • Adds length_bound to execute_redeem which can be set to the formatted Bitcoin transaction size

Replace

  • Adds length_bound to execute_replace which can be set to the formatted Bitcoin transaction size

Security

  • Errors are now bounded

@sander2 sander2 changed the title chore: fix escrow benchmark chore: fix benchmarks Mar 30, 2023
sander2 and others added 28 commits April 14, 2023 18:45
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
gregdhill and others added 26 commits May 2, 2023 15:32
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
fix: make sure address parsing has complexity O(1)
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
chore: benchmark tx complexity in issue and replace
[BREAKING] chore!: remove dex-swap-router
chore: whitelist storage items that are read every block
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
chore: sort runtime benchmarks and toml
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
@gregdhill gregdhill merged commit 10a1388 into master May 4, 2023
2 checks passed
@gregdhill gregdhill deleted the chore/benchmarks branch May 4, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve benchmarking and accurately measure weights
3 participants