Skip to content

Commit 4d354d3

Browse files
committed
Merge branch 'main' of github.com:Layr-Labs/op-plasma-eigenda into epociask--fix-191-store-cfg
2 parents c4b64f4 + 390e491 commit 4d354d3

File tree

8 files changed

+23
-13
lines changed

8 files changed

+23
-13
lines changed

.github/workflows/holesky-test.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ name: holesky-test
33
on:
44
push:
55
branches: [ "main" ]
6-
# pull_request_target is needed so that external contributors that create PRs from a forked repo
7-
# have access to the secrets needed to run the tests. There are security implications to this,
8-
# see https://stackoverflow.com/questions/74957218/what-is-the-difference-between-pull-request-and-pull-request-target-event-in-git
9-
# MAKE SURE TO ONLY ALLOW RUNNING THIS WORKFLOW AFTER REVIEWING THE PR!
10-
pull_request_target:
6+
pull_request:
117
branches: [ "main" ]
128

139
jobs:

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"go.testEnvVars": {
3-
"INTEGRATION": "true"
3+
// Only one of INTEGRATION or TESTNET should be true.
4+
"INTEGRATION": "true",
5+
"TESTNET": "false",
6+
// To test against TESTNET, set SIGNER_PRIVATE_KEY and ETHEREUM_RPC.
7+
"SIGNER_PRIVATE_KEY": "",
8+
"ETHEREUM_RPC": "https://ethereum-holesky-rpc.publicnode.com"
49
},
510
"go.testFlags": [
611
"-test.parallel",

e2e/main_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ var (
3131
func ParseEnv() {
3232
runIntegrationTests = os.Getenv("INTEGRATION") == "true" || os.Getenv("INTEGRATION") == "1"
3333
runTestnetIntegrationTests = os.Getenv("TESTNET") == "true" || os.Getenv("TESTNET") == "1"
34+
if runIntegrationTests && runTestnetIntegrationTests {
35+
panic("only one of INTEGRATION=true or TESTNET=true env var can be set")
36+
}
3437
}
3538

3639
// TestMain ... run main controller

e2e/setup.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,21 @@ func TestSuiteConfig(testCfg *Cfg) server.CLIConfig {
184184
panic(err)
185185
}
186186

187+
svcManagerAddr := "0xD4A7E1Bd8015057293f0D0A557088c286942e84b" // holesky testnet
187188
eigendaCfg := server.Config{
188189
EdaClientConfig: clients.EigenDAClientConfig{
189190
RPC: holeskyDA,
190191
StatusQueryTimeout: time.Minute * 45,
191192
StatusQueryRetryInterval: pollInterval,
192193
DisableTLS: false,
193194
SignerPrivateKeyHex: pk,
195+
EthRpcUrl: ethRPC,
196+
SvcManagerAddr: svcManagerAddr,
194197
},
195198
VerifierConfig: verify.Config{
196199
VerifyCerts: false,
197200
RPCURL: ethRPC,
198-
SvcManagerAddr: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b", // incompatible with non holeskly networks
201+
SvcManagerAddr: svcManagerAddr,
199202
EthConfirmationDepth: 0,
200203
KzgConfig: &kzg.KzgConfig{
201204
G1Path: "../resources/g1.point",

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.22
55
toolchain go1.22.0
66

77
require (
8-
github.com/Layr-Labs/eigenda v0.8.5-0.20241028201743-5fe3e910a22d
8+
github.com/Layr-Labs/eigenda v0.8.5-0.20241031144746-e2ead56a306d
99
github.com/consensys/gnark-crypto v0.12.1
1010
github.com/ethereum-optimism/optimism v1.9.4-0.20240927020138-a9c7f349d10b
1111
github.com/ethereum/go-ethereum v1.14.11

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2
2222
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
2323
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR8jAwb1Ie9GyehWjVcGh32Y2MznE=
2424
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
25-
github.com/Layr-Labs/eigenda v0.8.5-0.20241028201743-5fe3e910a22d h1:s5U1TaWhC1J2rwc9IQdU/COGvuXALCKMd9GbONUZMxc=
26-
github.com/Layr-Labs/eigenda v0.8.5-0.20241028201743-5fe3e910a22d/go.mod h1:sqUNf9Ak+EfAX82jDxrb4QbT/g3DViWD3b7YIk36skk=
25+
github.com/Layr-Labs/eigenda v0.8.5-0.20241031144746-e2ead56a306d h1:2JtVArkLjW61kilkvvLyFHXBMp0ClF8PYCAxWqRnoDQ=
26+
github.com/Layr-Labs/eigenda v0.8.5-0.20241031144746-e2ead56a306d/go.mod h1:sqUNf9Ak+EfAX82jDxrb4QbT/g3DViWD3b7YIk36skk=
2727
github.com/Layr-Labs/eigensdk-go v0.1.7-0.20240507215523-7e4891d5099a h1:L/UsJFw9M31FD/WgXTPFB0oxbq9Cu4Urea1xWPMQS7Y=
2828
github.com/Layr-Labs/eigensdk-go v0.1.7-0.20240507215523-7e4891d5099a/go.mod h1:OF9lmS/57MKxS0xpSpX0qHZl0SKkDRpvJIvsGvMN1y8=
2929
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=

server/handlers.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,12 @@ func (svr *Server) handleGetOPGenericCommitment(w http.ResponseWriter, r *http.R
9595
}
9696

9797
func (svr *Server) handleGetShared(ctx context.Context, w http.ResponseWriter, comm []byte, meta commitments.CommitmentMeta) error {
98-
svr.log.Info("Processing GET request", "commitment", hex.EncodeToString(comm), "commitmentMeta", meta)
98+
commitmentHex := hex.EncodeToString(comm)
99+
svr.log.Info("Processing GET request", "commitment", commitmentHex, "commitmentMeta", meta)
99100
input, err := svr.sm.Get(ctx, comm, meta.Mode)
100101
if err != nil {
101102
err = MetaError{
102-
Err: fmt.Errorf("get request failed with commitment %v: %w", comm, err),
103+
Err: fmt.Errorf("get request failed with commitment %v: %w", commitmentHex, err),
103104
Meta: meta,
104105
}
105106
if errors.Is(err, ErrNotFound) {

server/middleware.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
)
1313

1414
// withMetrics is a middleware that records metrics for the route path.
15+
// It does not write anything to the response, that is the job of the handlers.
1516
func withMetrics(
1617
handleFn func(http.ResponseWriter, *http.Request) error,
1718
m metrics.Metricer,
@@ -30,9 +31,10 @@ func withMetrics(
3031
}
3132
return err
3233
}
33-
// we assume that every route will set the status header
34+
// TODO: some routes don't have a version byte, such as /put simple commitments
3435
versionByte, err := parseVersionByte(w, r)
3536
if err != nil {
37+
// we assume that every route will set the status header
3638
recordDur(w.Header().Get("status"), string(mode), string(versionByte))
3739
return fmt.Errorf("metrics middleware: error parsing version byte: %w", err)
3840
}

0 commit comments

Comments
 (0)