mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
Merge pull request #1439 from maticnetwork/mardizzone/pos-2821
POS-2821: improvements
This commit is contained in:
commit
ec2d46b5b4
21 changed files with 941 additions and 203 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -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'
|
||||
|
|
@ -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'
|
||||
|
|
@ -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'
|
||||
|
|
@ -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'
|
||||
|
|
@ -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
|
||||
|
|
|
|||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
25
.github/workflows/govuln.yml
vendored
25
.github/workflows/govuln.yml
vendored
|
|
@ -1,25 +0,0 @@
|
|||
name: Govuln
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
govuln:
|
||||
name: Run govuln check and Publish
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Running govulncheck
|
||||
uses: Templum/govulncheck-action@v1.0.0
|
||||
continue-on-error: true
|
||||
env:
|
||||
DEBUG: "true"
|
||||
with:
|
||||
go-version: 1.22
|
||||
package: ./...
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fail-on-vuln: true
|
||||
|
||||
- name: Upload govulncheck report
|
||||
uses: actions/upload-artifact@v4.4.0
|
||||
with:
|
||||
name: raw-report
|
||||
path: raw-report.json
|
||||
23
.github/workflows/govulncheck.yml
vendored
Normal file
23
.github/workflows/govulncheck.yml
vendored
Normal file
|
|
@ -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 != ''"
|
||||
2
.github/workflows/packager_deb.yml
vendored
2
.github/workflows/packager_deb.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
.github/workflows/rpm_arm_packager.yml
vendored
2
.github/workflows/rpm_arm_packager.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
2
.github/workflows/rpm_packager.yml
vendored
2
.github/workflows/rpm_packager.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
|
|
@ -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.'
|
||||
|
|
|
|||
8
Makefile
8
Makefile
|
|
@ -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 .
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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)+"[")
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
10
go.mod
10
go.mod
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ func (i *SliceStringFlag) UpdateValue(value string) {
|
|||
}
|
||||
|
||||
func (f *Flagset) SliceStringFlag(s *SliceStringFlag) {
|
||||
if s.Default == nil || len(s.Default) == 0 {
|
||||
if len(s.Default) == 0 {
|
||||
f.addFlag(&FlagVar{
|
||||
Name: s.Name,
|
||||
Usage: s.Usage,
|
||||
|
|
@ -482,7 +482,7 @@ func (m *MapStringFlag) UpdateValue(value string) {
|
|||
}
|
||||
|
||||
func (f *Flagset) MapStringFlag(m *MapStringFlag) {
|
||||
if m.Default == nil || len(m.Default) == 0 {
|
||||
if len(m.Default) == 0 {
|
||||
f.addFlag(&FlagVar{
|
||||
Name: m.Name,
|
||||
Usage: m.Usage,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ func TestRegistryMarshallJSON(t *testing.T) {
|
|||
enc.Encode(r)
|
||||
|
||||
if s := b.String(); s != "{\"counter\":{\"count\":0}}\n" {
|
||||
t.Fatalf(s)
|
||||
t.Fatal(s)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue