Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v1.14.2 #346

Merged
merged 67 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
938734b
params: begin 1.14.1 release cycle
karalabe Apr 24, 2024
0d4c388
core/state: remove account reset operation v2 (#29520)
holiman Apr 24, 2024
ac21f9b
trie: preallocate capacity for fields slice (#29614)
qcrao Apr 24, 2024
7362691
trie, consensus/clique: use maps.Clone (#29616)
AaronChen0 Apr 24, 2024
4f4f9d8
core/state: storage journal entry should revert dirtyness too (#29641)
karalabe Apr 24, 2024
2f6ff49
internal/ethapi: typo (#29636)
yosuzzy Apr 25, 2024
a13b925
eth/protocols/eth,p2p/discover: remove unnecessary checks (#29590)
undefinedor Apr 25, 2024
243cde0
core/state: better randomized testing (postcheck) on journalling (#29…
holiman Apr 25, 2024
1f628d8
build: build all the builders to build all the builders (#29647)
karalabe Apr 25, 2024
a0282fc
travis: temporarilly enable PPA builds for testing (#29648)
karalabe Apr 25, 2024
634d037
travis: revert the PPA fix hot-build, it works (#29649)
karalabe Apr 25, 2024
ad4fb2c
build: drop trusty from PPA builds, EOL and incompatible (#29651)
karalabe Apr 25, 2024
8d42e11
core/state: revert pending storage updates if they revert to original…
karalabe Apr 26, 2024
4253030
core/state: move metrics out of state objects (#29665)
karalabe Apr 26, 2024
4bdbaab
params: clarify consensus engine config `String`s (#29643)
roysc Apr 28, 2024
8c3fc56
p2p/simulations/adapters: use maps.Clone (#29626)
AaronChen0 Apr 29, 2024
fecc8a0
cmd/evm/internal/t8ntool, core: prealloc map sizes where possible (#2…
mask-pp Apr 30, 2024
69f815f
params: print time value instead of pointer in ConfigCompatError (#29…
NathanBSC Apr 30, 2024
c04b8e6
cmd/utils: require TTD and difficulty to be zero at genesis for dev m…
fselmo Apr 30, 2024
f46c878
core/rawdb: implement in-memory freezer (#29135)
rjl493456442 Apr 30, 2024
242b24a
trie/trienode: minor speedup in nodeset merging (#29683)
holiman Apr 30, 2024
ea89f9a
core/vm: remove a redundant zero check in opAddmod (#29672)
AaronChen0 Apr 30, 2024
7c7e3a7
eth/tracers/native: fix flatCallTracer Stop() bug (#29623)
draganm Apr 30, 2024
bd6bc37
core/vm: add subgroup checks for mul/mulexp for G1/G2 (#29637)
MariusVanDerWijden Apr 30, 2024
5e07054
internal/ethapi: listen to ctx cancellation in access list (#29686)
holiman Apr 30, 2024
2e8e35f
all: refactor so `NewBlock`, `WithBody` take `types.Body` (#29482)
lightclient Apr 30, 2024
45baf21
eth/downloader: purge pre-merge sync code (#29281)
jwasinger Apr 30, 2024
f8820f1
accounts, cmd/geth, core: close opened files (#29598)
songzhibin97 Apr 30, 2024
9f96e07
core/rawdb, trie: improve db APIs for accessing trie nodes (#29362)
rjl493456442 Apr 30, 2024
682ee82
core/state: parallelise parts of state commit (#29681)
karalabe May 2, 2024
bc609e8
core/vm: remove redundant error checks (#29692)
AaronChen0 May 2, 2024
fbf6238
params: fix misleading comments (#29684)
NathanBSC May 2, 2024
2c67fab
trie/pathdb: preallocate map capacity (#29690)
mask-pp May 2, 2024
86a1f0c
core/rawdb: fix ancient root folder (#29697)
rjl493456442 May 2, 2024
905e325
p2p/discover/v5wire: add tests for invalid handshake and auth data si…
kiarash8112 May 6, 2024
a09a610
core/tracing: add system call callback when performing `ProcessBeacon…
maoueh May 6, 2024
43cbcd7
core, core/state: move TriesInMemory to state package (#29701)
gballet May 6, 2024
3e896c8
ethdb/pebble: fix pebble metrics registration (#29699)
magicxyyz May 6, 2024
e4b8058
eth/gasprice: add query limit for FeeHistory to defend DDOS attack (#…
NathanBSC May 7, 2024
d6e91e2
eth/gasestimator: include blobs in virtual balance computation (#29703)
nand2 May 7, 2024
71aa15c
travis: use ubuntu noble (24.04) instead of bionic (18.04) (#29723)
holiman May 7, 2024
e96de64
build: upgrade to go 1.22.3 (#29725)
fjl May 7, 2024
9ec5008
core: use in-memory freezer for tests (#29720)
rjl493456442 May 8, 2024
dd4afb9
.travis.yml: fix install of gcc-multilib (#29733)
fjl May 8, 2024
6154f87
.travis.yml: fix apt-get options (#29734)
fjl May 8, 2024
dd09f7e
params: release go-ethereum v1.14.1 stable
fjl May 8, 2024
14f4228
params: begin v1.14.2 release cycle
fjl May 8, 2024
eeb2208
.travis.yml: fix package install on PPA builder
fjl May 8, 2024
35b2d07
params: release go-ethereum v1.14.2 stable
fjl May 8, 2024
7ff1f0d
Merge remote-tracking branch 'go-ethereum/merge-v1.14.2' into merge-v…
amsanghi Jul 24, 2024
a8c0734
Merge branch 'merge-1.14.0' into merge-v1.14.2
amsanghi Aug 5, 2024
25b12e8
fix test
amsanghi Aug 5, 2024
8140b3d
Add a notion of zombies to preserve empty account behavior
PlasmaPower Aug 5, 2024
cbe2004
Fix zombie creation to only happen for destructed objects
PlasmaPower Aug 6, 2024
ee114ed
Fix tracing of subtracting zero balance
PlasmaPower Aug 6, 2024
484bf3a
Merge branch 'merge-1.14.0' into merge-v1.14.2
amsanghi Oct 9, 2024
0adf3d1
Make zombie creation explicit
PlasmaPower Oct 10, 2024
5cbfbaf
Clarify CreateZombieIfDeleted comment
PlasmaPower Oct 10, 2024
81c74ba
Merge branch 'merge-1.14.0' into merge-v1.14.2
amsanghi Oct 29, 2024
5c63736
Merge remote-tracking branch 'origin/master' into merge-v1.14.2
tsahee Nov 7, 2024
219a778
Merge pull request #347 from OffchainLabs/zombies-for-v1.14.2
tsahee Nov 7, 2024
6582070
Merge branch 'master' into merge-v1.14.2
amsanghi Nov 12, 2024
190c916
Changes based on PR comments
amsanghi Nov 12, 2024
9cf4acc
fix lint
amsanghi Nov 12, 2024
d0aed85
undo test changes
amsanghi Nov 12, 2024
2c34a6d
Changes based on PR comments
amsanghi Nov 19, 2024
d840c42
Merge branch 'master' into merge-v1.14.2
amsanghi Nov 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 15 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: type = push
os: linux
arch: amd64
dist: bionic
dist: noble
go: 1.22.x
env:
- docker
Expand All @@ -32,7 +32,7 @@ jobs:
if: type = push
os: linux
arch: arm64
dist: bionic
dist: noble
go: 1.22.x
env:
- docker
Expand All @@ -49,21 +49,20 @@ jobs:
- stage: build
if: type = push
os: linux
dist: bionic
dist: noble
sudo: required
go: 1.22.x
env:
- azure-linux
git:
submodules: false # avoid cloning ethereum/tests
addons:
apt:
packages:
- gcc-multilib
script:
# Build for the primary platforms that Trusty can manage
# 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
- 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

Expand Down Expand Up @@ -100,7 +99,7 @@ jobs:
- stage: build
os: linux
arch: amd64
dist: bionic
dist: noble
go: 1.22.x
script:
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
Expand All @@ -109,14 +108,14 @@ jobs:
if: type = pull_request
os: linux
arch: arm64
dist: bionic
dist: noble
go: 1.21.x
script:
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

- stage: build
os: linux
dist: bionic
dist: noble
go: 1.21.x
script:
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
Expand All @@ -125,21 +124,14 @@ jobs:
- stage: build
if: type = cron || (type = push && tag ~= /^v[0-9]/)
os: linux
dist: bionic
dist: noble
go: 1.22.x
env:
- ubuntu-ppa
git:
submodules: false # avoid cloning ethereum/tests
addons:
apt:
packages:
- devscripts
- debhelper
- dput
- fakeroot
- python-bzrlib
- python-paramiko
before_install:
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends install devscripts debhelper dput fakeroot python-bzrlib python-paramiko
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 <[email protected]>"
Expand All @@ -148,7 +140,7 @@ jobs:
- stage: build
if: type = cron
os: linux
dist: bionic
dist: noble
go: 1.22.x
env:
- azure-purge
Expand All @@ -161,8 +153,7 @@ jobs:
- stage: build
if: type = cron
os: linux
dist: bionic
dist: noble
go: 1.22.x
script:
- travis_wait 30 go run build/ci.go test -race $TEST_PACKAGES

7 changes: 3 additions & 4 deletions accounts/keystore/keystore.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,10 @@ func (ks *KeyStore) Unlock(a accounts.Account, passphrase string) error {
// Lock removes the private key with the given address from memory.
func (ks *KeyStore) Lock(addr common.Address) error {
ks.mu.Lock()
if unl, found := ks.unlocked[addr]; found {
ks.mu.Unlock()
unl, found := ks.unlocked[addr]
ks.mu.Unlock()
if found {
ks.expire(addr, unl, time.Duration(0)*time.Nanosecond)
} else {
ks.mu.Unlock()
}
return nil
}
Expand Down
1 change: 1 addition & 0 deletions accounts/scwallet/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func (hub *Hub) readPairings() error {
}
return err
}
defer pairingFile.Close()

pairingData, err := io.ReadAll(pairingFile)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion beacon/engine/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash,
BlobGasUsed: params.BlobGasUsed,
ParentBeaconRoot: beaconRoot,
}
block := types.NewBlockWithHeader(header).WithBody(txs, nil /* uncles */).WithWithdrawals(params.Withdrawals)
block := types.NewBlockWithHeader(header).WithBody(types.Body{Transactions: txs, Uncles: nil, Withdrawals: params.Withdrawals})
if block.Hash() != params.BlockHash {
return nil, fmt.Errorf("blockhash mismatch, want %x, got %x", params.BlockHash, block.Hash())
}
Expand Down
4 changes: 1 addition & 3 deletions beacon/types/exec_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ func convertPayload[T payloadType](payload T, parentRoot *zrntcommon.Root) (*typ
panic("unsupported block type")
}

block := types.NewBlockWithHeader(&header)
block = block.WithBody(transactions, nil)
block = block.WithWithdrawals(withdrawals)
block := types.NewBlockWithHeader(&header).WithBody(types.Body{Transactions: transactions, Withdrawals: withdrawals})
if hash := block.Hash(); hash != expectedHash {
return nil, fmt.Errorf("Sanity check failed, payload hash does not match (expected %x, got %x)", expectedHash, hash)
}
Expand Down
66 changes: 47 additions & 19 deletions build/checksums.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,48 @@
# https://github.com/ethereum/execution-spec-tests/releases/download/v2.1.0/
ca89c76851b0900bfcc3cbb9a26cbece1f3d7c64a3bed38723e914713290df6c fixtures_develop.tar.gz

# version:golang 1.22.2
# version:golang 1.22.3
# https://go.dev/dl/
374ea82b289ec738e968267cac59c7d5ff180f9492250254784b2044e90df5a9 go1.22.2.src.tar.gz
33e7f63077b1c5bce4f1ecadd4d990cf229667c40bfb00686990c950911b7ab7 go1.22.2.darwin-amd64.tar.gz
660298be38648723e783ba0398e90431de1cb288c637880cdb124f39bd977f0d go1.22.2.darwin-arm64.tar.gz
efc7162b0cad2f918ac566a923d4701feb29dc9c0ab625157d49b1cbcbba39da go1.22.2.freebsd-386.tar.gz
d753428296e6709527e291fd204700a587ffef2c0a472b21aebea11618245929 go1.22.2.freebsd-amd64.tar.gz
586d9eb7fe0489ab297ad80dd06414997df487c5cf536c490ffeaa8d8f1807a7 go1.22.2.linux-386.tar.gz
5901c52b7a78002aeff14a21f93e0f064f74ce1360fce51c6ee68cd471216a17 go1.22.2.linux-amd64.tar.gz
36e720b2d564980c162a48c7e97da2e407dfcc4239e1e58d98082dfa2486a0c1 go1.22.2.linux-arm64.tar.gz
9243dfafde06e1efe24d59df6701818e6786b4adfdf1191098050d6d023c5369 go1.22.2.linux-armv6l.tar.gz
251a8886c5113be6490bdbb955ddee98763b49c9b1bf4c8364c02d3b482dab00 go1.22.2.linux-ppc64le.tar.gz
2b39019481c28c560d65e9811a478ae10e3ef765e0f59af362031d386a71bfef go1.22.2.linux-s390x.tar.gz
651753c06df037020ef4d162c5b273452e9ba976ed17ae39e66ef7ee89d8147e go1.22.2.windows-386.zip
8e581cf330f49d3266e936521a2d8263679ef7e2fc2cbbceb85659122d883596 go1.22.2.windows-amd64.zip
ddfca5beb9a0c62254266c3090c2555d899bf3e7aa26243e7de3621108f06875 go1.22.2.windows-arm64.zip
80648ef34f903193d72a59c0dff019f5f98ae0c9aa13ade0b0ecbff991a76f68 go1.22.3.src.tar.gz
adc9f5fee89cd53d907eb542d3b269d9d8a08a66bf1ab42175450ffbb58733fb go1.22.3.aix-ppc64.tar.gz
610e48c1df4d2f852de8bc2e7fd2dc1521aac216f0c0026625db12f67f192024 go1.22.3.darwin-amd64.tar.gz
02abeab3f4b8981232237ebd88f0a9bad933bc9621791cd7720a9ca29eacbe9d go1.22.3.darwin-arm64.tar.gz
a5b3d54905f17af2ceaf7fcfe92edee67a5bd4eccd962dd89df719ace3e0894d go1.22.3.dragonfly-amd64.tar.gz
b9989ca87695ae93bacde6f3aa7b13cde5f3825515eb9ed9bbef014273739889 go1.22.3.freebsd-386.tar.gz
7483961fae29d7d768afd5c9c0f229354ca3263ab7119c20bc182761f87cbc74 go1.22.3.freebsd-amd64.tar.gz
edf1f0b8ecf68b14faeedb4f5d868a58c4777a0282bd85e5115c39c010cd0130 go1.22.3.freebsd-arm.tar.gz
572eb70e5e835fbff7d53ebf473f611d7eb458c428f8dbd98a49196883c3309e go1.22.3.freebsd-arm64.tar.gz
ef94eb2b74402e436dce970584222c4e454eb3093908591149bd2ded6862b8af go1.22.3.freebsd-riscv64.tar.gz
3c3f498c68334cbd11f72aadfb6bcb507eb8436cebc50f437a0523cd4c5e03d1 go1.22.3.illumos-amd64.tar.gz
fefba30bb0d3dd1909823ee38c9f1930c3dc5337a2ac4701c2277a329a386b57 go1.22.3.linux-386.tar.gz
8920ea521bad8f6b7bc377b4824982e011c19af27df88a815e3586ea895f1b36 go1.22.3.linux-amd64.tar.gz
6c33e52a5b26e7aa021b94475587fce80043a727a54ceb0eee2f9fc160646434 go1.22.3.linux-arm64.tar.gz
f2bacad20cd2b96f23a86d4826525d42b229fd431cc6d0dec61ff3bc448ef46e go1.22.3.linux-armv6l.tar.gz
41e9328340544893482b2928ae18a9a88ba18b2fdd29ac77f4d33cf1815bbdc2 go1.22.3.linux-loong64.tar.gz
cf4d5faff52e642492729eaf396968f43af179518be769075b90bc1bf650abf6 go1.22.3.linux-mips.tar.gz
3bd009fe2e3d2bfd52433a11cb210d1dfa50b11b4c347a293951efd9e36de945 go1.22.3.linux-mips64.tar.gz
5913b82a042188ef698f7f2dfd0cd0c71f0508a4739de9e41fceff3f4dc769b4 go1.22.3.linux-mips64le.tar.gz
441afebca555be5313867b4577f237c7b5c0fff4386e22e47875b9f805abbec5 go1.22.3.linux-mipsle.tar.gz
f3b53190a76f4a35283501ba6d94cbb72093be0c62ff735c6f9e586a1c983381 go1.22.3.linux-ppc64.tar.gz
04b7b05283de30dd2da20bf3114b2e22cc727938aed3148babaf35cc951051ac go1.22.3.linux-ppc64le.tar.gz
d4992d4a85696e3f1de06cefbfc2fd840c9c6695d77a0f35cfdc4e28b2121c20 go1.22.3.linux-riscv64.tar.gz
2aba796417a69be5f3ed489076bac79c1c02b36e29422712f9f3bf51da9cf2d4 go1.22.3.linux-s390x.tar.gz
d6e6113542dd9f23db899e177fe23772bac114a5ea5e8ee436b9da68628335a8 go1.22.3.netbsd-386.tar.gz
c33cee3075bd18ceefddd75bafa8efb51fbdc17b5ee74275122e7a927a237a4c go1.22.3.netbsd-amd64.tar.gz
1ab251df3c85f3b391a09565ca52fb6e1306527d72852d553e9ab74eabb4ecf8 go1.22.3.netbsd-arm.tar.gz
1d194fe53f5d82f9a612f848950d8af8cab7cb40ccc03f10c4eb1c9808ff1a0c go1.22.3.netbsd-arm64.tar.gz
91d6601727f08506e938640885d3ded784925045e3a4444fd9b4b936efe1b1e0 go1.22.3.openbsd-386.tar.gz
09d0c91ae35a4eea92615426992062ca236cc2f66444fb0b0a24cd3b13bd5297 go1.22.3.openbsd-amd64.tar.gz
338da30cc2c97b9458e0b4caa2509f67bba55d3de16fb7d31775baca82d2e3dc go1.22.3.openbsd-arm.tar.gz
53eadfabd2b7dd09a64941421afee2a2888e2a4f94f353b27919b1dad1171a21 go1.22.3.openbsd-arm64.tar.gz
8a1a2842ae8dcf2374bb05dff58074b368bb698dc9c211c794c1ff119cd9fdc7 go1.22.3.plan9-386.tar.gz
f9816d3dd9e730cad55085ea08c1f0c925720728f9c945fff59cd24d2ac2db7b go1.22.3.plan9-amd64.tar.gz
f4d3d7b17c9e1b1635fcb287b5b5ab5b60acc9db3ba6a27f2b2f5d6537a2ef95 go1.22.3.plan9-arm.tar.gz
46b7999ee94d91b21ad6940b5a3131ff6fe53ef97be9a34e582e2a3ad7263e95 go1.22.3.solaris-amd64.tar.gz
f60f63b8a0885e0d924f39fd284aee5438fe87d8c3d8545a312adf43e0d9edac go1.22.3.windows-386.zip
cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39 go1.22.3.windows-amd64.zip
40b37f4b068fc759f3a0dd61176a0f7570a4ba48bed8561c31d3967a3583981a go1.22.3.windows-arm.zip
59b76ee22b9b1c3afbf7f50e3cb4edb954d6c0d25e5e029ab5483a6804d61e71 go1.22.3.windows-arm64.zip

# version:golangci 1.55.2
# https://github.com/golangci/golangci-lint/releases/
Expand Down Expand Up @@ -56,10 +82,12 @@ a5e68ae73d38748b5269fad36ac7575e3c162a5dc63ef58abdea03cc5da4522a golangci-lint-
# This is the builder on PPA that will build Go itself (inception-y), don't modify!
#
# This version is fine to be old and full of security holes, we just use it
# to build the latest Go. Don't change it. If it ever becomes insufficient,
# we need to switch over to a recursive builder to jump across supported
# versions.
# to build the latest Go. Don't change it.
#
# version:ppa-builder 1.19.6
# version:ppa-builder-1 1.19.6
# https://go.dev/dl/
d7f0013f82e6d7f862cc6cb5c8cdb48eef5f2e239b35baa97e2f1a7466043767 go1.19.6.src.tar.gz

# version:ppa-builder-2 1.21.9
# https://go.dev/dl/
58f0c5ced45a0012bce2ff7a9df03e128abcc8818ebabe5027bb92bafe20e421 go1.21.9.src.tar.gz
96 changes: 45 additions & 51 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,15 @@ var (
debEthereum,
}

// Distros for which packages are created.
// Note: vivid is unsupported because there is no golang-1.6 package for it.
// Note: the following Ubuntu releases have been officially deprecated on Launchpad:
// wily, yakkety, zesty, artful, cosmic, disco, eoan, groovy, hirsuite, impish,
// kinetic, lunar
debDistroGoBoots = map[string]string{
"trusty": "golang-1.11", // 14.04, EOL: 04/2024
"xenial": "golang-go", // 16.04, EOL: 04/2026
"bionic": "golang-go", // 18.04, EOL: 04/2028
"focal": "golang-go", // 20.04, EOL: 04/2030
"jammy": "golang-go", // 22.04, EOL: 04/2032
"mantic": "golang-go", // 23.10, EOL: 07/2024
}
// Distros for which packages are created
debDistros = []string{
"xenial", // 16.04, EOL: 04/2026
"bionic", // 18.04, EOL: 04/2028
"focal", // 20.04, EOL: 04/2030
"jammy", // 22.04, EOL: 04/2032
"noble", // 24.04, EOL: 04/2034

debGoBootPaths = map[string]string{
"golang-1.11": "/usr/lib/go-1.11",
"golang-go": "/usr/lib/go",
"mantic", // 23.10, EOL: 07/2024
}

// This is where the tests should be unpacked.
Expand Down Expand Up @@ -694,8 +686,8 @@ func doDebianSource(cmdline []string) {
}
// Download and verify the Go source packages.
var (
gobootbundle = downloadGoBootstrapSources(*cachedir)
gobundle = downloadGoSources(*cachedir)
gobootbundles = downloadGoBootstrapSources(*cachedir)
gobundle = downloadGoSources(*cachedir)
)
// Download all the dependencies needed to build the sources and run the ci script
srcdepfetch := tc.Go("mod", "download")
Expand All @@ -708,17 +700,19 @@ func doDebianSource(cmdline []string) {

// Create Debian packages and upload them.
for _, pkg := range debPackages {
for distro, goboot := range debDistroGoBoots {
for _, distro := range debDistros {
// Prepare the debian package with the go-ethereum sources.
meta := newDebMetadata(distro, goboot, *signer, env, now, pkg.Name, pkg.Version, pkg.Executables)
meta := newDebMetadata(distro, *signer, env, now, pkg.Name, pkg.Version, pkg.Executables)
pkgdir := stageDebianSource(*workdir, meta)

// Add bootstrapper Go source code
if err := build.ExtractArchive(gobootbundle, pkgdir); err != nil {
log.Fatalf("Failed to extract bootstrapper Go sources: %v", err)
}
if err := os.Rename(filepath.Join(pkgdir, "go"), filepath.Join(pkgdir, ".goboot")); err != nil {
log.Fatalf("Failed to rename bootstrapper Go source folder: %v", err)
for i, gobootbundle := range gobootbundles {
if err := build.ExtractArchive(gobootbundle, pkgdir); err != nil {
log.Fatalf("Failed to extract bootstrapper Go sources: %v", err)
}
if err := os.Rename(filepath.Join(pkgdir, "go"), filepath.Join(pkgdir, fmt.Sprintf(".goboot-%d", i+1))); err != nil {
log.Fatalf("Failed to rename bootstrapper Go source folder: %v", err)
}
}
// Add builder Go source code
if err := build.ExtractArchive(gobundle, pkgdir); err != nil {
Expand Down Expand Up @@ -754,21 +748,26 @@ func doDebianSource(cmdline []string) {
}
}

// downloadGoBootstrapSources downloads the Go source tarball that will be used
// downloadGoBootstrapSources downloads the Go source tarball(s) that will be used
// to bootstrap the builder Go.
func downloadGoBootstrapSources(cachedir string) string {
func downloadGoBootstrapSources(cachedir string) []string {
csdb := build.MustLoadChecksums("build/checksums.txt")
gobootVersion, err := build.Version(csdb, "ppa-builder")
if err != nil {
log.Fatal(err)
}
file := fmt.Sprintf("go%s.src.tar.gz", gobootVersion)
url := "https://dl.google.com/go/" + file
dst := filepath.Join(cachedir, file)
if err := csdb.DownloadFile(url, dst); err != nil {
log.Fatal(err)

var bundles []string
for _, booter := range []string{"ppa-builder-1", "ppa-builder-2"} {
gobootVersion, err := build.Version(csdb, booter)
if err != nil {
log.Fatal(err)
}
file := fmt.Sprintf("go%s.src.tar.gz", gobootVersion)
url := "https://dl.google.com/go/" + file
dst := filepath.Join(cachedir, file)
if err := csdb.DownloadFile(url, dst); err != nil {
log.Fatal(err)
}
bundles = append(bundles, dst)
}
return dst
return bundles
}

// downloadGoSources downloads the Go source tarball.
Expand Down Expand Up @@ -846,10 +845,7 @@ type debPackage struct {
}

type debMetadata struct {
Env build.Environment
GoBootPackage string
GoBootPath string

Env build.Environment
PackageName string

// go-ethereum version being built. Note that this
Expand Down Expand Up @@ -877,21 +873,19 @@ func (d debExecutable) Package() string {
return d.BinaryName
}

func newDebMetadata(distro, goboot, author string, env build.Environment, t time.Time, name string, version string, exes []debExecutable) debMetadata {
func newDebMetadata(distro, author string, env build.Environment, t time.Time, name string, version string, exes []debExecutable) debMetadata {
if author == "" {
// No signing key, use default author.
author = "Ethereum Builds <[email protected]>"
}
return debMetadata{
GoBootPackage: goboot,
GoBootPath: debGoBootPaths[goboot],
PackageName: name,
Env: env,
Author: author,
Distro: distro,
Version: version,
Time: t.Format(time.RFC1123Z),
Executables: exes,
PackageName: name,
Env: env,
Author: author,
Distro: distro,
Version: version,
Time: t.Format(time.RFC1123Z),
Executables: exes,
}
}

Expand Down
2 changes: 1 addition & 1 deletion build/deb/ethereum/deb.control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: {{.Name}}
Section: science
Priority: extra
Maintainer: {{.Author}}
Build-Depends: debhelper (>= 8.0.0), {{.GoBootPackage}}
Build-Depends: debhelper (>= 8.0.0), golang-go
Standards-Version: 3.9.5
Homepage: https://ethereum.org
Vcs-Git: https://github.com/ethereum/go-ethereum.git
Expand Down
Loading
Loading