-
Notifications
You must be signed in to change notification settings - Fork 258
fix(x/market): initialize reverse indicies during genesis import #1992
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
Conversation
WalkthroughThe changes extend the import/export test in Changes
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
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: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/sim_test.go(2 hunks)x/market/genesis.go(1 hunks)
🧰 Additional context used
🪛 golangci-lint (1.64.8)
x/market/genesis.go
54-54: SA5009: Printf format %s has arg #1 of wrong type func() github.com/akash-network/akash-api/go/node/market/v1beta4.BidID
(staticcheck)
57-57: SA5009: Printf format %s has arg #1 of wrong type func() github.com/akash-network/akash-api/go/node/market/v1beta4.BidID
(staticcheck)
70-70: SA5009: Printf format %s has arg #1 of wrong type func() github.com/akash-network/akash-api/go/node/market/v1beta4.LeaseID
(staticcheck)
74-74: SA5009: Printf format %s has arg #1 of wrong type func() github.com/akash-network/akash-api/go/node/market/v1beta4.LeaseID
(staticcheck)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: coverage
- GitHub Check: sims
- GitHub Check: release-dry-run
- GitHub Check: lint
- GitHub Check: tests
- GitHub Check: build-bins
- GitHub Check: build-macos
🔇 Additional comments (8)
x/market/genesis.go (6)
51-51: LGTM! Reverse key generation added correctly.The addition of reverse key generation for bids is properly implemented and aligns with the PR objective of initializing reverse indices during genesis import.
56-58: Good addition of reverse key existence check.The reverse key existence check prevents duplicate key conflicts during genesis initialization, which is essential for data integrity.
60-62: Excellent implementation of dual key storage.The marshaling of data once and storing it in both forward and reverse keys is efficient and maintains consistency between the two storage locations.
67-67: LGTM! Reverse key generation added correctly for leases.The reverse key generation for leases follows the same pattern as bids and is properly implemented.
73-75: Good addition of reverse key existence check for leases.The reverse key existence check for leases maintains consistency with the bid handling logic.
77-79: Excellent dual key storage implementation for leases.The marshaling and storage pattern for leases matches the bid implementation, ensuring consistency across the codebase.
app/sim_test.go (2)
10-15: LGTM! Necessary imports added for module type references.The imports are correctly added for all the Akash module types that are referenced in the store key comparisons below.
190-219: Excellent extension of import/export testing coverage.The addition of store key comparisons for audit, cert, deployment, market, provider, and take modules ensures comprehensive state verification during import/export operations. This is particularly important for validating the new reverse key storage implemented in the market module.
The implementation follows the established pattern correctly, using
app.GetKey()andnewApp.GetKey()with empty prefix slices.
Signed-off-by: Artur Troian <[email protected]>
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.mdSummary by CodeRabbit
Tests
Bug Fixes