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

Add Geyser entry interfaces#30872

Merged
CriesofCarrots merged 5 commits intosolana-labs:masterfrom
CriesofCarrots:geyser-entry
Mar 24, 2023
Merged

Add Geyser entry interfaces#30872
CriesofCarrots merged 5 commits intosolana-labs:masterfrom
CriesofCarrots:geyser-entry

Conversation

@CriesofCarrots
Copy link
Copy Markdown
Contributor

Problem

Various users, including RPC providers, would like to be able to cryptographically verify that a block stored in long-term storage (either via Bigtable upload or streamed via Geyser) contains complete and correct transaction data. There is currently no way to do this, because the transactions get flattened and the Entry data is not included in the stored copy.
This PR is the first toward this project to address the Geyser side of the issue.

Summary of Changes

Add basic Entry interface elements to solana-geyser-plugin-interface
The entry notification is not actually sent anywhere yet.

@ripatel-fd
Copy link
Copy Markdown
Contributor

This can also be solved by connecting to the validator's blockstore as a secondary client, as implemented in https://github.com/firedancer-io/radiance

Comment thread geyser-plugin-interface/src/geyser_plugin_interface.rs
Comment thread geyser-plugin-interface/src/geyser_plugin_interface.rs Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2023

Codecov Report

Merging #30872 (f84a3d8) into master (db1e721) will decrease coverage by 0.1%.
The diff coverage is 0.0%.

@@            Coverage Diff            @@
##           master   #30872     +/-   ##
=========================================
- Coverage    81.5%    81.5%   -0.1%     
=========================================
  Files         726      726             
  Lines      204742   204753     +11     
=========================================
- Hits       167001   166987     -14     
- Misses      37741    37766     +25     

Copy link
Copy Markdown
Contributor

@lijunwangs lijunwangs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Comment thread geyser-plugin-interface/src/geyser_plugin_interface.rs
@CriesofCarrots CriesofCarrots merged commit f07b7ac into solana-labs:master Mar 24, 2023
/// `solana_entry::entry::next_hash()`
pub hash: &'a [u8],
/// The number of executed transactions in the Entry
pub executed_transaction_count: u64,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m curious why the “executed_” prefix was added here, as Transaction execution is not really a concept at the Entry level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh, I was mirroring the fields in the block notification. I agree that execution is not something that an Entry is really aware of, but on the other hand, it's not actually incorrect, as only executed transactions get recorded.
I don't feel strongly; happy to remove executed here if you think it's more clear

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na im good. Thanks

@harsh4786
Copy link
Copy Markdown

what do you think of adding Shred notification support in Geyser? If some plugin subscriber is interested in shred subscriptions, this would particularly help in light clients.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants