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

refactor(x/data): update sign to attest #927

Merged
merged 6 commits into from
Mar 24, 2022
Merged

Conversation

ryanchristo
Copy link
Member

@ryanchristo ryanchristo commented Mar 24, 2022

Description

Closes: #637

Updates the data module to use attestation terminology.

  • Changes SignData to Attest
  • Changes Signer to Attestor

Also changes AnchorData to Anchor.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #927 (196b3a4) into master (b202c37) will decrease coverage by 0.08%.
The diff coverage is 84.78%.

❗ Current head 196b3a4 differs from pull request most recent head f1ffd1a. Consider uploading reports for the commit f1ffd1a to get more accurate results

@@            Coverage Diff             @@
##           master     #927      +/-   ##
==========================================
- Coverage   72.46%   72.37%   -0.09%     
==========================================
  Files         194      194              
  Lines       22880    22880              
==========================================
- Hits        16579    16559      -20     
- Misses       5064     5076      +12     
- Partials     1237     1245       +8     
Flag Coverage Δ
experimental-codecov 72.24% <84.78%> (-0.03%) ⬇️
stable-codecov 65.49% <70.75%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ryanchristo ryanchristo marked this pull request as ready for review March 24, 2022 04:02
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

lgtm.
Let's update the rpc Attest doc.

@@ -10,18 +10,18 @@ option go_package = "github.com/regen-network/regen-ledger/x/data";

// Msg is the regen.data.v1alpha1 Msg service
service Msg {
// AnchorData "anchors" a piece of data to the blockchain based on its secure
// Anchor "anchors" a piece of data to the blockchain based on its secure
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Anchor "anchors" a piece of data to the blockchain based on its secure
// Anchor a piece of data to the blockchain based on its secure

Copy link
Member Author

Choose a reason for hiding this comment

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

Anchor is the name of the method here, not a verb.

// signers and those signers will be appended to the list of signers.
rpc SignData(MsgSignData) returns (MsgSignDataResponse);
// Attest can be called multiple times for the same content hash with different
// attestors and those attestors will be appended to the list of attestors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What happens if the same attestor attests same data multiple times? Is it overwritten?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the current implementation, we don't do anything if an attestor attempts to attest to the same data. The original attestation with the original timestamp is not overwritten and no new attestation is added. I can add a note here.

Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

looks good. theres a few areas in the spec (client.md) where the old terminology is used - do we have a tracking issue to resolve this?

@ryanchristo
Copy link
Member Author

looks good. theres a few areas in the spec (client.md) where the old terminology is used - do we have a tracking issue to resolve this?

Opened #932 for tracking.

@ryanchristo ryanchristo enabled auto-merge (squash) March 24, 2022 16:48
@ryanchristo ryanchristo merged commit fc3df53 into master Mar 24, 2022
@ryanchristo ryanchristo deleted the ryan/637-data-attest branch March 24, 2022 17:04
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.

Update data module to use attestation terminology
3 participants