Skip to content

Commit

Permalink
Merge branch 'v0.34.x-celestia' into nina/backport-blockstore-in-exec…
Browse files Browse the repository at this point in the history
…utor
  • Loading branch information
ninabarbakadze committed Jul 2, 2024
2 parents 93a0b36 + b1d52fd commit 5487674
Show file tree
Hide file tree
Showing 113 changed files with 3,908 additions and 1,265 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# global owners are only requested if there isn't a more specific
# codeowner specified below. For this reason, the global codeowners
# are often repeated in package-level definitions.
* @evan-forbes @cmwaters @staheri14 @rach-id @ninabarbakadze @rootulp
* @celestiaorg/celestia-core

# Overrides for tooling packages
docs/celestia-architecture @liamsi @adlerjohn
4 changes: 2 additions & 2 deletions .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# steps:
# - uses: actions/setup-go@v3
# with:
# go-version: "1.19"
# go-version: "1.22.2"

# - uses: actions/checkout@v3

Expand All @@ -43,7 +43,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: "1.22.2"

- uses: actions/checkout@v4
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.22.2"
- name: Create a file with all the pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
Expand Down Expand Up @@ -45,7 +48,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.22.2"
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
Expand All @@ -67,7 +70,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.22.2"
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.22.2'

- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-nightly-34x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.22.2'

- uses: actions/checkout@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.19'
- uses: actions/checkout@v4
go-version: '1.22.2'
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.22.2'

- uses: actions/checkout@v4

Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,21 @@ on:
branches:
- v[0-9]+.[0-9]+.x-celestia

# TODO: re-enable after figuring out what needs to get fixed or if this is
# handled upstream in main
# jobs:
# govulncheck:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/setup-go@v3
# with:
# go-version: "1.19"
# - uses: actions/checkout@v3
# - uses: technote-space/get-diff-action@v6
# with:
# PATTERNS: |
# **/*.go
# go.mod
# go.sum
# Makefile
# - name: govulncheck
# run: make vulncheck
# if: "env.GIT_DIFF != ''"
jobs:
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.22.2"
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/*.go
go.mod
go.sum
Makefile
- name: govulncheck
run: make vulncheck
if: "env.GIT_DIFF != ''"
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.22.2'
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
Expand All @@ -34,7 +34,7 @@ jobs:
# Required: the version of golangci-lint is required and
# must be specified without patch version: we always use the
# latest patch version.
version: v1.50.1
version: v1.56.2
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.22.2'

# Similar check to ./release-version.yml, but enforces this when pushing
# tags. The ./release-version.yml check can be bypassed and is mainly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.22.2'

- name: Check version
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.22.2'

- name: Generate release notes
run: |
Expand All @@ -32,4 +32,3 @@ jobs:
args: release --clean --release-notes ../release_notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.19"
- uses: actions/checkout@v4
go-version: "1.22.2"
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.22.2"
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.22.2"
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
# steps:
# - uses: actions/setup-go@v3
# with:
# go-version: "1.19"
# go-version: "1.22.2"
# - uses: actions/checkout@v3
# - uses: technote-space/get-diff-action@v6
# with:
Expand Down
91 changes: 84 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
run:
skip-files:
- "libs/pubsub/query/query.peg.go"

linters:
enable:
- asciicheck
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- goconst
- gofmt
- goimports
- revive
#- revive
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
#- nakedret
- nolintlint
- prealloc
- staticcheck
Expand All @@ -31,6 +34,13 @@ issues:
- path: _test\.go
linters:
- gosec
- staticcheck
- nolintlint
- path: test/fuzz/
linters:
- gosec
- nolintlint
- staticcheck
max-same-issues: 50

linters-settings:
Expand All @@ -40,7 +50,74 @@ linters-settings:
min-confidence: 0
maligned:
suggest-new: true

run:
skip-files:
- libs/pubsub/query/query.peg.go
goconst:
ignore-tests: true
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/tendermint
- github.com/cometbft
- github.com/cosmos
- github.com/gogo
- github.com/Workiva/go-datastructures
- github.com/ChainSafe/go-schnorrkel
- github.com/creachadair/taskgroup
- github.com/gtank/merlin
- github.com/btcsuite/btcd/btcec/v2
- github.com/BurntSushi/toml
- github.com/go-git/go-git/v5
- github.com/go-kit
- github.com/go-logfmt/logfmt
- github.com/gofrs/uuid
- github.com/google
- github.com/gorilla/websocket
- github.com/informalsystems/tm-load-test/pkg/loadtest
- github.com/lib/pq
- github.com/libp2p/go-buffer-pool
- github.com/Masterminds/semver/v3
- github.com/minio/highwayhash
- github.com/oasisprotocol/curve25519-voi
- github.com/pkg/errors
- github.com/prometheus
- github.com/rcrowley/go-metrics
- github.com/rs/cors
- github.com/snikch/goodman
- github.com/spf13
- github.com/stretchr/testify/require
- github.com/syndtr/goleveldb
# celestia-core specific
- github.com/influxdata/influxdb-client-go/v2
- github.com/grafana/pyroscope-go
- github.com/grafana/otel-profiling-go
- github.com/celestiaorg/nmt
test:
files:
- "$test"
allow:
- $gostd
- github.com/cosmos
- github.com/tendermint
- github.com/cometbft
- github.com/gogo
- github.com/Workiva/go-datastructures
- github.com/ChainSafe/go-schnorrkel
- github.com/creachadair/taskgroup
- github.com/gtank/merlin
- github.com/adlio/schema
- github.com/btcsuite/btcd
- github.com/fortytw2/leaktest
- github.com/go-kit
- github.com/google/uuid
- github.com/gorilla/websocket
- github.com/lib/pq
- github.com/oasisprotocol/curve25519-voi/primitives/merlin
- github.com/ory/dockertest
- github.com/pkg/errors
- github.com/prometheus/client_golang/prometheus/promhttp
- github.com/spf13
- github.com/stretchr/testify
3 changes: 1 addition & 2 deletions DOCKER/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use a build arg to ensure that both stages use the same,
# hopefully current, go version.
ARG GOLANG_BASE_IMAGE=golang:1.19-alpine
ARG GOLANG_BASE_IMAGE=golang:1.22.4-alpine

# stage 1 Generate CometBFT Binary
FROM --platform=$BUILDPLATFORM $GOLANG_BASE_IMAGE as builder
Expand Down Expand Up @@ -58,4 +58,3 @@ CMD ["node"]

# Expose the data directory as a volume since there's mutable state in there
VOLUME [ "$CMTHOME" ]

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ endif

proto-gen: check-proto-deps
@echo "Generating Protobuf files"
@go run github.com/bufbuild/buf/cmd/buf generate
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 generate
@mv ./proto/tendermint/abci/types.pb.go ./abci/types/
@cp ./proto/tendermint/rpc/grpc/types.pb.go ./rpc/grpc
.PHONY: proto-gen
Expand All @@ -163,7 +163,7 @@ proto-gen: check-proto-deps
# execution only.
proto-lint: check-proto-deps
@echo "Linting Protobuf files"
@go run github.com/bufbuild/buf/cmd/buf lint
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 lint
.PHONY: proto-lint

proto-format: check-proto-format-deps
Expand All @@ -176,11 +176,11 @@ proto-check-breaking: check-proto-deps
@echo "Note: This is only useful if your changes have not yet been committed."
@echo " Otherwise read up on buf's \"breaking\" command usage:"
@echo " https://docs.buf.build/breaking/usage"
@go run github.com/bufbuild/buf/cmd/buf breaking --against ".git"
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 breaking --against ".git"
.PHONY: proto-check-breaking

proto-check-breaking-ci:
@go run github.com/bufbuild/buf/cmd/buf breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia
.PHONY: proto-check-breaking-ci

###############################################################################
Expand Down Expand Up @@ -259,7 +259,7 @@ format:

lint:
@echo "--> Running linter"
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run
@go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2 run
.PHONY: lint

vulncheck:
Expand Down
Loading

0 comments on commit 5487674

Please sign in to comment.