Skip to content

Commit

Permalink
* Upgrade / pin substrate to v1.9.0
Browse files Browse the repository at this point in the history
* Add validator-set and im-online pallets
* Terraform configuration for vault / agents
* Not quite working otel operator configuration
* Not quite viable due to wasm build failure

Signed-off-by: Ryan <[email protected]>
  • Loading branch information
ryan-s-roberts committed Jun 1, 2024
1 parent a73062d commit af3a36d
Show file tree
Hide file tree
Showing 50 changed files with 9,794 additions and 1,589 deletions.
3,068 changes: 1,969 additions & 1,099 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions charts/chronicle/templates/chronicle-secret-volume.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions charts/chronicle/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ spec:
mountPath: /var/lib/chronicle/store/
{{- include "lib.volumeMounts" .Values.extraVolumeMounts | nindent 12 }}
volumes:
- name: chronicle-secrets
persistentVolumeClaim:
claimName: chronicle-secrets
- name: chronicle-data
persistentVolumeClaim:
claimName: chronicle-data
Expand Down
11 changes: 6 additions & 5 deletions crates/chronicle-test-infrastructure/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ common = { path = "../common", features = [
"std",
] }
diesel = { workspace = true }
frame-support = { version = "25.0.0", features = ["std"] }
frame-system = { version = "25.0.0", features = ["std"] }
frame-support = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', features = ["std"] }
frame-system = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', features = ["std"] }
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }
sp-io = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }
sp-runtime = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }

futures = { workspace = true }
insta = { workspace = true, features = ["json", "yaml"] }
lazy_static = { workspace = true }
Expand All @@ -36,9 +40,6 @@ scale-info = { version = "2.10.0", default-features = false, features = [
"derive",
] }
serde_json = { workspace = true }
sp-core = { version = "25.0.0" }
sp-io = { version = "27.0.0" }
sp-runtime = { version = "28.0.0" }
subxt = { version = "0.34", features = ["substrate-compat"] }
tempfile = { workspace = true }
testcontainers = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ impl frame_system::Config for Test {
type SS58Prefix = ConstU16<42>;
type SystemWeightInfo = ();
type Version = ();
type RuntimeTask = ();
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_chronicle::Config for Test {
Expand Down
2 changes: 1 addition & 1 deletion crates/chronicle/src/bootstrap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ pub async fn api(
options: &ArgMatches,
remote_opa: Option<PolicyAddress>,
liveness_check_interval: Option<u64>,
) -> Result<api::dispatch::ApiDispatch, CliError> {
) -> Result<ApiDispatch, CliError> {
use protocol_substrate::PolkadotConfig;

let embedded_tp = in_mem_ledger(options).await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/prov/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ pub struct ProvSummary {
pub total_delegations: usize,
}

use std::fmt;
use core::fmt;

impl fmt::Display for ProvSummary {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
7 changes: 4 additions & 3 deletions crates/embedded-substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ portpicker = { workspace = true }
protocol-abstract = { path = "../protocol-abstract" }
protocol-substrate = { path = "../protocol-substrate" }
protocol-substrate-chronicle = { path = "../protocol-substrate-chronicle" }
sc-cli = { version = "0.33.0" }
sp-io = { version = "27.0.0" }
sp-runtime = { version = "28.0.0" }
sc-cli = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }
sp-io = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }
sp-runtime = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }

subxt = { version = "0.34", features = ["substrate-compat"] }
tempfile = { version = "3" }
thiserror = { workspace = true }
Expand Down
10 changes: 5 additions & 5 deletions crates/opactl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ uuid = { workspace = true, features = ["v4"] }

[dev-dependencies]
chronicle-telemetry = { path = "../chronicle-telemetry" }
frame-support = { version = "25.0.0", features = ["std"] }
frame-system = { version = "25.0.0", features = ["std"] }
frame-support = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', features = ["std"] }
frame-system = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', features = ["std"] }
hex = { workspace = true }
insta = { workspace = true, features = ["yaml"] }
pallet-opa = { path = "../pallet-opa", features = ["std"] }
Expand All @@ -50,9 +50,9 @@ scale-info = { version = "2.10.0", default-features = false, features = [
] }
scale-value = { version = "^0.14" }
serde_json = { workspace = true }
sp-core = { version = "25.0.0" }
sp-io = { version = "27.0.0" }
sp-runtime = { version = "28.0.0" }
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', features = ["std"] }
sp-io = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', features = ["std"] }
sp-runtime = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', features = ["std"] }
subxt = { version = "0.34", features = ["substrate-compat"] }
tempfile = { workspace = true }

Expand Down
6 changes: 6 additions & 0 deletions crates/opactl/src/test/mockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ impl frame_system::Config for Test {
type SS58Prefix = ConstU16<42>;
type SystemWeightInfo = ();
type Version = ();
type RuntimeTask = ();
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_opa::Config for Test {
Expand Down
19 changes: 10 additions & 9 deletions crates/pallet-chronicle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ version = "0.7.5"
common = { path = "../common", default-features = false, features = [
"parity-encoding",
] }
frame-benchmarking = { version = "25.0.0", default-features = false, optional = true }
frame-support = { version = "25.0.0", default-features = false }
frame-system = { version = "25.0.0", default-features = false }

frame-benchmarking = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false, optional = true }
frame-support = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
frame-system = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-core-hashing = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-std = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
macro-attr-2018 = { workspace = true }
newtype-derive-2018 = { workspace = true }
parity-scale-codec = { version = "^3.4.0", default-features = false, features = [
Expand All @@ -22,19 +26,16 @@ scale-info = { version = "^2.10.0", default-features = false, features = [
"derive",
] }
serde = { version = "1.0", default-features = false }
sp-core = { version = "25.0.0", default-features = false }
sp-core-hashing = { version = "14", default-features = false }
sp-std = { version = "12.0.0", default-features = false }
tracing = { version = "0.1", default-features = false, features = [
"attributes",
] }
uuid = { version = "1.5.0", default-features = false }

[dev-dependencies]
chronicle-telemetry = { path = "../chronicle-telemetry" }
sp-core = { version = "25.0.0" }
sp-io = { version = "27.0.0" }
sp-runtime = { version = "28.0.0" }
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-io = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-runtime = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
uuid = { version = "1.5.0", default-features = true }

[features]
Expand Down
6 changes: 6 additions & 0 deletions crates/pallet-chronicle/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ impl frame_system::Config for Test {
type SS58Prefix = ConstU16<42>;
type SystemWeightInfo = ();
type Version = ();
type RuntimeTask = ();
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_template::Config for Test {
Expand Down
24 changes: 14 additions & 10 deletions crates/pallet-opa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ version = "0.7.5"
common = { path = "../common", default-features = false, features = [
"parity-encoding",
] }
frame-benchmarking = { version = "25.0.0", default-features = false, optional = true }
frame-support = { version = "25.0.0", default-features = false }
frame-system = { version = "25.0.0", default-features = false }

# Start Generation Here
frame-benchmarking = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false, optional = true }
frame-support = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
frame-system = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-core-hashing = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-std = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
k256 = { version = "0.11", default-features = false, features = [
"arithmetic",
"ecdsa",
Expand All @@ -29,20 +34,19 @@ scale-info = { version = "^2.10.0", default-features = false, features = [
] }
serde = { version = "1", default-features = false }
serde_json = { version = "1", default-features = false, features = ["alloc"] }
sp-core = { version = "25", default-features = false }
sp-core-hashing = { version = "14", default-features = false }
sp-std = { version = "12.0.0", default-features = false }
tracing = { version = "0.1", default-features = false, features = [
"attributes",
] }
uuid = { version = "1.5", default-features = false }


[dev-dependencies]
chronicle-telemetry = { path = "../chronicle-telemetry" }
sp-core = { version = "25.0.0" }
sp-io = { version = "27.0.0" }
sp-runtime = { version = "28.0.0" }
uuid = { version = "1.5.0", default-features = true }
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }
sp-io = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }
sp-runtime = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0' }
uuid = { version = "1.5.0", default-features = false }


[features]
default = ["std"]
Expand Down
5 changes: 3 additions & 2 deletions crates/runtime-api-chronicle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ edition = "2021"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
sp-api = { version = "23.0.0", default-features = false }
sp-core = { version = "25.0.0", default-features = false }

sp-api = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0', default-features = false }

#Local dependencies
common = { path = "../common", default-features = false, features = ["parity-encoding"] }
Expand Down
2 changes: 1 addition & 1 deletion docker/unified-builder
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG RUST_VERSION=1.76
ARG RUST_VERSION=1.78
ARG CARGO_HOME=.cargo_cached
FROM --platform=${BUILDPLATFORM} rust:${RUST_VERSION} as hostbase
ENV PKG_CONFIG_ALLOW_CROSS=1
Expand Down
85 changes: 47 additions & 38 deletions node/node-chronicle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT-0"
name = "node-chronicle"
publish = false
repository = "https://github.com/substrate-developer-hub/substrate-node-template/"
version = "4.0.0-dev"
version = "0.1.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -21,54 +21,63 @@ path = "src/main.rs"
name = "node_chronicle"
path = "src/lib.rs"


[dependencies]
clap = { version = "4.4.2", features = ["derive"] }
frame-system = { version = "25.0.0" }
futures = { version = "0.3.21", features = ["thread-pool"] }
sc-cli = { version = "0.33.0" }
sc-client-api = { version = "25.0.0" }
sc-consensus = { version = "0.30.0" }
sc-consensus-aura = { version = "0.31.0" }
sc-consensus-grandpa = { version = "0.16.0" }
sc-executor = { version = "0.29.0" }
sc-network = { version = "0.31.0" }
sc-offchain = { version = "26.0.0" }
sc-service = { version = "0.32.0" }
sc-statement-store = { version = "7.0.0" }
sc-telemetry = { version = "12.0.0" }
sc-transaction-pool = { version = "25.0.0" }
sc-transaction-pool-api = { version = "25.0.0" }
sp-consensus-aura = { version = "0.29.0" }
sp-consensus-grandpa = { version = "10.0.0" }
sp-core = { version = "25.0.0" }
sp-inherents = { version = "23.0.0" }
sp-io = { version = "27.0.0" }
sp-keyring = { version = "28.0.0" }
sp-runtime = { version = "28.0.0" }
sp-timestamp = { version = "23.0.0" }
clap = { version = "^4.5.1", features = ["derive"] }
frame-system = { git = 'https://github.com/paritytech/polkadot-sdk.git', tag = 'polkadot-v1.9.0'}
futures = { version = "^0.3.21", features = ["thread-pool"] }
sc-cli = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-client-api = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-consensus = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-consensus-aura = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-consensus-grandpa = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-executor = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-network = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-offchain = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-service = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-statement-store = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-telemetry = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-transaction-pool = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-transaction-pool-api = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-consensus-aura = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-consensus-grandpa = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-core = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-inherents = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-io = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-keyring = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-runtime = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-timestamp = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
pallet-im-online = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
pallet-session = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}

tracing = { workspace = true }



# These dependencies are used for the node template's RPCs
jsonrpsee = { version = "0.16", features = ["server"] }
sc-basic-authorship = { version = "0.31.0" }
sc-rpc-api = { version = "0.30.0" }
sp-api = { version = "23.0.0" }
sp-block-builder = { version = "23.0.0" }
sp-blockchain = { version = "25.0.0" }
substrate-frame-rpc-system = { version = "25.0.0" }
jsonrpsee = { version = "^0.22", features = ["server"] }
structopt = "0.3.8"
sc-basic-authorship = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sc-rpc-api = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-api = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-block-builder = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
sp-blockchain = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}

# These dependencies are used for runtime benchmarking
frame-benchmarking = { version = "25.0.0" }
frame-benchmarking-cli = { version = "29.0.0" }
frame-benchmarking = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}
frame-benchmarking-cli = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}


try-runtime-cli = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0', optional = true}

# Local Dependencies
runtime-chronicle = { path = "../runtime-chronicle" }

# CLI-specific dependencies
try-runtime-cli = { version = "0.35.0", optional = true }
pallet-chronicle = { path = "../../crates/pallet-chronicle"}
common = {path = "../../crates/common"}

[build-dependencies]
substrate-build-script-utils = { version = "9.0.0" }
substrate-build-script-utils = { git = 'https://github.com/paritytech/polkadot-sdk', tag = 'polkadot-v1.9.0'}

[features]
default = []
Expand Down
Loading

0 comments on commit af3a36d

Please sign in to comment.