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

eth/catalyst: implement kintsugi spec v1.0.0-alpha.3 #29

Open
wants to merge 53 commits into
base: test-branch
Choose a base branch
from

Conversation

MariusVanDerWijden
Copy link
Owner

No description provided.

return err
}
return api.setHead(params.HeadBlockHash)
func computePayloadId(headBlockHash common.Hash, params *PayloadAttributesV1) uint64 {
Copy link

Choose a reason for hiding this comment

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

This changed in Kintsugi, to a 32-byte ID (just in case EL hashing is adopted by more CLs), and a byte prefixed to the input to version (to easily avoid collisions if we ever need to change the inputs). (not the case anymore)

@marioevz
Copy link

marioevz commented Nov 5, 2021

Added a few of test cases here: https://github.com/marioevz/kintsugi_testing

Couple things I noticed so far:

To run any test case use:
./src/executor/execute.py <Test name>, e.g. ./src/executor/execute.py revertMultipleTimes

karalabe and others added 10 commits November 8, 2021 14:12
…3855)

The price limit is supposed to exclude transactions with too low fee
amount. Before EIP-1559, it was sufficient to check the limit against
the gas price of the transaction. After 1559, it is more complicated
because the concept of 'transaction gas price' does not really exist.

When mining, the price limit is used to exclude transactions below a
certain effective fee amount. This change makes it apply the same check
earlier, in tx validation. Transactions below the specified fee amount
cannot enter the pool.

Fixes ethereum#23837
* eth/tracers: restructure tracer package

* core/vm/runtime: load js tracers

* eth/tracers: mv bigint js code to own file

* eth/tracers: add method docs for native tracers

* eth/tracers: minor doc fix

* core,eth: cancel evm on nativecalltracer stop

* core/vm: fix failing test

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
…eum#23872)

Debugging recent geth failures in hive, it took a while to realize that it's because
geth doesn't support eth/65 any longer. This PR makes such failures a bit more
easy to figure out.
Neigbors -> Neighbors
gumb0 and others added 2 commits November 11, 2021 15:00
…23853)

This retroactively implements requirements or EIP-2681 for the account nonce upper limit.
* eth/tracers: add slow path for getting legacy logs

* core/rawdb: fix test
This was apparently recently changed by Cloudflare, and
began returning an error: 'TTL must be between 60 and 86400
seconds, or 1 for Automatic'

Date: 2021-11-10 15:25:20-08:00
Signed-off-by: meows <b5c6@protonmail.com>
wardbradt and others added 8 commits November 11, 2021 20:20
* native 4byte tracer

* Update eth/tracers/native/4byte.go

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

* Update eth/tracers/native/4byte.go

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

* goimports

* eth/tracers: make 4byte tracer not care about create

Co-authored-by: Martin Holst Swende <martin@swende.se>
…thereum#23898)

Now that `SimulatedBackend.SuggestGasPrice` inspects member values, a lock needs to be added to prevent a race condition.
* cmd/evm: add gas used accumulator to t8n result

* cmd/evm: update t8n tests to include gas used field
* core/rawdb: better error message in freezer

* Apply suggestions from code review
* cmd, core: add flag --dev.gaslimit to allow configuring initial block gas limit in dev mode

* core: use provided gaslimit

Co-authored-by: Martin Holst Swende <martin@swende.se>
This fixes a bug in TransactionSender where it would return the
zero address for transactions where the sender address wasn't
cached already.

Co-authored-by: Felix Lange <fjl@twurst.com>
@marioevz
Copy link

A couple of findings in the parameters for engine_executePayloadV1:

  • extraData too long (33 bytes): returns error code for server error (-32000) instead of invalid params (-32602)
  • logsBloom too long (257 bytes): returns "method handler crashed" error
  • logsBloom too short (255 bytes): passes and returns same hash as if full 256 bytes value had been received

@marioevz
Copy link

Adding here the other finding we discussed over discord:

Two re-org cases for random, both do:

eth_sendRawTransaction -> engine_forkchoiceUpdatedV1 -> engine_getPayloadV1 -> engine_executePayloadV1

One of them then does:
engine_forkchoiceUpdatedV1 with payloadAttributes = null, to reorg back to the previous head -> engine_forkchoiceUpdatedV1 with new payloadAttributes

Result: transaction (from the eth_sendRawTransaction) is included in the payload created

Other one does all in one step:
engine_forkchoiceUpdatedV1 with new payloadAttributes

Result: transaction is not included

chfast and others added 7 commits November 22, 2021 08:49
evm block-builder (a.k.a b11r) is a utility to help assemble blocks, for use during the test-creation process.
core, eth/downloader: fix resetting below freezer threshold
…at (ethereum#23937)

* cmd/evm: add support for signing transactions in the unprotected format

* cmd/evm: simplify signing of unprotected txs
core/vm: don't use iota for opcode definitions
…thereum#23612)

* core/rawdb: utilize AncientRange when initiating from freezer

* core/rawdb: remove debug sanity check
@MariusVanDerWijden MariusVanDerWijden force-pushed the kintsugi-spec branch 2 times, most recently from f34d58e to c124ae9 Compare November 23, 2021 11:59
jfcg and others added 16 commits November 23, 2021 15:14
trie: reject deletions when verifying range proofs
)

* cmd/evm: rename t8n args to improve clarity when tracing

* cmd/evm: add back removed tracing flags and note that they are deprecated

* cmd/evm: add warning when using deprecated flag
* clique: fix block number unmarshal

* clique: rename
)

This PR fixes two problems in devp2p tests (and through them, hive).

- Make the output more detailed about what is returned (always print packet kind).
- Allow Ping response to unsolicited findnode.

Without this PR, nethermind fails a hive protocol test, and I misinterpreted the result (NethermindEth/nethermind#3617). Ergo, the output was not fool-proof.
* core/state/snapshot: remove wiper functionality

* core/vm: remove unused 'unofficial' opcodes
* all: mv loggers to eth/tracers

* core/vm: minor

* eth/tracers: tmp comment out testStoreCapture

* eth/tracers: uncomment and fix logger test

* eth/tracers: simplify test

* core/vm: re-add license

* core/vm: minor

* rename LogConfig to Config
* all: work for eth1/2 transtition

* consensus/beacon, eth: change beacon difficulty to 0

* eth: updates

* all: add terminalBlockDifficulty config, fix rebasing issues

* eth: implemented merge interop spec

* internal/ethapi: update to v1.0.0.alpha.2

                                                                 This commit updates the code to the new spec, moving payloadId into
                                                                 it's own object. It also fixes an issue with finalizing an empty blockhash.
                                                                 It also properly sets the basefee

* all: sync polishes, other fixes + refactors

* core, eth: correct semantics for LeavePoW, EnterPoS

* core: fixed rebasing artifacts

* core: light: performance improvements

* core: use keyed field (f)

* core: eth: fix compilation issues + tests

* eth/catalyst: dbetter error codes

* all: move Merger to consensus/, remove reliance on it in bc

* all: renamed EnterPoS and LeavePoW to ReachTDD and FinalizePoS

* core: make mergelogs a function

* core: use InsertChain instead of InsertBlock

* les: drop merger from lightchain object

* consensus: add merger

* core: recoverAncestors in catalyst mode

* core: fix nitpick

* all: removed merger from beacon, use TTD, nitpicks

* consensus: eth: add docstring, removed unnecessary code duplication

* consensus/beacon: better comment

* all: easy to fix nitpicks by karalabe

* consensus/beacon: verify known headers to be sure

* core: comments

* core: eth: don't drop peers who advertise blocks, nitpicks

* core: never add beacon blocks to the future queue

* core: fixed nitpicks

* consensus/beacon: simplify IsTTDReached check

* consensus/beacon: correct IsTTDReached check

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* eth: request ID based message dispatcher

* eth: fix dispatcher cancellation, rework fetchers idleness tracker

* eth/downloader: drop peers who refuse to serve advertised chains
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet