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 v1.10.7 #1695

Merged
merged 813 commits into from Dec 2, 2021
Merged

Merge v1.10.7 #1695

merged 813 commits into from Dec 2, 2021

Conversation

trianglesphere
Copy link
Contributor

@trianglesphere trianglesphere commented Sep 16, 2021

Description

This merges changes made after 1.9.25 up to 1.10.7 as well as some espresso specific HF changes.

Notable Changes from Upstream

Changes from Upstream

Notes for reviewers

  • With the new transaction types, core/types got overhauled to supported multiple types.
  • With 1559, the txpool was rewritten. We've placed a layer of modification over it to handle multiple fee currencies.
  • There were some changes in the supported p2p protocol versions + some of the files were moved around
  • With 1559, the blockcontext was moved & is also used in state_transition
  • The eth protocols got moved around (file wise).

Tested

Sync tests are being ran. It appears to sync without issue.

Related issues

Backwards compatibility

This updates the database layout so while it is possible to upgrade old nodes to this version, downgrading is not supported. See https://github.com/ethereum/go-ethereum/releases/tag/v1.9.20

  • Please note that reverting to Geth v1.9.19 or prior after upgrading to v1.9.20 is not possible without a resync because the blockchain database layout has changed.

karalabe and others added 30 commits July 9, 2021 14:27
params: update CHTs for the 1.10.5 release
* internal/ethapi: fix transaction APIs

* internal/ethapi: fix typo

* internal/ethapi: address comments

* internal/ethapi: address comment from Peter
* core, eth, internal, les, light: get pending and queued transaction by address

* core: tiny nitpick fixes

* light: tiny nitpick

Co-authored-by: mark <mark@amis.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* clique: implement getSignerForBlock

* consensus/clique: use blockNrOrHash in getSignerForBlock

* consensus/clique: implement getSigner

* consensus/clique: fixed rlp decoding

* consensus/clique: use Author instead of getSigner

* consensus/clique: nit nit nit

* consensus/clique: nit nit nit
When processing a transaction with London fork rules, EIP-1559 mandates
checking that the sender must have sufficient balance to cover gas * gasFeeCap.

In the EIP's pseudocode, this check happens after the value transferred by the
transaction has already been deducted. However, in go-ethereum, the balance
has not yet been updated when the check happens, and therefore needs to be
added explicitly.

Co-authored-by: Martin Holst Swende <martin@swende.se>
* Revert "core/types: go generate (#23177)"

This reverts commit 00b922f.

* Revert "core/types: remove LogForStorage type (#23173)"

This reverts commit 7522642.

* Revert "core/types: remove support for legacy receipt/log storage encoding (#22852)"

