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/foundation release/1.9 20201229 2 #272

Merged
merged 144 commits into from
Feb 12, 2021

Conversation

meowsbits
Copy link
Contributor

@meowsbits meowsbits commented Dec 30, 2020

Merges upstream ethereum/go-ethereum v1.9.25.

The pull request's base is next, which is a branch that should be parallel and even with master. This allows time for merge conflict resolution and stability testing before the upstream change set hits master. This also allows time and space for cherry-picking (or making) hotfixes.

The diff at the merge conflict resolution state was: https://gist.github.com/meowsbits/b0505d3416392d484a405af6f8656352.
I included this diff in the commit message of a17020d.

fjl and others added 30 commits November 12, 2020 21:21
* crypto/cloudflare: fix nil deref in random G1/G2 reading

* crypto/bn256: improve fuzzer

* crypto/bn256: fix some flaws in fuzzer
* tests/fuzzers, common/bitutil: make fuzzers use correct returnvalues + remove output

* tests/fuzzers/stacktrie: fix duplicate-key insertion in stacktrie (false positive)

* tests/fuzzers/stacktrie: fix compilation error

* tests/fuzzers: linter nits
* core/vm, protocol_params: implement eip-2565 modexp repricing

* core/vm: fix review concerns
* all: core: split vm.Config into BlockConfig and TxConfig

* core: core/vm: reset EVM between tx in block instead of creating new

* core/vm: added docs
* consensus/ethash: only use *reflect.SliceHeader, not reflect.SliceHeader. See comment here: https://github.com/golang/go/issues/40397\#issuecomment-663748689

* consensus/ethash: pr feedback from @mdempsky, makes a copy of dest such that is not mutated

* consensus/ethash: remove noop assign

* consensus/ethash: apply same fix to another location

Co-authored-by: Péter Szilágyi <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
The z == 0 check is hit whenever we Add two points with the same x1/x2
coordinate. crypto/elliptic uses the same check in their affineFromJacobian
function. This change does not affect block processing or tx signature verification
in any way, because it does not use the Add or Double methods.
* cmd, core, eth, light, trie: disable recording preimage by default

* core, eth: fix unit tests

* core: fix import

* all: change to nopreimage

* cmd, core, eth, trie: use cache.preimages flag

* cmd: enable preimages for archive node

* cmd/utils, trie: simplify preimage tracking a bit

* core: fix linter

Co-authored-by: Péter Szilágyi <[email protected]>
* Only compare hostnames in ws.origins

Also using a helper function for ToLower consolidates all preparation steps in one function for more maintainable consistency.

Spaces => tabs

Remove a semicolon

Add space at start of comment

Remove parens around conditional

Handle case wehre parsed hostname is empty

When passing a single word like "localhost" the parsed hostname is an empty string. Handle this and the error-parsing case together as default, and the nonempty hostname case in the conditional.

Refactor with new originIsAllowed functions

Adds originIsAllowed() & ruleAllowsOrigin(); removes prepOriginForComparison

Remove blank line

Added tests for simple allowed-orign rule

which does not specify a protocol or port, just a hostname

Fix copy-paste: `:=` => `=`

Remove parens around conditional

Remove autoadded whitespace on blank lines

Compare scheme, hostname, and port with rule

if the rule specifies those portions.

Remove one autoadded trailing whitespace

Better handle case where only origin host is given

e.g. "localhost"

Remove parens around conditional

Refactor: attemptWebsocketConnectionFromOrigin DRY

Include return type on helper function

Provide srv obj in helper fn

Provide srv to helper fn

Remove stray underscore

Remove blank line

parent 93e666b4c1e7e49b8406dc83ed93f4a02ea49ac1
author wbt <[email protected]> 1598559718 -0400
committer Martin Holst Swende <[email protected]> 1605602257 +0100
gpgsig -----BEGIN PGP SIGNATURE-----

 iQFFBAABCAAvFiEEypmrtbNuJK1doP1AaDtDjAWl3fAFAl+zi9ARHG1hcnRpbkBz
 d2VuZGUuc2UACgkQaDtDjAWl3fDRiwgAoMtzU8dwRV7Q9xkCwWEx9Wz2f3n6jUr2
 VWBycDKGKwRkPPOER3oc9kzjGU/P1tFlK07PjfnAKZ9KWzxpDcJZwYM3xCBurG7A
 16y4YsQnzgPNONv3xIkdi3RZtDBIiPFFEmdZFFvZ/jKexfI6JIYPngCAoqdTIFb9
 On/aPvvVWQn1ExfmarsvvJ7kUDUG77tZipuacEH5FfFsfelBWOEYPe+I9ToUHskv
 +qO6rOkV1Ojk8eBc6o0R1PnApwCAlEhJs7aM/SEOg4B4ZJJneiFuEXBIG9+0yS2I
 NOicuDPLGucOB5nBsfIKI3USPeE+3jxdT8go2lN5Nrhm6MimoILDsQ==
 =sgUp
 -----END PGP SIGNATURE-----

