Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion to Substrate #9829 (Add put_in_front_of extrinsic to bags-list) #3899

Merged
merged 9 commits into from
Dec 8, 2021

Conversation

emostov
Copy link
Contributor

@emostov emostov commented Sep 21, 2021

@emostov emostov added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Sep 21, 2021
Copy link
Contributor

@gui1117 gui1117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, as long as we keep an eye on it so weight is for sure updated in next runtime upgrade

@@ -62,4 +62,7 @@ impl<T: frame_system::Config> pallet_bags_list::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
fn put_in_front_of() -> Weight {
0
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I guess we will upgrade in a follow up or before runtime upgrade, but we should be careful that we actually upgrade it.
Because it happens that system isn't updated by our release process (https://github.com/paritytech/polkadot/issues/4290) , so we should keep a careful eye on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup planning on doing a follow up immediatley after this was merged

@paritytech-processbot
Copy link

Companion update failed: CommandFailed { cmd: "Command { std: "cargo" "update" "-v" "-p" "frame-try-runtime:0.10.0-dev" "-p" "beefy-merkle-tree:4.0.0-dev" "-p" "pallet-multisig:4.0.0-dev" "-p" "pallet-beefy:4.0.0-dev" "-p" "sp-authority-discovery:4.0.0-dev" "-p" "pallet-babe:4.0.0-dev" "-p" "pallet-grandpa:4.0.0-dev" "-p" "sp-wasm-interface:4.0.0-dev" "-p" "pallet-recovery:4.0.0-dev" "-p" "frame-support-procedural:4.0.0-dev" "-p" "sc-block-builder:0.10.0-dev" "-p" "pallet-assets:4.0.0-dev" "-p" "sc-network:0.10.0-dev" "-p" "sp-api:4.0.0-dev" "-p" "sp-keyring:4.0.0-dev" "-p" "sp-consensus:0.10.0-dev" "-p" "frame-benchmarking:4.0.0-dev" "-p" "sp-authorship:4.0.0-dev" "-p" "substrate-prometheus-endpoint:0.10.0-dev" "-p" "sp-externalities:0.10.0-dev" "-p" "pallet-staking:4.0.0-dev" "-p" "pallet-offences:4.0.0-dev" "-p" "sc-chain-spec:4.0.0-dev" "-p" "frame-executive:4.0.0-dev" "-p" "sp-blockchain:4.0.0-dev" "-p" "pallet-staking-reward-curve:4.0.0-dev" "-p" "sp-application-crypto:4.0.0-dev" "-p" "sp-consensus-vrf:0.10.0-dev" "-p" "sp-runtime-interface:4.0.0-dev" "-p" "frame-system:4.0.0-dev" "-p" "sc-tracing:4.0.0-dev" "-p" "pallet-utility:4.0.0-dev" "-p" "pallet-balances:4.0.0-dev" "-p" "pallet-treasury:4.0.0-dev" "-p" "sc-consensus-babe:0.10.0-dev" "-p" "sp-npos-elections:4.0.0-dev" "-p" "sp-trie:4.0.0-dev" "-p" "sp-rpc:4.0.0-dev" "-p" "substrate-test-utils-derive:0.10.0-dev" "-p" "pallet-bags-list:4.0.0-dev" "-p" "pallet-transaction-payment:4.0.0-dev" "-p" "pallet-mmr-primitives:4.0.0-dev" "-p" "try-runtime-cli:0.10.0-dev" "-p" "pallet-mmr:4.0.0-dev" "-p" "sc-transaction-pool-api:4.0.0-dev" "-p" "substrate-build-script-utils:3.0.0" "-p" "sc-utils:4.0.0-dev" "-p" "sp-core-hashing-proc-macro:4.0.0-dev" "-p" "pallet-nicks:4.0.0-dev" "-p" "pallet-collective:4.0.0-dev" "-p" "sc-peerset:4.0.0-dev" "-p" "beefy-primitives:4.0.0-dev" "-p" "sp-keystore:0.10.0-dev" "-p" "test-runner:0.9.0" "-p" "frame-support-procedural-tools:4.0.0-dev" "-p" "frame-system-benchmarking:4.0.0-dev" "-p" "pallet-bags-list-remote-tests:4.0.0-dev" "-p" "pallet-staking-reward-fn:4.0.0-dev" "-p" "sp-core:4.0.0-dev" "-p" "sc-network-gossip:0.10.0-dev" "-p" "remote-externalities:0.10.0-dev" "-p" "sc-cli:0.10.0-dev" "-p" "sc-tracing-proc-macro:4.0.0-dev" "-p" "sp-arithmetic:4.0.0-dev" "-p" "pallet-identity:4.0.0-dev" "-p" "pallet-vesting:4.0.0-dev" "-p" "sc-consensus-epochs:0.10.0-dev" "-p" "pallet-transaction-payment-rpc-runtime-api:4.0.0-dev" "-p" "pallet-timestamp:4.0.0-dev" "-p" "sp-offchain:4.0.0-dev" "-p" "sp-runtime-interface-proc-macro:4.0.0-dev" "-p" "sp-timestamp:4.0.0-dev" "-p" "frame-support-test-pallet:4.0.0-dev" "-p" "substrate-test-client:2.0.1" "-p" "pallet-im-online:4.0.0-dev" "-p" "sc-keystore:4.0.0-dev" "-p" "pallet-sudo:4.0.0-dev" "-p" "sc-telemetry:4.0.0-dev" "-p" "sc-offchain:4.0.0-dev" "-p" "pallet-elections-phragmen:5.0.0-dev" "-p" "sc-informant:0.10.0-dev" "-p" "sp-transaction-pool:4.0.0-dev" "-p" "sc-authority-discovery:0.10.0-dev" "-p" "sc-finality-grandpa:0.10.0-dev" "-p" "sp-serializer:4.0.0-dev" "-p" "sp-database:4.0.0-dev" "-p" "substrate-test-utils:4.0.0-dev" "-p" "sc-rpc-server:4.0.0-dev" "-p" "substrate-wasm-builder:5.0.0-dev" "-p" "sp-maybe-compressed-blob:4.1.0-dev" "-p" "sp-state-machine:0.10.0-dev" "-p" "sp-core-hashing:4.0.0-dev" "-p" "sc-consensus-manual-seal:0.10.0-dev" "-p" "sc-executor:0.10.0-dev" "-p" "sp-tracing:4.0.0-dev" "-p" "substrate-frame-rpc-system:4.0.0-dev" "-p" "sp-version-proc-macro:4.0.0-dev" "-p" "pallet-election-provider-multi-phase:4.0.0-dev" "-p" "sc-transaction-pool:4.0.0-dev" "-p" "frame-system-rpc-runtime-api:4.0.0-dev" "-p" "sp-consensus-babe:0.10.0-dev" "-p" "sp-finality-grandpa:4.0.0-dev" "-p" "generate-bags:4.0.0-dev" "-p" "sc-sync-state-rpc:0.10.0-dev" "-p" "sp-version:4.0.0-dev" "-p" "sp-session:4.0.0-dev" "-p" "sc-consensus-slots:0.10.0-dev" "-p" "sp-runtime:4.0.0-dev" "-p" "sp-block-builder:4.0.0-dev" "-p" "pallet-membership:4.0.0-dev" "-p" "frame-benchmarking-cli:4.0.0-dev" "-p" "sp-io:4.0.0-dev" "-p" "pallet-democracy:4.0.0-dev" "-p" "pallet-session-benchmarking:4.0.0-dev" "-p" "sc-executor-wasmi:0.10.0-dev" "-p" "pallet-bounties:4.0.0-dev" "-p" "sc-rpc-api:0.10.0-dev" "-p" "sp-staking:4.0.0-dev" "-p" "pallet-authorship:4.0.0-dev" "-p" "frame-support:4.0.0-dev" "-p" "frame-support-procedural-tools-derive:3.0.0" "-p" "sc-service:0.10.0-dev" "-p" "sp-debug-derive:4.0.0-dev" "-p" "pallet-tips:4.0.0-dev" "-p" "sc-consensus-uncles:0.10.0-dev" "-p" "sp-inherents:4.0.0-dev" "-p" "sp-panic-handler:4.0.0-dev" "-p" "beefy-gadget-rpc:4.0.0-dev" "-p" "sp-tasks:4.0.0-dev" "-p" "sp-storage:4.0.0-dev" "-p" "pallet-society:4.0.0-dev" "-p" "pallet-mmr-rpc:3.0.0" "-p" "sc-executor-wasmtime:0.10.0-dev" "-p" "pallet-gilt:4.0.0-dev" "-p" "sc-state-db:0.10.0-dev" "-p" "sc-basic-authorship:0.10.0-dev" "-p" "pallet-proxy:4.0.0-dev" "-p" "sc-allocator:4.1.0-dev" "-p" "sc-client-db:0.10.0-dev" "-p" "pallet-authority-discovery:4.0.0-dev" "-p" "pallet-beefy-mmr:4.0.0-dev" "-p" "sp-consensus-slots:0.10.0-dev" "-p" "sp-std:4.0.0-dev" "-p" "pallet-transaction-payment-rpc:4.0.0-dev" "-p" "frame-election-provider-support:4.0.0-dev" "-p" "sc-chain-spec-derive:4.0.0-dev" "-p" "sc-consensus:0.10.0-dev" "-p" "sc-executor-common:0.10.0-dev" "-p" "sc-rpc:4.0.0-dev" "-p" "sp-api-proc-macro:4.0.0-dev" "-p" "pallet-scheduler:4.0.0-dev" "-p" "sc-proposer-metrics:0.10.0-dev" "-p" "fork-tree:3.0.0" "-p" "pallet-offences-benchmarking:4.0.0-dev" "-p" "sc-consensus-babe-rpc:0.10.0-dev" "-p" "sp-npos-elections-solution-type:4.0.0-dev" "-p" "frame-support-test:3.0.0" "-p" "pallet-indices:4.0.0-dev" "-p" "pallet-session:4.0.0-dev" "-p" "beefy-gadget:4.0.0-dev" "-p" "sc-client-api:4.0.0-dev" "-p" "sc-finality-grandpa-rpc:0.10.0-dev" "-p" "sp-transaction-storage-proof:4.0.0-dev", kill_on_drop: false }", status_code: Some(101), err: " Updating git repository https://github.com/paritytech/substrate\nerror: Unable to update https://github.com/paritytech/substrate?branch=master\n\nCaused by:\n failed to parse manifest at /usr/local/cargo/git/checkouts/substrate-7e08433d4c370a21/c9cad66/test-utils/test-crate/Cargo.toml\n\nCaused by:\n feature edition2021 is required\n\n The package requires the Cargo feature called edition2021, but that feature is not stabilized in this version of Cargo (1.55.0 (32da73ab1 2021-08-23)).\n Consider trying a newer version of Cargo (this may require the nightly release).\n See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2021 for more information about the status of this feature.\n" }

@shawntabrizi
Copy link
Member

/benchmark runtime kusama pallet-bags-list

@parity-benchapp
Copy link

parity-benchapp bot commented Dec 8, 2021

Benchmark Runtime Kusama Pallet for branch "zeke-put-in-front-of-companion" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

Results
Pallet: "pallet_bags_list", Extrinsic: "rebag_non_terminal", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Staking Bonded (r:1 w:0)
Storage: Staking Ledger (r:1 w:0)
Storage: BagsList ListNodes (r:4 w:4)
Storage: BagsList ListBags (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    64.14
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    64.14
              µs

Reads = 7
Writes = 5

Pallet: "pallet_bags_list", Extrinsic: "rebag_terminal", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Staking Bonded (r:1 w:0)
Storage: Staking Ledger (r:1 w:0)
Storage: BagsList ListNodes (r:3 w:3)
Storage: BagsList ListBags (r:2 w:2)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    61.89
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    61.89
              µs

Reads = 7
Writes = 5

Pallet: "pallet_bags_list", Extrinsic: "put_in_front_of", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: BagsList ListNodes (r:4 w:4)
Storage: Staking Bonded (r:2 w:0)
Storage: Staking Ledger (r:2 w:0)
Storage: BagsList CounterForListNodes (r:1 w:1)
Storage: BagsList ListBags (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    73.68
              µs

Reads = 10
Writes = 6

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    73.68
              µs

Reads = 10
Writes = 6


@shawntabrizi
Copy link
Member

/benchmark runtime polkadot pallet-bags-list

@shawntabrizi
Copy link
Member

/benchmark runtime westend pallet-bags-list

…k --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
@parity-benchapp
Copy link

parity-benchapp bot commented Dec 8, 2021

Benchmark Runtime Westend Pallet for branch "zeke-put-in-front-of-companion" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/

Results
Pallet: "pallet_bags_list", Extrinsic: "rebag_non_terminal", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Staking Bonded (r:1 w:0)
Storage: Staking Ledger (r:1 w:0)
Storage: BagsList ListNodes (r:4 w:4)
Storage: BagsList ListBags (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    64.32
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    64.32
              µs

Reads = 7
Writes = 5

Pallet: "pallet_bags_list", Extrinsic: "rebag_terminal", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Staking Bonded (r:1 w:0)
Storage: Staking Ledger (r:1 w:0)
Storage: BagsList ListNodes (r:3 w:3)
Storage: BagsList ListBags (r:2 w:2)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=     62.1
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=     62.1
              µs

Reads = 7
Writes = 5

Pallet: "pallet_bags_list", Extrinsic: "put_in_front_of", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: BagsList ListNodes (r:4 w:4)
Storage: Staking Bonded (r:2 w:0)
Storage: Staking Ledger (r:2 w:0)
Storage: BagsList CounterForListNodes (r:1 w:1)
Storage: BagsList ListBags (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    74.65
              µs

Reads = 10
Writes = 6

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    74.65
              µs

Reads = 10
Writes = 6


…k --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
@parity-benchapp
Copy link

parity-benchapp bot commented Dec 8, 2021

Benchmark Runtime Polkadot Pallet for branch "zeke-put-in-front-of-companion" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/

Results
Pallet: "pallet_bags_list", Extrinsic: "rebag_non_terminal", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Staking Bonded (r:1 w:0)
Storage: Staking Ledger (r:1 w:0)
Storage: BagsList ListNodes (r:4 w:4)
Storage: BagsList ListBags (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    64.07
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    64.07
              µs

Reads = 7
Writes = 5

Pallet: "pallet_bags_list", Extrinsic: "rebag_terminal", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Staking Bonded (r:1 w:0)
Storage: Staking Ledger (r:1 w:0)
Storage: BagsList ListNodes (r:3 w:3)
Storage: BagsList ListBags (r:2 w:2)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    62.28
              µs

Reads = 7
Writes = 5

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    62.28
              µs

Reads = 7
Writes = 5

Pallet: "pallet_bags_list", Extrinsic: "put_in_front_of", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: BagsList ListNodes (r:4 w:4)
Storage: Staking Bonded (r:2 w:0)
Storage: Staking Ledger (r:2 w:0)
Storage: BagsList CounterForListNodes (r:1 w:1)
Storage: BagsList ListBags (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    73.85
              µs

Reads = 10
Writes = 6

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    73.85
              µs

Reads = 10
Writes = 6


…k --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
@shawntabrizi
Copy link
Member

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot paritytech-processbot bot merged commit df0e945 into master Dec 8, 2021
@paritytech-processbot paritytech-processbot bot deleted the zeke-put-in-front-of-companion branch December 8, 2021 05:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants