-
Notifications
You must be signed in to change notification settings - Fork 197
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
Replace token pool "confirmed" state with "active" bool #1305
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1305 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 310 310
Lines 20960 20960
=========================================
Hits 20960 20960
|
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 like the name change. I do have concerns about it not being backwards compatible though.
I think #1261 will be the bigger backwards-incompatible change in the next release... so might as well rope them together while you have to migrate your token pool code anyway, right? |
Token pool states were originally given similar names to message state, but this has ended up being confusing (because the token pool creation flow includes a message, but the token pool states have no relation to the identically named message states). Old terminology: When pool definition message is "confirmed", pool is created as "pending" When pool gets "activated" by the connector, pool is moved to "confirmed" New terminology: When pool definition message is "confirmed", pool is created as "not active" When pool gets "activated" by the connector, pool is moved to "active" My hope is that the new terminology is easier to follow, since it does not overlap with messaging states and more clearly denotes the action of "activating" a token pool. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Few thoughts:
|
@peterbroadhurst I guess my comment made it seem like the state was called |
Token pool states were originally given similar names to message states, but this has ended up being confusing (because the token pool creation flow also includes a message, but the token pool states have no relation to the identically named message states).
Old terminology:
When pool definition message is "confirmed", pool is created as "pending"
When pool gets "activated" by the connector, pool is moved to "confirmed"
New proposed terminology:
When pool definition message is "confirmed", pool is created as "not active"
When pool gets "activated" by the connector, pool is moved to "active"
My hope is that the new terminology is easier to follow, since it does not overlap with messaging states and more clearly denotes the action of "activating" a token pool. Also with #1261 in the works (which means a pool may get activated first and then later be published by a broadcast message), I think it's better to separate the token pool and message terminology.
This is technically a breaking API change, although I'm not aware of any significant usefulness of the "state" field to
external applications (it's primarily an internal tracking field). The related event called "token_pool_confirmed" will
remain unchanged - it's still consistent with other definitions like datatypes, identities, etc, and I think it's still
appropriate.