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(cmd/rpc): adding blob module to rpc cli and fixing namespace parsing #2308

Merged
merged 3 commits into from
Jun 2, 2023

Conversation

distractedm1nd
Copy link
Collaborator

@distractedm1nd distractedm1nd commented Jun 2, 2023

This PR does the following:

Adds blob module support

blob.Submit has been added with custom parsing for posting a single blob.
blob.GetAll also only takes a single namespace id for now. This will make devx easier

Adds --print-request flag

Now the request can also be displayed along with the json response. This will both help for debugging and building things that need to build the requests themselves

Fixes namespace parsing

Namespaces are now encoded correctly again. In addition, if you pass a namespace of 8 bytes, it will zero-pad and use share/nID version 0.

Fixes state.SubmitPayForBlob

Another issue was the change to an array. We now submit an array of a single blob, and changed the order of the arguments.
The order is now: fee, gasLimit, namespaceID, blob data

Adds formatted output

JQ is no longer needed to have an indented output. But colors are missing

@distractedm1nd distractedm1nd added kind:feat Attached to feature PRs area:api Related to celestia-node API labels Jun 2, 2023
@distractedm1nd distractedm1nd self-assigned this Jun 2, 2023
@distractedm1nd
Copy link
Collaborator Author

image @jcstein

Wondertan
Wondertan previously approved these changes Jun 2, 2023
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

yoLOLack

vgonkivs
vgonkivs previously approved these changes Jun 2, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2308 (d1bd92e) into main (a01d0b5) will decrease coverage by 0.28%.
The diff coverage is 48.14%.

@@            Coverage Diff             @@
##             main    #2308      +/-   ##
==========================================
- Coverage   50.89%   50.62%   -0.28%     
==========================================
  Files         150      154       +4     
  Lines        9252     9727     +475     
==========================================
+ Hits         4709     4924     +215     
- Misses       4147     4377     +230     
- Partials      396      426      +30     
Impacted Files Coverage Δ
api/gateway/availability.go 0.00% <ø> (ø)
api/gateway/header.go 0.00% <ø> (ø)
api/gateway/state.go 0.00% <0.00%> (ø)
core/testing.go 91.86% <ø> (-0.10%) ⬇️
core/testing_grpc.go 65.07% <ø> (ø)
das/daser.go 64.83% <0.00%> (ø)
das/metrics.go 9.91% <0.00%> (ø)
header/headertest/testing.go 71.92% <0.00%> (-6.98%) ⬇️
nodebuilder/module.go 85.71% <ø> (ø)
nodebuilder/p2p/bootstrap.go 6.66% <ø> (ø)
... and 37 more

... and 2 files with indirect coverage changes

cmd/celestia/rpc.go Outdated Show resolved Hide resolved
@renaynay renaynay enabled auto-merge (squash) June 2, 2023 18:20
@renaynay renaynay merged commit 1247225 into celestiaorg:main Jun 2, 2023
@renaynay renaynay deleted the blob-cli branch June 2, 2023 18:44
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 kind:feat Attached to feature PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants