-
Notifications
You must be signed in to change notification settings - Fork 155
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
restrict output size in Shelley-MA #2099
Conversation
filter | ||
( \out -> | ||
let v = getField @"value" out | ||
in Val.size v > 10000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this also applies in Allegra, we need to validate against the current chain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes indeed!
for Coin
, size
is always 1, but of course we should still validate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's a good point! We're probably fine then :-)
Having multi-asset output value sizes bounded only by what can fit into a transaction within the transaction size limit can make things awkward. The hypothetical example is that someone sends a near-max size utxo to someone else. This output is now difficult to spend. It cannot be spent simultaneously with any other input or any other output since it so near the limit. One might not be able to split it into two UTxOs since two smaller ones is probably bigger than one big one. At worst this output is stuck, at best it is annoying.
8cf0626
to
aec21cb
Compare
Having multi-asset output value sizes bounded only by what can fit into a
transaction within the transaction size limit can make things awkward.
The hypothetical example is that someone sends a near-max size utxo to
someone else. This output is now difficult to spend.
It cannot be spent simultaneously with any other input or any other output
since it so near the limit. One might not be able to split it into two UTxOs
since two smaller ones is probably bigger than one big one.
At worst this output is stuck, at best it is annoying.