Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Commit

Permalink
chore(node): Change RuntimeVersion impl_name to plug-node. According to
Browse files Browse the repository at this point in the history
https://crates.parity.io/sr_version/struct.RuntimeVersion.html, this will not affect functionality.

chore(node): Replaced Substrate with Plug. Added Plug Developers to author information. Set version to 0.0.0 - to be updated to 1.0.0 when we release Plug

chore(Dockerfile): Updated Dockerfile names and descriptions for Plug. Removed incorrect maintainer details.

signing commit
  • Loading branch information
hoani authored and hoani committed Nov 5, 2019
1 parent c337602 commit e6eae9a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 34 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[[bin]]
name = "substrate"
name = "plug"
path = "node/src/main.rs"

[package]
name = "substrate"
version = "2.0.0"
authors = ["Parity Technologies <[email protected]>"]
name = "plug"
version = "0.0.0"
authors = ["Plug Developers <[email protected]>", "Parity Technologies <[email protected]>"]
build = "build.rs"
edition = "2018"

Expand Down
31 changes: 17 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Note: We don't use Alpine and its packaged Rust/Cargo because they're too often out of date,
# preventing them from being used to build Substrate/Polkadot.
# preventing them from being used to build Substrate/Polkadot/Plug.

FROM phusion/baseimage:0.10.2 as builder
LABEL maintainer="[email protected]"
LABEL description="This is the build stage for Substrate. Here we create the binary."
LABEL description="Pl^g build image: The Pl^g binary is built here."

ENV DEBIAN_FRONTEND=noninteractive

ARG PROFILE=release
WORKDIR /substrate
WORKDIR /plug

COPY . /substrate
COPY . /plug

RUN apt-get update && \
apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \
apt-get install -y cmake pkg-config libssl-dev git clang
apt-get install -y \
clang \
cmake \
git \
libssl-dev \
pkg-config

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH="$PATH:$HOME/.cargo/bin" && \
Expand All @@ -27,29 +31,28 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
# ===== SECOND STAGE ======

FROM phusion/baseimage:0.10.2
LABEL maintainer="[email protected]"
LABEL description="This is the 2nd stage: a very small image where we copy the Substrate binary."
LABEL description="Pl^g runner image: A minimal image for running Pl^g."
ARG PROFILE=release

RUN mv /usr/share/ca* /tmp && \
rm -rf /usr/share/* && \
mv /tmp/ca-certificates /usr/share/ && \
mkdir -p /root/.local/share/Polkadot && \
ln -s /root/.local/share/Polkadot /data && \
useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate
useradd -m -u 1000 -U -s /bin/sh -d /plug plug

COPY --from=builder /substrate/target/$PROFILE/substrate /usr/local/bin
COPY --from=builder /plug/target/$PROFILE/plug /usr/local/bin

# checks
RUN ldd /usr/local/bin/substrate && \
/usr/local/bin/substrate --version
RUN ldd /usr/local/bin/plug && \
/usr/local/bin/plug --version

# Shrinking
RUN rm -rf /usr/lib/python* && \
rm -rf /usr/bin /usr/sbin /usr/share/man

USER substrate
USER plug
EXPOSE 30333 9933 9944
VOLUME ["/data"]

CMD ["/usr/local/bin/substrate"]
CMD ["/usr/local/bin/plug"]
2 changes: 1 addition & 1 deletion node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
/// Runtime version.
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("node"),
impl_name: create_runtime_str!("substrate-node"),
impl_name: create_runtime_str!("plug-node"),
authoring_version: 10,
// Per convention: if the runtime behavior changes, increment spec_version
// and set impl_version to equal spec_version. If only runtime
Expand Down
10 changes: 5 additions & 5 deletions node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ impl cli::IntoExit for Exit {

fn main() -> Result<(), cli::error::Error> {
let version = VersionInfo {
name: "Substrate Node",
name: "Plug Node",
commit: env!("VERGEN_SHA_SHORT"),
version: env!("CARGO_PKG_VERSION"),
executable_name: "substrate",
author: "Parity Technologies <admin@parity.io>",
description: "Generic substrate node",
support_url: "https://github.com/paritytech/substrate/issues/new",
executable_name: "plug",
author: "Plug Developers <admin@plug.team>",
description: "Generic plug node",
support_url: "https://github.com/plugblockchain/plug-blockchain/issues/new",
};

cli::run(std::env::args(), Exit, version)
Expand Down

0 comments on commit e6eae9a

Please sign in to comment.