diff --git a/mt-batcher/cmd/mt-batcher/main.go b/mt-batcher/cmd/mt-batcher/main.go index e2c94c3fc..63eae1ab3 100644 --- a/mt-batcher/cmd/mt-batcher/main.go +++ b/mt-batcher/cmd/mt-batcher/main.go @@ -2,12 +2,15 @@ package main import ( "fmt" + "os" + + "github.com/urfave/cli" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + mt_batcher "github.com/mantlenetworkio/mantle/mt-batcher" "github.com/mantlenetworkio/mantle/mt-batcher/flags" - "github.com/urfave/cli" - "os" ) var ( diff --git a/mt-batcher/common/utils.go b/mt-batcher/common/utils.go index e42b4c872..bd02cc9d2 100644 --- a/mt-batcher/common/utils.go +++ b/mt-batcher/common/utils.go @@ -2,9 +2,10 @@ package common import ( "fmt" - "github.com/Layr-Labs/datalayr/common/header" "math/big" "os" + + "github.com/Layr-Labs/datalayr/common/header" ) func CreateUploadHeader(params StoreParams) ([]byte, error) { diff --git a/mt-batcher/metrics/metrics_server.go b/mt-batcher/metrics/metrics_server.go index 039688849..de39284cb 100644 --- a/mt-batcher/metrics/metrics_server.go +++ b/mt-batcher/metrics/metrics_server.go @@ -2,9 +2,10 @@ package metrics import ( "fmt" - "github.com/prometheus/client_golang/prometheus/promhttp" "net/http" "strconv" + + "github.com/prometheus/client_golang/prometheus/promhttp" ) func StartServer(hostname string, port uint64) { diff --git a/mt-batcher/services/client/client.go b/mt-batcher/services/client/client.go index 343846ee5..136abcd4f 100644 --- a/mt-batcher/services/client/client.go +++ b/mt-batcher/services/client/client.go @@ -3,9 +3,10 @@ package client import ( "errors" "fmt" + "strconv" + "github.com/go-resty/resty/v2" "github.com/mantlenetworkio/mantle/l2geth/rollup" - "strconv" ) var errDtlHTTPError = errors.New("dtl http error") diff --git a/mt-batcher/services/restorer/handle.go b/mt-batcher/services/restorer/handle.go index a8221c936..09dd69693 100644 --- a/mt-batcher/services/restorer/handle.go +++ b/mt-batcher/services/restorer/handle.go @@ -4,22 +4,27 @@ import ( "bytes" "context" "encoding/json" + + "math/big" + "net/http" + "strings" + + gecho "github.com/labstack/echo/v4" + "github.com/pkg/errors" + "github.com/shurcooL/graphql" + "google.golang.org/grpc" + "github.com/Layr-Labs/datalayr/common/graphView" pb "github.com/Layr-Labs/datalayr/common/interfaces/interfaceRetrieverServer" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" - gecho "github.com/labstack/echo/v4" + common2 "github.com/mantlenetworkio/mantle/l2geth/common" "github.com/mantlenetworkio/mantle/l2geth/core/types" l2rlp "github.com/mantlenetworkio/mantle/l2geth/rlp" "github.com/mantlenetworkio/mantle/l2geth/rollup/eigenda" - "github.com/pkg/errors" - "github.com/shurcooL/graphql" - "google.golang.org/grpc" - "math/big" - "net/http" - "strings" ) const ( diff --git a/mt-batcher/services/sequencer/db/level.go b/mt-batcher/services/sequencer/db/level.go index 6377caeb9..e3cd530c6 100644 --- a/mt-batcher/services/sequencer/db/level.go +++ b/mt-batcher/services/sequencer/db/level.go @@ -2,6 +2,7 @@ package db import ( "encoding/binary" + "github.com/syndtr/goleveldb/leveldb" ) diff --git a/mt-batcher/services/sequencer/driver.go b/mt-batcher/services/sequencer/driver.go index 19ec60345..077b500b1 100644 --- a/mt-batcher/services/sequencer/driver.go +++ b/mt-batcher/services/sequencer/driver.go @@ -11,23 +11,25 @@ import ( "sync" "time" + "github.com/pkg/errors" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "github.com/Layr-Labs/datalayr/common/graphView" pb "github.com/Layr-Labs/datalayr/common/interfaces/interfaceDL" "github.com/Layr-Labs/datalayr/common/logging" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" + l2gethcommon "github.com/mantlenetworkio/mantle/l2geth/common" l2ethclient "github.com/mantlenetworkio/mantle/l2geth/ethclient" l2rlp "github.com/mantlenetworkio/mantle/l2geth/rlp" common3 "github.com/mantlenetworkio/mantle/l2geth/rollup/eigenda" - "github.com/pkg/errors" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "github.com/mantlenetworkio/mantle/mt-batcher/bindings" rc "github.com/mantlenetworkio/mantle/mt-batcher/bindings" common2 "github.com/mantlenetworkio/mantle/mt-batcher/common" diff --git a/mt-challenger/challenger/challenger.go b/mt-challenger/challenger/challenger.go index 222fa2691..a20f0a101 100644 --- a/mt-challenger/challenger/challenger.go +++ b/mt-challenger/challenger/challenger.go @@ -6,12 +6,23 @@ import ( "crypto/ecdsa" "encoding/hex" "fmt" + "math/big" + "strconv" + "strings" + "sync" + "time" + + "github.com/pkg/errors" + "github.com/shurcooL/graphql" + "google.golang.org/grpc" + datalayr "github.com/Layr-Labs/datalayr/common/contracts" gkzg "github.com/Layr-Labs/datalayr/common/crypto/go-kzg-bn254" "github.com/Layr-Labs/datalayr/common/graphView" "github.com/Layr-Labs/datalayr/common/header" pb "github.com/Layr-Labs/datalayr/common/interfaces/interfaceRetrieverServer" "github.com/Layr-Labs/datalayr/common/logging" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" ethc "github.com/ethereum/go-ethereum/common" @@ -20,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" + "github.com/mantlenetworkio/mantle/l2geth/common" l2types "github.com/mantlenetworkio/mantle/l2geth/core/types" l2ethclient "github.com/mantlenetworkio/mantle/l2geth/ethclient" @@ -32,14 +44,6 @@ import ( "github.com/mantlenetworkio/mantle/mt-challenger/challenger/client" "github.com/mantlenetworkio/mantle/mt-challenger/challenger/db" "github.com/mantlenetworkio/mantle/mt-challenger/metrics" - "github.com/pkg/errors" - "github.com/shurcooL/graphql" - "google.golang.org/grpc" - "math/big" - "strconv" - "strings" - "sync" - "time" ) const fraudString = "2d5f2860204f2060295f2d202d5f2860206f2060295f2d202d5f286020512060295f2d2042495444414f204a5553542052454b5420594f55207c5f2860204f2060295f7c202d207c5f2860206f2060295f7c202d207c5f286020512060295f7c" diff --git a/mt-challenger/challenger/client/client.go b/mt-challenger/challenger/client/client.go index 13fae67c6..878bc57f5 100644 --- a/mt-challenger/challenger/client/client.go +++ b/mt-challenger/challenger/client/client.go @@ -3,6 +3,7 @@ package client import ( "errors" "fmt" + "github.com/go-resty/resty/v2" ) diff --git a/mt-challenger/cmd/mt-challenger/main.go b/mt-challenger/cmd/mt-challenger/main.go index f7a614635..52662ddd7 100644 --- a/mt-challenger/cmd/mt-challenger/main.go +++ b/mt-challenger/cmd/mt-challenger/main.go @@ -2,12 +2,15 @@ package main import ( "fmt" + "os" + + "github.com/urfave/cli" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/mantlenetworkio/mantle/mt-challenger" "github.com/mantlenetworkio/mantle/mt-challenger/flags" - "github.com/urfave/cli" - "os" ) var ( diff --git a/mt-challenger/metrics/metrics_server.go b/mt-challenger/metrics/metrics_server.go index 039688849..de39284cb 100644 --- a/mt-challenger/metrics/metrics_server.go +++ b/mt-challenger/metrics/metrics_server.go @@ -2,9 +2,10 @@ package metrics import ( "fmt" - "github.com/prometheus/client_golang/prometheus/promhttp" "net/http" "strconv" + + "github.com/prometheus/client_golang/prometheus/promhttp" ) func StartServer(hostname string, port uint64) { diff --git a/mt-challenger/mt_challenger.go b/mt-challenger/mt_challenger.go index f1b30d8bc..d2c29f7f5 100644 --- a/mt-challenger/mt_challenger.go +++ b/mt-challenger/mt_challenger.go @@ -4,15 +4,17 @@ import ( "context" "time" + "github.com/urfave/cli" + "github.com/Layr-Labs/datalayr/common/logging" ethc "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/mantlenetworkio/mantle/l2geth/common" "github.com/mantlenetworkio/mantle/mt-batcher/l1l2client" common2 "github.com/mantlenetworkio/mantle/mt-batcher/services/common" "github.com/mantlenetworkio/mantle/mt-challenger/challenger" "github.com/mantlenetworkio/mantle/mt-challenger/metrics" - "github.com/urfave/cli" ) func Main(gitVersion string) func(ctx *cli.Context) error {