Commit graph

32 commits

Author SHA1 Message Date
Wanwiset Peerapatanapokin
81416e008c
fix(consensus): use signer pubkey to check for unique signatures and optimize performance, close XFN-03 (#1625)
* use signer pubkey to check for unique signatures and optimize performance

* change waitgroup to errgroup

* optimize

* fix typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* format files

* after rebase new commits, refactor from snap.NextEpochCandidates to epochInfo.Masternodes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 14:34:54 +07:00
Wanwiset Peerapatanapokin
e324a78d94
fix(consensus): fix private chain initialization (#1987)
* revert: use masternodes from snapshot to verify vote

* fix underflow during chain initialization

* add previously removed test

* rename snapshot > snap for consistency
2026-02-19 01:47:03 +07:00
Wanwiset Peerapatanapokin
e617598d1d
consensus: verify timeout from epochInfo instead of snap.NextEpochCandidates, close XFN-62 (#1628) 2025-12-06 15:05:49 +05:30
Daniel Liu
650047c81e
consensus/XDPoS, params: fix some comments, close XFN-125 (#1733) 2025-11-15 16:44:39 +05:30
wit liu
c82830d228
engines/engine_v2: use errgroup to handle goroutine error (#1758) 2025-11-14 19:59:43 +05:30
Daniel Liu
5a26279c1c
engine_v2, params: fix unsynchronized reads of V2.CurrentConfig, close XFN-53 (#1642) 2025-11-03 14:51:54 +05:30
Daniel Liu
09b66ea8c4
engine_v2: check overflow first, close XFN-20 (#1659) 2025-11-03 12:55:57 +05:30
wit liu
79460e4bfb
all: fix whitespace error of golangci-lint, remove extra empty lines (#1624) 2025-10-19 14:42:12 +08:00
wanwiset25
b4f79c0b14 improve logs 2025-09-20 18:12:11 +04: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
44ac46f676 add local xdpos function
add readme

changes to support xdpos2 protocol from block 0
2025-01-01 22:06:09 -05:00
benjamin202410
f8decab061
code refactor for performance (#782)
Co-authored-by: liam.lai <liam.lai@us>
2024-12-29 21:47:14 -08:00
benjamin202410
c8aae5e537
Get right tc epoch (#773)
* get right tc epoch

* fix debug message

* merge test

* merge test

---------

Co-authored-by: liam.lai <liam.lai@us>
2024-12-24 01:53:40 -08:00
benjamin202410
332380c889
fix only timeout round exists in next epoch (#772)
* fix only timeout round exists in next epoch

* bump version

---------

Co-authored-by: liam.lai <liam.lai@us>
2024-12-23 23:09:45 -08:00
liam.lai
00785b096f fix tc cross epoch different masternode counts issue 2024-12-22 19:34:09 -08:00
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
Liam
d76a573cf2
PPX-01 rename NextEpochMasterNodes to NextEpochCandidates (#510) 2024-03-31 07:27:13 +11:00
Banana-J
c7cb63dd09
fix: error handling on x.getEpochSwitchInfo in sendTimeout should return error (#444)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-03-09 16:25:47 +11:00
Banana-J
07d40a0038
fix: add lock for haserror variable in timeout.go (#443)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-03-04 22:05:19 +11:00
Liam
47bfdf7635
Move masternode in v2 config (#372)
* move masternode in v2 config

* update number to meet 7 vote for current setup

* add test

* update all failed test

* fix test

* remove comment

* remove comment

* fix test
2023-11-29 11:11:58 +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
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
a75c315eb5
fix penalty calculation bug (#189) 2022-10-09 14:06:04 +08:00
Liam
dad7eff036
Xin 231 sync issues - too far messages should omit and skip to process (#177)
* omit too far v2 messages

* update error msg

* improve log

* fix test

* remove useless file
2022-09-05 10:38:45 +08:00
Liam
ac5096d692
upgrade log level and log message (#102) 2022-06-19 10:59:09 +02:00
Liam
50ae0c95fd
xin-197 xin-198 fix devnet issues (#99)
* xin-197 xin-198 fix devnet issues

* update log
2022-06-05 11:06:32 +02:00
Liam
ca6a645fca
refactor and improve log (#92)
* refactor and improve log

* fix conflict and test
2022-05-23 02:34:32 +01:00
Jerome
455cacc1b7
move XDC consensus types into core (#93) 2022-05-22 11:43: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
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