Skip to content

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

Merged
merged 4 commits into from
Feb 19, 2021
Merged

public attestation on-chain module #92

merged 4 commits into from
Feb 19, 2021

Conversation

bddap
Copy link
Contributor

@bddap bddap commented Dec 16, 2020

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.

@@ -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>;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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)),
Copy link
Contributor Author

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.

@bddap bddap changed the title [WIP] public attestation on-chain module public attestation on-chain module Dec 23, 2020
@bddap bddap requested a review from lovesh December 23, 2020 17:48
@nmrshll nmrshll merged commit 441c912 into master Feb 19, 2021
@nmrshll nmrshll deleted the public-attestation branch February 19, 2021 16:23
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.

2 participants