Leo Chen
8b7a640cdf
[viewchange] remove unused function
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
3bad6006a1
[viewchange] newview message reprocessing
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
3bd65c850b
[viewchange] validate payload of m1 message
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
1c0e872b6e
[viewchange] init bitmap before init payload
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
75fb354ee7
[viewchange] rename VerifyViewChange to ProcessViewChange
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
0871866848
[misc] fixed comment of onNewView
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
7620fce074
[viewchange] fix InitPayload func
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
5ba139fded
[log] use info level for viewchange log
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
df9d54443d
[viewchange] rename NextAfter to NthNext
...
The NthNext will return the nth key after the current pubkey
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
669302ea2e
[viewchange] config viewchange timeout to 45s
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
60f7237c65
[misc] add one comment
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
55f6c29045
[viewchange] restore old next leader logic
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
85f782f783
[viewchange] avoid reentrant of newview message
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
5d4cdbdd06
[core] simplify switchPhase as it is always called in override mode
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
5d7693d318
fix travis checker
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
f9018be0ca
protect IsM1PayloadEmpty with a lock
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
0ad38d2a1c
make viewchange variable private
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
45cc4d24a0
make view change struct private
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
096614eab1
address review comments
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
a229177945
[viewchange] rename view change files
...
[viewchange] new view change struct
move all view change data structure to a new viewchange struct
[viewchange] wrap functions in viewchange struct
[viewchange] newView process can not be reentrant
[viewchange] additional debug
[viewchange] always add m3 message to bitmap
[viewchange] shorten the duration for view change
[viewchange] further cleanup of onNewView func
[viewchange] add validpayloadlength const
[viewchange] only add m3 message if valid m1/m2 received
[viewchange] set next leader to any key
[viewchange] print more error message in log
[viewchange] get leader pubkey from coinbase
[viewchange] rename files back for easy review
[viewchange] fix nil pointer in getNextLeader
[viewchange] fix review comments
[viewchange] squash single used function
[viewchange] code re-org
[viewchange] clean up functions
[viewchange] minor typo fix
[viewchange] code clean up and more comments
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Rongjian Lan
10ca5433ac
Add tests for prepare and commit message construction
4 years ago
Rongjian Lan
2a45a1d684
correct func comment
4 years ago
Rongjian Lan
eb837336a8
Refactor multi-sig logic for validator; Add slashing sanity check
4 years ago
Rongjian Lan
dc24b3ad52
Basic multi-sig logic
4 years ago
Leo Chen
aba83d4681
Revert "[viewchange] fix getNextLeader"
...
This reverts commit 9dc8f43288
.
4 years ago
Leo Chen
db82575018
[viewchange] rename curViewID variable to blockViewID
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
b76ac39d48
[viewchange] rename GetCurViewID to GetCurBlockViewID
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
3693196926
[viewchange] rename SetCurViewID to SetCurBlockViewID
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
f5bd6a3490
[viewchange] fixed wrong viewID function calls
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
9dc8f43288
[viewchange] fix getNextLeader
...
next leader can be any leader depending on the gap of the view ID
do not change current pubkey unless leader change succeeded
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
a551c05ed8
[rpc] expose consensus internal data via rpc
...
This is used to debug consensus/viewchange state.
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Rongjian Lan
79cf6afd37
revert multi-sig messaging code ( #3361 )
...
* revert multi-sig messaging code
4 years ago
Rongjian Lan
151286ce04
Fix travis
4 years ago
Rongjian Lan
09ce0bac9d
Correct mistakenly committed code
4 years ago
Rongjian Lan
6845775078
Make block proposal async and receiving last commit sig through channel
4 years ago
Jacky Wang
3adab4496c
Revert "[consensus] enable the consensus module can spin up doSync ( #3340 )" ( #3350 )
...
This reverts commit f9c26e663b
.
4 years ago
Leo Chen
e079fb1473
[viewchange] simplify vc message initialization
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
5e556b812d
[misc] move SenderPubkeys check to sanity check func
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
79d43c2ce8
fix test cases
...
updated protoc version
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
7dcdbe7d2b
fix golint
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
0c04a2b574
[consensus] rename SetViewID to SetViewIDs
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
54912716ce
[validation] move newview validation to p2p layer
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
42923336c9
[viewchange] encapsulate both viewID and viewChangeID
...
[viewchange] encapsulate view ID in the State struct
do NOT ues consensus.current directory to set/get viewID
use the following functions
consensus.SetCurViewID, consensus.SetViewChangingID
consensus.GetCurViewID, consensus.GetViewChangingID
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
c2e962a035
[debug] add debug rpc calls
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Jacky Wang
f9c26e663b
[consensus] enable the consensus module can spin up doSync ( #3340 )
...
* [consensus] enable the consensus module can spin up doSync
* [consensus] remove the blockNumLowChan buffer in onCommitted. Move tryCatchup logic before informing blockNumLow
* [sync] Remove an unnecessary time ticker in sync to reduce one sync loop time from 3.5s to 1s (based on testnet)
* [consensus] also spin up state sync at onPrepared
* [consensus] removed onCommitted block number check since redundent
4 years ago
Rongjian Lan
f42338c30b
Add back multi-sig support and fix the multi-sig check for harmony nodes ( #3337 )
...
* Revert "Revert "Add multi-sig merged messaging logic (#3300 )""
This reverts commit cbd11331b4
.
* Allow harmony nodes to sign multisig from multiple accounts
4 years ago
Rongjian Lan
a5fa880ae3
Revert "Add multi-sig merged messaging logic ( #3300 )" ( #3326 )
...
This reverts commit ecf151592e
.
4 years ago
Rongjian Lan
ecf151592e
Add multi-sig merged messaging logic ( #3300 )
...
* Revert "[go.mod] version upgrade of libp2p modules"
This reverts commit ce53468e3e
.
* Add multi-sig merged messaging logic
* fix view change signature issue
* support multi-sig consensus messages
* Add multi-sig support for slashing
* Fix bls mask issue in looping
* Fix multisig aggregation issue
* Make multisig bitmap setting atomic
* Fix for PR comments
* Update pb.go
* Revert "Update pb.go"
This reverts commit be625b80c0
.
* Resolve comments and fix slashing logic
* fix test
* revert slash logic change
* Add missing field in slash moment
* Fix comment
4 years ago
Jacky Wang
2ddbe5a345
[cmd] change stressnet staking epoch back to 0. Remove block time set to 8 logic.
4 years ago
Jacky Wang
200b0ca9e0
[cmd] changed consensus to option field, removed consensus flags, changed broadcast invalid transaction to option fields
4 years ago