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

LQT: adjust budget every block #5085

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

cronokirby
Copy link
Contributor

Describe your changes

This adjusts the issuance budget every block, incrementing it by the issuance per block, every block, rather than clobbering the current value with issuance_per_block * how_long_the_epoch_was at the end of an epoch. This has the effects of:

  • making the value always match that claimed by the events, simplifying indexing,
  • seamlessly rolling over un-issued rewards to the next epoch,
  • simplifying the code.

I also pushed a small change to use a proper Event struct.

Testing deferred.

Issue ticket number and link

Checklist before requesting a review

  • I have added guiding text to explain how a reviewer should test these changes.

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    This breaks consensus, but I think this can be applied to the testnet just by pushing the change to the majority validator, which will then issue the incorrect reward amount for exactly one epoch. This has no bearing on any eventual mainnet upgrade. We could avoid this by using a second state key, but putting in this scar tissue seems more performative than actually valuable, given that the upgrade isn't in a final state yet.

@cronokirby cronokirby added the consensus-breaking breaking change to execution of on-chain data label Feb 12, 2025
.get_distributions_params()
.await
.expect("distribution parameters should be available")
.staking_issuance_per_block as u128;
.liquidity_tournament_incentive_per_block
Copy link
Member

Choose a reason for hiding this comment

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

👍

@cronokirby cronokirby merged commit ae54ec1 into protocol/lqt_branch Feb 12, 2025
10 checks passed
@cronokirby cronokirby deleted the cronokirby/lqt-reward-rollover branch February 12, 2025 21:10
conorsch pushed a commit that referenced this pull request Feb 14, 2025
## Describe your changes

This adjusts the issuance budget every block, incrementing it by the
issuance per block, every block, rather than clobbering the current
value with `issuance_per_block * how_long_the_epoch_was` at the end of
an epoch. This has the effects of:

- making the value always match that claimed by the events, simplifying
indexing,
- seamlessly rolling over un-issued rewards to the next epoch,
- simplifying the code.

I also pushed a small change to use a proper Event struct.

Testing deferred.

## Issue ticket number and link

## Checklist before requesting a review

- [x] I have added guiding text to explain how a reviewer should test
these changes.

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

> This breaks consensus, but I think this can be applied to the testnet
just by pushing the change to the majority validator, which will then
issue the incorrect reward amount for exactly one epoch. This has no
bearing on any eventual mainnet upgrade. We could avoid this by using a
second state key, but putting in this scar tissue seems more
performative than actually valuable, given that the upgrade isn't in a
final state yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus-breaking breaking change to execution of on-chain data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants