From e525f990f9b09cd03f7d9e9f1e96d9cff0a88c00 Mon Sep 17 00:00:00 2001 From: bros Date: Fri, 7 Jul 2023 11:33:22 +0000 Subject: [PATCH 1/2] Remove zkevm-node dependency --- batch/batch.go | 2 +- batch/batch_test.go | 2 +- client/datacom.go | 4 ++-- client/sync.go | 4 ++-- cmd/main.go | 10 +++++----- config/config.go | 8 ++++---- config/config_test.go | 2 +- db/db.go | 4 ++-- db/migrations.go | 2 +- dummyinterfaces/dummyinterfaces.go | 8 ++++---- go.mod | 4 ++-- go.sum | 17 +++++++++++++---- sequence/sequence.go | 4 ++-- sequence/sequence_test.go | 2 +- services/datacom/datacom.go | 4 ++-- services/datacom/tracker.go | 14 +++++++------- services/sync/interfaces.go | 2 +- services/sync/sync.go | 4 ++-- test/e2e/e2e_test.go | 2 +- version.go | 25 +++++++++++++++++++++++++ 20 files changed, 79 insertions(+), 45 deletions(-) create mode 100644 version.go diff --git a/batch/batch.go b/batch/batch.go index 1405e5ff..3d3360ab 100644 --- a/batch/batch.go +++ b/batch/batch.go @@ -3,7 +3,7 @@ package batch import ( "crypto/ecdsa" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" ) diff --git a/batch/batch_test.go b/batch/batch_test.go index b5f12d7d..fc0da4fd 100644 --- a/batch/batch_test.go +++ b/batch/batch_test.go @@ -4,7 +4,7 @@ import ( "crypto/ecdsa" "testing" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" diff --git a/client/datacom.go b/client/datacom.go index 614b548e..79044ef7 100644 --- a/client/datacom.go +++ b/client/datacom.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/0xPolygon/supernets2-data-availability/sequence" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" ) // SignSequence sends a request to sign the given sequence by the data committee member diff --git a/client/sync.go b/client/sync.go index 03c7ec0f..b809f5ae 100644 --- a/client/sync.go +++ b/client/sync.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" ) diff --git a/cmd/main.go b/cmd/main.go index ec5c9177..de3505b2 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -6,15 +6,15 @@ import ( "os" "os/signal" + dataavailability "github.com/0xPolygon/supernets2-data-availability" "github.com/0xPolygon/supernets2-data-availability/config" "github.com/0xPolygon/supernets2-data-availability/db" "github.com/0xPolygon/supernets2-data-availability/dummyinterfaces" "github.com/0xPolygon/supernets2-data-availability/services/datacom" "github.com/0xPolygon/supernets2-data-availability/services/sync" - "github.com/0xPolygonHermez/zkevm-node" - dbConf "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/log" + dbConf "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/log" "github.com/urfave/cli/v2" ) @@ -32,7 +32,7 @@ var ( func main() { app := cli.NewApp() app.Name = appName - app.Version = zkevm.Version + app.Version = dataavailability.Version app.Commands = []*cli.Command{ { Name: "run", diff --git a/config/config.go b/config/config.go index 111384ac..a670dfa1 100644 --- a/config/config.go +++ b/config/config.go @@ -6,10 +6,10 @@ import ( "path/filepath" "strings" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/mitchellh/mapstructure" "github.com/spf13/viper" diff --git a/config/config_test.go b/config/config_test.go index 9477c3b5..88bc27f8 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/supernets2-node/config/types" "github.com/stretchr/testify/require" "github.com/urfave/cli/v2" ) diff --git a/db/db.go b/db/db.go index 63ca8ade..54701562 100644 --- a/db/db.go +++ b/db/db.go @@ -5,8 +5,8 @@ import ( "errors" "github.com/0xPolygon/supernets2-data-availability/offchaindata" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" diff --git a/db/migrations.go b/db/migrations.go index 82a1e9fa..f514729f 100644 --- a/db/migrations.go +++ b/db/migrations.go @@ -1,7 +1,7 @@ package db import ( - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/gobuffalo/packr/v2" "github.com/jackc/pgx/v4/pgxpool" "github.com/jackc/pgx/v4/stdlib" diff --git a/dummyinterfaces/dummyinterfaces.go b/dummyinterfaces/dummyinterfaces.go index 6621b753..e191314a 100644 --- a/dummyinterfaces/dummyinterfaces.go +++ b/dummyinterfaces/dummyinterfaces.go @@ -6,10 +6,10 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/gorilla/websocket" diff --git a/go.mod b/go.mod index cd41a3d6..62337452 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/0xPolygon/supernets2-data-availability go 1.19 require ( - github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691 + github.com/0xPolygon/supernets2-node v0.0.0-20230707112214-f7e23fc2f1c4 github.com/ethereum/go-ethereum v1.12.0 github.com/gobuffalo/packr/v2 v2.8.3 github.com/gorilla/websocket v1.5.0 @@ -116,7 +116,7 @@ require ( golang.org/x/time v0.1.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 31e0b752..1ccc6a91 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691 h1:PTbLJ6HEQ9J0CzKrv62n/l4GsGYygyAVX4kRAWY530Q= -github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691/go.mod h1:6/9FEzpZVSQJaRY5iAJpwIanokNQWkbl1yUP5mUbShA= +github.com/0xPolygon/supernets2-node v0.0.0-20230707112214-f7e23fc2f1c4 h1:8Fhvhj5+dW1rCe24wtdtB6vy5MOM2OlsEVzuQ93kEto= +github.com/0xPolygon/supernets2-node v0.0.0-20230707112214-f7e23fc2f1c4/go.mod h1:Xf5M+JgXqh70Bq/SZqY9bJNX2tWqvohSmQSg4byAVa4= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -175,6 +175,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -242,7 +243,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -337,6 +340,7 @@ github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBt github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= @@ -506,6 +510,7 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -516,6 +521,7 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-oci8 v0.1.1/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= @@ -545,6 +551,7 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -629,6 +636,7 @@ github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4 github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= @@ -1230,8 +1238,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1248,6 +1256,7 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= diff --git a/sequence/sequence.go b/sequence/sequence.go index 18c5a783..01c8f5c8 100644 --- a/sequence/sequence.go +++ b/sequence/sequence.go @@ -7,8 +7,8 @@ import ( "github.com/0xPolygon/supernets2-data-availability/batch" "github.com/0xPolygon/supernets2-data-availability/offchaindata" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" solsha3 "github.com/miguelmota/go-solidity-sha3" diff --git a/sequence/sequence_test.go b/sequence/sequence_test.go index 3514ac98..87c663be 100644 --- a/sequence/sequence_test.go +++ b/sequence/sequence_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/0xPolygon/supernets2-data-availability/batch" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" diff --git a/services/datacom/datacom.go b/services/datacom/datacom.go index a5606ac9..7af94ab3 100644 --- a/services/datacom/datacom.go +++ b/services/datacom/datacom.go @@ -5,8 +5,8 @@ import ( "crypto/ecdsa" "github.com/0xPolygon/supernets2-data-availability/sequence" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/jackc/pgx/v4" ) diff --git a/services/datacom/tracker.go b/services/datacom/tracker.go index d6b05293..a2a45d87 100644 --- a/services/datacom/tracker.go +++ b/services/datacom/tracker.go @@ -6,9 +6,9 @@ import ( "time" "github.com/0xPolygon/supernets2-data-availability/config" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -55,13 +55,13 @@ func newEtherman(cfg config.L1Config) (*etherman.Client, error) { log.Errorf("error connecting to %s: %+v", cfg.WsURL, err) return nil, err } - zkEvm, err := polygonzkevm.NewPolygonzkevm(common.HexToAddress(cfg.Contract), ethClient) + supernets2, err := supernets2.NewSupernets2(common.HexToAddress(cfg.Contract), ethClient) if err != nil { return nil, err } return ðerman.Client{ - EthClient: ethClient, - ZkEVM: zkEvm, + EthClient: ethClient, + Supernets2: supernets2, }, nil } @@ -80,7 +80,7 @@ func (st *SequencerTracker) setAddr(addr common.Address) { // Start starts the SequencerTracker func (st *SequencerTracker) Start() { - events := make(chan *polygonzkevm.PolygonzkevmSetTrustedSequencer) + events := make(chan *supernets2.Supernets2SetTrustedSequencer) defer close(events) for { var ( diff --git a/services/sync/interfaces.go b/services/sync/interfaces.go index e1b4cbd0..7af800f0 100644 --- a/services/sync/interfaces.go +++ b/services/sync/interfaces.go @@ -3,7 +3,7 @@ package sync import ( "context" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" ) diff --git a/services/sync/sync.go b/services/sync/sync.go index 1a2ac16a..45874d18 100644 --- a/services/sync/sync.go +++ b/services/sync/sync.go @@ -3,8 +3,8 @@ package sync import ( "context" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/jackc/pgx/v4" ) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index f0bc9cf8..074a232e 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -10,7 +10,7 @@ import ( "github.com/0xPolygon/supernets2-data-availability/client" "github.com/0xPolygon/supernets2-data-availability/config" "github.com/0xPolygon/supernets2-data-availability/sequence" - cfgTypes "github.com/0xPolygonHermez/zkevm-node/config/types" + cfgTypes "github.com/0xPolygon/supernets2-node/config/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" diff --git a/version.go b/version.go new file mode 100644 index 00000000..8b92bb1c --- /dev/null +++ b/version.go @@ -0,0 +1,25 @@ +package dataavailability + +import ( + "fmt" + "io" + "runtime" +) + +// Populated during build, don't touch! +var ( + Version = "v0.1.0" + GitRev = "undefined" + GitBranch = "undefined" + BuildDate = "Fri, 17 Jun 1988 01:58:00 +0200" +) + +// PrintVersion prints version info into the provided io.Writer. +func PrintVersion(w io.Writer) { + fmt.Fprintf(w, "Version: %s\n", Version) + fmt.Fprintf(w, "Git revision: %s\n", GitRev) + fmt.Fprintf(w, "Git branch: %s\n", GitBranch) + fmt.Fprintf(w, "Go version: %s\n", runtime.Version()) + fmt.Fprintf(w, "Built: %s\n", BuildDate) + fmt.Fprintf(w, "OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH) +} From 8626d36e657504f38ca08491ed33e3cdc0a23f51 Mon Sep 17 00:00:00 2001 From: bros Date: Fri, 7 Jul 2023 11:40:23 +0000 Subject: [PATCH 2/2] Fix linter and tests --- services/datacom/tracker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/datacom/tracker.go b/services/datacom/tracker.go index a2a45d87..affb4937 100644 --- a/services/datacom/tracker.go +++ b/services/datacom/tracker.go @@ -90,12 +90,12 @@ func (st *SequencerTracker) Start() { ctx, cancel := context.WithTimeout(context.Background(), st.timeout) opts := &bind.WatchOpts{Context: ctx} - sub, err = st.client.ZkEVM.WatchSetTrustedSequencer(opts, events) + sub, err = st.client.Supernets2.WatchSetTrustedSequencer(opts, events) // if no subscription, retry until established for err != nil { <-time.After(st.retry) - sub, err = st.client.ZkEVM.WatchSetTrustedSequencer(opts, events) + sub, err = st.client.Supernets2.WatchSetTrustedSequencer(opts, events) if err != nil { log.Errorf("error subscribing to trusted sequencer event, retrying", err) }