Commit graph

16056 commits

Author SHA1 Message Date
Matthieu Vachon
a51126d97f Brought back README.fh.md from Firehose 2.4 branch 2025-02-25 14:52:15 -05:00
Matthieu Vachon
7963c2b27d Removed uneeded priority=1000 (since we lowered edge one instead) 2025-02-24 20:11:43 -05:00
Matthieu Vachon
72f9828339 Decreases 'edge' priority so OCI label 'version' is taken from ref first and sha second 2025-02-24 20:10:35 -05:00
Marius van der Wijden
c93baac6cc params: add deposit contract addresses (#31247)
We forgot to add the deposit contract address for holesky, causing
deposits to not be flagged correctly

---------

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
2025-02-24 19:56:05 -05:00
Matthieu Vachon
5eea0a8b10 Seems we need full versions for Docker metadata otherwise the final version labels is wrong 2025-02-24 18:50:52 -05:00
Matthieu Vachon
c667ec8c04 Finish release process 2025-02-24 10:32:13 -05:00
Matthieu Vachon
6f6702c591 Remove release notes for now and trying fixing double geth- prefix in Docker tag release 2025-02-22 22:13:47 -05:00
Matthieu Vachon
9217c9e6c5 Move release to it's own job 2025-02-22 22:05:35 -05:00
Matthieu Vachon
4c77c2bc05 Adjusted where we copy files over 2025-02-22 21:53:33 -05:00
Matthieu Vachon
25fdf6fc65 Added release handling on tags 2025-02-22 21:47:20 -05:00
Matthieu Vachon
b8fd5d0486 Fixing docker rleease 2025-02-22 21:27:38 -05:00
Matthieu Vachon
cc698453f8 Backward compatibility now stops at Prague hard-fork 2025-02-21 20:36:32 -05:00
Matthieu Vachon
d444c54548 Fixed wrong assumption about SelfDestruct having only at max one withdraw balance change
It appears a self destruct can really lead to 3 balance changes, 2 of which are withdraw of the money if the contract being self destructed and the self destruct beneficiary are the same.

We thought it was a bug in the Geth tracing API but it appears it's not and we must actually correctly handle that when fixing up balance changes. So we now support the case where there is 2 withdraws, in this case, the old Firehose 2.x was only ever keeping the last one, so we can simply filter it out of the changes to retain backward compatibility.
2025-02-21 16:49:38 -05:00
Matthieu Vachon
bbcf323c96 Small refactor to re-use isChainIDOneOf function 2025-02-21 11:34:37 -05:00
Matthieu Vachon
1b285b8c81 Added tests to ensure we covers balance and gas change correctly 2025-02-21 11:31:32 -05:00
Matthieu Vachon
66d5c7ee57 Added generated stringer for GasChangeReason enum 2025-02-21 11:13:24 -05:00
Matthieu Vachon
95a7b396a8 Fixed backward compatibility ordinals wrongly re-ordered in Firehose
At some point in the Firehose 2.x release lifecycle, a bug was introduced that caused
ordinals within the block to be broken. The problem was that system calls and block level balance changes
were done using a block level ordinals and transactions were done using their own level ordinals.

Then in the console reader, the ordinals were re-ordered correctly. While block level balance changes
were re-ordered correctly, the system calls were not.

Here, we re-apply the same bug to the transactions to ensure that the Firehose 3.x release lifecycle.
First, we are going to reset the ordinal once we detect this is the first transaction.
Then in the end block, we are going to fix balance & code changes ordinals.
2025-02-20 19:31:10 -05:00
Matthieu Vachon
56ff050d95 Normalized golden Firehose JSON tests 2025-02-20 19:24:51 -05:00
Matthieu Vachon
299fd9600e Merge tag 'v1.15.2' into firehose-fh3.0 2025-02-20 12:56:47 -05:00
Matthieu Vachon
e2a3cfbf4c Fixed ordinals and account creations differences on system calls 2025-02-20 10:21:58 -05:00
Matthieu Vachon
69a64b2b78 Removed prev in OnNewAccount as it was unsued 2025-02-20 10:19:05 -05:00
Matthieu Vachon
b20db144a2 Added greater support for SetCode transactions 2025-02-19 15:51:20 -05:00
Felix Lange
c8c62dafc7 version: release go-ethereum v1.15.2 stable 2025-02-17 11:59:48 +01:00
Felix Lange
d37a0b8cd0
eth/protocols/eth: add discovery iterator to protocol (#31185)
We somehow forgot to add this in #30302, so discv5 and DNS have actually
been disabled since then.

Fixes #31168
2025-02-17 10:12:03 +01:00
Felix Lange
c113e3b5b1
p2p: fix marshaling of NAT in TOML (#31192)
This fixes an issue where a nat.Interface unmarshaled from the TOML
config file could not be re-marshaled to TOML correctly.

Fixes #31183
2025-02-17 09:47:12 +01:00
Felix Lange
e5bc789185
consensus/beacon: fix isPostMerge for mainnet (#31191)
This fixes a regression introduced in #31153 where we didn't consider
mainnet to be in PoS, causing #31190.
The problem is, `params.MainnetChainConfig` does not have a defined
`MergeNetsplitBlock`, so it isn't considered to be in PoS in
`CalcDifficulty`.
2025-02-17 07:30:06 +01:00
Stéphane Duchesneau
dbe1dac352 add missing gas change reasons 2025-02-14 17:10:16 -05:00
Matthieu Vachon
294e2863e6 Fixed tests 2025-02-14 14:10:38 -05:00
Stéphane Duchesneau
9f4c25d3ee add support for types.SetCodeTxType, fix testdata prestate JSON panicking on empty config sections 2025-02-14 14:10:29 -05:00
Matthieu Vachon
4664464ff8 Merge tag 'v1.15.1' into firehose-fh3.0 2025-02-14 14:10:10 -05:00
Matthieu Vachon
8e4d7515d1 Removed customized genesis changes, we use a custom genesis now so no need to modify it 2025-02-14 13:54:43 -05:00
Matthieu Vachon
452901f9e9 Removed modification of internal/build/util.go 2025-02-13 15:34:39 -05:00
minh-bq
68de26e346
core/types: create block's bloom by merging receipts' bloom (#31129)
Currently, when calculating block's bloom, we loop through all the
receipt logs to calculate the hash value. However, normally, after going
through applyTransaction, the receipt's bloom is already calculated
based on the receipt log, so the block's bloom can be calculated by just
ORing these receipt's blooms.
```
goos: darwin
goarch: arm64
pkg: github.com/ethereum/go-ethereum/core/types
cpu: Apple M1 Pro
BenchmarkCreateBloom
BenchmarkCreateBloom/small
BenchmarkCreateBloom/small-10             810922              1481 ns/op             104 B/op          5 allocs/op
BenchmarkCreateBloom/large
BenchmarkCreateBloom/large-10               8173            143764 ns/op            9614 B/op        401 allocs/op
BenchmarkCreateBloom/small-mergebloom
BenchmarkCreateBloom/small-mergebloom-10                 5178918               232.0 ns/op             0 B/op          0 allocs/op
BenchmarkCreateBloom/large-mergebloom
BenchmarkCreateBloom/large-mergebloom-10                   54110             22207 ns/op               0 B/op          0 allocs/op
```

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
2025-02-13 18:05:58 +01:00
Felix Lange
77762820c9 version: begin v1.15.2 release cycle 2025-02-13 16:26:36 +01:00
Felix Lange
b027a90ac0 version: release go-ethereum v1.15.1 stable 2025-02-13 16:21:36 +01:00
rjl493456442
913fee4be9
core/rawdb: skip setting flushOffset in read-only mode (#31173)
This PR addresses a flaw in the freezer table upgrade path.

In v1.15.0, freezer table v2 was introduced, including an additional 
field (`flushOffset`) maintained in the metadata file. To ensure 
backward compatibility, an upgrade path was implemented for legacy
freezer tables by setting `flushOffset` to the size of the index file.

However, if the freezer table is opened in read-only mode, this file 
write operation is rejected, causing Geth to shut down entirely.

Given that invalid items in the freezer index file can be detected and 
truncated, all items in freezer v0 index files are guaranteed to be
complete. Therefore, when operating in read-only mode, it is safe to
use the  freezer data without performing an upgrade.
2025-02-13 14:48:03 +01:00
Felix Lange
8ec4a06b3f
core: sanity-check fork configuration in genesis (#31171)
This is to prevent a crash on startup with a custom genesis configuration.
With this change in place, upgrading a chain created by geth v1.14.x and
below will now print an error instead of crashing:

    Fatal: Failed to register the Ethereum service: invalid chain configuration: missing entry for fork "cancun" in blobSchedule

Arguably this is not great, and it should just auto-upgrade the config.
We'll address this in a follow-up PR for geth v1.15.2
2025-02-13 13:05:05 +01:00
Marius van der Wijden
24ed0b5066
go.mod: update blst to v0.3.14 (#31165)
closes https://github.com/ethereum/go-ethereum/issues/31072

BLST released their newest version which includes a fix for go v.1.24:
https://github.com/supranational/blst/releases/tag/v0.3.14

I went through all commits between 0.3.14 and 0.3.13 for a sanity check
2025-02-13 09:45:27 +01:00
jwasinger
58f65c60c2
trie: copy preimage store pointer in StateTrie.Copy (#31158)
This fixes an error where executing `evm run --dump ...` omits preimages
from the dump (because the statedb used for execution is a copy of
another instance).
2025-02-12 09:55:00 +08:00
Sina M
da71839a27
internal/ethapi: fix panic in debug methods (#31157)
Fixes an error when the block is not found in debug methods.
2025-02-11 16:02:30 +01:00
lightclient
cdb66c89d6
core/txpool/legacypool: add support for SetCode transactions (#31073)
The new SetCode transaction type introduces some additional complexity
when handling the transaction pool.

This complexity stems from two new account behaviors:

1. The balance and nonce of an account can change during regular
   transaction execution *when they have a deployed delegation*.
2. The nonce and code of an account can change without any EVM execution
   at all. This is the "set code" mechanism introduced by EIP-7702.

The first issue has already been considered extensively during the design
of ERC-4337, and we're relatively confident in the solution of simply
limiting the number of in-flight pending transactions an account can have
to one. This puts a reasonable bound on transaction cancellation. Normally
to cancel, you would need to spend 21,000 gas. Now it's possible to cancel
for around the cost of warming the account and sending value
(`2,600+9,000=11,600`). So 50% cheaper.

The second issue is more novel and needs further consideration.
Since authorizations are not bound to a specific transaction, we
cannot drop transactions with conflicting authorizations. Otherwise,
it might be possible to cherry-pick authorizations from txs and front
run them with different txs at much lower fee amounts, effectively DoSing
the authority. Fortunately, conflicting authorizations do not affect the
underlying validity of the transaction so we can just accept both.

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-02-11 14:15:04 +01:00
Chen Kai
22b9354494
p2p/discover: make discv5 response timeout configurable (#31119) 2025-02-11 13:52:43 +01:00
Harry Ngo
d2ca7cf9f1
p2p/discover: remove unused parameter in revalidationList.get (#31155) 2025-02-11 13:45:44 +01:00
Felix Lange
9064038a86
consensus/beacon: remove TestingTTDBlock (#31153)
This removes the method `TestingTTDBlock` introduced by #30744. It was
added to make the beacon consensus engine aware of the merge block in
tests without relying on the total difficulty. However, tracking the
merge block this way is very annoying. We usually configure forks in the
`ChainConfig`, but the method is on the consensus engine, which isn't
always created in the same place. By sidestepping the `ChainConfig` we
don't get the usual fork-order checking, so it's possible to enable the
merge before the London fork, for example. This in turn can lead to very
hard-to-debug outputs and validation errors.

So here I'm changing the consensus engine to check the
`MergeNetsplitBlock` instead. Alternatively, we assume a network is
merged if it has a `TerminalTotalDifficulty` of zero, which is a very
common configuration in tests.
2025-02-11 13:44:25 +01:00
Stéphane Duchesneau
389c881db0 fix golden images for tests 2025-02-10 16:04:24 -05:00
Matthieu Vachon
421cc2a76d Fixed missing OnNewAccount hook
Firehose: In previous versions of the EVM, there was no `evm.StateDB.Exist` above and the `CreateAccount` was always called. This was leading to always get a `OnNewAccount` event in the tracer as we were not checking previous existence of the account.

With the introduction of the `Exist` method, there is now cases where `CreateAccount` is not called if it was previously existing.

To keep the same tracing behavior as before, we call the `OnNewAccount` manually here if the account was previously existing.
2025-02-10 11:04:43 -05:00
Matthieu Vachon
2cfff4e562 Added two new test cases and fixed double suicide withdraw
The StateDB SelftDestruct6780 must not record a balance change since the `opSelfdestruct6780` instruction implementation already calls `StateDB.SubBalance` to deduce the suicide refund.

The second test case show case a new account creations in 2.3 but that doesn't appear when running in backward compatibility mode using 3.0 version of the tracer.
2025-02-08 12:29:54 -05:00
lightclient
4cda8f06ea
params,core/forkid: enable prague on holesky and sepolia (#31139)
Agreed to the following fork dates for Holesky and Sepolia on ACDC 150

Holesky slot: 3710976	(Mon, Feb 24 at 21:55:12 UTC)
Sepolia slot: 7118848	(Wed, Mar 5 at 07:29:36 UTC)
2025-02-08 13:26:15 +01:00
Matthieu Vachon
5f3d5f3f19 Removed a bit of useless tracing in Firehose tracer 2025-02-07 16:56:09 -05:00
Matthieu Vachon
69012519aa Updated generate-prestate with removal of totalDifficulty 2025-02-07 16:55:45 -05:00