-
Notifications
You must be signed in to change notification settings - Fork 117
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(all): Run make generate-check #2027
Conversation
WalkthroughThe pull request introduces updates across multiple mock files, primarily focusing on changing the mockery tool version from v2.46.0 to v2.46.1. Additionally, several type parameters have been modified from Changes
Sequence Diagram(s)sequenceDiagram
participant Mockery
participant Developer
participant Codebase
Developer->>Mockery: Update mockery version to v2.46.1
Mockery-->>Codebase: Generate updated mocks
Developer->>Codebase: Review and merge changes
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2027 +/- ##
=======================================
Coverage 22.38% 22.38%
=======================================
Files 358 358
Lines 16045 16045
Branches 12 12
=======================================
Hits 3591 3591
Misses 12305 12305
Partials 149 149
|
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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (23)
- mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go (1 hunks)
- mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go (7 hunks)
- mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go (1 hunks)
- mod/node-api/backend/mocks/availability_store.mock.go (5 hunks)
- mod/node-api/backend/mocks/beacon_block_header.mock.go (13 hunks)
- mod/node-api/backend/mocks/beacon_state.mock.go (28 hunks)
- mod/node-api/backend/mocks/block_store.mock.go (6 hunks)
- mod/node-api/backend/mocks/deposit_store.mock.go (5 hunks)
- mod/node-api/backend/mocks/node.mock.go (3 hunks)
- mod/node-api/backend/mocks/state_processor.mock.go (4 hunks)
- mod/node-api/backend/mocks/storage_backend.mock.go (7 hunks)
- mod/node-api/backend/mocks/validator.mock.go (1 hunks)
- mod/node-api/backend/mocks/withdrawal.mock.go (4 hunks)
- mod/node-api/backend/mocks/withdrawal_credentials.mock.go (1 hunks)
- mod/node-core/pkg/services/registry/mocks/basic.mock.go (1 hunks)
- mod/node-core/pkg/services/registry/mocks/dispatcher.mock.go (1 hunks)
- mod/node-core/pkg/services/registry/mocks/registry_option.mock.go (1 hunks)
- mod/primitives/pkg/crypto/mocks/bls_signer.mock.go (6 hunks)
- mod/storage/pkg/interfaces/mocks/db.mock.go (1 hunks)
- mod/storage/pkg/pruner/mocks/beacon_block.mock.go (1 hunks)
- mod/storage/pkg/pruner/mocks/block_event.mock.go (1 hunks)
- mod/storage/pkg/pruner/mocks/prunable.mock.go (1 hunks)
- mod/storage/pkg/pruner/mocks/pruner.mock.go (1 hunks)
🔇 Additional comments (90)
mod/storage/pkg/pruner/mocks/beacon_block.mock.go (1)
1-1
: LGTM: Mockery version update.The change from v2.46.0 to v2.46.1 is a minor version update, which typically includes bug fixes and small improvements. This update is appropriate and helps keep the project dependencies current.
As a reminder, it's good practice to keep generated files up-to-date with the latest stable versions of the tools used to generate them. This ensures that any bug fixes or improvements in the generation process are incorporated into your project.
mod/node-core/pkg/services/registry/mocks/dispatcher.mock.go (1)
1-1
: LGTM: Mockery version update.The change updates the mockery version from v2.46.0 to v2.46.1. This is a minor version update and doesn't affect the functionality of the mock.
Let's verify if this change is consistent across other mock files in the project:
✅ Verification successful
Verified: All mock files have been updated to mockery v2.46.1 consistently across the project.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if all mock files have been updated to mockery v2.46.1 # Test: Search for mockery version in all .go files # Expect: All results should show v2.46.1 rg --type go "mockery v2\.46\." -g "**/*.mock.go"Length of output: 2469
mod/storage/pkg/pruner/mocks/prunable.mock.go (1)
1-1
: LGTM: Mockery version update.The change updates the mockery version from v2.46.0 to v2.46.1. This is a minor version update and doesn't affect the functionality of the mock.
Let's verify if this change is consistent across other mock files in the repository:
✅ Verification successful
LGTM: All mock files consistently updated to mockery v2.46.1.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if all mock files have been updated to mockery v2.46.1 # Test: Search for mockery version in all mock files rg --type go "mockery v2\." -g "*.mock.go"Length of output: 2462
mod/node-core/pkg/services/registry/mocks/registry_option.mock.go (1)
1-1
: Mockery tool version updated.The mockery tool version has been updated from v2.46.0 to v2.46.1. This is a minor version update and should not introduce any breaking changes or affect the functionality of the generated mock.
To ensure no unintended changes were introduced, let's verify the file content:
If this command returns any output, it would indicate changes other than the version update, which would require further investigation.
✅ Verification successful
Mockery tool version update verified.
The mockery tool was successfully updated from v2.46.0 to v2.46.1 without introducing any unintended changes to the file content.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that only the mockery version number has changed in the file. # Test: Check for any changes other than the version number rg -v "mockery v2.46.1" mod/node-core/pkg/services/registry/mocks/registry_option.mock.goLength of output: 2227
mod/node-api/backend/mocks/node.mock.go (5)
1-1
: LGTM: Mockery version updateThe update from mockery v2.46.0 to v2.46.1 is a good practice to keep dependencies current. This minor version update likely includes bug fixes and small improvements.
8-8
: LGTM: Type parameter update toany
The change from
interface{}
toany
for theNode
type parameter is a good modernization. It improves code readability and aligns with current Go practices for generics, without changing the underlying functionality.
12-12
: LGTM: Consistent type parameter updateThe change from
interface{}
toany
for theNode_Expecter
type parameter maintains consistency with theNode
type update. This ensures uniformity across the mock types.
49-49
: LGTM: Consistent type parameter updateThe change from
interface{}
toany
for theNode_CreateQueryContext_Call
type parameter is consistent with the updates made to other types in the file. This ensures uniformity across all mock types and methods.
Line range hint
79-83
: LGTM: Consistent type parameter update and overall improvementThe change from
interface{}
toany
for theNewNode
function signature is consistent with the updates made to other types and functions in the file. This ensures uniformity across the entire mock implementation.Overall, these changes:
- Update the mockery version to the latest minor release.
- Modernize the code by using
any
instead ofinterface{}
.- Improve code readability without altering functionality.
- Maintain consistency across all mock types and functions.
These updates align the code with current Go best practices for generics and mock implementations.
mod/node-api/backend/mocks/withdrawal.mock.go (4)
13-13
: LGTM. Improved type constraint.The change from
interface{}
toany
for the type parameter constraint is a good modernization. It improves readability without changing the functionality.
17-17
: LGTM. Consistent type constraint update.The change from
interface{}
toany
for theWithdrawal_Expecter
type parameter is consistent with the previous change. This maintains uniformity across the mock implementation.
44-44
: LGTM. Consistent type constraint update.The change from
interface{}
toany
for theWithdrawal_New_Call
type parameter maintains consistency with the previous changes. This ensures uniformity across all related types in the mock implementation.
1-1
: LGTM. Verify mockery version consistency.The update to mockery v2.46.1 is a minor version change, which is generally safe. However, it's important to ensure consistency across the project.
Run the following script to check for any inconsistencies in mockery versions:
✅ Verification successful
Mockery version is consistent across all mock files.
All mock files now use mockery v2.46.1, ensuring consistency within the project.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for inconsistencies in mockery versions across the project. # Test: Search for mockery version declarations. Expect: All files should use v2.46.1 rg --type go "mockery v2\." -g "*.go"Length of output: 2457
mod/node-api/backend/mocks/withdrawal_credentials.mock.go (1)
1-1
: LGTM: Mockery version update.The change from v2.46.0 to v2.46.1 in the mockery version is appropriate. This update keeps the mocking tool current and is unlikely to introduce any breaking changes or issues.
As a reminder, this is an auto-generated file. Any manual changes to this file will be overwritten the next time the mocks are regenerated. If modifications are needed, they should be made to the source file that this mock is based on, followed by regenerating the mock.
mod/node-core/pkg/services/registry/mocks/basic.mock.go (1)
Line range hint
2-115
: LGTM: No unintended changes detected.I've reviewed the entire file, and there are no other changes besides the version update in the header comment. The generated mock implementation follows standard practices for Go mocks and appears to be correct.
mod/storage/pkg/pruner/mocks/pruner.mock.go (1)
1-1
: LGTM: Mockery version update.The update from mockery v2.46.0 to v2.46.1 is a minor version bump, which is likely to include bug fixes or small improvements. This change is appropriate and doesn't affect the functionality of the mock.
Let's verify if this change is consistent across other mock files in the project:
✅ Verification successful
Verified: Consistent Mockery Version Update
All mock files have been updated to mockery v2.46.1, ensuring consistency across the project.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if all mock files have been updated to mockery v2.46.1 # Test: Search for mockery version declarations in mock files # Expect: All mock files should use v2.46.1 rg --type go "mockery v2\.46\.[0-9]" -g "**/mocks/*.go"Length of output: 2475
mod/node-api/backend/mocks/state_processor.mock.go (6)
1-1
: LGTM: Mockery version updateThe update to mockery v2.46.1 is a minor version bump, which is good practice for keeping dependencies up-to-date. This change aligns with the PR objective of running "make generate-check".
13-13
: Approved: Type parameter update toany
The change from
interface{}
toany
for theStateProcessor
type parameter is a good modernization of the code.any
is an alias forinterface{}
introduced in Go 1.18, offering improved readability without changing the behavior. This update aligns with current Go best practices.
17-17
: LGTM: Consistent type parameter updateThe change from
interface{}
toany
for theStateProcessor_Expecter
type parameter maintains consistency with the earlierStateProcessor
update. This ensures uniformity across the mock implementation.
56-56
: Approved: Consistent type parameter updateThe change from
interface{}
toany
for theStateProcessor_ProcessSlots_Call
type parameter maintains consistency with the earlier updates toStateProcessor
andStateProcessor_Expecter
. This ensures uniformity across all related types in the mock implementation.
86-89
: LGTM: Consistent type parameter update in NewStateProcessorThe change from
interface{}
toany
in theNewStateProcessor
function signature completes the transition to usingany
throughout the mock implementation. This update maintains consistency with all previous changes in the file, ensuring a uniform approach to type parameters.
Line range hint
1-89
: Summary: Successful modernization of mock implementationThe changes in this file consistently update type parameters from
interface{}
toany
across all relevant types and functions. This modernization improves code readability and aligns with current Go best practices without altering the functionality. The updates are consistent with the PR objective of running "make generate-check" and appear to be automatically generated changes. Overall, these modifications enhance the quality and maintainability of the mock implementation.mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go (1)
1-1
: LGTM: Mockery version update.The update from mockery v2.46.0 to v2.46.1 is a minor version bump, which is good practice for keeping dependencies up-to-date. This change doesn't affect the functionality of the mock and is approved.
To ensure consistency across the project, let's verify if this change has been applied to other mock files:
✅ Verification successful
LGTM: Mockery version updated consistently across all mock files.
All mock files have been successfully updated to mockery v2.46.1, ensuring consistency throughout the project.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if all mock files have been updated to mockery v2.46.1 # Test: Search for mockery version in all mock files rg --type go "mockery v2\.46\." $(fd -e go mock) # Explanation: This should return only v2.46.1 if all files have been updated consistently. # If any v2.46.0 or other versions are found, it indicates inconsistent updates.Length of output: 3713
mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go (1)
1-1
: LGTM: Mockery version update.The update from mockery v2.46.0 to v2.46.1 is a minor version bump, which is good practice for keeping dependencies up-to-date. This change doesn't affect the functionality of the mock.
Let's verify if this update is consistent across other mock files:
✅ Verification successful
Verification Successful: All mock files are using mockery v2.46.1.
The mockery version update is consistent across all mock files, ensuring uniformity and up-to-date dependencies.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if all mock files are using the same mockery version # Test: Search for mockery version in all .go files # Expect: All files should show v2.46.1 rg --type go "mockery v2\.\d+\.\d+" -g "**/*.mock.go"Length of output: 2473
mod/node-api/backend/mocks/availability_store.mock.go (6)
1-1
: LGTM: Mockery version updateThe update from mockery v2.46.0 to v2.46.1 is a good practice to keep dependencies current. This minor version update likely includes bug fixes or small improvements.
13-15
: LGTM: Type parameter update toany
The change from
interface{}
toany
for theAvailabilityStore
struct's type parameters is correct. This update aligns with Go 1.18+ generics syntax, improving code readability while maintaining the same functionality.
17-19
: LGTM: Consistent type parameter updateThe change from
interface{}
toany
for theAvailabilityStore_Expecter
struct's type parameters is consistent with the previous update. This maintains consistency across the mock implementation and improves overall code clarity.
44-46
: LGTM: Consistent type parameter update for IsDataAvailableThe change from
interface{}
toany
for theAvailabilityStore_IsDataAvailable_Call
struct's type parameters is consistent with the previous updates. This maintains consistency across the mock implementation for the IsDataAvailable method.
92-94
: LGTM: Consistent type parameter update for PersistThe change from
interface{}
toany
for theAvailabilityStore_Persist_Call
struct's type parameters is consistent with the previous updates. This maintains consistency across the mock implementation for the Persist method.
Line range hint
122-131
: LGTM: Consistent type parameter update for NewAvailabilityStoreThe change from
interface{}
toany
for theNewAvailabilityStore
function's type parameters is consistent with the previous updates to the structs. This ensures that the factory function for creating new mock instances uses the updated type parameters.Overall, these changes consistently update the use of
interface{}
toany
throughout the mock implementation, which aligns with Go 1.18+ generics syntax. This improves code readability and maintains consistency across the entire mock file.mod/primitives/pkg/crypto/mocks/bls_signer.mock.go (9)
1-1
: LGTM: Mockery version update.The update from v2.46.0 to v2.46.1 is a minor version change, which typically includes bug fixes or small improvements. Keeping dependencies up to date is good practice.
6-6
: LGTM: New import for crypto package.The addition of the crypto package import is necessary for the type changes made in the mock. This import correctly references a package within the same project (beacon-kit).
24-24
: LGTM: PublicKey method return type update.The return type change from
bytes.B48
tocrypto.BLSPubkey
for thePublicKey
method aligns the mock with the actual implementation, using a more specific and appropriate type. The change is consistently applied across the method definition and its internal logic.Also applies to: 31-32, 35-35
58-58
: LGTM: PublicKey expecter method updates.The return type changes to
crypto.BLSPubkey
in the PublicKey expecter methods are consistent with the main PublicKey method changes. This ensures that mock expectations are set up correctly with the new type.Also applies to: 63-63
69-69
: LGTM: Sign method return type update.The return type change from
bytes.B96
tocrypto.BLSSignature
for theSign
method aligns the mock with the actual implementation, using a more specific and appropriate type. The change is consistently applied across the method definition and its internal logic.Also applies to: 76-76, 78-78, 81-81, 84-84
114-114
: LGTM: Sign expecter method updates.The return type changes to
crypto.BLSSignature
in the Sign expecter methods are consistent with the main Sign method changes. This ensures that mock expectations are set up correctly with the new type.Also applies to: 119-119
125-125
: LGTM: VerifySignature method parameter type updates.The parameter type changes for
pubKey
tocrypto.BLSPubkey
andsignature
tocrypto.BLSSignature
in theVerifySignature
method align the mock with the actual implementation. These changes use more specific and appropriate types and are consistent with the updates made to the PublicKey and Sign methods.Also applies to: 133-133
148-150
: LGTM: VerifySignature expecter method updates.The parameter type changes and comment updates in the VerifySignature expecter methods are consistent with the main VerifySignature method changes. This ensures that mock expectations are set up correctly with the new types, and the updated comments provide accurate documentation for the method signature.
Also applies to: 155-155, 157-157, 167-167
Line range hint
1-185
: Summary: Improved type safety and alignment with actual implementation.This update to the BLSSigner mock consistently replaces custom byte types (e.g.,
bytes.B48
,bytes.B96
) with more specific types from the crypto package (e.g.,crypto.BLSPubkey
,crypto.BLSSignature
). These changes:
- Improve type safety by using more specific types.
- Better align the mock with the actual implementation.
- Are part of a larger refactoring effort to use the crypto package types.
No logical changes or new functionality has been introduced. The updates are consistent throughout the file and should make the mock more accurate and easier to use correctly.
mod/storage/pkg/interfaces/mocks/db.mock.go (1)
1-1
: LGTM! Mockery version update.The change from mockery v2.46.0 to v2.46.1 is appropriate. Keeping tools up-to-date is a good practice.
Let's verify if this change is consistent across other mock files:
✅ Verification successful
All Mockery Versions are Consistent.
Verified that all mock files are using mockery v2.46.1.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if all mock files are using the same mockery version # Test: Search for mockery version in all mock files rg --type go "mockery v2\.\d+\.\d+" -g "**/*.mock.go"Length of output: 2473
mod/node-api/backend/mocks/deposit_store.mock.go (8)
1-1
: LGTM: Mockery version updateThe update from mockery v2.46.0 to v2.46.1 is a minor version change, which typically includes bug fixes or small improvements. This change is consistent with the PR objectives of running "make generate-check".
8-10
: Approved: Type parameter update improves readabilityThe change from
interface{}
toany
in theDepositStore
struct definition is a positive update.any
is an alias forinterface{}
introduced in Go 1.18, which improves code readability without changing the behavior. This modernization aligns with current Go best practices.
12-14
: Approved: Consistent type parameter updateThe change from
interface{}
toany
in theDepositStore_Expecter
struct definition is consistent with the previous update to theDepositStore
struct. This maintains consistency throughout the mock implementation, which is a good practice.
39-41
: Approved: Consistent type parameter updateThe change from
interface{}
toany
in theDepositStore_EnqueueDeposits_Call
struct definition continues the pattern of modernizing the type system usage in the mock. This consistency across the file is commendable.
97-99
: Approved: Consistent type parameter updateThe change from
interface{}
toany
in theDepositStore_GetDepositsByIndex_Call
struct definition maintains consistency with the previous updates in the file. This consistent approach to modernizing the mock's type system usage is crucial for maintaining code quality and readability.
144-146
: Approved: Consistent type parameter updateThe change from
interface{}
toany
in theDepositStore_Prune_Call
struct definition completes the pattern of modernizing the type system usage for all struct definitions in the mock. This consistency throughout the entire file is excellent and improves overall code quality.
Line range hint
174-182
: Approved: Consistent type parameter update and summaryThe change from
interface{}
toany
in theNewDepositStore
function signature completes the modernization of the type system usage for the entire mock implementation. This consistent update throughout the file improves code readability without altering the behavior of the mock.Overall, these changes:
- Modernize the code to use Go 1.18+ type system features
- Improve code readability
- Maintain consistent type usage across the entire mock implementation
Great job on maintaining consistency and improving the code quality!
Line range hint
1-182
: Summary: Successful modernization of mock implementationThis review has covered all changes in the
deposit_store.mock.go
file. The updates consistently replaceinterface{}
withany
as type parameters throughout the mock implementation. These changes:
- Align with modern Go practices (Go 1.18+)
- Improve code readability
- Maintain consistent type usage across the entire mock
- Do not alter the behavior of the mock implementation
The changes are in line with the PR objectives of running "make generate-check" and represent a successful modernization of the mock code. No issues or concerns were identified during this review.
mod/node-api/backend/mocks/validator.mock.go (1)
1-1
: LGTM! Mockery version update.The change from v2.46.0 to v2.46.1 in the mockery version is appropriate. This minor version update likely includes bug fixes or small improvements in the mock generation process.
To ensure consistency across the project, please run the following script to check if all mock files have been updated to use the same mockery version:
This will help identify any mock files that might have been missed during the update process.
✅ Verification successful
Mockery Version Consistently Updated Across All Mock Files.
All mock files have been updated to use mockery v2.46.1, ensuring consistency throughout the project.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify mockery version consistency across mock files # Test: Search for mockery version declarations in mock files rg --type go "mockery v2\.\d+\.\d+" -g "**/mocks/*.go"Length of output: 2474
mod/node-api/backend/mocks/block_store.mock.go (7)
1-1
: LGTM: Mockery version update.The mockery version has been updated from v2.46.0 to v2.46.1. This minor version update is consistent with the PR objective and likely includes bug fixes or small improvements.
13-15
: LGTM: Type parameter update toany
.The type parameter for
BlockStore
has been updated frominterface{}
toany
. This change aligns with modern Go practices and improves code readability without altering functionality.
17-19
: LGTM: Consistent type parameter update.The type parameter for
BlockStore_Expecter
has been updated frominterface{}
toany
, maintaining consistency with theBlockStore
type update.
54-56
: LGTM: Consistent type parameter update for GetSlotByBlockRoot_Call.The type parameter for
BlockStore_GetSlotByBlockRoot_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates in this file.
110-112
: LGTM: Consistent type parameter update for GetSlotByExecutionNumber_Call.The type parameter for
BlockStore_GetSlotByExecutionNumber_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates in this file.
166-168
: LGTM: Consistent type parameter updates for GetSlotByStateRoot_Call and NewBlockStore.The type parameter for
BlockStore_GetSlotByStateRoot_Call
and theNewBlockStore
function signature have been updated frominterface{}
toany
. These changes maintain consistency with the previous updates in this file and ensure that the type parameter change is applied throughout the mock implementation.Also applies to: 195-204
Line range hint
1-204
: Summary: Consistent type parameter updates throughout the file.All changes in this file follow a consistent pattern of updating type parameters from
interface{}
toany
. These updates:
- Improve code readability
- Align with modern Go practices
- Maintain consistency across all related types and functions in the mock implementation
The changes are in line with the PR objective of running "make generate-check" and do not introduce any functional changes or potential issues.
mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go (8)
1-1
: LGTM: Mockery version update.The mockery version has been updated from v2.46.0 to v2.46.1. This minor version update is consistent with the PR objectives and likely includes bug fixes and small improvements.
13-15
: LGTM: Type parameter update toany
.The type parameter for
BuiltExecutionPayloadEnv
has been updated frominterface{}
toany
. This change improves type safety and readability, aligning with modern Go practices introduced in Go 1.18+.
17-19
: LGTM: Consistent type parameter update.The type parameter for
BuiltExecutionPayloadEnv_Expecter
has been updated frominterface{}
toany
, maintaining consistency with the previous struct and throughout the file.
46-48
: LGTM: Consistent type parameter update.The type parameter for
BuiltExecutionPayloadEnv_GetBlobsBundle_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous structs and throughout the file.
91-93
: LGTM: Consistent type parameter update.The type parameter for
BuiltExecutionPayloadEnv_GetExecutionPayload_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous structs and throughout the file.
138-140
: LGTM: Consistent type parameter update.The type parameter for
BuiltExecutionPayloadEnv_GetValue_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous structs and throughout the file.
183-185
: LGTM: Consistent type parameter updates.The type parameters for
BuiltExecutionPayloadEnv_ShouldOverrideBuilder_Call
andNewBuiltExecutionPayloadEnv
function have been updated frominterface{}
toany
. These changes maintain consistency throughout the file and ensure that the entire mock structure uses the updated type parameter.Also applies to: 211-215
Line range hint
1-221
: Summary: Mockery update and type parameter improvements.This auto-generated mock file has been updated as part of running
make generate-check
. The changes include:
- Updating the mockery version from v2.46.0 to v2.46.1.
- Replacing all occurrences of
interface{}
withany
in type parameters.These changes improve type safety and readability while maintaining consistency throughout the file. They align with modern Go practices (Go 1.18+) and the PR objectives.
mod/node-api/backend/mocks/storage_backend.mock.go (7)
1-1
: LGTM: Mockery version updateThe mockery version has been updated from v2.46.0 to v2.46.1. This minor version update is consistent with the PR objective of running "make generate-check" and likely includes bug fixes and small improvements.
12-14
: LGTM: Type parameter update toany
The type parameters for the
StorageBackend
struct have been updated frominterface{}
toany
. This change improves code readability without altering functionality, asany
is an alias forinterface{}
in Go 1.18+. The update is consistent with modern Go practices.
16-18
: LGTM: Consistent type parameter updateThe
StorageBackend_Expecter
struct has been updated to useany
instead ofinterface{}
for its type parameters, maintaining consistency with theStorageBackend
struct update. This change enhances code readability while preserving the mock's functionality.
43-45
: LGTM: Consistent type parameter update for AvailabilityStoreThe
StorageBackend_AvailabilityStore_Call
struct has been updated to useany
instead ofinterface{}
for its type parameters. This change is consistent with the updates made to other structs in the file and maintains the mock implementation's consistency for theAvailabilityStore
method.
88-90
: LGTM: Consistent type parameter update for BlockStoreThe
StorageBackend_BlockStore_Call
struct has been updated to useany
instead ofinterface{}
for its type parameters. This change aligns with the updates made to other structs in the file and ensures consistency in the mock implementation for theBlockStore
method.
133-135
: LGTM: Consistent type parameter update for DepositStoreThe
StorageBackend_DepositStore_Call
struct has been updated to useany
instead ofinterface{}
for its type parameters. This change is in line with the updates made to other structs in the file and maintains consistency in the mock implementation for theDepositStore
method.
Line range hint
207-214
: LGTM: Consistent type parameter update and overall changesThe
NewStorageBackend
function signature has been updated to useany
instead ofinterface{}
for its type parameters. This change is consistent with the updates made to all structs in the file.Overall, this file update demonstrates a systematic replacement of
interface{}
withany
for all generic type parameters. These changes improve code readability and align with modern Go practices without altering the functionality of the mock implementation. The consistency of these changes across all relevant structures and functions in the file is commendable.mod/node-api/backend/mocks/beacon_block_header.mock.go (13)
1-1
: LGTM: Mockery version updateThe mockery version has been updated from v2.46.0 to v2.46.1. This minor version update is consistent with the PR objectives and likely includes bug fixes and small improvements.
13-13
: LGTM: Updated type parameter toany
The type parameter for
BeaconBlockHeader
has been updated frominterface{}
toany
. This change improves code readability and aligns with modern Go practices without altering the behavior.
17-17
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_Expecter
has been updated frominterface{}
toany
, maintaining consistency with theBeaconBlockHeader
type update.
46-46
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_GetBodyRoot_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
93-93
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_GetParentBlockRoot_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
138-138
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_GetProposerIndex_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
183-183
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_GetSlot_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
230-230
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_GetStateRoot_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
277-277
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_HashTreeRoot_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
334-334
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_MarshalSSZ_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
379-379
: LGTM: Consistent type parameter updateThe type parameter for
BeaconBlockHeader_New_Call
has been updated frominterface{}
toany
, maintaining consistency with the previous type updates.
Line range hint
491-501
: LGTM: Consistent type parameter update in function signatureThe type parameter for the
NewBeaconBlockHeader
function has been updated frominterface{}
toany
, maintaining consistency with the previous type updates. The function body remains unchanged, ensuring that the behavior is preserved.
Line range hint
1-501
: Summary: Consistent updates improving code readabilityThis review covered all changes in the
beacon_block_header.mock.go
file. The primary modifications include:
- Updating the mockery version from v2.46.0 to v2.46.1.
- Consistently changing type parameters from
interface{}
toany
across all related types and functions.These changes improve code readability and align with modern Go practices without altering the behavior of the mock implementations. The updates are consistent and well-applied throughout the file.
mod/node-api/backend/mocks/beacon_state.mock.go (6)
1-1
: Mockery version update looks good.The update from v2.46.0 to v2.46.1 is a minor version change, which typically includes bug fixes or small improvements. Keeping dependencies up-to-date is a good practice.
9-10
: New import for crypto package is appropriate.The addition of the crypto package import is consistent with the upcoming changes in the
ValidatorIndexByPubkey
method signature. This import is necessary for using thecrypto.BLSPubkey
type.
17-17
: Type parameter updates improve code modernity.The change from
interface{}
toany
for type parameters is a positive modernization of the Go code.any
is an alias forinterface{}
introduced in Go 1.18, which simplifies generic code. This change doesn't affect functionality but improves readability and aligns with modern Go practices.Also applies to: 21-21, 60-60, 115-115, 173-173, 229-229, 284-284, 339-339, 396-396, 451-451, 506-506, 561-561, 616-616, 673-673, 729-729, 785-785, 840-840, 896-896, 951-951, 1006-1006, 1063-1063, 1108-1108, 1166-1166, 1222-1222, 1278-1278, 1334-1334, 1363-1363
1339-1339
: ValidatorIndexByPubkey mock implementation correctly updated.The mock implementation for
ValidatorIndexByPubkey
has been correctly updated to usecrypto.BLSPubkey
, which is consistent with the method signature change. This ensures that the mock behaves correctly with the new type.Also applies to: 1344-1344, 1346-1346, 1356-1356
Line range hint
1-1373
: Overall, the changes improve code quality and type safety.This update to the
beacon_state.mock.go
file includes several improvements:
- Updating the mockery version from v2.46.0 to v2.46.1.
- Modernizing the code by changing type parameters from
interface{}
toany
.- Improving type safety by updating the
ValidatorIndexByPubkey
method to usecrypto.BLSPubkey
instead ofbytes.B48
.These changes align the code with modern Go practices and enhance type safety. The modifications are consistent throughout the file and should improve the overall quality and maintainability of the codebase.
1306-1306
: ValidatorIndexByPubkey signature update improves type safety.The change from
bytes.B48
tocrypto.BLSPubkey
for theValidatorIndexByPubkey
method parameter improves type safety and clarity. This update likely reflects changes in the underlying types used for public keys in the system.To ensure this change is consistent across the codebase, please run the following command:
This will help identify any other occurrences of
bytes.B48
used for validator public keys that might need to be updated for consistency.Also applies to: 1315-1315, 1318-1318, 1324-1324
func NewWithdrawal[T any](t interface { | ||
mock.TestingT | ||
Cleanup(func()) | ||
}) *Withdrawal[T] { |
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.
🧹 Nitpick (assertive)
LGTM. Consistent update completes the modernization.
The change from interface{}
to any
in the NewWithdrawal
function signature is consistent with all previous changes. This completes the update of all generic type parameters to use any
, resulting in a more modern and readable codebase.
Consider running a project-wide search and replace to update any remaining interface{}
to any
in similar contexts, ensuring consistency across the entire codebase.
@@ -1,4 +1,4 @@ | |||
// Code generated by mockery v2.46.0. DO NOT EDIT. | |||
// Code generated by mockery v2.46.1. DO NOT EDIT. |
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.
💡 Codebase verification
Issue: Mockery version v2.46.1
is updated in generated mocks but not specified in project configuration.
While the generated mock files have been updated to use mockery version v2.46.1
, the project's configuration files do not explicitly specify this version. This oversight can lead to inconsistencies when generating mocks across different environments or during automated processes.
- Action Items:
- Specify mockery version
v2.46.1
in the project's configuration files (e.g.,go.mod
, Makefile, Dockerfile) to ensure consistency. - Verify that all development and CI/CD environments reference the specified mockery version.
- Specify mockery version
🔗 Analysis chain
LGTM: Mockery version updated.
The mockery version has been updated from v2.46.0 to v2.46.1. This is a minor version update and should not introduce any breaking changes.
To ensure consistency across the project, please verify that the mockery tool version used in the project's build process matches this update. Run the following script to check the mockery version in the project configuration:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check mockery version in project configuration
# Test: Search for mockery version in project files
rg --type yaml --type json "mockery.*v2\.46\.1" .
Length of output: 51
Script:
#!/bin/bash
# Description: Broadly search for mockery version in all relevant project files
# Test: Search for mockery version across all files
rg "mockery.*v2\.46\.1" .
Length of output: 2491
@@ -1,4 +1,4 @@ | |||
// Code generated by mockery v2.46.0. DO NOT EDIT. | |||
// Code generated by mockery v2.46.1. DO NOT EDIT. |
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.
🧹 Nitpick (assertive)
LGTM: Mockery version update.
The change updates the mockery version from v2.46.0 to v2.46.1 in the generated file header. This is a minor version update and doesn't introduce any visible changes to the generated code.
Ensure that all generated mock files are updated consistently across the project to maintain version uniformity. Consider adding a step in your CI/CD pipeline to verify the consistency of mockery versions used in generated files.
Appeased CI by running
make generate-check
. Apparentlygithub.com/vektra/mockery/v2
updated its latest versionSummary by CodeRabbit
New Features
interface{}
withany
across various mock types.BLSSigner
mock, enhancing cryptographic operations.Bug Fixes
Documentation
Refactor
any
instead ofinterface{}
for improved type flexibility.Chores