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
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
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