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

Upstream merge up to 1.9.19 #1615

Merged
merged 104 commits into from
Jul 13, 2021
Merged

Conversation

gastonponti
Copy link
Contributor

@gastonponti gastonponti commented Jul 6, 2021

Description

Merge from upstream, go-ethereum v 1.9.19 (https://github.com/ethereum/go-ethereum/releases/tag/v1.9.19)

"Geth v1.9.19 is our regular biweekly maintenance release. Apart from the numerous bug-fixes however, it also ships a more deterministic transaction sort order during mining (FIFO). The goal is to reduce front-runner spam which abused miner randomness for transactions at the same price level."

"Note, if you were using GraphQL previously, it was moved to the HTTP RPC endpoint. The old --graphql.host and --graphql.port flags will not work any more. You might need to adjust your TOML config files accordingly too."

1.9.19 Notes:
Deprecated flags:

  • GraphQLListenAddrFlag
  • GraphQLPortFlag

Added flags:

  • CacheTrieJournalFlag
  • CacheTrieRejournalFlag

28c5a8a

  • fetcher
    • mainLoop
      • check ancestor, otherwise the lightest sync could panic
          if ancestor == nil {
            log.Error("Common ancestor of origin header and current header is nil", "origin hash", origin.Hash(), "current header hash", head.Hash())
            continue
          }
        
      • f.chain.Rollback(untrusted) -> f.chain.Rollback(untrusted, f.handler.syncMode.SyncFullHeaderChain())
    • newLightFetcher
      • return chain.InsertHeaderChain(headers, checkFreq) ->
            i, err := chain.InsertHeaderChain(headers, checkFreq, syncMode.SyncFullHeaderChain())
            if err == consensus.ErrFutureBlock {
              return i, nil
            }
            return i, err
        
        • Add downloader.SyncMode as parameter

b2b14e6

  • re-add the changes in our shared extract

c0c0161 (ethereum/go-ethereum#21105)

  • node.go:
    • startNetworking should server stop if proxyServer failed? (Added)
  • main.go
    • startNode runnerFactory replaced

90dedea

  • this commit tried to fusion the consensus/istanbul/core/event.go file with an erased tests (signed_data_internal_test.go)
    I've restored that test, and add the changes from the signer/core/signed_data.go, to the shared/signer/signed_data.go

c28fd9c

  • make Berlin a copy of Istanbul instead of YoloV1

Tested

Unit and integration tests pass

Related issues

Backwards compatibility

The commit c0c0161 (ethereum/go-ethereum#21105) "changes the APIs for instantiating Ethereum nodes in a Go program. The new APIs are not backwards-compatible" (following this proposal https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775)

karalabe and others added 30 commits July 27, 2020 14:58
* cmd, core, eth, light, trie: dump clean cache periodically

* eth: update config

* trie: minor fix

* core, trie: address comments

* eth: remove useless

* trie: print clean cache dump start too

Co-authored-by: Péter Szilágyi <[email protected]>
* cmd, consensus, eth, les: implement light fetcher

* les: address comment

* les: address comment

* les: address comments

* les: check td after delivery

* les: add linearExpiredValue for error counter

* les: fix import

* les: fix dead lock

* les: order announces by td

* les: encapsulate invalid counter

* les: address comment

* les: add more checks during the delivery

* les: fix log

* eth, les: fix lint

* eth/fetcher: address comment
This reduces complexity of some lengthy functions in worker.go,
making the code easier to read.
* init

notes

removed some mentions of eth62, bumped protocol err too old to >=63

* remove sanity checks and bump supported protocol version up to 63

* remove 62 tests, still need to add 65

* remove 65 tests
* Disable symbol table and DWARF generation by default.
Trimpath if compiling with Go >= 1.13

* Set Go to minimum version 1.13. Revert debug symbol changes.
This replaces the two-stage shutdown scheme with the one we
use almost everywhere else: a single quit channel signalling
termination.

Co-authored-by: Felix Lange <[email protected]>
core: sort txs at the same gas price by received time
Resolves #20163

Co-authored-by: Felix Lange <[email protected]>
…a ChainId (#21306)

* Do not check for a non-nil ChainId

* Add encoding test
This PR significantly changes the APIs for instantiating Ethereum nodes in
a Go program. The new APIs are not backwards-compatible, but we feel that
this is made up for by the much simpler way of registering services on
node.Node. You can find more information and rationale in the design
document: https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775.

There is also a new feature in Node's Go API: it is now possible to
register arbitrary handlers on the user-facing HTTP server. In geth, this
facility is used to enable GraphQL.

There is a single minor change relevant for geth users in this PR: The
GraphQL API is no longer available separately from the JSON-RPC HTTP
server. If you want GraphQL, you need to enable it using the
./geth --http --graphql flag combination.

The --graphql.port and --graphql.addr flags are no longer available.
…padding (#21307)

* Handle hex strings for bytesX types

* Add tests for parseBytes

* Improve tests

* Return nil bytes if error is non-nil

* Right-pad instead of left-pad bytes

* More tests
* core: avoid modification of accountSet cache in tx_pool

when runReorg, we may copy the dirtyAccounts' accountSet cache to promoteAddrs
in which accounts will be promoted, however, if we have reset request at the
same time, we may reuse promoteAddrs and modify the cache content which is
against the original intention of accountSet cache. So, we need to make a new
slice here to avoid modify accountSet cache.

* core: fix flatten condition + comment

Co-authored-by: Felix Lange <[email protected]>
This adds a lock around requests because some routers can't handle
concurrent requests. Requests are also rate-limited.
 
The Map function request a new mapping exactly when the map timeout
occurs instead of 5 minutes earlier. This should prevent duplicate mappings.
* eth65 tests

linted

* remove non-latest eth light tests
…1414)

* should fix import / export issues related to DB unavailability

* document reason for makeConfigNode

* fix comment

* comment consistency

* remove comments

* lint
core/vm: avoid map lookups for accessing jumpdest analysis
* chaincmd should make config nodes instead of full nodes

* add documentation for using makeConfigNode instead of makeFullNode;

* add documentation to functions

* code style
* cmd/utils: grant snapshot cache to trie if disabled

* eth: fix up default non-mainnet cache distribution
@gastonponti gastonponti changed the title Gastonponti/merge upstream 1.9.19 Upstream merge up to 1.9.19 Jul 6, 2021
@gastonponti gastonponti force-pushed the gastonponti/merge-upstream-1.9.19 branch from 27c7e8f to 290c14d Compare July 12, 2021 23:04
@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #1615 (290c14d) into master (968e504) will increase coverage by 0.45%.
The diff coverage is 56.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1615      +/-   ##
==========================================
+ Coverage   55.61%   56.06%   +0.45%     
==========================================
  Files         607      606       -1     
  Lines       80211    80267      +56     
==========================================
+ Hits        44609    45005     +396     
+ Misses      32107    31726     -381     
- Partials     3495     3536      +41     
Impacted Files Coverage Δ
cmd/devp2p/enrcmd.go 0.00% <0.00%> (ø)
cmd/geth/chaincmd.go 0.00% <0.00%> (ø)
cmd/geth/config.go 0.00% <0.00%> (ø)
cmd/geth/consolecmd.go 0.00% <0.00%> (ø)
cmd/geth/main.go 19.64% <0.00%> (+1.70%) ⬆️
cmd/geth/usage.go 7.69% <ø> (ø)
cmd/utils/cmd.go 0.00% <0.00%> (ø)
cmd/utils/flags.go 2.87% <0.00%> (+0.06%) ⬆️
cmd/utils/flags_legacy.go 0.00% <ø> (ø)
core/genesis.go 64.20% <0.00%> (ø)
... and 96 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 968e504...290c14d. Read the comment docs.

@gastonponti gastonponti merged commit f95dd93 into master Jul 13, 2021
@gastonponti gastonponti deleted the gastonponti/merge-upstream-1.9.19 branch July 13, 2021 12:37
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.

Merge upstream 1.9.19