Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion op-devstack/sysgo/l1_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func WithL1NodesInProcess(l1ELID stack.L1ELNodeID, l1CLID stack.L1CLNodeID) stac
blobPath := clP.TempDir()

clLogger := clP.Logger()
bcn := fakebeacon.NewBeacon(clLogger, blobstore.New(), l1Net.genesis.Timestamp, blockTimeL1, l1Net.genesis.Config.OsakaTime)
bcn := fakebeacon.NewBeacon(clLogger, blobstore.New(), l1Net.genesis.Timestamp, blockTimeL1)
clP.Cleanup(func() {
_ = bcn.Close()
})
Expand Down
2 changes: 1 addition & 1 deletion op-devstack/sysgo/l1_nodes_subprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func WithL1NodesSubprocess(id stack.L1ELNodeID, clID stack.L1CLNodeID) stack.Opt
l1Clock = orch.timeTravelClock
}

bcn := fakebeacon.NewBeacon(p.Logger(), blobstore.New(), l1Net.genesis.Timestamp, l1Net.blockTime, l1Net.genesis.Config.OsakaTime)
bcn := fakebeacon.NewBeacon(p.Logger(), blobstore.New(), l1Net.genesis.Timestamp, l1Net.blockTime)
p.Cleanup(func() {
_ = bcn.Close()
})
Expand Down
1 change: 0 additions & 1 deletion op-e2e/actions/proofs/helpers/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func RunFaultProofProgram(t helpers.Testing, logger log.Logger, l1 *helpers.L1Mi
l1.BlobStore(),
l1.L1Chain().Genesis().Time(),
12,
l1.L1Chain().Config().OsakaTime,
)
require.NoError(t, fakeBeacon.Start("127.0.0.1:0"))
defer fakeBeacon.Close()
Expand Down
20 changes: 4 additions & 16 deletions op-e2e/e2eutils/fakebeacon/blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@ type FakeBeacon struct {
beaconSrv *http.Server
beaconAPIListener net.Listener

fuluTime *uint64
genesisTime uint64
blockTime uint64
}

func NewBeacon(log log.Logger, blobStore *blobstore.Store, genesisTime uint64, blockTime uint64, fuluTime *uint64) *FakeBeacon {
func NewBeacon(log log.Logger, blobStore *blobstore.Store, genesisTime uint64, blockTime uint64) *FakeBeacon {
return &FakeBeacon{
log: log,
blobStore: blobStore,
genesisTime: genesisTime,
blockTime: blockTime,
fuluTime: fuluTime,
}
}

Expand Down Expand Up @@ -122,14 +120,9 @@ func (f *FakeBeacon) Start(addr string) error {
return
}

var proof eth.Bytes48
if f.fuluTime == nil || time.Now().Before(time.Unix(int64(*f.fuluTime), 0)) {
proof = eth.Bytes48(bundle.Proofs[ix])
} else {
// From Fulu onwards, a blob proof is not provided.
// Derivation should not rely on a valid proof here.
proof = eth.Bytes48(kzg4844.Proof(hexutil.MustDecode("0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")))
}
// From Fulu onwards, a blob proof is not provided.
// Derivation should not rely on a valid proof here.
proof := eth.Bytes48(kzg4844.Proof(hexutil.MustDecode("0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")))

sidecars[i] = &eth.APIBlobSidecar{
Index: eth.Uint64String(ix),
Expand All @@ -150,11 +143,6 @@ func (f *FakeBeacon) Start(addr string) error {
}
})
mux.HandleFunc("/eth/v1/beacon/blobs/", func(w http.ResponseWriter, r *http.Request) {
if f.fuluTime == nil || time.Now().Before(time.Unix(int64(*f.fuluTime), 0)) {
f.log.Warn("post-Fulu blobs endpoint queried before Fulu hardfork")
w.WriteHeader(http.StatusNotFound)
return
}
blockID := strings.TrimPrefix(r.URL.Path, "/eth/v1/beacon/blobs/")
slot, err := strconv.ParseUint(blockID, 10, 64)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/interop/supersystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (s *interopE2ESystem) prepareL1() (*fakebeacon.FakeBeacon, *geth.GethInstan
blockTimeL1 := uint64(6)
blobPath := s.t.TempDir()
bcn := fakebeacon.NewBeacon(s.logger.New("role", "l1_cl"),
blobstore.New(), genesisTimestampL1, blockTimeL1, s.worldOutput.L1.Genesis.Config.OsakaTime)
blobstore.New(), genesisTimestampL1, blockTimeL1)
s.t.Cleanup(func() {
_ = bcn.Close()
})
Expand Down
4 changes: 2 additions & 2 deletions op-e2e/system/da/l1_beacon_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestGetVersion(t *testing.T) {
l := testlog.Logger(t, log.LevelInfo)

blobStore := blobstore.New()
beaconApi := fakebeacon.NewBeacon(l, blobStore, uint64(0), uint64(0), nil)
beaconApi := fakebeacon.NewBeacon(l, blobStore, uint64(0), uint64(0))
t.Cleanup(func() {
_ = beaconApi.Close()
})
Expand All @@ -43,7 +43,7 @@ func Test404NotFound(t *testing.T) {
l := testlog.Logger(t, log.LevelInfo)

blobStore := blobstore.New()
beaconApi := fakebeacon.NewBeacon(l, blobStore, uint64(0), uint64(12), nil)
beaconApi := fakebeacon.NewBeacon(l, blobStore, uint64(0), uint64(12))
t.Cleanup(func() {
_ = beaconApi.Close()
})
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/system/e2esys/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ func (cfg SystemConfig) Start(t *testing.T, startOpts ...StartOption) (*System,

// Create a fake Beacon node to hold on to blobs created by the L1 miner, and to serve them to L2
bcn := fakebeacon.NewBeacon(testlog.Logger(t, log.LevelInfo).New("role", "l1_cl"),
blobstore.New(), l1Genesis.Timestamp, cfg.DeployConfig.L1BlockTime, l1Genesis.Config.OsakaTime)
blobstore.New(), l1Genesis.Timestamp, cfg.DeployConfig.L1BlockTime)
t.Cleanup(func() {
_ = bcn.Close()
})
Expand Down