-
Notifications
You must be signed in to change notification settings - Fork 297
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
chore!: migrate to new square version #3742
Conversation
|
WalkthroughWalkthroughThe changes primarily involve a significant update to the Changes
Sequence Diagram(s)sequenceDiagram
participant App as Application
participant Blob as Blob Service
participant Share as Share Service
participant User as User Interface
User->>App: Submit Transaction (Transaction Data)
App->>Blob: Unmarshal Blob Transaction
Blob-->>App: Return Blob Object or Error
App->>Share: Process Blob (if valid)
Share-->>App: Return Share Data or Error
App-->>User: Response (Success/Error)
sequenceDiagram
participant App as Application
participant Share as Share Service
participant User as User Interface
User->>App: Request Namespace
App->>Share: Create New Namespace
Share-->>App: Return Namespace Object or Error
App-->>User: Response (Success/Error)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (3)
test/util/testfactory/blob.go (3)
31-38
: FunctionGenerateBlobsWithNamespace
is not directly tested.There are no test files directly referencing
GenerateBlobsWithNamespace
. To ensure the new error handling logic is verified, please add test cases for this function.
- Add test cases for
GenerateBlobsWithNamespace
to cover the new error handling logic.Analysis chain
Improved error handling in
GenerateBlobsWithNamespace
.The changes to use
share.Blob
and handle errors ensure that the function generates valid blobs with namespaces.However, ensure that all function calls to
GenerateBlobsWithNamespace
are tested to verify the new error handling logic.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `GenerateBlobsWithNamespace` are tested. # Test: Search for the function usage. Expect: Ensure test coverage for error handling. rg --type go -A 5 $'GenerateBlobsWithNamespace'Length of output: 606
Script:
#!/bin/bash # Description: Find all occurrences of `GenerateBlobsWithNamespace` in the codebase and check if they are covered by tests. # Find all occurrences of `GenerateBlobsWithNamespace` rg --type go 'GenerateBlobsWithNamespace' > function_usages.txt # Check if these occurrences are within test files or files that are likely to contain tests rg --type go -l 'GenerateBlobsWithNamespace' | grep -E '_test\.go$' > test_files.txt # Output the results echo "Function Usages:" cat function_usages.txt echo "Test Files:" cat test_files.txtLength of output: 453
60-62
: FunctionGenerateRandomBlobOfShareCount
is not used anywhere in the codebase.The function
GenerateRandomBlobOfShareCount
is defined but not called or tested in the codebase. Ensure that this function is utilized and properly tested to verify its new logic.
- File:
test/util/testfactory/blob.go
- Function:
GenerateRandomBlobOfShareCount
Analysis chain
Updated to use
share.Blob
inGenerateRandomBlobOfShareCount
.The changes ensure that the function generates valid random blobs of a specified share count.
However, ensure that all function calls to
GenerateRandomBlobOfShareCount
are tested to verify the new logic.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `GenerateRandomBlobOfShareCount` are tested. # Test: Search for the function usage. Expect: Ensure test coverage for the new logic. rg --type go -A 5 $'GenerateRandomBlobOfShareCount'Length of output: 618
Script:
#!/bin/bash # Description: Search for all instances of `GenerateRandomBlobOfShareCount` usage in the codebase. rg 'GenerateRandomBlobOfShareCount' --type goLength of output: 236
12-16
: EnsureGenerateRandomlySizedBlobs
is tested.The function
GenerateRandomlySizedBlobs
does not appear to be covered by any tests in the codebase. It is essential to add tests to verify the new error handling logic introduced in this function.
- Add unit tests for
GenerateRandomlySizedBlobs
to cover various scenarios, including edge cases and error handling.Analysis chain
Improved error handling in
GenerateRandomlySizedBlobs
.The changes to use
share.Blob
and handle errors ensure that the function generates valid blobs.However, ensure that all function calls to
GenerateRandomlySizedBlobs
are tested to verify the new error handling logic.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `GenerateRandomlySizedBlobs` are tested. # Test: Search for the function usage. Expect: Ensure test coverage for error handling. rg --type go -A 5 $'GenerateRandomlySizedBlobs'Length of output: 463
Script:
#!/bin/bash # Search for all occurrences of the function `GenerateRandomlySizedBlobs` in the codebase. rg 'GenerateRandomlySizedBlobs' --type go --context 5Length of output: 777
Script:
#!/bin/bash # Search for all test files in the codebase and check if they contain calls to `GenerateRandomlySizedBlobs`. rg 'GenerateRandomlySizedBlobs' --type go --glob '*_test.go' --context 5Length of output: 72
Script:
#!/bin/bash # Search for all occurrences of the function `GenerateRandomlySizedBlobs` in the codebase and trace their usage. rg 'GenerateRandomlySizedBlobs' --type go --context 10Length of output: 1186
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.
Overall LGTM. A few links and comments need to be updated.
@@ -6,8 +6,7 @@ require ( | |||
cosmossdk.io/errors v1.0.1 | |||
cosmossdk.io/math v1.3.0 | |||
github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 | |||
github.com/celestiaorg/go-square v1.1.0 | |||
github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 | |||
github.com/celestiaorg/go-square/v2 v2.0.0-rc2 |
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] should we cut an official release of go-square and bump to that 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.
Once this is merged confirming that no other changes are necessary I will cut the final release
This includes the new share version for submitting a verified signer in the blob