-
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!: ecocredit genesis import and export #389
Conversation
Codecov Report
@@ Coverage Diff @@
## master #389 +/- ##
==========================================
- Coverage 76.96% 76.94% -0.02%
==========================================
Files 99 101 +2
Lines 12111 12520 +409
==========================================
+ Hits 9321 9634 +313
- Misses 2230 2286 +56
- Partials 560 600 +40
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
I haven't looked at the implementation yet, just some comments regarding the proto definitions
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
@aaronc could you have a final look? |
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.
Logic looks correct now.
Can we simplify this API? Won't block on it because I know this has been in progress for a while, so pre-approving. But I think we can merge tradable and retired balances and supplies.
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.
Few comments on the formatting of the Supply / Balance messages. Can you take a look at this tomorrow @aleem1314 and then I think we're good to merge!
import "regen/ecocredit/v1alpha1/types.proto"; | ||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/regen-network/regen-ledger/x/ecocredit"; |
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.
I was posting similar comment to NFT: how about putting genesis into a separate package, eg x/ecocredit/genesis
- it has different domain than RPC messages. Or even we can have two packages:
- x/ecocredit/ -- for all things related to RPC
- x/ecocredit/dal -- for all things related to storage (data access layer)
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.
I agree with this separation in principle, but don't want to block this PR on it. adding a new versioning scheme outside of the one for just modules (which is the current setup) is something that I'd like to make sure is the direction we want to go in across the SDK before doing it just on our own modules.
We will already need to be doing a version upgrade for ecocredit module proto files in regen ledger v3 as we expect the API to change possibly quite a bit. So seems fine IMO to not block the v2.0 upgrade on this question.
…into aleem/187-ecocredit-genesis
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.
Few merge conflicts now, but pending those getting fixed, I think this is good to go.
There's some stuff where we may want to add some additional validation to InitGenesis
, namely that all the CreditType
values in any given genesis credit classes actually correspond to a CreditType in the ecocredit's genesis params.
Happy to move that to a separate issue and just continue a discussion there to see what makes the most sense after this PR gets merged.
Thanks @aleem1314!
Description
Closes: #187
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