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
acb973ab97
Merge pull request #695 from gzliudan/fix-sa1012
...
fix staticcheck warning SA1012: pass nil Context to function
2024-10-25 19:34:09 +08:00
Daniel Liu
dd6822bc3c
internal/ethapi, contracts/trc21issuer: fix staticcheck warning SA1012: pass nil Context
2024-10-25 18:29:08 +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
bd4bb14b5e
Merge pull request #692 from gzliudan/fix-sa4006
...
all: fix staticcheck warning SA4006: never used value
2024-10-25 15:26:38 +08:00
Daniel Liu
739b4d7c60
Merge pull request #690 from gzliudan/fix-s1039
...
all: fix staticcheck warning S1039: unnecessary use of fmt.Sprintf
2024-10-25 15:25:56 +08:00
Daniel Liu
b9101e635d
Merge pull request #691 from gzliudan/fix-st1017
...
metrics: fix staticcheck warning ST1017: don't use yoda conditions
2024-10-25 15:25:29 +08:00
Daniel Liu
e9df8a11f0
Merge pull request #693 from gzliudan/rpc-peerinfo
...
fix staticcheck warning SA1029: inappropriate key in call to context.WithValue
2024-10-25 15:24:58 +08:00
Daniel Liu
48b1688e84
p2p/simulations: fix staticcheck warning SA1029
2024-10-25 12:32:32 +08:00
Daniel Liu
2844dbc5a9
rpc: fix staticcheck warning SA1029 by add PeerInfo ( #24255 )
2024-10-25 12:32:13 +08:00
Daniel Liu
c6e4e880ea
all: fix staticcheck warning SA4006: never used value
2024-10-24 17:37:19 +08:00
Daniel Liu
3409ada149
metrics: fix staticcheck warning ST1017: don't use yoda conditions
2024-10-24 16:07:11 +08:00
Daniel Liu
f79763ca88
all: fix staticcheck warning S1039: unnecessary use of fmt.Sprintf
2024-10-24 12:49:37 +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
e52b8a2de2
Merge pull request #649 from gzliudan/rm-block-hash
...
remove block hash from statedb
2024-10-18 10:48:34 +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
a401d3fd3f
Merge pull request #645 from gzliudan/eip-2565
...
implement eip-2565
2024-10-17 11:20:58 +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
abebda601c
common/math, tests/fuzzers: use big.Int clone ( #26006 )
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
8cf0076851
Merge pull request #675 from gzliudan/fix-issue-650
...
return right blockHash for eth_getLogs (#650 )
2024-10-16 13:51:30 +08:00
Daniel Liu
693190e5b9
core: fix wrong blockHash for eth_getLogs ( #650 )
2024-10-16 11:00:58 +08:00
Mr.P
22c54206bd
add flag rpc-gascap and set RPCGasCap to 50M ( #664 )
...
* add gas cap flag
* default gas cap to 50m
* rpc-gascap
2024-10-09 09:28:24 +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
96f5876896
common/bitutil: improve the fuzzers ( #21829 )
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