Skip to content

Commit

Permalink
Merge branch 'develop' into feat/10/testing-environment
Browse files Browse the repository at this point in the history
  • Loading branch information
th7nder committed May 15, 2024
2 parents 098b113 + 6ea4d8a commit 5082775
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 186 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on: [push, pull_request]

jobs:
toml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install taplo
run: cargo install taplo-cli --locked
- name: List versions
run: |
cargo --version
taplo --version
- name: Run taplo
run: taplo format --check --diff
- name: Taplo failure info
if: failure()
run: |
echo 'TOML is not formatted correctly'
echo 'Please run `taplo format`'
7 changes: 7 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[rule]]
include = ["**/*.toml"]

[rule.formatting]
column_width = 150
reorder_arrays = true
reorder_keys = true
104 changes: 51 additions & 53 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[workspace.package]
authors = ["Eiger Oy <https://eiger.co>"]
edition = "2021"
repository = "https://github.com/eigerco/polka-storage"
homepage = "https://eiger.co"
authors = ["Eiger Oy <https://eiger.co>"]
license-file = "LICENSE"
repository = "https://github.com/eigerco/polka-storage"

[workspace]
resolver = "2"
members = ["node", "runtime"]
resolver = "2"

# FIXME(#@jmg-duarte,#7,14/5/24): remove the patch once something >1.11.0 is released
[patch.'https://github.com/paritytech/litep2p']
Expand All @@ -18,27 +18,27 @@ litep2p = "0.3.0"
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }

scale-info = { version = "2.11.1", default-features = false }
clap = { version = "4.5.3" }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
color-print = "0.3.4"
futures = "0.3.28"
hex-literal = { version = "0.4.1" }
jsonrpsee = { version = "0.22" }
log = { version = "0.4.21", default-features = false }
polkavm = "0.9.3"
polkavm-linker = "0.9.2"
polkavm-derive = "0.9.1"
log = { version = "0.4.21", default-features = false }
polkavm-linker = "0.9.2"
quote = { version = "1.0.33" }
scale-info = { version = "2.11.1", default-features = false }
serde = { version = "1.0.197", default-features = false }
serde-big-array = { version = "0.3.2" }
serde_derive = { version = "1.0.117" }
serde_json = { version = "1.0.114", default-features = false }
serde_yaml = { version = "0.9" }
smallvec = "1.11.0"
syn = { version = "2.0.53" }
thiserror = { version = "1.0.48" }
tracing-subscriber = { version = "0.3.18" }
jsonrpsee = { version = "0.22" }
clap = { version = "4.5.3" }
futures = "0.3.28"
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
hex-literal = { version = "0.4.1" }
smallvec = "1.11.0"
color-print = "0.3.4"

# Local
polka-storage-runtime = { path = "runtime" }
Expand All @@ -49,11 +49,11 @@ sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
Expand All @@ -66,41 +66,39 @@ sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }

# Polkadot
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", features = [
"rococo-native",
] }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", features = ["rococo-native"] }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }

# Substrate / FRAME
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }

# FRAME Pallets
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
Expand All @@ -115,53 +113,53 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt


# Cumulus
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false, features = [
"parameterized-consensus-hook",
] }
cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false, features = [
"parameterized-consensus-hook",
] }
cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false }

[workspace.lints.rust]
suspicious_double_ref_op = { level = "allow", priority = 2 }

[workspace.lints.clippy]
all = { level = "allow", priority = 0 }
correctness = { level = "warn", priority = 1 }
bind_instead_of_map = { level = "allow", priority = 2 } # stylistic
borrowed-box = { level = "allow", priority = 2 } # Reasonable to fix this one
complexity = { level = "warn", priority = 1 }
correctness = { level = "warn", priority = 1 }
default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic
derivable_impls = { level = "allow", priority = 2 } # false positives
eq_op = { level = "allow", priority = 2 } # In tests we test equality.
erasing_op = { level = "allow", priority = 2 } # E.g. 0 * DOLLARS
extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic
identity-op = { level = "allow", priority = 2 } # One case where we do 0 +
if-same-then-else = { level = "allow", priority = 2 }
zero-prefixed-literal = { level = "allow", priority = 2 } # 00_1000_000
type_complexity = { level = "allow", priority = 2 } # raison d'etre
needless-lifetimes = { level = "allow", priority = 2 } # generated code
needless_option_as_deref = { level = "allow", priority = 2 } # false positives
nonminimal-bool = { level = "allow", priority = 2 } # maybe
borrowed-box = { level = "allow", priority = 2 } # Reasonable to fix this one
option-map-unit-fn = { level = "allow", priority = 2 } # stylistic
stable_sort_primitive = { level = "allow", priority = 2 } # prefer stable sort
too-many-arguments = { level = "allow", priority = 2 } # (Turning this on would lead to)
needless-lifetimes = { level = "allow", priority = 2 } # generated code
type_complexity = { level = "allow", priority = 2 } # raison d'etre
unit_arg = { level = "allow", priority = 2 } # stylistic
unnecessary_cast = { level = "allow", priority = 2 } # Types may change
identity-op = { level = "allow", priority = 2 } # One case where we do 0 +
useless_conversion = { level = "allow", priority = 2 } # Types may change
unit_arg = { level = "allow", priority = 2 } # stylistic
option-map-unit-fn = { level = "allow", priority = 2 } # stylistic
bind_instead_of_map = { level = "allow", priority = 2 } # stylistic
erasing_op = { level = "allow", priority = 2 } # E.g. 0 * DOLLARS
eq_op = { level = "allow", priority = 2 } # In tests we test equality.
while_immutable_condition = { level = "allow", priority = 2 } # false positives
needless_option_as_deref = { level = "allow", priority = 2 } # false positives
derivable_impls = { level = "allow", priority = 2 } # false positives
stable_sort_primitive = { level = "allow", priority = 2 } # prefer stable sort
extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic
default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic
zero-prefixed-literal = { level = "allow", priority = 2 } # 00_1000_000
48 changes: 22 additions & 26 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "polka-storage-node"
authors.workspace = true
build = "build.rs"
description = "Polka Storage parachain collator."
version = "0.0.0"
license-file.workspace = true
homepage.workspace = true
repository.workspace = true
edition.workspace = true
authors.workspace = true
homepage.workspace = true
license-file.workspace = true
name = "polka-storage-node"
publish = false
build = "build.rs"
repository.workspace = true
version = "0.0.0"

[lints]
workspace = true
Expand All @@ -18,11 +18,11 @@ name = "polka-storage-node"

[dependencies]
clap = { workspace = true, features = ["derive"] }
log = { workspace = true, default-features = true }
codec = { workspace = true }
serde = { features = ["derive"], workspace = true, default-features = true }
jsonrpsee = { workspace = true, features = ["server"] }
futures = { workspace = true }
jsonrpsee = { workspace = true, features = ["server"] }
log = { workspace = true, default-features = true }
serde = { features = ["derive"], workspace = true, default-features = true }
serde_json = { workspace = true, default-features = true }

# Local
Expand All @@ -36,11 +36,11 @@ sc-basic-authorship = { workspace = true }
sc-chain-spec = { workspace = true }
sc-cli = { workspace = true }
sc-client-api = { workspace = true }
sc-offchain = { workspace = true }
sc-consensus = { workspace = true }
sc-executor = { workspace = true }
sc-network = { workspace = true }
sc-network-sync = { workspace = true }
sc-offchain = { workspace = true }
sc-rpc = { workspace = true }
sc-service = { workspace = true }
sc-sysinfo = { workspace = true }
Expand All @@ -53,8 +53,8 @@ sp-block-builder = { workspace = true }
sp-blockchain = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-core = { workspace = true }
sp-keystore = { workspace = true }
sp-io = { workspace = true }
sp-keystore = { workspace = true }
sp-runtime = { workspace = true }
sp-timestamp = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
Expand All @@ -66,6 +66,7 @@ polkadot-primitives = { workspace = true }
xcm = { workspace = true, default-features = false }

# Cumulus
color-print = { workspace = true }
cumulus-client-cli = { workspace = true }
cumulus-client-collator = { workspace = true }
cumulus-client-consensus-aura = { workspace = true }
Expand All @@ -75,25 +76,20 @@ cumulus-client-service = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-relay-chain-interface = { workspace = true }
color-print = { workspace = true }

[build-dependencies]
substrate-build-script-utils = { workspace = true }

[features]
default = []
runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"polka-storage-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"polka-storage-runtime/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"polka-storage-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = ["polka-storage-runtime/try-runtime", "polkadot-cli/try-runtime", "sp-runtime/try-runtime"]
Loading

0 comments on commit 5082775

Please sign in to comment.