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

Two versions of proof::Content serialization. #25

Closed
dpc opened this issue Dec 1, 2018 · 0 comments
Closed

Two versions of proof::Content serialization. #25

dpc opened this issue Dec 1, 2018 · 0 comments
Labels
good first issue Good for newcomers

Comments

@dpc
Copy link
Collaborator

dpc commented Dec 1, 2018

There are two, slightly different ways to serialize proofs:

  • the final one: this one gets signed and becomes a proof
  • the editing one: when interactively editing the proof, it makes sense to show/hide some fields differently / have different defaults:
    • version should not be editable by the user, but be there in the final serialization
    • comment should always be there when editing, but hidden if empty in the empty version
  • maybe others
  • there's probably no point in showing the digest and revision when editing (are we sure?)

The solution here is probably to have two versions of each struct, with different serde annotations, and some methods to conveniently convert them back and forth.

@dpc dpc added the good first issue Good for newcomers label Dec 1, 2018
@dpc dpc added this to the 0.1 - MVP milestone Dec 1, 2018
@dpc dpc closed this as completed in a55d33b Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant