frozen
85dd4acfba
in progress.
2 years ago
Max
20e4892fd7
Add logging for `NthNextHmy` panic ( #4341 )
...
* improve logging
* [consensus] do not try to use negative index
* Revert "do not try to use negative index"
This reverts commit b434fd3f4af39f32650e909292cc0123bedba86e. We have
fixed the cause of the issue, which was time drift on a new cloud
provider's nodes. See `systemd-timesyncd.service`
Even if this fix had been merged, it would likely not have solved the
problem given those nodes with the correct time would pick a different
leader from those with time drift. Or, in other words, the view change
would not have gone through.
* improve logging
2 years ago
Casey Gardiner
7ab8be3377
Release Candidate: dev -> main ( #4319 )
...
* Rebase dev branch to current main branch (#4318 )
* add openssl compatibility on m2 chips using darwin (#4302 )
Adds support for OpenSSL on MacOS Ventura using m2 chips.
* [dumpdb] ensure each cross link is dumped (#4311 )
* bump libp2p to version 0.24.0 and update its dependencies and relevant tests (#4315 )
* Removed legacy syncing peer provider. (#4260 )
* Removed legacy syncing peer provider.
* Fix localnet.
* Fix migrate version.
* Rebased on main.
* Fix formatting.
* Remove blockchain dependency from engine. (#4310 )
* Consensus doesn't require anymore `Node` as a circular dependency.
* Rebased upon main.
* Removed engine beacon chain dependency.
* Fixed nil error.
* Fixed error.
* bump libp2p to version 0.24.0 and update its dependencies and relevant tests
* fix format, remove wrongly added configs
* add back wrongly deleted comment
* fix travis go checker
Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com>
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* bump libp2p to version 0.24.0 and update its dependencies and relevant tests (#4315 )
* Removed legacy syncing peer provider. (#4260 )
* Removed legacy syncing peer provider.
* Fix localnet.
* Fix migrate version.
* Rebased on main.
* Fix formatting.
* Remove blockchain dependency from engine. (#4310 )
* Consensus doesn't require anymore `Node` as a circular dependency.
* Rebased upon main.
* Removed engine beacon chain dependency.
* Fixed nil error.
* Fixed error.
* bump libp2p to version 0.24.0 and update its dependencies and relevant tests
* fix format, remove wrongly added configs
* add back wrongly deleted comment
* fix travis go checker
Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com>
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* Fix for consensus stuck. (#4307 )
* Added check for block validity.
* Starts new view change if block invalid.
* Revert "Starts new view change if block invalid."
This reverts commit e889fa5da2e0780f087ab7dae5106b96287706db.
* staged dns sync v1.0 (#4316 )
* staged dns sync v1.0
* enabled stream downloader for localnet
* fix code review issues
* remove extra lock
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* add description for closing client and change randomize process to ma… (#4276 )
* add description for closing client and change randomize process to make sure only online nodes are added to sync config
* fix sync test
* fix legacy limitNumPeers test
* add WaitForEachPeerToConnect to node configs to make parallel peer connection optional
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* Small fixes and code cleanup for network stack. (#4320 )
* staged dns sync v1.0
* enabled stream downloader for localnet
* fix code review issues
* remove extra lock
* staged dns sync v1.0
* Fixed, code clean up and other.
* Fixed, code clean up and other.
* Fixed, code clean up and other.
* Fix config.
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* Fix not disable cache in archival mode (#4322 )
* Feature registry (#4324 )
* Registry for services.
* Test.
* Reverted comment.
* Fix.
* Slash fix (#4284 )
* Implementation of new slashing rate calculation
* Write tests for then new slashing rate calculation
* Add engine.applySlashing tests
* fix #4059
Co-authored-by: Alex Brezas <abresas@gmail.com>
Co-authored-by: Dimitris Lamprinos <pkakelas@gmail.com>
* Bump github.com/aws/aws-sdk-go from 1.30.1 to 1.33.0 (#4325 ) (#4328 )
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go ) from 1.30.1 to 1.33.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases )
- [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.33.0/CHANGELOG.md )
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.30.1...v1.33.0 )
---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump github.com/btcsuite/btcd from 0.21.0-beta to 0.23.2 (#4327 ) (#4329 )
Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd ) from 0.21.0-beta to 0.23.2.
- [Release notes](https://github.com/btcsuite/btcd/releases )
- [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES )
- [Commits](https://github.com/btcsuite/btcd/compare/v0.21.0-beta...v0.23.2 )
---
updated-dependencies:
- dependency-name: github.com/btcsuite/btcd
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Max <82761650+MaxMustermann2@users.noreply.github.com>
Co-authored-by: Gheis <36589218+GheisMohammadi@users.noreply.github.com>
Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com>
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
Co-authored-by: Danny Willis <102543677+dannyposi@users.noreply.github.com>
Co-authored-by: PeekPI <894646171@QQ.COM>
Co-authored-by: Alex Brezas <abresas@gmail.com>
Co-authored-by: Dimitris Lamprinos <pkakelas@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
Konstantin
8ee11600ac
Feature registry ( #4324 )
...
* Registry for services.
* Test.
* Reverted comment.
* Fix.
2 years ago
PeekPI
914d7da0b6
Testnet reset ( #4207 )
...
* Revert "Increase voting power of harmony nodes in testnet to 0.7 (#4200 )"
This reverts commit 20edef740b
.
* RESET TESTNET
* fix vrf testcase
* reduce number of nodes required for reseting testnet
* use only harmony nodes before staking epoch
2 years ago
Konstantin
06de7dcd6c
Fix race errors. ( #4184 )
...
* Fix data races.
* Fix block num.
* Pub key lock.
* Fixed race errors.
* Fix flag.
* Fix comments.
* Fix comments.
* Fix type.
* Fix race errors in tests.
Co-authored-by: Konstantin <k.potapov@softpro.com>
2 years ago
PeekPI
20edef740b
Increase voting power of harmony nodes in testnet to 0.7 ( #4200 )
...
* increase voting power of harmony nodes in testnet to 0.7
* decrease QuorumThreshold to 0.6 of testnet
* decrease QuorumThreshold of testnet to 51%
* change IsQuorumAchievedByMask
2 years ago
PeekPI
8b1d7a526a
[consensus] HIP-18: Allowlist for external leaders ( #4146 )
...
* HIP18: support allowlist
* sort allowlist by default order
* fix and add unit test
* simplified calculation of index of leader
* restore code of NthNextHmy()
* rename MaxLimit to MaxLimitPerShard and add comments
* init allowlist of testnet
* update allowlist
* change HIP18 epoch to TBD
* set HIP18 of testnet to 75840
* rename _BLS() to BLS()
* update comment
* add version of allowlist variable
* recover the travis_rpc_checker script
* update HIP18 epoch
3 years ago
Paul M Fox
0a0f3aaea2
Add defer statement to mutex critical code
...
I can only assume the `Unlock()` should be deferred, since otherwise the mutex is locked and then immediately unlocked with no effect.
3 years ago
Leo Chen
ede0aba0e8
[log] set log to debug on vc message
...
Signed-off-by: Leo Chen <leo@harmony.one>
3 years ago
Lutty
faacc7c091
rebase code
3 years ago
Rongjian Lan
5386978b0c
Add vrf verification in block verification logic
4 years ago
Leo Chen
61638240a2
[panic] fix nil pointer crash during view change
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
8946054f7d
[viewchange] always use first participant as base of leader pubkey
...
when view change happended at the first block of the new epoch
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
0d666a05a3
[viewchange] protect startViewChange ( #3501 )
...
https://github.com/harmony-one/harmony/issues/3499
Signed-off-by: Leo Chen <leo@harmony.one>
Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
4 years ago
Leo Chen
4a0553fb84
[viewchange] use consensus mutex, remove vc lock
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Rongjian Lan
aa643ca856
Add out of order message processing logic ( #3468 )
4 years ago
Leo Chen
59847a1fde
[prometheus] make metrics variables private
...
* add UpdateLeaderMetrics func
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
c2d37b3822
[prometheus] add consensus metrics
...
* counter of consensus
* finality histogram
* number of signatures
* number of started view change
* number of finished view change
* counter of state syncing
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Rongjian Lan
8821807946
Fixes viewID and view change ID base
4 years ago
Leo Chen
6675aee29a
[viewchange] shorten the viewchange timeout to 27s
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
1f9a2709b8
[viewchange] fixed gap calculation
...
we switch to use last block view ID from blockchain
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
e891ca68dc
[viewchange] update view ID slower than view change timeout
...
so that node init view change at different timeslot can converge on the
same view ID
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
1e4b55a7cc
[viewchange] check quorum by mask
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
0f02ec9bf1
[viewchange] use last known viewID from blockchain
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
3b3ea98904
[log] print out view change messages
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Rongjian Lan
f91d781fe4
add Delayed sending
4 years ago
Rongjian Lan
8db8802eed
send committed at 67%
4 years ago
Rongjian Lan
4aef0f4132
do not sent committed at 67%
4 years ago
Rongjian Lan
fea096b0f9
Fix view id calc
4 years ago
Rongjian Lan
4d18b7feec
Revert "Fix view change stuck issue"
4 years ago
Rongjian Lan
38fe2a4422
fix comment
4 years ago
Rongjian Lan
ff9a85ac48
Fix view change stuck issue
4 years ago
Rongjian Lan
49d7985f14
some more logic cleanup
4 years ago
Rongjian Lan
9d95b9844d
rename ChainReader to Blockchain
4 years ago
Rongjian Lan
ee3dd70676
merge
4 years ago
Rongjian Lan
8d72c537f1
avoid race condition
4 years ago
Rongjian Lan
a1022e92d8
add todo
4 years ago
Rongjian Lan
61edc85a90
fix block hash in new view
4 years ago
Rongjian Lan
c270381a9f
Update viewchangingid; don't reset state in new view
4 years ago
Leo Chen
fde9849eb6
[viewchange] stop sending view change msg
...
* when new leader sent NewView message
* when validators received valid NewView message
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
205c77b7da
[viewchange] should not startNewView is not in viewChange mode
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Rongjian Lan
611448a0a1
pipelining wireframe
4 years ago
Leo Chen
08cb490163
[viewchange] use IsLastBLockInEpoch to determine new epoch
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
517fdabe5c
[viewchange] remove viewID param in startViewChange func
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
e8a8b6f543
[viewchange] only rotate leader among harmony nodes
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
689a86f889
[viewchange] handle view change in first block of an epoch
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
e0dcb97c29
[viewchange] remove unnecessary check of view id diff
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
234f202656
[viewchange] time-based synchronuous view change
...
For view change, the view change ID is the key to determine which node
will be next leader. In our original algorithm, the view ID always increased one step
at a time. The view change period increased exponetially based on the square of
the gap between current view changing ID and previous known block view change ID.
However, it is very slow to converge the view change if multiple nodes are offline and
view change can't be reached. Especially, during the shard down event, multiple nodes
are offline and other nodes have advanced their current view changing ID.
The new time-baed synchronuous view change algorithm uses the local timestamp and
the timestamp of the block to calculate the expected view changing ID. In this case,
offline nodes can immediately catch up with the latest view changing ID as long as
the offline nodes have the latest sync'ed block and relatively acturate local
clock. This algorithm will converge the view change faster in one or two view change
duration.
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Rongjian Lan
1851d7eea5
add HasSingleSender func
4 years ago