Stake and vote management. Integration of the main loop in LiteRPC#229
Closed
Stake and vote management. Integration of the main loop in LiteRPC#229
Conversation
Collaborator
|
Cargo clippy gives lots of warnings. |
godmodegalactus
requested changes
Oct 31, 2023
| "quic-forward-proxy-integration-test", | ||
| "cluster-endpoints", | ||
| "history", | ||
| "stake_vote", |
Collaborator
There was a problem hiding this comment.
Cargo clippy gives lots of warnings.
| commitment: Option<CommitmentConfig>, | ||
| data_cache: &DataCache, | ||
| ) -> Option<HashMap<String, Vec<usize>>> { | ||
| let commitment = commitment.unwrap_or_else(|| CommitmentConfig::confirmed()); |
Collaborator
There was a problem hiding this comment.
default one should be finalized.
| }; | ||
| let epoch = data_cache.epoch_data.get_epoch_at_slot(slot); | ||
|
|
||
| let get_schedule = |schedule_data: Option<&LeaderScheduleData>| { |
Collaborator
There was a problem hiding this comment.
Should implement LeaderFetcherInterface to get the schedule.
|
|
||
| #[derive(Clone)] | ||
| pub struct LeaderScheduleData { | ||
| pub schedule: HashMap<String, Vec<usize>>, |
Collaborator
There was a problem hiding this comment.
Should be leader: HashMap<Index, Pubkey>.
and then schedule should be a Vec,
| bail!("Error: read Stake account with empty data"); | ||
| } | ||
|
|
||
| if self.data.is_empty() { |
| rpc_client: Arc<RpcClient>, | ||
| grpc_url: String, | ||
| ) -> anyhow::Result<tokio::task::JoinHandle<()>> { | ||
| let mut account_gyzer_stream = subscribe_geyzer(grpc_url).await?; |
Collaborator
There was a problem hiding this comment.
geyser subscription for accounts should be done somewhere else.
| use solana_lite_rpc_core::structures::epoch::Epoch as LiteRpcEpoch; | ||
| use solana_sdk::commitment_config::CommitmentConfig; | ||
|
|
||
| pub async fn get_current_confirmed_slot(data_cache: &DataCache) -> u64 { |
Collaborator
There was a problem hiding this comment.
Should be move somewhere else.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First PR of stake and vote management.
This PR validate the integration of the vote and stake management in current Lite RPC version.