I minted some tokens, but can't send - OutputTooBigUTxO MaxTxSizeUTxO

Hi All

I minted over 1,000 tokens and sent them to another address (created using CLI - have skey/vkey).

I now cannot send anything from the second wallet - I get this error:

cardano-cli transaction submit --mainnet --tx-file /home/me/folder/tmp/tx_file.signed

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (MaxTxSizeUTxO 21604 16384))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (OutputTooBigUTxO [(19851,5000,(Addr Mainnet (Ke

It doesn’t matter how many tokens I try and send, always get OutputTooBigUTxO.

Ubuntu. Tried updating binaries - now on Cardano-cli 1.29.0 - linux-x86_64 - ghc-8.10 git rev 71135f5f6aa979843a1753e8cd6c06e085d07444. Cardano-node from same build.

Thanks

The transaction is over the 16kB limit, so you’ll need to carefully craft a transaction that is under that limit.

  1. If your transaction consumes more than one UTxO, try again with it just consuming only the UTxO with all of the tokens and outputting just two outputs where there are as few distinct policy IDs and asset names as possible in each of those separate outputs. This probably will still be over the 16kB limit, but it might be worth trying.
  2. Alternatively, if the tokens aren’t time-locked yet, you can create a transaction that burns just enough of them to keep the transaction size under 16kB. It’s not the quantity of each token that matters, its the number of policy ID + asset name combinations that appear in the output.
  3. I suspect that the 16kB limit will be raised at a future hard fork (because Plutus scripts may require that higher limit), so you might just have to wait until then.

Thanks for the suggestions.

Wow this kinda sucks.

It occurs to me that you could really ruin someone’s day then by minting a lots of garbage tokens with the longest possible asset names to their address…?

Essentially locking their wallet from use.

There’s a few days until policy lock, so burn it is.

Before I burn, could you tell me more about the other options? There is 1 policy ID. They were transferred to the holding wallet in batches (of like 50 or less). Would it be a case of crafting a transaction with only uses the most recently received assets?

From your message it sounds like all of the tokens are now in a single UTxO, not just in multiple UTxOs at a single address. If they’re in multiple UTxOs, then your only problem is that the wallet software is buggy. (I’ve noticed that Yoroi sometimes handles situations like these better than Daedalus; other wallet software may be more sophisticated.)

If all of the tokens are in one big unspent UTxO, then I would try creating a transaction (with cardano-cli) that consumes that single UTxO and has two outputs, each with some of the tokens—since they have the same policy ID, it doesn’t matter how you divide them among the two outputs. This transaction will succeed if the original UTxO fell enough below the size limit that there is room for the overhead of splitting it into two UTxOs. Chances are that it won’t succeed, but it might be worth the effort to try.

If you end up burning, you can just remint the ones you burned.

I don’t know anything about the inner workings of the protocol so forgive me in case it’s a stupid question.

Is there a way to resolve such issues on the protocol level? ie: in case the payload is over the limit it would create multiple UTXOs instead of a big one? …I guess not otherwise it would be implemented, but asking out of curiosity.

The 16kB limit is on the transaction (i.e., all of the output UTxOs plus the signatures etc.), not on each output UTxO separately, so the protocol change would have to the limit to make it apply to the UTxO instead of the transaction. I doubt that would be safe because it might open the protocol to attacks.

I think it would be great if cardano-cli and wallet software would warn a user if they were trying to create a transaction that was so near the 16kB limit that it might be hard to later spend that UTxO.

1 Like

This is really interesting info, @bwbush in the error from OP, is the size of the tx they are trying to send indicated by one of those numeric values? like is it 21kB, 19.8, etc?

In the OP, . . .

  • MaxTxSizeUTxO 21604 16384 means that the transaction serializes to 21604 bytes, but the protocol limit maxTxSize is 16384 bytes. See here.
  • OutputTooBigUTxO [(19851,5000,(Addr Mainnet (Ke... means that a serialized value in a UTxO is 19851 bytes, but the protocol limit maxValueSize is 5000 bytes. See here.
1 Like

P.S. The maxValueSize is less than maxTxSize so that value won’t get stuck in an oversized UTxO. This makes me think that the OP can resolve the problem without burning tokens, but by just carefully crafting a transaction that satisfies both limits.

Thank you. I am now trying before burning, it’s surprisingly complicated. (I am new to Cardano but not new to IT or coding). I’ve got a few days before policy lock.

1 Like

excellent, thank you for the references also

1 Like