This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Do not allow any crowdloan contributions during the VRF period#3346
Merged
Conversation
emostov
reviewed
Jun 23, 2021
emostov
reviewed
Jun 23, 2021
Contributor
|
LGTM - the changes are a nice QoL improvement |
emostov
approved these changes
Jun 23, 2021
gavofyork
approved these changes
Jun 24, 2021
kianenigma
reviewed
Jun 24, 2021
| fn bids() -> Vec<BidPlaced> { | ||
| BIDS_PLACED.with(|p| p.borrow().clone()) | ||
| } | ||
| fn vrf_delay() -> u64 { |
Contributor
There was a problem hiding this comment.
unfortunately no one ever uses them 😁 but I added some pretty convenient ways to create all of these thread local stuff with parameter_types! with getter and setters https://crates.parity.io/frame_support/macro.parameter_types.html
Member
Author
There was a problem hiding this comment.
Actually i do normally use it, but copy paste from local code is faster than looking up the syntax lol
kianenigma
reviewed
Jun 24, 2021
kianenigma
reviewed
Jun 24, 2021
andresilva
approved these changes
Jun 24, 2021
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
shawntabrizi
commented
Jun 24, 2021
Member
Author
|
bot merge |
|
Trying merge. |
shawntabrizi
added a commit
that referenced
this pull request
Jun 25, 2021
* patch `is_ending` logic for sampling * Create AuctionStatus abstraction * clean up apis * fix docs * Add check for contributions during vrf * custom error for this * fix benchmark * opening -> starting * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update runtime/common/src/auctions.rs * avoid divide by zero stuff Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
ordian
added a commit
that referenced
this pull request
Jul 2, 2021
* master: (21 commits) cleanup stream polls (#3397) Staking Miner (#3141) Companion for Substrate#8953 (#3140) Bump version, specs & substrate in prep for v0.9.8 (#3387) Fix busy loops. (#3392) Minor refactor (#3386) add simnet tests (#3381) BEEFY: adjust gossip (#3372) Companion for #9193 (#3376) Companion for Decouple Staking and Election - Part 3: Signed Phase (#2793) Ensure that we fetch another collation if the first collation was invalid (#3362) Only send one collation per relay parent at a time to validators (#3360) disable approval-checking-grandpa on dev chain (#3364) Use associated constant for max (#3375) Use wasm-builder from git (#3354) Squashed 'bridges/' changes from b2099c5..23dda62 (#3369) Bump versions & spec_versions (#3368) Don't allow bids for a ParaId where there is an overlapping lease period (#3361) Companion for upgrade of transaction-payment to pallet macro (#3267) Do not allow any crowdloan contributions during the VRF period (#3346) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the ending period of an auction, there is a delay needed to select the random block used to win the auction.
During this time, a crowdloan could receive contributions which would not help win the auction whatsoever.
Because we cannot identify which crowdloans would win a current auction, we must stop all crowdloans from accepting contributions during this VRF delay period.
This PR refactors the way that the Auction pallet and the
Auctioneertrait reports the status of an auction, making it easy to detect these scenarios, and improving the overall code structure and readability.This PR also repairs a small bug where the
EndingsCountwas being incremented multiple times per auction. No harm done here, but this is a proper fix for that behavior.