This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New parachain runtime skeleton (#1158)
* file structure and initializer skeleton * ensure session changes happen before initialization * add a couple tests for initializer flow * integrate with session handling * configuration update logic * configuration methods * move test mock to its own module * integrate configuration into initializer * add note about initialization order * integrate configuration module into mock * add some tests for config module * paras module storage * implement paras session change operation * amend past code pruning to fully cover acceptance period * update guide again * do pruning of historical validation code * add weight to initialization * integrate into mock & leave notes for next session * clean up un-ended sentence * alter test to account for double index in past code meta * port over code-at logic test * clarify checking for conflicting code upgrades * add genesis for paras, include in mock, ensure incoming paras are processed * note on return value of `validation_code_at` * implement paras routines from implementor's guide * bring over some existing tests and begin porting * port over code upgrade tests * test parachain registration * test code_at with intermediate block * fix warnings * clean up docs and extract to separate struct * adjust implementor's guide to include replacementtimes * kill stray println * rename expected_at to applied_after * rewrite ParaPastCodeMeta to avoid reversal * clarify and test interface of validation_code_at * make FutureCode optional * rename do_old_code_pruning * add comment on Option<()> to answer FAQ * address some more grumbles
- Loading branch information
Showing
12 changed files
with
1,979 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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,84 @@ | ||
[package] | ||
name = "polkadot-runtime-parachains" | ||
version = "0.8.0" | ||
authors = ["Parity Technologies <admin@parity.io>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } | ||
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } | ||
log = { version = "0.3.9", optional = true } | ||
rustc-hex = { version = "2.0.1", default-features = false } | ||
serde = { version = "1.0.102", default-features = false } | ||
serde_derive = { version = "1.0.102", optional = true } | ||
|
||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
|
||
authorship = { package = "pallet-authorship", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
session = { package = "pallet-session", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
staking = { package = "pallet-staking", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
system = { package = "frame-system", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
vesting = { package = "pallet-vesting", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
offences = { package = "pallet-offences", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } | ||
|
||
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } | ||
libsecp256k1 = { version = "0.3.2", default-features = false, optional = true } | ||
|
||
[dev-dependencies] | ||
hex-literal = "0.2.1" | ||
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } | ||
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } | ||
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", branch = "master" } | ||
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } | ||
randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", branch = "master" } | ||
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } | ||
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", branch = "master" } | ||
trie-db = "0.20.0" | ||
serde_json = "1.0.41" | ||
libsecp256k1 = "0.3.2" | ||
|
||
[features] | ||
default = ["std"] | ||
no_std = [] | ||
std = [ | ||
"bitvec/std", | ||
"codec/std", | ||
"log", | ||
"rustc-hex/std", | ||
"serde_derive", | ||
"serde/std", | ||
"primitives/std", | ||
"inherents/std", | ||
"sp-core/std", | ||
"sp-api/std", | ||
"sp-std/std", | ||
"sp-io/std", | ||
"frame-support/std", | ||
"authorship/std", | ||
"balances/std", | ||
"sp-runtime/std", | ||
"sp-session/std", | ||
"sp-staking/std", | ||
"session/std", | ||
"staking/std", | ||
"system/std", | ||
"timestamp/std", | ||
"vesting/std", | ||
] | ||
runtime-benchmarks = [ | ||
"libsecp256k1/hmac", | ||
"frame-benchmarking", | ||
"frame-support/runtime-benchmarks", | ||
"system/runtime-benchmarks", | ||
] |
Oops, something went wrong.