Refactor: drop err var for more concise test lines

Add several tests for new WebSocket origin checks

Remove autoadded whitespace on blank lines

Restore TestWebsocketOrigins originally-named test

and rename the others to be helpers rather than full tests

Remove autoadded whitespace on blank line

Temporarily comment out new test sets

Uncomment test around origin rule with scheme

Remove tests without scheme on browser origin

per https://github.com/ethereum/go-ethereum/pull/21481/files#r479371498

Uncomment tests with port; remove some blank lines

Handle when browser does not specify scheme/port

Uncomment test for including scheme & port in rule

Add IP tests

* node: more tests + table-driven, ws origin changes

Co-authored-by: Martin Holst Swende <[email protected]>
…s (#21871)

* trie: fix tests to work on 32-bit systems

* les: make test work on 32-bit platform

* cmd/geth: fix windows-issues on tests

* trie: improve balance

* cmd/geth: make account tests less verbose + less mem intense

* rpc: make debug-level log output less verbose

* cmd/geth: lint
* crypto/bn256: fix bn256Mul fuzzer to not hang on large input

* Update crypto/bn256/bn256_fuzz.go

Co-authored-by: ligi <[email protected]>

Co-authored-by: ligi <[email protected]>
* p2p: avoid busy-loop on temporary errors

* p2p: address review concerns
Also fixes a bug in les/flowcontrol that caused the overflow.
* added bls fuzzer

* crypto/bls12381: revert bls-changes, fixup fuzzer tests

* fuzzers: split bls fuzzing into 8 different units

* fuzzers/bls: remove (now stale) corpus

* crypto/bls12381: added blsfuzz corpus

* fuzzers/bls12381: fix the bls corpus

* fuzzers: fix oss-fuzz script

* tests/fuzzers: fixups on bls corpus

* test/fuzzers: remove leftover corpus

Co-authored-by: Marius van der Wijden <[email protected]>
github: Add new style of issue-templates
This type is automatically offered by github after changing to the new style and a security.md being present
* cmd/devp2p/internal/ethtest: added large announcement tests

* cmd/devp2p/internal/ethtest: added large announcement tests

* cmd/devp2p/internal/ethtest: refactored stuff a bit

* cmd/devp2p/internal/ethtest: added TestMaliciousStatus/Handshake

* cmd/devp2p/internal/ethtest: fixed rebasing issue

* happy linter, happy life

* cmd/devp2p/internal/ethtest: used readAndServe

* stuff

* cmd/devp2p/internal/ethtest: fixed test cases
…atement (#21854)

Changes:

    Simplify nested complexity
    If an if blocks ends with a return statement then remove the else nesting.

Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint
meowsbits and others added 19 commits January 12, 2021 08:03
This adds a script and associated Makefile command
to handle installing requirements and starting the
development server for mkdocs.

Signed-off-by: meows <[email protected]>
It was getting assigned only before the python
command was finally assigned.

Signed-off-by: meows <[email protected]>
Date: 2021-01-13 06:42:04-06:00
Signed-off-by: meows <[email protected]>
…nce (#295)

* node: add test for the discovery endpoint to validate OpenRPC compliance
* node: add test that runs only on CI for comparing local OpenRPC spec with the latest published spec

Rel #15
* README: bump OpenRPC badge version

Signed-off-by: meows <[email protected]>

* docs: bump OpenRPC badge version

Co-authored-by: Chris Ziogas <[email protected]>
Date: 2021-01-15 05:52:09-06:00
Signed-off-by: meows <[email protected]>
* docs: add Travis and Gitter badges

* docs: make some correction on existing docs

Co-authored-by: meowsbits <[email protected]>

* docs: markdown fixes to achieve both mkdocs and GitHub flavor support

* docs: move installation and build info from README to /docs

* README.md: add some quick links to docs from README

Date: 2021-01-15 07:00:09-06:00
Signed-off-by: meows <[email protected]>

Co-authored-by: meowsbits <[email protected]>
It uses the flag --ecbp1100.nodisable, a bool flag that, if set, is by default truthy, and prevents the efficacy of auto-shutoff logic, but does not force activation, of ECBP1100. That is, the node will start and sync following existing behavior without ECBP1100 enabled, but once achieving sync with a best peer and then enabling ECBP1100, shutoff mechanisms based on minimum peers or stale heads will be inoperative.

* core: rename bc AF field appending _Status

Hopefully this makes the fields value a little
clearer (as a status/state rather than setting).

Date: 2021-01-14 12:05:02-06:00
Signed-off-by: meows <[email protected]>

* main,cmd/utils,core,eth: init implement configurable ECBP1100 force-on override

This provides a CLI flag --ecbp1100.nodisable which
forces the ECBP1100 logic to an always state, prevent
the auto-shutoff mechanisms (trigger on below-threshold peer count
and stale head for a time beyond a certain time window) from
disabling the ECBP1100 artificial finality logic.

Date: 2021-01-14 12:07:26-06:00
Signed-off-by: meows <[email protected]>

* main,cmd/utils,core,eth: refactor ecbp100 force config to on/off states

Date: 2021-01-14 12:24:55-06:00
Signed-off-by: meows <[email protected]>

* core,eth: add blockchain method for checking AF override state

Comments are added noting that
- the protocol manager 'safety loop' is short-circuited
  if the state is force-set, only for the reason of saving
  a noop goroutine. Note that if the override becomes
  configurable at runtime, this would need to be cut.
- min peers check is allowed to still call the EnableArtificialFunction(true/false)
  since it will be a noop either way if the override is in place.

Date: 2021-01-14 12:40:15-06:00
Signed-off-by: meows <[email protected]>

* main,cmd/utils: rename variable to better meet use

Date: 2021-01-14 12:53:21-06:00
Signed-off-by: meows <[email protected]>

* core: fix assignment to nil by initializing nonzero placeholder

Date: 2021-01-14 12:59:43-06:00
Signed-off-by: meows <[email protected]>

* main: fix formatting issue for crit log

Date: 2021-01-14 12:59:55-06:00
Signed-off-by: meows <[email protected]>

* eth: remove optimization short-circuiting safety loop

The cost of one noop goroutine vs. potential
unexpected logic is not worth it. Would rather
call the noop and keep the AF enable/disable
logic in one place.

Date: 2021-01-14 13:06:12-06:00
Signed-off-by: meows <[email protected]>

* cmd/geth,cmd/utils: change flag from string on|off to bool

Now use becomes --ecbp1100.force

where that enables forceful activation.

Date: 2021-01-15 05:19:35-06:00
Signed-off-by: meows <[email protected]>

* cmd/geth,cmd/utils,core,eth: --ecbp100.nodisable deactivates auto-shutoff mechanisms

Modifies preceding implementation by changing logic
from force-always-on to permanent-once-activated state
overrides.

This allows the node to start and sync without ECBP1100
activated, but once synced with a best peer and (following
incumbent logic) having activated ECBP1100, prevents the auto-shutoff
mechanisms from having any effect;
once ECBP1100 is enabled, it will stay enabled.

Date: 2021-01-15 05:40:46-06:00
Signed-off-by: meows <[email protected]>

* eth: add test for AF nodisable switch

Shows that AF is not disabled when node 'a's
peer minimum is raised back to 5, and having
only one peers.

Date: 2021-01-18 06:08:35-06:00
Signed-off-by: meows <[email protected]>

* typo

Co-authored-by: Chris Ziogas <[email protected]>
#293

commit 85e4d0b
Author: meows <[email protected]>
Date:   Tue Jan 19 07:07:02 2021 -0600

    ethclient: install missing eth_newSideBlockFilter method for rpc.discover test

    Date: 2021-01-19 07:07:02-06:00
    Signed-off-by: meows <[email protected]>

commit c8cf61d
Author: meows <[email protected]>
Date:   Tue Jan 12 09:54:37 2021 -0600

    filters: (lint) fix comment

    Resolves https://github.com/etclabscore/core-geth/pull/293/files/bf5bd1290fdb0ad59e8d4255100934d053be6e5d#r555805816

    Date: 2021-01-12 09:54:37-06:00
    Signed-off-by: meows <[email protected]>

commit bf5bd12
Author: meows <[email protected]>
Date:   Tue Jan 12 08:05:16 2021 -0600

    filters: (lint) goimports

    Date: 2021-01-12 08:05:16-06:00
    Signed-off-by: meows <[email protected]>

commit 6ae8387
Author: meows <[email protected]>
Date:   Mon Jan 11 18:13:48 2021 -0600

    eth/filters,ethclient,node: install newSideHeads subscription

    The newSideHeads subscription work very similarly to
    the newHeads subscription; instead, non-canonical blocks are channeled.
Date: 2021-01-19 08:59:07-06:00
Signed-off-by: meows <[email protected]>
Date: 2021-01-19 09:00:53-06:00
Signed-off-by: meows <[email protected]>
Merge pull request #309 from etclabscore/fix/discovery-externaldocs-url
@meowsbits
Copy link
Contributor Author

@ziogaschr @iquidus This LGTM. Finished a successful complete --classic sync and some other continuity and CLI tests. No failures.

@meowsbits meowsbits merged commit bfd220c into next Feb 12, 2021
@meowsbits meowsbits deleted the merge/foundation-release/1.9-20201229-2 branch February 12, 2021 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.