Commit graph

1237 commits

Author SHA1 Message Date
Liam Lai
5623ce8de0 merge from master 2023-07-30 16:50:45 +10:00
Anil Chinchawale
d2ce55ec96
Merge pull request #237 from gzliudan/fix-empty-address
fix empty address
2023-06-16 14:23:44 +05:30
wgr523
2f10aac60f
eth: ensure from<to when tracing chain (credits Chen Nan via bugbounty) (#251)
Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-05-25 14:22:23 +10:00
wgr523
a67b347ba8
fix comment of todo (#267) 2023-05-20 17:46:06 +08:00
wgr523
cd74061ac2
Extend masternode candidate (#261)
* V2 truncate MaxMasternodes from candidates after penalty,
V1 same as before

TestUpdateMultipleMasterNodes: test V2, in snapshot we have all candidates, but at epoch switch, we pick MaxMasternodes

* code looks better
2023-05-16 21:43:56 +08:00
Daniel Liu
fd6cbd5df1 fix nonce error for debug trace api (#256) 2023-05-06 09:50:25 +08:00
Daniel Liu
3c21125da5 fix EmptyAddress 2023-03-16 11:47:39 +08:00
Liam
9552500335
xdpos API getV2Block (#227) 2023-03-05 02:17:46 +08:00
span14
eac0e42584 fix typo 2023-02-02 12:13:16 -05:00
span14
5aff0d35db fix typo 2023-01-30 22:22:57 -05:00
span14
abb0dcc48b add confirmed loopup 2023-01-30 22:22:57 -05: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
f57e2c3577
Bug Fix on memory leak when doing send tx, block etc to peers (#212)
* resolve conflict

* update version number
2022-12-09 14:54:27 +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
Jerome
ff6ee67462
Fix memory leak when doing send tx, vote, block etc to peers (#211) 2022-11-28 21:52:36 +11:00
Daniel Liu
42379f530f
internal/ethapi: EstimateGas and Call handle revert error(#173) (#200)
hot fix for EstimateGas and Call handle revert error https://github.com/XinFinOrg/XDPoSChain/issues/173
2022-10-27 17:25:25 +08:00
Liam Lai
30d7958a6f skip process message whenever synchronising 2022-10-15 01:05:38 +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
765d962d8b
xin-202 fix sync issue on v2 blocks (#108)
* fix sync issue on v2 blocks

* change back to get header method
2022-07-12 16:57:18 +02:00
Liam
e55fca6703
log improvement and some refactor (#110) 2022-07-10 01:11:28 +02:00
Liam
35b964fc16
revert change peer address change (#101) 2022-06-21 00:11:06 +02:00
Liam
2d25b89610
xin-201 skip message while synchronize (#100) 2022-06-19 10:59:23 +02: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
ca336f6029
update the remaining consensus v2 related types to core (#94) 2022-05-22 14:39:04 +10:00
Liam
5fffa0cd43
xin-188 update penalty limit epoch constant for v2 and shorter test (#87) 2022-05-18 11:17:32 -04:00
wgr523
8fde52c512
Xin 145 (#82)
* add HandleProposedBlock() in procFutureBlocks()

* add proposedBlockHandler for downloader
2022-04-22 00:12:44 +08:00
Liam
92857e50e5
xin-177 check penalty only on epoch switch block and Add Hook on initial (#78)
* check penalty only on epoch switch block

* skip calculate penalty on first v2 block

* clean code, its doing same thing
2022-04-02 22:59:39 -06: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
Liam
7fca1a627a
xin-144 avoid duplicate messages (#68)
* avoid duplicate messages

* update comment
2022-03-08 19:36:02 +01: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
wgr523
89acbdd742
XIN-121 Reward hook (#57)
* v2 Hook Reward, need test

* test reward

* fix RewardHook due to modifying params config directly (#56)

* more test

* finish test

Co-authored-by: Jerome <wjrjerome@gmail.com>
2022-02-19 15:31:19 +11:00
wgr523
9b47146120
add calcMasternodes, HookPenalty for v2, tests (#52) 2022-02-13 22:15:23 +08:00
Jerome
76724b06d7
only broadcast vote, timeout and syncinfo if the peer do not have it (#53) 2022-02-12 10:17:19 +11:00
Liam
da336f53b1
xin-95 add xdpos2 protocol (#47)
* add xdpos2 protocol

* update xdpos2 command
2022-02-05 23:25:23 +03: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
Jerome
f8d3f9f8c6
Xin 113 is epoch switch (#37)
* add isEpochSwitch function and refactor utils

* fix broken first v2 epoch switch block

* use adaptor epoch switch function to determine v1 v2 epoch swtich block

* add test for the GetMasternodesByNumber and GetCurrentEpochSwitchBlock function

* add v2 test for isAuthroisedAddress

* Use GetCurrentEpochSwitchBlock in findNearestSignedBlock api
2022-01-14 21:38:38 +11:00
Liam
3ac908be8d
xin-104 (#36)
* hand and vote self mined block

* add error log
2022-01-08 10:56:00 +11: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