Skip to content
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

Set staking auction length explicitly in resetEpoch #268

Merged
merged 4 commits into from
Jan 4, 2022

Conversation

jordanschalm
Copy link
Member

@jordanschalm jordanschalm commented Jan 3, 2022

resetEpoch currently sets the staking auction length based on the config in the contract, rather than inputs to the function, which can be unsafe. See https://github.com/dapperlabs/flow-go/issues/6076 for details.

This PR adds the stakingEndView as an argument to resetEpoch.

⚠️ This will require an upgrade to FlowEpoch, and must be rolled out in tandem with the flow-go tooling changes described in https://github.com/dapperlabs/flow-go/issues/6076 (in-progress)

Copy link
Member

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Would it make sense to try to include this in the same upgrade that we do for the automated rewards calculation and payment?

We can probably just merge this though and I'll integrate the changes into my PR

@jordanschalm
Copy link
Member Author

Would it make sense to try to include this in the same upgrade that we do for the automated rewards calculation and payment?

👍 That makes sense. This should be ready for the next (mid-February) spork cycle.

@jordanschalm jordanschalm merged commit 8dbe78a into master Jan 4, 2022
@jordanschalm jordanschalm deleted the jordan/6076-reset-epoch branch January 4, 2022 20:58
bors bot added a commit to onflow/flow-go that referenced this pull request Jan 18, 2022
1804: Include staking auction length in `resetEpoch` r=jordanschalm a=jordanschalm

This PR updates the transaction argument generation tool for `resetEpoch` to include the `stakingEndView` parameter added in onflow/flow-core-contracts#268. 

⚠️ Before merging, tag a release for `core-contracts` including onflow/flow-core-contracts#267. 

Co-authored-by: Jordan Schalm <[email protected]>
bors bot added a commit to onflow/flow-go that referenced this pull request Jan 18, 2022
1804: Include staking auction length in `resetEpoch` r=jordanschalm a=jordanschalm

This PR updates the transaction argument generation tool for `resetEpoch` to include the `stakingEndView` parameter added in onflow/flow-core-contracts#268. 

⚠️ Before merging, tag a release for `core-contracts` including onflow/flow-core-contracts#267. 

Co-authored-by: Jordan Schalm <[email protected]>
bors bot added a commit to onflow/flow-go that referenced this pull request Jan 18, 2022
1804: Include staking auction length in `resetEpoch` r=jordanschalm a=jordanschalm

This PR updates the transaction argument generation tool for `resetEpoch` to include the `stakingEndView` parameter added in onflow/flow-core-contracts#268. 

⚠️ Before merging, tag a release for `core-contracts` including onflow/flow-core-contracts#267. 

Co-authored-by: Jordan Schalm <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants