Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
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
move test-parachains to own folder to work around compilation errors
  • Loading branch information
rphmeier committed Mar 22, 2020
commit e638aa562700e0754cc541c84e757c5e76c06833
211 changes: 59 additions & 152 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ members = [
"service",
"validation",

"test-parachains/adder",
"test-parachains/adder/collator",
"test-parachains/code-upgrader",
"parachain/test-parachains",
"parachain/test-parachains/adder",
"parachain/test-parachains/adder/collator",
"parachain/test-parachains/code-upgrader",
]
exclude = [
"runtime/polkadot/wasm",
"runtime/kusama/wasm",
"test-parachains/adder/wasm",
"parachain/test-parachains/adder/wasm",
]

[badges]
Expand Down
6 changes: 0 additions & 6 deletions parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ log = { version = "0.4.8", optional = true }
[target.'cfg(not(target_os = "unknown"))'.dependencies]
shared_memory = { version = "0.10.0", optional = true }

[dev-dependencies]
tiny-keccak = "1.5.0"
adder = { path = "../test-parachains/adder" }
halt = { path = "../test-parachains/halt" }
code-upgrader = { path = "../test-parachains/code-upgrader" }

[features]
default = ["std"]
wasm-api = ["sp-runtime-interface"]
Expand Down
23 changes: 23 additions & 0 deletions parachain/test-parachains/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "test-parachains"
version = "0.7.22"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Integration tests using the test-parachains"
edition = "2018"

[dependencies]
tiny-keccak = "1.5.0"
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }

parachain = { package = "polkadot-parachain", path = ".." }
adder = { package = "test-parachain-adder", path = "adder" }
halt = { package = "test-parachain-halt", path = "halt" }
code-upgrader = { package = "test-parachain-code-upgrader", path = "code-upgrader" }

[features]
default = [ "std" ]
std = [
"adder/std",
"halt/std",
"code-upgrader/std",
]
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "adder"
name = "test-parachain-adder"
version = "0.7.28-pre1"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which adds to a number as its state transition"
edition = "2018"
build = "build.rs"

[dependencies]
parachain = { package = "polkadot-parachain", path = "../../parachain/", default-features = false, features = [ "wasm-api" ] }
parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] }
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
tiny-keccak = "1.5.0"
dlmalloc = { version = "0.1.3", features = [ "global" ] }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "adder-collator"
name = "test-parachain-adder-collator"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

[dependencies]
adder = { path = ".." }
parachain = { package = "polkadot-parachain", path = "../../../parachain" }
collator = { package = "polkadot-collator", path = "../../../collator" }
primitives = { package = "polkadot-primitives", path = "../../../primitives" }
adder = { package = "test-parachain-adder", path = ".." }
parachain = { package = "polkadot-parachain", path = "../../.." }
collator = { package = "polkadot-collator", path = "../../../../collator" }
primitives = { package = "polkadot-primitives", path = "../../../../primitives" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
client = { package = "sc-client", git = "https://github.com/paritytech/substrate", branch = "master" }
client-api = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[package]
name = "code-upgrader"
name = "test-parachain-code-upgrader"
version = "0.7.22"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which can upgrade code"
edition = "2018"
build = "build.rs"

[dependencies]
parachain = { package = "polkadot-parachain", path = "../../parachain/", default-features = false, features = [ "wasm-api" ] }
parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] }
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
tiny-keccak = "1.5.0"
dlmalloc = { version = "0.1.3", features = [ "global" ] }

# We need to make sure the global allocator is disabled until we have support of full substrate externalities
runtime-io = { package = "sp-io", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false, features = [ "disable_allocator" ] }
runtime-io = { package = "sp-io", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "disable_allocator" ] }

[build-dependencies]
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.5" }

[features]
default = [ "std" ]
std = []
std = ["parachain/std"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// Copyright 2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
Expand All @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

//! Basic parachain that adds a number as part of its state.
//! Test parachain WASM which implements code ugprades.

#![no_std]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "halt"
name = "test-parachain-halt"
version = "0.7.28-pre1"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which executes forever"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use wasm_builder_runner::WasmBuilder;
fn main() {
WasmBuilder::new()
.with_current_project()
.with_wasm_builder_from_crates("1.0.9")
.with_wasm_builder_from_git("https://github.com/paritytech/substrate.git", "8c672e107789ed10973d937ba8cac245404377e2")
.export_heap_base()
.build()
}
17 changes: 17 additions & 0 deletions parachain/test-parachains/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

//! Stub - the fundamental logic of this crate is the integration tests.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

//! Basic parachain that adds a number as part of its state.

use polkadot_parachain as parachain;

use crate::{
DummyExt,
parachain,
parachain::primitives::{
RelayChainBlockNumber,
BlockData as GenericBlockData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//! Basic parachain that adds a number as part of its state.

use polkadot_parachain as parachain;
use parachain;

use crate::{
DummyExt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ mod adder;
mod code_upgrader;
mod wasm_executor;

use polkadot_parachain as parachain;
use crate::parachain::{
primitives::UpwardMessage, wasm_executor::{Externalities, run_worker},
use parachain::{
self, primitives::UpwardMessage, wasm_executor::{Externalities, run_worker},
};

struct DummyExt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//! Basic parachain that adds a number as part of its state.

use polkadot_parachain as parachain;
use parachain;
use crate::{adder, DummyExt};
use crate::parachain::{
primitives::{BlockData, ValidationParams},
Expand Down