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

Dev/robin/8859 simplehash schema v3 #6

Merged
merged 7 commits into from
Jan 24, 2024

Conversation

robinbryce
Copy link
Contributor

@robinbryce robinbryce commented Jan 24, 2024

feat: v3 schema for forestrie

This new schema is required in order to ommit confirmation_status from
the hash. For simplehash assets, this field was crucial. For forestrie
it is only informative. And crucially, it changes after the event is
first added to the log STORED -> COMMITTED -> CONFIRMED -> UNEQUIVOCAL

We took the opportunity to prune other un-necessary fields:

  • asset_identity is redundant and will soon be confusing.
  • from is not relevant for forestrie (it was the custodial wallet
    address for khipu)

Note that idtimestamp is NOT added. The details of the leaf hash
construction are governed by forestrie and only change if the merkle log
format version is incremented. And the database can't store the log
values in native format anyway.

Additionally,

ci: enable code quality and unit tests on ci

Robin Bryce added 2 commits January 23, 2024 16:48
This new schema is required in order to ommit confirmation_status from
the hash. For simplehash assets, this field was crucial. For forestrie
it is only informative. And crucially, it changes after the event is
first added to the log STORED -> COMMITTED -> CONFIRMED -> UNEQUIVOCAL

We took the opportunity to prune other un-necessary fields:

* asset_identity is redundant and will soon be confusing.
* from is not relevant for forestrie (it was the custodial wallet
  address for khipu)

Note that idtimestamp is NOT added. The details of the leaf hash
construction are governed by forestrie and only change if the merkle log
format version is incremented. And the database can't store the log
values in native format anyway.

Additionally,

ci: enable code quality and unit tests on ci
@robinbryce robinbryce requested a review from honourfish January 24, 2024 07:24
simplehash/hasher.go Outdated Show resolved Hide resolved
simplehash/schemav3.go Outdated Show resolved Hide resolved
// format available to api consumers. The source event is in the grpc proto buf
// format. GRPC endpoints are not presently exposed by the platform.
//
// Options:
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@robinbryce robinbryce force-pushed the dev/robin/8859-simplehash-schema-v3 branch from 3699d2c to e40de45 Compare January 24, 2024 08:51
simplehash/schemav2.go Outdated Show resolved Hide resolved
@robinbryce robinbryce merged commit 4a38691 into main Jan 24, 2024
1 check passed
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