Skip to content

Commit

Permalink
Merge branch 'update-node' into substrate-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
xermicus committed Jan 8, 2024
2 parents 75f66ac + 81090cb commit 735f840
Show file tree
Hide file tree
Showing 29 changed files with 11,170 additions and 3,243 deletions.
10,730 changes: 7,940 additions & 2,790 deletions Cargo.lock

Large diffs are not rendered by default.

127 changes: 125 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,132 @@
[workspace.package]
authors = ["anonymous"]
edition = "2021"
version = "0.35.0"
license = "Unlicense"
homepage = "https://github.com/paritytech/substrate-contracts-node"
repository = "https://github.com/paritytech/substrate-contracts-node"

[workspace]
resolver = "2"
members = [
'node',
'runtime',
"node",
"runtime",
"parachain-runtime",
]

[profile.release]
panic = 'unwind'

[workspace.dependencies]
clap = { version = "4.4.6", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] }
futures = "0.3.28"
hex-literal = { version = "0.4.1"}
jsonrpsee = { version = "0.16.2", features = ["server"] }
log = { version = "0.4.20", default-features = false }
serde = { version = "1.0.189", features = ["derive"] }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
smallvec = "1.11.1"
color-print = "0.3.5"

# Substrate
frame-benchmarking = { version = "24.0.0", default-features = false }
frame-benchmarking-cli = { version = "28.0.0" }
frame-executive = { version = "24.0.0", default-features = false }
frame-support = { version = "24.0.0", default-features = false }
frame-system = { version = "24.0.0", default-features = false }
frame-system-benchmarking = { version = "24.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "22.0.0", default-features = false }
frame-try-runtime = { version = "0.30.0", default-features = false }
pallet-aura = { version = "23.0.0", default-features = false }
pallet-authorship = { version = "24.0.0", default-features = false }
pallet-balances = { version = "24.0.0", default-features = false }
pallet-session = { version = "24.0.0", default-features = false }
pallet-sudo = { version = "24.0.0", default-features = false }
pallet-timestamp = { version = "23.0.0", default-features = false }
pallet-transaction-payment = { version = "24.0.0", default-features = false }
pallet-transaction-payment-rpc = { version = "26.0.0" }
pallet-transaction-payment-rpc-runtime-api = { version = "24.0.0", default-features = false }
sc-basic-authorship = { version = "0.30.0" }
sc-chain-spec = { version = "23.0.0" }
sc-cli = { version = "0.32.0" }
sc-client-api = { version = "24.0.0" }
sc-consensus = { version = "0.29.0" }
sc-executor = { version = "0.28.0" }
sc-network = { version = "0.30.0" }
sc-network-sync = { version = "0.29.0" }
sc-offchain = { version = "25.0.0" }
sc-rpc = { version = "25.0.0" }
sc-service = { version = "0.31.0" }
sc-sysinfo = { version = "23.0.0" }
sc-telemetry = { version = "11.0.0" }
sc-tracing = { version = "24.0.0" }
sc-transaction-pool = { version = "24.0.0" }
sc-transaction-pool-api = { version = "24.0.0" }
sp-api = { version = "22.0.0", default-features = false }
sp-block-builder = { version = "22.0.0", default-features = false }
sp-blockchain = { version = "24.0.0" }
sp-consensus-aura = { version = "0.28.0", default-features = false }
sp-core = { version = "24.0.0", default-features = false }
sp-inherents = { version = "22.0.0", default-features = false }
sp-io = { version = "26.0.0", default-features = false }
sp-keystore = { version = "0.30.0" }
sp-offchain = { version = "22.0.0", default-features = false }
sp-runtime = { version = "27.0.0", default-features = false }
sp-session = { version = "23.0.0", default-features = false }
sp-std = { version = "11.0.0", default-features = false }
sp-timestamp = { version = "22.0.0" }
sp-transaction-pool = { version = "22.0.0", default-features = false }
sp-version = { version = "25.0.0", default-features = false }
substrate-frame-rpc-system = { version = "24.0.0" }
substrate-prometheus-endpoint = { version = "0.15.0" }
substrate-wasm-builder = { version = "13.0.0" }
substrate-build-script-utils = { version = "8.0.0" }
try-runtime-cli = { version = "0.34.0" }

# extra deps for running a solo node on top of a parachain
pallet-grandpa = { version = "24.0.0", default-features = false }
sc-consensus-grandpa = { version = "0.15.0", default-features = false }
sp-consensus-grandpa = { version = "9.0.0", default-features = false }
sp-genesis-builder = { version = "0.3.0", default-features = false }
sp-storage = { version = "16.0.0", default-features = false }
sc-consensus-aura = { version = "0.30.0", default-features = false }
sc-consensus-manual-seal = { version = "0.31.0", default-features = false}

# extra deps for setting up pallet-contracts
pallet-contracts = { version = "23.0.0", default-features = false }
pallet-contracts-primitives = { version = "27.0.0", default-features = false }
pallet-insecure-randomness-collective-flip = { version = "12.0.0", default-features = false }
pallet-assets = { version = "25.0.0", default-features = false }
pallet-utility = { version = "24.0.0", default-features = false }

# Polkadot
pallet-xcm = { version = "3.0.0", default-features = false }
polkadot-cli = { version = "3.0.0", features = ["rococo-native"] }
polkadot-parachain-primitives = { version = "2.0.0", default-features = false }
polkadot-primitives = { version = "3.0.0" }
polkadot-runtime-common = { version = "3.0.0", default-features = false }
xcm = { package="staging-xcm", version = "3.0.0", default-features = false }
xcm-builder = { package="staging-xcm-builder", version = "3.0.1", default-features = false }
xcm-executor = { package="staging-xcm-executor", version = "3.0.0", default-features = false }

# Cumulus
cumulus-client-cli = { version = "0.3.0" }
cumulus-client-collator = { version = "0.3.0" }
cumulus-client-consensus-proposer = { version = "0.3.0" }
cumulus-client-consensus-aura = { version = "0.3.0" }
cumulus-client-consensus-common = { version = "0.3.0" }
cumulus-client-service = { version = "0.3.0" }
cumulus-pallet-aura-ext = { version = "0.3.0", default-features = false }
cumulus-pallet-dmp-queue = { version = "0.3.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.3.0", default-features = false, features = ["parameterized-consensus-hook",] }
cumulus-pallet-session-benchmarking = {version = "5.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.3.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.3.0", default-features = false }
cumulus-primitives-core = { version = "0.3.0", default-features = false }
cumulus-primitives-parachain-inherent = { version = "0.3.0" }
cumulus-primitives-timestamp = { version = "0.3.0", default-features = false }
cumulus-primitives-utility = { version = "0.3.0", default-features = false }
cumulus-relay-chain-interface = { version = "0.3.0" }
pallet-collator-selection = { version = "5.0.0", default-features = false }
parachain-info = { package = "staging-parachain-info", version = "0.3.0", default-features = false }
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ This repository contains Substrate's [`node-template`](https://github.com/parity
configured to include Substrate's [`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)
‒ a smart contract module.

This repository is tracking Substrate's
[`polkadot-v1.0.0`](https://github.com/paritytech/substrate/tree/polkadot-v1.0.0) branch.
When new Polkadot releases come out we may update to those.

_This repository contains a couple of modifications that make it unsuitable
for a production deployment, but a great fit for development and testing:_

Expand All @@ -19,6 +15,13 @@ for a production deployment, but a great fit for development and testing:_
[#42](https://github.com/paritytech/substrate-contracts-node/pull/42).
Hereby blocks are authored immediately at every transaction, so there
is none of the typical six seconds block time associated with `grandpa` or `aura`.
* By default, either manual or instant seal does not result in block finalization unless the `engine_finalizeBlock`
RPC is executed. However, it is possible to configure the finalization of sealed blocks to occur after a certain
amount of time by setting the `--finalize-delay-sec` option to a specific value, which specifies the number of seconds
to delay before finalizing the blocks. The default value is 1 second.
```shell
./target/release/substrate-contracts-node --finalize-delay-sec 5
```
* _If no CLI arguments are passed the node is started in development mode
by default._
* A custom logging filter is applied by default that hides block production noise
Expand Down Expand Up @@ -51,7 +54,7 @@ Follow the [official installation steps](https://docs.substrate.io/install/) to
Afterwards you can install this node via

```bash
cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git
cargo install contracts-node
```

## Usage
Expand All @@ -75,6 +78,10 @@ Once the node template is running locally, you can connect to it with frontends

## How to upgrade to new Polkadot release

**Note: Now that this repo has upgraded to using dependencies from crates.io, this section
needs to be updated to reflect the new process, once the first release of the crates from
the new `polkadot-sdk` mono-repo happens**

- [ ] Check Substrate's [`node-template`](https://github.com/paritytech/substrate/commits/master/bin/node-template)
for new commits between the new polkadot release branch and the one this repository is currently synced with.
The current branch is mentioned in this readme.
Expand Down
126 changes: 81 additions & 45 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[package]
name = "contracts-node"
version = "0.28.0"
authors = ["Parity Technologies <admin@parity.io>"]
version.workspace = true
authors.workspace = true
description = "Substrate node configured for smart contracts via `pallet-contracts`."
edition = "2021"
license = "Unlicense"
edition.workspace = true
license.workspace = true
build = "build.rs"
homepage = "https://github.com/paritytech/substrate-contracts-node"
repository = "https://github.com/paritytech/substrate-contracts-node"
publish = false
homepage.workspace = true
repository.workspace = true

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -18,46 +17,83 @@ name = "substrate-contracts-node"
path = "src/main.rs"

[dependencies]
clap = { version = "4.2.7", features = ["derive"] }
futures = { version = "0.3.21", features = ["thread-pool"]}

sc-cli = { git = "https://github.com/paritytech/substrate", package = "sc-cli", default-features = false, branch = "polkadot-v1.0.0" }
sp-core = { git = "https://github.com/paritytech/substrate", package = "sp-core", branch = "polkadot-v1.0.0" }
sc-executor = { git = "https://github.com/paritytech/substrate", package = "sc-executor", branch = "polkadot-v1.0.0" }
sc-network = { git = "https://github.com/paritytech/substrate", package = "sc-network", branch = "polkadot-v1.0.0" }
sc-service = { git = "https://github.com/paritytech/substrate", package = "sc-service", default-features = false, branch = "polkadot-v1.0.0" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", package = "sc-telemetry", branch = "polkadot-v1.0.0" }
sc-keystore = { git = "https://github.com/paritytech/substrate", package = "sc-keystore", branch = "polkadot-v1.0.0" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", package = "sc-transaction-pool", branch = "polkadot-v1.0.0" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", package = "sc-transaction-pool-api", branch = "polkadot-v1.0.0" }
sc-offchain = { git = "https://github.com/paritytech/substrate", package = "sc-offchain", branch = "polkadot-v1.0.0" }
sc-consensus = { git = "https://github.com/paritytech/substrate", package = "sc-consensus", branch = "polkadot-v1.0.0" }
sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", package = "sc-consensus-manual-seal", branch = "polkadot-v1.0.0" }
sc-client-api = { git = "https://github.com/paritytech/substrate", package = "sc-client-api", branch = "polkadot-v1.0.0" }
sp-runtime = { git = "https://github.com/paritytech/substrate", package = "sp-runtime", branch = "polkadot-v1.0.0" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", package = "sp-timestamp", branch = "polkadot-v1.0.0" }

# These dependencies are used for the node's RPCs
jsonrpsee = { version = "0.16.2", features = ["server"] }
sp-api = { git = "https://github.com/paritytech/substrate", package = "sp-api", branch = "polkadot-v1.0.0" }
sc-rpc = { git = "https://github.com/paritytech/substrate", package = "sc-rpc", branch = "polkadot-v1.0.0" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", package = "sc-rpc-api", branch = "polkadot-v1.0.0" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", package = "sp-blockchain", branch = "polkadot-v1.0.0" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", package = "sp-block-builder", branch = "polkadot-v1.0.0" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", package = "sc-basic-authorship", branch = "polkadot-v1.0.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", package = "substrate-frame-rpc-system", branch = "polkadot-v1.0.0" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", package = "pallet-transaction-payment-rpc", branch = "polkadot-v1.0.0" }

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

# yank this crate until
# https://github.com/bluejekyll/enum-as-inner/issues/98
# is fixed
enum-as-inner = "=0.5.1"
clap = { workspace = true }
log = { workspace = true }
codec = { workspace = true }
serde = { workspace = true }
jsonrpsee = { workspace = true }
futures = { workspace = true }

# Local
contracts-parachain-runtime = { path = "../parachain-runtime", version = "0.35.0" }
contracts-node-runtime = { path = "../runtime", version = "0.35.0" }

# 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-offchain = { workspace = true }
sc-consensus = { workspace = true }
sc-executor = { workspace = true }
sc-network = { workspace = true }
sc-network-sync = { 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-keystore = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-timestamp = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
substrate-prometheus-endpoint = { workspace = true }
try-runtime-cli = { workspace = true, optional = true }

# extra for running solo-chain
sp-consensus-grandpa = { workspace = true }
sc-consensus-grandpa = { workspace = true }
sc-consensus-aura = { workspace = true }
sc-consensus-manual-seal = { workspace = true }

# Polkadot
polkadot-cli = { workspace = true }
polkadot-primitives = { workspace = true }
xcm = { workspace = true }

# Cumulus
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 }
color-print = { workspace = true }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", package = "substrate-build-script-utils", branch = "polkadot-v1.0.0" }
substrate-build-script-utils = { workspace = true }

[features]
default = []
runtime-benchmarks = [
"contracts-parachain-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
]
try-runtime = [
"try-runtime-cli/try-runtime",
"contracts-parachain-runtime/try-runtime"
]
Loading

0 comments on commit 735f840

Please sign in to comment.