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

parachains: Fix configuration module #4540

Merged
merged 5 commits into from
Dec 21, 2021

Conversation

pepyakin
Copy link
Contributor

@pepyakin pepyakin commented Dec 16, 2021

Closes #4529
Closes #4533

I figured that trying to avoid updates does not really worth it to keep.
This is because we seem to not update the configuration often and when
we do we approach this carefully. Thus possibility of a redundant update
is really negligable. At the same time, if such a redundant update does
happen then the effects of that are really small: just some wasted
storage interactions.

On the other hand, making it work was a little bit annoying. With the
proper fix for the pending updates this would be even more annoying
since now we would have to add combinatorically more cases to test this.

So I figured that I will just scrap that and simplify the code.

Runtime Migration

This PR doesn't introduce a new runtime migration but rather fixes the migration code introduced in #4420

skip check-dependent-cumulus

@pepyakin
Copy link
Contributor Author

pepyakin commented Dec 16, 2021

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Dec 16, 2021
@pepyakin pepyakin added B7-runtimenoteworthy C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Dec 16, 2021
@pepyakin pepyakin force-pushed the pep-configuration-fixes branch 2 times, most recently from 53415c9 to 2508785 Compare December 16, 2021 16:25
@pepyakin
Copy link
Contributor Author

/benchmark runtime kusama runtime_parachains::configuration

@parity-benchapp
Copy link

parity-benchapp bot commented Dec 16, 2021

Benchmark Runtime Kusama Pallet for branch "pep-configuration-fixes" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_configuration.rs

Results
Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_block_number", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=     8.24
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=     8.24
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.123
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.123
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_option_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.547
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.547
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_weight", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.379
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.379
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_hrmp_open_request_ttl", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Benchmark Override (r:0 w:0)

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_balance", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=      8.4
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=      8.4
              µs

Reads = 3
Writes = 1


@pepyakin

This comment has been minimized.

@parity-benchapp

This comment has been minimized.

@pepyakin
Copy link
Contributor Author

/benchmark runtime polkadot runtime_parachains::configuration

@parity-benchapp
Copy link

parity-benchapp bot commented Dec 16, 2021

Benchmark Runtime Polkadot Pallet for branch "pep-configuration-fixes" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_configuration.rs

Results
Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_block_number", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.144
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.144
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=      8.1
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=      8.1
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_option_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.146
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.146
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_weight", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.716
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.716
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_hrmp_open_request_ttl", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Benchmark Override (r:0 w:0)

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_balance", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.735
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.735
              µs

Reads = 3
Writes = 1


@pepyakin
Copy link
Contributor Author

/benchmark runtime westend runtime_parachains::configuration

@parity-benchapp
Copy link

parity-benchapp bot commented Dec 16, 2021

Benchmark Runtime Westend Pallet for branch "pep-configuration-fixes" with command cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_configuration.rs

Results
Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_block_number", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    7.735
              µs

Reads = 2
Writes = 1

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

Model:
Time ~=    7.735
              µs

Reads = 2
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    7.824
              µs

Reads = 2
Writes = 1

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

Model:
Time ~=    7.824
              µs

Reads = 2
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_option_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.121
              µs

Reads = 2
Writes = 1

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

Model:
Time ~=    8.121
              µs

Reads = 2
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_weight", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.011
              µs

Reads = 2
Writes = 1

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

Model:
Time ~=    8.011
              µs

Reads = 2
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_hrmp_open_request_ttl", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Benchmark Override (r:0 w:0)

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_balance", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    7.954
              µs

Reads = 2
Writes = 1

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

Model:
Time ~=    7.954
              µs

Reads = 2
Writes = 1


@pepyakin
Copy link
Contributor Author

/benchmark runtime custom --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

@parity-benchapp
Copy link

parity-benchapp bot commented Dec 16, 2021

Benchmark Runtime Custom for branch "pep-configuration-fixes" with command 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 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_configuration.rs

Results
Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_block_number", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.015
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.015
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.054
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.054
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_option_u32", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.122
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.122
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_weight", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.339
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.339
              µs

Reads = 3
Writes = 1

Pallet: "runtime_parachains::configuration", Extrinsic: "set_hrmp_open_request_ttl", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Benchmark Override (r:0 w:0)

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

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

Model:
Time ~=  2000000
              µs

Reads = 0
Writes = 0

Pallet: "runtime_parachains::configuration", Extrinsic: "set_config_with_balance", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Configuration PendingConfigs (r:1 w:1)
Storage: Configuration ActiveConfig (r:1 w:0)
Storage: ParasShared CurrentSessionIndex (r:1 w:0)

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

Model:
Time ~=    8.284
              µs

Reads = 3
Writes = 1

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

Model:
Time ~=    8.284
              µs

Reads = 3
Writes = 1


Comment on lines +377 to +378
pub(crate) type PendingConfigs<T: Config> =
StorageValue<_, Vec<(SessionIndex, HostConfiguration<T::BlockNumber>)>, ValueQuery>;
Copy link
Member

Choose a reason for hiding this comment

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

if it can only contain 2 items, why not use a fixed size array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What would that give though? At the same time, it would be more annoying to change if we were to change the SESSION_DELAY.

Copy link
Member

Choose a reason for hiding this comment

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

No specific reason, just thinking that if you are going to have some specific constraint about this storage item, that we can just program that in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I am generally pro making it more typesafe, but I believe here it does not provide much benefit while can be potential problem in the future (although I admit that it is also not super likely we will change SESSION_DELAY)

Copy link
Member

@shawntabrizi shawntabrizi left a comment

Choose a reason for hiding this comment

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

looking good to me

pepyakin and others added 4 commits December 20, 2021 12:12
Closes #4529
Closes #4533

I figured that trying to avoid updates does not really worth it to keep.
This is because we seem to not update the configuration often and when
we do we approach this carefully. Thus possibility of a redundant update
is really negligable. At the same time, if such a redundant update does
happen then the effects of that are really small: just some wasted
storage interactions.

On the other hand, making it work was a little bit annoying. With the
proper fix for the pending updates this would be even more annoying
since now we would have to add combinatorically more cases to test this.

So I figured that I will just scrap that and simplify the code.
…k --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_configuration.rs
…k --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_configuration.rs
…k --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_configuration.rs
Copy link
Member

@eskimor eskimor left a comment

Choose a reason for hiding this comment

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

LGTM

runtime/parachains/src/configuration.rs Outdated Show resolved Hide resolved
runtime/parachains/src/configuration.rs Show resolved Hide resolved
@pepyakin pepyakin added the E0-runtime_migration PR introduces code that might require downstream chains to run a runtime upgrade. label Dec 21, 2021
@pepyakin
Copy link
Contributor Author

This PR doesn't introduce a new runtime migration but rather fixes the code in the previously introduced one.

@pepyakin pepyakin added this to the v0.9.16 milestone Dec 21, 2021
@eskimor
Copy link
Member

eskimor commented Dec 21, 2021

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot paritytech-processbot bot merged commit b3d0778 into master Dec 21, 2021
@paritytech-processbot paritytech-processbot bot deleted the pep-configuration-fixes branch December 21, 2021 13:28
@ordian ordian modified the milestones: v0.9.16, v0.9.15 Dec 23, 2021
pepyakin added a commit that referenced this pull request Dec 27, 2021
This commit incorporates the changes made to the runtime in the
following PRs:

- #4408
- #4457
- #4540
- #4542
- #4581

Note that this PR does not include the description of the PVF
pre-checker subsystem. This should be addressed within
#4611
pepyakin added a commit that referenced this pull request Dec 28, 2021
This commit incorporates the changes made to the runtime in the
following PRs:

- #4408
- #4457
- #4540
- #4542
- #4581

Note that this PR does not include the description of the PVF
pre-checker subsystem. This should be addressed within
#4611

Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>
pepyakin added a commit that referenced this pull request Dec 28, 2021
This commit incorporates the changes made to the runtime in the
following PRs:

- #4408
- #4457
- #4540
- #4542
- #4581

Note that this PR does not include the description of the PVF
pre-checker subsystem. This should be addressed within
#4611

Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>
pepyakin added a commit that referenced this pull request Dec 29, 2021
This commit incorporates the changes made to the runtime in the
following PRs:

- #4408
- #4457
- #4540
- #4542
- #4581

Note that this PR does not include the description of the PVF
pre-checker subsystem. This should be addressed within
#4611

Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>
drahnr pushed a commit that referenced this pull request Jan 4, 2022
* parachains: Fix configuration module

Closes #4529
Closes #4533

I figured that trying to avoid updates does not really worth it to keep.
This is because we seem to not update the configuration often and when
we do we approach this carefully. Thus possibility of a redundant update
is really negligable. At the same time, if such a redundant update does
happen then the effects of that are really small: just some wasted
storage interactions.

On the other hand, making it work was a little bit annoying. With the
proper fix for the pending updates this would be even more annoying
since now we would have to add combinatorically more cases to test this.

So I figured that I will just scrap that and simplify the code.

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_configuration.rs

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_configuration.rs

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_configuration.rs

* review fixes

Co-authored-by: Parity Bot <admin@parity.io>
drahnr pushed a commit that referenced this pull request Jan 4, 2022
This commit incorporates the changes made to the runtime in the
following PRs:

- #4408
- #4457
- #4540
- #4542
- #4581

Note that this PR does not include the description of the PVF
pre-checker subsystem. This should be addressed within
#4611

Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>
@chevdor chevdor modified the milestones: v0.9.15, v0.9.16 Jan 11, 2022
Wizdave97 pushed a commit to ComposableFi/polkadot that referenced this pull request Feb 3, 2022
* parachains: Fix configuration module

Closes paritytech#4529
Closes paritytech#4533

I figured that trying to avoid updates does not really worth it to keep.
This is because we seem to not update the configuration often and when
we do we approach this carefully. Thus possibility of a redundant update
is really negligable. At the same time, if such a redundant update does
happen then the effects of that are really small: just some wasted
storage interactions.

On the other hand, making it work was a little bit annoying. With the
proper fix for the pending updates this would be even more annoying
since now we would have to add combinatorically more cases to test this.

So I figured that I will just scrap that and simplify the code.

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_configuration.rs

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_configuration.rs

* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_configuration.rs

* review fixes

Co-authored-by: Parity Bot <admin@parity.io>
Wizdave97 pushed a commit to ComposableFi/polkadot that referenced this pull request Feb 3, 2022
This commit incorporates the changes made to the runtime in the
following PRs:

- paritytech#4408
- paritytech#4457
- paritytech#4540
- paritytech#4542
- paritytech#4581

Note that this PR does not include the description of the PVF
pre-checker subsystem. This should be addressed within
paritytech#4611

Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>
@louismerlin louismerlin added D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited. and removed D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Jul 1, 2022
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. C1-low PR touches the given topic and has a low impact on builders. D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited. E0-runtime_migration PR introduces code that might require downstream chains to run a runtime upgrade.
Projects
None yet
6 participants