-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Benchmark Transfer PoV Size with Increasing Numbers of Users #8571
Conversation
|
/benchmark runtime pallet pallet_balances |
|
Finished benchmark for branch: shawntabrizi-transfer-increasing-users Benchmark: Benchmark Runtime Pallet cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs ResultsPallet: "pallet_balances", Extrinsic: "transfer", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
|
…er-increasing-users
…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, small question though, does this bench a full block evaluation or just the balance transfer extrinsic call? (thinking it could be interesting to have multiple transfer in a proof: multiple transfer will share some nodes so it can grow very slightly differently).
This is only one extrinsic. Unfortunately I don't think we can make any assumptions about multiple transactions and how the PoV size will grow in that case. Worst case scenario is that there will only be one transfer extrinsic, and also we cannot have context of other previously executed transaction when doing weights. |
|
bot merge |
|
Trying merge. |
…ech#8571) * write benchmark for transfer increasing users * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Benchmarking Bot <[email protected]>
This is a new
#[extra]benchmark in the balances pallet which generates accounts with a balance, and then executes a worst-case-scenario balance transfer.We can use this to model the growth in PoV size as the number of users increase.
Compiling with:
Then running:
We get the results:
Results are as we expect. There is a logrithmic growth to the PoV size for a balance transfer relative to the number of users in the system.