From 53b22d1ff50f5b60d50346640e32bbd77472e95e Mon Sep 17 00:00:00 2001 From: Alex Johnson Date: Wed, 18 Sep 2024 18:19:41 -0400 Subject: [PATCH] chore: final slinky -> connect renames (#760) Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com> --- .github/actions/spelling/expect.txt | 23 +- .github/workflows/build.yml | 4 +- .gitignore | 3 +- Makefile | 1 - abci/proposals/proposals.go | 6 +- abci/types/errors.go | 2 +- abci/types/interfaces.go | 2 +- abci/ve/README.md | 3 +- cmd/connect/config/config.go | 14 +- cmd/connect/config/config_test.go | 6 +- cmd/connect/main.go | 7 +- contrib/images/slinky.sidecar.prod.Dockerfile | 21 -- contrib/nomad/connect.nomad | 289 ------------------ docs/snippets/dydx-quickstart-guide.mdx | 4 +- .../dashboards/chain-dashboard.json | 2 +- .../dashboards/side-car-dashboard.json | 4 +- oracle/metrics/metrics.go | 13 +- pkg/http/round_tripper_with_headers.go | 4 +- pkg/http/round_tripper_with_headers_test.go | 4 +- providers/apis/defi/raydium/client.go | 10 +- providers/apis/dydx/parse.go | 4 +- providers/websockets/binance/messages.go | 4 +- providers/websockets/bybit/messages.go | 4 +- providers/websockets/coinbase/messages.go | 4 +- providers/websockets/cryptodotcom/messages.go | 4 +- providers/websockets/gate/messages.go | 4 +- providers/websockets/kraken/messages.go | 4 +- providers/websockets/kucoin/messages.go | 4 +- providers/websockets/mexc/messages.go | 4 +- providers/websockets/okx/messages.go | 4 +- scripts/protocgen-pulsar.sh | 2 +- service/metrics/README.md | 4 +- service/metrics/types.go | 2 +- ...inky_ccv_suite.go => connect_ccv_suite.go} | 0 ...on_test.go => connect_integration_test.go} | 9 +- .../{slinky_setup.go => connect_setup.go} | 12 +- .../{slinky_suite.go => connect_suite.go} | 12 +- ...or_suite.go => connect_validator_suite.go} | 8 +- tests/integration/consumer.go | 2 +- tests/petri/chain_config.go | 2 +- .../{slinky_suite.go => connect_suite.go} | 16 +- tests/petri/connect_test.go | 15 + tests/petri/slinky_test.go | 15 - x/marketmap/types/keys.go | 2 +- 44 files changed, 114 insertions(+), 449 deletions(-) delete mode 100644 contrib/images/slinky.sidecar.prod.Dockerfile delete mode 100644 contrib/nomad/connect.nomad rename tests/integration/{slinky_ccv_suite.go => connect_ccv_suite.go} (100%) rename tests/integration/{slinky_integration_test.go => connect_integration_test.go} (91%) rename tests/integration/{slinky_setup.go => connect_setup.go} (98%) rename tests/integration/{slinky_suite.go => connect_suite.go} (98%) rename tests/integration/{slinky_validator_suite.go => connect_validator_suite.go} (91%) rename tests/petri/{slinky_suite.go => connect_suite.go} (59%) create mode 100644 tests/petri/connect_test.go delete mode 100644 tests/petri/slinky_test.go diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 5ff5d8d9c..a7234a894 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -150,11 +150,17 @@ Commitcodec conditionaltokens configurator confixcmd +connectabci +connectabcimocks +connectabcitypes connectd +connectgrpc +connecthttp +connectmath +connecttypes consensuskeeper consensusmodulev consensustypes -consulcatalog consumertypes conventionalcommits copyloopvar @@ -180,7 +186,6 @@ cve cwwv dac dasel -datacenters datadog datasources dbddb @@ -228,9 +233,7 @@ EFDDc efdff egs eguhvrsnrw -entrypoints eod -EOH Eqcq erc Errf @@ -500,7 +503,6 @@ postmsg prealloc preblock preblocker -prestart pricefeed printenv privkey @@ -508,7 +510,6 @@ PROMETHEUSSERVERADDRESS promhttp promlinter promserver -promtail protoc protocgen protoiface @@ -564,14 +565,6 @@ slashingkeeper slashingmodulev slashingtypes SLf -connectabci -connectabcimocks -connectabcitypes -slinkyd -connectgrpc -slinkyhttp -slinkymath -connecttypes SMOLE solana solanago @@ -628,7 +621,6 @@ topbar tparallel tprteaching tpt -traefik trimpath tsql tuu @@ -659,7 +651,6 @@ upgradekeeper upgrademodulev upgradetypes upserts -upstreams USAPI usd USDCBTC diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2eb3a7ac7..a34074a2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Slinky docker images +name: Build Connect docker images on: push: paths-ignore: @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - image: [{file: "connect.e2e.Dockerfile", name: "connect-simapp"}, {file: "slinky.sidecar.prod.Dockerfile", name: "slinky-sidecar"}, {file: "connect.sidecar.prod.Dockerfile", name: "connect-sidecar"}, {file: "connect.local.Dockerfile", name: "connect-testapp"}] + image: [{file: "connect.e2e.Dockerfile", name: "connect-simapp"}, {file: "connect.sidecar.prod.Dockerfile", name: "connect-sidecar"}, {file: "connect.local.Dockerfile", name: "connect-testapp"}] runs-on: ubuntu-latest-m permissions: contents: read diff --git a/.gitignore b/.gitignore index 8fe2f3de2..8311cdf55 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ go.work* # Testing script folders -/tests/.slinkyd /tests/.connectd # build dir @@ -30,7 +29,7 @@ go.work* run.go -/tests/e2e/.slinky-e2e-testnet-* +/tests/e2e/.connect-e2e-testnet-* # ide .idea/* diff --git a/Makefile b/Makefile index d89ae866e..9b81bef5d 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,6 @@ stop-sidecar-dev: install: tidy @go install -ldflags="$(BUILD_TAGS)" -mod=readonly ./cmd/connect - @cp $(BIN_DIR)/connect $(BIN_DIR)/slinky .PHONY: build install run-oracle-client start-all-dev stop-all-dev diff --git a/abci/proposals/proposals.go b/abci/proposals/proposals.go index 2ee3df8be..7039c4803 100644 --- a/abci/proposals/proposals.go +++ b/abci/proposals/proposals.go @@ -104,14 +104,14 @@ func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { ) startTime := time.Now() - // report the slinky specific PrepareProposal latency + // report the connect specific PrepareProposal latency defer func() { totalLatency := time.Since(startTime) h.logger.Debug( "recording handle time metrics of prepare-proposal (seconds)", "total latency", totalLatency.Seconds(), "wrapped prepare proposal latency", wrappedPrepareProposalLatency.Seconds(), - "slinky prepare proposal latency", (totalLatency - wrappedPrepareProposalLatency).Seconds(), + "connect prepare proposal latency", (totalLatency - wrappedPrepareProposalLatency).Seconds(), ) connectabci.RecordLatencyAndStatus(h.metrics, totalLatency-wrappedPrepareProposalLatency, err, servicemetrics.PrepareProposal) @@ -265,7 +265,7 @@ func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { "recording handle time metrics of process-proposal (seconds)", "total latency", totalLatency.Seconds(), "wrapped prepare proposal latency", wrappedProcessProposalLatency.Seconds(), - "slinky prepare proposal latency", (totalLatency - wrappedProcessProposalLatency).Seconds(), + "connect prepare proposal latency", (totalLatency - wrappedProcessProposalLatency).Seconds(), ) connectabci.RecordLatencyAndStatus(h.metrics, totalLatency-wrappedProcessProposalLatency, err, servicemetrics.ProcessProposal) }() diff --git a/abci/types/errors.go b/abci/types/errors.go index 25108e13c..39aab091f 100644 --- a/abci/types/errors.go +++ b/abci/types/errors.go @@ -19,7 +19,7 @@ func (e NilRequestError) Label() string { return "NilRequestError" } -// WrappedHandlerError is an error that is returned when a handler that is wrapped by a Slinky ABCI handler +// WrappedHandlerError is an error that is returned when a handler that is wrapped by a Connect ABCI handler // returns an error. type WrappedHandlerError struct { Handler servicemetrics.ABCIMethod diff --git a/abci/types/interfaces.go b/abci/types/interfaces.go index 917750fe2..826de1353 100644 --- a/abci/types/interfaces.go +++ b/abci/types/interfaces.go @@ -21,7 +21,7 @@ type OracleKeeper interface { //golint:ignore SetPriceForCurrencyPair(ctx sdk.Context, cp connecttypes.CurrencyPair, qp oracletypes.QuotePrice) error } -// OracleClient defines the interface that must be fulfilled by the slinky client. +// OracleClient defines the interface that must be fulfilled by the connect client. // This interface is utilized by the vote extension handler to fetch prices. type OracleClient interface { Prices(ctx context.Context, in *servertypes.QueryPricesRequest, opts ...grpc.CallOption) (*servertypes.QueryPricesResponse, error) diff --git a/abci/ve/README.md b/abci/ve/README.md index dd0ac9f0f..dc677de2a 100644 --- a/abci/ve/README.md +++ b/abci/ve/README.md @@ -4,7 +4,8 @@ ## Overview -Each validator in the network running the slinky module either runs an oracle in process or out of process. In either case, the oracle is responsible for fetching data offchain that will include the validator's vote extension, broadcast to the network, included in a block, and subsequently committed on-chain. +Each validator in the network running the connect module either runs an oracle in process or out of process. In either +case, the oracle is responsible for fetching data offchain that will include the validator's vote extension, broadcast to the network, included in a block, and subsequently committed on-chain. The process of fetching data offchain and broadcasting it to the network is handled by the vote extension handlers. Note, when a validator broadcasts their vote extensions, they will only be available to other validators in the network at the next height. This means that oracle prices are always one height behind. diff --git a/cmd/connect/config/config.go b/cmd/connect/config/config.go index b9d725f54..96f7a3efd 100644 --- a/cmd/connect/config/config.go +++ b/cmd/connect/config/config.go @@ -16,19 +16,19 @@ import ( ) const ( - // DefaultUpdateInterval is the default value for how frequently slinky updates aggregate price responses. + // DefaultUpdateInterval is the default value for how frequently connect updates aggregate price responses. DefaultUpdateInterval = 250000000 - // DefaultMaxPriceAge is the default value for the oldest price considered in an aggregate price response by slinky. + // DefaultMaxPriceAge is the default value for the oldest price considered in an aggregate price response by connect. DefaultMaxPriceAge = 120000000000 - // DefaultPrometheusServerAddress is the default value for the prometheus server address in slinky. + // DefaultPrometheusServerAddress is the default value for the prometheus server address in connect. DefaultPrometheusServerAddress = "0.0.0.0:8002" - // DefaultMetricsEnabled is the default value for enabling prometheus metrics in slinky. + // DefaultMetricsEnabled is the default value for enabling prometheus metrics in connect. DefaultMetricsEnabled = true // DefaultTelemetryDisabled is the default value for disabling telemetry. DefaultTelemetryDisabled = false - // DefaultHost is the default for the slinky oracle server host. + // DefaultHost is the default for the connect oracle server host. DefaultHost = "0.0.0.0" - // DefaultPort is the default for the slinky oracle server port. + // DefaultPort is the default for the connect oracle server port. DefaultPort = "8080" // jsonFieldDelimiter is the delimiter used to separate fields in the JSON output. jsonFieldDelimiter = "." @@ -38,7 +38,7 @@ const ( TelemetryPushAddress = "connect-statsd-data.dev.skip.money:9125" ) -// DefaultOracleConfig returns the default configuration for the slinky oracle. +// DefaultOracleConfig returns the default configuration for the connect oracle. func DefaultOracleConfig() config.OracleConfig { cfg := config.OracleConfig{ UpdateInterval: DefaultUpdateInterval, diff --git a/cmd/connect/config/config_test.go b/cmd/connect/config/config_test.go index 1412ac47f..a059a6835 100644 --- a/cmd/connect/config/config_test.go +++ b/cmd/connect/config/config_test.go @@ -290,7 +290,7 @@ func TestReadOracleConfigWithOverrides(t *testing.T) { t.Run("overriding variables via config", func(t *testing.T) { // create a temp file in the current directory - tmpfile, err := os.CreateTemp("", "slinky-config-*.json") + tmpfile, err := os.CreateTemp("", "connect-config-*.json") require.NoError(t, err) defer os.Remove(tmpfile.Name()) @@ -352,7 +352,7 @@ func TestReadOracleConfigWithOverrides(t *testing.T) { t.Run("overriding a nonexistent provider via config fails", func(t *testing.T) { // create a temp file in the current directory - tmpfile, err := os.CreateTemp("", "slinky-config-*.json") + tmpfile, err := os.CreateTemp("", "connect-config-*.json") require.NoError(t, err) defer os.Remove(tmpfile.Name()) @@ -400,7 +400,7 @@ func TestReadOracleConfigWithOverrides(t *testing.T) { func TestOracleConfigWithExtraKeys(t *testing.T) { t.Run("an oracle config with extraneous keys", func(t *testing.T) { // create a temp file in the current directory - tmpfile, err := os.CreateTemp("", "slinky-config-*.json") + tmpfile, err := os.CreateTemp("", "connect-config-*.json") require.NoError(t, err) defer os.Remove(tmpfile.Name()) diff --git a/cmd/connect/main.go b/cmd/connect/main.go index 6bb5fb432..aef13ed2a 100644 --- a/cmd/connect/main.go +++ b/cmd/connect/main.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" "net/http" + //nolint: gosec _ "net/http/pprof" "os" "os/signal" - "path/filepath" "regexp" "strings" "syscall" @@ -302,11 +302,6 @@ func runOracle() error { logger := log.NewLogger(logCfg) defer logger.Sync() - // Args always include command name so this is safe - if filepath.Base(os.Args[0]) == "slinky" { - logger.Warn("the `./slinky` binary is deprecated and will be removed in a future version. please use `./connect`") - } - var cfg config.OracleConfig var err error diff --git a/contrib/images/slinky.sidecar.prod.Dockerfile b/contrib/images/slinky.sidecar.prod.Dockerfile deleted file mode 100644 index fd1158fda..000000000 --- a/contrib/images/slinky.sidecar.prod.Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM ghcr.io/skip-mev/connect-dev-base AS builder - -WORKDIR /src/connect - -COPY go.mod . - -RUN go mod download - -COPY . . - -RUN make build - -FROM gcr.io/distroless/base-debian11:debug -EXPOSE 8080 8002 - -COPY --from=builder /src/connect/build/* /usr/local/bin/ -COPY --from=builder /src/connect/scripts/deprecated-exec.sh /usr/local/bin/ - -WORKDIR /usr/local/bin/ -ENTRYPOINT [ "deprecated-exec.sh" ] -CMD [ "slinky" ] diff --git a/contrib/nomad/connect.nomad b/contrib/nomad/connect.nomad deleted file mode 100644 index 06811a5ae..000000000 --- a/contrib/nomad/connect.nomad +++ /dev/null @@ -1,289 +0,0 @@ -job "slinky-dev" { - type = "service" - datacenters = ["skip-nomad-aws-us-east-2"] - region = "global" - - namespace = "slinky-dev" - - group "sidecar" { - count = 1 - - network { - mode = "bridge" - - port "sidecar_metrics" { - to = -1 - } - } - - service { - name = "slinky-sidecar-dev-http-service" - port = "8080" - - connect { - sidecar_service {} - } - - tags = [ - "traefik.enable=true", - "traefik.consulcatalog.connect=true", - "traefik.http.routers.slinky-sidecar-dev-http-service.rule=Host(`slinky-sidecar-dev-http.skip.money`)", - "traefik.http.routers.slinky-sidecar-dev-http-service.entrypoints=http", - ] - } - - service { - name = "slinky-sidecar-dev-metrics-service" - port = "sidecar_metrics" - - tags = ["metrics", "logs.promtail=true"] - } - - service { - name = "slinky-sidecar-dev-metrics-internal-service" - port = "8002" - - connect { - sidecar_service { - proxy { - expose { - path { - path = "/metrics" - local_path_port = 8002 - protocol = "http" - listener_port = "sidecar_metrics" - } - } - } - } - } - - tags = [ - "traefik.enable=true", - "traefik.consulcatalog.connect=true", - "traefik.http.routers.slinky-sidecar-dev-metrics-service.rule=Host(`slinky-sidecar-dev-metrics.skip.money`)", - "traefik.http.routers.slinky-sidecar-dev-metrics-service.entrypoints=http", - ] - } - - service { - name = "slinky-sidecar-dev-pprof-service" - port = "6060" - - connect { - sidecar_service {} - } - - tags = [ - "traefik.enable=true", - "traefik.consulcatalog.connect=true", - "traefik.http.routers.slinky-sidecar-dev-pprof-service.rule=Host(`slinky-sidecar-dev-pprof.skip-internal.money`)", - "traefik.http.routers.slinky-sidecar-dev-pprof-service.entrypoints=internal", - ] - } - - task "sidecar" { - driver = "docker" - - config { - image = "[[ .sidecar_image ]]" - force_pull = true - entrypoint = ["slinky", "--market-config-path", "/etc/slinky/default_config/market.json"] - } - - resources { - cpu = 2000 - memory = 2048 - } - } - - } - - group "chain" { - count = 1 - - network { - mode = "bridge" - - port "chain_metrics" { - to = -1 - } - - port "app_metrics" { - to = -1 - } - } - - service { - name = "slinky-simapp-dev-rpc-service" - port = "26657" - - tags = [ - "traefik.enable=true", - "traefik.consulcatalog.connect=true", - "traefik.http.routers.slinky-simapp-dev-rpc-service.rule=Host(`slinky-simapp-dev-rpc.skip-internal.money`)", - "traefik.http.routers.slinky-simapp-dev-rpc-service.entrypoints=internal", - ] - - connect { - sidecar_service { - proxy { - upstreams { - destination_name = "slinky-sidecar-dev-http-service" - local_bind_port = 8080 - } - } - } - } - } - - service { - name = "slinky-simapp-dev-lcd-service" - port = "1317" - - connect { - sidecar_service {} - } - - tags = [ - "traefik.enable=true", - "traefik.consulcatalog.connect=true", - "traefik.http.routers.slinky-simapp-dev-lcd-service.rule=Host(`slinky-simapp-dev-lcd.skip-internal.money`)", - "traefik.http.routers.slinky-simapp-dev-lcd-service.entrypoints=internal", - ] - } - - service { - name = "slinky-simapp-dev-chain-metrics-service" - port = "chain_metrics" - - tags = ["metrics", "logs.promtail=true"] - } - - service { - name = "slinky-simapp-dev-chain-metrics-internal-service" - port = "26660" - - connect { - sidecar_service { - proxy { - expose { - path { - path = "/metrics" - local_path_port = 26660 - protocol = "http" - listener_port = "chain_metrics" - } - } - } - } - } - - tags = [ - "traefik.enable=true", - "traefik.consulcatalog.connect=true", - "traefik.http.routers.slinky-simapp-dev-chain-metrics-service.rule=Host(`slinky-simapp-dev-chain-metrics.skip.money`)", - "traefik.http.routers.slinky-simapp-dev-chain-metrics-service.entrypoints=http", - ] - } - - service { - name = "slinky-simapp-dev-app-metrics-service" - port = "app_metrics" - - tags = ["metrics", "logs.promtail=true"] - } - - service { - name = "slinky-simapp-dev-app-metrics-internal-service" - port = "8001" - - connect { - sidecar_service { - proxy { - expose { - path { - path = "/metrics" - local_path_port = 8001 - protocol = "http" - listener_port = "app_metrics" - } - } - } - } - } - - tags = [ - "traefik.enable=true", - "traefik.consulcatalog.connect=true", - "traefik.http.routers.slinky-simapp-dev-app-metrics-service.rule=Host(`slinky-simapp-dev-app-metrics.skip.money`)", - "traefik.http.routers.slinky-simapp-dev-app-metrics-service.entrypoints=http", - ] - } - - volume "data" { - type = "csi" - read_only = false - source = "slinky-simapp-dev-node-volume" - access_mode = "single-node-writer" - attachment_mode = "file-system" - } - - task "init" { - driver = "docker" - - volume_mount { - volume = "data" - destination = "/src/slinky/tests/.slinkyd" - read_only = false - } - - config { - image = "[[ .chain_image ]]" - force_pull = true - entrypoint = ["sh", "-c", "/tmp/init.sh"] - volumes = ["local/tmp/init.sh:/tmp/init.sh"] - } - - template { - data = < \ --oracle-config path/to/oracle.json diff --git a/grafana/provisioning/dashboards/chain-dashboard.json b/grafana/provisioning/dashboards/chain-dashboard.json index c422bff60..34737ffa7 100644 --- a/grafana/provisioning/dashboards/chain-dashboard.json +++ b/grafana/provisioning/dashboards/chain-dashboard.json @@ -2405,7 +2405,7 @@ ] }, "timezone": "", - "title": "Slinky Chain Dashboard", + "title": "Connect Chain Dashboard", "uid": "ddlptcu54ga9se", "version": 1, "weekStart": "" diff --git a/grafana/provisioning/dashboards/side-car-dashboard.json b/grafana/provisioning/dashboards/side-car-dashboard.json index f596f07c8..2faeca5a4 100644 --- a/grafana/provisioning/dashboards/side-car-dashboard.json +++ b/grafana/provisioning/dashboards/side-car-dashboard.json @@ -111,7 +111,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "side_car_slinky_build_info{job=~\"$job\"}", + "expr": "side_car_connect_build_info{job=~\"$job\"}", "format": "table", "instant": true, "legendFormat": "__auto", @@ -2769,7 +2769,7 @@ ] }, "timezone": "", - "title": "Slinky SideCar Dashboard", + "title": "Connect SideCar Dashboard", "uid": "cdca49ue665mocd", "version": 144, "weekStart": "" diff --git a/oracle/metrics/metrics.go b/oracle/metrics/metrics.go index c72f3ad15..09fad678f 100644 --- a/oracle/metrics/metrics.go +++ b/oracle/metrics/metrics.go @@ -32,7 +32,6 @@ const ( AggregatePricesMetricName = "aggregated_price" ProviderTickMetricName = "health_check_provider_updates_total" ProviderCountMetricName = "health_check_market_providers" - SlinkyBuildInfoMetricName = "slinky_build_info" ConnectBuildInfoMetricName = "connect_build_info" ) @@ -63,7 +62,7 @@ type Metrics interface { // to calculate the final price for a given market. AddProviderCountForMarket(pairID string, count int) - // SetConnectBuildInfo sets the build information for the Slinky binary. + // SetConnectBuildInfo sets the build information for the Connect binary. SetConnectBuildInfo() // MissingPrices sets a list of missing prices for the given aggregation tick. @@ -81,7 +80,6 @@ type OracleMetricsImpl struct { promAggregatePrices *prometheus.GaugeVec promProviderTick *prometheus.CounterVec promProviderCount *prometheus.GaugeVec - promSlinkyBuildInfo *prometheus.GaugeVec promConnectBuildInfo *prometheus.GaugeVec statsdClient statsd.ClientInterface nodeIdentifier string @@ -157,11 +155,6 @@ func NewMetrics(statsdClient statsd.ClientInterface, nodeIdentifier string) Metr Name: ProviderCountMetricName, Help: "Number of providers that were utilized to calculate the final price for a given market.", }, []string{PairIDLabel}) - ret.promSlinkyBuildInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: OracleSubsystem, - Name: SlinkyBuildInfoMetricName, - Help: "(Deprecated) Information about the slinky build", - }, []string{Version}) ret.promConnectBuildInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: OracleSubsystem, Name: ConnectBuildInfoMetricName, @@ -174,7 +167,6 @@ func NewMetrics(statsdClient statsd.ClientInterface, nodeIdentifier string) Metr prometheus.MustRegister(ret.promAggregatePrices) prometheus.MustRegister(ret.promProviderTick) prometheus.MustRegister(ret.promProviderCount) - prometheus.MustRegister(ret.promSlinkyBuildInfo) prometheus.MustRegister(ret.promConnectBuildInfo) return &ret @@ -313,9 +305,6 @@ func (m *OracleMetricsImpl) GetMissingPrices() []string { // SetConnectBuildInfo sets the build information for the Connect binary. The version exported // is determined by the build time version in accordance with the build pkg. func (m *OracleMetricsImpl) SetConnectBuildInfo() { - m.promSlinkyBuildInfo.With(prometheus.Labels{ - Version: build.Build, - }).Set(1) m.promConnectBuildInfo.With(prometheus.Labels{ Version: build.Build, }).Set(1) diff --git a/pkg/http/round_tripper_with_headers.go b/pkg/http/round_tripper_with_headers.go index 8602db78f..424678d3d 100644 --- a/pkg/http/round_tripper_with_headers.go +++ b/pkg/http/round_tripper_with_headers.go @@ -17,9 +17,9 @@ const ( // HeaderOption is a function that sets a (key, value) pair in the headers map. type HeaderOption func(map[string]string) -func WithSlinkyVersionUserAgent() HeaderOption { +func WithConnectVersionUserAgent() HeaderOption { return func(header map[string]string) { - header[UserAgentHeaderKey] = fmt.Sprintf("slinky/%s", build.Build) + header[UserAgentHeaderKey] = fmt.Sprintf("connect/%s", build.Build) } } diff --git a/pkg/http/round_tripper_with_headers_test.go b/pkg/http/round_tripper_with_headers_test.go index fd893ab21..1103c97e2 100644 --- a/pkg/http/round_tripper_with_headers_test.go +++ b/pkg/http/round_tripper_with_headers_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - slinkyhttp "github.com/skip-mev/connect/v2/pkg/http" + connecthttp "github.com/skip-mev/connect/v2/pkg/http" ) func TestRoundTripperWithHeaders(t *testing.T) { @@ -19,7 +19,7 @@ func TestRoundTripperWithHeaders(t *testing.T) { expectedHeaderFields: expectedHeaderFields, } - rtWithHeaders := slinkyhttp.NewRoundTripperWithHeaders(rt, slinkyhttp.WithAuthentication("X-Api-Key", "test")) + rtWithHeaders := connecthttp.NewRoundTripperWithHeaders(rt, connecthttp.WithAuthentication("X-Api-Key", "test")) client := &http.Client{ Transport: rtWithHeaders, diff --git a/providers/apis/defi/raydium/client.go b/providers/apis/defi/raydium/client.go index 414918aae..d636b4e04 100644 --- a/providers/apis/defi/raydium/client.go +++ b/providers/apis/defi/raydium/client.go @@ -11,7 +11,7 @@ import ( "github.com/gagliardetto/solana-go/rpc/jsonrpc" "github.com/skip-mev/connect/v2/oracle/config" - slinkyhttp "github.com/skip-mev/connect/v2/pkg/http" + connecthttp "github.com/skip-mev/connect/v2/pkg/http" "github.com/skip-mev/connect/v2/providers/base/api/metrics" ) @@ -94,17 +94,17 @@ func (c *JSONRPCClient) GetMultipleAccountsWithOpts( // solanaClientFromEndpoint creates a new SolanaJSONRPCClient from an endpoint. func solanaClientFromEndpoint(endpoint config.Endpoint) (*rpc.Client, error) { - opts := []slinkyhttp.HeaderOption{ - slinkyhttp.WithSlinkyVersionUserAgent(), + opts := []connecthttp.HeaderOption{ + connecthttp.WithConnectVersionUserAgent(), } // if authentication is enabled if endpoint.Authentication.Enabled() { // add authentication header - opts = append(opts, slinkyhttp.WithAuthentication(endpoint.Authentication.APIKeyHeader, endpoint.Authentication.APIKey)) + opts = append(opts, connecthttp.WithAuthentication(endpoint.Authentication.APIKeyHeader, endpoint.Authentication.APIKey)) } - transport := slinkyhttp.NewRoundTripperWithHeaders(http.DefaultTransport, opts...) + transport := connecthttp.NewRoundTripperWithHeaders(http.DefaultTransport, opts...) client := rpc.NewWithCustomRPCClient(jsonrpc.NewClientWithOpts(endpoint.URL, &jsonrpc.RPCClientOpts{ HTTPClient: &http.Client{ diff --git a/providers/apis/dydx/parse.go b/providers/apis/dydx/parse.go index b805c173e..fecf4fe27 100644 --- a/providers/apis/dydx/parse.go +++ b/providers/apis/dydx/parse.go @@ -51,7 +51,7 @@ var ProviderMapping = map[string]string{ coinmarketcap.Name: coinmarketcap.Name, } -// ConvertMarketParamsToMarketMap converts a dYdX market params response to a slinky market map response. +// ConvertMarketParamsToMarketMap converts a dYdX market params response to a connect market map response. func ConvertMarketParamsToMarketMap( params dydxtypes.QueryAllMarketParamsResponse, ) (mmtypes.MarketMapResponse, error) { @@ -137,7 +137,7 @@ func ConvertExchangeConfigJSON( } seen[cfg] = struct{}{} - // This means we have seen an exchange that slinky cannot support. + // This means we have seen an exchange that connect cannot support. exchange, ok := ProviderMapping[cfg.ExchangeName] if !ok { continue diff --git a/providers/websockets/binance/messages.go b/providers/websockets/binance/messages.go index b2562bb62..0e3b31337 100644 --- a/providers/websockets/binance/messages.go +++ b/providers/websockets/binance/messages.go @@ -6,7 +6,7 @@ import ( "math" "strings" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -221,7 +221,7 @@ func (h *WebSocketHandler) NewSubscribeRequestMessage(instruments []string) ([]h for i := 0; i < numBatches; i++ { // Get the instruments for the batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) batch := instruments[start:end] // Create the subscriptions for the instruments. diff --git a/providers/websockets/bybit/messages.go b/providers/websockets/bybit/messages.go index 4f6682c88..29e3e2521 100644 --- a/providers/websockets/bybit/messages.go +++ b/providers/websockets/bybit/messages.go @@ -5,7 +5,7 @@ import ( "fmt" "math" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -66,7 +66,7 @@ func (h *WebSocketHandler) NewSubscriptionRequestMessage(tickers []string) ([]ha for i := 0; i < numBatches; i++ { // Get the tickers for the batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numTickers) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numTickers) // Create the message for the tickers. bz, err := json.Marshal( diff --git a/providers/websockets/coinbase/messages.go b/providers/websockets/coinbase/messages.go index 23c0f29e6..a0cfbd37c 100644 --- a/providers/websockets/coinbase/messages.go +++ b/providers/websockets/coinbase/messages.go @@ -5,7 +5,7 @@ import ( "fmt" "math" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -132,7 +132,7 @@ func (h *WebSocketHandler) NewSubscribeRequestMessage(instruments []string) ([]h for i := 0; i < numBatches; i++ { // Get the instruments for the batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) bz, err := json.Marshal(SubscribeRequestMessage{ Type: string(SubscribeMessage), diff --git a/providers/websockets/cryptodotcom/messages.go b/providers/websockets/cryptodotcom/messages.go index 31c14b0eb..c417fde5b 100644 --- a/providers/websockets/cryptodotcom/messages.go +++ b/providers/websockets/cryptodotcom/messages.go @@ -5,7 +5,7 @@ import ( "fmt" "math" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -107,7 +107,7 @@ func (h *WebSocketHandler) NewInstrumentMessage(instruments []string) ([]handler for i := 0; i < numBatches; i++ { // Get the instruments for the batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) bz, err := json.Marshal(InstrumentRequestMessage{ Method: string(InstrumentMethod), diff --git a/providers/websockets/gate/messages.go b/providers/websockets/gate/messages.go index 6a318daa9..068332d92 100644 --- a/providers/websockets/gate/messages.go +++ b/providers/websockets/gate/messages.go @@ -7,7 +7,7 @@ import ( "math" "time" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -112,7 +112,7 @@ func (h *WebSocketHandler) NewSubscribeRequest(symbols []string) ([]handlers.Web for i := 0; i < numBatches; i++ { // Get the symbols for the batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numSymbols) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numSymbols) bz, err := json.Marshal(SubscribeRequest{ BaseMessage: BaseMessage{ diff --git a/providers/websockets/kraken/messages.go b/providers/websockets/kraken/messages.go index c09cc8287..99efa99cb 100644 --- a/providers/websockets/kraken/messages.go +++ b/providers/websockets/kraken/messages.go @@ -5,7 +5,7 @@ import ( "fmt" "math" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -173,7 +173,7 @@ func (h *WebSocketHandler) NewSubscribeRequestMessage( for i := 0; i < numBatches; i++ { // Get the instruments for the batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) bz, err := json.Marshal( SubscribeRequestMessage{ diff --git a/providers/websockets/kucoin/messages.go b/providers/websockets/kucoin/messages.go index 0aed30578..2b2e81ff7 100644 --- a/providers/websockets/kucoin/messages.go +++ b/providers/websockets/kucoin/messages.go @@ -7,7 +7,7 @@ import ( "strings" "time" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -157,7 +157,7 @@ func (h *WebSocketHandler) NewSubscribeRequestMessage( for i := 0; i < numBatches; i++ { // Get the instruments for this batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) // Create the topic for this batch. topic := fmt.Sprintf("%s%s", TickerTopic, strings.Join(instruments[start:end], ",")) diff --git a/providers/websockets/mexc/messages.go b/providers/websockets/mexc/messages.go index 63924facd..5bbc030ee 100644 --- a/providers/websockets/mexc/messages.go +++ b/providers/websockets/mexc/messages.go @@ -5,7 +5,7 @@ import ( "fmt" "math" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -96,7 +96,7 @@ func (h *WebSocketHandler) NewSubscribeRequestMessage(instruments []string) ([]h for i := 0; i < numBatches; i++ { // Get the instruments for this batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) bz, err := json.Marshal(SubscriptionRequestMessage{ Method: string(SubscriptionMethod), diff --git a/providers/websockets/okx/messages.go b/providers/websockets/okx/messages.go index 1ef8b3ee1..eada7a839 100644 --- a/providers/websockets/okx/messages.go +++ b/providers/websockets/okx/messages.go @@ -5,7 +5,7 @@ import ( "fmt" "math" - slinkymath "github.com/skip-mev/connect/v2/pkg/math" + connectmath "github.com/skip-mev/connect/v2/pkg/math" "github.com/skip-mev/connect/v2/providers/base/websocket/handlers" ) @@ -108,7 +108,7 @@ func (h *WebSocketHandler) NewSubscribeToTickersRequestMessage( for i := 0; i < numBatches; i++ { // Get the instruments for this batch. start := i * h.ws.MaxSubscriptionsPerBatch - end := slinkymath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) + end := connectmath.Min((i+1)*h.ws.MaxSubscriptionsPerBatch, numInstruments) bz, err := json.Marshal( SubscribeRequestMessage{ diff --git a/scripts/protocgen-pulsar.sh b/scripts/protocgen-pulsar.sh index 98b4df326..a41bc1041 100644 --- a/scripts/protocgen-pulsar.sh +++ b/scripts/protocgen-pulsar.sh @@ -13,7 +13,7 @@ echo "Cleaning API directory" (cd api; find ./ -type f \( -iname \*.pulsar.go -o -iname \*.pb.go -o -iname \*.cosmos_orm.go -o -iname \*.pb.gw.go \) -delete; find . -empty -type d -delete; cd ..) echo "Generating API module" -(cd proto; buf generate --template buf.gen.pulsar.yaml --exclude-path slinky/service --exclude-path connect/service) +(cd proto; buf generate --template buf.gen.pulsar.yaml --exclude-path connect/service) echo "fixing types.pulsar.go" sed -i.bak 's|cosmossdk.io/api/connect/types/v2|github.com/skip-mev/connect/v2/api/connect/types/v2|g' ./api/connect/types/v2/currency_pair.pulsar.go && rm ./api/connect/types/v2/currency_pair.pulsar.go.bak diff --git a/service/metrics/README.md b/service/metrics/README.md index 8ee4da810..eddd774a4 100644 --- a/service/metrics/README.md +++ b/service/metrics/README.md @@ -22,7 +22,7 @@ The following metrics are registered to the Cosmos SDK metrics port (default :26 * **purpose** * This prometheus histogram measures the latency (per request) in seconds of ABCI method calls - * The latency is measured over all slinky-specific code, and ignores any down-stream dependencies + * The latency is measured over all connect-specific code, and ignores any down-stream dependencies * **labels** * `method`: one of (ExtendVote, PrepareProposal, ProcessProposal, VerifyVoteExtension, FinalizeBlock), this is the ABCI method that this latency report resulted from * `chain_id`: the chain-id of this oracle deployment @@ -40,7 +40,7 @@ The following metrics are registered to the Cosmos SDK metrics port (default :26 ## `message_size` * **purpose** - * This prometheus histogram tracks the size of vote-extensions, and extended commits that slinky is transmitting + * This prometheus histogram tracks the size of vote-extensions, and extended commits that connect is transmitting * **labels** * `chain_id`: the chain-id of this oracle deployment * `message_type`: the message-type whose size is being measured diff --git a/service/metrics/types.go b/service/metrics/types.go index 0d8754095..b60e62862 100644 --- a/service/metrics/types.go +++ b/service/metrics/types.go @@ -29,7 +29,7 @@ func StatusFromError(err error) Labeller { return Failure{} } -// MessageType is an identifier used to represent the different types of data that is transmitted between validators in Slinky. +// MessageType is an identifier used to represent the different types of data that is transmitted between validators in Connect. // This ID is used to paginate metrics corresponding to these messages. type MessageType int diff --git a/tests/integration/slinky_ccv_suite.go b/tests/integration/connect_ccv_suite.go similarity index 100% rename from tests/integration/slinky_ccv_suite.go rename to tests/integration/connect_ccv_suite.go diff --git a/tests/integration/slinky_integration_test.go b/tests/integration/connect_integration_test.go similarity index 91% rename from tests/integration/slinky_integration_test.go rename to tests/integration/connect_integration_test.go index 8662b96ac..350644533 100644 --- a/tests/integration/slinky_integration_test.go +++ b/tests/integration/connect_integration_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/skip-mev/connect/tests/integration/v2" + marketmapmodule "github.com/skip-mev/connect/v2/x/marketmap" "github.com/skip-mev/connect/v2/x/oracle" ) @@ -111,20 +112,20 @@ var ( } ) -func TestSlinkyOracleIntegration(t *testing.T) { +func TestConnectOracleIntegration(t *testing.T) { baseSuite := integration.NewConnectIntegrationSuite( spec, oracleImage, ) - suite.Run(t, integration.NewSlinkyOracleIntegrationSuite(baseSuite)) + suite.Run(t, integration.NewConnectOracleIntegrationSuite(baseSuite)) } -func TestSlinkyOracleValidatorIntegration(t *testing.T) { +func TestConnectOracleValidatorIntegration(t *testing.T) { baseSuite := integration.NewConnectIntegrationSuite( spec, oracleImage, ) - suite.Run(t, integration.NewSlinkyOracleValidatorIntegrationSuite(baseSuite)) + suite.Run(t, integration.NewConnectOracleValidatorIntegrationSuite(baseSuite)) } diff --git a/tests/integration/slinky_setup.go b/tests/integration/connect_setup.go similarity index 98% rename from tests/integration/slinky_setup.go rename to tests/integration/connect_setup.go index 5f04b6725..140e4e011 100644 --- a/tests/integration/slinky_setup.go +++ b/tests/integration/connect_setup.go @@ -56,12 +56,12 @@ var ( ) ) -// ChainConstructor returns the chain that will be using slinky, as well as any additional chains +// ChainConstructor returns the chain that will be using connect, as well as any additional chains // that are needed for the test. The first chain returned will be the chain that is used in the -// slinky integration tests. +// connect integration tests. type ChainConstructor func(t *testing.T, spec *interchaintest.ChainSpec) []*cosmos.CosmosChain -// Interchain is an interface representing the set of chains that are used in the slinky e2e tests, as well +// Interchain is an interface representing the set of chains that are used in the connect e2e tests, as well // as any additional relayer / ibc-path information type Interchain interface { Relayer() ibc.Relayer @@ -69,11 +69,11 @@ type Interchain interface { IBCPath() string } -// InterchainConstructor returns an interchain that will be used in the slinky integration tests. +// InterchainConstructor returns an interchain that will be used in the connect integration tests. // The chains used in the interchain constructor should be the chains constructed via the ChainConstructor type InterchainConstructor func(ctx context.Context, t *testing.T, chains []*cosmos.CosmosChain) Interchain -// DefaultChainConstructor is the default construct of a chan that will be used in the slinky +// DefaultChainConstructor is the default construct of a chan that will be used in the connect // integration tests. There is only a single chain that is created. func DefaultChainConstructor(t *testing.T, spec *interchaintest.ChainSpec) []*cosmos.CosmosChain { // require that NumFullNodes == NumValidators == 4 @@ -94,7 +94,7 @@ func DefaultChainConstructor(t *testing.T, spec *interchaintest.ChainSpec) []*co return []*cosmos.CosmosChain{cosmosChain} } -// DefaultInterchainConstructor is the default constructor of an interchain that will be used in the slinky. +// DefaultInterchainConstructor is the default constructor of an interchain that will be used in the connect. func DefaultInterchainConstructor(ctx context.Context, t *testing.T, chains []*cosmos.CosmosChain) Interchain { require.Len(t, chains, 1) diff --git a/tests/integration/slinky_suite.go b/tests/integration/connect_suite.go similarity index 98% rename from tests/integration/slinky_suite.go rename to tests/integration/connect_suite.go index 766696612..f71f20db3 100644 --- a/tests/integration/slinky_suite.go +++ b/tests/integration/connect_suite.go @@ -327,17 +327,17 @@ func (s *ConnectIntegrationSuite) SetupTest() { } } -type SlinkyOracleIntegrationSuite struct { +type ConnectOracleIntegrationSuite struct { *ConnectIntegrationSuite } -func NewSlinkyOracleIntegrationSuite(suite *ConnectIntegrationSuite) *SlinkyOracleIntegrationSuite { - return &SlinkyOracleIntegrationSuite{ +func NewConnectOracleIntegrationSuite(suite *ConnectIntegrationSuite) *ConnectOracleIntegrationSuite { + return &ConnectOracleIntegrationSuite{ ConnectIntegrationSuite: suite, } } -func (s *SlinkyOracleIntegrationSuite) TestOracleModule() { +func (s *ConnectOracleIntegrationSuite) TestOracleModule() { // query the oracle module grpc service for any CurrencyPairs s.Run("QueryCurrencyPairs - no currency-pairs reported", func() { resp, err := QueryCurrencyPairs(s.chain) @@ -379,7 +379,7 @@ func translateGRPCAddr(chain *cosmos.CosmosChain) string { return chain.GetGRPCAddress() } -func (s *SlinkyOracleIntegrationSuite) TestNodeFailures() { +func (s *ConnectOracleIntegrationSuite) TestNodeFailures() { ethusdcCP := connecttypes.NewCurrencyPair("ETH", "USDC") s.Require().NoError(s.AddCurrencyPairs(s.chain, s.user, 1.1, []connecttypes.CurrencyPair{ @@ -577,7 +577,7 @@ func (s *SlinkyOracleIntegrationSuite) TestNodeFailures() { }) } -func (s *SlinkyOracleIntegrationSuite) TestMultiplePriceFeeds() { +func (s *ConnectOracleIntegrationSuite) TestMultiplePriceFeeds() { ethusdcCP := connecttypes.NewCurrencyPair("ETH", "USDC") ethusdtCP := connecttypes.NewCurrencyPair("ETH", "USDT") ethusdCP := connecttypes.NewCurrencyPair("ETH", "USD") diff --git a/tests/integration/slinky_validator_suite.go b/tests/integration/connect_validator_suite.go similarity index 91% rename from tests/integration/slinky_validator_suite.go rename to tests/integration/connect_validator_suite.go index de5c1b288..e56ff4fb1 100644 --- a/tests/integration/slinky_validator_suite.go +++ b/tests/integration/connect_validator_suite.go @@ -13,17 +13,17 @@ import ( oracletypes "github.com/skip-mev/connect/v2/x/oracle/types" ) -type SlinkyOracleValidatorIntegrationSuite struct { +type ConnectOracleValidatorIntegrationSuite struct { *ConnectIntegrationSuite } -func NewSlinkyOracleValidatorIntegrationSuite(suite *ConnectIntegrationSuite) *SlinkyOracleValidatorIntegrationSuite { - return &SlinkyOracleValidatorIntegrationSuite{ +func NewConnectOracleValidatorIntegrationSuite(suite *ConnectIntegrationSuite) *ConnectOracleValidatorIntegrationSuite { + return &ConnectOracleValidatorIntegrationSuite{ ConnectIntegrationSuite: suite, } } -func (s *SlinkyOracleValidatorIntegrationSuite) TestUnbonding() { +func (s *ConnectOracleValidatorIntegrationSuite) TestUnbonding() { // Set up some price feeds ethusdcCP := connecttypes.NewCurrencyPair("ETH", "USDC") ethusdtCP := connecttypes.NewCurrencyPair("ETH", "USDT") diff --git a/tests/integration/consumer.go b/tests/integration/consumer.go index 6ddbb86f9..42e3889c7 100644 --- a/tests/integration/consumer.go +++ b/tests/integration/consumer.go @@ -80,7 +80,7 @@ func CCVInterchainConstructor(ctx context.Context, t *testing.T, chains []*cosmo zaptest.NewLogger(t), ).Build(t, client, network) - path := "slinky-ibc-path" + path := "connect-ibc-path" // create the interchain ic := interchaintest.NewInterchain(). AddChain(chains[0]). diff --git a/tests/petri/chain_config.go b/tests/petri/chain_config.go index b3d931241..75dd0e5b1 100644 --- a/tests/petri/chain_config.go +++ b/tests/petri/chain_config.go @@ -75,7 +75,7 @@ func GetProvider(ctx context.Context, logger *zap.Logger) (provider.Provider, er return docker.NewDockerProvider( ctx, logger, - "slinky-docker", + "connect-docker", ) } diff --git a/tests/petri/slinky_suite.go b/tests/petri/connect_suite.go similarity index 59% rename from tests/petri/slinky_suite.go rename to tests/petri/connect_suite.go index 5eb0521d6..b7c3434e1 100644 --- a/tests/petri/slinky_suite.go +++ b/tests/petri/connect_suite.go @@ -8,8 +8,8 @@ import ( "go.uber.org/zap" ) -// SlinkyIntegrationSuite is the testify suite for building and running slinky testapp networks using petri -type SlinkyIntegrationSuite struct { +// ConnectIntegrationSuite is the testify suite for building and running connect testapp networks using petri +type ConnectIntegrationSuite struct { suite.Suite logger *zap.Logger @@ -19,13 +19,13 @@ type SlinkyIntegrationSuite struct { chain petritypes.ChainI } -func NewSlinkyIntegrationSuite(spec *petritypes.ChainConfig) *SlinkyIntegrationSuite { - return &SlinkyIntegrationSuite{ +func NewConnectIntegrationSuite(spec *petritypes.ChainConfig) *ConnectIntegrationSuite { + return &ConnectIntegrationSuite{ spec: spec, } } -func (s *SlinkyIntegrationSuite) SetupSuite() { +func (s *ConnectIntegrationSuite) SetupSuite() { // create the logger var err error s.logger, err = zap.NewDevelopment() @@ -40,13 +40,13 @@ func (s *SlinkyIntegrationSuite) SetupSuite() { s.Require().NoError(err) } -func (s *SlinkyIntegrationSuite) TearDownSuite() { +func (s *ConnectIntegrationSuite) TearDownSuite() { err := s.chain.Teardown(context.Background()) s.Require().NoError(err) } -// TestSlinkyIntegration waits for the chain to reach height 5 -func (s *SlinkyIntegrationSuite) TestSlinkyIntegration() { +// TestConnectIntegration waits for the chain to reach height 5 +func (s *ConnectIntegrationSuite) TestConnectIntegration() { err := s.chain.WaitForHeight(context.Background(), 5) s.Require().NoError(err) } diff --git a/tests/petri/connect_test.go b/tests/petri/connect_test.go new file mode 100644 index 000000000..1f3076921 --- /dev/null +++ b/tests/petri/connect_test.go @@ -0,0 +1,15 @@ +package petri_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/skip-mev/connect/v2/tests/petri" +) + +// TestConnectIntegration runs all petri connect testapp tests +func TestConnectIntegration(t *testing.T) { + chainCfg := petri.GetChainConfig() + suite.Run(t, petri.NewConnectIntegrationSuite(&chainCfg)) +} diff --git a/tests/petri/slinky_test.go b/tests/petri/slinky_test.go deleted file mode 100644 index aab2db30f..000000000 --- a/tests/petri/slinky_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package petri_test - -import ( - "testing" - - "github.com/stretchr/testify/suite" - - "github.com/skip-mev/connect/v2/tests/petri" -) - -// TestSlinkyIntegration runs all of the petri slinky testapp tests -func TestSlinkyIntegration(t *testing.T) { - chainCfg := petri.GetChainConfig() - suite.Run(t, petri.NewSlinkyIntegrationSuite(&chainCfg)) -} diff --git a/x/marketmap/types/keys.go b/x/marketmap/types/keys.go index 85700ed5b..bcb4e7a49 100644 --- a/x/marketmap/types/keys.go +++ b/x/marketmap/types/keys.go @@ -30,5 +30,5 @@ var ( ) // TickerString is the key used to identify unique pairs of Base/Quote with corresponding PathsConfig objects--or in other words AggregationConfigs. -// The TickerString is identical to Slinky's CurrencyPair.String() output in that it is `Base` and `Quote` joined by `/` i.e. `$BASE/$QUOTE`. +// The TickerString is identical to Connect's CurrencyPair.String() output in that it is `Base` and `Quote` joined by `/` i.e. `$BASE/$QUOTE`. type TickerString string