wgr523
537dc5e6fb
Exp timeout ( #764 )
...
* feat: write duration calculation in countdown as
interface. add more inputs as function argument
* feat: ExpTimeoutDuration
* fix: three dots usage
* feat: refine exp duration
* feat: add exp timeout config and use it in countdown
* feat: remove const countdown
* feat: remove use of interface in countdown, use error
* fix: countdown reset timer problem
* fix: add default ExpTimeoutConfig for config
2025-01-19 23:04:03 +08:00
wanwiset25
44ac46f676
add local xdpos function
...
add readme
changes to support xdpos2 protocol from block 0
2025-01-01 22:06:09 -05:00
Daniel Liu
82ff8c19a0
all: remove uses of untyped golang-lru
2024-12-21 14:39:26 +08:00
benjamin202410
21b05243b6
Merge from master mining time patch ( #767 )
...
* merge from master
* close channel
* close channel
---------
Co-authored-by: liam.lai <liam.lai@us>
2024-12-19 01:17:29 -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
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
a79411fa06
all: fix staticcheck warning ST1005: incorrectly formatted error string
2024-10-24 09:48:20 +08:00
Liam Lai
22fc7d0710
fix conflict
2024-10-16 22:42:53 -07:00
Liam
e6190dd25f
fix timeout skip condition ( #659 )
...
Co-authored-by: 賴怡誠 <laiyicheng@makotos-MBP.lan>
2024-09-30 21:32:22 -07:00
Liam
9751e41dd5
Mainnet debug ( #655 )
...
* intro new timeout (#651 )
* intro new timeout
* correct comment
* disable ProcessForensics
* disable ProcessForensics
* change version
* enable periodicProfilingFlag
* fix: ignore old timeout msg
* fix: ignore old timeout msg including equal to the current round
* udpate version file
2024-09-30 20:05:14 -07:00
JukLee0ira
2d89951e5b
all: use errrors.New instead of empty fmt.Errorf
2024-06-14 19:19:21 +08:00
Wanwiset Peerapatanapokin
3fe54e28d3
remove uncle block handling ( #523 )
2024-04-23 09:44:49 +04:00
Liam
d76a573cf2
PPX-01 rename NextEpochMasterNodes to NextEpochCandidates ( #510 )
2024-03-31 07:27:13 +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
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
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
Wanwiset Peerapatanapokin
a959bea092
add standbynodes in GetMasternodesByNumber similar way to subnet
2023-07-21 10:07:05 +04: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
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
Liam
f9c0c40515
change devnet switch block for large scale test ( #205 )
...
* change switch block
* use mainnet masternode
* update mining and timeout time
* add timer on round number
* remove bug code
2022-11-12 12:19:28 +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
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
Jerome
4eea723717
Add API to get latest committed blockInfo, also send it via 'block' message type to stats server ( #113 )
2022-07-16 16:14:36 +10:00
Liam
90395f5423
add initial in verifyheader ( #112 )
2022-07-11 17:32:22 +02:00
Liam
e55fca6703
log improvement and some refactor ( #110 )
2022-07-10 01:11:28 +02:00
Liam
ac5096d692
upgrade log level and log message ( #102 )
2022-06-19 10:59:09 +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
wgr523
727202cac9
remove verifyQC from ProposedBlockHandler since verifyQC is already in verifyHeader ( #88 )
2022-05-18 11:18:10 -04:00
Liam
2b40d1337f
initial snapshot when there is no snapshot ( #86 )
2022-05-18 11:17:49 -04:00
Jerome
2f40b63ca8
Re-define the forensics report format and complete the internal forensics logic ( #90 )
2022-05-16 17:30:45 +10:00
Jerome
ba144d898f
process forensics ( #84 )
...
* process forensics
* Found common signers at same round for forensics
* find attackers
* add test for forensics
* run setCommittedQCs after processForensics
2022-05-03 21:18:28 +10:00
Jerome
eb35d4e32e
Add set committed QC function in forensics ( #83 )
2022-04-23 10:33:56 +10:00
Jerome
6c48d5be6c
Xin 181 178 ( #80 )
...
* add skeleton forensics
* remove duplicated penalty check in verify header
2022-04-10 09:40:32 +10:00
Liam
92857e50e5
xin-177 check penalty only on epoch switch block and Add Hook on initial ( #78 )
...
* check penalty only on epoch switch block
* skip calculate penalty on first v2 block
* clean code, its doing same thing
2022-04-02 22:59:39 -06:00
Jerome
0ded664f0c
add highestSelfMinedRound to make sure we mine once per round ( #79 )
2022-04-03 12:45:25 +10:00