Commit graph

1478 commits

Author SHA1 Message Date
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
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
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
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
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
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
Jerome
455cacc1b7
move XDC consensus types into core (#93) 2022-05-22 11:43:25 +10:00
wgr523
8fde52c512
Xin 145 (#82)
* add HandleProposedBlock() in procFutureBlocks()

* add proposedBlockHandler for downloader
2022-04-22 00:12:44 +08: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
Liam
ff0fcd3951
add test and fix issue on happy path (#46)
* add test and fix issue on happy path

* add prepare test

* update comment
2022-01-25 10:51:17 +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
Gerui Wang
2969548f68 add warn for reorg 2021-12-21 16:06:16 +08:00
Liam Lai
5061dd9841 add few comments in code 2021-12-21 08:47:23 +03: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
olumuyiwadad
afe58d79fc fix api trace block & Change option pending block. 2021-11-11 18:49:57 +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
70e0496138 fetch data from StateDB instead of Contract. 2021-11-08 14:59:32 +05:30
olumuyiwadad
cca2a7d213 missing ValidatorMapping added. 2021-11-08 14:54:41 +05:30
Gerui Wang
a1e6ae4152 make statedb_utils.go (XDCValidator reader) correct, add statedb utils test 2021-11-03 21:05:25 +08:00
Jianrong
acc2e411a6 fix or skip tests due to PR-136 change 2021-10-20 20:17:47 +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
0aec2a1e9e Seperate hooks from XDPoS adaptor 2021-10-10 16:02:19 +11:00
Jianrong
fcbc5a28e1 refactor XDPoS to accommodate multiple consensus engine versions 2021-10-10 16:02:16 +11:00
olumuyiwadad
7d08fa95ba
Merge branch 'apothem' into new_EVM_Upgrade 2021-09-23 17:05:46 +05:30
olumuyiwadad
cf18ceba33 Merge branch 'forking-incident-fix' of https://github.com/hash-laboratories-au/XDPoSChain into hash-laboratories-au-forking-incident-fix 2021-09-23 17:01:19 +05:30
olumuyiwadad
22b1e3a2b5
Update trc21_reader.go 2021-09-21 18:13:01 +05:30
olumuyiwadad
b5abbfed79 new EVM Upgrade
- Solidity Upgraded up to v0.8.0
-  Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
92ffe69ab4 Work around for the issue "return wrong list signers from snapshot"
Update signers in snapshot
Ignore signerCheck at checkpoint block 27307800
due to wrong snapshot at gap 27307799
2021-09-17 18:45:46 +05:30
olumuyiwadad
571c41f891 FIx Bad block error. 2021-09-17 17:59:06 +05:30
Liam
0a5c047600
remove duplicate update m1 call (#8) 2021-09-04 17:51:32 +10:00
Jianrong
9efb89dffb fix simulator functions to choose between XDC faker and eth faker 2021-08-30 14:56:14 +10:00
Jianrong
fa2b341c9a resolving broken eth tests 2021-08-29 17:14:10 +10:00
Jianrong
7b7e34ae00 Fix XDC forking incident with tests 2021-08-29 14:20:01 +10:00
Jianrong
0fdab2027c add linting as the first CI task 2021-08-07 14:27:08 +10:00
AnilChinchawale
916b16de71 fix masternode stop block production. 2021-01-18 10:57:22 +05:30
AnilChinchawale
a8fc240b29 remove logs & add list of authorized signers 2020-12-30 18:00:37 +05:30
dev-vadim
dbe8c9d984 upgrade XDC.Network with v1.8.27. 2020-12-23 16:32:06 +05:30
diglspacedavid
474cc37036 upgrade codebase with ethereum:v1.8.13 2020-11-23 13:40:30 +05:30
Sinh Vu
c52f31d2c4 update max masternodes 2019-07-23 17:45:29 +07:00
Sinh Vu
3180921a7f upgrade increase masternodes 2019-07-23 17:25:55 +07:00
Péter Szilágyi
0e63a70505
core: minor code polishes + rebase fixes 2019-04-08 12:04:31 +03:00
rjl493456442
f1b00cffc8
core: re-omit new log event when logs rebirth 2019-04-08 12:02:15 +03:00
Martin Holst Swende
af401d03a3
all: simplify timestamps to uint64 (#19372)
* all: simplify timestamps to uint64

* tests: update definitions

* clef, faucet, mobile: leftover uint64 fixups

* ethash: fix tests

* graphql: update schema for timestamp

* ethash: remove unused variable
2019-04-08 12:00:42 +03:00
Anil Chinchawale
4adc9c0fdc
Update tx_pool.go 2019-04-01 14:33:59 +05:30
AnilChinchawale
ed6533e092 Added "xdc" prefix in address 2019-03-17 16:14:42 +05:30
AnilChinchawale
bf626ddc95 Core Updated 2019-03-16 16:00:19 +05:30