Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request paritytech#67 from subspace/subspace-testnet-prepa…
Browse files Browse the repository at this point in the history
…ration

Subspace testnet preparation
  • Loading branch information
nazar-pc authored Oct 12, 2021
2 parents 96ed4f2 + 1a999e2 commit 8e7dc64
Show file tree
Hide file tree
Showing 30 changed files with 1,809 additions and 432 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
!/.git/config
!/.git/HEAD
!/crates
!/node-template-subspace
!/substrate
!/Cargo.lock
!/Cargo.toml
196 changes: 77 additions & 119 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
resolver = "2"
members = [
"crates/*",
"node-template-subspace/node",
"node-template-subspace/runtime",
"substrate/*",
]

Expand Down
1 change: 0 additions & 1 deletion Dockerfile-farmer
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ COPY Cargo.toml /code/Cargo.toml

COPY crates /code/crates
COPY substrate /code/substrate
COPY node-template-subspace /code/node-template-subspace

RUN \
/root/.cargo/bin/cargo build --release --bin subspace-farmer && \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile-node
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ COPY Cargo.toml /code/Cargo.toml

# Up until this line all Rust images in this repo should be the same to share the same layers

# Just enough files for `git rev-parse --short HEAD` to work (used in Substrate node build)
COPY .git /code/.git
# Just an empty directory for Git to recognize it is indeed a Git repository
RUN mkdir /code/.git/objects
COPY crates /code/crates
COPY substrate /code/substrate
COPY node-template-subspace /code/node-template-subspace

RUN \
/root/.cargo/bin/cargo build --release --bin node-template-subspace && \
mv target/release/node-template-subspace subspace-node && \
/root/.cargo/bin/cargo build --release --bin subspace-node && \
mv target/release/subspace-node subspace-node && \
rm -rf target

FROM ubuntu:20.04
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ Subspace node/client using Substrate framework and farmer app implementations.
The structure of this repository is the following:

- `crates` contains Subspace-specific Rust crates used to build node and farmer, most are following Substrate naming conventions
- `subspace-node` is an implementation of the node for Subspace protocol
- `subspace-farmer` is a CLI farmer app
- `substrate` contains modified copies of Substrate's crates that we use for testing
- `node-template-subspace` is the current implementation of the node for Subspace protocol

### How to run

This is a monorepo with multiple binaries and the workflow is typical for Rust projects:

- `cargo run --release --bin node-template-subspace -- --dev --tmp` to run [a node](node-template-subspace)
- `cargo run --release --bin subspace-node -- --dev --tmp` to run [a node](crates/subspace-node)
- `cargo run --release --bin subspace-farmer -- farm` to [start farming](crates/subspace-farmer#start-the-farmer)

NOTE: You need to have `nightly` version of Rust toolchain with `wasm32-unknown-unknown` target available or else you'll get a compilation error.
Expand Down
Loading

0 comments on commit 8e7dc64

Please sign in to comment.