-
Notifications
You must be signed in to change notification settings - Fork 421
cleanup golang-client-tutorial and other docs #2011
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
Conversation
Caution Review failedThe pull request is closed. WalkthroughThis update modifies the Golang client tutorial to replace its dependency on Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Golang Client
participant Celestia Node (via celestia-node/go-square)
User->>Golang Client: Run tutorial code (e.g., SubmitBlob)
Golang Client->>Celestia Node (via celestia-node/go-square): Submit blob / Subscribe / GetEDS
Celestia Node (via celestia-node/go-square)-->>Golang Client: Response (blob status, subscription, EDS)
Golang Client-->>User: Output result (success, error, data)
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (3)
tutorials/golang-client-tutorial.md (3)
45-47
: 🛠️ Refactor suggestionDocumentation mismatch: namespace creation API changed
The bullet list above still referencesshare.NewBlobNamespaceV0
, but the code usesshare.NewV0Namespace
. Please update the tutorial text to reflect the new function name.
113-117
:⚠️ Potential issueCritical: outdated namespace constructor in subscription example
The subscription example still callsshare.NewBlobNamespaceV0
, which no longer exists ingo-square/v2
. It should be updated to:- namespace, err := share.NewBlobNamespaceV0([]byte{0xDE, 0xAD, 0xBE, 0xEF}) + namespace, err := share.NewV0Namespace([]byte{0xDE, 0xAD, 0xBE, 0xEF})
183-193
: 🛠️ Refactor suggestionUpdate EDS tutorial text to match new API
The prose states “This method takes a header,” but the code now callsclient.Share.GetEDS(ctx, height)
directly. Please adjust the doc comment to reflect that the function uses aheight
parameter instead of a header.
🧹 Nitpick comments (2)
tutorials/golang-client-tutorial.md (2)
52-60
: Group imports for idiomatic Go
Consider adding a blank line between standard-library imports (bytes
,context
,fmt
) and third-party imports for clarity. E.g.:-import ( - "bytes" - "context" - "fmt" - client "github.com/celestiaorg/celestia-node/api/rpc/client" - "github.com/celestiaorg/celestia-node/blob" - share "github.com/celestiaorg/go-square/v2/share" -) +import ( + "bytes" + "context" + "fmt" + + client "github.com/celestiaorg/celestia-node/api/rpc/client" + "github.com/celestiaorg/celestia-node/blob" + share "github.com/celestiaorg/go-square/v2/share" +)
82-87
: SimplifiedSubmit
call: passnil
for default options
The example usesnil
instead ofblob.NewSubmitOptions()
. It may help to note in the prose that passingnil
triggers default gas-price behavior, so readers aren’t confused.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
tutorials/golang-client-tutorial.md
(6 hunks)tutorials/prompt-scavenger.md
(0 hunks)
💤 Files with no reviewable changes (1)
- tutorials/prompt-scavenger.md
🧰 Additional context used
🪛 LanguageTool
tutorials/golang-client-tutorial.md
[style] ~31-~31: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tutorials/node-tutorial.md#auth-token). To run your node without an auth token, yo...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🔇 Additional comments (4)
tutorials/golang-client-tutorial.md (4)
11-16
: Dependency installation instructions look correct
The tutorial now instructs users togo get
the newcelestia-node
andgo-square
modules with explicit versions. These commands are valid for adding module dependencies.
18-28
: Replace directives updated appropriately
Thereplace
block ingo.mod
aligns with the new Celestia forks and versions. No issues spotted.
70-74
: Namespace creation usage is correct
The code now properly callsshare.NewV0Namespace
. This matches the updatedgo-square
API.
119-123
:Subscribe
signature updated correctly
Passingnamespace
toclient.Blob.Subscribe(ctx, namespace)
aligns with the new method signature.
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.
LGTM and thank you
using an example main.go that i'll add to this PR
|
Summary by CodeRabbit