Commit graph

11151 commits

Author SHA1 Message Date
Jianrong
bd60e1b0cf add ProcessQC implementation 2021-12-30 11:00:20 +11:00
Liam
b9068974f5 update network layer and add handler functions (#23)
* update network layer and add handler functions

* fix test syntax error
2021-12-30 11:00:20 +11:00
Jianrong
17f6e67f58 review comment improvement 2021-12-30 11:00:20 +11:00
Jianrong
98014936c3 fix pool test 2021-12-30 11:00:20 +11:00
Jianrong
a39612e540 vote and timeout handlers 2021-12-30 11:00:20 +11:00
wgr523
d47d9a2a99 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
2021-12-30 11:00:20 +11:00
Jianrong
4addb69561 generate and verify timeout message 2021-12-30 11:00:20 +11:00
Liam
a1b77f3ca8 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>
2021-12-30 11:00:20 +11:00
Jianrong
521b703207 rename some config variables 2021-12-30 11:00:20 +11:00
Jianrong
1d48ed7d06 add v2 specific config struct 2021-12-30 11:00:20 +11:00
Jianrong
bf56a64fe0 make initilised private to countdown 2021-12-30 11:00:20 +11:00
Jianrong
bcb1fea280 add countdown timer 2021-12-30 11:00:20 +11:00
Jianrong
8891cd167b typo fix on the consensus v2 function placeholders 2021-12-30 11:00:20 +11:00
Jianrong
1da080a371 add v2 engine functions placeholder 2021-12-30 11:00:20 +11:00
wgr523
4453a1e257 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
2021-12-30 11:00:20 +11:00
Anil Chinchawale
7808840be0
Merge pull request #149 from XinFinOrg/address_prefix_fix
Fix Invalid address in XDC Console.
2021-12-27 13:01:43 +05:30
Jerome
69cadcc585
Merge pull request #153 from XinFinOrg/fix-block-write-read-race-condition
race condition caused by old eth bug where read before write. We fixi…
2021-12-22 14:47:39 +11:00
Gerui Wang
2969548f68 add warn for reorg 2021-12-21 16:06:16 +08:00
Anil Chinchawale
621555993e
Update version.go 2021-12-21 10:45:43 +04:00
Liam Lai
5061dd9841 add few comments in code 2021-12-21 08:47:23 +03:00
Gerui Wang
db58081b8d refine race condition solution 2021-12-21 10:19:17 +08:00
Jianrong
d901d1df6e race condition caused by old eth bug where read before write. We fixing it by passing down header in the snapshot to avoid touching ETH code. This is just a precaution to avoid undiscovered bugs in XDC as a result of fundmental ETH implementation change 2021-12-21 10:32:55 +11:00
Anil Chinchawale
72fb654a13
Update defaults.go 2021-12-05 11:50:15 +05:30
Anil Chinchawale
079e4e16d5
Fix Invalid address in XDC Console. 2021-12-05 11:47:31 +05:30
Anil Chinchawale
f9fa3a8a07
Merge pull request #145 from XinFinOrg/mainnet_test
missing ValidatorMapping update.
2021-11-16 11:09:20 +05:30
AnilChinchawale
5112dc7564 Set Network Upgrade BlockNumber and Version. 2021-11-15 19:34:07 +05:30
olumuyiwadad
afe58d79fc fix api trace block & Change option pending block. 2021-11-11 18:49:57 +05:30
olumuyiwadad
420a589599 ignoreSignerBlockList added. 2021-11-11 18:48:50 +05:30
olumuyiwadad
18bfb102b4 Update Test for blockchain.go
- TestBlocksHashCacheUpdate
- TestAreTwoBlocksSamePath

	Collection test for BlocksHashCache
	cases
		1. When init new chain
		2. when insertChain
		3. when insertFork
		4. When adding new block by mining
		5. When adding new block by syncing with other nodes
2021-11-08 15:41:13 +05:30
olumuyiwadad
adf071665a update version 1.4.2 2021-11-08 15:01:16 +05:30
olumuyiwadad
70e0496138 fetch data from StateDB instead of Contract. 2021-11-08 14:59:32 +05:30
olumuyiwadad
ff56f5e50f update Voter Delay Withdraw. 2021-11-08 14:58:04 +05:30
olumuyiwadad
1bfafade74 Revert XDCValidator. 2021-11-08 14:57:10 +05:30
olumuyiwadad
abee93984b Mainnet test sync. 2021-11-08 14:55:20 +05:30
olumuyiwadad
cca2a7d213 missing ValidatorMapping added. 2021-11-08 14:54:41 +05:30
olumuyiwadad
ac7b764207
Merge pull request #144 from XinFinOrg/dev-upgrade
fetch dev-upgrade.
2021-11-08 14:52:27 +05:30
olumuyiwadad
cbcd635377
Merge pull request #142 from XinFinOrg/statedb-utils-for-xinfin
make validatorReader.go correct
2021-11-08 14:50:34 +05:30
Gerui Wang
a1e6ae4152 make statedb_utils.go (XDCValidator reader) correct, add statedb utils test 2021-11-03 21:05:25 +08:00
Anil Chinchawale
2869165165
Merge pull request #138 from hash-laboratories-au/hashlab-master
Hashlab master
2021-11-03 16:13:36 +05:30
Jianrong
acc2e411a6 fix or skip tests due to PR-136 change 2021-10-20 20:17:47 +11:00
Jerome
a996c3a1a3
Merge pull request #12 from hash-laboratories-au/adaptor-config-setup-with-tests
Adaptor config setup with tests
2021-10-17 12:57:33 +11:00
Jianrong
ce4e16c7c3 replace c to x in XDPos pakage 2021-10-17 11:37:55 +11:00
Jianrong
e5a9a5ddbc replace consensus int config with string const 2021-10-17 11:31:49 +11:00
Jianrong
0eb2504db3 Add 1 test for adaptor to switch from v1 to v2 2021-10-17 11:20:57 +11:00
Jianrong
c8ee8e1936 add a simple test to verify DB is the same across different engine versions 2021-10-16 13:22:48 +11:00
Jianrong
ce106abffe fix tests related to consensus 2021-10-10 22:05:32 +11:00
Jianrong
e34311ff45 Remove unused consensus v1 methods 2021-10-10 16:04:34 +11:00
Jianrong
48be4e4ca7 Move consensus hooks to its own package 2021-10-10 16:04:32 +11:00
Jianrong
0aec2a1e9e Seperate hooks from XDPoS adaptor 2021-10-10 16:02:19 +11:00
Jianrong
30811ee58c Add back verbose option when running CI tests 2021-10-10 16:02:19 +11:00