-
Notifications
You must be signed in to change notification settings - Fork 796
node(governor): refactor dayLength
and dailyLimit
fields and change wording
#4431
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
base: main
Are you sure you want to change the base?
node(governor): refactor dayLength
and dailyLimit
fields and change wording
#4431
Conversation
5d423e0
to
f9bd686
Compare
node/pkg/governor/governor.go
Outdated
emitterAddr vaa.Address | ||
// The amount of notional value that can leave the chain during the period | ||
// defined by the sliding window. | ||
dailyLimit uint64 |
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.
Makes sense to change this variable name too imo
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.
@djb15 I changed it to USDLimit and updated all the code and documentation references.
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.
This will be breaking change so I updated the PR description.
If this ends up not being worth it I'm fine to leave dailyLimit
as-is and just remove the day length field.
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.
Ahhh ok yeah if Bruce and co don't think it's worth making a breaking change here then I agree you can revert back to the commit pre this change
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.
I think it's reasonable to change it if you want. Anyone who uses it will just need to make a change whenever they decide to pick up a new version of the package. 🤷
dayLength
and dailyLimit
fields and change wording
For historical reference, But I guess we don't really do that much governor testing in tilt, so it doesn't matter. |
03cc0b7
to
b642527
Compare
- Remove the daylength field configured on the Governor in favour of using a constant. This was always configured to be the same value, and it unclear conceptually to change the length of minutes in a day, when in fact we want to change the duration of a sliding window of time. - Change wording in code comments to refer to a sliding window. This more accurate reflects that the Governor works with a rolling window rather than as discrete calendar days of 24h. - Use separate constants for mainnet and devnet deployments - Removed redundant time.Duration calls
b642527
to
5f4f35f
Compare
Adding draft mode until I get around to fixing the conflicts |
daylength
field configured on the Governor in favour of using a constant. This was always configured to be the same value, and it unclear conceptually to change the length of minutes in a day, when in fact we want to change the duration of a sliding window of time.dailyLimit
toUSDLimit
and add code comments explaining the relationship to the sliding window. Update all code and documentation references accordingly.Note: because
dailyLimit
is an exported field, and is included in log ouput, this likely constitutes a breaking change for packages that import the Governor code as well as for monitoring tools. They will need to update their code to use the new variable name.