-
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
Use our own hashing routines instead of SCPs #741
Conversation
Note: this is only for |
2d72677
to
5ca40ca
Compare
Codecov Report
@@ Coverage Diff @@
## v0.x.x #741 +/- ##
==========================================
- Coverage 91.34% 91.34% -0.01%
==========================================
Files 64 65 +1
Lines 5151 5162 +11
==========================================
+ Hits 4705 4715 +10
- Misses 446 447 +1
Continue to review full report at Codecov.
|
@@ -24,14 +24,14 @@ LocalNode::LocalNode(NodeID const& nodeID, bool isValidator, | |||
: mNodeID(nodeID), mIsValidator(isValidator), mQSet(qSet), mSCP(scp) | |||
{ | |||
normalizeQSet(mQSet); | |||
mQSetHash = sha512(xdr::xdr_to_opaque(mQSet)); | |||
mQSetHash = getHashOf(mQSet); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
7db6fcd
to
29222ff
Compare
source/agora/common/SCPHash.d
Outdated
return uint512(hashFull(qset)); | ||
} | ||
|
||
/// ditto |
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.
It would be nice if D is uppercase.
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.
Okay! It doesn't make a difference to the compiler, but sure.
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.
Ah for consistency, sure.
I'll fix the linking issue in a bit. |
4311e76
to
65f91b6
Compare
We want to use our own hashing routines when hashing SCPQuorumSet.
The ByteSlice bindings will be removed in the next commit.
65f91b6
to
15582e6
Compare
I get linker errors with 1.20.1 but not 1.20.0. Sigh. |
SCP uses hashing in four different places, for different data types. So we're providing 4 prototoypes of the hashing routine implemented on the D side. Fixes: bosagora#702
15582e6
to
a00fb51
Compare
Fixed the linker issue. |
Requires:
Port SCP's hashes into 64-bytes #737Add @safe to quorum conversion functions #740Fixes #702