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

tbc: cache raw block bytes instead of decoding and re-encoding #187

Open
1 task done
joshuasing opened this issue Jul 22, 2024 · 0 comments
Open
1 task done

tbc: cache raw block bytes instead of decoding and re-encoding #187

joshuasing opened this issue Jul 22, 2024 · 0 comments
Assignees
Labels
area: tbc This is a change to TBC (Tiny Bitcoin) size: L This change is large (+/- <500) type: enhancement This improves existing functionality type: refactor This refactors existing functionality

Comments

@joshuasing
Copy link
Contributor

Confirmation

  • I have checked for similar issues.

Problem

TBC currently uses btcd's wire package to decode and encode blocks.
This can result in data loss if the wire package does not decode certain data, as it will not retain data it doesn't know to retain.

Suggested solution

Instead of decoding and re-encoding blocks in TBC, we should cache the raw block bytes and decode it once, then store the raw bytes for later use.

Additional Information

No response

@joshuasing joshuasing added type: refactor This refactors existing functionality type: enhancement This improves existing functionality size: L This change is large (+/- <500) area: tbc This is a change to TBC (Tiny Bitcoin) labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tbc This is a change to TBC (Tiny Bitcoin) size: L This change is large (+/- <500) type: enhancement This improves existing functionality type: refactor This refactors existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants