Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ jobs:
strategy:
matrix:
os: [linux, darwin]
arch: [amd64, arm64, 386]
exclude:
- os: darwin
arch: 386
arch: [amd64, arm64]

steps:
- name: Checkout code
Expand All @@ -25,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23.3"
go-version: "1.23.6"

- name: Set environment variables
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.0
go-version: 1.23.6
cache: true
cache-dependency-path: go.sum
- uses: technote-space/get-diff-action@v6.1.2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.23.0
go-version: 1.23.6
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
version: v1.63.4
only-new-issues: true
lint-markdown:
name: Lint markdown
Expand All @@ -39,11 +39,12 @@ jobs:
args: "**/*.md"
govulncheck:
runs-on: ubuntu-latest
continue-on-error: true
Comment thread
traviolus marked this conversation as resolved.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.0
go-version: 1.23.6
cache: true
cache-dependency-path: go.sum
- uses: technote-space/get-diff-action@v6.1.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.0
go-version: 1.23.6
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.0
go-version: 1.23.6
cache: true
cache-dependency-path: go.sum
- uses: technote-space/get-diff-action@v6.1.2
Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ issues:
linters-settings:
dogsled:
max-blank-identifiers: 3
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
require-explanation: false
Expand Down
5 changes: 3 additions & 2 deletions abci/strategies/currencypair/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ type DefaultCurrencyPairStrategy struct {
// NewDefaultCurrencyPairStrategy returns a new DefaultCurrencyPairStrategy instance.
func NewDefaultCurrencyPairStrategy(oracleKeeper OracleKeeper) *DefaultCurrencyPairStrategy {
strategy := &DefaultCurrencyPairStrategy{
oracleKeeper: oracleKeeper,
idCache: make(map[uint64]connecttypes.CurrencyPair, DefaultCacheInitialCapacity),
oracleKeeper: oracleKeeper,
idCache: make(map[uint64]connecttypes.CurrencyPair, DefaultCacheInitialCapacity),
previousHeight: -1,
}
return strategy
}
Expand Down
1 change: 1 addition & 0 deletions abci/strategies/currencypair/delta.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func NewDeltaCurrencyPairStrategy(oracleKeeper OracleKeeper) *DeltaCurrencyPairS
return &DeltaCurrencyPairStrategy{
DefaultCurrencyPairStrategy: NewDefaultCurrencyPairStrategy(oracleKeeper),
cache: make(map[connecttypes.CurrencyPair]*big.Int, DefaultCacheInitialCapacity),
previousHeight: -1,
}
}

Expand Down
13 changes: 7 additions & 6 deletions abci/strategies/currencypair/hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,27 @@ func TestHashCurrencyPairStrategyID(t *testing.T) {

func TestHashCurrencyPairStrategyFromID(t *testing.T) {
ok := mocks.NewOracleKeeper(t)
ctx := sdk.Context{}
ctxH1 := sdk.Context{}.WithBlockHeight(1)
ctxH2 := sdk.Context{}.WithBlockHeight(2)
strategy := strategies.NewHashCurrencyPairStrategy(ok)

t.Run("test getting currency pair for currency pair that does not exist in state", func(t *testing.T) {
ok.On("GetAllCurrencyPairs", ctx).Return([]connecttypes.CurrencyPair{}).Once()
ok.On("GetAllCurrencyPairs", ctxH1).Return([]connecttypes.CurrencyPair{}).Once()

id, err := strategies.CurrencyPairToHashID(btcusd.String())
require.NoError(t, err)

_, err = strategy.FromID(ctx, id)
_, err = strategy.FromID(ctxH1, id)
require.Error(t, err)
})

t.Run("test getting currency pair for currency pair that exists in state (no cache)", func(t *testing.T) {
ok.On("GetAllCurrencyPairs", ctx).Return([]connecttypes.CurrencyPair{btcusd}).Once()
ok.On("GetAllCurrencyPairs", ctxH2).Return([]connecttypes.CurrencyPair{btcusd}).Once()

id, err := strategies.CurrencyPairToHashID(btcusd.String())
require.NoError(t, err)

cp, err := strategy.FromID(ctx, id)
cp, err := strategy.FromID(ctxH2, id)
require.NoError(t, err)
require.Equal(t, btcusd, cp)
})
Expand All @@ -78,7 +79,7 @@ func TestHashCurrencyPairStrategyFromID(t *testing.T) {
id, err := strategies.CurrencyPairToHashID(btcusd.String())
require.NoError(t, err)

cp, err := strategy.FromID(ctx, id)
cp, err := strategy.FromID(ctxH2, id)
require.NoError(t, err)
require.Equal(t, btcusd, cp)
})
Expand Down
2 changes: 2 additions & 0 deletions contrib/images/connect.e2e.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ghcr.io/skip-mev/connect-dev-base AS builder

ENV GOTOOLCHAIN=auto

WORKDIR /src/connect

COPY go.mod .
Expand Down
2 changes: 2 additions & 0 deletions contrib/images/connect.local.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ghcr.io/skip-mev/connect-dev-base AS builder

ENV GOTOOLCHAIN=auto

WORKDIR /src/connect

COPY go.mod .
Expand Down
2 changes: 2 additions & 0 deletions contrib/images/connect.sidecar.dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ghcr.io/skip-mev/connect-dev-base AS builder

ENV GOTOOLCHAIN=auto

WORKDIR /src/connect

COPY go.mod .
Expand Down
2 changes: 2 additions & 0 deletions contrib/images/connect.sidecar.prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ghcr.io/skip-mev/connect-dev-base AS builder

ENV GOTOOLCHAIN=auto

WORKDIR /src/connect

COPY go.mod .
Expand Down
Loading
Loading