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

On-demand & Coretime parachain upgrade fees #2372

Closed
wants to merge 109 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
111a536
initial commit
Szegoo Nov 13, 2023
36ff907
required fee for upgrading
Szegoo Nov 14, 2023
628b3f0
add basic docs
Szegoo Nov 14, 2023
0439ef9
start making tests work
Szegoo Nov 16, 2023
f12aaf2
tests passing
Szegoo Nov 17, 2023
adeb298
first test
Szegoo Nov 17, 2023
58b1219
refund solution - incomplete
Szegoo Nov 17, 2023
cdf22f6
progress
Szegoo Nov 18, 2023
ab087f6
incomplete implementation
Szegoo Nov 19, 2023
cef5196
small fixes
Szegoo Nov 19, 2023
d7eba24
new logic almost complete
Szegoo Nov 19, 2023
3758a15
cleanup
Szegoo Nov 19, 2023
30a051a
complete first test & grammar
Szegoo Nov 20, 2023
bf1b5e3
new test case
Szegoo Nov 20, 2023
eed4c4d
better approach
Szegoo Nov 20, 2023
f852348
refactor
Szegoo Nov 21, 2023
04d22e0
cleanup & small fixes
Szegoo Nov 21, 2023
bdba7cb
new test & fixes
Szegoo Nov 21, 2023
51f2d16
fix & new tests
Szegoo Nov 21, 2023
06b02d5
fix?
Szegoo Nov 21, 2023
8604146
should compile
Szegoo Nov 21, 2023
8cbf899
nitpicks
Szegoo Nov 21, 2023
74d680f
make this a non-breaking change
Szegoo Dec 2, 2023
10d681a
add migration
Szegoo Dec 2, 2023
c54492b
Merge branch 'master' into para-upgrade-fees
Szegoo Dec 2, 2023
daa0dcc
add test
Szegoo Dec 2, 2023
dd54e5f
fix try-runtime
Szegoo Dec 2, 2023
6c90742
implement the better solution
Szegoo Dec 5, 2023
e82525d
safe fund handling
Szegoo Dec 5, 2023
cfd3092
improve docs
Szegoo Dec 6, 2023
14b23df
refactoring | incomplete
Szegoo Dec 6, 2023
3153d6b
cleanup
Szegoo Dec 6, 2023
36f8390
cleanup & new test
Szegoo Dec 6, 2023
f006db2
renaming
Szegoo Dec 6, 2023
35f65ee
add benchmark & docs
Szegoo Dec 6, 2023
064464b
update schedule_code_upgrade benchmark
Szegoo Dec 6, 2023
d7f33ad
fmt
Szegoo Dec 6, 2023
26e6779
fixes
Szegoo Dec 6, 2023
8a0789a
force_set_parachain_billing_account_works
Szegoo Dec 6, 2023
04339d9
Update polkadot/runtime/parachains/src/paras/mod.rs
Szegoo Dec 6, 2023
c380dfa
resolve comments
Szegoo Dec 6, 2023
7d0709a
fix benchmark
Szegoo Dec 6, 2023
b6562a8
merge BillingInfo into ParaInfo
Szegoo Dec 7, 2023
316b1e3
add migration
Szegoo Dec 7, 2023
97974f8
Revert "add migration"
Szegoo Dec 7, 2023
a178142
require billing_account to be explicitly set
Szegoo Dec 7, 2023
44a6cae
add test
Szegoo Dec 7, 2023
f9d3936
Merge branch 'master' into para-upgrade-fees
Szegoo Dec 7, 2023
e88b3f4
add events
Szegoo Dec 7, 2023
1ac7da7
add docs
Szegoo Dec 7, 2023
189c5da
add migration
Szegoo Dec 8, 2023
eb2af3d
better wording
Szegoo Dec 8, 2023
700cd1e
add PreCodeUpgradeChecker type
Szegoo Dec 8, 2023
282588e
implement PreCodeUpgrade | WIP
Szegoo Dec 8, 2023
1da6ac8
execute pre_code_upgrade in inclusion
Szegoo Dec 9, 2023
713ad0b
use proper return type | WIP
Szegoo Dec 9, 2023
4082b7a
fixes
Szegoo Dec 10, 2023
66a8e62
better docs & add missing weight
Szegoo Dec 10, 2023
865063d
more clarity
Szegoo Dec 10, 2023
f1dd961
doc fixes
Szegoo Dec 10, 2023
c0f31fb
Update polkadot/runtime/common/src/paras_registrar/mod.rs
Szegoo Dec 10, 2023
f35bf62
Update polkadot/runtime/common/src/paras_registrar/migration.rs
Szegoo Dec 10, 2023
2082dbf
don't short circuit
Szegoo Dec 10, 2023
d6082ab
set billing account to none upon registration
Szegoo Dec 11, 2023
2f78321
update tests to explicitly set the billing account & small fix in pre…
Szegoo Dec 11, 2023
a04914b
benchmarks
Szegoo Dec 11, 2023
bca6464
improve readability
Szegoo Dec 11, 2023
3373b18
use IsSystem
Szegoo Dec 11, 2023
8fce70a
Merge branch 'master' into para-upgrade-fees
Szegoo Dec 12, 2023
d6f861a
improve readability
Szegoo Dec 14, 2023
34ee5ce
less nested
Szegoo Dec 14, 2023
090bccb
small fix
Szegoo Dec 14, 2023
61d9b26
required_para_deposit helper function
Szegoo Dec 22, 2023
88c9ef3
add pr doc
Szegoo Dec 22, 2023
6119222
missing line
Szegoo Dec 22, 2023
69aaebc
Merge branch 'master' into para-upgrade-fees
Szegoo Dec 22, 2023
37b6617
fmt
Szegoo Dec 22, 2023
6ac4eaa
Merge branch 'master' into para-upgrade-fees
Szegoo Dec 23, 2023
40f303a
remove unnecessary generic
Szegoo Dec 24, 2023
7015621
fix
Szegoo Dec 24, 2023
0da3ee4
make clippy happy
Szegoo Dec 24, 2023
ba9f448
final fixes
Szegoo Dec 24, 2023
3319410
..
Szegoo Dec 24, 2023
55d7129
fix benchmark
Szegoo Dec 24, 2023
490f8b9
fix zombienet tests
Szegoo Dec 24, 2023
da03660
.. fix
Szegoo Dec 24, 2023
12cfb44
fix
Szegoo Dec 24, 2023
eb79964
use versi
Szegoo Dec 27, 2023
c79c4b0
remove upgrade fees from westend
Szegoo Dec 27, 2023
99a95ec
fix
Szegoo Dec 27, 2023
ea0961f
🙈
Szegoo Dec 27, 2023
c6532e5
Merge branch 'master' into para-upgrade-fees
Szegoo Dec 27, 2023
49b0142
fix benchmark
Szegoo Dec 27, 2023
9aac6f7
Merge branch 'master' into para-upgrade-fees
Szegoo Dec 28, 2023
527e7b3
Update polkadot/runtime/common/src/paras_registrar/mod.rs
Szegoo Jan 18, 2024
5ad659b
Update polkadot/runtime/common/src/paras_registrar/migration.rs
Szegoo Jan 18, 2024
4e842e6
Update polkadot/runtime/common/src/paras_registrar/migration.rs
Szegoo Jan 18, 2024
c16d4a9
Update polkadot/runtime/common/src/paras_registrar/mod.rs
Szegoo Jan 18, 2024
d382ee9
Update polkadot/runtime/common/src/paras_registrar/mod.rs
Szegoo Jan 18, 2024
19ef131
Update polkadot/runtime/parachains/src/paras/mod.rs
Szegoo Jan 18, 2024
47a4d81
Update polkadot/runtime/parachains/src/paras/mod.rs
Szegoo Jan 18, 2024
91f8877
Update polkadot/runtime/common/src/paras_registrar/mod.rs
Szegoo Jan 18, 2024
f03377d
Update polkadot/runtime/common/src/paras_registrar/mod.rs
Szegoo Jan 18, 2024
15d9a27
renaming & remove SovereignAccountOf
Szegoo Jan 19, 2024
d9c3335
Merge branch 'master' into para-upgrade-fees
Szegoo Jan 19, 2024
6197aa1
bring back old migration
Szegoo Jan 19, 2024
2e25232
signal_code_upgrade_failure
Szegoo Jan 19, 2024
cc3e0df
fix warning
Szegoo Jan 19, 2024
78be2ae
make charging costs transactional
Szegoo Jan 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cumulus/zombienet/tests/0004-runtime_upgrade.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_image = "{{RELAY_IMAGE}}"
default_command = "polkadot"
default_args = [ "-lparachain=debug" ]

