Skip to content

Commit

Permalink
Merge pull request #1439 from maticnetwork/mardizzone/pos-2821
Browse files Browse the repository at this point in the history
POS-2821: improvements
  • Loading branch information
marcello33 authored Feb 8, 2025
2 parents 44775d8 + 3150686 commit ec2d46b
Show file tree
Hide file tree
Showing 21 changed files with 941 additions and 203 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x

- name: Install dependencies on Linux
if: runner.os == 'Linux'
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x

- name: Install dependencies on Linux
if: runner.os == 'Linux'
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x

- name: Install dependencies on Linux
if: runner.os == 'Linux'
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x

- name: Install dependencies on Linux
if: runner.os == 'Linux'
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x

- name: Checkout matic-cli
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/govuln.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Govuln
on: [ push, pull_request ]

jobs:
govulncheck:
name: Run govulncheck
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.23.6"
check-latest: true
- uses: actions/checkout@v4
- 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/packager_deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.1
go-version: 1.23.6
# Variables
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
Expand Down Expand Up @@ -126,4 +126,4 @@ jobs:
prerelease: true
files: |
packaging/deb/bor**.deb
packaging/deb/bor**.deb.checksum
packaging/deb/bor**.deb.checksum
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.x
go-version: 1.23.x

- name: Prepare
id: prepare
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rpm_arm_packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.1
go-version: 1.23.6
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rpm_packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.1
go-version: 1.23.6
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v5
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ lint:

lintci-deps:
rm -f ./build/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.57.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.63.4

.PHONY: vulncheck

vulncheck:
@go run golang.org/x/vuln/cmd/govulncheck@latest ./...


goimports:
goimports -local "$(PACKAGE)" -w .
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ func TestOOMMaliciousInput(t *testing.T) {

encb, err := hex.DecodeString(test.enc)
if err != nil {
t.Fatalf("invalid hex: %s" + test.enc)
t.Fatalf("invalid hex: %s", test.enc)
}

_, err = abi.Methods["method"].Outputs.UnpackValues(encb)
Expand Down
2 changes: 1 addition & 1 deletion beacon/types/beacon_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func BlockFromJSON(forkName string, data []byte) (*BeaconBlock, error) {
case "capella":
obj = new(capella.BeaconBlock)
default:
return nil, fmt.Errorf("unsupported fork: " + forkName)
return nil, fmt.Errorf("unsupported fork: %s", forkName)
}
if err := json.Unmarshal(data, obj); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion beacon/types/exec_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func ExecutionHeaderFromJSON(forkName string, data []byte) (*ExecutionHeader, er
case "deneb":
obj = new(deneb.ExecutionPayloadHeader)
default:
return nil, fmt.Errorf("unsupported fork: " + forkName)
return nil, fmt.Errorf("unsupported fork: %s", forkName)
}
if err := json.Unmarshal(data, obj); err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions cmd/evm/t8n_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ func TestT9n(t *testing.T) {

switch {
case err != nil:
t.Logf(string(have))
t.Log(string(have))
t.Fatalf("test %d, json parsing failed: %v", i, err)
case !ok:
t.Fatalf("test %d: output wrong, have \n%v\nwant\n%v\n", i, string(have), string(want))
Expand Down Expand Up @@ -696,7 +696,7 @@ func TestB11r(t *testing.T) {

switch {
case err != nil:
t.Logf(string(have))
t.Log(string(have))
t.Fatalf("test %d, json parsing failed: %v", i, err)
case !ok:
t.Fatalf("test %d: output wrong, have \n%v\nwant\n%v\n", i, string(have), string(want))
Expand Down
2 changes: 1 addition & 1 deletion cmd/rlpdump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func dump(in *inStream, s *rlp.Stream, depth int, out io.Writer) error {
defer s.ListEnd()

if size == 0 {
fmt.Fprintf(out, ws(depth)+"[]")
fmt.Fprint(out, ws(depth)+"[]")
} else {
fmt.Fprintln(out, ws(depth)+"[")

Expand Down
4 changes: 2 additions & 2 deletions core/rawdb/accessors_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func TestBlockReceiptStorage(t *testing.T) {
t.Fatalf("no receipts returned")
} else {
if err := checkReceiptsRLP(rs, receipts); err != nil {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
}
// Delete the body and ensure that the receipts are no longer returned (metadata can't be recomputed)
Expand All @@ -432,7 +432,7 @@ func TestBlockReceiptStorage(t *testing.T) {
}
// Ensure that receipts without metadata can be returned without the block body too
if err := checkReceiptsRLP(ReadRawReceipts(db, hash, 0), receipts); err != nil {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
// Sanity check that body alone without the receipt is a full purge
WriteBody(db, hash, 0, body)
Expand Down
2 changes: 1 addition & 1 deletion eth/tracers/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func formatLogs(logs []StructLog) []StructLogRes {

formatted[index].Stack = &stack
}
if trace.ReturnData != nil && len(trace.ReturnData) > 0 {
if len(trace.ReturnData) > 0 {
formatted[index].ReturnData = hexutil.Bytes(trace.ReturnData).String()
}
if trace.Memory != nil {
Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/ethereum/go-ethereum

go 1.22

toolchain go1.22.1
go 1.23.6

require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
Expand Down Expand Up @@ -223,7 +221,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
Expand Down Expand Up @@ -288,7 +286,7 @@ require (
go.opentelemetry.io/otel/trace v1.27.0
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
google.golang.org/api v0.169.0 // indirect
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
)

replace github.com/cosmos/cosmos-sdk => github.com/maticnetwork/cosmos-sdk v0.38.4
Expand All @@ -297,7 +295,7 @@ replace github.com/tendermint/tendermint => github.com/maticnetwork/tendermint v

replace github.com/tendermint/tm-db => github.com/tendermint/tm-db v0.2.0

replace github.com/ethereum/go-ethereum => github.com/maticnetwork/bor v1.3.2
replace github.com/ethereum/go-ethereum => github.com/maticnetwork/bor v1.5.5

replace github.com/Masterminds/goutils => github.com/Masterminds/goutils v1.1.1

Expand Down
Loading

0 comments on commit ec2d46b

Please sign in to comment.