Commit graph

74 commits

Author SHA1 Message Date
Wanwiset Peerapatanapokin
6120def776
useful logging (#1986) 2026-02-06 17:42:26 +07:00
Daniel Liu
71e8e27f84
all: remove mongodb support in XDCx (#1679)
* all: remove SDK node

* cmd: remove XDCXDBEngineFlag

* cmd: remove XDCXDBConnectionUrlFlag

* cmd, XDCx: remove XDCXDBReplicaSetNameFlag

* XDCx: remove ConnectionUrl

* all: remove mongodb support

* cmd: remove XDCXEnabledFlag
2025-11-15 16:50:02 +05:30
Daniel Liu
650047c81e
consensus/XDPoS, params: fix some comments, close XFN-125 (#1733) 2025-11-15 16:44:39 +05:30
Daniel Liu
eef5242fa3
all: pre-allocate memory for slices and maps, close XFN-148 (#1714) 2025-11-14 20:13:36 +05:30
wit liu
812abd4b83
consensus: delete unused functions rlpHash (#1749) 2025-11-14 20:05:20 +05:30
Daniel Liu
bd3d30919d
XDPoS/utils: get pool size by key, close XFN-21 (#1666) 2025-11-14 16:29:58 +05:30
wit liu
47952ac264
XDPoS/utils: use common.Address.Cmp for slices.SortFunc (#1704) 2025-11-14 16:29:16 +05:30
Daniel Liu
39b8184f57
XDPoS/utils: must use NewPool() to create Pool, close XFN-13 (#1667) 2025-11-14 16:26:24 +05:30
Wanwiset Peerapatanapokin
7aaa541db1
consensus: implement DeepCopy() in PoolObj, close XFN-04 (#1723)
* add DeepCopy() for PoolObj

* PoolObj: use deepcopies and optimize locks

* optimize code
2025-11-10 21:56:10 +04:00
Daniel Liu
5a2495100d
consensus/XDPoS/utils: remove unused errors, close XFN-122 (#1721) 2025-11-04 11:18:04 +05:30
Daniel Liu
d8af7fa0d4
consensus/XDPoS: avoid use len as variable, close XFN-25 (#1656) 2025-11-03 12:56:33 +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
7614a0ad9a
consensus/XDPoS: convert variables to const, close XFN-123 (#1688) 2025-11-03 12:46:35 +05:30
Daniel Liu
9d85990309
all: fix missing nil check, close XFN-114 (#1695) 2025-11-01 23:21:44 +05:30
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
c7fb2e875d
consensus, contracts: check input length of ExtractValidatorsFromBytes, close XFN-14 (#1608) 2025-10-08 13:16:01 +08: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
wanwiset25
11ae49b35d make XDPoS_getBlockInfoByEpochNum work with v1 epoch number 2025-07-15 02:30:23 +07:00
Péter Szilágyi
39e9d8f94d common/prque: generic priority queue (#26290) 2024-12-28 09:06:31 +08:00
Daniel Liu
82ff8c19a0 all: remove uses of untyped golang-lru 2024-12-21 14:39:26 +08:00
Daniel Liu
92fc843683 crypto: switch over to upstream sha3 package (#18390) 2024-12-09 17:48:59 +08:00
benjamin202410
a8560300a4
fix vote test and optimize log (#750)
Co-authored-by: liam.lai <liam.lai@us>
2024-11-29 03:14:25 -08:00
liam.icheng.lai
59a7eb1f9f resolve conflict from master 2024-10-30 16:47:26 -07:00
benjamin202410
118ccd08d5
cherry pick epoch api from dev-upgrade (#699)
* cherry-pick-epoch-api
2024-10-29 01:36:22 -07:00
wgr523
71b9005f34
feat: add api xdpos_getBlockInfoByEpochNum (#674)
* feat: add api xdpos_getBlockInfoByEpochNum

* feat: add cache round2epochBlockInfo

* fix: round2epochBlockInfo contains round now

* feat: binary search in GetBlockByEpochNumber

* fix: change some code back, refine style
2024-10-28 00:14:30 -07:00
Daniel Liu
a79411fa06 all: fix staticcheck warning ST1005: incorrectly formatted error string 2024-10-24 09:48:20 +08:00
benjamin202410
042c02ba8c
add last block number for epoch api (#681)
Co-authored-by: Liam Lai <liam@home>
2024-10-20 23:43:23 -07:00
Liam Lai
22fc7d0710 fix conflict 2024-10-16 22:42:53 -07:00
Liam Lai
b43bb5ed1f api epoch 2024-10-15 19:20:13 -07:00
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
Daniel Liu
ec50ca36d9 core, eth, trie: use common/prque (#17508) 2024-05-09 18:38:27 +08:00
Jianrong
6740545358 change the API to be block num based 2023-12-28 15:13:05 +11:00
Jianrong
e28b550a24 Add a new API to help debug when there are missed rounds 2023-12-28 15:13:05 +11:00
Liam Lai
824d7b232f resolve conflict 2023-11-20 23:53:49 +11:00
Liam
c215316744
Make masternode dynamic (#356)
* make masternode dynamic

* fix all the tests

* remove cmt

* fix test again
2023-11-16 23:59:19 +11:00
Daniel Liu
0b06bc3a5d not compare strings in func CompareSignersLists 2023-10-23 22:51:06 +08:00
Liam
45c1518ea1
Devnet fix on ci improvement (#314)
* fix ci

* update pr template
2023-08-21 10:07:00 +10:00
Liam
7b657f0c4e
API: getMasternode and getPoolStatus (#258)
* API: getMasternode and getPoolStatus

* fix test
2023-05-01 23:01:39 +10:00
Liam
c4f9a552e5
Multi config bug fix (#216)
* refactor multi config
remove pool cleaner
correct message and log level
2022-12-17 20:23:46 +08:00
Liam
6ffbd3e141
Xin 259 support multi v2 config (#210)
* update timeout period and waittime

* remove wrong comment

* update config for preparing test
2022-12-06 20:08:56 +08:00
Liam
2b3e059abf
xin-244 re-snyc blocks from v1 to v2 (#186)
* xin-244 re-snyc blocks from v1 to v2

* remove log

* correct log

* constant value

* remove comment
2022-10-04 23:33:13 +08:00
Jerome
c710bd98a5
Xin-200 Vote Equivocation (#111) (#172)
* Xin-200 Vote Equivocation (#111)

* add vote same round detection

add test for vote same round detect

finish process equivocate (not finish report)

* finish vote equivocation report, refactor code (vote -> forensics)

* finish process equivocate and report, and test

* add return err

Co-authored-by: wgr523 <wgr523@gmail.com>
2022-08-13 11:50:56 +05:30
Liam
1cac82825d
xin-176 use local masternode to verify signature (#98)
* use local masternode to verify signature

* refactor verify header
2022-06-05 12:53:50 +02:00
Jerome
455cacc1b7
move XDC consensus types into core (#93) 2022-05-22 11:43:25 +10:00
Jerome
6c48d5be6c
Xin 181 178 (#80)
* add skeleton forensics

* remove duplicated penalty check in verify header
2022-04-10 09:40:32 +10:00
Jerome
0ded664f0c
add highestSelfMinedRound to make sure we mine once per round (#79) 2022-04-03 12:45:25 +10:00
Jerome
cb67e8e26a
Xin 163 (#76)
* clean up the pool old round

* add unit test to cover the vote key format

* add gapNumber to the vote pool key

* fix race condition in pool

* remove verify gap number in vote handler
2022-04-01 14:59:16 +11:00
wgr523
b790b077c9
XIN-164 add GapNumber inside Vote, and tests (#74) 2022-03-25 23:22:24 +08:00
Jerome
d55229677d
verify header including validator (#71)
* verify header including validator

* re-structure v1 v2 tests

* remove unused test function

* add test to check coinbase and validator address matches

* refactor engine v2 to group private functions into same file
2022-03-20 21:14:35 +11:00