-
Notifications
You must be signed in to change notification settings - Fork 116
feat: track cdk version in keysets #1556
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
base: main
Are you sure you want to change the base?
Conversation
2e2c75b to
157a708
Compare
thesimplekid
left a comment
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.
Do you think we need to write more then just the version number but also that its cdk? I am think about a case we we migration a nutshell mint, we would want to know what ones are nutshell vs cdk and with just the version we could not tell this?
|
@thesimplekid how do you suggest doing this? |
| @@ -368,3 +435,112 @@ pub struct FeeReserve { | |||
| /// Percentage expected fee | |||
| pub percent_fee_reserve: f32, | |||
| } | |||
|
|
|||
| /// CDK Version | |||
| #[derive(Debug, Clone, Hash, PartialEq, Eq)] | |||
| pub struct CdkVersion { | |||
| /// Implementation name (e.g., "cdk", "nutshell") | |||
| pub implementation: String, | |||
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.
Can we move these above the test mod? The test mod should be last in the file.
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.
Can we include these tests in the test mod of crates/cdk-common/src/common.rs where the CdkVersion is defined, we shouldn't need a separate mod here.
| Keys keys = 5; | ||
| optional uint64 final_expiry = 6; | ||
| uint64 version = 7; | ||
| optional string cdk_version = 8; |
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 think this should just be version? In theory this should be general for all signatory though the spec is not merged. @lescuer97
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.
just "version" would be confusing.
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.
Yeah true, software version? I'm not sure just something not cdk specefic I think.
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.
how version is used right now is to specify the order of the keysets.
mint_version is probably fine.
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.
issuer would be a good name here
cdk_versioncolumn tokeysettable (Postgres/SQLite).env!("CARGO_PKG_VERSION")on keyset generation.closes: #1552