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

Upgrade slinky to 1.0.8 (backport #2069) #2070

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 protocol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NB: This is a digest for a multi-arch manifest list, you will want to get this by running
# `docker buildx imagetools inspect golang:1.21-alpine`
ARG GOLANG_1_22_ALPINE_DIGEST="8e96e6cff6a388c2f70f5f662b64120941fcd7d4b89d62fec87520323a316bd9"
# `docker buildx imagetools inspect golang:1.22.2-alpine`
ARG GOLANG_1_22_ALPINE_DIGEST="cdc86d9f363e8786845bea2040312b4efa321b828acdeb26f393faa864d887b0"

# This Dockerfile is a stateless build of the `dydxprotocold` binary as a Docker container.
# It does not include any configuration, state, or genesis information.
Expand Down
23 changes: 5 additions & 18 deletions protocol/app/upgrades/v6.0.0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ import (
clobtypes "github.com/dydxprotocol/v4-chain/protocol/x/clob/types"
pricestypes "github.com/dydxprotocol/v4-chain/protocol/x/prices/types"
revsharetypes "github.com/dydxprotocol/v4-chain/protocol/x/revshare/types"
<<<<<<< HEAD
vaultkeeper "github.com/dydxprotocol/v4-chain/protocol/x/vault/keeper"
vaulttypes "github.com/dydxprotocol/v4-chain/protocol/x/vault/types"
"github.com/skip-mev/slinky/oracle/config"
"github.com/skip-mev/slinky/providers/apis/dydx"
=======
dydx "github.com/skip-mev/slinky/providers/apis/dydx"
>>>>>>> 697c276b (upgrade slinky to 1.0.8 (#2069))
dydxtypes "github.com/skip-mev/slinky/providers/apis/dydx/types"
marketmapkeeper "github.com/skip-mev/slinky/x/marketmap/keeper"
marketmaptypes "github.com/skip-mev/slinky/x/marketmap/types"
"go.uber.org/zap"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
Expand Down Expand Up @@ -67,22 +70,6 @@ func setMarketMapParams(ctx sdk.Context, mmk marketmapkeeper.Keeper) {
}

func migratePricesToMarketMap(ctx sdk.Context, pk pricestypes.PricesKeeper, mmk marketmapkeeper.Keeper) {
// fill out config with dummy variables to pass validation. This handler is only used to run the
// ConvertMarketParamsToMarketMap member function.
h, err := dydx.NewAPIHandler(zap.NewNop(), config.APIConfig{
Enabled: true,
Timeout: 1,
Interval: 1,
ReconnectTimeout: 1,
MaxQueries: 1,
Atomic: false,
Endpoints: []config.Endpoint{{URL: "upgrade"}},
BatchSize: 0,
Name: dydx.Name,
})
if err != nil {
panic(fmt.Sprintf("Failed to construct dydx handler %v", err))
}
allMarketParams := pk.GetAllMarketParams(ctx)
var mpr dydxtypes.QueryAllMarketParamsResponse
for _, mp := range allMarketParams {
Expand All @@ -95,7 +82,7 @@ func migratePricesToMarketMap(ctx sdk.Context, pk pricestypes.PricesKeeper, mmk
ExchangeConfigJson: mp.ExchangeConfigJson,
})
}
mm, err := h.ConvertMarketParamsToMarketMap(mpr)
mm, err := dydx.ConvertMarketParamsToMarketMap(mpr)
if err != nil {
panic(fmt.Sprintf("Couldn't convert markets %v", err))
}
Expand Down
47 changes: 22 additions & 25 deletions protocol/go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
module github.com/dydxprotocol/v4-chain/protocol

go 1.22

toolchain go1.22.0
go 1.22.2

require (
cosmossdk.io/api v0.7.5
cosmossdk.io/math v1.3.0
github.com/Shopify/sarama v1.37.2
github.com/cometbft/cometbft v0.38.10
github.com/cometbft/cometbft-db v0.10.0 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.50.8
github.com/cosmos/cosmos-sdk v0.50.9
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogoproto v1.5.0
github.com/cosmos/gogoproto v1.6.0
github.com/go-playground/validator/v10 v10.14.0
github.com/gofrs/flock v0.8.1
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -28,50 +26,49 @@ require (
github.com/ory/dockertest v3.3.5+incompatible
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.6.0
github.com/spf13/cast v1.7.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
github.com/vektra/mockery/v2 v2.43.2
github.com/vektra/mockery/v2 v2.44.1
github.com/zyedidia/generic v1.0.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.65.0
gopkg.in/DataDog/dd-trace-go.v1 v1.48.0
gopkg.in/typ.v4 v4.1.0
)

require (
cosmossdk.io/client/v2 v2.0.0-beta.1
cosmossdk.io/client/v2 v2.0.0-beta.4
cosmossdk.io/core v0.12.0
cosmossdk.io/errors v1.0.1
cosmossdk.io/log v1.3.1
cosmossdk.io/log v1.4.0
cosmossdk.io/store v1.1.0
cosmossdk.io/tools/confix v0.1.1
cosmossdk.io/x/circuit v0.1.1
cosmossdk.io/x/evidence v0.1.0
cosmossdk.io/x/feegrant v0.1.0
cosmossdk.io/x/tx v0.13.3
cosmossdk.io/x/upgrade v0.1.3
cosmossdk.io/x/tx v0.13.4
cosmossdk.io/x/upgrade v0.1.4
github.com/burdiyan/kafkautil v0.0.0-20190131162249-eaf83ed22d5b
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/iavl v1.1.2
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.2.0
github.com/cosmos/ibc-go/v8 v8.3.2
github.com/cosmos/rosetta v0.50.3
github.com/deckarep/golang-set/v2 v2.6.0
github.com/ethereum/go-ethereum v1.14.7
github.com/go-kit/log v0.2.1
github.com/hashicorp/go-metrics v0.5.3
github.com/ory/dockertest/v3 v3.10.0
github.com/pelletier/go-toml v1.9.5
github.com/rs/zerolog v1.32.0
github.com/rs/zerolog v1.33.0
github.com/shopspring/decimal v1.3.1
github.com/skip-mev/slinky v1.0.5-0.20240724231039-9f85f7f0f7cb
github.com/skip-mev/slinky v1.0.8
github.com/spf13/viper v1.19.0
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
go.uber.org/zap v1.27.0
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157
google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f
google.golang.org/protobuf v1.34.2
gotest.tools/v3 v3.5.1
)
Expand Down Expand Up @@ -136,7 +133,6 @@ require (
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/charithe/durationcheck v0.0.10 // indirect
github.com/chavacava/garif v0.1.0 // indirect
Expand All @@ -157,7 +153,7 @@ require (
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/interchain-security/v5 v5.0.0 // indirect
github.com/cosmos/interchain-security/v5 v5.1.1 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
Expand All @@ -171,9 +167,8 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/denis-tingaikin/go-header v0.5.0 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgraph-io/badger/v4 v4.2.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/docker/cli v23.0.1+incompatible // indirect
github.com/docker/docker v23.0.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
Expand Down Expand Up @@ -230,6 +225,7 @@ require (
github.com/golangci/revgrep v0.5.3 // indirect
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/flatbuffers v2.0.8+incompatible // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/s2a-go v0.1.7 // indirect
Expand Down Expand Up @@ -410,7 +406,7 @@ require (
gitlab.com/bosi/decorder v0.4.2 // indirect
go-simpler.org/musttag v0.12.2 // indirect
go-simpler.org/sloglint v0.7.1 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect
go.mongodb.org/mongo-driver v1.11.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
Expand All @@ -421,19 +417,20 @@ require (
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.2.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.23.0 // indirect
google.golang.org/api v0.171.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading