-
Notifications
You must be signed in to change notification settings - Fork 925
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
improvement!(blob/service): add options to submit #2630
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2630 +/- ##
==========================================
- Coverage 51.05% 50.87% -0.19%
==========================================
Files 158 159 +1
Lines 10551 10614 +63
==========================================
+ Hits 5387 5400 +13
- Misses 4690 4736 +46
- Partials 474 478 +4
|
After a discussion with @distractedm1nd, we figured out that the Option param won't work on the RPC because 'Option' is a typedef on a |
One more idea came to my mind: we can rework blob.Submit by getting new type blob.Batch. type Batch struct {
Blob []*Blob
Fee int64
GasLimit uint64
}
func NewBatch(blobs *[]Blob) *Batch {
return &Batch {
Blob: blobs,
Fee: -1,
}
type func(*Batch) Option
func WithFee(int64) Option {}
func WithGasLimit(uint64) Option {}
}
func(s *service)Submit(ctx context.Contex, blobs *Batch){} |
Anyway we are going to make breaking changes but the second approach looks better to me as we will still have a single endpoint for the Submit |
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.
@vgonkivs please don't break the method yet - let's just extend it by adding the additional SubmitWithOptions and have a struct called SubmissionOptions
or just Options
that contains fee and gas limit as field
i think the concept of batch is unnecessarily confusing
ok |
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.
i like this and changes are good. I'll defer to @renaynay and @Wondertan on if they approve/deny the breaking change to Submit RPC but the things i suggested ==
5443b99
to
3c8f6a3
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.
Fine w me
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.
Please make an issue to fix variadics and gtg
Overview
Allows to configure fee and gasPrice in blob.Submit.
Closes #2629
Will update blob's rpc in a follow-up PR.
Checklist
FYI @jcstein , @nashqueue