-
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
Add a prefix to ecocredit denominations & switch to colon separator #392
Comments
So in Regen Slack @aaronc proposed the following:
We're unclear if we'll decide about projects and programs before v2.0, but we could at least implement type-class-dates-batch, with what we currently have. This would put in place some of the generation and parsing code for these serial numbers, making it fairly easy to add programs, projects or other entities when we're ready. I'd also propose we keep the
@aaronc @clevinson any thoughts about doing this for v2.0? |
In the Regen Ledger WG call we decided to do this as |
So, a few things come up while implementing this.
Right now these are Base58-encoded strings of the sequence number of the class. So the batch would have this serial number like thing, but the class would have something like
I think it might be better to have a sequence number per class, so we get incrementing batch ids in the class, rather than them incrementing together. We could even take this further and have a sequence number for each credit type, which means we can support more denominations over all. So you'd have e.g.
We're using In the |
Yes 👍
Not sure I understand 🤔
I was thinking in |
So right now there's a single sequence number in the ecocredit module called I'd propose that we have one sequence number for classes, and then a sequence number per-class for it's batches. So then we can identify e.g. batches 1 and 2 of the 100th class. As
Yeah, could do it like that, although |
@clevinson and I just discussed a little and thought something like:
with a space might work well. Could then do multiple args with commas, or just as multiple string arguments. |
That all makes sense to me 👍 |
* feat: Add prefix and use colon separator in batch denoms (#392) * Update class ID format and add space in CLI credit parsing * Add sequence numbers for every credit class * Use credit type abbreviations in batch denoms * Add sequence numbers per credit type * Address review comments * Update tests after merge and add to CHANGELOG * Add tests for invalid class IDs and batch denoms Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Right now ecocredit class IDs are alphanumeric, e.g.
18AV53K
, and batch denominations are class id, followed by a slash, followed by the batch id, e.g.18AV53K/1b1vrHF
.This makes it slightly tricky to parse values on the command line of the form
<amount><denomination>
, so we have had to add a:
character to aid parsing. @aaronc has proposed adding aeco:
prefix to the denominations to make it easier to parse and, additionally, to make it easier to integrate withx/bank
.Also, for IID/DID compatibility we want to switch from
:
to/
separators, i.e.18AV53K:1b1vrHF
.The text was updated successfully, but these errors were encountered: