Skip to content
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

Solution For BlockTime and Slot #46

Open
R-K-H opened this issue Apr 30, 2024 · 1 comment
Open

Solution For BlockTime and Slot #46

R-K-H opened this issue Apr 30, 2024 · 1 comment
Assignees

Comments

@R-K-H
Copy link
Member

R-K-H commented Apr 30, 2024

Slot / block's are keyed to a specific computer time in Solana. The retrieval of that time however is an RPC method request which accepts the slot as the arg and returns unixtimestamp https://solana.com/docs/rpc/http/getblocktime.

Wherever we are generating our indexes, if the unixtime is returned through our parsing, we would like to make an attempt to store it (so we don't end up checking twice).

Ideally, if we can store this in a manner where there is a consistent data stream and indexing then we could use approximation (roughly 400ms block time) when we don't have an exact unixtime or slot stored.

This for example could mean that say we have a previous slot 2000012312 which time was 2024-02-01 12:23:33.112233 and we're looking for time for a slot 2000012342, well we can take that date and use 400ms * 30 and roughly come up with a time for it (importantly not requiring an RPC call).

Image

@R-K-H
Copy link
Member Author

R-K-H commented May 9, 2024

We're going to setup with the set interval polling so we should have a fairly decent join on, we need to index the two columns in the price table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants