Skip to content

Commit be155d0

Browse files
Remove pre sylus validation (#3785) (#3793)
* remove support for pre-stylus validation pre-stylus validation is no longer needed, and does create problems. * fail if stylus support not found instead of assuming pre-stylus * ckerfile changes --------- Co-authored-by: Tsahi Zidenberg <[email protected]>
1 parent 9244576 commit be155d0

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

Dockerfile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -342,17 +342,21 @@ ENTRYPOINT [ "/usr/local/bin/nitro" , "--validation.wasm.allowed-wasm-module-roo
342342

343343
USER user
344344

345+
# The nitro-node-validator is needed in case some modifications are needed in arbitrator or jit API.
346+
# That was the case when enabling arbos30.
347+
# We no longer support pre-arbos-30 wasmmoduleroots (newer wasmmoduleroots can execute old blocks)
348+
# We keep the code (commented out), and the docker-target, for use in case such an update is needed again.
345349
FROM nitro-node AS nitro-node-validator
346-
USER root
347-
COPY --from=nitro-legacy /usr/local/bin/nitro-val /home/user/nitro-legacy/bin/nitro-val
348-
COPY --from=nitro-legacy /usr/local/bin/jit /home/user/nitro-legacy/bin/jit
349-
RUN export DEBIAN_FRONTEND=noninteractive && \
350-
apt-get update && \
351-
apt-get install -y xxd netcat-traditional && \
352-
rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/ldconfig/aux-cache /usr/lib/python3.9/__pycache__/ /usr/lib/python3.9/*/__pycache__/ /var/log/*
353-
COPY scripts/split-val-entry.sh /usr/local/bin
354-
ENTRYPOINT [ "/usr/local/bin/split-val-entry.sh" ]
355-
USER user
350+
# USER root
351+
# COPY --from=nitro-legacy /usr/local/bin/nitro-val /home/user/nitro-legacy/bin/nitro-val
352+
# COPY --from=nitro-legacy /usr/local/bin/jit /home/user/nitro-legacy/bin/jit
353+
# RUN export DEBIAN_FRONTEND=noninteractive && \
354+
# apt-get update && \
355+
# apt-get install -y xxd netcat-traditional && \
356+
# rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/ldconfig/aux-cache /usr/lib/python3.9/__pycache__/ /usr/lib/python3.9/*/__pycache__/ /var/log/*
357+
# COPY scripts/split-val-entry.sh /usr/local/bin
358+
# ENTRYPOINT [ "/usr/local/bin/split-val-entry.sh" ]
359+
# USER user
356360

357361
FROM nitro-node-validator AS nitro-node-dev
358362
USER root

validator/client/validation_client.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/ethereum/go-ethereum/log"
1717
"github.com/ethereum/go-ethereum/metrics"
1818
"github.com/ethereum/go-ethereum/node"
19-
"github.com/ethereum/go-ethereum/rpc"
2019

2120
"github.com/offchainlabs/nitro/util/containers"
2221
"github.com/offchainlabs/nitro/util/rpcclient"
@@ -70,12 +69,7 @@ func (c *ValidationClient) Start(ctx context.Context) error {
7069
}
7170
var stylusArchs []rawdb.WasmTarget
7271
if err := c.client.CallContext(ctx, &stylusArchs, server_api.Namespace+"_stylusArchs"); err != nil {
73-
var rpcError rpc.Error
74-
ok := errors.As(err, &rpcError)
75-
if !ok || rpcError.ErrorCode() != -32601 {
76-
return fmt.Errorf("could not read stylus arch from server: %w", err)
77-
}
78-
stylusArchs = []rawdb.WasmTarget{rawdb.WasmTarget("pre-stylus")} // invalid, will fail if trying to validate block with stylus
72+
return fmt.Errorf("could not read stylus arch from server: %w", err)
7973
} else {
8074
if len(stylusArchs) == 0 {
8175
return fmt.Errorf("could not read stylus archs from validation server")

0 commit comments

Comments
 (0)