mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Updates to polkadot-v0.9.40, with a variety of dependency updates accordingly. Substrate thankfully now uses k256 0.13, pathing the way for #256. We couldn't upgrade to polkadot-v0.9.40 without this due to polkadot-v0.9.40 having fundamental changes to syncing. While we could've updated tendermint, it's not worth the continued development effort given its inability to work with multiple validator sets. Purges sc-tendermint. Keeps tendermint-machine for #163. Closes #137, #148, #157, #171. #96 and #99 should be re-scoped/clarified. #134 and #159 also should be clarified. #169 is also no longer a priority since we're only considering temporal deployments of tendermint. #170 also isn't since we're looking at effectively sharded validator sets, so there should be no singular large set needing high performance.
61 lines
1.9 KiB
Docker
61 lines
1.9 KiB
Docker
FROM docker.io/paritytech/ci-linux:production as builder
|
|
LABEL description="STAGE 1: Build"
|
|
|
|
# Add files for build
|
|
ADD common /serai/common
|
|
ADD crypto /serai/crypto
|
|
ADD coins /serai/coins
|
|
ADD processor /serai/processor
|
|
ADD tendermint /serai/tendermint
|
|
ADD substrate /serai/substrate
|
|
ADD Cargo.toml /serai
|
|
ADD Cargo.lock /serai
|
|
ADD AGPL-3.0 /serai
|
|
|
|
WORKDIR /serai
|
|
|
|
# Update Rust
|
|
RUN rustup update
|
|
|
|
# Install Solc @ 0.8.16
|
|
RUN --mount=type=cache,target=/root/.cache/ \
|
|
--mount=type=cache,target=/root/.local/ \
|
|
--mount=type=cache,target=/root/.solc-select \
|
|
pip3 install solc-select==0.2.1
|
|
RUN --mount=type=cache,target=/root/.cache/ \
|
|
--mount=type=cache,target=/root/.local/ \
|
|
--mount=type=cache,target=/root/.solc-select \
|
|
solc-select install 0.8.16
|
|
RUN --mount=type=cache,target=/root/.cache/ \
|
|
--mount=type=cache,target=/root/.local/ \
|
|
--mount=type=cache,target=/root/.solc-select \
|
|
solc-select use 0.8.16
|
|
|
|
# Mount cargo and serai cache for Cache & Build
|
|
RUN --mount=type=cache,target=/root/.local/ \
|
|
--mount=type=cache,target=/root/.solc-select \
|
|
--mount=type=cache,target=/root/.cache/ \
|
|
--mount=type=cache,target=/usr/local/cargo/git \
|
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
|
--mount=type=cache,target=/serai/target/release/build \
|
|
--mount=type=cache,target=/serai/target/release/deps \
|
|
--mount=type=cache,target=/serai/target/release/.fingerprint \
|
|
--mount=type=cache,target=/serai/target/release/incremental \
|
|
--mount=type=cache,target=/serai/target/release/wbuild \
|
|
--mount=type=cache,target=/serai/target/release/lib* \
|
|
cargo build --release
|
|
|
|
# Prepare Image
|
|
FROM ubuntu:latest as image
|
|
LABEL description="STAGE 2: Copy and Run"
|
|
|
|
WORKDIR /home/serai
|
|
|
|
# Copy necessary files to run node
|
|
COPY --from=builder /serai/target/release/ /bin/
|
|
COPY --from=builder /serai/AGPL-3.0 .
|
|
|
|
# Run node
|
|
EXPOSE 30333 9615 9933 9944
|
|
CMD ["serai-node"]
|