Skip to content

TX build in 1.9.0 not respecting 16kb TX limit? #590

Open
@BenElferink

Description

@BenElferink

Summary

When trying to build a TX that surpasses the 16kb memory limit per TX, I expect an error.


In versions 1.7.0 - 1.8.14 of the Mesh SDK, I would get this error message:

txBuildResult error: JsValue("Maximum transaction size of 16384 exceeded. Found: 19226")

In older versions of the Mesh SDK, I would get this error message:

[Transaction] An error occurred during build: Maximum transaction size of 16384 exceeded. Found: 21861.

These errors were very important for my SAAS, as I would perform batching-calculations based on the max and current memory units from the error message.

However, in the latest versions of the Mesh SDK (1.9.0 or higher), I would get this error instead (which breaks my entire SAAS):

Not enough funds to satisfy outputs

After attempting to send a token to even less than 10 wallets I get this error which I do not understand:

Insufficient funds to create change output with tokens

EDIT:

After further trial and errors, I've come to new conclusions...

These errors stop showing up after attempting to build the same TX from a clean wallet:

Not enough funds to satisfy outputs
# AND
Insufficient funds to create change output with tokens

But I noticed something big changed, I'm not sure if it's a bug or a new feature.

In previous versions, batching TXs that fit within the 16kb TX limit usually averaged at 250 wallets per TX (if sending only ADA), the latest version of Mesh creates a TX with even 600-700 wallets in it. I did not sign, so I do not know if it will submit successfully, but this is definitely not the expected outcome.


Is it possible to bring back the max and current memory units for the error message?
Alternatively is there a way to pre-calculate current memory before running tx.build()?

Thanks in advance.

Steps to reproduce the bug

  1. Install Mesh @ v1.9.0-beta.28
  2. Build a TX that includes over 300 receiving wallets (output should be a token for heavier memory)
  3. See error message from tx.build()

Actual Result

Expected Result

SDK version

1.9.0-beta.28

Environment type

  • Node.js
  • Browser
  • Browser Extension
  • Other

Environment details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions