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

tx: check absolute tx limits only when constructing from scratch #446

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

jgriffiths
Copy link
Contributor

Allow as many inputs/outputs as are present if we are building a tx from its serialized bytes. Since we fully analyze the tx before building it, we know that it can fit in memory/is not impossible to create for DOS checking purposes. This allows us to process live txs such as a recent testnet tx with ~100k outputs.

We retain the limit on constructing new txs from scratch, since wally is meant only for making txs that fit within standardness rules. This catches cases where a tx is constructed in parts or allocated up front based on an externally provided number of inputs/ouputs.

Update the comments to reflect that the limits are for standardness and not block size.

Allow as many inputs/outputs as are present if we are building a tx from its
serialized bytes. Since we fully analyze the tx before building it, we know
that it can fit in memory/is not impossible to create for DOS checking
purposes. This allows us to process live txs such as a recent testnet tx
with ~100k outputs.

We retain the limit on constructing new txs from scratch, since wally is
meant only for making txs that fit within standardness rules. This
catches cases where a tx is constructed in parts or allocated up front
based on an externally provided number of inputs/outputs.

Update the comments to reflect that the limits are for standardness and
not block size.
@jgriffiths jgriffiths merged commit ec348c8 into master Feb 19, 2024
4 checks passed
@jgriffiths jgriffiths deleted the madlad_tx_sizes branch February 19, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant