Skip to content

Commit

Permalink
chore: move chainsync to legacychainsync
Browse files Browse the repository at this point in the history
  • Loading branch information
ezdac committed Oct 25, 2024
1 parent 32ba27f commit ba7695d
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions rolling-shutter/gnosisaccessnode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/shutter-network/shutter/shlib/shcrypto"

obskeyperdatabase "github.com/shutter-network/rolling-shutter/rolling-shutter/chainobserver/db/keyper"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
chainsync "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/metricsserver"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
"github.com/shutter-network/rolling-shutter/rolling-shutter/p2p"
Expand Down
4 changes: 2 additions & 2 deletions rolling-shutter/keyperimpl/gnosis/keyper.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/shutter-network/rolling-shutter/rolling-shutter/keyperimpl/gnosis/database"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/beaconapiclient"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/broker"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/db"
chainsync "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/slotticker"
"github.com/shutter-network/rolling-shutter/rolling-shutter/p2p"
Expand Down
2 changes: 1 addition & 1 deletion rolling-shutter/keyperimpl/gnosis/newblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
)

func (kpr *Keyper) processNewBlock(ctx context.Context, ev *syncevent.LatestBlock) error {
Expand Down
2 changes: 1 addition & 1 deletion rolling-shutter/keyperimpl/gnosis/newkeyperset.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

obskeyper "github.com/shutter-network/rolling-shutter/rolling-shutter/chainobserver/db/keyper"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/shdb"
)

Expand Down
2 changes: 1 addition & 1 deletion rolling-shutter/keyperimpl/optimism/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/tendermint/tendermint/rpc/client/http"

"github.com/shutter-network/rolling-shutter/rolling-shutter/keyper/fx"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/shmsg"
)

Expand Down
4 changes: 2 additions & 2 deletions rolling-shutter/keyperimpl/optimism/bootstrap/keyperset.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"errors"
"os"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
chainsync "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
)

func GetKeyperSet(ctx context.Context, config *Config) error {
Expand Down
16 changes: 8 additions & 8 deletions rolling-shutter/keyperimpl/optimism/keyper.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
"github.com/shutter-network/rolling-shutter/rolling-shutter/keyperimpl/optimism/database"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/broker"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/configuration"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/db"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/identitypreimage"
legacychainsync "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync"
syncevent "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
"github.com/shutter-network/rolling-shutter/rolling-shutter/shdb"
)
Expand All @@ -30,7 +30,7 @@ var ErrParseKeyperSet = errors.New("can't parse KeyperSet")

type Keyper struct {
core *keyper.KeyperCore
l2Client *chainsync.Client
l2Client *legacychainsync.Client
dbpool *pgxpool.Pool
config *config.Config

Expand Down Expand Up @@ -79,12 +79,12 @@ func (kpr *Keyper) Start(ctx context.Context, runner service.Runner) error {
return errors.Wrap(err, "can't instantiate keyper core")
}
// TODO: wrap the logger and pass in
kpr.l2Client, err = chainsync.NewClient(
kpr.l2Client, err = legacychainsync.NewClient(
ctx,
chainsync.WithClientURL(kpr.config.Optimism.JSONRPCURL),
chainsync.WithSyncNewBlock(kpr.newBlock),
chainsync.WithSyncNewKeyperSet(kpr.newKeyperSet),
chainsync.WithPrivateKey(kpr.config.Optimism.PrivateKey.Key),
legacychainsync.WithClientURL(kpr.config.Optimism.JSONRPCURL),
legacychainsync.WithSyncNewBlock(kpr.newBlock),
legacychainsync.WithSyncNewKeyperSet(kpr.newKeyperSet),
legacychainsync.WithPrivateKey(kpr.config.Optimism.PrivateKey.Key),
)
if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/pkg/errors"
"github.com/shutter-network/shop-contracts/bindings"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/syncer"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/syncer"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/logger"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/shutter-network/shop-contracts/bindings"
"github.com/shutter-network/shop-contracts/predeploy"

syncclient "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/syncer"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
syncclient "github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/syncer"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/shutter-network/shop-contracts/bindings"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/pkg/errors"
"github.com/shutter-network/shop-contracts/bindings"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/pkg/errors"
"github.com/shutter-network/shop-contracts/bindings"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/event"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/pkg/errors"

"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/chainsync/client"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/encodeable/number"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/legacychainsync/client"
)

var (
Expand Down

0 comments on commit ba7695d

Please sign in to comment.