This reverts commit 643fd0e.
…(#23239)

* internal/ethapi/api: use hexutil.uint for blockCount parameter instead of int for feeHistory

* return hex value for oldestBlock instead of number

* return uint64 from oracle.resolveBlockRange

* eth/gasprice: fixed test

Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
* internal/ethapi: revert + fix properly in al tracer

* internal/ethapi: use toMessage instead of creating new message

* internal/ethapi: remove ineffassign

* core: fix invalid unmarshalling, fix test

Co-authored-by: Martin Holst Swende <martin@swende.se>
Ticket #23273 found a flaw where we were unable to sign legacy-transactions
using the external signer, even if we're still on non-london network. That's
fixed in this PR.

Additionally, I found that even when supplying all parameters, it was impossible
to sign a london-transaction on an unsynched node. It's a pretty common usecase
that someone wants to sign a transaction using an unsynced 'vanilla' node,
providing all necessary data. Our setDefaults, however, insisted on checking the
current block against the config. This PR therefore adds a case, so that if both
MaxPriorityFeePerGas and MaxFeePerGas are provided, we accept them as given.

OBS This PR fixes a regression -- on current master, we are unable to sign a
london-transaction unless the node is synched, which may break scenarios where
geth (or clef) is used as a cold wallet.

Fixes #23273
When the nodeCount is less than 10, it will panic with the out of bound error.
How about we just skip this round, when rand1 and rand2 are equal?
This PR moves (some) account types into a standalone package, to avoid
depending on signer/core from accounts/external.
Joshua Gutow added 7 commits November 17, 2021 12:47
The makes it such that the prefetcher associated with a stateDB object
is always stopped once the state associated with it is done.

Note: The prefetcher could probably be ran for a longer period of time, but
there's no other clean location to stop it at while properly managing the
lifetime of the object.
This commit adds and calls createConverstionFunctions to properly sort the
transactions in the list by price. It first calculates the effective miner
tip in the fee currency of the transaction and then converts that to CELO
to globally sort all transactions before inclusion into the block.
This cleans up the tx list and the last instance of needing to convert
to the currency type.
NB: Fees are for logging information, not for consensus.
Copy link
Contributor

@mcortesi mcortesi left a comment

Choose a reason for hiding this comment

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

Modules: p2p, node, graphql, event, ethdb, ethstats, ethclient, internal

Only missing eth, les, light modules

return fmt.Errorf("invalid netstats url: \"%s\", should be nodename@host:port", url)
// parseEthstatsURL parses the netstats connection url.
// URL argument should be of the form <name@host:port>
func parseEthstatsURL(url string, name *string, host *string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

just a reminder, to test ethstats in baklava or testnet before final release @gastonponti

ethstats/ethstats.go Outdated Show resolved Hide resolved
ethclient/ethclient.go Show resolved Hide resolved
internal/web3ext/web3ext.go Outdated Show resolved Hide resolved
internal/web3ext/web3ext.go Show resolved Hide resolved
internal/ethapi/api.go Outdated Show resolved Hide resolved
internal/ethapi/api.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mcortesi mcortesi left a comment

Choose a reason for hiding this comment

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

Finished the review!

eth/downloader/modes.go Show resolved Hide resolved
eth/downloader/modes.go Show resolved Hide resolved
eth/downloader/modes.go Show resolved Hide resolved
eth/downloader/modes.go Outdated Show resolved Hide resolved
- staticcheck
- unused
- misspell
# - staticcheck
Copy link
Contributor

Choose a reason for hiding this comment

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

renable the ones we had before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ones we had result in a huge number of false positives that upstream geth doesn't care about. It's a huge ongoing maintenance burden and pulls us further away from upstream.

Copy link
Contributor

Choose a reason for hiding this comment

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

would love to reevaluate this in a future PR. They do help finding bugs!

Copy link
Contributor

Choose a reason for hiding this comment

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

Dockerfile Outdated Show resolved Hide resolved
Dockerfile.alltools Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile.alltools Outdated Show resolved Hide resolved
@trianglesphere
Copy link
Contributor Author

@mcortesi direct merging seems to be disabled

Copy link
Contributor

@mcortesi mcortesi left a comment

Choose a reason for hiding this comment

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

Approved, but i'd like the comments here to be addressed, can be done on a future PR

// if err != nil {
// return nil, err
// }
// TODO: Use GPM here
Copy link
Contributor

Choose a reason for hiding this comment

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

Still missing?

@@ -37,7 +37,10 @@ func importPreSaleKey(keyStore keyStore, keyJSON []byte, password string) (accou
if err != nil {
return accounts.Account{}, nil, err
}
key.Id = uuid.NewRandom()
key.Id, err = uuid.NewRandom()
Copy link
Contributor

Choose a reason for hiding this comment

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

Added an issue for later #1759

@@ -208,7 +215,30 @@ func (w *ledgerDriver) SignPersonalMessage(path accounts.DerivationPath, message
return w.ledgerSignData(path, message)
}

// ledgerVersion retrieves the current version of the Celo wallet app running
/* TODO: add functionality to the Ledger's Celo app
Copy link
Contributor

Choose a reason for hiding this comment

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

Added issue #1760

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.

// faucet is a Ether faucet backed by a light client.
// faucet is an Ether faucet backed by a light client.
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -108,15 +108,16 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
if err := ioutil.WriteFile(json, []byte(genesis), 0600); err != nil {
t.Fatalf("test %d: failed to write genesis file: %v", test, err)
}
runGeth(t, "--datadir", datadir, "--nousb", "--networkid", "1337", "init", json).WaitExit()
runGeth(t, "--datadir", datadir, "--networkid", "1337", "init", json).WaitExit()
Copy link
Contributor

Choose a reason for hiding this comment

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

espressoBlock = big.NewInt(30) // Predefined london fork block for activating eip 1559.
)

func main() {
Copy link
Contributor

Choose a reason for hiding this comment

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

"github.com/celo-org/celo-blockchain/tests/fuzzers/les"
)

func main() {
Copy link
Contributor

Choose a reason for hiding this comment

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

"github.com/celo-org/celo-blockchain/tests/fuzzers/rangeproof"
)

func main() {
Copy link
Contributor

Choose a reason for hiding this comment

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

"github.com/celo-org/celo-blockchain/tests/fuzzers/vflux"
)

func main() {
Copy link
Contributor

Choose a reason for hiding this comment

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

- staticcheck
- unused
- misspell
# - staticcheck
Copy link
Contributor

Choose a reason for hiding this comment

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

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 up to 1.10.7