Closed linuskendall closed 1 month ago
It would actually be better to receive VoteAccounts, currently exposed via rpc as getVoteAccounts which is required to confirm blocks based on the actual vote transactions as they get added to the ledger and can be used to construct the leader schedule.
While we are at it, we should add a context slot and epoch to that data
It would actually be better to receive VoteAccounts, currently exposed via rpc as getVoteAccounts which is required to confirm blocks based on the actual vote transactions as they get added to the ledger and can be used to construct the leader schedule.
Geyser already provides account updates, with slot data: https://github.com/solana-labs/solana/blob/5178d4d49b347ed615b124b9d1527ff3198a8e65/geyser-plugin-interface/src/geyser_plugin_interface.rs#L296-L301 (Epoch seems unnecessary to me, since you can figure that out with math.) Is there some reason this won't work for vote accounts?
getVoteAccounts returns the effective delegated stake, which is not recorded on the vote account afaik but would require subscribing to roughly more than 500,000 stake accounts
getVoteAccounts returns the effective delegated stake, which is not recorded on the vote account afaik but would require subscribing to roughly more than 500,000 stake accounts
@mschneider getVoteAccounts cannot be used to recover the leader schedule. The leader schedule is derived from active stake delegations at the epoch boundary, whereas getVoteAccounts returns whatever delegations are currently active.
We can publish getVoteAccounts only at the epoch boundary that's enough
Problem
Efforts such as https://github.com/blockworks-foundation/lite-rpc would go along way to help reduce the burden and horizontally scale solana nodes.
Geyser (such as our https://github.com/rpcpool/yellowstone-grpc) could pretty much serve as the core functionality that feeds something like lite-rpc with currently one major exception - the leader schedule (see https://github.com/blockworks-foundation/lite-rpc/commit/e1c5c1fcdd20c0a83b591f990a6a40cd28257769).
Proposed Solution
If we could have the validator send a message to geyser with the current leader schedule each time the geyser starts and then send a notification whenever the leader schedule updates, this could be handled fully in geyser plugins.