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

feat: add example value for blob.GasPrice #3171

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

jcstein
Copy link
Member

@jcstein jcstein commented Feb 8, 2024

Summary

Open RPC spec generation errors, due to a missing sample value for blob.GasPrice.

Problem

Missing sample value in api/docgen/examples.go.

Logs from running on v0.13.0:

--> Generating OpenRPC spec
failed to retrieve example value for type: blob.GasPrice on parent 'blob.GasPrice')
{
    "openrpc": "1.2.6",
    "info": {
        "title": "Celestia Node API",
        "description": "The Celestia Node API is the collection of RPC methods that can be used to interact with the services provided by Celestia Data Availability Nodes.",
        "version": "v0.11.0"
    },

Output from logs running on v0.11.0, as another check to see that this worked before:

--> Generating OpenRPC spec
{
    "openrpc": "1.2.6",
    "info": {
        "title": "Celestia Node API",
        "description": "The Celestia Node API is the collection of RPC methods that can be used to interact with the services provided by Celestia Data Availability Nodes.",
        "version": "v0.11.0"
    },

Solution

Add sample value.

Output after testing

Other issues found while testing

API version is still v0.11.0, which is the same as last few releases, i just ran make openrpc-gen on v0.11.0 and the API version is the same there. This is already, addressed in #2549, and I am highlighting to bring it out from stale state.

Proposed solutions for other issues found

To avoid this in the future, i would like to see if we can work this feature request to add openrpc.json on main into celestia-node, so that there is validation before publishing specs, and a history of past versions of the openrpc.json, stored on main with releases. otherwise we JTMB the person updating node-rpc-docs on almost 10000 lines of spec code

Note, this output must not contain the output which precedes the json:
--> Generating OpenRPC spec

@github-actions github-actions bot added the external Issues created by non node team members label Feb 8, 2024
@jcstein jcstein added kind:fix Attached to bug-fixing PRs area:api Related to celestia-node API area:blob labels Feb 8, 2024
jcstein added a commit to celestiaorg/node-rpc-docs that referenced this pull request Feb 8, 2024
Copy link
Member

@vgonkivs vgonkivs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of it 🙏 🚀

@ramin ramin merged commit 257e6ce into celestiaorg:main Feb 9, 2024
24 of 28 checks passed
@jcstein
Copy link
Member Author

jcstein commented Feb 9, 2024

my pleasure, thanks for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Related to celestia-node API area:blob external Issues created by non node team members kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants