Commit graph

413 commits

Author SHA1 Message Date
Daniel Liu
031ea75eca
eth/tracers: package restructuring #23857 (#1266) 2025-08-29 05:26:36 +08:00
Daniel Liu
0be5580b98
all: use big.Sign to compare with zero #29490 (#1387) 2025-08-28 18:56:39 +08:00
Daniel Liu
9c6816eab6
core/vm: make time field use uint64 #26474 (#1319) 2025-08-20 15:22:06 +08:00
Daniel Liu
9cad0a0cc0
all: create global hasher pool #31769 (#1233)
This PR creates a global hasher pool that can be used by all packages.
It also removes a bunch of the package local pools.

It also updates a few locations to use available hashers or the global
hashing pool to reduce allocations all over the codebase.
This change should reduce global allocation count by ~1%

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-08-20 15:11:09 +08:00
Daniel Liu
34020969ff
all: simplify timestamps to uint64 #19372 (#1318) 2025-08-08 10:33:37 +08:00
Daniel Liu
3620d9930d
core/vm: use clear from go v1.21 #29307 (#1246) 2025-08-04 11:54:49 +08:00
Daniel Liu
1d9fd6bdd2
core: show db error-info in case of mismatched hash root #26870 (#1220)
When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-04 11:51:47 +08:00
Daniel Liu
52f5766059
core: pre-allocate in Copy() #25279 (#1213) 2025-07-28 16:57:51 +08:00
Daniel Liu
7bb2c7793b
core/vm: delete unused error #29062 (#1245) 2025-07-26 17:45:31 +08:00
Daniel Liu
6f6e08f83b
core/vm: prevent overflow #29023 (#1244) 2025-07-26 17:44:45 +08:00
Daniel Liu
42d3549e2c
core: using math.MaxUint64 instead of 0xffffffffffffffff #29022 #29024 (#1243) 2025-07-26 17:43:36 +08:00
Daniel Liu
5561c27308
core: fix typos (#1237)
fixes various typos in core

Co-authored-by: 0xbstn <bastien-bouge@hotmail.fr>
2025-07-26 17:42:50 +08:00
Daniel Liu
32b929e781
core/vm/runtime: add Random field to config #28001 (#1234) 2025-07-26 17:41:56 +08:00
Daniel Liu
8f76709a10
core/vm, go.mod: update uint256 to v1.3.2 and use faster method #30868 (#1241) 2025-07-17 17:56:53 +08:00
Daniel Liu
4b4980d949
core/vm: set basefee to 0 internally on eth_call #28470 (#1238) 2025-07-17 17:54:23 +08:00
Daniel Liu
dc01dba464
core/vm: minor code formatting #28199 (#1235)
Adding a space beween function opOrigin() and opcCaller() in instruciton.go.
Adding a space beween function opkeccak256()  and opAddress() in instruciton.go.

Co-authored-by: hzysvilla <ecjgvmhc@gmail.com>
2025-07-17 17:53:02 +08:00
Daniel Liu
4fabc43a01
core/vm: fix invalid merkle root caused by PR #627 (#1033) 2025-05-14 16:47:53 +08:00
Daniel Liu
a997425b03
all: fix warning of DeepEqual on error #23624 (#960) 2025-04-24 18:31:47 +08:00
Daniel Liu
30195e88ee core/vm: enable cancun instruction set 2025-02-19 14:20:45 +08:00
Daniel Liu
511a372f14 core/vm: BLOBHASH opcode 0x49 (#27356) 2025-02-11 18:31:30 +08:00
Daniel Liu
af4a3b0f9f core/vm: implement BLOBBASEFEE opcode 0x4a (#28098) 2025-02-10 10:58:59 +08:00
Daniel Liu
c08d4ff4a6 core/state, core/vm: implement EIP 6780 (#27189) 2025-02-07 14:52:29 +08:00
Daniel Liu
186d49b1f3 core/vm: use types.EmptyCodeHash (#27729) 2025-02-07 13:50:48 +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
6d40cdf7c0 core/vm: implement EIP-5656, mcopy instruction (#26181) 2025-02-06 16:54:19 +08:00
Daniel Liu
240de84287 core/vm: define cancun + enable 1153 (tstore/tload) in cancun (#27663) 2025-02-05 18:16:17 +08:00
Daniel Liu
07fd1c64cf core/vm: order opcodes properly (#27113) 2025-02-05 18:16:17 +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
joohhnnn
6473d18cdb core/vm: clarify comment (#27045) 2025-02-05 18:16:17 +08:00
Daniel Liu
551e3594cf core/vm: use atomic.Bool (#26951) 2025-02-05 18:16:17 +08:00
Daniel Liu
4190465c53 core/vm: expose jumptable constructors (#26880) 2025-02-05 18:16:17 +08:00
Daniel Liu
0f737b4725 core: replace suicide with selfdestruct to improve code consistency (#27716) 2025-01-24 16:54:12 +08:00
JukLee0ira
f7b591ffe3 eth/tracers: add a golang tracer to locate contracts (#23708) 2025-01-22 12:37:37 +08:00
Daniel Liu
588f61661c build: add imports for go generate tools (#24682) 2025-01-20 11:52:59 +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
6ec35b9644 all: get rid of custom MaxUint64 and MaxUint64 (#30636) 2024-12-28 09:06:31 +08:00
Daniel Liu
ff13d16fe5 core/vm: make structlog/json-log stack hex again (#28628) 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
7491a7ba74 all: improve EstimateGas API (#20830) 2024-12-21 14:35:44 +08:00
Daniel Liu
ad5e7d6db3 crypto: add SignatureLength constant and use it everywhere (#19996) 2024-12-09 17:48:59 +08:00
Daniel Liu
733c298b0e core/vm: improve EVM reusability (#26341) 2024-12-09 17:47:05 +08:00
Daniel Liu
0d0ea46bfa core: implement EIP-3651, warm coinbase (#25819) 2024-12-09 17:44:30 +08:00
Daniel Liu
4cac1865ba all: remove noop vm config flags (#23111) 2024-11-15 20:12:49 +08:00
Daniel Liu
ed242b4763 all: implement EIP-1153 transient storage (#26003) 2024-11-15 19:39:18 +08:00
Daniel Liu
f64aea4ba0 core/vm: implement EIP-3860: Limit and meter initcode (#23847) 2024-11-01 11:36:53 +08:00
Emmanuel T Odeke
59bc3bfd09 eth/tracers/logger: remove unnecessary comparisons in accessList.equal (#24663)
This change removes extraneous/unnecessary checks for equality
when comparing 2 accessList values A and B. Given that we validate that
their lengths of A and B are equal, if so and if every element in A is
in B, reflexively every element in B is already in A. If that weren't
the case and an element g existed in A but not in B, that would mean
that there is an extra element and hence a mathematical contradiction.

Fixes #24658
2024-11-01 11:36:53 +08:00
Daniel Liu
1c47afb286 core/vm/runtime: add function TestColdAccountAccessCost 2024-11-01 11:36:52 +08:00
Daniel Liu
c7d49072f1 core/vm: evm fix panic (#23047) 2024-11-01 11:36:52 +08:00
Daniel Liu
18bc355e89 core, internal: support various eth_call invocations post 1559 (#23027) 2024-11-01 11:36:52 +08:00