Replace GasPrice with SubmitOptions in rust code example#1730
Replace GasPrice with SubmitOptions in rust code example#1730jcstein merged 1 commit intocelestiaorg:mainfrom
Conversation
WalkthroughThe pull request introduces a change in the Rust client tutorial for the Celestia RPC library. It updates the method for submitting blobs by replacing the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
developers/rust-client-tutorial.md (2)
54-54: LGTM: Method call updated correctly. Consider updating the comment.The
blob_submitmethod call has been correctly updated to useSubmitOptions::default()instead ofGasPrice::default(). This change aligns with the PR objective and maintains the simplicity of the example by using default options.Consider updating the comment above this line (around line 51-52) to reflect the change from
GasPricetoSubmitOptions. For example:- // You can set `GasPrice::default()` as the gas price to have celestia-node automatically determine an appropriate gas price. + // You can use `SubmitOptions::default()` to have celestia-node use default submission options, including gas price.This will help maintain consistency between the code and its documentation.
Line range hint
1-24: Consider updating the "Project setup" section for clarity.While the main changes have been implemented correctly, it might be beneficial to update the "Project setup" section to provide more context about the specific types being used in the tutorial.
Consider adding a brief note about
SubmitOptionsin the "Project setup" section. For example, you could add:To use the following methods, you will need the node URL and your auth token. To get your auth token, see this [guide](./node-tutorial.md#auth-token). To run your node without an auth token, you can use the `--rpc.skip-auth` flag when starting your node. This allows you to pass an empty string as your auth token. The default URL is `http://localhost:26658`. If you would like to use subscription methods, such as `SubmitOptions` below, you must use the `ws` protocol in place of `http`: `ws://localhost:26658`.This addition would provide users with a better understanding of the types they'll be working with in the tutorial.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- developers/rust-client-tutorial.md (2 hunks)
🔇 Additional comments not posted (2)
developers/rust-client-tutorial.md (2)
39-39: LGTM: Import statement updated correctly.The import statement has been correctly updated to use
SubmitOptionsfrom theblobmodule instead ofGasPrice. This change aligns with the PR objective and is necessary for the subsequent code modifications.
Line range hint
1-154: Summary: Successfully updated tutorial to use SubmitOptionsThe changes in this PR successfully replace the usage of
GasPricewithSubmitOptionsin the Rust client library tutorial. The modifications are minimal and focused, maintaining the clarity and conciseness of the tutorial.Key points:
- The import statement has been correctly updated.
- The
blob_submitmethod call now usesSubmitOptions::default().- The core functionality of the tutorial remains intact.
These changes ensure that the tutorial remains up-to-date with the latest API changes in the Celestia RPC library.
To further enhance the tutorial, consider implementing the minor suggestions provided in the previous comments:
- Update the comment above the
blob_submitmethod call to reflect the change toSubmitOptions.- Add a brief note about
SubmitOptionsin the "Project setup" section for better context.These small improvements will help maintain consistency between the code and its documentation, providing a smoother learning experience for users of the tutorial.
|
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2024 Celestia Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |

Fixing some deprecated references in the rust sample code
Summary by CodeRabbit