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

Support block payloads that are too small to hold the entire tx table #817

Closed
Tracked by #747
ggutoski opened this issue Dec 8, 2023 · 0 comments · Fixed by #870
Closed
Tracked by #747

Support block payloads that are too small to hold the entire tx table #817

ggutoski opened this issue Dec 8, 2023 · 0 comments · Fixed by #870
Assignees
Labels

Comments

@ggutoski
Copy link
Contributor

ggutoski commented Dec 8, 2023

If the tx table declares a large length (eg. 4 billion) then the block payload might end before the tx table is complete. In that case every tx in the block has zero length, which is fine. But if anyone calls QueryablePayload::iter() then they'll get an iterator over 4 billion empty txs, which is bad.

The solution is to define the tx table length as min(declared length, number of words that can fit into the payload).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant