-
Notifications
You must be signed in to change notification settings - Fork 608
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
feat/docs: CL external incentives tool #5458
Conversation
log.Fatal(err) | ||
} | ||
|
||
log.Println("incentive records. If empty, something probably went wrong", incentiveRecordsResponse.IncentiveRecords) |
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.
can we also check gauge Records after we distribute? FilledEpoch should be +1 and distribtued Coins should be appended to the gauge struct
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.
also should we consider all the created incentives regardless of poolId <> gaugeId association and distribute tokens to them as well?
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.
The purpose of this is to make sure that incentive records are created from gauges. This print gets the job done.
I don't think what you're requesting is helpful for this tool. However, it would be a good assertion to make in tests
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.
utACK.
A little concerned about the
log.Println("current epoch after gauge creation", currentEpochResponse.CurrentEpoch)
log.Println("waiting for next epoch...")
getting logged for an hour, otherwise lgtm
log.Println("current epoch after gauge creation", currentEpochResponse.CurrentEpoch) | ||
log.Println("waiting for next epoch...") |
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.
does this get printed for an hour?
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.
maybe we can set a timer and retry every minute
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.
On localosmosis, unintuitively, an "hour" epoch is actually 60 seconds so this shouldn't be a concern.
If this is used on testnet, there is no "hour" epoch so the script would fail early.
Thi script is mainly used for testing incentives on localosmosis. If there is an infinite loop somewhere, the user can just kill the script
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.
Ah I see, now I understand why everything was so confusing while reviewing this, now everything became more clearer
Co-authored-by: Matt, Park <[email protected]>
Co-authored-by: Matt, Park <[email protected]>
// Note, this is localosmosis-specific. | ||
expectedEpochIdentifier = "hour" |
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.
Are we going to run into a problem trying to use this for cl-testnet?
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.
The epoch identifier can manually be changed to "day" here.
A bigger problem is that we would have to wait for the epoch to pass for a while so that the incentive records are created
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 will try running this against testnet before I merge and document all the changes that would be necessary
OK, I'm going to merge this script to unblock the external incentives PR branched off of this. I asked Ibrar to test this out to make sure that all needed functionality is present |
Closes: #XXX
What is the purpose of the change
This PR modifies the script to add the ability to create external incentives via gauges and wait for an epoch so that it is converted into an incentive record.
Testing and Verifying
This change is a trivial rework / code cleanup without any test coverage.
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)