Skip to content
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

feat: finality with bls signature approach #314

Merged
merged 59 commits into from
Jan 16, 2025
Merged

feat: finality with bls signature approach #314

merged 59 commits into from
Jan 16, 2025

Conversation

magnified103
Copy link
Contributor

@magnified103 magnified103 commented Jan 3, 2025

This PR introduces:

  1. DRPCredentialStore (node/store/index.ts) holds the private keys and public keys for vertex signing and voting.
  • DRPCredentialConfig contains the initial seed for key generation.
  • DRPPublicCredential contains the public keys, base64-encoded.
export interface DRPPublicCredential {
	ed25519PublicKey: string;
	blsPublicKey: string;
}
  1. FinalityState and FinalityStore (object/finality) hold the finality and voting status for hashgraph vertices.
  • DEFAULT_FINALITY_THRESHOLD equals 0.51
  1. BLS signature collection scheme:
  • Attestation object holds a vertex hash and a signature representing a single vote.
message Attestation {
  string data = 1;
  bytes signature = 2;
}
  • AggregatedAttestation contains a vertex hash, an aggregate of multiple signatures and a bitset indicating who voted.
message AggregatedAttestation {
  string data = 1;
  bytes signature = 2;
  bytes aggregation_bits = 3;
}
  • ATTESTATION_UPDATE broadcast message: broadcast the attestations generated by a node upon receiving an UPDATE message.
message AttestationUpdate {
  string object_id = 1;
  repeated drp.object.v1.Attestation attestations = 2;
}

@magnified103
Copy link
Contributor Author

Also, you forgot to update the data type in the test case for hashgraph.

fixed in 6934d13

Copy link
Member

@trungnotchung trungnotchung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@winprn winprn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@hoangquocvietuet hoangquocvietuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@JanLewDev JanLewDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Copy link
Contributor

@anhnd350309 anhnd350309 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@d-roak d-roak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@d-roak d-roak merged commit 8b822ef into main Jan 16, 2025
12 checks passed
@magnified103 magnified103 deleted the feat/finality branch January 16, 2025 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement initial finality algorithm
8 participants