-
Notifications
You must be signed in to change notification settings - Fork 4k
chore: validate Duration; simulation: document transition matrix; add tests #25233
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
📝 WalkthroughWalkthroughAdds default liveness and block-size transition matrices and wires them into Params.RandomParams. Expands documentation for transition matrices and their usage. Implements protobuf Duration validation in marshalDuration, adding range and sign checks before computing total nanoseconds. Changes
Sequence Diagram(s)sequenceDiagram
actor Caller
participant Time as marshalDuration
Caller->>Time: marshalDuration(seconds, nanos)
alt Invalid range/sign
Time-->>Caller: error (range or sign violation)
else Valid
Time->>Time: compute totalNanos
Time-->>Caller: encoded duration
end
note right of Time: Validations: seconds bounds, nanos in [-999,999,999], sign consistency
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
⏰ 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). (1)
🔇 Additional comments (7)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
I’ve added unit tests for marshalDuration in x/tx/signing/aminojson/time_test.go covering:
All tests pass locally |
These seem like two separate PRs that should be their own PRs |
What
Tests