Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Index CPFP clusters #29

Open
junderw opened this issue Aug 1, 2023 · 0 comments
Open

Index CPFP clusters #29

junderw opened this issue Aug 1, 2023 · 0 comments
Assignees

Comments

@junderw
Copy link
Member

junderw commented Aug 1, 2023

Index the CPFP clusters in rocksdb and offer an API endpoint to query them.

Set a long cache for blocks older than 10.

From Element
{some code: 1 byte}
{cluster id: 32 bytes}
{effective feerate: f64: 8 bytes}
{list of txids excluding root: 32 bytes x 1.3 non-root tx on average}

82.6 bytes per cluster x 180 cluster per block x 800k blocks = 11.8944 GB (probably less since it was only avg for last 15k blocks)

{code: 1}
{txid: 32}
{cluster id: 32}

65 bytes x 2.3 tx per cluster x 180 clusters per block x 800k blocks = 21.528 GB (probably less)

{code: 1}
{blockhash: 32}
{list of indexes of cluster roots: u16 (2 bytes) x 180}

393 bytes per block x 800k blocks = 314.4 MB
@junderw junderw self-assigned this Aug 1, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant