Skip to content

Commit

Permalink
chore: final slinky -> connect renames (#760)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler <[email protected]>
  • Loading branch information
aljo242 and technicallyty committed Sep 18, 2024
1 parent c922740 commit 53b22d1
Show file tree
Hide file tree
Showing 44 changed files with 114 additions and 449 deletions.
23 changes: 7 additions & 16 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,17 @@ Commitcodec
conditionaltokens
configurator
confixcmd
connectabci
connectabcimocks
connectabcitypes
connectd
connectgrpc
connecthttp
connectmath
connecttypes
consensuskeeper
consensusmodulev
consensustypes
consulcatalog
consumertypes
conventionalcommits
copyloopvar
Expand All @@ -180,7 +186,6 @@ cve
cwwv
dac
dasel
datacenters
datadog
datasources
dbddb
Expand Down Expand Up @@ -228,9 +233,7 @@ EFDDc
efdff
egs
eguhvrsnrw
entrypoints
eod
EOH
Eqcq
erc
Errf
Expand Down Expand Up @@ -500,15 +503,13 @@ postmsg
prealloc
preblock
preblocker
prestart
pricefeed
printenv
privkey
PROMETHEUSSERVERADDRESS
promhttp
promlinter
promserver
promtail
protoc
protocgen
protoiface
Expand Down Expand Up @@ -564,14 +565,6 @@ slashingkeeper
slashingmodulev
slashingtypes
SLf
connectabci
connectabcimocks
connectabcitypes
slinkyd
connectgrpc
slinkyhttp
slinkymath
connecttypes
SMOLE
solana
solanago
Expand Down Expand Up @@ -628,7 +621,6 @@ topbar
tparallel
tprteaching
tpt
traefik
trimpath
tsql
tuu
Expand Down Expand Up @@ -659,7 +651,6 @@ upgradekeeper
upgrademodulev
upgradetypes
upserts
upstreams
USAPI
usd
USDCBTC
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Slinky docker images
name: Build Connect docker images
on:
push:
paths-ignore:
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
go.work*

# Testing script folders
/tests/.slinkyd
/tests/.connectd

# build dir
/build/

run.go

/tests/e2e/.slinky-e2e-testnet-*
/tests/e2e/.connect-e2e-testnet-*

# ide
.idea/*
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions abci/proposals/proposals.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}()
Expand Down
2 changes: 1 addition & 1 deletion abci/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion abci/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion abci/ve/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions cmd/connect/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "."
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions cmd/connect/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down
7 changes: 1 addition & 6 deletions cmd/connect/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"errors"
"fmt"
"net/http"

//nolint: gosec
_ "net/http/pprof"
"os"
"os/signal"
"path/filepath"
"regexp"
"strings"
"syscall"
Expand Down Expand Up @@ -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

Expand Down
21 changes: 0 additions & 21 deletions contrib/images/slinky.sidecar.prod.Dockerfile

This file was deleted.

Loading

0 comments on commit 53b22d1

Please sign in to comment.