benjamin202410
a8560300a4
fix vote test and optimize log ( #750 )
...
Co-authored-by: liam.lai <liam.lai@us>
2024-11-29 03:14:25 -08:00
Daniel Liu
ed242b4763
all: implement EIP-1153 transient storage ( #26003 )
2024-11-15 19:39:18 +08:00
liam.icheng.lai
59a7eb1f9f
resolve conflict from master
2024-10-30 16:47:26 -07:00
benjamin202410
118ccd08d5
cherry pick epoch api from dev-upgrade ( #699 )
...
* cherry-pick-epoch-api
2024-10-29 01:36:22 -07:00
Daniel Liu
a5bc0baba9
all: fix staticcheck warning ST1019: import package twice
2024-10-28 17:45:19 +08:00
wgr523
71b9005f34
feat: add api xdpos_getBlockInfoByEpochNum ( #674 )
...
* feat: add api xdpos_getBlockInfoByEpochNum
* feat: add cache round2epochBlockInfo
* fix: round2epochBlockInfo contains round now
* feat: binary search in GetBlockByEpochNumber
* fix: change some code back, refine style
2024-10-28 00:14:30 -07:00
Daniel Liu
4709ca3f13
all: fix staticcheck warning SA1006
2024-10-28 15:13:21 +08:00
Daniel Liu
a79411fa06
all: fix staticcheck warning ST1005: incorrectly formatted error string
2024-10-24 09:48:20 +08:00
benjamin202410
042c02ba8c
add last block number for epoch api ( #681 )
...
Co-authored-by: Liam Lai <liam@home>
2024-10-20 23:43:23 -07:00
Daniel Liu
8c077345d0
all: removed blockhash from statedb ( #23126 )
2024-10-18 09:24:52 +08:00
Liam Lai
22fc7d0710
fix conflict
2024-10-16 22:42:53 -07:00
Liam Lai
b43bb5ed1f
api epoch
2024-10-15 19:20:13 -07:00
benjamin202410
eb6d53adf6
Fix getCandidateStatus API ( #663 )
...
* Fix getCandidateStatus API
* sync vote message and fix test
* update function name
---------
Co-authored-by: Liam Lai <liam@home>
2024-10-09 22:05:14 -07:00
wgr523
3593abe815
feat: GetEpochNumbersBetween API ( #606 )
...
* feat: GetEpochNumbersBetween API
* style: refine GetEpochNumbersBetween API
2024-09-02 00:11:12 -07: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
Daniel Liu
01e1728a94
all: add support for EIP-2718, EIP-2930 transactions ( #21502 )
2024-05-14 23:15:35 +08:00
Liam
d76a573cf2
PPX-01 rename NextEpochMasterNodes to NextEpochCandidates ( #510 )
2024-03-31 07:27:13 +11: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
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
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
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
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
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
Liam Lai
69c38ac490
fix broken the tests and one bug
2023-08-02 09:27:46 +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
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 Lai
65ffdcd0a9
fix test
2023-02-23 14:22:30 +08: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
Liam
a75c315eb5
fix penalty calculation bug ( #189 )
2022-10-09 14:06:04 +08:00
Liam
2b3e059abf
xin-244 re-snyc blocks from v1 to v2 ( #186 )
...
* xin-244 re-snyc blocks from v1 to v2
* remove log
* correct log
* constant value
* remove comment
2022-10-04 23:33:13 +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
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
1cac82825d
xin-176 use local masternode to verify signature ( #98 )
...
* use local masternode to verify signature
* refactor verify header
2022-06-05 12:53:50 +02:00
Liam
50ae0c95fd
xin-197 xin-198 fix devnet issues ( #99 )
...
* xin-197 xin-198 fix devnet issues
* update log
2022-06-05 11:06:32 +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
Liam
ca6a645fca
refactor and improve log ( #92 )
...
* refactor and improve log
* fix conflict and test
2022-05-23 02:34:32 +01:00
Liam
882add50f5
bug fix for snapshot failed to load from db ( #91 )
2022-05-22 19:15:25 -05:00
Jerome
455cacc1b7
move XDC consensus types into core ( #93 )
2022-05-22 11:43:25 +10:00
Liam
5fffa0cd43
xin-188 update penalty limit epoch constant for v2 and shorter test ( #87 )
2022-05-18 11:17:32 -04:00