Commit graph

29 commits

Author SHA1 Message Date
wit liu
9ce02a7010
all: fix goimports (#1560) 2025-09-24 07:51:10 +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
wit liu
99e2885b03
all: fix misspell (#1510)
Co-authored-by: wit <wit765765346@gmail>
2025-09-17 08:27:52 +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
benjamin202410
e1772ce08a
fix: improve timeout message log (#996)
* fix: improve timeout message log

* Update bft_handler.go

---------

Co-authored-by: liam.lai <liam.lai@us>
2025-04-29 01:48:56 -07: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 Lai
22fc7d0710 fix conflict 2024-10-16 22:42:53 -07:00
benjamin202410
eb6d53adf6
Fix getCandidateStatus API (#663)
* Fix getCandidateStatus API

* sync vote message and fix test

* update function name

---------

Co-authored-by: Liam Lai <liam@home>
2024-10-09 22:05:14 -07:00
Liam
ccbedce27b
relocate broadcast logic (#656)
Co-authored-by: 賴怡誠 <laiyicheng@makotos-MBP.lan>
2024-09-30 20:20:23 -07:00
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
Liam
55d994690a
Xin 248 correct timeout message skip rule (#192)
* test on current devnet issue

* change to times 3 to fit correct dist
2022-10-15 00:29:02 +08:00
Liam
a75c315eb5
fix penalty calculation bug (#189) 2022-10-09 14:06:04 +08:00
Liam
f98d513f88
fix skip snapshot block (#178) 2022-09-26 22:44:20 +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
ca6a645fca
refactor and improve log (#92)
* refactor and improve log

* fix conflict and test
2022-05-23 02:34:32 +01:00
Jerome
ca336f6029
update the remaining consensus v2 related types to core (#94) 2022-05-22 14:39:04 +10:00
wgr523
b790b077c9
XIN-164 add GapNumber inside Vote, and tests (#74) 2022-03-25 23:22:24 +08:00
Liam
a3d5d82722
xin-168 node stops because dead lock on timeout events (#73)
* fix race condition issue

* add test to prove
2022-03-25 21:24:35 +11:00
Jerome
9bb1a6e1b3
XIN-159, 160 and 161 (#69)
* XIN-159, 160 and 161

* update the bft handler to make sure we don't process dis-qualified messages

* add verify header missing checks and its tests
2022-03-13 22:00:26 +11:00
Jerome
8363641b2c
check against master node list before sending out anything (#67)
* check against master node list before sending out anything

* remove duplicated signatures from QC

* add break when checking allowed to send
2022-03-08 09:12:52 +11:00
Jerome
e493ddfd6d
add verifyTC and verifyTimeoutMessage (#63)
* add verifyTC and verifyTimeoutMessage

* remove v2 func from adaptor
2022-03-02 09:17:57 +11:00
Jerome
d773e15ca8
Xin 137 (#62)
* add GapNumber

* fix broken countdown test

* add gapNumber to existing tests
2022-02-28 18:51:42 +11:00
Jerome
431c870fa0
verify vote (#50)
* verify vote

* fix vote tests and add temporary solution for initialize

* remove the drop peer comment
2022-02-26 17:42:08 +11:00
Jerome
7cc2bef2d3
update adaptor for verify headers and fix vote handler to include +1 distance when checking rounds (#48) 2022-01-30 14:26:05 +11:00
Liam
aab040fd55
adjust lock (#39)
* adjust lock

* change error log

* change error log
2022-01-16 13:31:23 +03:00
Jianrong
15275ded65 Commit grand grand parent block(continous rounds) if enough votes or by proposedBlockHandler 2022-01-01 16:20:33 +11:00
Liam
35eebabae0 xin-106 add generated message into its pool (#32)
* add debug log and change to contain or add for cache

* add generated message into its pool
2021-12-30 11:45:22 +11:00
Liam
6c5fe34615 v2 miner function implementation and happy path (#22)
* New struct in consensus/XDPoS/utils/types.go, util functions, and test. (#14)

* define vote, timeout, sync info, qc, tc, extra fields in types.go, add test in types_test.go

* add json tag in types.go, refine encoder decoder of extra fields

* refactor types.go utils.go

* re-write types, comments

* add Hash SigHash for types, and tests

* define Round type

* remove unnecessary logs

* add v2 engine functions placeholder

* typo fix on the consensus v2 function placeholders

* add countdown timer

* make initilised private to countdown

* add v2 specific config struct

* rename some config variables

* Implement BFT Message receiver (#13)

* fix or skip tests due to PR-136 changes

* add bft receiver functions

* add bft receiver functions

* rename tc to TimeoutCert

* implement more functions

* New struct in consensus/XDPoS/utils/types.go, util functions, and test. (#14)

* define vote, timeout, sync info, qc, tc, extra fields in types.go, add test in types_test.go

* add json tag in types.go, refine encoder decoder of extra fields

* refactor types.go utils.go

* re-write types, comments

* add Hash SigHash for types, and tests

* define Round type

* remove unnecessary logs

* add temp functions

* add v2 engine functions placeholder

* typo fix on the consensus v2 function placeholders

* add countdown timer

* make initilised private to countdown

* push verify function

* add test on receiving vote

* revert type change

* add async on broadcast function

* add quit initial

* fix test

Co-authored-by: Jianrong <wjrjerome@gmail.com>
Co-authored-by: wgr523 <wgr523@gmail.com>

* generate and verify timeout message

* Consensus V2 variable, timeout pool (#19)

* fill in XDPoS_v2 variables and processQC/TC

* add timeout pool, refine engine variables

* refactor type functions

* solve a small pointer bug

* create general pool and its test, refine engine

* refine pool, add xdpos v2 config cert threshold

* refine config

* vote and timeout handlers

* fix pool test

* bft miner preparation

* review comment improvement

* update

* relocate tests

* add and remove comment

* fix the syntax error

* update network layer and add handler functions (#23)

* update network layer and add handler functions

* fix test syntax error

* add ProcessQC implementation

* add ProcessQC tests

* add snapshot test

* add wait qc process

* remove testing files

* add route snapshot

* fix merge issue

* add default v2 behaviour (#24)

* add v2 ecrecover functions and refactor test

* fix all the tests

* put minimun lock variable

* debugging prepare and seal v2 blocks

* Trigger proposeBlockHandler after v2 block received and verified in fetcher

* skip snapshot apply related tests

* update test check

* rename bfter to bft handler and ignore normal behviour

* fix bugs during local 4 node run

* fix test

* fix sync info test

* fix bugs during local 4 node run

* rebase and fix bug

* remove hook validators function"

Co-authored-by: wgr523 <wgr523@gmail.com>
Co-authored-by: Jianrong <wjrjerome@gmail.com>
2021-12-30 11:45:18 +11:00