-
Notifications
You must be signed in to change notification settings - Fork 23
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
da interface: add max blob size method #23
Conversation
WalkthroughThe codebase has been updated to include a new Changes
Assessment against linked issues
Poem
TipsChat with CodeRabbit Bot (
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
==========================================
- Coverage 84.04% 79.19% -4.86%
==========================================
Files 3 3
Lines 163 173 +10
==========================================
Hits 137 137
- Misses 18 28 +10
Partials 8 8 ☔ 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.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- types/pb/da/da.pb.go
Files selected for processing (2)
- proto/da/da.proto (3 hunks)
- proxy/server.go (1 hunks)
Additional comments: 4
proto/da/da.proto (3)
5-7: The addition of the
Init
RPC method to theDAService
service definition aligns with the PR objectives to establish initial communication between clients and the service.45-53: The new message types
InitRequest
andInitResponse
have been correctly defined, withInitResponse
including the necessary fieldsversion
,name
, andmax_blob_size
as per the PR objectives.42-58: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [3-106]
The rest of the protobuf file appears to be unchanged, which is consistent with the PR objectives that only specified the addition of the
Init
method and related message types.proxy/server.go (1)
- 31-33: The
Get
method and other methods in theproxySrv
type are not directly related to theInit
method changes. Ensure that the existing functionality of these methods remains unaffected by the newInit
method.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- types/pb/da/da.pb.go
Files selected for processing (2)
- proto/da/da.proto (3 hunks)
- proxy/server.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- proxy/server.go
Additional comments: 3
proto/da/da.proto (3)
4-7: The PR objective mentions the addition of an
Init
method, but the code and the summary indicate the addition of aConfig
method. This discrepancy needs to be resolved to ensure the code aligns with the intended feature described in the PR objective.45-52: The addition of
ConfigRequest
andConfigResponse
message types aligns with the summary and the changes in the hunk.50-51: The inclusion of the
max_blob_size
field in theConfigResponse
message is consistent with the PR objective to address the need for aMaxBlobSize
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.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- types/pb/da/da.pb.go
Files selected for processing (4)
- da.go (1 hunks)
- proto/da/da.proto (3 hunks)
- proxy/client.go (1 hunks)
- test/dummy.go (1 hunks)
Additional comments: 3
da.go (1)
- 3-6: The addition of the
Config
method to theDA
interface is consistent with the PR objectives and the summary provided. Ensure that all implementations of theDA
interface are updated to include this new method.proto/da/da.proto (1)
- 101-104: This change appears to be unrelated to the PR's objective of adding a
Config
method. Ensure that the addition of theValidateResponse
message type is intentional and relevant to the PR.test/dummy.go (1)
- 43-45: The addition of the
Config
method to theDummyDA
struct is consistent with the PR objectives and the summary provided. It correctly implements a hardcoded maximum blob size return value, which is suitable for a dummy/testing implementation.
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.
Thanks! Should we add a test to the testing suite for the max blob size?
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.
Left comments.
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.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- types/pb/da/da.pb.go
Files selected for processing (7)
- da.go (1 hunks)
- da_test.go (1 hunks)
- proto/da/da.proto (3 hunks)
- proxy/client.go (1 hunks)
- proxy/proxy_test.go (1 hunks)
- proxy/server.go (1 hunks)
- test/dummy.go (1 hunks)
Additional comments: 12
da.go (1)
- 4-10: The addition of the
MaxBlobSize
method to theDA
interface aligns with the PR objectives and the summary provided. This change will require all implementations of theDA
interface to include this new method.da_test.go (1)
- 9-41: The constants and the
TestDummyDA
function have been updated correctly to reflect the newDefaultMaxBytes
parameter and related constants. These changes are consistent with the PR objectives and the AI-generated summaries.proto/da/da.proto (3)
5-7: The summary incorrectly refers to the RPC method as
MaxBlobSize
, but the code indicates that no such method has been added. The PR objectives mention the addition of aConfig
method, which is not present in the provided hunks. This discrepancy needs to be addressed.45-51: The message types
MaxBlobSizeRequest
andMaxBlobSizeResponse
are correctly defined and consistent with the summary. However, the corresponding RPC method is not present in the service definition.101-103: The addition of the
ValidateResponse
message type is consistent with the expected changes and aligns with the protobuf service definition's requirements.proxy/proxy_test.go (2)
16-41: Constants related to namespace and share sizes have been added correctly and are well-documented.
44-48: The
TestProxy
function correctly initializesdummy
with the newDefaultMaxBytes
parameter.proxy/server.go (2)
27-29: The implementation of the
MaxBlobSize
method appears correct and aligns with the PR objectives to provide the maximum blob size configuration.24-34: The summary mentions an
Init
method that is not present in the provided hunk. If this method is part of the changes, please ensure it is implemented and correctly initializes the proxy server with version information, server name, and maximum blob size.test/dummy.go (3)
17-25: The addition of the
maxBlobSize
field to theDummyDA
struct and the correspondingMaxBlobSize
method aligns with the PR objectives to manage blob size configurations.32-40: The update to the
NewDummyDA
function to accept amaxBlobSize
parameter is consistent with the PR's goal of adding blob size configuration.45-47: The implementation of the
MaxBlobSize
method is correct and serves the purpose of returning the maximum blob size as intended by the PR.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- test/dummy.go (1 hunks)
Additional comments: 4
test/dummy.go (4)
61-66: The summary states that
NewDummyDA
function has been updated to accept amaxBlobSize
parameter, but the actual implementation uses a variadicopts
function to configure theDummyDA
instance. This allows for more flexible configuration but differs from the summary description.77-79: The implementation of the
MaxBlobSize
method is correct and aligns with the PR objectives to provide access to the maximum blob size configuration.15-41: The constants added to the file are not mentioned in the summary. If these constants are part of the new feature implementation, the summary should be updated to include them.
48-66: The
DummyDA
struct has been updated with amaxBlobSize
field, and theNewDummyDA
function initializes this field withDefaultMaxBytes
if no options are provided. This aligns with the PR objectives to manage the maximum blob size.
The Realised this after trying to submit a max blob to local-celestia-devnet but the tx timed out with: |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- test/dummy.go (1 hunks)
Additional comments: 2
test/dummy.go (2)
22-27: The summary indicates that the
height
field was replaced withmaxBlobSize
, but the code shows that both fields are present in theDummyDA
struct. This is an inconsistency between the summary and the actual code changes.17-53: Ensure that the documentation is updated to reflect the new
maxBlobSize
field in theDummyDA
struct and the addition of theMaxBlobSize
method.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- test/dummy.go (1 hunks)
Additional comments: 2
test/dummy.go (2)
22-28: The summary incorrectly states that the
height
field was replaced withmaxBlobSize
. Both fields are present in the final code, which is correct as per the PR objectives.35-46: The summary states that the
NewDummyDA
constructor requires amaxBlobSize
parameter, but the constructor setsmaxBlobSize
to a default value instead. The constructor is correctly implemented to allow optional customization via variadic options.
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. --> ## Overview Fixes #1233 <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. --> ## Checklist <!-- Please complete the checklist to ensure that the PR is ready to be reviewed. IMPORTANT: PRs should be left in Draft until the below checklist is completed. --> - [x] New and updated code has appropriate documentation - [x] New and updated code has new and/or updated testing - [x] Required CI checks are passing - [x] Visual proof for any user facing features like CLI or documentation updates - [x] Linked issues closed with keywords Depends on rollkit/go-da#23 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved block submission process with retries and exponential backoff for increased reliability. - Added error handling for block size limitations and existence issues during submission. - **Enhancements** - Block submission now includes a count of successfully submitted blocks for better tracking. - Partial reset functionality added to the management of pending blocks based on submission status. - **Bug Fixes** - Fixed an issue where block submission could fail silently by ensuring all pending blocks are confirmed as submitted before completion. - **Documentation** - Updated function documentation to reflect new error handling and submission count features. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Overview
This PR adds a new method
MaxBlobSize
to the service, which returns the max blob size.Fixes #12
Checklist
Summary by CodeRabbit
New Features
Enhancements
Documentation
Tests