Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude Datalyr from Repo #1376

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
4 changes: 2 additions & 2 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use (
)

replace (
github.com/Layr-Labs/datalayr/common v0.0.0 => ./datalayr/common
github.com/Layr-Labs/datalayr/lib/merkzg v0.0.0 => ./datalayr/lib/merkzg
// github.com/Layr-Labs/datalayr/common v0.0.0 => ./datalayr/common
// github.com/Layr-Labs/datalayr/lib/merkzg v0.0.0 => ./datalayr/lib/merkzg
github.com/ethereum/go-ethereum v1.10.21 => github.com/ethereum-mantle/reference-optimistic-geth v0.0.0-20220803173305-1c9d4cc76a6e
github.com/mantlenetworkio/mantle/bss-core v0.0.0 => ./bss-core
github.com/mantlenetworkio/mantle/fraud-proof v0.0.0 => ./fraud-proof
Expand Down
45 changes: 22 additions & 23 deletions mt-batcher/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,31 @@ import (
"fmt"
"math/big"
"os"

"github.com/Layr-Labs/datalayr/common/header"
)

func CreateUploadHeader(params StoreParams) ([]byte, error) {
var kzgCommitArray [64]byte
copy(kzgCommitArray[:], params.KzgCommit)
var lowDegreeProof [64]byte
copy(lowDegreeProof[:], params.LowDegreeProof)
var disperserArray [20]byte
copy(disperserArray[:], params.Disperser)

h := header.DataStoreHeader{
KzgCommit: kzgCommitArray,
LowDegreeProof: lowDegreeProof,
Degree: params.Degree,
NumSys: params.NumSys,
NumPar: params.NumPar,
OrigDataSize: params.OrigDataSize,
Disperser: disperserArray,
}
uploadHeader, _, err := header.CreateUploadHeader(h)
if err != nil {
return nil, err
}
return uploadHeader, nil
//var kzgCommitArray [64]byte
//copy(kzgCommitArray[:], params.KzgCommit)
//var lowDegreeProof [64]byte
//copy(lowDegreeProof[:], params.LowDegreeProof)
//var disperserArray [20]byte
//copy(disperserArray[:], params.Disperser)
//
//h := header.DataStoreHeader{
// KzgCommit: kzgCommitArray,
// LowDegreeProof: lowDegreeProof,
// Degree: params.Degree,
// NumSys: params.NumSys,
// NumPar: params.NumPar,
// OrigDataSize: params.OrigDataSize,
// Disperser: disperserArray,
//}
//uploadHeader, _, err := header.CreateUploadHeader(h)
//if err != nil {
// return nil, err
//}
//return uploadHeader, nil
return nil, nil
}

func uint32ToByteSlice(x uint32) []byte {
Expand Down
5 changes: 2 additions & 3 deletions mt-batcher/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package mt_batcher
import (
"time"

"github.com/Layr-Labs/datalayr/common/logging"
"github.com/mantlenetworkio/mantle/mt-batcher/flags"
"github.com/urfave/cli"
)
Expand Down Expand Up @@ -39,7 +38,7 @@ type Config struct {
RollUpMinTxn uint64
RollUpMaxSize uint64
EigenLayerNode int
EigenLogConfig logging.Config
//EigenLogConfig logging.Config
MetricsServerEnable bool
MetricsHostname string
MetricsPort uint64
Expand Down Expand Up @@ -102,7 +101,7 @@ func NewConfig(ctx *cli.Context) (Config, error) {
RollUpMinTxn: ctx.GlobalUint64(flags.RollUpMinTxnFlag.Name),
RollUpMaxSize: ctx.GlobalUint64(flags.RollUpMaxSizeFlag.Name),
EigenLayerNode: ctx.GlobalInt(flags.EigenLayerNodeFlag.Name),
EigenLogConfig: logging.ReadCLIConfig(ctx),
//EigenLogConfig: logging.ReadCLIConfig(ctx),
RetrieverTimeout: ctx.GlobalDuration(flags.RetrieverTimeoutFlag.Name),
ResubmissionTimeout: ctx.GlobalDuration(flags.ResubmissionTimeoutFlag.Name),
NumConfirmations: ctx.GlobalUint64(flags.NumConfirmationsFlag.Name),
Expand Down
8 changes: 4 additions & 4 deletions mt-batcher/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module github.com/mantlenetworkio/mantle/mt-batcher

go 1.19

replace github.com/Layr-Labs/datalayr/common => ../datalayr/common

replace github.com/Layr-Labs/datalayr/lib/merkzg => ../datalayr/lib/merkzg
//replace github.com/Layr-Labs/datalayr/common => ../datalayr/common
//
//replace github.com/Layr-Labs/datalayr/lib/merkzg => ../datalayr/lib/merkzg

replace github.com/mantlenetworkio/mantle/l2geth => ../l2geth

Expand All @@ -16,7 +16,7 @@ replace github.com/mantlenetworkio/mantle/bss-core => ../bss-core

require (
cloud.google.com/go/kms v1.11.0
github.com/Layr-Labs/datalayr/common v0.0.0
//github.com/Layr-Labs/datalayr/common v0.0.0
github.com/decred/dcrd/hdkeychain/v3 v3.0.0
github.com/ethereum/go-ethereum v1.10.26
github.com/go-resty/resty/v2 v2.7.0
Expand Down
33 changes: 16 additions & 17 deletions mt-batcher/mt_batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/mantlenetworkio/mantle/mt-batcher/services/restorer"
"github.com/mantlenetworkio/mantle/mt-batcher/services/sequencer"

"github.com/Layr-Labs/datalayr/common/logging"
"github.com/urfave/cli"
)

Expand Down Expand Up @@ -96,10 +95,10 @@ func NewMantleBatch(cfg Config) (*MantleBatch, error) {
return nil, err
}

logger, err := logging.GetLogger(cfg.EigenLogConfig)
if err != nil {
return nil, err
}
//logger, err := logging.GetLogger(cfg.EigenLogConfig)
//if err != nil {
// return nil, err
//}
parsed, err := abi.JSON(strings.NewReader(
bindings.BVMEigenDataLayrChainABI,
))
Expand Down Expand Up @@ -135,18 +134,18 @@ func NewMantleBatch(cfg Config) (*MantleBatch, error) {
)

driverConfig := &sequencer.DriverConfig{
L1Client: l1Client,
L2Client: l2Client,
L1ChainID: chainID,
DtlClientUrl: cfg.DtlClientUrl,
EigenDaContract: eigenContract,
RawEigenContract: rawEigenContract,
EigenFeeContract: eigenFeeContract,
RawEigenFeeContract: rawEigenFeeContract,
FeeModelEnable: cfg.FeeModelEnable,
FeeSizeSec: cfg.FeeSizeSec,
FeePerBytePerTime: cfg.FeePerBytePerTime,
Logger: logger,
L1Client: l1Client,
L2Client: l2Client,
L1ChainID: chainID,
DtlClientUrl: cfg.DtlClientUrl,
EigenDaContract: eigenContract,
RawEigenContract: rawEigenContract,
EigenFeeContract: eigenFeeContract,
RawEigenFeeContract: rawEigenFeeContract,
FeeModelEnable: cfg.FeeModelEnable,
FeeSizeSec: cfg.FeeSizeSec,
FeePerBytePerTime: cfg.FeePerBytePerTime,
//Logger: logger,
PrivKey: sequencerPrivKey,
FeePrivKey: mtFeePrivateKey,
BlockOffset: cfg.BlockOffset,
Expand Down
Loading
Loading