Commit graph

15469 commits

Author SHA1 Message Date
jsvisa
8750e2d975 native/flat: always set context from receipt
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
8ba2c3db0e return parity without txhash
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
b6dadd582c add prestate, flatcall, parity tracers
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
53f1a9e1e3 Revert "special for parity traces"
This reverts commit f646b87db6cfee0377e755ba31d4832d85cbc0f1.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
c1f6d4efcb special for parity traces
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
efa411ffb7 native/callflat: register parity tracer
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
b759f84cf9 check given tracer
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
1aac054d9a fix(callflat): set ctx in live mode
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
cbd1e10e9e feat(filter): implement a simple rlp.Encode/Decoder
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
978112678c batch delete kvdb
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
3e598cb740 freeze into frdb
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
68b63d48a2 eth/tracers: read from kvdb directly
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:05 +00:00
jsvisa
d5632f55fb eth/tracers: declare muxTracer as public
Signed-off-by: jsvisa <delweng@gmail.com>

fix(eth/tracers): clear callstack in OnTxStart

Signed-off-by: jsvisa <delweng@gmail.com>

eth/trace: add filter storage

Signed-off-by: jsvisa <delweng@gmail.com>

eth/tracers: register trace API

Signed-off-by: jsvisa <delweng@gmail.com>

eth/tracers: add filter_api

Signed-off-by: jsvisa <delweng@gmail.com>

eth/tracers: add trace_block rpc

Signed-off-by: jsvisa <delweng@gmail.com>

eth/tracers/native: MuxTracer as public

Signed-off-by: jsvisa <delweng@gmail.com>

eth/tracers: put/get trace by tracer name

Signed-off-by: jsvisa <delweng@gmail.com>

fix: the opposit blknum cmp f.latest

Signed-off-by: jsvisa <delweng@gmail.com>

feat: no need to handle reorg if blknum is the same

Signed-off-by: jsvisa <delweng@gmail.com>

fix: restore f.latest if offset

Signed-off-by: jsvisa <delweng@gmail.com>

feat: always update f.latest

Signed-off-by: jsvisa <delweng@gmail.com>

fix blknum=latest

Signed-off-by: jsvisa <delweng@gmail.com>

fix: latest use atomic.Uint64

Signed-off-by: jsvisa <delweng@gmail.com>

fix: f.latest use atomic

Signed-off-by: jsvisa <delweng@gmail.com>

fix: ignore if block < latest

Signed-off-by: jsvisa <delweng@gmail.com>

ignore all later ops is ignored

Signed-off-by: jsvisa <delweng@gmail.com>

ignored -> skipped

Signed-off-by: jsvisa <delweng@gmail.com>

db -> frdb

Signed-off-by: jsvisa <delweng@gmail.com>

add kvdb

Signed-off-by: jsvisa <delweng@gmail.com>

no skipper

Signed-off-by: jsvisa <delweng@gmail.com>

wip: save into kvdb

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-27 00:51:03 +00:00
jsvisa
9ae1444d48 pass eth.Backend into live tracer
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 09:22:43 +08:00
jsvisa
561c43d873 eth/tracers: pass stack into live tracer
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 09:04:54 +08:00
jsvisa
efbdfbbda3 eth,cmd: set tracer's backend after eth initalized
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
0f9fe5fda3 Revert "core: set logger after inited"
This reverts commit 9e1d9ec5d98b45da51ee63c344a832d5a0a1e0d5.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
7eec5583c1 Revert "cmd: set tracing logger after blockchain inited"
This reverts commit 682cc5a0bf1a283d21fa892efcae265542ff6fcf.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
0daacd3235 Revert "eth: set live tracer after inited"
This reverts commit d33b24cbd68cedb0ac5502b3ef44981eef6ab531.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
61ac985a93 Revert "cmd,eth: register live tracer with Backend interface"
This reverts commit 54f4a124632099c158debd151f2a884a54f5e935.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
560f2dc59c Revert "fix test"
This reverts commit 0bdbcba76118ed7360a7bb77d654caf608fb9b2f.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
efe83645ba Revert "eth/tracers: live tracer return apis"
This reverts commit 3d5a8b3166a941d7b55aaf5dffc39e85950dab47.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
e819b13d64 Revert "cmd: register live tracer apis"
This reverts commit c378326b2942c2c6538dab8e883bd0a6edf7bcd6.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
ecc2a379eb cmd: register live tracer apis
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
4881b880a1 eth/tracers: live tracer return apis
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
f76f25fe8c fix test
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
d75c962403 cmd,eth: register live tracer with Backend interface
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
a2360d61a8 eth: set live tracer after inited
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
5c88fb11e0 cmd: set tracing logger after blockchain inited
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
770ac7e5f7 core: set logger after inited
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:55 +08:00
jsvisa
3a9b93e3f3 core: bc.logger is duplicate with bc.vmconfig.tracer, use function instead
Signed-off-by: jsvisa <delweng@gmail.com>
2024-09-25 08:25:53 +08:00
jwasinger
80b529ea71
core/vm: more benchmarks for bls g1/g2-multiexp precompiles (#30459)
This change adds more comprehensive benchmarks with a wider-variety of input sizes for g1 and g2 multi exponentiation.
2024-09-24 13:53:46 +02:00
Karol Chojnowski
55ed8fef0b
core/tracing, core/vm: add ContractCode to the OpContext (#30466)
Extends the opcontext interface to include accessor for code being executed in current context. While it is possible to get the code via `statedb.GetCode`, that approach doesn't work for initcode.
2024-09-24 13:18:36 +02:00
Sina M
f2e13c7e33
internal/ethapi: fix gascap 0 for eth_simulateV1 (#30496)
Similar to #30474.
2024-09-24 13:14:38 +02:00
maskpp
2278647ef2
core/rawdb: make sure specified state scheme is valid (#30499)
This change exits with error if user provided a `--state.scheme` which is neither `hash` nor `path`
2024-09-24 09:26:29 +02:00
jwasinger
564b616163
internal/ethapi/api: for simulated calls, set gaspool to max value if global gascap is 0 (#30474)
In #27720, we introduced RPC global gas cap. A value of `0` means an unlimited gas cap. However, this was not the case for simulated calls. This PR fixes the behaviour.
2024-09-23 13:31:56 +02:00
rjl493456442
b805772cb4
core/state: commit snapshot only if the base layer exists (#30493)
This pull request skips the state snapshot update if the base layer is
not existent, eliminating the numerous warning logs after an unclean
shutdown.

Specifically, Geth will rewind its chain head to a historical block
after unclean shutdown and state snapshot will be remained as unchanged
waiting for recovery. During this period of time, the snapshot is unusable
and all state updates should be ignored/skipped for state snapshot update.
2024-09-23 19:27:29 +08:00
zhiqiangxu
956d32d3e4
core/state: fix comment of mode (#30490) 2024-09-23 09:29:07 +02:00
zhiqiangxu
118c84af57
cmd/utils: fix setEtherbase (#30488)
Make `setEtherbase` fall thorugh and handle `miner.pending.feeRecipient` after showing deprecation-warning for `miner.etherbase`-flag.
2024-09-23 09:17:18 +02:00
Martin HS
f4c6c033c8
travis: work around travis/osx/go1.23 setup bug (#30491)
This is a work-around for a strange issue with travis, specifically,
`os=osx, go: 1.23.1`. When this is used, the actual go that ends up
being used is `go1.19.4 darwin/amd64 `.

Using `which go`, it told me that the `go` in the path was a softlink at
`/Users/travis/gopath/bin/go1.23.1 `. However, this was not true: using
`command -v go`, it told me that the actual `go` that was used is a
softlink at `/usr/local/bin/go`.

This change rewrites the `/usr/local/bin/go` softlink to point to the
binary at `/Users/travis/gopath/bin/go1.23.1`, so we get the right
go-version.
2024-09-22 10:12:47 +02:00
Péter Szilágyi
9326a118c7
beacon, core, eth, miner: integrate witnesses into production Geth (#30069)
This PR integrates witness-enabled block production, witness-creating
payload execution and stateless cross-validation into the `engine` API.
The purpose of the PR is to enable the following use-cases (for API
details, please see next section):

- Cross validating locally created blocks:
- Call `forkchoiceUpdatedWithWitness` instead of `forkchoiceUpdated` to
trigger witness creation too.
- Call `getPayload` as before to retrieve the new block and also the
above created witness.
- Call `executeStatelessPayload` against another client to
cross-validate the block.

- Cross validating locally processed blocks:
- Call `newPayloadWithWitness` instead of `newPayload` to trigger
witness creation too.
- Call `executeStatelessPayload` against another client to
cross-validate the block.

- Block production for stateless clients (local or MEV builders):
- Call `forkchoiceUpdatedWithWitness` instead of `forkchoiceUpdated` to
trigger witness creation too.
- Call `getPayload` as before to retrieve the new block and also the
above created witness.
- Propagate witnesses across the consensus libp2p network for stateless
Ethereum.

- Stateless validator validation:
- Call `executeStatelessPayload` with the propagated witness to
statelessly validate the block.

*Note, the various `WithWitness` methods could also *just be* an
additional boolean flag on the base methods, but this PR wanted to keep
the methods separate until a final consensus is reached on how to
integrate in production.*

---

The following `engine` API types are introduced:

```go
// StatelessPayloadStatusV1 is the result of a stateless payload execution.
type StatelessPayloadStatusV1 struct {
	Status          string      `json:"status"`
	StateRoot       common.Hash `json:"stateRoot"`
	ReceiptsRoot    common.Hash `json:"receiptsRoot"`
	ValidationError *string     `json:"validationError"`
}
```

- Add `forkchoiceUpdatedWithWitnessV1,2,3` with same params and returns
as `forkchoiceUpdatedV1,2,3`, but triggering a stateless witness
building if block production is requested.
- Extend `getPayloadV2,3` to return `executionPayloadEnvelope` with an
additional `witness` field of type `bytes` iff created via
`forkchoiceUpdatedWithWitnessV2,3`.
- Add `newPayloadWithWitnessV1,2,3,4` with same params and returns as
`newPayloadV1,2,3,4`, but triggering a stateless witness creation during
payload execution to allow cross validating it.
- Extend `payloadStatusV1` with a `witness` field of type `bytes` if
returned by `newPayloadWithWitnessV1,2,3,4`.
- Add `executeStatelessPayloadV1,2,3,4` with same base params as
`newPayloadV1,2,3,4` and one more additional param (`witness`) of type
`bytes`. The method returns `statelessPayloadStatusV1`, which mirrors
`payloadStatusV1` but replaces `latestValidHash` with `stateRoot` and
`receiptRoot`.
2024-09-20 16:43:42 +03:00
Martin HS
b018da9d02
build: fix macos builds by working around travis osx flaw (#30479)
This should fix https://github.com/ethereum/go-ethereum/issues/30471.
See investigation in https://github.com/ethereum/go-ethereum/pull/30478
for more background.
2024-09-20 14:06:12 +02:00
Guillaume Ballet
deb5c087c4
.github: add release maintainers to params/ CODEOWNERS (#30458) 2024-09-19 10:23:13 +02:00
maskpp
7513966d6e
ethdb/pebble: handle errors (#30367) 2024-09-19 09:41:10 +02:00
Szupingwang
c4c2c4fb14
core: minor fix for the log wrapper with debug purpose (#30454)
After this PR, https://github.com/ethereum/go-ethereum/pull/28187, the
way to set the default logger is different. This PR only updates the way
to set logger in some test cases' comments that existed in the codebase
(since this commit
https://github.com/ethereum/go-ethereum/commit/b63e3c37a6). Although I
am not sure if it a good way to leave the code in the comment, it truly
makes me more efficiently to debug and fix the failing test cases.
2024-09-19 14:38:06 +08:00
Sina M
868d53c2f2
genesis: fix dev mode alloc (#30460)
Balance being null causes `getGenesisState` to fail as the balance field
is required in json marshaling of an account.
2024-09-19 14:35:14 +08:00
Guillaume Ballet
af794ef682
params: begin v1.14.10 release cycle (#30457) 2024-09-18 15:48:47 +03:00
Guillaume Ballet
f321dfa827
params: release go-ethereum v1.14.9 stable (#30455) 2024-09-18 15:27:03 +03:00
Guillaume Ballet
d09600fdf9
Revert "core/rawdb: remove unused transition status state accessors" (#30449)
Reverts ethereum/go-ethereum#30433
2024-09-18 11:53:50 +03:00
Sina M
8032b63f16
core/tracing: add verkle gas change reasons to changelog (#30444)
Add changes from #30409 and #29338 to changelog.

---------

Co-authored-by: Martin HS <martin@swende.se>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2024-09-17 16:10:59 +02:00