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

[R4R] merge go-ethereum #816

Merged
merged 584 commits into from
Jul 6, 2022
Merged

[R4R] merge go-ethereum #816

merged 584 commits into from
Jul 6, 2022

Conversation

j75689
Copy link
Contributor

@j75689 j75689 commented Mar 24, 2022

Description

Merged with go-ethereum v1.10.15

Rationale

N/A

Example

N/A

Changes

The go-ethereum repo was merged, so many code changes, please note the following modules:

  • Miner module parameter changes
  • Gas fee calculation changes (because the code for Eip-1559 was introduced, but we didn't enable it, should be parlia compatible)
  • Minor changes in evm code (some writing changes do not change the main logic)
  • fast sync mode has been removed, replaced by snap sync
  • The new version of ethereum no longer supports the original xgo cross-compilation, so the release of the cross-compilation version is removed from the CI script

holiman and others added 30 commits October 5, 2021 08:13
This PR adds a method to the debug namespace, to iterate over the blocks and check where we have the roots on disk.
This update includes fixes for the *BSD build and go module vendoring.
This resolves a long-standing TODO. The point of copying the address is
to ensure that all data referenced by types.Transaction is independent of the
data passed into the constructor.

Co-authored-by: Felix Lange <fjl@twurst.com>
This change removes misuses of sync.WaitGroup in BlockChain. Before this change,
block insertion modified the WaitGroup counter in order to ensure that Stop would wait
for pending operations to complete. This was racy and could even lead to crashes
if Stop was called at an unfortunate time. The issue is resolved by adding a specialized
'closable' mutex, which prevents chain modifications after stopping while also
synchronizing writers with each other.

Co-authored-by: Felix Lange <fjl@twurst.com>
Fixes #23681

After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
Go 1.17.2 fixes some miscompilation issues on amd64 and a runtime issue with timers.
While the upgrade is not strictly necessary for go-ethereum right now, it is still good
to be up-to-date.
This ensures that all miner goroutines have exited before stopping the blockchain. 

Co-authored-by: Felix Lange <fjl@twurst.com>
This fixes a data race on worker.current by moving the call to StopPrefetcher
into the main loop.

The commit also contains fixes for two other races in unit tests of unrelated packages.
node.Node no longer registers any account manager backends by default,
they need to be registered explicitly.

For ethash-based tests, we actually don't need any accounts in the miner
keystore. Just set the etherbase instead to make mining work. For
clique, the signer account must be in the keystore.

The change also adds interrupt handling in stress tests.
This prevents the console from crashing when auto-completing on
a variable or property that is null or undefined.

Fixes #23693
Co-authored-by: Felix Lange <fjl@twurst.com>
* cmd/evm: t9n: validate transaction intrinsic gas

* cmd/evm: t9n: stricter tx validation
* build: increase thread stack size when running alpine linux

* review feedback: force a stack size of 8M on all linux distribs

* fix missing extldflags
* params: changed CatalystBlock to TerminalTotalDifficulty

* eth/catalyst: comment out unused code
* les/vflux/server: fix metrics

* les/vflux/server: fix metrics
* Update tests to showcase that forked blocks can still be looked up by their hash
This removes some code:

- The clique engine calculated the snapshot twice when verifying headers/blocks.

- The method GetBlockHashesFromHash in Header/Block/Lightchain was only used by tests. It
  is now removed from the API.
  
- The method GetTdByHash internally looked up the number before calling GetTd(hash, num).
  In many cases, callers already had the number, and used this method just because it has a
  shorter name. I have removed the method to make the API surface smaller.
* eth,rpc: allow for flag configured timeouts for eth_call

* lint: account for package-local import order

* cr: rename `rpc.calltimeout` to `rpc.evmtimeout`
This update adds support for some more ES6 functionality, notably
arrow functions.
This doesn't fix all go-critic warnings, just the most serious ones.

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
This fixes a bug where gas-related fields of the TransactOpts passed
to transaction methods would be modified, skipping gas estimation for
subsequent transactions.

Co-authored-by: Yondon Fu <yondon.fu@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
This is the initial step for support of Solidity errors in contract bindings.
As of this change, errors can be decoded, but are not supported in
bindings yet.

Closes #23157
* core/state/snapshot: fix data race in layer flattening

* core/state/snapshot: fix typo
s1na and others added 14 commits January 31, 2022 09:51
* eth/tracers: add initial native prestate tracer

* fix balance hex

* handle prestate for tx from and to

* drop created contract from prestate

* fix sender balance

* use switch instead

Co-authored-by: Martin Holst Swende <martin@swende.se>

* minor fix

* lookup create2 account

* mv code around a bit

* check stackLen for create2

* fix transfer tx for js prestate tracer

* fix create2 addr

* track extcodehash in js prestate tracer

Co-authored-by: Martin Holst Swende <martin@swende.se>
* build: append GOARM to arm lint download URL

otherwise it fails with:

downloading from https://github.com/golangci/golangci-lint/releases/download/v1.42.0/golangci-lint-1.42.0-linux-arm.tar.gz
ci.go:347: download error: status 404

* build: increase timeout for lint

Otherwise it times out on a pi

* Increase timeout even further

saw longer build times
* all: seperate catalyst package

* eth/catalyst: moved some methods, added docs

* eth/catalyst, les/catalyst: add method docs

* core, eth, les, miner: move common function to beacon package

* eth/catalyst: goimported

* cmd/utils, miner/stress/beacon: naming nitpicks

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
I believe the sentence is attempting to explain that the URL is "[used] by upper layers to define a sorting order over all wallets from multiple backends."
* eth/tracers: clean-up tracer collection

* Rm test for dropped tracer
This change makes it so WaitMined no longer logs an error when the receipt
is unavailable. It also changes the simulated backend to return NotFound for
unavailable receipts, just like ethclient does.
cmd: auto-enable beacon APIs if TTD is defined
This also contains some changes to the protocol handler to
make the tests pass.
Co-authored-by: specerxi <xhxpecer@gmail.com>
This upgrade resolves a build issue on Android 7+ and removes
a build warning on macOS >= 12.0.
@j75689 j75689 changed the title [WIP] merge go-ethereum [R4R] merge go-ethereum Apr 1, 2022
yutianwu
yutianwu previously approved these changes Apr 6, 2022
@Lippertt Lippertt linked an issue Apr 6, 2022 that may be closed by this pull request
Closed
Copy link
Collaborator

@brilliant-lx brilliant-lx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a huge change, I only take a brief look at folder of: core/state/ & core/vm
I can't dig in very detail, generally speaking, it is ok to me.
Need to do enough test before activate it.

@unclezoro unclezoro merged commit a02c4fa into develop Jul 6, 2022
This was referenced Jul 28, 2022
@unclezoro unclezoro deleted the merge_eth branch September 2, 2022 03:53
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.

$$$