Commit graph

308 commits

Author SHA1 Message Date
Daniel Liu
aa88078dd1 core/types: convert status type from uint to uint64 (#16784) 2024-06-20 15:52:32 +08:00
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
JukLee0ira
0aab4ced98 common: add binary variables for system contract 2024-06-06 19:33:59 +08:00
JukLee0ira
21c62f9ef0 XDCx,XDCxlending,consensus,core: not compare adresss by String 2024-06-06 19:33:39 +08:00
Daniel Liu
01e1728a94 all: add support for EIP-2718, EIP-2930 transactions (#21502) 2024-05-14 23:15:35 +08:00
Wanwiset Peerapatanapokin
2bbecdcbbc
revert https://github.com/XinFinOrg/XDPoSChain/pull/497 behavior for v1 engine (#531) 2024-05-13 19:26:26 +08:00
Daniel Liu
ec50ca36d9 core, eth, trie: use common/prque (#17508) 2024-05-09 18:38:27 +08:00
Wanwiset Peerapatanapokin
3fe54e28d3
remove uncle block handling (#523) 2024-04-23 09:44:49 +04:00
Liam
5d4ea760d5
revert rename change as change db field name and stops block chain reading from db (#517) 2024-04-08 20:40:20 +08:00
wgr523
c16bd66a8d
Merge pull request #498 from XinFinOrg/ppx-01
PPX-01 add verification of vote signer belonging to masternodes
2024-04-01 20:48:16 +08:00
Liam
d76a573cf2
PPX-01 rename NextEpochMasterNodes to NextEpochCandidates (#510) 2024-03-31 07:27:13 +11:00
Wanwiset Peerapatanapokin
77390d30ce
consensus/clique: add some missing checks (#22836) and updated to latest go-eth code (#474) 2024-03-26 13:22:24 +04:00
Banana-J
816dce9527
drop peer if received bad block data which does not include the validator field (#494)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-03-23 09:18:21 +11:00
Gary
04c3f483b8 fix: add verification of vote signer belonging to masternodes 2024-03-19 20:40:00 +08:00
Banana-J
3051b2de41
use rlock instead of lock in v1 consensus engine (#483)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-03-10 09:51:05 +11:00
Banana-J
c7cb63dd09
fix: error handling on x.getEpochSwitchInfo in sendTimeout should return error (#444)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-03-09 16:25:47 +11:00
Banana-J
07d40a0038
fix: add lock for haserror variable in timeout.go (#443)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-03-04 22:05:19 +11:00
Banana-J
e324d7d18f
fix: race condition of x.signer in v1 consensus (#445)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-03-03 22:27:01 +11:00
Banana-J
a54a645cda
fix: always check for error value and return nil, err where possible (#426)
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-02-11 20:32:24 +11:00
Liam
54b254e25c
lower log level for pretty log (#420)
Co-authored-by: Liam Lai <liam.lai@datameshgroup.com.au>
2024-02-11 20:27:37 +11:00
Banana-J
2504961a33
fix: replace all time.after with the time.newtimer (#400) 2024-01-27 21:01:24 +11:00
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 Lai
4446931e9e change vote log level 2023-12-29 22:49:52 +11:00
Jianrong
8e1f71e86e Fix the typo missied to missed 2023-12-28 23:03:53 +11:00
Jianrong
e83c0a0954 Add tests to cover the new GetMissiedRoundsInEpochByBlockNum API 2023-12-28 17:37:30 +11:00
Jianrong
6740545358 change the API to be block num based 2023-12-28 15:13:05 +11:00
Jianrong
e28b550a24 Add a new API to help debug when there are missed rounds 2023-12-28 15:13:05 +11:00
Liam
c7a42fd7c9
resolve sync issue by passing right round number (#384) 2023-12-27 22:14:13 +11:00
Banana-J
e30d909643
Add config into network information API (#381) 2023-12-19 19:02:32 +11:00
Liam
47bfdf7635
Move masternode in v2 config (#372)
* move masternode in v2 config

* update number to meet 7 vote for current setup

* add test

* update all failed test

* fix test

* remove comment

* remove comment

* fix test
2023-11-29 11:11:58 +11:00
Liam
b4bd070837
Improve log (#368)
* improve log
2023-11-26 22:04: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
Liam
24d02fe2b4
check v2 switch block is epoch number (#342)
* check v2 switch block is epoch number

* revert sync pr

* add test

* make default block number valid

* fix log

* fix test
2023-10-30 19:03:34 +11:00
Daniel Liu
0b06bc3a5d not compare strings in func CompareSignersLists 2023-10-23 22:51:06 +08:00
Liam
45c1518ea1
Devnet fix on ci improvement (#314)
* fix ci

* update pr template
2023-08-21 10:07:00 +10:00
Liam
938db0afcc
Bug Fix: V2 getSigner API (#313) 2023-08-20 10:56:08 +10:00
Liam Lai
69c38ac490 fix broken the tests and one bug 2023-08-02 09:27:46 +10:00
Wanwiset Peerapatanapokin
a959bea092 add standbynodes in GetMasternodesByNumber similar way to subnet 2023-07-21 10:07:05 +04:00
Banana-J
2c1aba814e
add timestamp in v2 block response (#290) 2023-07-15 11:33:36 +10:00
Liam
96f28b8bc6
enhance api for subnet project (#289) 2023-07-14 20:04:01 +10: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
Liam
2df16bbd37
merge waitPeriod into minePeriod (#274)
* merge waitperiod into mindePeriod

* merge waitperiod into mindePeriod
2023-05-31 23:40:50 +10:00
Liam
706292e1a1
Add debug msg and reset devnet config (#270)
* add debug msg

* remove all devnet config since we need to reset devnet
2023-05-24 14:52:58 +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
Liam
7b657f0c4e
API: getMasternode and getPoolStatus (#258)
* API: getMasternode and getPoolStatus

* fix test
2023-05-01 23:01:39 +10:00
Liam
9552500335
xdpos API getV2Block (#227) 2023-03-05 02:17:46 +08:00
Liam Lai
814a276ae3 remove test files 2023-02-23 14:22:59 +08:00