chain = "rococo-local"
chain = "westend-local"
Copy link
Member

Choose a reason for hiding this comment

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

Same :P

While I'm now asking myself why we have two of these tests.


[[relaychain.nodes]]
name = "alice"
Expand Down
1 change: 1 addition & 0 deletions cumulus/zombienet/tests/0004-runtime_upgrade.zndsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Creds: config

alice: parachain 2000 is registered within 225 seconds
charlie: reports block height is at least 5 within 250 seconds

charlie: parachain 2000 perform upgrade with /tmp/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm within 200 seconds
dave: reports block height is at least 20 within 250 seconds
dave: js-script ./runtime_upgrade.js within 200 seconds
5 changes: 4 additions & 1 deletion polkadot/runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pallet-transaction-payment = { path = "../../../substrate/frame/transaction-paym
pallet-treasury = { path = "../../../substrate/frame/treasury", default-features = false }
pallet-asset-rate = { path = "../../../substrate/frame/asset-rate", default-features = false, optional = true }
pallet-election-provider-multi-phase = { path = "../../../substrate/frame/election-provider-multi-phase", default-features = false }
polkadot-parachain-primitives = { path = "../../parachain", default-features = false }
frame-election-provider-support = { path = "../../../substrate/frame/election-provider-support", default-features = false }

frame-benchmarking = { path = "../../../substrate/frame/benchmarking", default-features = false, optional = true }
Expand All @@ -57,7 +58,7 @@ runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parac

slot-range-helper = { path = "slot_range_helper", default-features = false }
xcm = { package = "staging-xcm", path = "../../xcm", default-features = false }
xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", default-features = false, optional = true }
xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", default-features = false }

pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
xcm-builder = { package = "staging-xcm-builder", path = "../../xcm/xcm-builder", default-features = false }
Expand Down Expand Up @@ -101,6 +102,7 @@ std = [
"pallet-vesting/std",
"pallet-xcm-benchmarks/std",
"parity-scale-codec/std",
"polkadot-parachain-primitives/std",
"primitives/std",
"runtime-parachains/std",
"rustc-hex/std",
Expand Down Expand Up @@ -138,6 +140,7 @@ runtime-benchmarks = [
"pallet-treasury/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"primitives/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
Expand Down
2 changes: 2 additions & 0 deletions polkadot/runtime/common/src/assigned_slots/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,8 @@ mod tests {
type UnsignedPriority = ParasUnsignedPriority;
type QueueFootprinter = ();
type NextSessionRotation = crate::mock::TestNextSessionRotation;
type PreCodeUpgrade = ();
type OnCodeUpgraded = ();
type OnNewHead = ();
type AssignCoretime = ();
}
Expand Down
Loading