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

fullblocktests: Limit tickets to target pool size. #518

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Dec 20, 2016

This modifies the full block consensus tests to only purchase tickets until the target pool size is reached during the initial creation of the blocks needed to reach stake validation height.

This helps make the code a little more flexible since it will allow many more blocks to be created without spiking the ticket price as would happen prior to this change.

For a little intuition, once stake validation height is reached the tests intentionally purchase the same number of tickets as are voting on each block in order to achieve a steady state, so if the number of
tickets in the pool are already higher than the target pool size prior to reaching that steady state, the ticket price would keep rising until the outputs used to purchase the tickets no longer had enough funds
available to purchase them.

This modifies the full block consensus tests to only purchase tickets
until the target pool size is reached during the initial creation of the
blocks needed to reach stake validation height.

This helps make the code a little more flexible since it will allow many
more blocks to be created without spiking the ticket price as would
happen prior to this change.

For a little intuition, once stake validation height is reached the
tests intentionally purchase the same number of tickets as are voting on
each block in order to achieve a steady state, so if the number of
tickets in the pool are already higher than the target pool size prior
to reaching that steady state, the ticket price would keep rising until
the outputs used to purchase the tickets no longer had enough funds
available to purchase them.
@marcopeereboom marcopeereboom added this to the 0.7.0 milestone Dec 20, 2016
Copy link
Member

@alexlyp alexlyp left a comment

Choose a reason for hiding this comment

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

OK

@alexlyp alexlyp merged commit 7056dec into decred:master Dec 20, 2016
@davecgh davecgh deleted the fullblocktests_limit_tickets_to_target_pool_size branch December 20, 2016 23:33
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.

3 participants