Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Feature Gate: updates rewards at epoch boundary using cached accounts #24278

Closed
behzadnouri opened this issue Apr 12, 2022 · 0 comments
Closed
Assignees
Labels
feature-gate Pull Request adds or modifies a runtime feature gate

Comments

@behzadnouri
Copy link
Contributor

behzadnouri commented Apr 12, 2022

Description

When rewards are calculated at the epoch boundary, stake and vote account are loaded from accounts-db, which is slow.
#24200 will instead use cache stake and vote accounts in Bank.stakes.

These cached accounts are synchronized with accounts-db after each transaction, and so there should not be any change in the resulting computation:
https://github.com/solana-labs/solana/blob/d2702201c/runtime/src/bank.rs#L4526
Nevertheless, to avoid any chances of introducing a consensus issue, the switch to cached account is feature gated.

Feature ID

28s7i3htzhahXQKqmS2ExzbEoUypg9krwvtK2M9UWXh9

Activation Method

Single Core Contributor

Testnet Activation Epoch

470

Devnet Activation Epoch

506

Mainnet-Beta Activation Epoch

477

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-gate Pull Request adds or modifies a runtime feature gate
Projects
None yet
Development

No branches or pull requests

1 participant