-
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
refactor(ecocredit): update genesis import & export to use v1 api #977
Conversation
If we need to check invariants in validation, we should just import to an in memory orm db and run the invariants. Does that make sense? |
…m/regen-network/regen-ledger into aleem/ecocredit-genesis-migration
Codecov Report
@@ Coverage Diff @@
## master #977 +/- ##
===========================================
- Coverage 60.14% 49.24% -10.91%
===========================================
Files 221 221
Lines 23493 23334 -159
===========================================
- Hits 14130 11490 -2640
- Misses 8043 10595 +2552
+ Partials 1320 1249 -71
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.
this is great work 👏🏻 just a few comments/suggestions
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.
This is looking great. Very nice work. A few questions and comments.
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
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.
didnt catch these in my last review, but should be good to go after this
"address":"gydQIvR2RUi0N1RJnmgOLVSkcd4=", | ||
"batch_id":"1", | ||
"tradable":"90.003", | ||
"retired":"9.997" |
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.
we could add escrowed balance here as a test case
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 like this might have been overlooked. We should include a test case with a positive escrowed amount.
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.
It also looks like you are missing a BatchBalance
validation.
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.
Also CreditType
and BatchSupply
validation.
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 like this might have been overlooked. We should include a test case with a positive escrowed amount.
Also
CreditType
andBatchSupply
validation.
Added validation for CreditType
. Batch balance & supply validation is already covered by ValidateGenesis
.
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.
Looking good. One minor suggestion, message field validation as you proposed, and changes to include escrowed.
…m/regen-network/regen-ledger into aleem/ecocredit-genesis-migration
…into aleem/ecocredit-genesis-migration
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.
Updates look great. The proto message validation is a nice add. A few more comments.
"address":"gydQIvR2RUi0N1RJnmgOLVSkcd4=", | ||
"batch_id":"1", | ||
"tradable":"90.003", | ||
"retired":"9.997" |
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 like this might have been overlooked. We should include a test case with a positive escrowed amount.
"address":"gydQIvR2RUi0N1RJnmgOLVSkcd4=", | ||
"batch_id":"1", | ||
"tradable":"90.003", | ||
"retired":"9.997" |
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.
It also looks like you are missing a BatchBalance
validation.
"address":"gydQIvR2RUi0N1RJnmgOLVSkcd4=", | ||
"batch_id":"1", | ||
"tradable":"90.003", | ||
"retired":"9.997" |
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.
Also CreditType
and BatchSupply
validation.
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
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.
This looks great. Very nice work.
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
Description
Closes: #976
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