Skip to content

Refine and improve balancing #516

@mmontin

Description

@mmontin

There are a few things that can be improved about balancing:

  1. Logging of the last balanced transaction before a validation failure #503 As balancing generates the cardano transaction (which is needed to compute the required fees), and as this generation executes the scripts to fill in execution units, phase 2 failures are raised during balancing. This is good, because catching these failures early ensures that there we don't do extra work, after we know the transaction fails in phase 2. However, this stops the balancing process and thus balanced skeletons for transactions failing in phase 2 are not displayed in the log. We could use an option to defer these phase 2 errors to when the transaction is actually sent for validation, in the cases where the displayal of the balanced skeleton is required.
  2. Decrease the number of transaction body generations #494 We could reduce the number of transaction body generations, and have the balancing return the body that was generated, to avoid yet another further generation before submission.
  3. Balancing option to leverage performance and accuracy #435 The current way of picking utxos is optimal but exponential, which is fine in most of the cases where the utxo sample is small. When we allow transaction to be sent on the actual deployed node, then the pool of utxos will be too large and this method wont scale. Let's develop an alternate method, less optimal, but with better scaling.
  4. Revise optimisation in balancing #500 The way utxos are picked is by trying to minimize the amount of extra value injected in the transaction. In fact, what should be minimize is whatever makes the overall transaction smaller to reduce the fees. This should be changed.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions