Skip to content

Commit

Permalink
Add builder and sequencer auth for payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed Sep 4, 2024
1 parent 9dfa70e commit 5949ae3
Show file tree
Hide file tree
Showing 11 changed files with 557 additions and 194 deletions.
5 changes: 3 additions & 2 deletions op-e2e/actions/l2_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/ethereum-optimism/optimism/op-node/node"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/attributes"
"github.com/ethereum-optimism/optimism/op-node/rollup/builder"
"github.com/ethereum-optimism/optimism/op-node/rollup/clsync"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-node/rollup/driver"
Expand Down Expand Up @@ -71,9 +72,9 @@ type safeDB interface {

func NewL2Verifier(t Testing, log log.Logger, l1 derive.L1Fetcher, blobsSrc derive.L1BlobsFetcher, plasmaSrc driver.PlasmaIface, eng L2API, cfg *rollup.Config, syncCfg *sync.Config, safeHeadListener safeDB) *L2Verifier {
metrics := &testutils.TestDerivationMetrics{}
engine := derive.NewEngineController(eng, log, metrics, cfg, syncCfg.SyncMode)
engine := derive.NewEngineController(eng, log, metrics, cfg, syncCfg.SyncMode, &builder.NoOpBuilder{})

clSync := clsync.NewCLSync(log, cfg, metrics, engine)
clSync := clsync.NewCLSync(log, cfg, metrics, engine, nil, nil, nil, false)

var finalizer driver.Finalizer
if cfg.PlasmaEnabled() {
Expand Down
8 changes: 8 additions & 0 deletions op-node/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,13 @@ var (
Value: time.Millisecond * 500,
Category: BuilderCategory,
}
BuilderRequestSignerFlag = &cli.StringFlag{
Name: "l2.builder.request-signer",
Usage: "Private key from proposer in hex format to sign get block payload requests to the builder.",
Required: false,
EnvVars: prefixEnvVars("L2_BUILDER_SIGNER"),
Category: BuilderCategory,
}
)

var requiredFlags = []cli.Flag{
Expand All @@ -413,6 +420,7 @@ var optionalFlags = []cli.Flag{
BuilderEnabledFlag,
BuilderEndpointFlag,
BuilderRequestTimeoutFlag,
BuilderRequestSignerFlag,
BeaconAddr,
BeaconHeader,
BeaconFallbackAddrs,
Expand Down
Loading

0 comments on commit 5949ae3

Please sign in to comment.