Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/ethereum-optimism/optimism

go 1.22.0
go 1.23.0

toolchain go1.22.7
toolchain go1.24.6
Comment on lines +3 to +5
Copy link
Collaborator

@dailinsubjam dailinsubjam Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reminder to update flake.nix etc. regarding the go version


require (
github.com/BurntSushi/toml v1.5.0
github.com/EspressoSystems/espresso-network/sdks/go v0.2.1
github.com/EspressoSystems/espresso-network/sdks/go v0.3.1
github.com/Masterminds/semver/v3 v3.3.1
github.com/andybalholm/brotli v1.1.0
github.com/bmatcuk/doublestar/v4 v4.8.1
Expand Down Expand Up @@ -59,13 +59,14 @@ require (
github.com/spf13/afero v1.12.0
github.com/stretchr/testify v1.10.0
github.com/urfave/cli/v2 v2.27.6
golang.org/x/crypto v0.32.0
golang.org/x/crypto v0.35.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/mod v0.22.0
golang.org/x/sync v0.10.0
golang.org/x/term v0.28.0
golang.org/x/text v0.21.0
golang.org/x/sync v0.11.0
golang.org/x/term v0.29.0
golang.org/x/text v0.22.0
golang.org/x/time v0.10.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down Expand Up @@ -275,7 +276,6 @@ require (
google.golang.org/grpc v1.69.4 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.5.2 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR8jAwb1Ie9GyehWjVcGh32Y2MznE=
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/EspressoSystems/espresso-network/sdks/go v0.2.1 h1:lE+2kUIQhKAw78jlTz5L92gYywRD5uydWskwlLn3YwA=
github.com/EspressoSystems/espresso-network/sdks/go v0.2.1/go.mod h1:aJX3rhV7d3QQ3dvmEFIKDfQvSFP9aUnFNENGpXPwELM=
github.com/EspressoSystems/espresso-network/sdks/go v0.3.1 h1:6z/uknIibzhCQanunN1h49oGEgagCf1+8U1ETavmtng=
github.com/EspressoSystems/espresso-network/sdks/go v0.3.1/go.mod h1:nX/JxG1/Kog2T0B0Gq/KhL0xZJi2GFuanGO8bxka0vM=
github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
Expand Down Expand Up @@ -234,10 +234,10 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/fxamacker/cbor/v2 v2.2.0 h1:6eXqdDDe588rSYAi1HfZKbx6YYQO4mxQ9eC6xYpU/JQ=
github.com/fxamacker/cbor/v2 v2.2.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.2.0 h1:6eXqdDDe588rSYAi1HfZKbx6YYQO4mxQ9eC6xYpU/JQ=
github.com/fxamacker/cbor/v2 v2.2.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays=
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
Expand Down Expand Up @@ -956,8 +956,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
Expand Down Expand Up @@ -1027,8 +1027,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -1100,8 +1100,8 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand All @@ -1114,8 +1114,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
2 changes: 1 addition & 1 deletion kurtosis-devnet/enclaver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache

# Download and build the espresso-network go crypto helper library
FROM --platform=$BUILDPLATFORM rust:1.84.1-alpine3.20 AS rust-builder
ARG ESPRESSO_SDK_VER=v0.2.1
ARG ESPRESSO_SDK_VER=v0.3.1
# Download the prebuilt static libraries for both archs (change arch as needed)
RUN apk add --no-cache curl
RUN set -e; \
Expand Down
2 changes: 1 addition & 1 deletion kurtosis-devnet/enclaver/Dockerfile.nonEnclave
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache

# Download and build the espresso-network go crypto helper library
FROM --platform=$BUILDPLATFORM rust:1.84.1-alpine3.20 AS rust-builder
ARG ESPRESSO_SDK_VER=v0.2.1
ARG ESPRESSO_SDK_VER=v0.3.1
# Download the prebuilt static libraries for both archs (change arch as needed)
RUN apk add --no-cache curl
RUN set -e; \
Expand Down
42 changes: 13 additions & 29 deletions op-batcher/batcher/espresso.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package batcher

import (
"errors"
"fmt"
"strings"
"time"

"context"
Expand Down Expand Up @@ -211,16 +211,13 @@ const (
Skip
)

// TODO (Keyao) Update the espresso-network-go repo for better error handling.
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1210405729138484?focus=true>
//
// Evaluate the submission job.
//
// # Returns
//
// * If there is no error: Handle.
//
// * If there is an issue on our side: Skip.
// * If there is a permanent issue that won't be fixed by a retry: Skip.
//
// * Otherwise: RetrySubmission.
func evaluateSubmission(jobResp espressoSubmitTransactionJobResponse) JobEvaluation {
Expand All @@ -231,28 +228,15 @@ func evaluateSubmission(jobResp espressoSubmitTransactionJobResponse) JobEvaluat
return Handle
}

msg := err.Error()

// If the transaction is invalid due to a JSON error, skip the submission.
if strings.Contains(msg, "json: unsupported type:") ||
strings.Contains(msg, "json: unsupported value:") ||
strings.Contains(msg, "json: error calling") ||
strings.Contains(msg, "json: invalid UTF-8 in string") ||
strings.Contains(msg, "json: invalid number literal") ||
strings.Contains(msg, "json: encoding error for type") {
log.Warn("json.Marshal fails, skipping", "msg", msg)
if errors.Is(err, espressoClient.ErrPermanent) {
return Skip
}

// If the request is invalid (likely due to API change), skip the submission.
if strings.Contains(msg, "net/http: nil Context") ||
strings.Contains(msg, "net/http: invalid method") ||
strings.HasPrefix(msg, "parse ") {
log.Warn("NewRequestWithContext fails, skipping", "msg", msg)
return Skip
if !errors.Is(err, espressoClient.ErrEphemeral) {
// Log the warning for a potentially missed error handling, but stil retry it.
log.Warn("error not explicitly marked as retryable or not", "err", err)
}

// Otherwise, retry the submission.
return RetrySubmission
}

Expand Down Expand Up @@ -320,16 +304,13 @@ const VERIFY_RECEIPT_TIMEOUT = 4 * time.Second
// retrying a job that failed to verify the receipt.
const VERIFY_RECEIPT_RETRY_DELAY = 100 * time.Millisecond

// TODO (Keyao) Update the espresso-network-go repo for better error handling.
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1210405729138484?focus=true>
//
// Evaluate the verification job.
//
// # Returns
//
// * If there is no error: Handle.
//
// * If there is an issue on our side: Skip.
// * If there is a permanent issue that won't be fixed by a retry: Skip.
//
// * If the verification times out: RetrySubmission.
//
Expand All @@ -342,12 +323,15 @@ func evaluateVerification(jobResp espressoVerifyReceiptJobResponse) JobEvaluatio
return Handle
}

// If the hash is invalid, skip the verification.
if strings.Contains(err.Error(), "hash is nil") {
log.Warn("Hash is nil, skipping")
if errors.Is(err, espressoClient.ErrPermanent) {
return Skip
}

if !errors.Is(err, espressoClient.ErrEphemeral) {
// Log the warning for a potentially missed error handling, but still retry it.
log.Warn("error not explicitly marked as retryable or not", "err", err)
}

// If the verification times out, degrade to the submission phase and try again.
if have := time.Now(); have.Sub(jobResp.job.start) > VERIFY_RECEIPT_TIMEOUT {
return RetrySubmission
Expand Down
2 changes: 1 addition & 1 deletion op-service/sources/mocks/BeaconClient.go

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

2 changes: 1 addition & 1 deletion op-service/sources/mocks/BlobSideCarsClient.go

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

10 changes: 5 additions & 5 deletions op-service/txmgr/mocks/TxManager.go

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

2 changes: 1 addition & 1 deletion ops/docker/op-stack-go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ FROM --platform=$BUILDPLATFORM us-docker.pkg.dev/oplabs-tools-artifacts/images/c

# Download and build the espresso-network go crypto helper library
FROM --platform=$BUILDPLATFORM rust:1.84.1-alpine3.20 AS rust-builder
ARG ESPRESSO_SDK_VER=v0.2.1
ARG ESPRESSO_SDK_VER=v0.3.1
# Download the prebuilt static libraries for both archs (change arch as needed)
RUN apk add --no-cache curl
RUN set -e; \
Expand Down
Loading