-
Notifications
You must be signed in to change notification settings - Fork 2
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: configurable max holders #59
feat: configurable max holders #59
Conversation
@@ -1244,6 +1247,10 @@ pub fn execute_update_config( | |||
config.epoch_interval = Duration::Time(epoch_interval); | |||
} | |||
|
|||
if let Some(max_holders) = max_holders { | |||
config.max_holders = max_holders; |
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 we might have a problem here. What happens if we reduce the max_holders
parameter? I think it only makes sense to have an ever-increasing param, right?
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 don't think it would inherently cause any problems to reduce the max_holders
parameter. Tickets held by over max_holders
holders could still be held, used, and sold as usual.
As far as making sense goes, yeah it probably only makes sense to ever increase max_holders
. The main exception I can think of is that if you accidentally set max_holders
to a really big number, you want to be able to decrease it to a reasonable number again.
But so with that in mind yeah i'll make it only increasing and set min and max bounds for max_holders
.
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.
LGTM
* feat: increase ticket length to 6 * feat: configurable max holders (#59) * feat: make max_holders configurable * test: add test for max_holders configuration * build: build wasm and schema json artifacts * fix: add max holders bounds, make sure that max holders only increases * fix: add tests for max_holders * build: update build artifacts * Trigger actions * build: empty commit to trigger github actions
* fix: wip prize buckets * fix: get all tests to pass * fix: add test to simulate jackpot lottery growth * fix: attempt to fix the integration test * style: use fold instead of for loop * build: update schema artifacts * fix: update integration tests to use anchor_mock * fix: pass clippy * test: update jackpot simulation outputs * test: improve jackpot simulation output * feat: add function calculate_lottery_balance * fix: update query_glow_emission_rate calculation instead of using current_prize_buckets, use lottery_balance to account for the appreciation since the last lottery * fix: update execute_epoch_ops to calculate lottery_balance * fix: update lottery balance calculation * feat: add LotteryBalance query * fix: update return type to StdResult instead of Result this way you can call calculate_lottery_balance from query_lottery_balance * fix: add LotteryBalanceResponse to lotto/examples/schema.rs * fix: pass clippy * fix: use enumerate instead of iterating over indicies * feat: increase ticket length * build: build artifacts * fix: pass clippy * fix: update oracle to use ticket length when generating hash * fix: change ticket length to 5 * test: update tests to pass * feat: update error types to give more details * fix: error message for InvalidHolderSequence * fix: pass clippy * fix: adjust pseudo_random_hash based on ticket length * fix: increase MAX_LIMIT to 10000 from 100 for prize pagination * fix: dry ticket length glow_protocol * fix: InsufficientPoolFunds pool_value value * fix: update comment describing prize_distribution * fix: update error message to specify 6 instead of 5 digits * feat: increase ticket length (#56) * feat: increase ticket length to 6 * feat: configurable max holders (#59) * feat: make max_holders configurable * test: add test for max_holders configuration * build: build wasm and schema json artifacts * fix: add max holders bounds, make sure that max holders only increases * fix: add tests for max_holders * build: update build artifacts * Trigger actions * build: empty commit to trigger github actions
Update fee distributor README in response to questions raised in the oak-glow-v2 audit. * fix: update fee distributor README
What's This
This builds off of #56 and makes it possible to configure the
max_holders
config.