Commit graph

11256 commits

Author SHA1 Message Date
Jianrong
930497318e Allow custom verbosity being set via env variable for devnet docker image 2022-09-16 10:35:42 +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
Jerome
b75a0dba86
Merge pull request #175 from XinFinOrg/per-environment-constants
Build devnet image for each PR merge
2022-09-04 22:30:02 +08:00
Jianrong
9609af8262 ignore the aws ecr login output 2022-09-03 20:46:54 +08:00
Jianrong
1921fe103c CI CD pieple to publish devnet image to AWS ECR 2022-09-03 20:44:28 +08:00
Jianrong
94781c741d add devnet constants 2022-09-03 14:54:48 +08:00
Jerome
8a480d4f72
Merge pull request #174 from XinFinOrg/voteEquivocation-signer-lowercase
make vote equivocation content's signer key lower case
2022-08-25 15:49:33 +08:00
Jianrong
dfa1e7c098 make vote equivocation content's signer key lower case 2022-08-23 17:33:37 +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
Jerome
22479f11ff
Merge pull request #169 from XinFinOrg/v2-beta
- V2 consensus engine
2022-08-06 20:36:23 +08:00
Jianrong
c1d0b71cdb add readme from master 2022-07-18 19:20:18 +10:00
Jerome
4eea723717
Add API to get latest committed blockInfo, also send it via 'block' message type to stats server (#113) 2022-07-16 16:14:36 +10: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
833f70bdb7
xin-203 fix wrong config hash and update v2 params on mainnet (#109)
* fix wrong config hash and update v2 params on mainnet

* update config and all the test

* hard code binary into code

* add default config for testing

* update test timestamp
2022-07-12 16:56:55 +02:00
Liam
90395f5423
add initial in verifyheader (#112) 2022-07-11 17:32:22 +02:00
Liam
e55fca6703
log improvement and some refactor (#110) 2022-07-10 01:11:28 +02:00
Jerome
cfb5c6ce39
pass the forensics Id at root level (#107) 2022-07-05 22:01:36 +10:00
Jerome
533fe250db
forensics shall send unique id (#106) 2022-07-05 00:31:09 +02:00
Jerome
86ec908091
add DivergingBlockNumber in forensics report (#105) 2022-06-30 15:07:09 +02:00
Jerome
3ebaea1945
update forensics proof data structure to accomedate vote type (#104)
* update forensics proof data structure to accomedate vote type

* refactor log

* change blocknum type to uint64

* fix test

Co-authored-by: Liam Lai <liam.icheng.lai@gmail.com>
2022-06-29 23:58:18 +02:00
Liam
35b964fc16
revert change peer address change (#101) 2022-06-21 00:11:06 +02:00
Jerome
bcffe1ec16
Give the XDC option to use emit metrics (#89) 2022-06-19 13:42:48 +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
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
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
0317e871d4
add initial function during load latest block from db (#96) 2022-05-29 11:28:08 +02:00
Jerome
7effc71547
allow forensics send msg to stats server (#95)
* allow forensics send msg to stats server

* add test for forensics reporting mechanism
2022-05-25 19:42:30 +10:00
Liam
ca6a645fca
refactor and improve log (#92)
* refactor and improve log

* fix conflict and test
2022-05-23 02:34:32 +01:00
Liam
882add50f5
bug fix for snapshot failed to load from db (#91) 2022-05-22 19:15:25 -05:00
Jerome
ca336f6029
update the remaining consensus v2 related types to core (#94) 2022-05-22 14:39:04 +10:00
Jerome
455cacc1b7
move XDC consensus types into core (#93) 2022-05-22 11:43:25 +10:00
wgr523
727202cac9
remove verifyQC from ProposedBlockHandler since verifyQC is already in verifyHeader (#88) 2022-05-18 11:18:10 -04:00
Liam
2b40d1337f
initial snapshot when there is no snapshot (#86) 2022-05-18 11:17:49 -04:00
Liam
5fffa0cd43
xin-188 update penalty limit epoch constant for v2 and shorter test (#87) 2022-05-18 11:17:32 -04:00
Jerome
2f40b63ca8
Re-define the forensics report format and complete the internal forensics logic (#90) 2022-05-16 17:30:45 +10:00
Jerome
ba144d898f
process forensics (#84)
* process forensics

* Found common signers at same round for forensics

* find attackers

* add test for forensics

* run setCommittedQCs after processForensics
2022-05-03 21:18:28 +10:00
Liam
5a15c45102
Merge pull request #81 from hash-laboratories-au/xin-176
xin-176 fix yourturn and new masternode bug
2022-05-03 01:03:46 -06:00
Liam
98621f0993
Merge branch 'dev-upgrade' into xin-176 2022-05-02 21:55:12 -06:00
wgr523
49cecaa9af
XIN-176 fix (#85)
* fix bug in isEpochSwitchAtRound, fix penalty test TestHookPenaltyV2Mining

* fix authorised test

* fix things

* revert a test
2022-05-02 22:46:55 -05:00
Jerome
eb35d4e32e
Add set committed QC function in forensics (#83) 2022-04-23 10:33:56 +10:00
wgr523
8fde52c512
Xin 145 (#82)
* add HandleProposedBlock() in procFutureBlocks()

* add proposedBlockHandler for downloader
2022-04-22 00:12:44 +08:00
Liam Lai
5764dbc249 update test for RemoveItemFromArray 2022-04-14 02:17:30 -06:00
Liam Lai
d0cde5c51e fix new masternode bug 2022-04-14 02:07:26 -06: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
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
Jerome
0ded664f0c
add highestSelfMinedRound to make sure we mine once per round (#79) 2022-04-03 12:45:25 +10:00
Jerome
0241d40699
verify headers shall use parent block if not present in the chain (#77) 2022-04-01 00:11:04 -06: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
b98005a8dd
Xin 166 (#75)
* typo and checkYourturnWithinFinalisedMasternodes func name to yourturn

* remove redundant code from verifyQC

* Verify QC to optionally pass parent header. This is used to help verifyHeaders

* move difficulty into its own file
2022-03-27 20:39:40 +11:00