-
Notifications
You must be signed in to change notification settings - Fork 879
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!(state/core_accessor): add SubmitPayForBlobWithOptions endpoint #3349
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3349 +/- ##
==========================================
- Coverage 44.83% 44.70% -0.13%
==========================================
Files 265 272 +7
Lines 14620 15283 +663
==========================================
+ Hits 6555 6833 +278
- Misses 7313 7660 +347
- Partials 752 790 +38 ☔ View full report in Codecov by Sentry. |
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.
This PR looks good to me.
Just re-iterating that the most important feature/user-request is that users can submit blobs from different accounts. No other options should be added before that particular one. Having an options struct part of the JSON-RPC further more manifests that this current API is basically driven by implementation details (this is very go idiomatic). No blocker to merge this but sth I wanted to raise.
cc @renaynay
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 - want to discuss the gasLim
option there
Should we also update ADR 9 (API ADR)?
d4115b9
to
ea485bb
Compare
7622f8f
to
4df5175
Compare
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.
Question for potential follow-up PR:
should we break SubmitPayForBlob
on the state level to not take gasLim or fee and just use defaults? And then we can make blob module use SubmitPayForBlobWithOptions
under the hood if opts are specified?
nodebuilder/testing.go
Outdated
_, _, err = kr.NewMnemonic(TestKeyringName1, keyring.English, "", "", hd.Secp256k1) | ||
require.NoError(t, err) | ||
cfg.State.KeyringKeyName = []string{TestKeyringName, TestKeyringName1} | ||
_, _, _ = state.Keyring(cfg.State, ks) |
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.
are you not going to check any return val here/
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.
Are we going to add the optional parameters to the struct in this PR as discussed above?
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
Yes, I also thought about it. |
Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
Co-authored-by: Ryan <ryan@celestia.org>
Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
afecfc9
to
49ea3a1
Compare
It sounds like there is no consensus around if we should unify SubmitPayForBlob and SubmitPayForBlobWithOptions and fold them into one method. My opinion:
|
So currently we already have two methods to submit blobs:
Not speak of the infamous This PR introduces another method:
After talking with @renaynay: If we have significant proof that users are currently using the |
Alright, the optional params PR for And, variadics also wouldn’t work - as @vgonkivs pointed out internally, we cannot send our traditional options (which are just function pointers) over the wire. Given that we want as many users as possible to use As for the state module, we also need to eventually add some sort of |
Resolves #3346