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

Consider whether VerifiableTimestamp and TimestampCommitment are both needed #102

Closed
sgreenbury opened this issue Jul 17, 2023 · 4 comments

Comments

@sgreenbury
Copy link
Collaborator

sgreenbury commented Jul 17, 2023

Qs:

  • VerifiableTimestamp looks very similar to TimestampCommitment; are both needed?
  • the verify_content method in VerifiableTimestamp verifies the expected data in the DID commitment; is this the cleanest way to do it? (at least this is validating the content, not verifying it)
  • why not have VerifiableTimestamp as a trait (without the verify_content method), which is implemented by TimestampCommitment?
  • most importantly, how do we make sure that the validate_pow_hash is called as part of the content verification procedure?

First step will be to draw a diagram of the commitments & related traits.

@thobson88 thobson88 changed the title Consider whether verifiable timestamp and timestamp are both needed Consider whether VerifiableTimestamp and TimestampCommitment are both needed Jul 17, 2023
@thobson88
Copy link
Collaborator

thobson88 commented Jul 19, 2023

UML diagram

Traits in green. Structs in orange.

DID-Verification drawio (2)

@thobson88
Copy link
Collaborator

thobson88 commented Jul 20, 2023

Done in PR #105.

VerifiableTimestamp has been turned into a trait, which is a wrapper for a pair of independent commitments, one committing to DID document content and the other to a timestamp.

The verify method in VerifiableTimestamp has a default implementation which verifies each of the two commitments against the same target hash, thereby confirming that the timestamp is immutably associated with the DID document content.

@thobson88
Copy link
Collaborator

thobson88 commented Jul 20, 2023

Updated UML diagram (after refactoring)

refactored-DID-Verification drawio

sgreenbury added a commit that referenced this issue Jul 27, 2023
…iable-timestamp

Refactor verifiable timestamp and commitments (#102)
sgreenbury added a commit that referenced this issue Aug 11, 2023
…ifier

- Type state pattern for `Verifier` with `FullClient` and `LightClient` (#101)
- Refactor of `VerifiableTimestamp` (#102)
- Filtering for block commitments and revised commitment traits with generics (#104)
@sgreenbury
Copy link
Collaborator Author

Closed with #108

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

No branches or pull requests

2 participants