Commit graph

1512 commits

Author SHA1 Message Date
Wanwiset Peerapatanapokin
aaa246f60e
PDF-01 (#397)
* replace deprecated ioutil lib calls

* fix for FileInfo type required

* fix for ioutil.Discard

* fix .Discard

* fix for go-bindata generated files
2024-01-19 15:05:03 +04:00
Liam
81ff6421d0
fix Panic In ProcessOrderPending Leads To Chain Halt (#392)
Co-authored-by: Liam Lai <liamlai@Liams-Laptop.local>
2024-01-19 11:22:24 +11:00
Daniel Liu
ded4e0fd90 fix nil Error in func reportBlock (#369) 2023-12-05 20:29:19 +08:00
Liam
ac404683b3
Merge pull request #365 from XinFinOrg/bump-go-v2
Bump go v1.21
2023-11-21 23:44:14 +11:00
Liam
f7025cee2f
Merge pull request #346 from gzliudan/defer-time.Since
call to time.Since is not deferred
2023-11-21 23:22:58 +11:00
Liam
87ba815341
Merge pull request #336 from gzliudan/fix-func-procFutureBlocks
Fix a loop closure bug in func  procFutureBlocks
2023-11-21 23:19:08 +11:00
Liam Lai
824d7b232f resolve conflict 2023-11-20 23:53:49 +11:00
Liam
c215316744
Make masternode dynamic (#356)
* make masternode dynamic

* fix all the tests

* remove cmt

* fix test again
2023-11-16 23:59:19 +11:00
Liam
84994df759
Merge pull request #351 from XinFinOrg/bump-golang-1.21
Bump golang 1.21
2023-11-07 10:35:42 +11:00
Daniel Liu
cd9f4f8094 core: fix loop closure bug in func procFutureBlocks 2023-11-01 15:02:04 +08:00
Daniel Liu
349f71db7b defer time.Since 2023-11-01 12:43:50 +08:00
Daniel Liu
f4154d0479 remove lendingstate.EmptyAddress 2023-10-24 12:27:03 +08:00
Daniel Liu
2c02ddc2d9 remove xdc0000000000000000000000000000000000000000 2023-10-24 12:15:30 +08:00
Daniel Liu
e2359d9b8c filter zero address in function GetCandidates 2023-10-24 12:15:24 +08:00
Daniel Liu
320b358830 replace package sort with common/sort 2023-10-23 22:51:06 +08:00
Daniel Liu
7adb98fbe8 update gas fee 2023-10-16 11:24:47 +08:00
Daniel Liu
148e2f1699 add parameter number for function NewMessage 2023-10-16 11:24:47 +08:00
Daniel Liu
0e8b3f1d31 replace TRC21Cost with TxCost 2023-10-16 11:24:47 +08:00
Daniel Liu
9a7ffaa09f change msg.gasPrice in function AsMessage 2023-10-16 11:24:47 +08:00
Daniel Liu
845d3d49e5 change minGasPrice in function validateTx 2023-10-16 11:24:47 +08:00
Daniel Liu
02158d06d9 core: fix blockHash for eth_getLogs, eth_getFilterLogs, eth_getTransactionReceipt (#208) 2023-08-31 15:26:26 +08:00
Liam Lai
5623ce8de0 merge from master 2023-07-30 16:50:45 +10:00
Wanwiset Peerapatanapokin
a959bea092 add standbynodes in GetMasternodesByNumber similar way to subnet 2023-07-21 10:07:05 +04:00
wgr523
d578e092cd
stop reorg at committed blocks (#276)
This PR makes committed blocks non-reorg-able inside `Blockchain` struct. This ensures V2 consensus safety property in the aspect of blockchain head: committed blocks' state will not be reorg and users will always see committed blocks (or their child blocks) as current head of the blockchain.

* stop reorg at committed blocks

* fix tests

* fix tests
2023-06-08 01:16:13 +08:00
wgr523
3e0505a0c7
cherry-pick from d8ada03eac (#255) 2023-05-25 14:23:27 +10: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
Liam
153f8d296d
Fix API penalty bug and add more info in api (#262)
* fix api bug

* remove cmd
2023-05-16 21:23:02 +10:00
Daniel Liu
fd6cbd5df1 fix nonce error for debug trace api (#256) 2023-05-06 09:50:25 +08:00
Liam
7b657f0c4e
API: getMasternode and getPoolStatus (#258)
* API: getMasternode and getPoolStatus

* fix test
2023-05-01 23:01:39 +10:00
Jerome
1430b74a98
Add more log info during updateM1 and change log level on devnet to 3 (#223) 2023-01-22 22:53:22 +11:00
Jerome
2ca1d0461d
Fix issue when resync is not getting the right consensus config values (#221)
* Fix issue when resync is not getting the right consensus config values

* add test and fix log bug

* fix test

* delete temp file

Co-authored-by: Liam Lai <liam.icheng.lai@gmail.com>
2023-01-17 21:34:42 +08: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
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
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
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