-
Notifications
You must be signed in to change notification settings - Fork 176
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
fix(disperser-client): RetrieveBlob grpc max size regression bug #849
fix(disperser-client): RetrieveBlob grpc max size regression bug #849
Conversation
api/clients/disperser_client.go
Outdated
@@ -38,7 +46,7 @@ func NewConfig(hostname, port string, timeout time.Duration, useSecureGrpcFlag b | |||
} | |||
} | |||
|
|||
type DisperserClient interface { | |||
type IDisperserClient interface { |
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 don't think we use this convention, this looks solidity
what do you think @ian-shim
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 know, I don't like it either, but we already use this for eigenda_client, so I just followed the convention there.
Was forced to make the disperserClient
struct public for the tests, so had to find another name for the interface. More golangy might be DisperserClienter
. Honestly I think defining the interface here is code smell and should eventually all be refactored. Interfaces should be defined case-by-case at the call sites.
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.
Ok, saw it. we used IEigenDAClient.
Looks fine to 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.
Was forced to make the disperserClient struct public for the tests
Don't see any place that uses it. We couldn't use the constructor in the test?
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.
Ah, you're right. Originally was trying to put the tests in the same package so I can build the struct manually injecting the connection to test something. But then realized I can just add the config parameter.
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.
So hmmm... could revert to the old names. But somehow I feel like our clients should follow the same convention.
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.
api/clients/disperser_client.go
Outdated
BlobIndex: blobIndex, | ||
}) | ||
if c.config.MaxRetrieveBlobSizeBytes == 0 { | ||
// max blob size on mainnet is currently 16MiB but we set this to 100MiB for backward compatibility |
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.
@samlaf are you planning to update this comment every time the disperser's MAX_BLOB_SIZE
config is changed? I would rephrase this to set to 100MiB for forward compatibility. check official documentation for current max blob size on mainnet
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.
Good call: a07336c
api/clients/disperser_client.go
Outdated
// but all other methods use the default 4MiB max message size, whereas RetrieveBlob | ||
// potentially needs a larger size. | ||
// | ||
// If not set, the default value is 100MiB, to be backward compatible. |
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.
forward compatible
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.
It's actually backward compatible. The code before my previous PR (that caused the regression) had a default 100MiB.
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.
Ah just saw your previous comment, I see what you mean now! Good point
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.
a07336c
to
76bed5f
Compare
…t value to constructor
lgtm, but address Ian's comment |
…lient(struct)/DisperserClient(interface) to prevetn breaking change
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, left one more comment!
api/clients/disperser_client.go
Outdated
@@ -91,6 +103,14 @@ var _ DisperserClient = &disperserClient{} | |||
// // Subsequent calls will use the existing connection | |||
// status2, requestId2, err := client.DisperseBlob(ctx, otherData, otherQuorums) | |||
func NewDisperserClient(config *Config, signer core.BlobRequestSigner) *disperserClient { | |||
if config == nil { | |||
config = &Config{} |
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.
should it return error if config is nil?
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.
yep good call: f2100c8
Just merged Layr-Labs/eigenda#849 which will fix our ci bug
* fix(e2e tests): missing new eigenda-client required config fields - ethrpc and svcmanageraddr * Revert "ci: give holesky-test workflow access to secrets via pull_request_target (#153)" This reverts commit 15b10fd. The commit was doing things very wrong. I hadn't understood how pull_request_target works. Was causing the workflow to run against main branch head commit instead of PR commit. We will need to find another solution to the problem of letting external contributors run this workflow. * ide: update vscode settings.json with env vars to run holesky testnet e2e tests * docs: shorten svcManagerAddr holesky testnet comment * tests: add panic when both INTEGRATION and TESTNET env vars are set This forces test runner to be fully aware of which test suite he is running (otherwise it implicitly runs the TESTNET suite) * style: make handleGetShared returned error print hex encoded commitment Previously it was printing as byte array, which is unreadable and clutters logs * docs: better comments in metrics middleware * deps: upgrade eigenda dep to regression fix commit TODO: will need to update this after that PR is merged * deps: update eigenda dependency to master head Just merged Layr-Labs/eigenda#849 which will fix our ci bug
A previous commit 6894828 (#826) caused regression by forgetting to set grpc max msg size in retrieveBlob call
Caught by integration test from eigenda-proxy: https://github.com/Layr-Labs/eigenda-proxy/actions/runs/11584563970/job/32251942842?pr=196
Added unit-test here to catch any future regression on this feature. Also made that connection size a parameter of the disperser-client (keeps the default 100MiB that was previously set).
Why are these changes needed?
Checks