-
Notifications
You must be signed in to change notification settings - Fork 4
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(proto): update the generation path of Proto files and re-execute … #80
Conversation
…the 'make proto-gen'
WalkthroughThe recent changes involve a significant update across multiple Protocol Buffers definition files within the Lorenzo Protocol. The primary modification is the transition from version 1 to version 2 in the package paths, reflecting a broader versioning strategy. This shift may indicate enhancements or restructuring in the API, alongside cosmetic formatting improvements for consistency and readability. Overall, the updates aim to maintain compatibility while improving the codebase's organization. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Repo as Repository
participant Proto as Protocol Buffers Generator
Dev->>Repo: Push updates to .proto files
Repo->>Proto: Trigger Protocol Buffers generation
Proto->>Repo: Generate new versioned files
Repo->>Dev: Notify success of update
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 (2)
proto/lorenzo/fee/v1/query.proto (1)
8-8
: The directory for the new package path does not exist.The
go_package
option has been updated togithub.com/Lorenzo-Protocol/lorenzo/v2/x/fee/types
, but the corresponding directory structure does not exist in the project. Please ensure that the directory is created or the package path is corrected.
proto/lorenzo/fee/v1/query.proto
: Line 8Analysis chain
LGTM! Verify the new package path.
The
go_package
option has been updated to reflect version 2. Ensure that the new package path is correct and consistent with the project's structure.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the new package path. # Test: Search for the new package path. Expect: The new package path should exist in the project. rg --files | grep "github.com/Lorenzo-Protocol/lorenzo/v2/x/fee/types"Length of output: 70
Script:
#!/bin/bash # Description: Verify the existence of the new package directory structure. # Test: Check if the directory structure for the new package path exists. Expect: The directory should exist in the project. if [ -d "github.com/Lorenzo-Protocol/lorenzo/v2/x/fee/types" ]; then echo "Directory exists" else echo "Directory does not exist" fiLength of output: 122
scripts/protocgen.sh (1)
24-24
: Update thecp
command to use the correct source path.The current
cp
command inscripts/protocgen.sh
references an incorrect path. Update the command to copy files from the correct source directories underproto/lorenzo/
.
- Change
cp -r github.com/Lorenzo-Protocol/lorenzo/v*/* ./
tocp -r proto/lorenzo/v*/* ./
Analysis chain
LGTM! Verify the command.
The command has been updated to handle versioned directories. Ensure that the new command correctly copies the files from the appropriate versioned directories.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the updated command for copying protocol buffer files. # Test: Search for the copied files. Expect: The files should be copied from the versioned directories. rg --files | grep "github.com/Lorenzo-Protocol/lorenzo/v*/"Length of output: 61
Script:
#!/bin/bash # Step 1: Search for the presence of versioned directories within github.com/Lorenzo-Protocol/lorenzo/ fd -t d 'v[0-9]+' # Step 2: List the files within these versioned directories rg --files 'github.com/Lorenzo-Protocol/lorenzo/v*/' # Step 3: Verify if files are being copied to the current directory rg --files './'Length of output: 10958
Script:
#!/bin/bash # Step 1: Display the contents of scripts/protocgen.sh to confirm the exact command used for copying files. cat scripts/protocgen.sh # Step 2: List files in the proto/lorenzo/ directories to verify the presence of source files. rg --files 'proto/lorenzo/'Length of output: 2101
Script:
#!/bin/bash # List all directories under proto/lorenzo/ to verify the correct structure and source path. fd -t d 'proto/lorenzo/'Length of output: 386
Script:
#!/bin/bash # List all directories under proto/lorenzo/ using the correct fd command syntax. fd . 'proto/lorenzo/' -t dLength of output: 318
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (32)
x/agent/types/agent.pb.go
is excluded by!**/*.pb.go
x/agent/types/event.pb.go
is excluded by!**/*.pb.go
x/agent/types/genesis.pb.go
is excluded by!**/*.pb.go
x/agent/types/query.pb.go
is excluded by!**/*.pb.go
x/agent/types/tx.pb.go
is excluded by!**/*.pb.go
x/btclightclient/types/btclightclient.pb.go
is excluded by!**/*.pb.go
x/btclightclient/types/event.pb.go
is excluded by!**/*.pb.go
x/btclightclient/types/genesis.pb.go
is excluded by!**/*.pb.go
x/btclightclient/types/params.pb.go
is excluded by!**/*.pb.go
x/btclightclient/types/query.pb.go
is excluded by!**/*.pb.go
x/btclightclient/types/tx.pb.go
is excluded by!**/*.pb.go
x/btcstaking/types/event.pb.go
is excluded by!**/*.pb.go
x/btcstaking/types/genesis.pb.go
is excluded by!**/*.pb.go
x/btcstaking/types/params.pb.go
is excluded by!**/*.pb.go
x/btcstaking/types/query.pb.go
is excluded by!**/*.pb.go
x/btcstaking/types/staking_record.pb.go
is excluded by!**/*.pb.go
x/btcstaking/types/tx.pb.go
is excluded by!**/*.pb.go
x/fee/types/genesis.pb.go
is excluded by!**/*.pb.go
x/fee/types/params.pb.go
is excluded by!**/*.pb.go
x/fee/types/query.pb.go
is excluded by!**/*.pb.go
x/fee/types/tx.pb.go
is excluded by!**/*.pb.go
x/plan/types/event.pb.go
is excluded by!**/*.pb.go
x/plan/types/genesis.pb.go
is excluded by!**/*.pb.go
x/plan/types/params.pb.go
is excluded by!**/*.pb.go
x/plan/types/plan.pb.go
is excluded by!**/*.pb.go
x/plan/types/query.pb.go
is excluded by!**/*.pb.go
x/plan/types/tx.pb.go
is excluded by!**/*.pb.go
x/token/types/events.pb.go
is excluded by!**/*.pb.go
x/token/types/genesis.pb.go
is excluded by!**/*.pb.go
x/token/types/query.pb.go
is excluded by!**/*.pb.go
x/token/types/token.pb.go
is excluded by!**/*.pb.go
x/token/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (33)
- proto/lorenzo/agent/v1/agent.proto (1 hunks)
- proto/lorenzo/agent/v1/event.proto (3 hunks)
- proto/lorenzo/agent/v1/genesis.proto (1 hunks)
- proto/lorenzo/agent/v1/query.proto (1 hunks)
- proto/lorenzo/agent/v1/tx.proto (1 hunks)
- proto/lorenzo/btclightclient/v1/btclightclient.proto (2 hunks)
- proto/lorenzo/btclightclient/v1/event.proto (1 hunks)
- proto/lorenzo/btclightclient/v1/genesis.proto (1 hunks)
- proto/lorenzo/btclightclient/v1/params.proto (1 hunks)
- proto/lorenzo/btclightclient/v1/query.proto (5 hunks)
- proto/lorenzo/btclightclient/v1/tx.proto (2 hunks)
- proto/lorenzo/btcstaking/v1/event.proto (1 hunks)
- proto/lorenzo/btcstaking/v1/genesis.proto (1 hunks)
- proto/lorenzo/btcstaking/v1/params.proto (2 hunks)
- proto/lorenzo/btcstaking/v1/query.proto (1 hunks)
- proto/lorenzo/btcstaking/v1/staking_record.proto (1 hunks)
- proto/lorenzo/btcstaking/v1/tx.proto (5 hunks)
- proto/lorenzo/fee/v1/genesis.proto (1 hunks)
- proto/lorenzo/fee/v1/params.proto (1 hunks)
- proto/lorenzo/fee/v1/query.proto (1 hunks)
- proto/lorenzo/fee/v1/tx.proto (1 hunks)
- proto/lorenzo/plan/v1/event.proto (1 hunks)
- proto/lorenzo/plan/v1/genesis.proto (1 hunks)
- proto/lorenzo/plan/v1/params.proto (2 hunks)
- proto/lorenzo/plan/v1/plan.proto (1 hunks)
- proto/lorenzo/plan/v1/query.proto (4 hunks)
- proto/lorenzo/plan/v1/tx.proto (11 hunks)
- proto/lorenzo/token/v1/events.proto (2 hunks)
- proto/lorenzo/token/v1/genesis.proto (1 hunks)
- proto/lorenzo/token/v1/query.proto (3 hunks)
- proto/lorenzo/token/v1/token.proto (1 hunks)
- proto/lorenzo/token/v1/tx.proto (7 hunks)
- scripts/protocgen.sh (1 hunks)
Files skipped from review due to trivial changes (12)
- proto/lorenzo/agent/v1/event.proto
- proto/lorenzo/btclightclient/v1/genesis.proto
- proto/lorenzo/btclightclient/v1/params.proto
- proto/lorenzo/btcstaking/v1/event.proto
- proto/lorenzo/btcstaking/v1/params.proto
- proto/lorenzo/btcstaking/v1/query.proto
- proto/lorenzo/btcstaking/v1/staking_record.proto
- proto/lorenzo/plan/v1/tx.proto
- proto/lorenzo/token/v1/events.proto
- proto/lorenzo/token/v1/genesis.proto
- proto/lorenzo/token/v1/query.proto
- proto/lorenzo/token/v1/tx.proto
Additional comments not posted (32)
proto/lorenzo/plan/v1/event.proto (1)
4-4
: LGTM! The package path update is correct.The
go_package
option has been updated to reflect version 2, which aligns with the versioning strategy mentioned in the PR summary.proto/lorenzo/btcstaking/v1/genesis.proto (2)
7-7
: LGTM! The package path update is correct.The
go_package
option has been updated to reflect version 2, which aligns with the versioning strategy mentioned in the PR summary.
10-10
: LGTM! The formatting change is acceptable.The
GenesisState
message formatting has been changed to a single line. This is a cosmetic change and does not affect functionality.proto/lorenzo/fee/v1/params.proto (1)
6-6
: LGTM! The package path update is correct.The
go_package
option has been updated to reflect version 2, which aligns with the versioning strategy mentioned in the PR summary.proto/lorenzo/fee/v1/genesis.proto (1)
7-7
: Verify the usage of the updated package path in the codebase.The
go_package
option has been updated to reflect a new major version. Ensure that all references to this package in the codebase are updated accordingly.Verification successful
The
go_package
option has been updated and all references to the new package path have been correctly propagated throughout the codebase.
- Verified occurrences in multiple files:
x/fee/keeper/params.go
x/fee/keeper/keeper_test.go
x/fee/keeper/grpc_query.go
x/fee/module.go
x/fee/keeper/tx_fee_checker_test.go
x/fee/keeper/msg_server.go
x/fee/keeper/keeper.go
x/fee/genesis.go
x/fee/client/cli/query.go
app/app.go
app/modules.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to the updated package path in the codebase. # Test: Search for the old package path. Expect: No occurrences of the old package path. rg --type go 'github.com/Lorenzo-Protocol/lorenzo/x/fee/types'Length of output: 62
Script:
#!/bin/bash # Description: Verify all references to the updated package path in the codebase. # Test: Search for the new package path. Expect: Occurrences of the new package path. rg --type go 'github.com/Lorenzo-Protocol/lorenzo/v2/x/fee/types'Length of output: 926
proto/lorenzo/plan/v1/params.proto (1)
6-6
: Verify the usage of the updated package path in the codebase.The
go_package
option has been updated to reflect a new major version. Ensure that all references to this package in the codebase are updated accordingly.Verification successful
Verify the usage of the updated package path in the codebase.
The initial search did not find any occurrences of the old package path. Let's now verify that the new package path is being used correctly.
The usage of the updated package path has been verified successfully.
The new package path
github.com/Lorenzo-Protocol/lorenzo/v2/x/plan/types
is correctly referenced across the codebase, and there are no remaining references to the old package path.
x/plan/types/msg_test.go
x/plan/types/genesis_test.go
x/plan/module.go
x/plan/keeper/abci.go
x/plan/keeper/beacon.go
x/plan/keeper/yat.go
x/plan/keeper/utils.go
x/plan/keeper/yat_test.go
x/plan/keeper/stake_plan.go
x/plan/keeper/stake_plan_test.go
x/plan/keeper/plan.go
x/plan/keeper/params.go
x/plan/keeper/keeper_test.go
x/plan/keeper/msg_server_test.go
x/plan/keeper/grpc_query_test.go
x/plan/keeper/keeper.go
x/plan/keeper/msg_server.go
x/plan/keeper/genesis_test.go
x/plan/keeper/genesis.go
x/plan/keeper/grpc_query.go
x/plan/keeper/evm.go
x/plan/keeper/evm_test.go
x/plan/keeper/claims.go
x/plan/client/cli/query.go
x/plan/keeper/params_test.go
x/plan/client/cli/tx.go
app/app.go
app/upgrades/v200/upgrades.go
app/modules.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to the updated package path in the codebase. # Test: Search for the old package path. Expect: No occurrences of the old package path. rg --type go 'github.com/Lorenzo-Protocol/lorenzo/x/plan/types'Length of output: 63
Script:
#!/bin/bash # Description: Verify all references to the updated package path in the codebase. # Test: Search for the new package path. Expect: Occurrences of the new package path. rg --type go 'github.com/Lorenzo-Protocol/lorenzo/v2/x/plan/types'Length of output: 2422
proto/lorenzo/agent/v1/genesis.proto (1)
8-8
: Verify the usage of the updated package path in the codebase.The
go_package
option has been updated to reflect a new major version. Ensure that all references to this package in the codebase are updated accordingly.Verification successful
The update to the
go_package
option has been successfully propagated.The new package path (
github.com/Lorenzo-Protocol/lorenzo/v2/x/agent/types
) is correctly referenced across the codebase.
x/plan/types/expected_keepers.go
x/agent/module.go
x/agent/keeper/grpc_query.go
x/agent/keeper/msg_server_test.go
x/agent/keeper/keeper_test.go
x/agent/keeper/msg_server.go
x/agent/keeper/keeper.go
x/agent/keeper/grpc_query_test.go
x/agent/keeper/agent.go
x/agent/keeper/genesis.go
x/agent/client/cli/tx.go
x/agent/client/cli/query.go
x/agent/client/cli/flags.go
app/upgrades/v200/upgrades.go
app/modules.go
app/app.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to the updated package path in the codebase. # Test: Search for the old package path. Expect: No occurrences of the old package path. rg --type go 'github.com/Lorenzo-Protocol/lorenzo/x/agent/types'Length of output: 64
Script:
#!/bin/bash # Description: Verify all references to the updated package path in the codebase. # Test: Search for the new package path. Expect: Occurrences of the new package path. rg --type go 'github.com/Lorenzo-Protocol/lorenzo/v2/x/agent/types'Length of output: 1426
proto/lorenzo/plan/v1/plan.proto (1)
6-6
: Update package path to reflect versioning.The
go_package
option has been updated to reflect the new versioning strategy. Ensure that all dependencies and imports in the codebase are updated accordingly.proto/lorenzo/plan/v1/genesis.proto (1)
9-9
: Update package path to reflect versioning.The
go_package
option has been updated to reflect the new versioning strategy. Ensure that all dependencies and imports in the codebase are updated accordingly.proto/lorenzo/agent/v1/agent.proto (1)
4-4
: Update package path to reflect versioning.The
go_package
option has been updated to reflect the new versioning strategy. Ensure that all dependencies and imports in the codebase are updated accordingly.proto/lorenzo/token/v1/token.proto (1)
7-7
: LGTM! Verify the new package path.The
go_package
option has been updated to reflect version 2. Ensure that the new package path is correct and consistent with the project's structure.proto/lorenzo/btclightclient/v1/btclightclient.proto (3)
6-6
: LGTM! Thego_package
update is consistent with the versioning strategy.The change reflects the transition to version 2, ensuring consistency in the package path.
19-22
: LGTM! The custom type updates inBTCHeaderInfo
are consistent with the versioning strategy.The updates ensure that the custom types are aligned with the new version in their paths.
27-27
: LGTM! The reformatting ofBTCFeeRate
improves readability.The message structure remains unchanged, and the reformatting enhances consistency.
proto/lorenzo/btclightclient/v1/event.proto (1)
6-6
: LGTM! Thego_package
update is consistent with the versioning strategy.The change reflects the transition to version 2, ensuring consistency in the package path.
proto/lorenzo/fee/v1/tx.proto (1)
9-9
: LGTM! Thego_package
update is consistent with the versioning strategy.The change reflects the transition to version 2, ensuring consistency in the package path.
proto/lorenzo/agent/v1/query.proto (1)
10-10
: Update Go package path to version 2.The
go_package
path has been updated to reflect version 2. Ensure that all dependent codebases are updated to use the new package path.proto/lorenzo/btclightclient/v1/tx.proto (2)
9-9
: Update Go package path to version 2.The
go_package
path has been updated to reflect version 2. Ensure that all dependent codebases are updated to use the new package path.
32-32
: Update custom type reference to version 2.The custom type reference for
BTCHeaderBytes
has been updated to reflect version 2. Ensure that all dependent codebases are updated to use the new type reference.proto/lorenzo/agent/v1/tx.proto (1)
7-7
: Update Go package path to version 2.The
go_package
path has been updated to reflect version 2. Ensure that all dependent codebases are updated to use the new package path.proto/lorenzo/plan/v1/query.proto (6)
10-10
: LGTM!The
go_package
option has been updated correctly to reflect the new versioning structure.
31-34
: LGTM!The reformatting of the
rpc ClaimLeafNode
method's return statement improves readability without affecting functionality.
54-54
: LGTM!The whitespace adjustments around the
nullable
option in theQueryPlansResponse
message enhance clarity without affecting logic.
65-65
: LGTM!The whitespace adjustments around the
nullable
option in theQueryPlanResponse
message enhance clarity without affecting logic.
73-76
: LGTM!The whitespace adjustments around the
customtype
andnullable
options in theQueryClaimLeafNodeRequest
message enhance clarity without affecting logic.
83-83
: LGTM!The reformatting of the
QueryClaimLeafNodeResponse
message improves readability without affecting functionality.proto/lorenzo/btcstaking/v1/tx.proto (3)
10-10
: LGTM!The
go_package
option has been updated correctly to reflect the new versioning structure.
32-32
: LGTM!The
customtype
reference in theTransactionKey
message has been updated correctly to reflect the new versioning structure.
66-69
: LGTM!The whitespace adjustments around the
customtype
andnullable
options in theMsgBurnRequest
message enhance clarity without affecting logic.proto/lorenzo/btclightclient/v1/query.proto (3)
10-10
: LGTM!The
go_package
option has been updated correctly to reflect the new versioning structure.
84-84
: LGTM!The
customtype
reference in theQueryHashesResponse
message has been updated correctly to reflect the new versioning structure.
93-93
: LGTM!The
customtype
reference in theQueryContainsRequest
message has been updated correctly to reflect the new versioning structure.
…the 'make proto-gen'
Summary by CodeRabbit
New Features
Bug Fixes
Chores