You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of epoch boundaries calculation could be improved to ensure correctness and maintainability. Instead of hardcoding or using derived constants, we should leverage protocol parameters like epochLength, slotLength, and Gov Action Validity. By relying on these parameters, we can ensure that epoch boundary calculations remain accurate even when protocol configurations change, reducing the need for future code adjustments.
Proposal
Refactor the codebase to calculate epoch boundaries dynamically using the following protocol parameters:
epochLength: Defines the number of slots in an epoch.
slotLength: Specifies the duration of a single slot.
Gov Action Validity: Ensures that governance action periods are properly aligned with epoch boundaries.
Remove any hardcoded values related to epoch calculations to reduce technical debt and potential bugs.
Add appropriate tests to validate the correctness of the new dynamic calculation approach under various scenarios.
Benefits
Reduces the risk of inaccuracies when protocol parameters are updated.
Improves code clarity and maintainability.
Aligns governance actions with protocol standards.
Acceptance Criteria
Epoch boundaries are calculated dynamically using protocol parameters.
All hardcoded values for epoch calculations are removed.
Comprehensive tests validate the new implementation across different parameter configurations.
Documentation is updated to reflect the new approach.
The text was updated successfully, but these errors were encountered:
Description
The current implementation of epoch boundaries calculation could be improved to ensure correctness and maintainability. Instead of hardcoding or using derived constants, we should leverage protocol parameters like
epochLength
,slotLength
, andGov Action Validity
. By relying on these parameters, we can ensure that epoch boundary calculations remain accurate even when protocol configurations change, reducing the need for future code adjustments.Proposal
epochLength
: Defines the number of slots in an epoch.slotLength
: Specifies the duration of a single slot.Benefits
Acceptance Criteria
The text was updated successfully, but these errors were encountered: