Commit graph

491 commits

Author SHA1 Message Date
wit liu
d6309612fc
all: fix unnecessary whitespace (#1800) 2025-12-08 15:07:11 +05:30
wit liu
8664487b0c
tests: delete unused parameter (#1819) 2025-12-08 12:55:54 +05:30
Daniel Liu
eaaeea0cad
all: use slices.Sort() to sort strings (#1712) 2025-12-07 15:49:13 +05:30
Daniel Liu
07328dcec4
core, eth, trie: abstract node scheme #25532 (#1123)
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon.

Apart from that, a few changes are also included which is worth mentioning:

-  port the changes in the stacktrie, tracking the path prefix of nodes during commit
-  use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-17 11:25:08 +05:30
Daniel Liu
3af629078a
internal/ethapi: eth_simulateV1 #27720 (#1606) 2025-11-08 16:09:18 +05:30
Daniel Liu
58c066f053
all: handle err from func rlp.Encode, close XFN-127 (#1692) 2025-11-03 12:45:19 +05:30
wit liu
9ce02a7010
all: fix goimports (#1560) 2025-09-24 07:51:10 +08:00
wit765
12eab8e785
all: rename ChainId to ChainID #16853 (#1456)
Co-authored-by: wit <wit765765346@gmail>
2025-09-09 22:54:34 +08:00
Daniel Liu
ad9003c41e
eth/tracers: live chain tracing with hooks #29189 (#1352)
Here we add a Go API for running tracing plugins within the main block import process.

As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within
that file register your custom tracer implementation. Then recompile geth and select your tracer
on the command line. Hooks defined in the tracer will run whenever a block is processed.

The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of
requiring an interface, for several reasons:

- We plan to keep this API stable long-term. The core/tracing hook API does not depend on
  on deep geth internals.
- There are a lot of hooks, and tracers will only need some of them. Using a struct allows you
   to implement only the hooks you want to actually use.

All existing tracers in eth/tracers/native have been rewritten to use the new hook system.

This change breaks compatibility with the vm.EVMLogger interface that we used to have.
If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking
your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM.

---------

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2025-09-09 17:30:56 +08:00
Daniel Liu
be61f66cb2
core/types: remove message #25977 (#1322) 2025-09-09 11:23:47 +08:00
Daniel Liu
2d36f159c7
all: update dead wiki links #32215 (#1409)
---

**Description:**
- Replaced outdated GitHub wiki links with current, official
documentation URLs.
- Removed links that redirect or are no longer relevant.
- Ensured all references point to up-to-date and reliable sources.

---

Co-authored-by: Maxim Evtush <154841002+maximevtush@users.noreply.github.com>
2025-09-03 15:41:48 +08:00
Daniel Liu
e2edc41b50
all: mv loggers to eth/tracers #23892 (#1269) 2025-09-03 15:35:28 +08:00
Daniel Liu
6f36533962
all: remove ethash pow 27178 (#1378) 2025-08-26 11:54:01 +08:00
Daniel Liu
9c6816eab6
core/vm: make time field use uint64 #26474 (#1319) 2025-08-20 15:22:06 +08:00
Daniel Liu
34020969ff
all: simplify timestamps to uint64 #19372 (#1318) 2025-08-08 10:33:37 +08:00
Daniel Liu
0fd51f13a1
tests/fuzzers: added bn marshaling fuzzers #32053 (#1228)
Adds marshaling fuzzing for G1 and G2 to oss-fuzz.

Also aligns the behavior of the google library to that of gnark and
cloudflare, which only ever read the first 64 / 128 bytes of the input,
regardless of how long the input is

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2025-07-26 17:36:58 +08:00
Daniel Liu
4c5d1bd95e
core: change handling of dirty objects in state #15225 #16485 #16491 (#1171)
* core: change handling of dirty objects in state #15225

* core/state: fix bug in copy of copy State #16485

* core/state: fix ripemd-cornercase in Copy #16491
2025-07-02 14:07:21 +08:00
Daniel Liu
f07824db20
core, ethdb, tests, trie: implement NewBatchWithSize API for batcher #24392 (#1085) 2025-06-17 13:26:50 +08:00
Daniel Liu
d25c6f02a7
all: not copy loop var for golang v1.22 (#1020) 2025-04-29 17:27:36 +08:00
Daniel Liu
b9a6c8c32d
cmd, core, eth, trie: add trie read caching layer (#18087) (#946) 2025-04-16 17:27:43 +08:00
Daniel Liu
ebb2c3b2ea all: new empty trie with types.EmptyRootHash instead of null (#27230) 2025-02-07 13:04:45 +08:00
Daniel Liu
4bbcd988b2 params: remove EIP150Hash from chainconfig (#27087) 2025-02-05 18:16:17 +08:00
Daniel Liu
3f58066879 all: remove debug field from vm config (#27048) 2025-02-05 18:16:17 +08:00
Daniel Liu
b6f3007af1 core: move genesis alloc types to core/types (#29003) 2025-01-24 16:54:12 +08:00
Daniel Liu
5081ad72f5 accounts: move fuzzers into native packages (#28467) 2025-01-24 16:54:12 +08:00
Daniel Liu
b0063d39b9 accounts/abi: ABI explicit difference between Unpack and UnpackIntoInterface (#21091)
* accounts/abi: refactored abi.Unpack

* accounts/abi/bind: fixed error

* accounts/abi/bind: modified template

* accounts/abi/bind: added ToStruct for conversion

* accounts/abi: reenabled tests

* accounts/abi: fixed tests

* accounts/abi: fixed tests for packing/unpacking

* accounts/abi: fixed tests

* accounts/abi: added more logic to ToStruct

* accounts/abi/bind: fixed template

* accounts/abi/bind: fixed ToStruct conversion

* accounts/abi/: removed unused code

* accounts/abi: updated template

* accounts/abi: refactored unused code

* contracts/checkpointoracle: updated contracts to sol ^0.6.0

* accounts/abi: refactored reflection logic

* accounts/abi: less code duplication in Unpack*

* accounts/abi: fixed rebasing bug

* fix a few typos in comments

* rebase on master

Co-authored-by: Guillaume Ballet <gballet@gmail.com>
2025-01-24 16:18:30 +08:00
Daniel Liu
7c3c703559 tests/fuzzers/abi: add fuzzer for fuzzing package accounts/abi (#21217)
* tests/fuzzers/abi: added abi fuzzer

* accounts/abi: fixed issues found by fuzzing

* tests/fuzzers/abi: update fuzzers, added repro test

* tests/fuzzers/abi: renamed abi_fuzzer to abifuzzer

* tests/fuzzers/abi: updated abi fuzzer

* tests/fuzzers/abi: updated abi fuzzer

* accounts/abi: minor style fix

* go.mod: added go-fuzz dependency

* tests/fuzzers/abi: updated abi fuzzer

* tests/fuzzers/abi: make linter happy

* tests/fuzzers/abi: make linter happy

* tests/fuzzers/abi: comment out false positives
2025-01-24 16:18:29 +08:00
Daniel Liu
6794504d40 all: update files by 'go generate ./...' 2025-01-22 15:10:52 +08:00
Daniel Liu
588f61661c build: add imports for go generate tools (#24682) 2025-01-20 11:52:59 +08:00
kevaundray
e581093ce1 crypto, tests/fuzzers: add gnark bn254 precompile methods for fuzzing (#30585)
Makes the gnark precompile methods more amenable to fuzzing
2025-01-04 11:00:57 +08:00
Daniel Liu
15be5ba464 crypto: use decred secp256k1 directly (#30595) 2025-01-04 11:00:57 +08:00
Daniel Liu
6e33633d28 common: drop BigMin and BigMax, they pollute our dep graph (#30645) 2024-12-28 09:06:31 +08:00
Daniel Liu
4cc2b2ea5f tests/fuzzers: move fuzzers into native packages (#28467) 2024-12-28 09:06:31 +08:00
JukLee0ira
48d1f22fde all: simplify function TransitionDb (#20830) 2024-12-28 09:02:48 +08:00
JukLee0ira
7491a7ba74 all: improve EstimateGas API (#20830) 2024-12-21 14:35:44 +08:00
Daniel Liu
f7b6ad67a7 crypto, tests: update fuzzers to native go fuzzing (#28352) 2024-12-09 17:49:00 +08:00
Daniel Liu
17c048092e tests/fuzzers/bn256: add PairingCheck fuzzer (#27252)
* tests/fuzzers/bn256: scale gnark result by constant

* tests/fuzzers/bn256: scale gnark result by constant
2024-12-09 17:49:00 +08:00
Daniel Liu
cb3edac2c7 crypto: use btcec/v2 for no-cgo (#24533) 2024-12-09 17:49:00 +08:00
Daniel Liu
5ee26e04ed crypto/secp256k1: fix undefined behavior in BitCurve.Add (#22621) 2024-12-09 17:49:00 +08:00
Daniel Liu
7711f4b76d tests/fuzzers: crypto/bn256 tests against gnark-crypto (#22755) 2024-12-09 17:49:00 +08:00
Daniel Liu
ae95ceac41 bn256: added consensys/gurvy bn256 implementation (#21812) 2024-12-09 17:49:00 +08:00
Daniel Liu
ddc5e618a7 crypto/bn256: fix bn256Mul fuzzer to not hang on large input (#21872)
* crypto/bn256: fix bn256Mul fuzzer to not hang on large input

* Update crypto/bn256/bn256_fuzz.go

Co-authored-by: ligi <ligi@ligi.de>

Co-authored-by: ligi <ligi@ligi.de>
2024-12-09 17:49:00 +08:00
Daniel Liu
92fc843683 crypto: switch over to upstream sha3 package (#18390) 2024-12-09 17:48:59 +08:00
Daniel Liu
4cac1865ba all: remove noop vm config flags (#23111) 2024-11-15 20:12:49 +08:00
Daniel Liu
d850fc4081 core: only check sendernoeoa in non fake mode (#23424) 2024-11-01 11:36:53 +08:00
Daniel Liu
d6daac576d core: check if sender is EOA (#23303) 2024-11-01 11:36:53 +08:00
Daniel Liu
c0a63a5295 tests: fix eip1559 tx on non-eip1559 network (#23054) 2024-11-01 11:36:52 +08:00
Daniel Liu
6b67327a4b tests: update for London (#22976) 2024-11-01 11:36:52 +08:00
Daniel Liu
32778572d7 Access list state test format (#22290) 2024-11-01 11:36:52 +08:00
Daniel Liu
e18553b855 all: implement eip-1559 (#22837) 2024-11-01 11:36:52 +08:00