Skip to content
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

Honor types in rippled feature command (Version: [1.12.0]) #4730

Open
pkcs8 opened this issue Sep 26, 2023 · 0 comments
Open

Honor types in rippled feature command (Version: [1.12.0]) #4730

pkcs8 opened this issue Sep 26, 2023 · 0 comments
Assignees

Comments

@pkcs8
Copy link

pkcs8 commented Sep 26, 2023

Issue Description

Until rippled-1.11.0 rippled feature command used to print a list of amendments along with the following properties:

 "93E516234E35E08CA689FA33A6D38E103881F8DCB53023F728C307AA89D515A7" : {
    "count" : 12,
    "enabled" : false,
    "name" : "XRPFees",
    "supported" : true,
    "threshold" : 28,
    "validations" : 35,
    "vetoed" : true
 },

However, since rippled-1.12.0, it marks obsolete amendments as:

 "86E83A7D2ECE3AD5FA87AB2195AE015C950469ABF0B72EAACED318F74886AE90" : {
    "count" : 0,
    "enabled" : false,
    "name" : "CryptoConditionsSuite",
    "supported" : true,
    "threshold" : 28,
    "validations" : 35,
    "vetoed" : "Obsolete"          // type error
 },

The property vetoed is boolean, therefore assigning it a value of Obsolete would break (or require special handling) in type safe languages. Its not a lot of data, so a new optional property named obsolete may be introduced, which can simply say "obsolete": true.

Steps to Reproduce

rippled feature

Expected Result

It would be great if rippled honored types so that its easy to parse the JSON without special handling.

 "86E83A7D2ECE3AD5FA87AB2195AE015C950469ABF0B72EAACED318F74886AE90" : {
    "count" : 0,
    "enabled" : false,
    "name" : "CryptoConditionsSuite",
    "supported" : true,
    "threshold" : 28,
    "validations" : 35,
    "vetoed" : true,
    "obsolete": true          // new property
 },

Actual Result

 "86E83A7D2ECE3AD5FA87AB2195AE015C950469ABF0B72EAACED318F74886AE90" : {
    "count" : 0,
    "enabled" : false,
    "name" : "CryptoConditionsSuite",
    "supported" : true,
    "threshold" : 28,
    "validations" : 35,
    "vetoed" : "Obsolete"          // type error
 },

Environment

rippled version 1.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants