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

feat(node): gas premium distribution #1126

Closed
wants to merge 1 commit into from

Conversation

cryptoAtwill
Copy link
Contributor

@cryptoAtwill cryptoAtwill commented Aug 26, 2024

This PR adds the gas premium distribution to the validator. Some key changes:

  • Gas market record_utilization adds gas premium used and it's accumulated for each txn.
  • Because cometbft sends validator id over (a first 20 bytes of the public key hashed), a mapping needs to be maintained from validator id to public key. This is done at the App level with ValidatorTracker. It looks up the validator id in cache, if not found then queries comebft for full validators.
  • Some type update to replace tendermint account id with public key for validator_id in state.

Some other updates might be needed:

  • replace existing reward actor with a fil address to keep reward logic simple.

Mark it as draft as some clean up and alignment to be made.

@cryptoAtwill cryptoAtwill self-assigned this Aug 26, 2024
@cryptoAtwill cryptoAtwill requested a review from a team as a code owner August 26, 2024 13:59
@cryptoAtwill cryptoAtwill marked this pull request as draft August 26, 2024 13:59
@cryptoAtwill cryptoAtwill deleted the gas-premium branch August 27, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant