Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Fix EigenDA imports
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyknox committed Mar 29, 2024
1 parent 85b04f3 commit 22172dd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/BurntSushi/toml v1.3.2
github.com/Layr-Labs/eigenda/api v0.3.0
github.com/Layr-Labs/eigenda/api v0.5.1
github.com/btcsuite/btcd v0.24.0
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
github.com/cockroachdb/pebble v0.0.0-20231018212520-f6cde3fc2fa4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,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.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Layr-Labs/eigenda/api v0.3.0 h1:PBG3L1aemZO/0Hp21Taz0sBSn9LbvBZsqCKrzeYJur0=
github.com/Layr-Labs/eigenda/api v0.3.0/go.mod h1:kVXqWM13s/1hXyv9QdHweWAbKin9MeOBbS4i8c9rLbU=
github.com/Layr-Labs/eigenda/api v0.5.1 h1:osZOxiLvmLIx2gdUMgQdBQzlUACXI/53kwYIxzORW9M=
github.com/Layr-Labs/eigenda/api v0.5.1/go.mod h1:kVXqWM13s/1hXyv9QdHweWAbKin9MeOBbS4i8c9rLbU=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
Expand Down
6 changes: 3 additions & 3 deletions op-program/client/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"

"github.com/ethereum-optimism/optimism/op-node/da"
"github.com/ethereum-optimism/optimism/op-node/rollup"
preimage "github.com/ethereum-optimism/optimism/op-preimage"
cldr "github.com/ethereum-optimism/optimism/op-program/client/driver"
"github.com/ethereum-optimism/optimism/op-program/client/l1"
"github.com/ethereum-optimism/optimism/op-program/client/l2"
oppio "github.com/ethereum-optimism/optimism/op-program/io"
"github.com/ethereum-optimism/optimism/op-service/eigenda"
"github.com/ethereum-optimism/optimism/op-service/eth"
)

Expand Down Expand Up @@ -63,7 +63,7 @@ func RunProgram(logger log.Logger, preimageOracle io.ReadWriter, preimageHinter
}

// runDerivation executes the L2 state transition, given a minimal interface to retrieve data.
func runDerivation(logger log.Logger, cfg *rollup.Config, daCfg *da.DAConfig, l2Cfg *params.ChainConfig, l1Head common.Hash, l2OutputRoot common.Hash, l2Claim common.Hash, l2ClaimBlockNum uint64, l1Oracle l1.Oracle, l2Oracle l2.Oracle) error {
func runDerivation(logger log.Logger, cfg *rollup.Config, daCfg *eigenda.Config, l2Cfg *params.ChainConfig, l1Head common.Hash, l2OutputRoot common.Hash, l2Claim common.Hash, l2ClaimBlockNum uint64, l1Oracle l1.Oracle, l2Oracle l2.Oracle) error {
l1Source := l1.NewOracleL1Client(logger, l1Oracle, l1Head)
l1BlobsSource := l1.NewBlobFetcher(logger, l1Oracle)
engineBackend, err := l2.NewOracleBackedL2Chain(logger, l2Oracle, l1Oracle /* kzg oracle */, l2Cfg, l2OutputRoot)
Expand All @@ -73,7 +73,7 @@ func runDerivation(logger log.Logger, cfg *rollup.Config, daCfg *da.DAConfig, l2
l2Source := l2.NewOracleEngine(cfg, logger, engineBackend)

logger.Info("Starting derivation")
d := cldr.NewDriver(logger, cfg, daCfg, l1Source, l1BlobsSource, l2Source, l2ClaimBlockNum)
d := cldr.NewDriver(logger, cfg, l1Source, l1BlobsSource, l2Source, l2ClaimBlockNum, daCfg)
for {
if err = d.Step(context.Background()); errors.Is(err, io.EOF) {
break
Expand Down
4 changes: 0 additions & 4 deletions op-service/eigenda/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"math"
"time"

"github.com/Layr-Labs/eigenda/api/grpc/disperser"
"github.com/urfave/cli/v2"
)

Expand All @@ -16,9 +15,6 @@ type Config struct {
// DaRpc is the HTTP provider URL for the Data Availability node.
RPC string

// Quorum IDs and SecurityParams to use when dispersing and retrieving blobs
DisperserSecurityParams []*disperser.SecurityParams

// The total amount of time that the batcher will spend waiting for EigenDA to confirm a blob
StatusQueryTimeout time.Duration

Expand Down
3 changes: 1 addition & 2 deletions op-service/eigenda/da.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ func (m *EigenDA) DisperseBlob(ctx context.Context, txData []byte) (*disperser.B
daClient := disperser.NewDisperserClient(conn)

disperseReq := &disperser.DisperseBlobRequest{
Data: txData,
SecurityParams: m.DisperserSecurityParams,
Data: txData,
}
disperseRes, err := daClient.DisperseBlob(ctx, disperseReq)

Expand Down

0 comments on commit 22172dd

Please sign in to comment.