Commit graph

1707 commits

Author SHA1 Message Date
Daniel Liu
fbecb8c5a5 all: fix staticcheck warning ST1006: don't use generic name self
The name of a method’s receiver should be a reflection of its identity;
often a one or two letter abbreviation of its type suffices (such as
“c” or “cl” for “Client”). Don’t use generic names such as “me”, “this”
or “self”, identifiers typical of object-oriented languages that place
more emphasis on methods as opposed to functions. The name need not be
as descriptive as that of a method argument, as its role is obvious and
serves no documentary purpose. It can be very short as it will appear
on almost every line of every method of the type; familiarity admits
brevity. Be consistent, too: if you call the receiver “c” in one method,
don’t call it “cl” in another.
2024-10-25 21:30:54 +08:00
Daniel Liu
b68b9c64ea
Merge pull request #685 from gzliudan/emptyroot
all: use unified emptyRootHash and emptyCodeHash
2024-10-25 15:28:51 +08:00
Daniel Liu
87a6b5f4c3
Merge pull request #689 from gzliudan/fix-st1005
all: fix staticcheck warning ST1005
2024-10-25 15:28:07 +08:00
Daniel Liu
c6e4e880ea all: fix staticcheck warning SA4006: never used value 2024-10-24 17:37:19 +08:00
Daniel Liu
a79411fa06 all: fix staticcheck warning ST1005: incorrectly formatted error string 2024-10-24 09:48:20 +08:00
Daniel Liu
464a89074b all: use unified emptyRootHash and emptyCodeHash (#26718) 2024-10-21 17:55:16 +08:00
Daniel Liu
8c077345d0 all: removed blockhash from statedb (#23126) 2024-10-18 09:24:52 +08:00
Daniel Liu
1c84a31bb6 core/vm: deepcopy jumptable when enabling extra eips (#26137) 2024-10-17 11:23:04 +08:00
Daniel Liu
4482ea4d84 core/vm: fix docstrings 2024-10-17 11:23:04 +08:00
Daniel Liu
480adaf960 core/vm: minor trivial clean up (#25880) 2024-10-17 11:23:04 +08:00
Daniel Liu
69cb57a0f4 core/vm: not deep copy return data slice upon call completion (#25183) 2024-10-17 11:23:04 +08:00
Daniel Liu
ee5dd8673f core/vm: remove empty lines 2024-10-17 11:23:04 +08:00
Daniel Liu
16f2aabc64 core/vm: more linters (#24783) 2024-10-17 11:23:04 +08:00
Paweł Bylica
be6631beb0 core/vm: optimize jumpdest analysis (#23500)
core/vm: optimize PUSH opcode discrimination
2024-10-17 11:23:04 +08:00
Daniel Liu
1fa9e81870 core/vm: reduce overhead in instructions-benchmark (#24860) 2024-10-17 11:23:04 +08:00
Daniel Liu
c78b9e6245 core/vm: for tracing, do not report post-op memory (#24867) 2024-10-17 11:23:04 +08:00
Daniel Liu
45c644c43d core/vm: update benchmark to use Errorf instead of Sprintf (#24845) 2024-10-17 11:23:04 +08:00
Daniel Liu
6fa968201f core/vm: fix some typos 2024-10-17 11:23:04 +08:00
Daniel Liu
224caa5a08 core/vm: avoid memory expansion check for trivial ops (#24048) 2024-10-17 11:23:04 +08:00
Daniel Liu
532137c37b core/vm: use golang native big.Int (#26834) 2024-10-17 10:36:53 +08:00
Daniel Liu
8e15f825ce core/vm: use optimized bigint (#26021) 2024-10-17 10:36:53 +08:00
Daniel Liu
c87b7c3135 common/math: optimized modexp (#25525) 2024-10-17 10:36:53 +08:00
Daniel Liu
b653dbc60c core/vm, protocol_params: implement eip-2565 modexp repricing (#21607) 2024-10-17 10:36:53 +08:00
Daniel Liu
a8ea86e40c
Merge pull request #644 from gzliudan/format-0x
all: change format 0x%x to %#x
2024-10-17 10:35:34 +08:00
Daniel Liu
693190e5b9 core: fix wrong blockHash for eth_getLogs (#650) 2024-10-16 11:00:58 +08:00
Daniel Liu
edace6ac6c all: change format 0x%x to %#x (#25221) 2024-09-27 15:24:31 +08:00
JukLee0ira
47d27fed3b all: replace uses of ioutil with io and os (#24869) 2024-09-27 15:14:17 +08:00
Daniel Liu
4f9501f12c common, crypto: move fuzzers out of core (#22029) 2024-09-22 19:25:37 +08:00
Daniel Liu
a5531a2470 core/vm: remove redundant conversions (#21903) 2024-09-22 18:42:11 +08:00
Daniel Liu
67b5b2bf9a core/vm: less allocations for various call variants (#21222) 2024-09-22 18:42:11 +08:00
Daniel Liu
a575d731d3 core/vm: combine function precompile and precompile2 2024-09-21 22:40:57 +08:00
Daniel Liu
5470485450 all: split vm.Context into BlockContext and TxContext (#21672) 2024-09-21 22:18:10 +08:00
Daniel Liu
05e52efbad core/vm: marshall returnData as hexstring in trace logs (#21715) 2024-09-21 22:14:47 +08:00
Daniel Liu
4e832ee6f0 core/vm: avoid map lookups for accessing jumpdest analysis (#21411) 2024-09-21 22:01:56 +08:00
Daniel Liu
a020259bb5 core/vm: fix Byzantium address list (#22603) 2024-09-19 13:04:55 +08:00
Wanwiset Peerapatanapokin
0e9052b2e5
Merge branch 'master' into dev-upgrade-fix-merge 2024-09-11 14:06:38 +04:00
Daniel Liu
3e4932e408 core/vm: surface some internal methods (#20958) 2024-08-30 12:50:04 +08:00
Daniel Liu
1f45af089a core/vm: implement EIP 3541 (#22809) 2024-08-26 11:59:28 +08:00
Daniel Liu
c47819c7d6 core, cmd: add generic LRU implementation (#26162) 2024-08-26 11:17:23 +08:00
Daniel Liu
6f1d1b6688 core/vm: implement EIP-2681: Limit account nonce to 2^64-1 (#23853) 2024-08-26 09:04:15 +08:00
Wanwiset Peerapatanapokin
2b8eb6f98e
Merge pull request #619 from XinFinOrg/revert-2464-short
Revert EIP 2464
2024-08-25 02:23:46 +07:00
Daniel Liu
8c78a80771 core: fix race conditions in txpool (#23474) 2024-08-24 23:12:32 +08:00
wanwiset25
cb792ef34f Revert EIP-2464 2024-08-24 02:31:27 +07:00
Daniel Liu
45e57e41b4 internal/ethapi: refactor func ToMessage for CallArgs 2024-08-21 15:15:53 +08:00
JukLee0ira
3f40987cca core/rawdb: rearranging function order 2024-08-19 22:32:20 +08:00
JukLee0ira
544190f584 core: cache block hash and number 2024-08-07 14:59:36 +08:00
JukLee0ira
074095b1d5 core: fix writeBlock 2024-08-07 14:59:36 +08:00
wgr523
52077f18f3
support for golang tracers + add golang callTracer (#558)
* feat: rename Tracer interface to EVMLogger;
minor changes in API
refine api_tracer.go
refine Tracer interface

* fix: broken tracer tests

* feat: add BenchmarkTransactionTrace

* feat: tracer CaptureEnter CaptureExit in evm

* feat: upgrade js tracers with geth upstream

* chore: clean test

* feat: eth/tracers: support for golang tracers + add golang callTracer
cf. https://github.com/ethereum/go-ethereum/pull/23708

* chore: clean testdata json

* fix: change test due to IntrinsicGas is not upgraded

* feat: make native Tracer the default Tracer

* fix: update tracers.New in api

* fix: addr prefix in callTracer

* fix: remove `native` in BenchmarkTracers

* fix: return consensus error of InsufficientBalance for tx, instead of vmerr

* chore: drop js tracers: call and noop
2024-08-06 00:14:04 -07:00
JukLee0ira
9a40c26bf8 core,eth,light: remove duplicated functions 2024-08-03 10:03:22 +08:00
JukLee0ira
bea4431f6f eth/filters: avoid block body retrieval when no matching logs (#25199) 2024-08-03 10:03:22 +08:00