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

Testing CI test failure #971

Closed
wants to merge 34 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
58941e2
upgrade primitives to allow changing validation function
rphmeier Mar 15, 2020
753ea08
set up storage schema for old parachains code
rphmeier Mar 15, 2020
ddfa72f
fix compilation errors
rphmeier Mar 16, 2020
d66a544
fix test compilation
rphmeier Mar 16, 2020
ba6b392
add some tests for past code meta
rphmeier Mar 16, 2020
d87c034
most of the runtime logic for code upgrades
rphmeier Mar 16, 2020
fd07208
implement old-code pruning
rphmeier Mar 18, 2020
dcd2a22
add a couple tests
rphmeier Mar 19, 2020
f26c6d5
clean up remaining TODOs
rphmeier Mar 19, 2020
85adf9f
add a whole bunch of tests for runtime functionality
rphmeier Mar 20, 2020
a7cc5a8
remove unused function
rphmeier Mar 20, 2020
847bbbb
fix runtime compilation
rphmeier Mar 20, 2020
b265719
extract some primitives to parachain crate
rphmeier Mar 20, 2020
7008912
add validation-code upgrades to validation params and result
rphmeier Mar 20, 2020
b331fd1
extend validation params with code upgrade fields
rphmeier Mar 20, 2020
554ed89
provide maximums to validation params
rphmeier Mar 20, 2020
c9b324b
port test-parachains
rphmeier Mar 20, 2020
38d724c
add a code-upgrader test-parachain and tests
rphmeier Mar 20, 2020
43888e3
fix collator tests
rphmeier Mar 22, 2020
71d23d3
Merge branch 'master' into rh-upgradeable-validation-function
rphmeier Mar 22, 2020
e638aa5
move test-parachains to own folder to work around compilation errors
rphmeier Mar 22, 2020
87e0dcc
Merge branch 'master' into rh-upgradeable-validation-function
rphmeier Mar 22, 2020
87de26e
Merge branch 'master' into rh-upgradeable-validation-function
rphmeier Mar 22, 2020
a4b5b09
fix test compilation
rphmeier Mar 22, 2020
1442886
Merge branch 'master' into rh-upgradeable-validation-function
rphmeier Mar 30, 2020
8026746
Merge branch 'master' into rh-upgradeable-validation-function
rphmeier Apr 1, 2020
052de96
update the Cargo.lock
rphmeier Apr 1, 2020
fa80d0a
fix parachains tests
rphmeier Apr 2, 2020
ff534ce
remove dbg! invocation
rphmeier Apr 2, 2020
52f8307
CI testing
arkpar Apr 3, 2020
01adcda
CI testing
arkpar Apr 3, 2020
065425c
CI testing
arkpar Apr 3, 2020
1193f8e
CI testing
arkpar Apr 3, 2020
f587156
CI testing
arkpar Apr 3, 2020
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
Prev Previous commit
Next Next commit
add validation-code upgrades to validation params and result
  • Loading branch information
rphmeier committed Mar 20, 2020
commit 70089121e21d99fc915fe89b3d2b5bf415a64f78
12 changes: 11 additions & 1 deletion parachain/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub type RelayChainBlockNumber = u32;
pub struct HeadData(#[cfg_attr(feature = "std", serde(with="bytes"))] pub Vec<u8>);

/// Parachain validation code.
#[derive(PartialEq, Eq)]
#[derive(PartialEq, Eq, Encode, Decode)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
pub struct ValidationCode(#[cfg_attr(feature = "std", serde(with="bytes"))] pub Vec<u8>);

Expand Down Expand Up @@ -191,6 +191,14 @@ pub struct ValidationParams {
pub block_data: BlockData,
/// Previous head-data.
pub parent_head: HeadData,
/// The current relay-chain block number.
pub relay_chain_height: RelayChainBlockNumber,
/// Whether a code upgrade is allowed or not, and at which height the upgrade
/// would be applied after, if so. The parachain logic should apply any upgrade
/// issued in this block after the first block
/// with `relay_chain_height` at least this value, if `Some`. if `None`, issue
/// no upgrade.
pub code_upgrade_allowed: Option<RelayChainBlockNumber>,
}

/// The result of parachain validation.
Expand All @@ -200,4 +208,6 @@ pub struct ValidationParams {
pub struct ValidationResult {
/// New head data that should be included in the relay chain state.
pub head_data: HeadData,
/// An update to the validation code that should be scheduled in the relay chain.
pub new_validation_code: Option<ValidationCode>,
}