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

fix: add vrfDelay as a phase return value for ongoing auctions to reflect VRFdelays in polkadot #593

Merged
merged 7 commits into from
Jun 30, 2021

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented Jun 29, 2021

closes: #588

Breaking Change

Summary

This PR aims to reflect the addition of the AuctionStatus enum in polkadot for parachains, specifically the VRFDelay. When an auction is past its finishEnd block the auction is then in a vrfDelay phase.

Changes

  • I updated the tests to reflect this change, I also spotted a minor issue in the tests and reversed the output results to reflect a real world scenario with the auctions.

  • Added logic inside of the auctionsCurrent method for ParasService that will add a vrfDelay phase as a potential result.

  • I added the vrfDelay result to the AuctionPhase type, and changed starting=> startPeriod, ending => endPeriod.

Overall there are 3 potential return values for a phase:

phase :
  startPeriod
  endPeriod
  vrfDelay
  • Updated the docs

docs/src/openapi-v1.yaml Outdated Show resolved Hide resolved
docs/src/openapi-v1.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@emostov emostov left a comment

Choose a reason for hiding this comment

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

lgtm - just some suggestions on docs and the name of the enum variants .. although i am not sure if appending Period is worth it to align with better with https://github.com/paritytech/polkadot/blob/60341e125563cbf655ab686ac5cef370ac33d16d/runtime/common/src/traits.rs#L150-L164

docs/src/openapi-v1.yaml Outdated Show resolved Hide resolved
docs/src/openapi-v1.yaml Outdated Show resolved Hide resolved
@TarikGul TarikGul changed the title fix: add delay as a phase return value for ongoing auctions to reflect VRFdelays in polkadot fix: add vrfDelay as a phase return value for ongoing auctions to reflect VRFdelays in polkadot Jun 30, 2021
@TarikGul
Copy link
Member Author

@emostov This is ready to merge, just want to make sure whether we should append Period and change this PR to a breaking change, or keep as if and just add the vrfDelay

@emostov
Copy link
Contributor

emostov commented Jun 30, 2021

@emostov This is ready to merge, just want to make sure whether we should append Period and change this PR to a breaking change, or keep as if and just add the vrfDelay

Its already a breaking change because when we used to show ending we will now sometimes show vrfDelay. IMO we should change ending => endPeriod & starting => startPeriod to better align with the AuctionStatus enum

@TarikGul
Copy link
Member Author

Ahh yes, the breaking change is there regardless because the new runtime logic is keeping AuctionInfo alive during the vrfDelay period. Good point. Updated starting => startPeriod, ending => endPeriod and reflected it in the docs. I will set up a release after I merge this in once the tests pass.

@TarikGul TarikGul merged commit b4d8662 into master Jun 30, 2021
@TarikGul TarikGul deleted the tarik-update-auction-status branch June 30, 2021 23:55
@TarikGul TarikGul mentioned this pull request Jul 1, 2021
This pull request was closed.
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.

Update auction endpoints (track paritytech/polkadot/pull/3346)
3 participants