Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to 2407-4 #565

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,717 changes: 891 additions & 826 deletions Cargo.lock

Large diffs are not rendered by default.

172 changes: 86 additions & 86 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ polkadot --version
polkadot 1.11.0-0bb6249

$ cargo --version
cargo 1.77.0 (3fe68eabf 2024-02-29)
cargo 1.81.0 (3fe68eabf 2024-02-29)

$ zombienet version
1.3.103
Expand Down
2 changes: 2 additions & 0 deletions cli/polka-storage-provider/server/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ pub struct StorageServerState {
pub deal_db: Arc<DealDB>,

pub listen_address: SocketAddr,

// I think this just needs the sector size actually
#[allow(dead_code)]
pub post_proof: RegisteredPoStProof,
}

Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfiles/mater-cli.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################
##### Chef
FROM rust:1.77 AS chef
FROM rust:1.81.0 AS chef
RUN cargo install cargo-chef
WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfiles/polka-storage-node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################
##### Chef
FROM rust:1.77 AS chef
FROM rust:1.81.0 AS chef
RUN cargo install cargo-chef
WORKDIR /app

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################
##### Chef
FROM rust:1.77 AS chef
FROM rust:1.81.0 AS chef
RUN cargo install cargo-chef
WORKDIR /app

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################
##### Chef
FROM rust:1.77 AS chef
FROM rust:1.81.0 AS chef
RUN cargo install cargo-chef
WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfiles/storagext-cli.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################
##### Chef
FROM rust:1.77 AS chef
FROM rust:1.81.0 AS chef
RUN cargo install cargo-chef
WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion docs/src/getting-started/building/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cd polka-storage

To build the binaries directly on your system you will need the following tools:

* Rust 1.77 — you can install it using [`rustup`](https://rustup.rs/) and its [guide](https://rust-lang.github.io/rustup/installation/other.html) for help.
* Rust 1.81.0 — you can install it using [`rustup`](https://rustup.rs/) and its [guide](https://rust-lang.github.io/rustup/installation/other.html) for help.
* Other dependencies — keep reading, we'll get to it after the end of this list!
* `just` (optional) — (after installing Rust) you can use `cargo install just` or check the [official list of packages](https://just.systems/man/en/packages.html).

Expand Down
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
};
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
buildInputs = with pkgs; [
azure-cli # Building Docker images and publishing to Azure Container Registry
cargo-expand
cargo-tarpaulin
clang
Expand Down
105 changes: 49 additions & 56 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,71 +14,64 @@ version = "0.0.0"
name = "polka-storage-node"

[dependencies]
clap = { workspace = true, features = ["derive"] }
codec = { workspace = true }
clap = { features = ["derive"], workspace = true }
codec = { workspace = true, default-features = true }
color-print = { workspace = true }
cumulus-client-cli = { workspace = true, default-features = true }
cumulus-client-collator = { workspace = true, default-features = true }
cumulus-client-consensus-aura = { workspace = true, default-features = true }
cumulus-client-consensus-common = { workspace = true, default-features = true }
cumulus-client-consensus-proposer = { workspace = true, default-features = true }
cumulus-client-service = { workspace = true, default-features = true }
cumulus-primitives-core = { workspace = true, default-features = true }
cumulus-primitives-parachain-inherent = { workspace = true, default-features = true }
cumulus-relay-chain-interface = { workspace = true, default-features = true }
docify = { workspace = true }
frame-benchmarking = { workspace = true, default-features = true }
frame-benchmarking-cli = { workspace = true, default-features = true }
futures = { workspace = true }
jsonrpsee = { workspace = true, features = ["server"] }
jsonrpsee = { features = ["server"], workspace = true }
log = { workspace = true, default-features = true }
pallet-transaction-payment-rpc = { workspace = true, default-features = true }
polka-storage-runtime.workspace = true
polkadot-cli = { features = ["rococo-native"], workspace = true, default-features = true }
polkadot-primitives = { workspace = true, default-features = true }
prometheus-endpoint = { workspace = true, default-features = true }
sc-basic-authorship = { workspace = true, default-features = true }
sc-chain-spec = { workspace = true, default-features = true }
sc-cli = { workspace = true, default-features = true }
sc-client-api = { workspace = true, default-features = true }
sc-consensus = { workspace = true, default-features = true }
sc-executor = { workspace = true, default-features = true }
sc-network = { workspace = true, default-features = true }
sc-network-sync = { workspace = true, default-features = true }
sc-offchain = { workspace = true, default-features = true }
sc-rpc = { workspace = true, default-features = true }
sc-service = { workspace = true, default-features = true }
sc-sysinfo = { workspace = true, default-features = true }
sc-telemetry = { workspace = true, default-features = true }
sc-tracing = { workspace = true, default-features = true }
sc-transaction-pool = { workspace = true, default-features = true }
sc-transaction-pool-api = { workspace = true, default-features = true }
serde = { features = ["derive"], workspace = true, default-features = true }
serde_json = { workspace = true, default-features = true }

# Local
polka-storage-runtime = { workspace = true }

# Substrate
frame-benchmarking = { workspace = true }
frame-benchmarking-cli = { workspace = true }
pallet-transaction-payment-rpc = { workspace = true }
sc-basic-authorship = { workspace = true }
sc-chain-spec = { workspace = true }
sc-cli = { workspace = true }
sc-client-api = { 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 }
sc-telemetry = { workspace = true }
sc-tracing = { workspace = true }
sc-transaction-pool = { workspace = true }
sc-transaction-pool-api = { workspace = true }
sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-blockchain = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-keystore = { workspace = true }
sp-runtime = { workspace = true }
sp-timestamp = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
substrate-prometheus-endpoint = { workspace = true }

# Polkadot
polkadot-cli = { workspace = true, features = ["rococo-native"] }
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 }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-proposer = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-relay-chain-interface = { workspace = true }
sp-api = { workspace = true, default-features = true }
sp-block-builder = { workspace = true, default-features = true }
sp-blockchain = { workspace = true, default-features = true }
sp-consensus-aura = { workspace = true, default-features = true }
sp-core = { workspace = true, default-features = true }
sp-io = { workspace = true, default-features = true }
sp-keystore = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
sp-timestamp = { workspace = true, default-features = true }
substrate-frame-rpc-system = { workspace = true, default-features = true }
xcm.workspace = true

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

[features]
default = []
runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
Expand Down
2 changes: 1 addition & 1 deletion node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use polka_storage_runtime::{
apis::RuntimeApi,
opaque::{Block, Hash},
};
use prometheus_endpoint::Registry;
use sc_client_api::Backend;
use sc_consensus::ImportQueue;
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
Expand All @@ -36,7 +37,6 @@ use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, Ta
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_keystore::KeystorePtr;
use substrate_prometheus_endpoint::Registry;

#[docify::export(wasm_executor)]
type ParachainExecutor = WasmExecutor<ParachainHostFunctions>;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.77.0"
channel = "1.81.0"
components = ["cargo", "clippy", "llvm-tools-preview", "rust-analyzer", "rust-src", "rust-std", "rustc", "rustc-dev", "rustfmt"]
profile = "minimal"
targets = ["wasm32-unknown-unknown"]
2 changes: 1 addition & 1 deletion storage/polka-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async-channel = { workspace = true }
base64 = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
ciborium = { workspace = true }
cid = { workspace = true, features = ["serde"] }
cid = { workspace = true, features = ["serde", "std"] }
clap = { workspace = true, features = ["derive", "string"] }
integer-encoding = { workspace = true }
jsonrpsee = { workspace = true, features = ["server"] }
Expand Down
2 changes: 1 addition & 1 deletion storage/polka-index/src/local_index_directory/rdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ impl Service for RocksDBLid {
records
.into_iter()
.map(|record| self.add_index_record(&cursor_prefix, record))
.collect::<Result<_, _>>()?;
.collect::<Result<(), _>>()?;

metadata.indexed_at = chrono::Utc::now().into();
self.set_piece_cid_to_metadata(piece_cid, &metadata)
Expand Down