-
Notifications
You must be signed in to change notification settings - Fork 64
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
Improvement/check block sequencing #299
Conversation
Fix conflicts and clippy |
if block.commitment_config.is_processed() { | ||
let prev_value = | ||
saw_processed_at.insert(blockhash.clone(), (slot, SystemTime::now())); | ||
match prev_value { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace it with if let Some(prev) = ...
if block.commitment_config.is_confirmed() { | ||
let prev_value = | ||
saw_confirmed_at.insert(blockhash.clone(), (slot, SystemTime::now())); | ||
match prev_value { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
let prev_value = | ||
saw_finalized_at.insert(blockhash.clone(), (slot, SystemTime::now())); | ||
match prev_value { | ||
None => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
|
||
// rule: if confirmed, we should have seen processed but not finalized | ||
if block.commitment_config.is_confirmed() { | ||
if saw_processed_at.contains_key(&blockhash) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here should be like .is_none()
} else { | ||
warn!("should not see confirmed slot without seeing processed slot first ({})", blockhash); | ||
} | ||
if saw_finalized_at.contains_key(&blockhash) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
"should not see confirmed slot after seeing finalized slot ({})", | ||
blockhash | ||
); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove else, no need to add more code for comments.
lite-rpc/src/main.rs
Outdated
@@ -164,6 +162,17 @@ pub async fn start_lite_rpc(args: Config, rpc_client: Arc<RpcClient>) -> anyhow: | |||
vote_account_notifier, | |||
} = subscriptions; | |||
|
|||
// note: check failes for commitment_config processed because sources might disagree on the blocks | |||
debugtask_blockstream_slot_progression( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be optional.
hide grpc_inspect behind flag |
note: requires a not-yet-published version of geyser-grpc-connector (open PR); unfortunately lite-rpc and geyser-grpc-connector depend in turn on an unpublished version of geyser-grpc-connection crate! keep the git pointer for now
Configuration:
Adds parameter
enable_grpc_stream_inspection
to configExtensive Test on solana-lite-rpc-staging against testnet:
the message
block sequence seen
is produces when the artificial consumer was able to receive three full-blocks in correct order and without duplicates