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

Joystream-node embed mainnet chainspec #4916

Merged
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion bin/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ['Joystream contributors']
build = 'build.rs'
edition = '2018'
name = 'joystream-node'
version = '8.3.1'
version = '8.4.0'
default-run = "joystream-node"

[[bin]]
Expand Down
4 changes: 4 additions & 0 deletions bin/node/src/chain_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ pub use node_runtime::GenesisConfig;

type AccountPublic = <Signature as Verify>::Signer;

pub fn joystream_mainnet_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../../../../joy-mainnet.json")[..])
}

/// Node `ChainSpec` extensions.
///
/// Additional parameters for some Substrate core modules,
Expand Down
8 changes: 4 additions & 4 deletions bin/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ impl SubstrateCli for Cli {
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
let spec = match id {
"" => {
return Err(
"Please specify which chain you want to run, e.g. --dev or --chain=local or --chain=prod-test"
.into(),
)
return Err("Please specify which chain you want to run, eg. --dev or
--chain=joy-mainnet or --chain=local or --chain=prod-test"
.into())
}
"joy-mainnet" => Box::new(chain_spec::joystream_mainnet_config()?),
"dev" => Box::new(chain_spec::development_config()),
"prod-test" => Box::new(chain_spec::prod_test_config()),
"local" => Box::new(chain_spec::local_testnet_config()),
Expand Down
2 changes: 2 additions & 0 deletions joystream-node.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ COPY Cargo.lock .
COPY bin ./bin
COPY runtime ./runtime
COPY runtime-modules ./runtime-modules
COPY joy-mainnet.json .
RUN cargo chef prepare --recipe-path /joystream/recipe.json

FROM rust AS cacher
Expand All @@ -38,6 +39,7 @@ COPY Cargo.lock .
COPY bin ./bin
COPY runtime ./runtime
COPY runtime-modules ./runtime-modules
COPY joy-mainnet.json .
# Copy over the cached dependencies
COPY --from=cacher /joystream/target target
COPY --from=cacher $CARGO_HOME $CARGO_HOME
Expand Down
1 change: 1 addition & 0 deletions scripts/runtime-code-shasum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ${TAR} -c --sort=name --owner=root:0 --group=root:0 --mode 644 --mtime='UTC 2020
runtime-modules \
joystream-node.Dockerfile \
bin \
joy-mainnet.json \
| if [[ -n "$RUNTIME_PROFILE" ]]; then ${SED} '$a'"$RUNTIME_PROFILE"; else tee; fi \
| shasum \
| cut -d " " -f 1
3 changes: 2 additions & 1 deletion scripts/runtime-code-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ tar -czf joystream.tar.gz \
runtime \
runtime-modules \
joystream-node.Dockerfile \
bin
bin \
joy-mainnet.json
Loading