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

Merge upstream v1.10.19 #72

Merged
merged 417 commits into from Feb 19, 2023
Merged

Merge upstream v1.10.19 #72

merged 417 commits into from Feb 19, 2023

Conversation

junnmm
Copy link
Collaborator

@junnmm junnmm commented Feb 15, 2023

Merge upstream v1.10.19 into develop.

Possible Issues

Testcase

  • The node should not expose the Engine API

Diff stats between upstream v1.10.19 and the head of this pull request:

 .github/dependabot.yml                   |   11 +
 .github/workflows/codeql.yml             |   76 +
 .github/workflows/hive.yml               |   34 +
 .github/workflows/hive_ts.yml            |   40 +
 .github/workflows_old/docker-image.yml   |   55 +
 .gitignore                               |    2 +
 Dockerfile                               |    2 +
 KCC_Green.png                            |  Bin 0 -> 88361 bytes
 README.md                                |  276 +--
 accounts/accounts.go                     |    1 +
 accounts/external/backend.go             |    6 +-
 cmd/clef/main.go                         |    2 +-
 cmd/devp2p/discv4cmd.go                  |    2 +-
 cmd/devp2p/nodesetcmd.go                 |    8 +-
 cmd/geth/config.go                       |    1 +
 cmd/geth/consolecmd.go                   |   18 +-
 cmd/geth/main.go                         |   20 +-
 cmd/geth/usage.go                        |    1 +
 cmd/utils/flags.go                       |  118 +-
 consensus/beacon/consensus.go            |   14 +-
 consensus/clique/clique.go               |    4 +-
 consensus/consensus.go                   |    7 +-
 consensus/ethash/consensus.go            |    4 +-
 consensus/posa/abi.go                    | 2827 ++++++++++++++++++++++++++++++
 consensus/posa/api.go                    |  147 ++
 consensus/posa/interactive.go            |   86 +
 consensus/posa/kccIshikari.go            |  103 ++
 consensus/posa/kccIshikari_patch.go      |  105 ++
 consensus/posa/kccIshikari_patch_test.go |   24 +
 consensus/posa/posa.go                   | 1170 +++++++++++++
 consensus/posa/snapshot.go               |  203 +++
 core/forkid/forkid.go                    |    7 +
 core/forkid/forkid_test.go               |   68 -
 core/genesis.go                          |   94 +-
 core/genesis_alloc.go                    |    8 +-
 core/genesis_test.go                     |   24 -
 core/mkalloc.go                          |   10 +-
 core/rawdb/database.go                   |    4 +
 core/state_transition.go                 |   37 +-
 core/types/transaction.go                |    9 +-
 core/vm/instructions_kcc_issue_9.go      |   63 +
 core/vm/interpreter.go                   |   11 +-
 core/vm/jump_table.go                    |   27 +-
 eth/backend.go                           |   58 +
 eth/ethconfig/config.go                  |   64 +-
 eth/gasprice/gasprice.go                 |   16 +
 eth/protocols/eth/handler.go             |    2 +-
 genesis-mainnet.json                     |   47 +
 genesis-testnet.json                     |   50 +
 internal/ethapi/api.go                   |   19 +-
 internal/web3ext/web3ext.go              |   31 +
 les/commons.go                           |    2 +-
 les/protocol.go                          |    2 +-
 miner/worker.go                          |    1 +
 mobile/geth.go                           |   24 +-
 mobile/params.go                         |   24 +-
 params/bootnodes.go                      |  120 +-
 params/config.go                         |  568 +++---
 params/version.go                        |    6 +-
 59 files changed, 5709 insertions(+), 1054 deletions(-)

myself659 and others added 30 commits March 11, 2022 10:32
eth/protocols/snap: avoid estimating infinite percentage
* eth/downloader: implement beacon sync

* eth/downloader: fix a crash if the beacon chain is reduced in length

* eth/downloader: fix beacon sync start/stop thrashing data race

* eth/downloader: use a non-nil pivot even in degenerate sync requests

* eth/downloader: don't touch internal state on beacon Head retrieval

* eth/downloader: fix spelling mistakes

* eth/downloader: fix some typos

* eth: integrate legacy/beacon sync switchover and UX

* eth: handle UX wise being stuck on post-merge TTD

* core, eth: integrate the beacon client with the beacon sync

* eth/catalyst: make some warning messages nicer

* eth/downloader: remove Ethereum 1&2 notions in favor of merge

* core/beacon, eth: clean up engine API returns a bit

* eth/downloader: add skeleton extension tests

* eth/catalyst: keep non-kiln spec, handle mining on ttd

* eth/downloader: add beacon header retrieval tests

* eth: fixed spelling, commented failing tests out

* eth/downloader: review fixes

* eth/downloader: drop peers failing to deliver beacon headers

* core/rawdb: track beacon sync data in db inspect

* eth: fix review concerns

* internal/web3ext: nit

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
…slist-init

core/statedb: always clear out access list when setting a new one
* trie: fix memory leak in trie iterator

In the trie iterator, live nodes are tracked in a stack while iterating.
Popped node states should be explictly set to nil in order to get
garbage-collected.

* trie: fix empty trie iterator
* cmd, eth: Rename whitelist argument to peer.requiredblocks

* eth/ethconfig: document PeerRequiredBlocks better

* cmd/utils: rename new flag to --eth.requiredblocks

Co-authored-by: Felix Lange <fjl@twurst.com>
eth/downloader: fix off-by-one error in test causing 50% fails
build, Dockerfile: bump Go to 1.18
This updates the no-cgo implementations in the crypto package to use
the github.com/btcsuite/btcd/btcec/v2 module instead of the older btcec
package that was part of the main github.com/btcsuite/btcd module.

name                   old time/op  new time/op  delta
EcrecoverSignature-32   198µs ± 0%   144µs ± 0%  -27.11%
VerifySignature-32      177µs ± 0%   128µs ± 0%  -27.44%
DecompressPubkey-32    20.9µs ± 0%  10.1µs ± 0%  -51.51%

Use (*ModNScalar).IsOverHalfOrder instead of math/big.Int when checking
for malleable signatures.
* core/beacon: eth/catalyst: updated engine api to new version

* core: implement exchangeTransitionConfig

* core/beacon: prevRandao instead of Random

* eth/catalyst: Fix ExchangeTransitionConfig, add test

* eth/catalyst: stop external miners on TTD reached

* node: implement --authrpc.vhosts flag

* core: allow for config override on non-mainnet networks

* eth/catalyst: fix peters comments

* eth/catalyst: make stop remote sealer more explicit

* eth/catalyst: add log output

* cmd/utils: rename authrpc.host to authrpc.addr

* eth/catalyst: disable the disabling of the miner

* eth: core: remove notion of terminal pow block

* eth: les: more of peters nitpicks
ethereum#24550)

* eth/downloader: terminate beacon sync early when linked to local chain

* eth/downloader: fix backfiller resume on early beacon termination
…um#24460)

* core: store genesis allocation and recommit them if necessary

* core: recover predefined genesis allocation if possible
…#24569)

* eth/downloader: ignore zero size header batch for importing

* core, light: reject empty header batch for importing
* cmd,core: add simple legacy receipt converter

core/rawdb: use forEach in migrate

core/rawdb: batch reads in forEach

core/rawdb: make forEach anonymous fn

cmd/geth: check for legacy receipts on node startup

fix err msg

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

fix log

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

fix some review comments

add warning to cmd

drop isLegacy fn from migrateTable params

add test for windows rename

test replacing in windows case

* minor fix

* sanity check for tail-deletion

* add log before moving files around

* speed-up hack for mainnet

* fix mainnet check, use networkid instead

* check mainnet genesis

* review fixes

* resume previous migration attempt

* core/rawdb: lint fix

Co-authored-by: Martin Holst Swende <martin@swende.se>
karalabe and others added 27 commits June 8, 2022 16:24
rpc: swap out timer metrics to histograms
Removes engine from any unauthenticated RPC service.
Co-authored-by: Martin Holst Swende <martin@swende.se>
typo error: keccack256 -> keccak256
This enables the following linters

- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
- gosec

WIth a few exceptions.

- We use a deprecated protobuf in trezor. I didn't want to mess with that, since I cannot meaningfully test any changes there.
- The deprecated TypeMux is used in a few places still, so the warning for it is silenced for now.
- Using string type in context.WithValue is apparently wrong, one should use a custom type, to prevent collisions between different places in the hierarchy of callers. That should be fixed at some point, but may require some attention.
- The warnings for using weak random generator are squashed, since we use a lot of random without need for cryptographic guarantees.
* common: improve pretty duration regex

* common: improve pretty duration regex
minor performance improvement: `big.NewInt(0).Xxx` -> `new(big.Int).Xxx`
eth: add missing periods on end of comments
The new protocol version removes support for GetNodeData.
See https://eips.ethereum.org/EIPS/eip-4938 for more information.

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
)

* cmd/geth, params: implement Gray Glacier (EIP-5133)

* cmd/evm: add gray glacier tests

* params: nitpicks

* params: fixes
Co-authored-by: Felix Lange <fjl@twurst.com>
@junnmm junnmm marked this pull request as ready for review February 15, 2023 07:54
@0xcary
Copy link
Collaborator

0xcary commented Feb 19, 2023

LGTM

@viaweb3 viaweb3 merged commit 059665c into kcc-community:develop Feb 19, 2023
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.

None yet