This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 370
runtime upgrade #70
Merged
Merged
runtime upgrade #70
Changes from all commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
3dad49f
Initial commit
9c536b3
Update to 3e65111
53288ef
Merge pull request #1 from substrate-developer-hub/ricardo-upgrade-su…
riusricardo 724dd66
Add cfg_attr ... no_std
JoshOrndorff 1607e61
Merge pull request #2 from substrate-developer-hub/joshy-no-std
riusricardo c975811
Fix version
97eecd6
Merge pull request #3 from substrate-developer-hub/ricardo-fix-version
riusricardo dd8e606
WIP: add really simple validate_block insert validity check
coriolinus 4f11307
WIP: create a parachain upgrade pallet
coriolinus 4608f40
Implement basic admin-auth pallet functionality.
coriolinus 9d7546b
use a better storage name
coriolinus ae38de5
Add checks ensuring runtime versions increase
coriolinus cf5c2b2
fix tests
coriolinus 6bd97f0
WIP: add tests from frame/system set_code
coriolinus 8508ea8
cause tests to pass
coriolinus 93fb0a1
Add overlapping upgrades test
coriolinus e70ebdc
Fix some logic errors
coriolinus 607c3c2
WIP: delegate most code upgrade permissions checks
coriolinus c9d9a13
fix tests after delegating runtime checks to can_set_code
coriolinus 970c60e
WIP: events test
coriolinus af44f0d
fully initialize and finalize in event test
coriolinus a63c99c
fix events test
coriolinus 6497890
cleanup and move crate to subdirectory
coriolinus dec80db
Merge branch 'master' of github.com:coriolinus/parachain-upgrade-pall…
coriolinus e66d403
Merge remote-tracking branch 'origin/master' into prgn-upgrade-parach…
coriolinus 76cbb6d
provisionally incorporate polkadot changes to hook everything together
coriolinus 341bc30
WIP: further updates to work with the polkadot implementation
coriolinus 97b96a9
update pallet-parachain-upgrade appropriately to handle new expectations
coriolinus af2620d
remove test which set a real WASM blob
coriolinus 08647ef
add test that storage gets manipulated as expected
coriolinus 8d29a92
get validate_block tests compiling again
coriolinus c457271
Check validation function size against polkadot parameters
coriolinus 5574b1d
demonstrate that block tests run
coriolinus b0a0b71
don't actually store any magic values in parachain storage
coriolinus ffe578f
Merge remote-tracking branch 'origin/master' into prgn-upgrade-parach…
coriolinus 8e1c138
Add reference to polkadot_client to Collator
coriolinus 6df9b2a
remove unused imports
coriolinus 8169b45
Remove VFPX; build VFP from existing data structures
coriolinus 7735312
WIP: add cumulus-validation-function-params crate
coriolinus cde2709
refactor: get rid of validation-function-params crate
coriolinus e7998a6
WIP: get VFP from inherent, when possible
coriolinus e55314d
ensure VFPs are available during block production and validation
coriolinus 3dca9e5
cleanup in preparation for review request
coriolinus ae7c286
Copy cumulus-primitives crate from bkchr-message-broker
coriolinus 91f12d9
move mod validation_function_params to cumulus_primitives
coriolinus 2f67e37
convert indentation to tabs
coriolinus b749394
rename parachain upgrade pallet per PR review
coriolinus f5fcea5
use compact form for dependencies
coriolinus 89a73af
remove pallet readme
coriolinus 18ad21b
Merge remote-tracking branch 'origin/master' into prgn-upgrade-parach…
coriolinus 1a9787d
Add weight data in compliance with updated substrate requirements
coriolinus f4f4b40
use anonymous fatal error type for brevity
coriolinus 2e9fa3c
Create, use a Call for setting VFPs
coriolinus d5eaac3
fix pallet tests
coriolinus f9cb39b
Apply suggestions from code review
coriolinus a7d2894
fix formatting
coriolinus fa056cb
add license header
coriolinus ceaec34
refactor primitive inherents / keys into appropriate modules
coriolinus 265bea2
impl From<(GlobalValidationSchedule, LocalValidationData)> for Valida…
coriolinus 3aeef74
extract inherent data vfp injection into a function
coriolinus 5428836
collapse parachain dependency into compact form
coriolinus d5fa4c1
always store vfps under same storage key
coriolinus 5203419
fix docs
coriolinus 2e4f92f
use minimum weight for VFP inherent
coriolinus 7b7cb27
rename module methods for clarity
coriolinus c3ecb92
fix tests: set_code -> schedule_upgrade
coriolinus 3eb1618
Apply pending validation function at inherent creation, not init
coriolinus f741cf0
typo: default_features -> default-features
coriolinus db26357
do not panic in create_inherent
coriolinus aaee1c0
revert f741cf0f2bc; don't change behavior, but use correct spelling
coriolinus e9cf4f8
move block initialization logic from inherent creation into the inherent
coriolinus 008d3ea
re-disable default features
coriolinus a0f8cc9
Merge remote-tracking branch 'origin/master' into prgn-upgrade-parach…
coriolinus 916033b
regenerate Cargo.lock
coriolinus 6c332ae
fix checks given new dependencies
coriolinus 3785356
fix tests given new dependencies
coriolinus e00bdc0
add another check preventing block VFPs from contaminating validity c…
coriolinus 8c408d4
Add OnValidationFunctionParams trait so other modules can callback
coriolinus 4dcf3f1
Add get_validation_function_params
coriolinus aebf70d
upgrade substrate: panic on div by 0
coriolinus b3c2a5e
Apply whitespace suggestions from code review
coriolinus 365b8b6
Apply semantic from code review
coriolinus 62c8422
add documentation to ValidationFunction type
coriolinus 6b49e0e
removing panicing private fn validation_function_params()
coriolinus a0f190f
expect validation function params to be in inherent data
coriolinus 27a3e33
move OnValidationFunctionParams to primitives
coriolinus e81eb29
resolve weird formatting
coriolinus a324261
move mod validation_function_params into its own file
coriolinus 58fe19c
add license to new file
coriolinus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| [package] | ||
| name = "cumulus-parachain-upgrade" | ||
| version = "0.1.0" | ||
| authors = ["Parity Technologies <admin@parity.io>"] | ||
| edition = "2018" | ||
| description = "pallet to manage parachain upgrades" | ||
|
|
||
| [features] | ||
| default = ['std'] | ||
| std = [ | ||
| 'serde', | ||
| 'codec/std', | ||
| 'frame-support/std', | ||
| 'pallet-balances/std', | ||
| 'cumulus-runtime/std', | ||
| 'sp-core/std', | ||
| 'sp-runtime/std', | ||
| 'sp-io/std', | ||
| 'system/std', | ||
| 'cumulus-primitives/std', | ||
| ] | ||
|
|
||
| [dependencies] | ||
| # Cumulus dependencies | ||
| cumulus-primitives = { path = "../primitives", default-features = false } | ||
| cumulus-runtime = { path = "../runtime", default-features = false } | ||
|
|
||
| # Polkadot dependencies | ||
| parachain = { package = "polkadot-parachain", git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch", default-features = false } | ||
|
|
||
| # Substrate dependencies | ||
| frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
| pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
| sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", version = "2.0.0-dev", default-features = false } | ||
| sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
| sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
| sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
| sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
| system = { package = "frame-system", git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
|
|
||
| # Other Dependencies | ||
| codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"]} | ||
| serde = { version = "1.0.101", optional = true, features = ["derive"] } | ||
|
|
||
| [dev-dependencies] | ||
| sp-externalities = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } | ||
| substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate.git", branch = "cumulus-branch", default-features = false } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.