Commit graph

15135 commits

Author SHA1 Message Date
Martin HS
88da3ce370
Update core/state/access_events_test.go 2024-05-10 19:37:47 +02:00
Gary Rong
1a661dcabf core/vm: remove duplicated EIP initialization 2024-05-09 15:43:38 +08:00
Guillaume Ballet
3800a708e1 fix some formatting 2024-05-07 11:37:10 +02:00
Guillaume Ballet
dbca8bb5d4
Apply suggestions from code review
Co-authored-by: Martin HS <martin@swende.se>
2024-05-07 10:52:30 +02:00
Guillaume Ballet
37952f6063 remove unused line 2024-05-06 18:13:34 +02:00
Guillaume Ballet
d804ab92cd fix broken test 2024-05-06 15:05:58 +02:00
Guillaume Ballet
7fa2327931 a few bug fixes and feedback from Gary
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-05-06 14:22:36 +02:00
Guillaume Ballet
72efd71981 move point cache to cachingDB and remove more witness stuff
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-05-03 18:27:39 +02:00
Guillaume Ballet
3777222b86 Focus on gas charges and remove witness-building parts
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-05-02 17:00:44 +02:00
Guillaume Ballet
04a4fe14d9 more review feedback 2024-05-02 16:51:10 +02:00
Guillaume Ballet
d5699fbb2e Revert "Several fixes (#425)"
This reverts commit aa96a9c7d6.
2024-05-02 16:36:30 +02:00
rjl493456442
aa96a9c7d6
Several fixes (#425)
* params: fix chainconfig rules

* core, core/state: init accessEvent for each transactin

* core/state: reuse point cache between blocks
2024-05-02 09:25:42 +02:00
Guillaume Ballet
026ebc93b4
Apply suggestions from code review
Co-authored-by: Martin HS <martin@swende.se>
2024-04-29 16:18:56 +02:00
Guillaume Ballet
0620c5cc79 address last review comments 2024-04-29 13:42:02 +02:00
Guillaume Ballet
c04b64c8be remove unnecessary creation field 2024-04-29 12:07:49 +02:00
Guillaume Ballet
3a5e0410f8 improve comment for eip4762 PUSH1 handler 2024-04-29 11:33:52 +02:00
Guillaume Ballet
4030cdd81f rename AccessWitness to AccessEvents 2024-04-29 11:24:40 +02:00
Guillaume Ballet
c65d117a92 add verkle op handlers 2024-04-26 17:35:36 +02:00
Guillaume Ballet
d4f27686b8 review feedback from @holiman 2024-04-26 15:44:14 +02:00
Guillaume Ballet
811ebfeb08 fix rebase issues 2024-04-26 15:44:14 +02:00
Guillaume Ballet
2334cb7275 rename access witness functions 2024-04-26 15:44:14 +02:00
Guillaume Ballet
fea85534ec add more fixes 2024-04-26 15:44:14 +02:00
Guillaume Ballet
1bdae104a4 update based on fixes added to the main branch 2024-04-26 15:44:14 +02:00
Guillaume Ballet
f534a4dc35 partial review feedback 2024-04-26 15:44:14 +02:00
Guillaume Ballet
54bdfb42bd Update core/state/access_witness.go
Co-authored-by: Martin HS <martin@swende.se>
2024-04-26 15:44:14 +02:00
Guillaume Ballet
e34ac0ffa8 fix reference error 2024-04-26 15:44:13 +02:00
Guillaume Ballet
a21c021b51 add beacon block hash to the witness 2024-04-26 15:44:13 +02:00
Guillaume Ballet
2b3391ecb3 fix linter issue 2024-04-26 15:44:13 +02:00
Guillaume Ballet
bcc6da85cc fix failing tests 2024-04-26 15:44:13 +02:00
Guillaume Ballet
9ad03c90b7 cmd, core, params, trie: Add verkle access witness
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-04-26 15:44:13 +02:00
Péter Szilágyi
8d42e115b1
core/state: revert pending storage updates if they revert to original (#29661) 2024-04-26 15:24:40 +03:00
Péter Szilágyi
ad4fb2c729
build: drop trusty from PPA builds, EOL and incompatible (#29651)
* build: drop trusty from PPA builds, EOL and incompatible

* build: add Ubuntu Noble PPA build target
2024-04-25 14:07:39 +03:00
Péter Szilágyi
634d037937
travis: revert the PPA fix hot-build, it works (#29649) 2024-04-25 12:27:36 +03:00
Péter Szilágyi
a0282fc94f
travis: temporarilly enable PPA builds for testing (#29648) 2024-04-25 12:00:59 +03:00
Péter Szilágyi
1f628d842c
build: build all the builders to build all the builders (#29647)
* build: build all the builders to build all the builders

* build: tweak the indexes a bit to make them consistent
2024-04-25 11:50:25 +03:00
Martin HS
243cde0f54
core/state: better randomized testing (postcheck) on journalling (#29627)
This PR fixes some flaws with the existing tests.

The randomized testing (TestSnapshotRandom) executes a series of steps which modify the state and create journal-events. Later on, we compare the forward-going-states against the backwards-unrolling-journal-states, and check that they are identical.

The "identical" check is performed using various accessors. It turned out that we failed to check some things: 
- the accesslist contents
- the transient storage contents
- the 'newContract' flag
- the dirty storage map

This change adds these new checks
2024-04-25 09:56:25 +02:00
Undefinedor
a13b92524d
eth/protocols/eth,p2p/discover: remove unnecessary checks (#29590)
fix useless condition
2024-04-25 08:40:29 +02:00
yujinpark
2f6ff492ae
internal/ethapi: typo (#29636) 2024-04-25 13:47:29 +08:00
Péter Szilágyi
4f4f9d88d3
core/state: storage journal entry should revert dirtyness too (#29641)
Currently our state journal tracks each storage update to a contract, having the ability to revert those changes to the previously set value.

For the very first modification however, it behaves a bit wonky. Reverting the update doesn't actually remove the dirty-ness of the slot, rather leaves it as "change this slot to it's original value". This can cause issues down the line with for example write witnesses needing to gather an unneeded proof.

This PR modifies the storageChange journal entry to not only track the previous value of a slot, but also whether there was any previous value at all set in the current execution context. In essence, the PR changes the semantic of storageChange so it does not simply track storage changes, rather it tracks dirty storage changes, an important distinction for being able to cleanly revert the journal item.
2024-04-24 17:45:24 +02:00
Aaron Chen
7362691479
trie, consensus/clique: use maps.Clone (#29616) 2024-04-24 14:27:58 +02:00
qcrao
ac21f9bfb5
trie: preallocate capacity for fields slice (#29614)
trie: Preallocate capacity for fields slice
2024-04-24 14:04:20 +02:00
Martin HS
0d4c38865e
core/state: remove account reset operation v2 (#29520)
* core/state, tests: remove account reset operation

* core/state, core/vm: implement createcontract journal event

* core/state: make createcontract not emit dirtied account, unskip tests

* core/state: add createcontract to journal fuzzing

* core/state: fix journal

* core/state: address comments

* core/state: remove useless code

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-04-24 12:59:06 +03:00
Péter Szilágyi
938734be3c params: begin 1.14.1 release cycle 2024-04-24 11:05:10 +03:00
Péter Szilágyi
87246f3cba params: release Geth v1.14.0 2024-04-24 11:02:49 +03:00
jwasinger
5f3c58f1de
eth/downloader: fix case where skeleton reorgs below the filled block (#29358)
This change adds a testcase and fixes a corner-case in the skeleton sync.

With this change, when doing the skeleton cleanup, we check if the filled header is acually within the range of what we were meant to backfill. If not, it means the backfill was a noop (possibly because we started and stopped it so quickly that it didn't have time to do any meaningful work). In that case, just don't clean up anything.

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-04-24 09:07:39 +02:00
Matthieu Vachon
ade7515c81
eth, eth/tracers: process beacon root before transactions (#29402)
The beacon root when applied in `state_processor.go` is performed right before executing transaction. That means that contract reliying on this value would query the same value found in the block header.

In that spirit, it means that any tracing/operation relying on state data which touches transaction must have updated the beacon root before any transaction processing.
2024-04-24 07:58:05 +02:00
Chris Ziogas
fb08fd334a
core/tracing: Add OnClose Trace Hook (#29629)
The OnClose trace hook is being triggered on blockchain Stop, so as tracers can release any resources.
2024-04-24 07:54:59 +02:00
Chris Ziogas
882d1e22f6
cmd/geth, cmd/utils: rename config and flag to VMTraceJsonConfig (#29573)
renames the yaml config field VMTraceConfig to VMTraceJsonConfig, in order to be consistent with the renaming of the CLI flag.
2024-04-24 07:53:16 +02:00
Mario Vega
94579932b1
core/vm: fix Prague contracts (#29612)
core/vm: fix prague contracts
2024-04-23 15:10:24 +02:00
Felföldi Zsolt
256d4b099c
beacon/light: request finality update explicitly when necessary (#29567)
This PR adds an extra mechanism to sync.HeadSync that tries to retrieve the latest finality update from every server each time it sends an optimistic update in a new epoch (unless we already have a validated finality update attested in the same epoch). 

Note that this is not necessary and does not happen if the new finality update is delivered before the optimistic update. The spec only mandates light_client_finality_update events when a new epoch is finalized. If the chain does not finalize for a while then we might need an explicit request that returns a finality proof that proves the same finality epoch from the latest attested epoch.
2024-04-23 13:31:32 +02:00