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

Prague code merge [v1.13.15, v1.14.11] #2753

Draft
wants to merge 578 commits into
base: develop
Choose a base branch
from

Conversation

buddh0
Copy link
Collaborator

@buddh0 buddh0 commented Nov 8, 2024

Description

Prague code merge [v1.13.15, v1.14.11(latest)]

Rationale

One of the preparations for activating the Prague hard fork on bsc, status
✅ compile pass

make all

todo:

  1. fix all CIs
  2. code review and fix
  3. various nodes and sync test
  4. local test with node-deploy script
  5. QA regression testing

Example

add an example CLI or API response...

Changes

Major Changes

eth: make transaction propagation paths in the network deterministic (#29034)
core/state: parallelise parts of state commit (#29681)
Load trie nodes concurrently with trie updates, speeding up block import by 5-7% (#29519#29768#29919).
core/vm: reject contract creation if the storage is non-empty (#28912)
Add state reader abstraction (#29761)
Stateless witness prefetcher changes (#29519)
not follow changes with trie_prefetcher, the implemenation in bsc is very different
core: use finalized block as the chain freeze indicator (#28683)
in bsc, this feature only enabled with multi-database

New EIPs

core/vm: enable bls-precompiles for Prague (#29552)
EIP-2935: Serve historical block hashes from state (#29465)

Clear Up

eth, eth/downloader: remove references to LightChain, LightSync (#29711)
eth/filters: remove support for pending logs(#29574)
Drop large-contract (500MB+) deletion DoS protection from pathdb post Cancun (#28940).
Remove totalDifficulty field from RPC, in accordance with spec update#30386

Merged but Reverted

consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169)
miner: refactor the miner, make the pending block on demand (#28623)
miner: lower default min miner tip from 1 gwei to 0.001 gwei(#29895)
bsc only has tip, 1 Gwei is the min value now
eth/downloader: purge pre-merge sync code (#29281)
all: remove forkchoicer and reorgNeeded (#29179)

Others

all: update to go version 1.23.0 (#30323)
Switch to using Go's native log/slog package instead of golang/exp (#29302).
Add the geth db inspect-history command to inspect pathdb state history (#29267).
Improve the discovery protocol's node revalidation (#29572#29864#29836).
Blobpool related flags in Geth now actually work. (#30203)

more details to refer release note between [v1.13.15, v1.14.11] in geth

SangIlMo and others added 30 commits June 4, 2024 10:59
…ateGas (#29738)

* internal/ethapi: recap higher args.Gas with block GasLimit in DoEstimateGas

* internal/ethapi: fix gas estimator capping code

* internal/ethapi: fix test

* fix goimports lint (remove space)

---------

Co-authored-by: Péter Szilágyi <[email protected]>
enode.Node was recently changed to store a cache of endpoint information. The IP address in the cache is a netip.Addr. I chose that type over net.IP because it is just better. netip.Addr is meant to be used as a value type. Copying it does not allocate, it can be compared with ==, and can be used as a map key.

This PR changes most uses of Node.IP() into Node.IPAddr(), which returns the cached value directly without allocating.
While there are still some public APIs left where net.IP is used, I have converted all code used internally by p2p/discover to the new types. So this does change some public Go API, but hopefully not APIs any external code actually uses.

There weren't supposed to be any semantic differences resulting from this refactoring, however it does introduce one: In package p2p/netutil we treated the 0.0.0.0/8 network (addresses 0.x.y.z) as LAN, but netip.Addr.IsPrivate() doesn't. The treatment of this particular IP address range is controversial, with some software supporting it and others not. IANA lists it as special-purpose and invalid as a destination for a long time, so I don't know why I put it into the LAN list. It has now been marked as special in p2p/netutil as well.
rlp: no need to repeat calling len
Fixes an issue where discovery responses were not recognized.
* cmd/utils, consensus/beacon, core/state: when configured via stub  flag: prefetch all reads from account/storage tries, terminate prefetcher synchronously.

* cmd, core/state: fix nil panic, fix error handling, prefetch nosnap too

* core/state: expand prefetcher metrics for reads and writes separately

* cmd/utils, eth: fix noop collect witness flag

---------

Co-authored-by: Péter Szilágyi <[email protected]>
* .golangci.yml: enable check for consistent receiver name

* beacon/light/sync: fix receiver name

* core/txpool/blobpool: fix receiver name

* core/types: fix receiver name

* internal/ethapi: use consistent receiver name 'api' for handler object

* signer/core/apitypes: fix receiver name

* signer/core: use consistent receiver name 'api' for handler object

* log: fix receiver name
* fix: Optimize regular initialization

* modify var name

* variable change to private types
…rom trie Commit (#29869)

* core/state, eth/protocols, trie, triedb/pathdb:  remove unused error return from trie Commit

* move set back to account-trie-update block scoping for easier readability

* address review

* undo tests submodule change

* trie:  panic if BatchSerialize returns an error in Verkle trie Commit

* trie: verkle comment nitpicks

---------

Co-authored-by: Péter Szilágyi <[email protected]>
zhiqiangxu and others added 27 commits September 23, 2024 09:17
Make `setEtherbase` fall thorugh and handle `miner.pending.feeRecipient` after showing deprecation-warning for `miner.etherbase`-flag.
This pull request skips the state snapshot update if the base layer is
not existent, eliminating the numerous warning logs after an unclean
shutdown.

Specifically, Geth will rewind its chain head to a historical block
after unclean shutdown and state snapshot will be remained as unchanged
waiting for recovery. During this period of time, the snapshot is unusable
and all state updates should be ignored/skipped for state snapshot update.
… global gascap is 0 (#30474)

In #27720, we introduced RPC global gas cap. A value of `0` means an unlimited gas cap. However, this was not the case for simulated calls. This PR fixes the behaviour.
This change exits with error if user provided a `--state.scheme` which is neither `hash` nor `path`
Extends the opcontext interface to include accessor for code being executed in current context. While it is possible to get the code via `statedb.GetCode`, that approach doesn't work for initcode.
This change adds more comprehensive benchmarks with a wider-variety of input sizes for g1 and g2 multi exponentiation.
…30506)

This PR fixes two tests, which had a tendency to sometimes write to the `*testing.T` `log` facility after the test function had completed, which is not allowed. This PR fixes it by using waitgroups to ensure that the handler/logwriter terminates before the test exits.

closes #30505
This update should only affect the fuzzers, as far as I know. But it
seems like it might also fix some arm/macos compilation issue in
ethereum/go-ethereum#30494

Closes #30494 (I think)
…rollback (#30495)

Here we move the method that drops all transactions by temporarily increasing the fee
into the TxPool itself. It's better to have it there because we can set it back to the
configured value afterwards. This resolves a TODO in the simulated backend.
core/txpool/blobpool: return all reinject-addresses
…ue upon rollback" (#30521)

Reverts ethereum/go-ethereum#30495

You are free to create a proper Clear method if that's the best way. But
one that does a proper cleanup, not some hacky call to set gas which
screws up logs, metrics and everything along the way. Also doesn't work
for legacy pool local transactions.

The current code had a hack in the simulated code, now we have a hack in
live txpooling code. No, that's not acceptable. I want the live code to
be proper, meaningful API, meaningful comments, meaningful
implementation.
… (#30512)

This is for fixing Prysm integration tests.
Use types.Sender(signer, tx) to utilize the transaction's sender cache
and avoid repeated address recover.
This PR removes the dependencies on `lightchaindata` db as the light
protocol has been deprecated and removed from the codebase.
@buddh0 buddh0 changed the title Merge geth v1.13.15~v1.14.11 Prague code merge [v1.13.0, v1.13.11] Nov 8, 2024
@buddh0 buddh0 changed the title Prague code merge [v1.13.0, v1.13.11] Prague code merge [v1.13.15, v1.13411] Nov 8, 2024
@buddh0 buddh0 changed the title Prague code merge [v1.13.15, v1.13411] Prague code merge [v1.13.15, v1.14.11] Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.