Commit graph

450 commits

Author SHA1 Message Date
Daniel Liu
09b66ea8c4
engine_v2: check overflow first, close XFN-20 (#1659) 2025-11-03 12:55:57 +05:30
Daniel Liu
4acd3b05ee
XDPoS/utils: use strconv.ParseInt to convert int64, close XFN-24 (#1660) 2025-11-03 12:55:37 +05:30
Daniel Liu
aecb6ff7dc
engine_v2: reject wrong signature earlier, close XFN-29 (#1661) 2025-11-03 12:51:56 +05:30
Daniel Liu
7614a0ad9a
consensus/XDPoS: convert variables to const, close XFN-123 (#1688) 2025-11-03 12:46:35 +05:30
Daniel Liu
fc748cc52a
engine_v2: add comment for type SnapshotV2, close XFN-124 (#1689) 2025-11-03 12:46:05 +05:30
Daniel Liu
d2706538e2
XDPoS/engines, core: fix non idiomatic "comma ok" boolean name, close XFN-126 (#1690) 2025-11-03 12:45:39 +05:30
Daniel Liu
58c066f053
all: handle err from func rlp.Encode, close XFN-127 (#1692) 2025-11-03 12:45:19 +05:30
Daniel Liu
9d85990309
all: fix missing nil check, close XFN-114 (#1695) 2025-11-01 23:21:44 +05:30
Daniel Liu
20ec25c0ca
engine_v2: fix data race when initial v2 parameters, close XFN-10 (#1617) 2025-10-31 11:33:06 +05:30
Wanwiset Peerapatanapokin
b49f6cb0f2
consensus: verify header hash is same as input hash in getEpochSwitchInfo (#1627) 2025-10-28 09:30:38 +07:00
Wanwiset Peerapatanapokin
25a70e8770
consensus: skip gas limit verification for genesis block (#1646) 2025-10-28 08:30:36 +07:00
wit liu
79460e4bfb
all: fix whitespace error of golangci-lint, remove extra empty lines (#1624) 2025-10-19 14:42:12 +08:00
Wanwiset Peerapatanapokin
c95d258058
separate fullVerifies array into v1fullVerifies and v2fullVerifies (#1618) 2025-10-16 12:17:05 +04:00
Wanwiset Peerapatanapokin
6abb4f88da
consensus: Verify gaslimit bounds when accepting blocks (#1619)
* Verify gaslimit bounds when accepting blocks

* fix tests
2025-10-16 12:16:34 +04:00
Wanwiset Peerapatanapokin
e0c987f45a
impose size limit for DecodeBytesExtraFields (#1637) 2025-10-16 12:16:14 +04:00
wanwiset25
998153ebb1 optmize CompareSignersLists 2025-10-12 21:59:55 +04:00
Daniel Liu
0aa7ccb81e
consensus: check gas limit bounds in header, close XFN-07 (#1616) 2025-10-08 13:22:05 +08:00
Daniel Liu
8c101cd961
engine_v2: fix potential modulo by zero, close XFN-17 (#1615) 2025-10-08 13:21:33 +08:00
Daniel Liu
95f0bd2a4b
engine_v2: check minimum timestamp for the first v2 block, close XFN-16 (#1614) 2025-10-08 13:20:29 +08:00
Daniel Liu
956767a41e
consensus/XDPoS: remove unused parameters in BlockConsensusVersion, close XFN-02 (#1613) 2025-10-08 13:19:45 +08:00
Daniel Liu
2ad225d6d1
engine_v2: fix unsynchronized QC verification Error, close XFN-09 (#1609) 2025-10-08 13:18:57 +08:00
Daniel Liu
c7fb2e875d
consensus, contracts: check input length of ExtractValidatorsFromBytes, close XFN-14 (#1608) 2025-10-08 13:16:01 +08:00
Daniel Liu
3efe26df08
all: refactor so NewBlock, WithBody take types.Body #29482 (#1605) 2025-10-08 13:12:35 +08:00
Daniel Liu
8938e27932
all: move err to the last position of return values (#1581) 2025-10-08 12:29:38 +08:00
wit liu
d20f91057a
all: fix whitespace (#1572) 2025-09-24 07:58:40 +08:00
Wanwiset Peerapatanapokin
53e5601825
Merge pull request #1493 from XinFinOrg/fix-rewardhash
fix: XDPoS_v2 save reward file during Seal for block miner for v2 engine
2025-09-23 12:49:12 +04:00
wanwiset25
1935cb7f25 add more details in logging 2025-09-23 11:55:17 +04:00
wit liu
07399bc552
all: fix misspell (#1523)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 20:11:19 +08:00
wit liu
7d5a03a46e
all: fix unnecessary conversion (#1527)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 19:45:42 +08:00
wit liu
d9ae317a38
all: format golang files (#1548)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 19:41:54 +08:00
wit liu
1a2c8ee180
all: fix govet (#1517)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 18:55:13 +08:00
Wanwiset Peerapatanapokin
fd22d58cc1
Merge pull request #1257 from XinFinOrg/improve-consensus-logs
Improve consensus logs
2025-09-20 19:03:34 +04:00
wanwiset25
b4f79c0b14 improve logs 2025-09-20 18:12:11 +04:00
wgr523
5a6d25ec08
engine_v2: fix negative underflow in getBlockInfoByEpochNum (#1481) 2025-09-17 22:52:28 +08:00
wgr523
b8e5baa978
all: fix minted token recorded value is zero (#1480) 2025-09-17 22:50:52 +08:00
wit liu
99e2885b03
all: fix misspell (#1510)
Co-authored-by: wit <wit765765346@gmail>
2025-09-17 08:27:52 +08:00
wanwiset25
8ba050e99a PR fixes 2025-09-16 17:03:58 +04:00
wanwiset25
5f9c4b3a25 engine_v2: save reward file during Seal for block miner 2025-09-14 14:50:47 +04: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
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
benjamin202410
bc7e213b96
fix syncinfo skip condition (#1285)
* fix syncinfo skip condition

* fix condition

* fix condition

---------

Co-authored-by: liam.lai <liam.lai@us>
2025-08-04 02:51:05 -07:00
benjamin202410
db9c3de1dc
add syncinfo pool (#1236)
* add syncinfo message into pool for process later

* add missing file back

---------

Co-authored-by: liam.lai <liam.lai@us>
2025-07-28 01:43:41 -07:00
Daniel Liu
85f08c7732
eth: skip VerifyHeader in traceBlock to fix #1185 (#1265) 2025-07-26 18:18:50 +08:00
Daniel Liu
23a83dce3e
consensus, eth/tracers: remove redundant import names #21903 (#1248) 2025-07-26 17:47:14 +08:00
wanwiset25
d34aa35ecc fix test 2025-07-16 00:28:11 +07:00
wanwiset25
11ae49b35d make XDPoS_getBlockInfoByEpochNum work with v1 epoch number 2025-07-15 02:30:23 +07:00
Daniel Liu
c46302cf65
all: fix invalid signer list on checkpoint block for trace api #1185 (#1186) 2025-07-12 06:56:30 +08:00