Skip to content

Commit

Permalink
Merge pull request #7 from node-real/merge-upstream_v0.4.2
Browse files Browse the repository at this point in the history
Merge upstream v0.4.2
  • Loading branch information
2129zxl authored Jun 18, 2024
2 parents b2cae51 + 0380943 commit c469f76
Show file tree
Hide file tree
Showing 1,157 changed files with 138,489 additions and 72,599 deletions.
20 changes: 15 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
type: boolean
default: false
machine:
image: ubuntu-2204:2022.07.1
image: default
resource_class: xlarge
steps:
- gcp-cli/install
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
build-geth:
docker:
- image: cimg/go:1.19
- image: cimg/go:1.21
resource_class: xlarge
steps:
- checkout
Expand All @@ -121,22 +121,30 @@ jobs:
unit-test:
resource_class: xlarge
docker:
- image: cimg/go:1.19
- image: cimg/go:1.21
steps:
- checkout
- run:
command: go run build/ci.go test
lint-geth:
resource_class: medium
docker:
- image: cimg/go:1.19
- image: cimg/go:1.21
steps:
- checkout
- run:
command: go run build/ci.go lint
tidy-geth:
resource_class: small
docker:
- image: cimg/go:1.21
steps:
- checkout
- run:
command: go mod tidy && git diff --exit-code
check-releases:
docker:
- image: cimg/go:1.19
- image: cimg/go:1.21
steps:
- checkout
- run:
Expand All @@ -157,6 +165,8 @@ workflows:
name: Run unit tests for geth
- lint-geth:
name: Run linter over geth
- tidy-geth:
name: Check geth go.mod file has been tidied
- docker-release:
name: Push to Docker
docker_tags: <<pipeline.git.revision>>
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ core/ @karalabe @holiman @rjl493456442
eth/ @karalabe @holiman @rjl493456442
eth/catalyst/ @gballet
eth/tracers/ @s1na
graphql/ @gballet @s1na
graphql/ @s1na
les/ @zsfelfoldi @rjl493456442
light/ @zsfelfoldi @rjl493456442
node/ @fjl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ jobs:
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ jobs:
with:
reviewers: ${{ vars.REVIEWERS }}
max-num-of-reviewers: 2

14 changes: 8 additions & 6 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Unit Test

on:
pull_request:
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
push:
branches: [main, develop]

Expand All @@ -11,8 +11,10 @@ jobs:
name: unit_test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '^1.21.3'
- run: make test
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- run: make test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ profile.cov
/dashboard/assets/package-lock.json

**/yarn-error.log
logs/

tests/spec-tests/
5 changes: 1 addition & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ run:
linters:
disable-all: true
enable:
- goconst
- goimports
- gosimple
- govet
Expand All @@ -39,9 +38,6 @@ linters:
linters-settings:
gofmt:
simplify: true
goconst:
min-len: 3 # minimum length of string constant
min-occurrences: 6 # minimum number of occurrences

issues:
exclude-rules:
Expand All @@ -62,3 +58,4 @@ issues:
- 'SA1019: strings.Title is deprecated'
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
- 'SA1029: should not use built-in type string as key for value'
- 'SA1019:' # temporary, until fully updated to Go 1.21
55 changes: 17 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,14 @@ jobs:
- azure-osx

include:
# This builder only tests code linters on latest version of Go
- stage: lint
os: linux
dist: bionic
go: 1.20.x
env:
- lint
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go lint

# These builders create the Docker sub-images for multi-arch push and each
# will attempt to push the multi-arch image if they are the last builder
- stage: build
if: type = push
os: linux
arch: amd64
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- docker
services:
Expand All @@ -45,7 +33,7 @@ jobs:
os: linux
arch: arm64
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- docker
services:
Expand All @@ -63,10 +51,9 @@ jobs:
os: linux
dist: bionic
sudo: required
go: 1.20.x
go: 1.21.x
env:
- azure-linux
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
addons:
Expand Down Expand Up @@ -97,56 +84,51 @@ jobs:
- stage: build
if: type = push
os: osx
go: 1.20.x
osx_image: xcode14.2
go: 1.21.x
env:
- azure-osx
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go install -dlgo
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- go run build/ci.go install -dlgo -arch arm64
- go run build/ci.go archive -arch arm64 -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# These builders run the tests
- stage: build
os: linux
arch: amd64
dist: bionic
go: 1.20.x
env:
- GO111MODULE=on
go: 1.21.x
script:
- go run build/ci.go test $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

- stage: build
if: type = pull_request
os: linux
arch: arm64
dist: bionic
go: 1.19.x
env:
- GO111MODULE=on
go: 1.20.x
script:
- go run build/ci.go test $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

- stage: build
os: linux
dist: bionic
go: 1.19.x
env:
- GO111MODULE=on
go: 1.20.x
script:
- go run build/ci.go test $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

# This builder does the Ubuntu PPA nightly uploads
- stage: build
if: type = cron || (type = push && tag ~= /^v[0-9]/)
os: linux
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- ubuntu-ppa
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
addons:
Expand All @@ -167,10 +149,9 @@ jobs:
if: type = cron
os: linux
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- azure-purge
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
script:
Expand All @@ -181,9 +162,7 @@ jobs:
if: type = cron
os: linux
dist: bionic
go: 1.20.x
env:
- GO111MODULE=on
go: 1.21.x
script:
- go run build/ci.go test -race $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test -race $TEST_PACKAGES

101 changes: 101 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,106 @@
# Changelog

## v0.3.1

This is a minor release for opBNB Mainnet and Testnet.

In this release, we've introduced significant optimizations and enhancements across various modes and functionalities, including PBSS Mode optimizations, the introduction of Fast Node Mode, EVM execution improvements, and a simplified start command, aimed at enhancing performance and user experience.

Upgrading is optional.

### User Facing Changes

- **PBSS Mode Optimizations**: We have made multiple optimizations for PBSS mode, including the implementation of an async buffer, support for obtaining withdrawal proof on PBSS, and the introduction of an HBSS to PBSS convert tool. For more details, please refer to #69, #74, and #79.
- **Fast Node Mode**: We have introduced a new mode called "Fast Node" to improve the performance and reduce the resources required by the node. This enhancement is aimed at providing a more efficient and streamlined experience. Please see more details in #75.
- **EVM Execution Opcode Level Optimization**: Our latest update includes optimizations at the EVM execution opcode level, resulting in improved performance for EVM execution. For a deeper understanding of these changes, please refer to #77 and #81.
- **Simplified Start Command**: We have simplified the start command by enabling the selection of default network configuration through the use of `--opBNBMainnet` or `--opBNBTestnet` in the command. This enhancement aims to streamline the user experience. More information can be found in #91.

### Partial Changelog

