mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
feat(BRIP-1): Prepare fork for Berachain (#3)
* Move all changes except EIP-1559 to prepare-fork branch * fix build * nit * empty bera configs * undo unneeded changes * fix config fiel * genesis TODOs * nit comment * config TODOs * fix up .github * changelog * changelog nit * Relevant CI jobs * try release fix * try release fix 2 * testing release push * fix docker login * secure login * remove circle ci * disable for now * nit changelog
This commit is contained in:
parent
0ce13346ce
commit
c901125e84
27 changed files with 407 additions and 330 deletions
|
|
@ -1,22 +0,0 @@
|
|||
on:
|
||||
schedule:
|
||||
- cron: '0 14 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
azure-cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24
|
||||
cache: false
|
||||
|
||||
- name: Run cleanup script
|
||||
run: |
|
||||
go run build/ci.go purge -store gethstore/builds -days 14
|
||||
env:
|
||||
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
on:
|
||||
schedule:
|
||||
- cron: '0 15 * * *'
|
||||
push:
|
||||
branches:
|
||||
- "release/*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ppa:
|
||||
name: PPA Upload
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24
|
||||
cache: false
|
||||
|
||||
- name: Install deb toolchain
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -yq --no-install-suggests --no-install-recommends install devscripts debhelper dput fakeroot
|
||||
|
||||
- name: Add launchpad to known_hosts
|
||||
run: |
|
||||
echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Run ci.go
|
||||
run: |
|
||||
go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>"
|
||||
env:
|
||||
PPA_SIGNING_KEY: ${{ secrets.PPA_SIGNING_KEY }}
|
||||
PPA_SSH_KEY: ${{ secrets.PPA_SSH_KEY }}
|
||||
31
.github/CODEOWNERS
vendored
31
.github/CODEOWNERS
vendored
|
|
@ -1,33 +1,4 @@
|
|||
# Lines starting with '#' are comments.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
accounts/usbwallet/ @gballet
|
||||
accounts/scwallet/ @gballet
|
||||
accounts/abi/ @gballet @MariusVanDerWijden
|
||||
beacon/engine/ @MariusVanDerWijden @lightclient @fjl
|
||||
beacon/light/ @zsfelfoldi
|
||||
beacon/merkle/ @zsfelfoldi
|
||||
beacon/types/ @zsfelfoldi @fjl
|
||||
beacon/params/ @zsfelfoldi @fjl
|
||||
cmd/evm/ @MariusVanDerWijden @lightclient
|
||||
core/state/ @rjl493456442
|
||||
crypto/ @gballet @jwasinger @fjl
|
||||
core/ @rjl493456442
|
||||
eth/ @rjl493456442
|
||||
eth/catalyst/ @MariusVanDerWijden @lightclient @fjl @jwasinger
|
||||
eth/tracers/ @s1na
|
||||
ethclient/ @fjl
|
||||
ethdb/ @rjl493456442
|
||||
event/ @fjl
|
||||
trie/ @rjl493456442
|
||||
triedb/ @rjl493456442
|
||||
core/tracing/ @s1na
|
||||
graphql/ @s1na
|
||||
internal/ethapi/ @fjl @s1na @lightclient
|
||||
internal/era/ @lightclient
|
||||
miner/ @MariusVanDerWijden @fjl @rjl493456442
|
||||
node/ @fjl
|
||||
p2p/ @fjl @zsfelfoldi
|
||||
rlp/ @fjl
|
||||
params/ @fjl @karalabe @gballet @rjl493456442 @zsfelfoldi
|
||||
rpc/ @fjl
|
||||
* @calbera
|
||||
|
|
|
|||
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gomod" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
2
.github/no-response.yml
vendored
2
.github/no-response.yml
vendored
|
|
@ -1,5 +1,5 @@
|
|||
# Number of days of inactivity before an Issue is closed for lack of response
|
||||
daysUntilClose: 30
|
||||
daysUntilClose: 366
|
||||
# Label requiring a response
|
||||
responseRequiredLabel: "need:more-information"
|
||||
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ on:
|
|||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ jobs:
|
|||
go run build/ci.go check_baddeps
|
||||
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
13
.github/workflows/release.asc
vendored
Normal file
13
.github/workflows/release.asc
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mDMEaFNE5RYJKwYBBAHaRw8BAQdAzKOuVGKVlxDTv29pw/g7reYDWw0d7Lma13oe
|
||||
vBBggee0G2JlcmEtZ2V0aC1saW51eC1zaWduaW5nLWtleYiTBBMWCgA7FiEECD2r
|
||||
J1G161Sj6o/AVxC/N/yI0gUFAmhTROUCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC
|
||||
HgcCF4AACgkQVxC/N/yI0gVTYwD+KiFp07+KNJ/eUlsc2j6Utz9zU7aHKEEh4LNF
|
||||
uahgRC4A/i1+QkR9oo14o3lbg8yWPnI5v8QQwBd7i3GNExxPXrsMuDgEaFNE5RIK
|
||||
KwYBBAGXVQEFAQEHQF1SxadHSBJud54oIYyHxq/r8GFmPyahf4ISUI/62X4BAwEI
|
||||
B4h4BBgWCgAgFiEECD2rJ1G161Sj6o/AVxC/N/yI0gUFAmhTROUCGwwACgkQVxC/
|
||||
N/yI0gV08QEAhpMEKbnYk9GzBSvRdgtHaYeLLqUtTp1W7Ug+RUO4338A/RWO27B8
|
||||
8mAF2WACCu8lLErv5V/YI3rkDiu/MSit+p0A
|
||||
=Ubr7
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
tags:
|
||||
- "v*"
|
||||
# TODO: fix release workflow and enable this.
|
||||
# push:
|
||||
# branches:
|
||||
# - "master"
|
||||
# tags:
|
||||
# - "v*"
|
||||
|
||||
jobs:
|
||||
linux-intel:
|
||||
|
|
@ -20,32 +21,42 @@ jobs:
|
|||
|
||||
- name: Install cross toolchain
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -yq --no-install-suggests --no-install-recommends install gcc-multilib
|
||||
sudo apt-get update
|
||||
sudo apt-get -yq --no-install-suggests --no-install-recommends install gcc-multilib
|
||||
|
||||
- name: Build (amd64)
|
||||
run: |
|
||||
go run build/ci.go install -arch amd64 -dlgo
|
||||
|
||||
- name: Create/upload archive (amd64)
|
||||
- name: Create archive (amd64)
|
||||
run: |
|
||||
go run build/ci.go archive -arch amd64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
|
||||
rm -f build/bin/*
|
||||
go run build/ci.go archive -arch amd64 -type tar -signer LINUX_SIGNING_KEY
|
||||
env:
|
||||
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
|
||||
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
|
||||
- name: Upload artifacts (amd64)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-amd64-archives
|
||||
path: "*.tar.gz*"
|
||||
- name: Cleanup bin
|
||||
run: rm -f build/bin/*
|
||||
|
||||
- name: Build (386)
|
||||
run: |
|
||||
go run build/ci.go install -arch 386 -dlgo
|
||||
|
||||
- name: Create/upload archive (386)
|
||||
- name: Create archive (386)
|
||||
run: |
|
||||
go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
|
||||
rm -f build/bin/*
|
||||
go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY
|
||||
env:
|
||||
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
|
||||
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
|
||||
- name: Upload artifacts (386)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-386-archives
|
||||
path: "*.tar.gz*"
|
||||
- name: Cleanup bin
|
||||
run: rm -f build/bin/*
|
||||
|
||||
linux-arm:
|
||||
name: Linux Build (arm)
|
||||
|
|
@ -61,21 +72,26 @@ jobs:
|
|||
|
||||
- name: Install cross toolchain
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -yq --no-install-suggests --no-install-recommends install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
||||
ln -s /usr/include/asm-generic /usr/include/asm
|
||||
sudo apt-get update
|
||||
sudo apt-get -yq --no-install-suggests --no-install-recommends install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
||||
sudo ln -s /usr/include/asm-generic /usr/include/asm
|
||||
|
||||
- name: Build (arm64)
|
||||
run: |
|
||||
go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
|
||||
|
||||
- name: Create/upload archive (arm64)
|
||||
- name: Create archive (arm64)
|
||||
run: |
|
||||
go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
|
||||
rm -fr build/bin/*
|
||||
go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY
|
||||
env:
|
||||
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
|
||||
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
|
||||
- name: Upload artifacts (arm64)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-arm64-archives
|
||||
path: "*arm64*.tar.gz*"
|
||||
- name: Cleanup bin
|
||||
run: rm -fr build/bin/*
|
||||
|
||||
- name: Run build (arm5)
|
||||
run: |
|
||||
|
|
@ -83,13 +99,19 @@ jobs:
|
|||
env:
|
||||
GOARM: "5"
|
||||
|
||||
- name: Create/upload archive (arm5)
|
||||
- name: Create archive (arm5)
|
||||
run: |
|
||||
go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
|
||||
go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY
|
||||
env:
|
||||
GOARM: "5"
|
||||
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
|
||||
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
|
||||
- name: Upload artifacts (arm5)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-arm5-archives
|
||||
path: "*arm*5*.tar.gz*"
|
||||
- name: Cleanup bin
|
||||
run: rm -fr build/bin/*
|
||||
|
||||
- name: Run build (arm6)
|
||||
run: |
|
||||
|
|
@ -97,14 +119,19 @@ jobs:
|
|||
env:
|
||||
GOARM: "6"
|
||||
|
||||
- name: Create/upload archive (arm6)
|
||||
- name: Create archive (arm6)
|
||||
run: |
|
||||
go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
|
||||
rm -fr build/bin/*
|
||||
go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY
|
||||
env:
|
||||
GOARM: "6"
|
||||
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
|
||||
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
|
||||
- name: Upload artifacts (arm6)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-arm6-archives
|
||||
path: "*arm*6*.tar.gz*"
|
||||
- name: Cleanup bin
|
||||
run: rm -fr build/bin/*
|
||||
|
||||
- name: Run build (arm7)
|
||||
run: |
|
||||
|
|
@ -112,18 +139,28 @@ jobs:
|
|||
env:
|
||||
GOARM: "7"
|
||||
|
||||
- name: Create/upload archive (arm7)
|
||||
- name: Create archive (arm7)
|
||||
run: |
|
||||
go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
|
||||
rm -fr build/bin/*
|
||||
go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY
|
||||
env:
|
||||
GOARM: "7"
|
||||
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
|
||||
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
|
||||
- name: Upload artifacts (arm7)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-arm7-archives
|
||||
path: "*arm*7*.tar.gz*"
|
||||
- name: Cleanup bin
|
||||
run: rm -fr build/bin/*
|
||||
|
||||
docker:
|
||||
name: Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -139,9 +176,13 @@ jobs:
|
|||
go-version: 1.24
|
||||
cache: false
|
||||
|
||||
- name: Run docker build
|
||||
env:
|
||||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push multi-arch images to GHCR
|
||||
run: |
|
||||
go run build/ci.go dockerx -platform linux/amd64,linux/arm64,linux/riscv64 -upload
|
||||
go run build/ci.go dockerx -platform linux/amd64,linux/arm64 -hub ghcr.io/berachain/bera-geth -upload
|
||||
86
.travis.yml
86
.travis.yml
|
|
@ -1,86 +0,0 @@
|
|||
language: go
|
||||
go_import_path: github.com/ethereum/go-ethereum
|
||||
sudo: false
|
||||
jobs:
|
||||
include:
|
||||
# This builder create and push the Docker images for all architectures
|
||||
- stage: build
|
||||
if: type = push && tag ~= /^v[0-9]/
|
||||
os: linux
|
||||
arch: amd64
|
||||
dist: focal
|
||||
go: 1.24.x
|
||||
env:
|
||||
- docker
|
||||
services:
|
||||
- docker
|
||||
git:
|
||||
submodules: false # avoid cloning ethereum/tests
|
||||
before_install:
|
||||
- export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
script:
|
||||
- go run build/ci.go dockerx -platform "linux/amd64,linux/arm64,linux/riscv64" -hub ethereum/client-go -upload
|
||||
|
||||
# This builder does the Ubuntu PPA nightly uploads
|
||||
- stage: build
|
||||
if: type = push && tag ~= /^v[0-9]/
|
||||
os: linux
|
||||
dist: focal
|
||||
go: 1.24.x
|
||||
env:
|
||||
- ubuntu-ppa
|
||||
git:
|
||||
submodules: false # avoid cloning ethereum/tests
|
||||
before_install:
|
||||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends install devscripts debhelper dput fakeroot
|
||||
script:
|
||||
- echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
|
||||
- go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>"
|
||||
|
||||
# This builder does the Linux Azure uploads
|
||||
- stage: build
|
||||
if: type = push && tag ~= /^v[0-9]/
|
||||
os: linux
|
||||
dist: focal
|
||||
sudo: required
|
||||
go: 1.24.x
|
||||
env:
|
||||
- azure-linux
|
||||
git:
|
||||
submodules: false # avoid cloning ethereum/tests
|
||||
script:
|
||||
# build amd64
|
||||
- go run build/ci.go install -dlgo
|
||||
- go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
|
||||
|
||||
# build 386
|
||||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends install gcc-multilib
|
||||
- git status --porcelain
|
||||
- go run build/ci.go install -dlgo -arch 386
|
||||
- go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
|
||||
|
||||
# Switch over GCC to cross compilation (breaks 386, hence why do it here only)
|
||||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
||||
- sudo ln -s /usr/include/asm-generic /usr/include/asm
|
||||
|
||||
- GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
|
||||
- GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
|
||||
- GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
|
||||
- GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
|
||||
- GOARM=7 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabihf-gcc
|
||||
- GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
|
||||
- go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
|
||||
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
|
||||
|
||||
# This builder does the Azure archive purges to avoid accumulating junk
|
||||
- stage: build
|
||||
if: type = cron
|
||||
os: linux
|
||||
dist: focal
|
||||
go: 1.24.x
|
||||
env:
|
||||
- azure-purge
|
||||
git:
|
||||
submodules: false # avoid cloning ethereum/tests
|
||||
script:
|
||||
- go run build/ci.go purge -store gethstore/builds -days 14
|
||||
20
CHANGELOG.md
Normal file
20
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to
|
||||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.TBD.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Add support for the Berachain mainnet (`--berachain`) and Bepolia networks
|
||||
(`--bepolia`)
|
||||
- Add support for configuring the Prague1 fork on Berachain networks.
|
||||
|
||||
### Changed
|
||||
|
||||
- [WIP] Updated release GH workflow to publish tarballs and push built images to GHCR.
|
||||
- Removed support for appveyor, gitea, travis, circleci.
|
||||
12
Dockerfile
12
Dockerfile
|
|
@ -9,18 +9,18 @@ FROM golang:1.24-alpine AS builder
|
|||
RUN apk add --no-cache gcc musl-dev linux-headers git
|
||||
|
||||
# Get dependencies - will also be cached if we won't change go.mod/go.sum
|
||||
COPY go.mod /go-ethereum/
|
||||
COPY go.sum /go-ethereum/
|
||||
RUN cd /go-ethereum && go mod download
|
||||
COPY go.mod /bera-geth/
|
||||
COPY go.sum /bera-geth/
|
||||
RUN cd /bera-geth && go mod download
|
||||
|
||||
ADD . /go-ethereum
|
||||
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
|
||||
ADD . /bera-geth
|
||||
RUN cd /bera-geth && go run build/ci.go install -static ./cmd/geth
|
||||
|
||||
# Pull Geth into a second stage deploy alpine container
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
|
||||
COPY --from=builder /bera-geth/build/bin/geth /usr/local/bin/
|
||||
|
||||
EXPOSE 8545 8546 30303 30303/udp
|
||||
ENTRYPOINT ["geth"]
|
||||
|
|
|
|||
|
|
@ -9,25 +9,25 @@ FROM golang:1.24-alpine AS builder
|
|||
RUN apk add --no-cache gcc musl-dev linux-headers git
|
||||
|
||||
# Get dependencies - will also be cached if we won't change go.mod/go.sum
|
||||
COPY go.mod /go-ethereum/
|
||||
COPY go.sum /go-ethereum/
|
||||
RUN cd /go-ethereum && go mod download
|
||||
COPY go.mod /bera-geth/
|
||||
COPY go.sum /bera-geth/
|
||||
RUN cd /bera-geth && go mod download
|
||||
|
||||
ADD . /go-ethereum
|
||||
ADD . /bera-geth
|
||||
|
||||
# This is not strictly necessary, but it matches the "Dockerfile" steps, thus
|
||||
# makes it so that under certain circumstances, the docker layer can be cached,
|
||||
# and the builder can jump to the next (build all) command, with the go cache fully loaded.
|
||||
#
|
||||
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
|
||||
RUN cd /bera-geth && go run build/ci.go install -static ./cmd/geth
|
||||
|
||||
RUN cd /go-ethereum && go run build/ci.go install -static
|
||||
RUN cd /bera-geth && go run build/ci.go install -static
|
||||
|
||||
# Pull all binaries into a second stage deploy alpine container
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/
|
||||
COPY --from=builder /bera-geth/build/bin/* /usr/local/bin/
|
||||
|
||||
EXPOSE 8545 8546 30303 30303/udp
|
||||
|
||||
|
|
|
|||
59
appveyor.yml
59
appveyor.yml
|
|
@ -1,59 +0,0 @@
|
|||
clone_depth: 5
|
||||
version: "{branch}.{build}"
|
||||
|
||||
image:
|
||||
- Ubuntu
|
||||
- Visual Studio 2019
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- GETH_ARCH: amd64
|
||||
GETH_MINGW: 'C:\msys64\mingw64'
|
||||
- GETH_ARCH: 386
|
||||
GETH_MINGW: 'C:\msys64\mingw32'
|
||||
|
||||
install:
|
||||
- git submodule update --init --depth 1 --recursive
|
||||
- go version
|
||||
|
||||
for:
|
||||
# Linux has its own script without -arch and -cc.
|
||||
# The linux builder also runs lint.
|
||||
- matrix:
|
||||
only:
|
||||
- image: Ubuntu
|
||||
build_script:
|
||||
- go run build/ci.go lint
|
||||
- go run build/ci.go check_generate
|
||||
- go run build/ci.go check_baddeps
|
||||
- go run build/ci.go install -dlgo
|
||||
test_script:
|
||||
- go run build/ci.go test -dlgo -short
|
||||
|
||||
# linux/386 is disabled.
|
||||
- matrix:
|
||||
exclude:
|
||||
- image: Ubuntu
|
||||
GETH_ARCH: 386
|
||||
|
||||
# Windows builds for amd64 + 386.
|
||||
- matrix:
|
||||
only:
|
||||
- image: Visual Studio 2019
|
||||
environment:
|
||||
# We use gcc from MSYS2 because it is the most recent compiler version available on
|
||||
# AppVeyor. Note: gcc.exe only works properly if the corresponding bin/ directory is
|
||||
# contained in PATH.
|
||||
GETH_CC: '%GETH_MINGW%\bin\gcc.exe'
|
||||
PATH: '%GETH_MINGW%\bin;C:\Program Files (x86)\NSIS\;%PATH%'
|
||||
build_script:
|
||||
- 'echo %GETH_ARCH%'
|
||||
- 'echo %GETH_CC%'
|
||||
- '%GETH_CC% --version'
|
||||
- go run build/ci.go install -dlgo -arch %GETH_ARCH% -cc %GETH_CC%
|
||||
after_build:
|
||||
# Upload builds. Note that ci.go makes this a no-op PR builds.
|
||||
- go run build/ci.go archive -arch %GETH_ARCH% -type zip -signer WINDOWS_SIGNING_KEY -upload gethstore/builds
|
||||
- go run build/ci.go nsis -arch %GETH_ARCH% -signer WINDOWS_SIGNING_KEY -upload gethstore/builds
|
||||
test_script:
|
||||
- go run build/ci.go test -dlgo -arch %GETH_ARCH% -cc %GETH_CC% -short
|
||||
|
|
@ -656,11 +656,11 @@ func maybeSkipArchive(env build.Environment) {
|
|||
}
|
||||
}
|
||||
|
||||
// Builds the docker images and optionally uploads them to Docker Hub.
|
||||
// Builds the docker images and optionally uploads them to GHCR.
|
||||
func doDockerBuildx(cmdline []string) {
|
||||
var (
|
||||
platform = flag.String("platform", "", `Push a multi-arch docker image for the specified architectures (usually "linux/amd64,linux/arm64")`)
|
||||
hubImage = flag.String("hub", "ethereum/client-go", `Where to upload the docker image`)
|
||||
hubImage = flag.String("hub", "ghcr.io/berachain/bera-geth", `Where to upload the docker image`)
|
||||
upload = flag.Bool("upload", false, `Whether to trigger upload`)
|
||||
)
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
|
|
|
|||
32
circle.yml
32
circle.yml
|
|
@ -1,32 +0,0 @@
|
|||
machine:
|
||||
services:
|
||||
- docker
|
||||
|
||||
dependencies:
|
||||
cache_directories:
|
||||
- "~/.ethash" # Cache the ethash DAG generated by hive for consecutive builds
|
||||
- "~/.docker" # Cache all docker images manually to avoid lengthy rebuilds
|
||||
override:
|
||||
# Restore all previously cached docker images
|
||||
- mkdir -p ~/.docker
|
||||
- for img in `ls ~/.docker`; do docker load -i ~/.docker/$img; done
|
||||
|
||||
# Pull in and hive, restore cached ethash DAGs and do a dry run
|
||||
- go get -u github.com/karalabe/hive
|
||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && mkdir -p workspace/ethash/ ~/.ethash)
|
||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && cp -r ~/.ethash/. workspace/ethash/)
|
||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=NONE --test=. --sim=. --loglevel=6)
|
||||
|
||||
# Cache all the docker images and the ethash DAGs
|
||||
- for img in `docker images | grep -v "^<none>" | tail -n +2 | awk '{print $1}'`; do docker save $img > ~/.docker/`echo $img | tr '/' ':'`.tar; done
|
||||
- cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/ethash/. ~/.ethash
|
||||
|
||||
test:
|
||||
override:
|
||||
# Build Geth and move into a known folder
|
||||
- make geth
|
||||
- cp ./build/bin/geth $HOME/geth
|
||||
|
||||
# Run hive and move all generated logs into the public artifacts folder
|
||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/geth --test=. --sim=.)
|
||||
- cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS
|
||||
|
|
@ -236,6 +236,10 @@ func ethFilter(args []string) (nodeFilter, error) {
|
|||
filter = forkid.NewStaticFilter(params.HoleskyChainConfig, core.DefaultHoleskyGenesisBlock().ToBlock())
|
||||
case "hoodi":
|
||||
filter = forkid.NewStaticFilter(params.HoodiChainConfig, core.DefaultHoodiGenesisBlock().ToBlock())
|
||||
case "berachain":
|
||||
filter = forkid.NewStaticFilter(params.BerachainChainConfig, core.DefaultBerachainGenesisBlock().ToBlock())
|
||||
case "bepolia":
|
||||
filter = forkid.NewStaticFilter(params.BepoliaChainConfig, core.DefaultBepoliaGenesisBlock().ToBlock())
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown network %q", args[0])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -479,6 +479,10 @@ func importHistory(ctx *cli.Context) error {
|
|||
network = "holesky"
|
||||
case ctx.Bool(utils.HoodiFlag.Name):
|
||||
network = "hoodi"
|
||||
case ctx.Bool(utils.BerachainFlag.Name):
|
||||
network = "berachain"
|
||||
case ctx.Bool(utils.BepoliaFlag.Name):
|
||||
network = "bepolia"
|
||||
}
|
||||
} else {
|
||||
// No network flag set, try to determine network based on files
|
||||
|
|
@ -715,6 +719,10 @@ func downloadEra(ctx *cli.Context) error {
|
|||
case ctx.IsSet(utils.MainnetFlag.Name):
|
||||
case ctx.IsSet(utils.SepoliaFlag.Name):
|
||||
network = "sepolia"
|
||||
case ctx.IsSet(utils.BerachainFlag.Name):
|
||||
network = "berachain"
|
||||
case ctx.IsSet(utils.BepoliaFlag.Name):
|
||||
network = "bepolia"
|
||||
default:
|
||||
return fmt.Errorf("unsupported network, no known era1 checksums")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,6 +285,9 @@ func main() {
|
|||
func prepare(ctx *cli.Context) {
|
||||
// If we're running a known preset, log it for convenience.
|
||||
switch {
|
||||
case ctx.IsSet(utils.MainnetFlag.Name):
|
||||
log.Info("Starting Geth on Berachain mainnet...")
|
||||
|
||||
case ctx.IsSet(utils.SepoliaFlag.Name):
|
||||
log.Info("Starting Geth on Sepolia testnet...")
|
||||
|
||||
|
|
@ -294,15 +297,20 @@ func prepare(ctx *cli.Context) {
|
|||
case ctx.IsSet(utils.HoodiFlag.Name):
|
||||
log.Info("Starting Geth on Hoodi testnet...")
|
||||
|
||||
case !ctx.IsSet(utils.NetworkIdFlag.Name):
|
||||
log.Info("Starting Geth on Ethereum mainnet...")
|
||||
case ctx.IsSet(utils.BepoliaFlag.Name):
|
||||
log.Info("Starting Geth on Bepolia testnet...")
|
||||
|
||||
case !ctx.IsSet(utils.NetworkIdFlag.Name), ctx.IsSet(utils.BerachainFlag.Name):
|
||||
log.Info("Starting Geth on Berachain mainnet...")
|
||||
}
|
||||
// If we're a full node on mainnet without --cache specified, bump default cache allowance
|
||||
|
||||
// If we're a full node on Berachain mainnet without --cache specified, bump default cache allowance
|
||||
if !ctx.IsSet(utils.CacheFlag.Name) && !ctx.IsSet(utils.NetworkIdFlag.Name) {
|
||||
// Make sure we're not on any supported preconfigured testnet either
|
||||
if !ctx.IsSet(utils.HoleskyFlag.Name) &&
|
||||
!ctx.IsSet(utils.SepoliaFlag.Name) &&
|
||||
!ctx.IsSet(utils.HoodiFlag.Name) &&
|
||||
!ctx.IsSet(utils.BepoliaFlag.Name) &&
|
||||
!ctx.IsSet(utils.DeveloperFlag.Name) {
|
||||
// Nope, we're really on mainnet. Bump that cache up!
|
||||
log.Info("Bumping default cache on mainnet", "provided", ctx.Int(utils.CacheFlag.Name), "updated", 4096)
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ var (
|
|||
}
|
||||
NetworkIdFlag = &cli.Uint64Flag{
|
||||
Name: "networkid",
|
||||
Usage: "Explicitly set network id (integer)(For testnets: use --sepolia, --holesky, --hoodi instead)",
|
||||
Usage: "Explicitly set network id (integer)(Testnet: use --bepolia)(For Ethereum: use --mainnet, --sepolia, etc.)",
|
||||
Value: ethconfig.Defaults.NetworkId,
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
|
|
@ -163,6 +163,17 @@ var (
|
|||
Usage: "Hoodi network: pre-configured proof-of-stake test network",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
// Berachain
|
||||
BerachainFlag = &cli.BoolFlag{
|
||||
Name: "berachain",
|
||||
Usage: "Berachain mainnet",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
BepoliaFlag = &cli.BoolFlag{
|
||||
Name: "bepolia",
|
||||
Usage: "Bepolia network: pre-configured proof-of-stake test network",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
// Dev mode
|
||||
DeveloperFlag = &cli.BoolFlag{
|
||||
Name: "dev",
|
||||
|
|
@ -449,7 +460,7 @@ var (
|
|||
// Performance tuning settings
|
||||
CacheFlag = &cli.IntFlag{
|
||||
Name: "cache",
|
||||
Usage: "Megabytes of memory allocated to internal caching (default = 4096 mainnet full node, 128 light mode)",
|
||||
Usage: "Megabytes of memory allocated to internal caching (default = 4096 berachain mainnet full node, 128 light mode)",
|
||||
Value: 1024,
|
||||
Category: flags.PerfCategory,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ var (
|
|||
Flags: []cli.Flag{
|
||||
testSepoliaFlag,
|
||||
testMainnetFlag,
|
||||
testBepoliaFlag,
|
||||
testBerachainFlag,
|
||||
filterQueryFileFlag,
|
||||
filterErrorFileFlag,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -85,6 +85,16 @@ var (
|
|||
Usage: "Use test cases for mainnet network",
|
||||
Category: flags.TestingCategory,
|
||||
}
|
||||
testBepoliaFlag = &cli.BoolFlag{
|
||||
Name: "bepolia",
|
||||
Usage: "Use test cases for bepolia network",
|
||||
Category: flags.TestingCategory,
|
||||
}
|
||||
testBerachainFlag = &cli.BoolFlag{
|
||||
Name: "berachain",
|
||||
Usage: "Use test cases for berachain mainnet network",
|
||||
Category: flags.TestingCategory,
|
||||
}
|
||||
)
|
||||
|
||||
// testConfig holds the parameters for testing.
|
||||
|
|
@ -117,10 +127,13 @@ func validateHistoryPruneErr(err error, blockNum uint64, historyPruneBlock *uint
|
|||
return err
|
||||
}
|
||||
|
||||
// TODO(bera): Add test filter & history queries for Berachain mainnet & Bepolia in queries/ folder
|
||||
func testConfigFromCLI(ctx *cli.Context) (cfg testConfig) {
|
||||
flags.CheckExclusive(ctx, testMainnetFlag, testSepoliaFlag)
|
||||
if (ctx.IsSet(testMainnetFlag.Name) || ctx.IsSet(testSepoliaFlag.Name)) && ctx.IsSet(filterQueryFileFlag.Name) {
|
||||
exit(filterQueryFileFlag.Name + " cannot be used with " + testMainnetFlag.Name + " or " + testSepoliaFlag.Name)
|
||||
flags.CheckExclusive(ctx, testMainnetFlag, testSepoliaFlag, testBerachainFlag, testBepoliaFlag)
|
||||
if (ctx.IsSet(testMainnetFlag.Name) || ctx.IsSet(testSepoliaFlag.Name) || ctx.IsSet(testBerachainFlag.Name) || ctx.IsSet(testBepoliaFlag.Name)) &&
|
||||
ctx.IsSet(filterQueryFileFlag.Name) {
|
||||
exit(filterQueryFileFlag.Name + " cannot be used with " + testMainnetFlag.Name + " or " +
|
||||
testSepoliaFlag.Name + "or" + testBerachainFlag.Name + " or " + testBepoliaFlag.Name)
|
||||
}
|
||||
|
||||
// configure ethclient
|
||||
|
|
@ -142,6 +155,20 @@ func testConfigFromCLI(ctx *cli.Context) (cfg testConfig) {
|
|||
cfg.historyPruneBlock = new(uint64)
|
||||
*cfg.historyPruneBlock = history.PrunePoints[params.SepoliaGenesisHash].BlockNumber
|
||||
cfg.traceTestFile = "queries/trace_sepolia.json"
|
||||
case ctx.Bool(testBerachainFlag.Name):
|
||||
cfg.fsys = builtinTestFiles
|
||||
cfg.filterQueryFile = "queries/filter_queries_berachain.json"
|
||||
cfg.historyTestFile = "queries/history_berachain.json"
|
||||
cfg.historyPruneBlock = new(uint64)
|
||||
*cfg.historyPruneBlock = history.PrunePoints[params.BerachainGenesisHash].BlockNumber
|
||||
cfg.traceTestFile = "queries/trace_berachain.json"
|
||||
case ctx.Bool(testBepoliaFlag.Name):
|
||||
cfg.fsys = builtinTestFiles
|
||||
cfg.filterQueryFile = "queries/filter_queries_bepolia.json"
|
||||
cfg.historyTestFile = "queries/history_bepolia.json"
|
||||
cfg.historyPruneBlock = new(uint64)
|
||||
*cfg.historyPruneBlock = history.PrunePoints[params.BepoliaGenesisHash].BlockNumber
|
||||
cfg.traceTestFile = "queries/trace_bepolia.json"
|
||||
default:
|
||||
cfg.fsys = os.DirFS(".")
|
||||
cfg.filterQueryFile = ctx.String(filterQueryFileFlag.Name)
|
||||
|
|
|
|||
|
|
@ -223,6 +223,10 @@ func getGenesisState(db ethdb.Database, blockhash common.Hash) (alloc types.Gene
|
|||
genesis = DefaultHoleskyGenesisBlock()
|
||||
case params.HoodiGenesisHash:
|
||||
genesis = DefaultHoodiGenesisBlock()
|
||||
case params.BerachainGenesisHash:
|
||||
genesis = DefaultBerachainGenesisBlock()
|
||||
case params.BepoliaGenesisHash:
|
||||
genesis = DefaultBepoliaGenesisBlock()
|
||||
}
|
||||
if genesis != nil {
|
||||
return genesis.Alloc, nil
|
||||
|
|
@ -438,6 +442,10 @@ func (g *Genesis) chainConfigOrDefault(ghash common.Hash, stored *params.ChainCo
|
|||
return params.SepoliaChainConfig
|
||||
case ghash == params.HoodiGenesisHash:
|
||||
return params.HoodiChainConfig
|
||||
case ghash == params.BerachainGenesisHash:
|
||||
return params.BerachainChainConfig
|
||||
case ghash == params.BepoliaGenesisHash:
|
||||
return params.BepoliaChainConfig
|
||||
default:
|
||||
return stored
|
||||
}
|
||||
|
|
@ -644,6 +652,32 @@ func DefaultHoodiGenesisBlock() *Genesis {
|
|||
}
|
||||
}
|
||||
|
||||
// DefaultBerachainGenesisBlock returns the Berachain main net genesis block.
|
||||
func DefaultBerachainGenesisBlock() *Genesis {
|
||||
return &Genesis{
|
||||
Config: params.BerachainChainConfig,
|
||||
Nonce: 0x1234,
|
||||
ExtraData: []byte{},
|
||||
GasLimit: 0x1c9c380,
|
||||
Difficulty: big.NewInt(0x01),
|
||||
Timestamp: 1737381600,
|
||||
Alloc: decodePrealloc(berachainAllocData),
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultBepoliaGenesisBlock returns the Bepolia network genesis block.
|
||||
func DefaultBepoliaGenesisBlock() *Genesis {
|
||||
return &Genesis{
|
||||
Config: params.BepoliaChainConfig,
|
||||
Nonce: 0x1234,
|
||||
ExtraData: []byte{},
|
||||
GasLimit: 0x1c9c380,
|
||||
Difficulty: big.NewInt(0x01),
|
||||
Timestamp: 1739976735,
|
||||
Alloc: decodePrealloc(bepoliaAllocData),
|
||||
}
|
||||
}
|
||||
|
||||
// DeveloperGenesisBlock returns the 'geth --dev' genesis block.
|
||||
func DeveloperGenesisBlock(gasLimit uint64, faucet *common.Address) *Genesis {
|
||||
// Override the default period to the user requested one
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -85,6 +85,15 @@ func testSetupGenesis(t *testing.T, scheme string) {
|
|||
wantHash: params.MainnetGenesisHash,
|
||||
wantConfig: params.MainnetChainConfig,
|
||||
},
|
||||
{
|
||||
name: "berachain block in DB, genesis == nil",
|
||||
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, *params.ConfigCompatError, error) {
|
||||
DefaultBerachainGenesisBlock().MustCommit(db, triedb.NewDatabase(db, newDbConfig(scheme)))
|
||||
return SetupGenesisBlock(db, triedb.NewDatabase(db, newDbConfig(scheme)), nil)
|
||||
},
|
||||
wantHash: params.BerachainGenesisHash,
|
||||
wantConfig: params.BerachainChainConfig,
|
||||
},
|
||||
{
|
||||
name: "custom block in DB, genesis == nil",
|
||||
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, *params.ConfigCompatError, error) {
|
||||
|
|
@ -104,6 +113,15 @@ func testSetupGenesis(t *testing.T, scheme string) {
|
|||
},
|
||||
wantErr: &GenesisMismatchError{Stored: customghash, New: params.SepoliaGenesisHash},
|
||||
},
|
||||
{
|
||||
name: "custom block in DB, genesis == bepolia",
|
||||
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, *params.ConfigCompatError, error) {
|
||||
tdb := triedb.NewDatabase(db, newDbConfig(scheme))
|
||||
customg.Commit(db, tdb)
|
||||
return SetupGenesisBlock(db, tdb, DefaultBepoliaGenesisBlock())
|
||||
},
|
||||
wantErr: &GenesisMismatchError{Stored: customghash, New: params.BepoliaGenesisHash},
|
||||
},
|
||||
{
|
||||
name: "custom block in DB, genesis == hoodi",
|
||||
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, *params.ConfigCompatError, error) {
|
||||
|
|
@ -189,6 +207,8 @@ func TestGenesisHashes(t *testing.T) {
|
|||
{DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash},
|
||||
{DefaultHoleskyGenesisBlock(), params.HoleskyGenesisHash},
|
||||
{DefaultHoodiGenesisBlock(), params.HoodiGenesisHash},
|
||||
{DefaultBerachainGenesisBlock(), params.BerachainGenesisHash},
|
||||
{DefaultBepoliaGenesisBlock(), params.BepoliaGenesisHash},
|
||||
} {
|
||||
// Test via MustCommit
|
||||
db := rawdb.NewMemoryDatabase()
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ var FullNodeGPO = gasprice.Config{
|
|||
IgnorePrice: gasprice.DefaultIgnorePrice,
|
||||
}
|
||||
|
||||
// Defaults contains default settings for use on the Ethereum main net.
|
||||
// Defaults contains default settings for use on the Ethereum and Berachain main net.
|
||||
var Defaults = Config{
|
||||
HistoryMode: history.KeepAll,
|
||||
SyncMode: SnapSync,
|
||||
|
|
|
|||
138
params/config.go
138
params/config.go
|
|
@ -32,6 +32,10 @@ var (
|
|||
HoleskyGenesisHash = common.HexToHash("0xb5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde4")
|
||||
SepoliaGenesisHash = common.HexToHash("0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9")
|
||||
HoodiGenesisHash = common.HexToHash("0xbbe312868b376a3001692a646dd2d7d1e4406380dfd86b98aa8a34d1557c971b")
|
||||
|
||||
// Berachain
|
||||
BerachainGenesisHash = common.HexToHash("0xd57819422128da1c44339fc7956662378c17e2213e669b427ac91cd11dfcfb38")
|
||||
BepoliaGenesisHash = common.HexToHash("0x0207661de38f0e54ba91c8286096e72486784c79dc6a9681fc486b38335c042f")
|
||||
)
|
||||
|
||||
func newUint64(val uint64) *uint64 { return &val }
|
||||
|
|
@ -158,6 +162,80 @@ var (
|
|||
Prague: DefaultPragueBlobConfig,
|
||||
},
|
||||
}
|
||||
// BerachainChainConfig is the chain parameters to run a node on the Berachain network.
|
||||
BerachainChainConfig = &ChainConfig{
|
||||
ChainID: big.NewInt(80094),
|
||||
HomesteadBlock: big.NewInt(0),
|
||||
DAOForkBlock: big.NewInt(0),
|
||||
DAOForkSupport: true,
|
||||
EIP150Block: big.NewInt(0),
|
||||
EIP155Block: big.NewInt(0),
|
||||
EIP158Block: big.NewInt(0),
|
||||
ByzantiumBlock: big.NewInt(0),
|
||||
ConstantinopleBlock: big.NewInt(0),
|
||||
PetersburgBlock: big.NewInt(0),
|
||||
IstanbulBlock: big.NewInt(0),
|
||||
MuirGlacierBlock: big.NewInt(0),
|
||||
BerlinBlock: big.NewInt(0),
|
||||
LondonBlock: big.NewInt(0),
|
||||
ArrowGlacierBlock: big.NewInt(0),
|
||||
GrayGlacierBlock: big.NewInt(0),
|
||||
TerminalTotalDifficulty: big.NewInt(0),
|
||||
MergeNetsplitBlock: big.NewInt(0),
|
||||
ShanghaiTime: newUint64(0),
|
||||
CancunTime: newUint64(0),
|
||||
PragueTime: newUint64(1749056400),
|
||||
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
|
||||
Ethash: new(EthashConfig),
|
||||
BlobScheduleConfig: &BlobScheduleConfig{
|
||||
Cancun: DefaultCancunBlobConfig,
|
||||
Prague: DefaultBerachainPragueBlobConfig,
|
||||
},
|
||||
Berachain: BerachainConfig{
|
||||
Prague1: Prague1Config{
|
||||
Time: newUint64(999999999999999),
|
||||
MinimumBaseFeeWei: 1000000000, // 1 gwei
|
||||
BaseFeeChangeDenominator: 48, // 6x increase from the default
|
||||
},
|
||||
},
|
||||
}
|
||||
// BepoliaChainConfig contains the chain parameters to run a node on the Bepolia test network.
|
||||
BepoliaChainConfig = &ChainConfig{
|
||||
ChainID: big.NewInt(80069),
|
||||
HomesteadBlock: big.NewInt(0),
|
||||
DAOForkBlock: big.NewInt(0),
|
||||
DAOForkSupport: true,
|
||||
EIP150Block: big.NewInt(0),
|
||||
EIP155Block: big.NewInt(0),
|
||||
EIP158Block: big.NewInt(0),
|
||||
ByzantiumBlock: big.NewInt(0),
|
||||
ConstantinopleBlock: big.NewInt(0),
|
||||
PetersburgBlock: big.NewInt(0),
|
||||
IstanbulBlock: big.NewInt(0),
|
||||
MuirGlacierBlock: big.NewInt(0),
|
||||
BerlinBlock: big.NewInt(0),
|
||||
LondonBlock: big.NewInt(0),
|
||||
ArrowGlacierBlock: big.NewInt(0),
|
||||
GrayGlacierBlock: big.NewInt(0),
|
||||
TerminalTotalDifficulty: big.NewInt(0),
|
||||
MergeNetsplitBlock: big.NewInt(0),
|
||||
ShanghaiTime: newUint64(0),
|
||||
CancunTime: newUint64(0),
|
||||
PragueTime: newUint64(1746633600),
|
||||
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
|
||||
Ethash: new(EthashConfig),
|
||||
BlobScheduleConfig: &BlobScheduleConfig{
|
||||
Cancun: DefaultCancunBlobConfig,
|
||||
Prague: DefaultBerachainPragueBlobConfig,
|
||||
},
|
||||
Berachain: BerachainConfig{
|
||||
Prague1: Prague1Config{
|
||||
Time: newUint64(999999999999999),
|
||||
MinimumBaseFeeWei: 1000000000, // 1 gwei
|
||||
BaseFeeChangeDenominator: 48, // 6x increase from the default
|
||||
},
|
||||
},
|
||||
}
|
||||
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
|
||||
// and accepted by the Ethereum core developers into the Ethash consensus.
|
||||
AllEthashProtocolChanges = &ChainConfig{
|
||||
|
|
@ -353,6 +431,13 @@ var (
|
|||
Max: 9,
|
||||
UpdateFraction: 5007716,
|
||||
}
|
||||
// DefaultBerachainPragueBlobConfig is the default blob configuration for the Prague fork
|
||||
// on Berachain networks.
|
||||
DefaultBerachainPragueBlobConfig = &BlobConfig{
|
||||
Target: 3,
|
||||
Max: 6,
|
||||
UpdateFraction: 3338477,
|
||||
}
|
||||
// DefaultOsakaBlobConfig is the default blob configuration for the Osaka fork.
|
||||
DefaultOsakaBlobConfig = &BlobConfig{
|
||||
Target: 6,
|
||||
|
|
@ -435,6 +520,46 @@ type ChainConfig struct {
|
|||
Ethash *EthashConfig `json:"ethash,omitempty"`
|
||||
Clique *CliqueConfig `json:"clique,omitempty"`
|
||||
BlobScheduleConfig *BlobScheduleConfig `json:"blobSchedule,omitempty"`
|
||||
|
||||
// Berachain config
|
||||
Berachain BerachainConfig `json:"berachain,omitempty"`
|
||||
}
|
||||
|
||||
// BerachainConfig is the berachain config.
|
||||
type BerachainConfig struct {
|
||||
// Prague1 fork values.
|
||||
Prague1 Prague1Config `json:"prague1,omitempty"`
|
||||
}
|
||||
|
||||
// String implements the stringer interface.
|
||||
func (o *BerachainConfig) String() string {
|
||||
banner := "berachain"
|
||||
if o.Prague1.Time != nil {
|
||||
banner += fmt.Sprintf("(%s)", o.Prague1)
|
||||
}
|
||||
return banner
|
||||
}
|
||||
|
||||
// Prague1Config is the config values for the Prague1 fork on Berachain.
|
||||
type Prague1Config struct {
|
||||
// Time is the time of the Prague1 fork.
|
||||
Time *uint64 `json:"time,omitempty"` // Prague1 switch time (0 = already on prague1, nil = no fork)
|
||||
// BaseFeeChangeDenominator is the base fee change denominator.
|
||||
BaseFeeChangeDenominator uint64 `json:"baseFeeChangeDenominator,omitempty"`
|
||||
// MinimumBaseFeeWei is the minimum base fee in wei.
|
||||
MinimumBaseFeeWei uint64 `json:"minimumBaseFeeWei,omitempty"`
|
||||
}
|
||||
|
||||
// String implements the stringer interface.
|
||||
func (c Prague1Config) String() string {
|
||||
banner := "prague1"
|
||||
if c.Time != nil {
|
||||
banner += fmt.Sprintf(
|
||||
"(time: %v, baseFeeChangeDenominator: %v, minimumBaseFeeWei: %v)",
|
||||
*c.Time, c.BaseFeeChangeDenominator, c.MinimumBaseFeeWei,
|
||||
)
|
||||
}
|
||||
return banner
|
||||
}
|
||||
|
||||
// EthashConfig is the consensus engine configs for proof-of-work based sealing.
|
||||
|
|
@ -525,6 +650,9 @@ func (c *ChainConfig) Description() string {
|
|||
if c.PragueTime != nil {
|
||||
banner += fmt.Sprintf(" - Prague: @%-10v\n", *c.PragueTime)
|
||||
}
|
||||
if c.Berachain.Prague1.Time != nil {
|
||||
banner += fmt.Sprintf(" - Prague1: @%-10v\n", *c.Berachain.Prague1.Time)
|
||||
}
|
||||
if c.OsakaTime != nil {
|
||||
banner += fmt.Sprintf(" - Osaka: @%-10v\n", *c.OsakaTime)
|
||||
}
|
||||
|
|
@ -644,6 +772,12 @@ func (c *ChainConfig) IsPrague(num *big.Int, time uint64) bool {
|
|||
return c.IsLondon(num) && isTimestampForked(c.PragueTime, time)
|
||||
}
|
||||
|
||||
// IsPrague1 returns whether time is either equal to the Prague1 fork time or greater.
|
||||
// NOTE: Prague1 is a Berachain fork and must be on Ethereum's Prague fork.
|
||||
func (c *ChainConfig) IsPrague1(num *big.Int, time uint64) bool {
|
||||
return c.IsPrague(num, time) && isTimestampForked(c.Berachain.Prague1.Time, time)
|
||||
}
|
||||
|
||||
// IsOsaka returns whether time is either equal to the Osaka fork time or greater.
|
||||
func (c *ChainConfig) IsOsaka(num *big.Int, time uint64) bool {
|
||||
return c.IsLondon(num) && isTimestampForked(c.OsakaTime, time)
|
||||
|
|
@ -727,6 +861,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
|
|||
{name: "shanghaiTime", timestamp: c.ShanghaiTime},
|
||||
{name: "cancunTime", timestamp: c.CancunTime, optional: true},
|
||||
{name: "pragueTime", timestamp: c.PragueTime, optional: true},
|
||||
{name: "prague1Time", timestamp: c.Berachain.Prague1.Time, optional: true},
|
||||
{name: "osakaTime", timestamp: c.OsakaTime, optional: true},
|
||||
{name: "verkleTime", timestamp: c.VerkleTime, optional: true},
|
||||
} {
|
||||
|
|
@ -872,6 +1007,9 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, headNumber *big.Int,
|
|||
if isForkTimestampIncompatible(c.PragueTime, newcfg.PragueTime, headTimestamp) {
|
||||
return newTimestampCompatError("Prague fork timestamp", c.PragueTime, newcfg.PragueTime)
|
||||
}
|
||||
if isForkTimestampIncompatible(c.Berachain.Prague1.Time, newcfg.Berachain.Prague1.Time, headTimestamp) {
|
||||
return newTimestampCompatError("Prague1 fork timestamp", c.Berachain.Prague1.Time, newcfg.Berachain.Prague1.Time)
|
||||
}
|
||||
if isForkTimestampIncompatible(c.OsakaTime, newcfg.OsakaTime, headTimestamp) {
|
||||
return newTimestampCompatError("Osaka fork timestamp", c.OsakaTime, newcfg.OsakaTime)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ const (
|
|||
Shanghai
|
||||
Cancun
|
||||
Prague
|
||||
Prague1
|
||||
Osaka
|
||||
)
|
||||
|
||||
|
|
@ -71,5 +72,6 @@ var forkToString = map[Fork]string{
|
|||
Shanghai: "Shanghai",
|
||||
Cancun: "Cancun",
|
||||
Prague: "Prague",
|
||||
Prague1: "Prague1",
|
||||
Osaka: "Osaka",
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue