-
Notifications
You must be signed in to change notification settings - Fork 255
fix(cmd/testnetify): use gen doc provider from cosmos sdk #2017
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
WalkthroughSwaps direct genesis-file reading and tmhash-based hashing for a server-provided genesis document provider that supplies a Sha256Checksum; writes that checksum to state. Also updates a cosmos-sdk replacement version in go.mod. Changes
Sequence DiagramsequenceDiagram
participant CLI as testnetify CLI
participant Provider as sdksrv.GetGenDocProvider
participant GenDoc as GenesisDoc
participant DB as State DB
rect rgb(235, 250, 235)
Note over CLI,Provider: Provider-backed checksum flow
CLI->>Provider: genDocProvider := GetGenDocProvider(config)
CLI->>Provider: genDoc := genDocProvider()
Provider->>GenDoc: load/build genesis doc
GenDoc-->>Provider: return genDoc (includes Sha256Checksum)
Provider-->>CLI: genDoc returned
CLI->>DB: write genDoc.Sha256Checksum -> GenesisDocHashKey
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (8)
🔇 Additional comments (2)
Comment |
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: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (2)
cmd/akash/cmd/testnetify/testnetify.go(2 hunks)go.mod(1 hunks)
🧰 Additional context used
🪛 golangci-lint (2.5.0)
cmd/akash/cmd/testnetify/testnetify.go
[error] 305-305: : # pkg.akt.dev/node/cmd/akash/cmd/testnetify
cmd/akash/cmd/testnetify/testnetify.go:305:27: undefined: sdksrv.GetGenDocProvider
(typecheck)
⏰ 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). (8)
- GitHub Check: network-upgrade
- GitHub Check: build-bins
- GitHub Check: tests
- GitHub Check: release-dry-run
- GitHub Check: build-macos
- GitHub Check: lint-go
- GitHub Check: coverage
- GitHub Check: sims
🔇 Additional comments (1)
cmd/akash/cmd/testnetify/testnetify.go (1)
327-335: Verify external dependency implementations for Sha256Checksum population and algorithm equivalence.The code correctly accesses
genDoc.Sha256Checksumand uses it as[]byte(confirmed byhex.EncodeToString()usage). However, verification of the external cosmos-sdk and pkg.akt.dev/node implementations is required:
- Confirm
sdksrv.GetGenDocProvider()populatesSha256Checksumcorrectly in cosmos-sdk v0.53.4-akash.b.8- Verify the checksum algorithm in the genesis document provider matches the previous
tmhash.Sum()implementation- Ensure the field type on the returned genesis document object is
[]byteas expected
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.md