chore: audit epoch#24610
Conversation
Ironbird - launch a networkTo use Ironbird, you can use the following commands:
Custom Load Test ConfigurationYou can provide a custom load test configuration using the `--load-test-config=` flag:Use |
📝 WalkthroughWalkthroughThe changes update the epochs module to use direct calls to obtain the current block time and height, replacing previous usage of the block header object. Logic related to epoch start timing and block height assignment is adjusted to prevent premature setting of epoch start height. Tests are updated to reflect the new logic, specifically the expected start height in certain cases. Additionally, a redundant constant is removed from the genesis types, and comments are corrected to accurately describe function behavior. No changes are made to the signatures of exported functions, except for the removal of an unused constant. Changes
Sequence Diagram(s)sequenceDiagram
participant BlockContext
participant EpochKeeper
BlockContext->>EpochKeeper: Get current block time and height
EpochKeeper->>EpochKeeper: Check if epoch start time is after block time
EpochKeeper->>EpochKeeper: If not, set CurrentEpochStartHeight
EpochKeeper->>EpochKeeper: If block time before epoch start, prevent premature start
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (1)x/epochs/keeper/epoch.go (2)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (10)
✨ 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:
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 (
|
(cherry picked from commit 1732077)
|
@Mergifyio backport release/v0.53.x |
✅ Backports have been createdDetails
|
addresses OS-CDK-ADV-01
Summary by CodeRabbit