-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send & receive SCP quorum sets to fix SCP message propagation #621
Conversation
Codecov Report
@@ Coverage Diff @@
## v0.x.x #621 +/- ##
==========================================
- Coverage 91.34% 91.33% -0.02%
==========================================
Files 65 65
Lines 5167 5192 +25
==========================================
+ Hits 4720 4742 +22
- Misses 447 450 +3
Continue to review full report at Codecov.
|
Some of these commits should be split off into another PR. |
@@ -365,6 +381,8 @@ public class NetworkManager | |||
try | |||
{ | |||
node.handshake(this.getAddress()); | |||
if (node.quorum_hash != StellarHash.init) | |||
this.quorum_sets[node.quorum_hash] = node.quorum_set; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
ee10fcb
to
745e00e
Compare
427a75b
to
b87068e
Compare
I will split this into two, and remove the necessity to exchange SCP structs in the API. |
b87068e
to
695eb64
Compare
695eb64
to
5447d0b
Compare
5447d0b
to
2aedea6
Compare
This needs to be reworked with regards to #702. |
Temporary measure until we use our own hashes.
This is a temporary solution to make getQSet() in our implementation of the SCPDriver to work properly. In the future, the set of quorum hashes and sets will be known based on the quorum balancing algorithm and these APIs can then be removed..
If there was a new client connecting to use, it might have a quorum set associated with a hash that we previously haven't seen. If a new hash is found, it's added to the cache.
The previous set of fixes included: - Gossip all messages to connected peers, and not just to *our* quorum set - Retrieve all hash => QuorumSet mappings, through a set of new APIs. Together with these fixes, the cylic quorum configuration finally works. In addition, the ExtraChecks for the quorum configurations can finally be re-enabled. Fixes bosagora#606
2aedea6
to
c59bd05
Compare
{ | ||
auto stellar_hash = uint512(hash); | ||
auto set = this.nominator.getQSet(stellar_hash); | ||
assert(set.ptr !is null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If StellarHash is not new, an error occurs.
Can it be used for malicious attacks?
As mentioned in #621 (comment), this PR has become unnecessary. We don't need to look up quorum sets explicitly because they will be known in advance once #240 is implemented. |
Fixes #606
Requires:
Validator: Connect to all quorum set validators #643Fix network discovery & start Node asynchronously #648