This is a not-particularly-important "cleanliness" PR. It removes the
last remnants of the `x/exp` package, where we used the `maps.Keys`
function.
The original returned the keys in a slice, but when it became 'native'
the signature changed to return an iterator, so the new idiom is
`slices.Collect(maps.Keys(theMap))`, unless of course the raw iterator
can be used instead.
In some cases, where we previously collect into slice and then sort, we
can now instead do `slices.SortXX` on the iterator instead, making the
code a bit more concise.
This PR might be _slighly_ less optimal, because the original `x/exp`
implementation allocated the slice at the correct size off the bat,
which I suppose the new code won't.
Putting it up for discussion.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
This changes the go mod tidy check to use the go mod tidy -diff command,
removing the custom diffing for go.mod. The check for go.mod/go.sum is now
performed in the check_generate action.
Also included is a change where check_generate and check_baddeps will now
run on the GitHub Actions lint step.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
This is for fixing the PPA build, which has been failing since the
update to Go 1.24. In Go 1.24, the required Go version for bootstrapping
was updated to 1.22. In general, they are following through with always
depending on the Go version two releases ago for bootstrapping.
Since we still support Ubuntu Xenial (16.04) until its EOL date of
04/2026, and Xenial only has golang 1.10 as a package, we now need to
build Go a total of four times to get the most recent version. I'm adding a step
for Go 1.23 here. This should last us until Go 1.25, which should be out around
04/2026, and we can hopefully drop the first bootstrapping step at that time.
when remove an non-SetCodeTxType transaction, error logs flood
```
t=2025-02-25T03:11:06+0000 lvl=error msg="Authority with untracked tx" addr=0xD5bf9221fCB1C31Cd1EE477a60c148d40dD63DC1 hash=0x626fdf205a5b1619deb2f9e51fed567353f80acbd522265b455daa0821c571d9
```
in this PR, only try to removeAuthorities for txs with SetCodeTxType
in addition, the performance of removeAuthorities improved a lot,
because no need range all `t.auths` now.
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
Fixes lint issue
>>> /home/appveyor/.gvm/gos/go1.24.0/bin/go generate ./...
ci.go:404: File changed: .git/index
ci.go:407: One or more generated files were updated by running 'go generate ./...'
exit status 1
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>
In this PR, several improvements have been made:
Authorization-related validations have been moved to legacyPool.
Previously, these checks were part of the standard validation procedure,
which applies common validations across different pools. Since these
checks are specific to SetCode transactions, relocating them to
legacyPool
is a more reasonable choice.
Additionally, authorization conflict checks are now performed regardless
of whether the transaction is a replacement or not.
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
Updates cloudflare-go from v0.79.0 to v0.114.0 which also gets rid of a
dependency to `github.com/hashicorp/go-retryablehttp` which had a
security flaw.
Diff:
https://github.com/cloudflare/cloudflare-go/compare/v0.79.0...v0.114.0
I did a quick sanity check on the diff on all methods that we use and
went through the release notes, there was nothing related to how we use
it afaict
I ran into this while trying to debug a discv5 thing. I tried to disable
DNS discovery using `--discovery.dns=false`, which doesn't work.
Annoyingly, geth started anyway and discarded the error silently. I
eventually found my mistake, but it took way longer than it should have.
Also including a small change to the error message for invalid DNS URLs
here. The user actually needs to see the URL to make sense of the error.
Fixed broken or outdated links and improved documentation formatting to
ensure consistency and correct references.
---------
Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Shout-out to @Gabriel-Trintinalia for discovering this issue. The gist
of it as follows:
When processing a block, we should provide the parent block as well as
the last 256 block hashes. Some of these parents data (specifically the
hash) was incorrect because even though during the processing of the
parent block we have updated the header, that header was not updating
the TransactionsRoot and ReceiptsRoot fields (types.NewBlock makes a new
copy of the header and changes it only on that instance).
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
The test occasionally fails when network connectivity is bad or if it
hits the wrong server. We usually don't add tests with external network
dependency so I'm removing them.
Fixes#31220
eth_simulate was not processing prague system calls for history contract and EL
requests resulting in inaccurate stateRoot and requestsRoot fields in the block.
I maintain an improved version of the go-ethereum assembler at
https://github.com/fjl/geas. We don't really use core/asm in our tests,
and it has some bugs that prevent it from being useful, so I'm removing
the package.
This PR does a few things including:
- Remove `ContractRef` interface
- Remove `vm.AccountRef` which implements `ContractRef` interface
- Maintain the `jumpDests` struct in EVM for sharing between call frames
- Simplify the delegateCall context initialization
Adds a comment on how to use rpc.*BlockNumber and the explanation of the block number tags
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This PR removes the assumption of the stacktrie and trie to have the
same ordering. This was hit by the fuzzers on oss-fuzz
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
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`.
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>