- [#69](https://github.com/bnb-chain/op-geth/pull/69): feat: add async buffer
- [#71](https://github.com/bnb-chain/op-geth/pull/71): chore: add miner perf metrics
- [#74](https://github.com/bnb-chain/op-geth/pull/74): feat: support getting withdrawal proof on pbss
- [#75](https://github.com/bnb-chain/op-geth/pull/75): feat: implement fast node
- [#76](https://github.com/bnb-chain/op-geth/pull/76): bugfix: fix Resubscribe deadlock when unsubscribing after inner sub ends
- [#77](https://github.com/bnb-chain/op-geth/pull/77): feat: EVM execution opcode level optimization
- [#79](https://github.com/bnb-chain/op-geth/pull/79): cmd/geth: add hbss to pbss convert tool
- [#81](https://github.com/bnb-chain/op-geth/pull/81): feat: introduce hash cache to improve performance
- [#88](https://github.com/bnb-chain/op-geth/pull/88): fix: fix base buffer concurrent read/write race
- [#91](https://github.com/bnb-chain/op-geth/pull/91): feat: simplify node start

### Docker Images

- ghcr.io/bnb-chain/op-geth:v0.3.1

### Full Changelog

https://github.com/bnb-chain/op-geth/compare/v0.3.0...v0.3.1

## v0.3.0

This is a recommended release for op-geth. This release brings in upstream updates, see https://github.com/bnb-chain/op-geth/pull/58 for the contents. This is also a ready release for the next planed fork, which will bring in canyon fork from upstream as well.

### User Facing Changes

- Feature of config tries layer number in memory is removed, and related flag `--triesInMemory` is deleted.
- If start a fresh node, will use pebble db as default(set `--db.engine=leveldb` if prefer leveldb)
- You can start opbnb mainnet or testnet without init genesis.json, and use flag `--opBNBMainnet` or `--opBNBTestnet` to start new node. If you have already inited genesis.json, you can still use these two flags, which will check whether the content of your init is correct.

### Partial Changelog

- [#64](https://github.com/bnb-chain/op-geth/pull/64): fix(op-geth):fix static peer cannot reassign header tasks
- [#60](https://github.com/bnb-chain/op-geth/pull/60): feature: add opbnb networks' genesis
- [#58](https://github.com/bnb-chain/op-geth/pull/58): Merge upstream op-geth v1.101304.1
- [#51](https://github.com/bnb-chain/op-geth/pull/51): feat: sync pebble db from bsc
- [#50](https://github.com/bnb-chain/op-geth/pull/50): fix: fix task stuck and not reassign bug in concurrent-fetch logic
- [#49](https://github.com/bnb-chain/op-geth/pull/49): fix: ignore errors that caused by gap to keep peer connection
- [#46](https://github.com/bnb-chain/op-geth/pull/46): fix: prune uses the latest block height as the target by default

### Docker Images

- ghcr.io/bnb-chain/op-geth:v0.3.0

### Full Changelog

https://github.com/bnb-chain/op-geth/compare/v0.2.2...v0.3.0

## v0.2.2

This is a minor release for opBNB Mainnet and Testnet.
It primarily optimizes op-geth and introduces an option to re-announce remote transactions.
Upgrading is optional.

### User Facing Changes

- The startup node will default to using the bootnodes of the opBNB mainnet. If the `--networkid=` is configured as testnet, the testnet bootnodes will be used. If `--bootnodes=` is configured, the specified bootnodes will be used. The configured `--bootnodes=` take precedence over other options.[#32](https://github.com/bnb-chain/op-geth/pull/32)
- Enable re-announce remote transactions by using the flag `--txpool.reannounceremotes=true`.[#33](https://github.com/bnb-chain/op-geth/pull/33)

### Partial Changelog

- [#14](https://github.com/bnb-chain/op-geth/pull/14): fix: add special logic to handle ancestor errors[BNB-3]
- [#16](https://github.com/bnb-chain/op-geth/pull/16): fix: wrong event log value
- [#17](https://github.com/bnb-chain/op-geth/pull/17): fix: cache data after successful writing[BNB-12]
- [#19](https://github.com/bnb-chain/op-geth/pull/19): fix: handle error in state_prefetcher.go and blockchain.go[BNB-16]
- [#20](https://github.com/bnb-chain/op-geth/pull/20): fix: refraining from using gopool for long-running tasks[BNB-19]
- [#21](https://github.com/bnb-chain/op-geth/pull/21): fix: remove redundant lock[BNB-20]
- [#22](https://github.com/bnb-chain/op-geth/pull/22): fix: remove unnecessary newRPCTransactionFromBlockHash function[BNB-21]
- [#31](https://github.com/bnb-chain/op-geth/pull/31): ci: fix blst error and unknown architecture
- [#32](https://github.com/bnb-chain/op-geth/pull/32): feature: add opBNB bootnodes
- [#33](https://github.com/bnb-chain/op-geth/pull/33): feat: add option to reannounce remote transactions
- [#34](https://github.com/bnb-chain/op-geth/pull/34): fix: clear underpriced buffer
- [#41](https://github.com/bnb-chain/op-geth/pull/41): txpool: enhance some logs and metrics on broadcasting and annoucing
- [#43](https://github.com/bnb-chain/op-geth/pull/43): chore: add reannounce metric for txpool
- [#44](https://github.com/bnb-chain/op-geth/pull/44): chore: impr/add some metrics txpool
- [#45](https://github.com/bnb-chain/op-geth/pull/45): feat: add TrieCommitInterval configuration, commit trie every TrieCommitInterval blocks

### Docker Images

- ghcr.io/bnb-chain/op-geth:v0.2.2

### Full Changelog

https://github.com/bnb-chain/op-geth/compare/v0.2.1...v0.2.2

## v0.2.1

This is the Fermat Hardfork release for opBNB Mainnet.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION=""
ARG BUILDNUM=""

# Build Geth in a stock Go builder container
FROM golang:1.20-alpine as builder
FROM golang:1.21-alpine as builder

RUN apk add --no-cache build-base libc-dev
RUN apk add --no-cache gcc musl-dev linux-headers git
Expand Down
Loading

0 comments on commit c469f76

Please sign in to comment.