-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat(x/data)!: enable off-chain coordination of supported algorithms #2102
Conversation
…st algorithms, canonicalization, and merkle trees
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few nits and pending lint errors
Should I just use version 2 moving forward in regen-server/iri-gen, in particular in my PR: https://github.com/regen-network/regen-server/pull/423
We have no idea how long this will take to go into production so for now we need to stick with v1. |
Thinking about the long-term effects of a versioning name change like this, I'm wondering if we'd be better off with one of the following:
Conceptually I'm in favor of this general approach (not validating enums on-chain to enable for faster developing & off-chain coordination). But given that we have such little usage of the data module to date, I think we may be able to skirt around what would otherwise be the strictly correct process for API upgrades, in favor of something that's a bit cleaner for future users. |
Co-authored-by: Marie Gauthier <[email protected]>
I would be open to either approach - and I think this would greatly simply the implementation. I've checked data module events on mainnet and so far there is no usage. So until we start using it (which is soon) breakage isn't really a concern. With approach 1) we would simply stop supporting v1 I think to keep things simple. Approach 2) is maybe okay since there are no other users but it is a bit un-kosher. Don't have any really strong opinions between the two though. @blushi any thoughts? |
I think I'd rather go with approach 1) because v1 hasn't been explicitly used on mainnet but it has been in our implementation within the regen server for generating IRIs for credit classes, projects and batches metadata (and might be used for raw data IRIs depending on the timeline) so that would feel cleaner to have a proper version upgrade. |
Okay. I'll update this PR to change the proto version to v2 and drop support for v1, unless there are any objections |
…o aaronc/data-off-chain-enums # Conflicts: # proto/regen/data/v1/types.proto
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2102 +/- ##
=======================================
Coverage 73.26% 73.26%
=======================================
Files 232 232
Lines 13748 13748
=======================================
Hits 10073 10073
Misses 2941 2941
Partials 734 734
|
@clevinson @blushi I've updated this to v2 (and the go.mod to v3) and it's R4R again. The diff is much larger because of breaking changes, but the code changes are actually somewhat simpler. |
Co-authored-by: Marie Gauthier <[email protected]>
Co-authored-by: Marie Gauthier <[email protected]>
Co-authored-by: Marie Gauthier <[email protected]>
@blushi I've addressed all your comments, except that I'd prefer to keep the IRI on version 0 and updated the comments to reflect that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pre-approving, pending one test case to add
@clevinson could you take another quick look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this took so long. lgtm!
…onc/data-off-chain-enums
…k/regen-ledger into aaronc/data-off-chain-enums
Description
This PR introduces
regen.data.v2
which:This allows off-chain coordination of these values so that extensions can be made without requiring an upgrade.
regen/data/v2/types.proto
SHOULD still be used as a registry of agreed upon algorithms, but this can be done between releases without requiring chain upgrades.This PR deprecates the
regen.data.v1
proto files and bumps the x/data go module to v3.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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change