Commit Graph

1746 Commits

Author SHA1 Message Date
philip-morlier
b3f1d35171 functional test plugin.
This PR will also include the stand alone tests.
2023-06-22 01:05:10 -07:00
philip-morlier
1bf1a5634e Merge remote-tracking branch 'origin/develop' into feature/old-consensus-engine 2023-06-13 22:52:01 -07:00
philip-morlier
7434ccb8c8 Initial commit of stand alone consensus engine work. 2023-06-12 09:52:46 -07:00
philip-morlier
e986bbfa6f Initial commit of merge geth v1.11.5 2023-04-21 13:24:40 -07:00
rjl493456442
99f81d2724
all: refactor trie API (#26995)
In this PR, all TryXXX(e.g. TryGet) APIs of trie are renamed to XXX(e.g. Get) with an error returned.

The original XXX(e.g. Get) APIs are renamed to MustXXX(e.g. MustGet) and does not return any error -- they print a log output. A future PR will change the behaviour to panic on errorrs.
2023-04-20 06:57:24 -04:00
philip-morlier
86b30777b8 working commit 4/19 2023-04-19 10:32:26 -07:00
Delweng
5e4d726e2a
params: remove EIP150Hash from chainconfig (#27087)
The EIP150Hash was an idea where, after the fork, we hardcoded the forked hash as an extra defensive mechanism. It wasn't really used, since forks weren't contentious and for all the various testnets and private networks it's been a hassle to have around. 

This change removes that config field. 

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-04-18 03:49:09 -04:00
s7v7nislands
2adce0b066
eth/tracers: use atomic type (#27031)
Use the new atomic types in package eth/tracers

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-04-04 12:34:52 -04:00
Martin Holst Swende
ab1a404b01
all: remove debug-field from vm config (#27048)
This PR removes the Debug field from vmconfig, making it so that if a tracer is set, debug=true is implied.

---------

Co-authored-by: 0xTylerHolmes <tyler@ethereum.org>
Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2023-04-04 09:50:13 -04:00
Delweng
0b76eb3708
eth/tracers: report correct gasLimit in call tracers (#27029)
This includes a semantic change to the `callTracer` as well as `flatCallTracer`.
The value of field `gas` in the **first** call frame will change as follows:

- It previously contained gas available after initial deductions (i.e. tx costs)
- It will now contain the full tx gasLimit value

Signed-off-by: jsvisa <delweng@gmail.com>
2023-04-04 12:34:23 +02:00
s7v7nislands
db18293c32
eth/downloader: use atomic types (#27030)
* eth/downloader: use atomic type

* Update eth/downloader/downloader_test.go

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

* Update eth/downloader/downloader_test.go

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

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-04-03 22:48:10 +03:00
openex
d0fbb10658
eth/catalyst: improve consensus heartbeat (#26896)
improve the heartbeat function that is no longer suitable in the current situation

Co-authored-by: “openex27” <“openexkevin@gmail.com”>
2023-03-30 15:09:35 -04:00
jwasinger
fd94b4fcfa
eth/tracers/native: prevent panic for LOG edge-cases (#26848)
This PR fixes OOM panic in the callTracer as well as panicing on
opcode validation errors (e.g. stack underflow) in callTracer and
prestateTracer.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-03-28 11:46:53 +02:00
Guillaume Ballet
41f89ca944
core/state, trie: remove Try prefix in Trie accessors (#26975)
This change renames StateTrie methods to remove the Try* prefix. 

We added the Trie methods with prefix 'Try' a long time ago, working
around the problem that most existing methods of Trie did not return the
database error. This weird naming convention has persisted until now.

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2023-03-27 10:48:46 +02:00
philip-morlier
7f1b5c5f9b Progress made on 3/24/23 2023-03-24 16:05:39 -07:00
philip-morlier
4cfa8704a9 Functional hook for consensus engine plugin 2023-03-24 12:46:45 -07:00
philip-morlier
9ee93f1e26 further progress on plugin hook 2023-03-23 22:00:13 -07:00
philip-morlier
d2d3490abc initial work on pluginGetEngine hook 2023-03-23 17:03:08 -07:00
Austin Roberts
9aba661554 Updates for consensus engine injection 2023-03-23 16:37:16 -05:00
aaronbuchwald
b1acaf47aa
eth/gasprice: change feehistory input type from int to uint64 (#26922)
Change input param type from int to uint64
2023-03-23 16:12:37 -04:00
Marius van der Wijden
20f8eb756b
eth/catalyst: fix races (#26950) 2023-03-22 13:36:26 -04:00
philip-morlier
f3e558d4e0 Merge commit 'a38f41085' into merge/geth-v1.11.5
Manual touches in core/state_transtion.go and go.mod
2023-03-21 08:39:16 -07:00
Darioush Jalali
ee8e83fa5f
eth: fix output file permissions in admin_exportChain (#26912)
* api: Use 0700 file permissions for ExportChain

* change perm to 0644

* Update api.go

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-03-17 20:06:06 +02:00
Marius van der Wijden
d8066dcde8
eth/catalyst: increase update consensus timeout (#26840)
Increases the time between consensus updates that we give the CL before we start warning the user.
2023-03-16 15:35:36 -04:00
lightclient
5f81db68c6
eth: return error if 'safe' or 'finalized' tag used pre-merge (#26862)
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-03-13 06:51:23 -04:00
Roberto Bayardo
67ac5f0ae7
core, core/types: plain Message struct (#25977)
Here, the core.Message interface turns into a plain struct and
types.Message gets removed.

This is a breaking change to packages core and core/types. While we do
not promise API stability for package core, we do for core/types. An
exception can be made for types.Message, since it doesn't have any
purpose apart from invoking the state transition in package core.
types.Message was also marked deprecated by the same commit it
got added in, 4dca5d4db7 (November 2016).

The core.Message interface was added in December 2014, in commit
db494170dc, for the purpose of 'testing' state transitions. It's the
same change that made transaction struct fields private. Before that,
the state transition used *types.Transaction directly.

Over time, multiple implementations of the interface accrued across
different packages, since constructing a Message is required whenever
one wants to invoke the state transition. These implementations all
looked very similar, a struct with private fields exposing the fields
as accessor methods.

By changing Message into a struct with public fields we can remove all
these useless interface implementations. It will also hopefully
simplify future changes to the type with less updates to apply across
all of go-ethereum when a field is added to Message.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-03-09 14:19:12 +01:00
philip-morlier
6e40cd7920 Merge commit '5ed08c473' into merge/geth-v1.11.3 2023-03-07 10:04:53 -08:00
Marius van der Wijden
78429f7733
beacon/engine: don't omit empty withdrawals in ExecutionPayloadBodies (#26698)
This ensures the "withdrawals" field will always be present in responses
to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-03-07 16:30:04 +01:00
Sina Mahmoodi
41af42e97c
eth/tracers/native: set created address to nil in case of failure (#26779)
Fixes #26073
2023-03-07 14:39:11 +01:00
Marius van der Wijden
5bc2ef984f
core, eth/catalyst: fix race conditions in tests (#26790)
Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with
the miner. Solution: set the TTD on the blockchain config not the genesis config.

Also fixes a race in CopyHeader which resulted in race reports all over the place.
2023-03-06 23:32:27 +01:00
Péter Szilágyi
4c23fe97c5
eth: remove admin.peers[i].eth.head and difficulty (#26804) 2023-03-06 09:27:46 +02:00
Péter Szilágyi
cd31f2dee2
all: change chain head markers from block to header (#26777) 2023-03-02 08:29:15 +02:00
Chris Ziogas
2ad150d986
eth/tracers: add native flatCallTracer (aka parity style tracer) (#26377)
Adds support for a native call tracer with the Parity format, which outputs call frames
in a flat array. This tracer accepts the following options:

- `convertParityErrors: true` will convert error messages to match those of Parity
- `includePrecompiles: true` will report all calls to precompiles. The default
  matches Parity's behavior where CALL and STATICCALLs to precompiles are excluded

Incompatibilities with Parity include:

- Parity removes the result object in case of failure. This behavior is maintained
  with the exception of reverts. Revert output usually contains useful information,
  i.e. Solidity revert reason.
- The `gasUsed` field accounts for intrinsic gas (e.g. 21000 for simple transfers)
  and refunds unlike Parity
- Block rewards are not reported

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-02-28 13:54:37 +03:30
Péter Szilágyi
b3ae073488
eth: use the last announced finalized block as the sync ancient limit (#26685) 2023-02-23 13:22:41 +02:00
philip-morlier
4415e7c7b8 Merge commit '73b01f40c' geth v1.11.2 into merge/geth-v1.11.2 2023-02-22 08:13:38 -08:00
Yier
4034c675be
eth/filters: fix a breaking change and return rpctransaction (#26757)
* eth/filters: fix a breaking change and return rpctransaction

* eth/filters: fix test cases

---------

Co-authored-by: Catror <me@catror.com>
2023-02-22 13:06:43 +02:00
philip-morlier
78e00bf68d Manual touches to preserve compatability of other networks with utils as well as fix a failing test in core/rawdb. 2023-02-21 10:29:25 -08:00
rjl493456442
fe01a2f63b
all: use unified emptyRootHash and emptyCodeHash (#26718)
The EmptyRootHash and EmptyCodeHash are defined everywhere in the codebase, this PR replaces all of them with unified one defined in core/types package, and also defines constants for TxRoot, WithdrawalsRoot and UncleRoot
2023-02-21 06:12:27 -05:00
Péter Szilágyi
90d25514af
core, eth: merge snap-sync chain download progress logs (#26676) 2023-02-21 12:17:34 +02:00
Roman Krasiuk
15e5e6176b
eth/catalyst: request too large error (#26722)
The method `GetPayloadBodiesByRangeV1` now returns "-38004: Too large request" error if the requested range is too large, according to spec

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-02-17 13:30:38 -05:00
philip-morlier
ef92d21d25 Manual touches to modify types to conform to geth v1.11.1 2023-02-17 08:29:46 -08:00
philip-morlier
2f6b8d86f1 manual geth v1.11.1 merge 2023-02-17 07:53:01 -08:00
Marius van der Wijden
6428663faf
eth/catalyst: send INVALID instead of INVALID_BLOCK_HASH (#26696)
This change will break one hive test, but pass another and it will be the better way going forward
2023-02-17 05:25:09 -05:00
ucwong
e9d42499bb
eth/downloader: fix typo (#26716) 2023-02-16 19:40:16 +02:00
Martin Holst Swende
13d7de77f4
eth/downloader: fix empty-body case in queue fetchresult (#26707) 2023-02-16 12:28:01 +02:00
Martin Holst Swende
645e3e86c4
core, eth/downloader: make body validation more strict (#26704) 2023-02-16 12:10:16 +02:00
Marius van der Wijden
7fb42e6db2
eth/downloader: handle missing withdrawals if empty list is expected (#26675)
This PR relaxes the block body ingress handling a bit: if block body withdrawals are missing (but expected to be empty), the body withdrawals are set to 'empty list' before being passed to upper layers. 

This fixes an issue where a block passed from EthereumJS to geth was deemed invalid.
2023-02-15 07:23:07 -05:00
Marius van der Wijden
dbd6c1324d
eth/catalyst: return error if withdrawals are nil post-shanghai (#26691)
Spec: https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#request
2023-02-14 13:39:00 -05:00
Sina Mahmoodi
ff38c9ee2e
eth/filters: replace atomic pointer with value (#26689)
* eth/filters: replace atomic.Pointer

* fix

* improve

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

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-02-14 15:48:22 +02:00
Darioush Jalali
7d29fff415
eth/tracers: more fork overrides in traceBlockToFile (#26655)
This change allows all post-Berlin forks to be specified as overrides for futureForkBlock in the config parameter for traceBlockToFile.
2023-02-13 05:01:35 -05:00