-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #361 from OffchainLabs/validator
node can act as Validator
- Loading branch information
Showing
6 changed files
with
161 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,11 +67,6 @@ COPY --from=contracts-builder workspace/solgen/build/contracts/src/precompiles/ | |
COPY --from=contracts-builder workspace/.make/ .make/ | ||
RUN PATH="$PATH:/usr/local/go/bin" make build-wasm-bin | ||
|
||
FROM scratch as machine-exporter | ||
COPY --from=wasm-libs-builder /workspace/target/machine/ machine/ | ||
COPY --from=wasm-bin-builder /workspace/target/machine/ machine/ | ||
|
||
|
||
FROM rust:1.57-slim-bullseye as prover-header-builder | ||
WORKDIR /workspace | ||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
|
@@ -104,30 +99,35 @@ RUN touch -a -m arbitrator/prover/src/lib.rs && \ | |
FROM scratch as prover-export | ||
COPY --from=prover-builder /workspace/target/ / | ||
|
||
FROM golang:1.17-bullseye as replay-env-builder | ||
FROM debian:bullseye-slim as module-root-calc | ||
WORKDIR /workspace | ||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && \ | ||
apt-get install -y wabt | ||
COPY go.mod go.sum ./ | ||
COPY go-ethereum/go.mod go-ethereum/go.sum go-ethereum/ | ||
COPY fastcache/go.mod fastcache/go.sum fastcache/ | ||
RUN go mod download | ||
COPY . ./ | ||
COPY --from=prover-export / target/ | ||
COPY --from=wasm-bin-builder /workspace/target/ target/ | ||
COPY --from=wasm-bin-builder /workspace/.make/ .make/ | ||
COPY --from=wasm-libs-builder /workspace/target/ target/ | ||
COPY --from=wasm-libs-builder /workspace/arbitrator/wasm-libraries/ arbitrator/wasm-libraries/ | ||
COPY --from=wasm-libs-builder /workspace/.make/ .make/ | ||
RUN target/bin/prover target/machine/replay.wasm --output-module-root -l target/machine/wasi_stub.wasm -l target/machine/host_io.wasm -l target/machine/soft-float.wasm -l target/machine/go_stub.wasm -l target/machine/brotli.wasm > target/machine/module_root | ||
RUN target/bin/prover target/machine/replay.wasm --output-module-root -l target/machine/wasi_stub.wasm -l target/machine/soft-float.wasm -l target/machine/go_stub.wasm -l target/machine/host_io.wasm -l target/machine/brotli.wasm > target/machine/module_root | ||
|
||
FROM scratch as machine-export | ||
COPY --from=module-root-calc /workspace/target/machine/ /machine | ||
|
||
FROM replay-env-builder as node-builder | ||
|
||
FROM golang:1.17-bullseye as node-builder | ||
WORKDIR /workspace | ||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && \ | ||
apt-get install -y protobuf-compiler | ||
apt-get install -y protobuf-compiler wabt | ||
RUN go install google.golang.org/protobuf/cmd/[email protected] && \ | ||
go install google.golang.org/grpc/cmd/[email protected] | ||
COPY go.mod go.sum ./ | ||
COPY go-ethereum/go.mod go-ethereum/go.sum go-ethereum/ | ||
COPY fastcache/go.mod fastcache/go.sum fastcache/ | ||
RUN go mod download | ||
COPY . ./ | ||
COPY --from=contracts-builder workspace/solgen/build/ solgen/build/ | ||
COPY --from=contracts-builder workspace/.make/ .make/ | ||
COPY --from=prover-header-export / target/ | ||
|
@@ -140,5 +140,10 @@ RUN go build -o ./target/bin/node ./cmd/node | |
RUN go build -o ./target/bin/deploy ./cmd/deploy | ||
|
||
FROM debian:bullseye-slim as nitro-node | ||
WORKDIR /workspace | ||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && \ | ||
apt-get install -y wabt | ||
COPY --from=node-builder /workspace/target/ target/ | ||
COPY --from=machine-export / target/ | ||
ENTRYPOINT [ "./target/bin/node" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters