Skip to content

Commit

Permalink
Merge branch 'main' into chore/feemarket
Browse files Browse the repository at this point in the history
  • Loading branch information
aljo242 committed Jun 17, 2024
2 parents 7e5e030 + e776368 commit 4e4b2ef
Show file tree
Hide file tree
Showing 20 changed files with 2,544 additions and 99 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches:
- "main"
- "releases/v3.x"
- "chore/fix-ci"
pull_request:
branches:
- "main"
- "releases/v3.x"
- "chore/fix-ci"

jobs:
docker:
runs-on: self-hosted
env:
DOCKER_BUILDKIT: 1

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y jq curl git

- name: Install Go
run: |
GO_VERSION=1.22.4
curl -LO https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
source $HOME/.profile
shell: bash

- name: Download Buildx with Hydrobuilder support
run: |
ARCH=amd64
BUILDX_URL=$(curl -s https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json | jq -r ".latest.assets[] | select(endswith(\"linux-$ARCH\"))")
mkdir -vp ~/.docker/cli-plugins/
curl --silent -L --output ~/.docker/cli-plugins/docker-buildx $BUILDX_URL
chmod a+x ~/.docker/cli-plugins/docker-buildx
- name: Get version from git tags
id: get_version
run: echo "VERSION=v$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_ENV

- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "neutronorg/neutron"
install: true

# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# file: Dockerfile.builder
# tags: "${{ env.VERSION }}"
# # For pull requests, export results to the build cache.
# # Otherwise, push to a registry.
# outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry,push=true' }}

- name: Build and push Docker image
env:
VERSION: ${{ env.VERSION }}
BUILDER: ${{ steps.buildx.outputs.name }}
run: |
docker buildx use $BUILDER
make build-static-linux-amd64
docker tag neutron-amd64:latest neutronorg/neutron:${{ env.VERSION }}
docker push neutronorg/neutron:${{ env.VERSION }}
- name: Cleanup temporary container
run: docker rm -f neutronbinary || true

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/setup-go@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
tests:
name: Test
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
dispatch:
name: Dispatch Tests Workflow
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Evaluate PR Merged Status and Labels
run: |
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ build-static-linux-amd64: go.sum $(BUILDDIR)/
$(DOCKER) cp neutronbinary:/bin/neutrond $(BUILDDIR)/neutrond-linux-amd64
$(DOCKER) rm -f neutronbinary

build-slinky-e2e-docker-image: go.sum $(BUILDDIR)/
build-e2e-docker-image: go.sum $(BUILDDIR)/
$(DOCKER) buildx create --name neutronbuilder || true
$(DOCKER) buildx use neutronbuilder
$(DOCKER) buildx build \
Expand All @@ -136,7 +136,12 @@ build-slinky-e2e-docker-image: go.sum $(BUILDDIR)/
-f Dockerfile.builder .

slinky-e2e-test:
cd ./tests/slinky && go mod tidy && go test -v -race -timeout 20m -count=1 ./...
@echo "Running e2e slinky tests..."
cd ./tests/slinky && go mod tidy && go test -v -race -timeout 30m -count=1 ./...

feemarket-e2e-test:
@echo "Running e2e feemarket tests..."
@cd ./tests/feemarket && go mod tidy && go test -p 1 -v -race -timeout 30m -count=1 ./...

install-test-binary: check_version go.sum
go install -mod=readonly $(BUILD_FLAGS_TEST_BINARY) ./cmd/neutrond
Expand Down
5 changes: 5 additions & 0 deletions app/upgrades/v4.0.0/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ func enableVoteExtensions(ctx sdk.Context, consensusKeeper *consensuskeeper.Keep
return err
}

oldParams.Params.Version = &comettypes.VersionParams{App: 0}
if err := consensusKeeper.ParamsStore.Set(ctx, *oldParams.Params); err != nil {
return err
}

// we need to enable VoteExtensions for Slinky
oldParams.Params.Abci = &comettypes.ABCIParams{VoteExtensionsEnableHeight: ctx.BlockHeight() + 4}

Expand Down
7 changes: 0 additions & 7 deletions app/upgrades/v4.0.0/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,6 @@ func (suite *UpgradeTestSuite) TestDynamicFeesUpgrade() {
ctx := suite.ChainA.GetContext()
t := suite.T()

oldParams, err := app.ConsensusParamsKeeper.Params(ctx, &types.QueryParamsRequest{})
suite.Require().NoError(err)
// it is automatically tracked in upgrade handler, we need to set it manually for tests
oldParams.Params.Version = &comettypes.VersionParams{App: 0}
// we need to properly set consensus params for tests or we get a panic
suite.Require().NoError(app.ConsensusParamsKeeper.ParamsStore.Set(ctx, *oldParams.Params))

upgrade := upgradetypes.Plan{
Name: v400.UpgradeName,
Info: "some text here",
Expand Down
18 changes: 11 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ require (
github.com/prometheus/client_golang v1.19.1
github.com/rs/zerolog v1.32.0
github.com/skip-mev/block-sdk/v2 v2.1.2
github.com/skip-mev/feemarket v1.0.0
github.com/skip-mev/slinky v1.0.0
github.com/skip-mev/feemarket v1.0.3
github.com/skip-mev/slinky v1.0.1-rc
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 v2.4.0
)

Expand All @@ -62,7 +62,7 @@ require (
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-ethereum v1.14.4 // indirect
github.com/ethereum/go-ethereum v1.14.5 // indirect
github.com/gagliardetto/binary v0.8.0 // indirect
github.com/gagliardetto/solana-go v1.10.0 // indirect
github.com/gagliardetto/treeout v0.1.4 // indirect
Expand Down Expand Up @@ -104,13 +104,15 @@ require (
github.com/99designs/keyring v1.2.2 // indirect
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/GeertJohan/go.rice v1.0.3 // indirect
github.com/aws/aws-sdk-go v1.44.224 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
Expand All @@ -127,6 +129,7 @@ require (
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v1.2.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/daaku/go.zipexe v1.0.2 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand Down Expand Up @@ -162,7 +165,8 @@ require (
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.4 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gorilla/rpc v1.2.0 // indirect
github.com/gorilla/websocket v1.5.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand All @@ -182,7 +186,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
Expand Down
Loading

0 comments on commit 4e4b2ef

Please sign in to comment.