-
Notifications
You must be signed in to change notification settings - Fork 18
public attestation on-chain module #92
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
Conversation
@@ -28,6 +28,9 @@ pub struct Blob { | |||
pub trait Trait: system::Trait + did::Trait { | |||
/// Blobs larger than this will not be accepted. | |||
type MaxBlobSize: Get<u32>; | |||
/// The cost charged by the network to store a single byte in chain-state for the life of the | |||
/// chain. | |||
type StorageWeight: Get<Weight>; |
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.
Might as well add this to the blob module as well.
@@ -313,10 +315,12 @@ impl revoke::Trait for Runtime {} | |||
|
|||
parameter_types! { | |||
pub const MaxBlobSize: u32 = 1024; | |||
pub const StorageWeight: Weight = 1100; |
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.
This is the same value we were using in the blob module before.
@@ -103,6 +104,7 @@ pub enum StateChange { | |||
RemoveRegistry(revoke::RemoveRegistry), | |||
Blob(blob::Blob), | |||
MasterVote(master::Payload), | |||
Attestation((did::Did, attest::Attestation)), |
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.
Did is explicit when attesting.
0ebf625
to
747e231
Compare
747e231
to
346e1ad
Compare
Adds the on-chain component for public attestations as proposed in https://github.com/docknetwork/planning/blob/37651baffc3d28cdb961b4dddd6e97014d34ff90/rfc/0014-public-attestation.md#on-chain-component .
The nonce-like value (called "priority" in this module) used for replay protection of DID signatures is
Compact<>
encoded. The node-client (SDK) will need to test that priority values over 255 are encoded and decoded properly and work as expected.