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

Improve tx dependency estimation #1380

Closed
MujkicA opened this issue May 16, 2024 · 0 comments · Fixed by #1393 or #1418
Closed

Improve tx dependency estimation #1380

MujkicA opened this issue May 16, 2024 · 0 comments · Fixed by #1393 or #1418
Assignees
Labels
enhancement New feature or request

Comments

@MujkicA
Copy link
Contributor

MujkicA commented May 16, 2024

Currently, estimate_tx_dependencies initiates a simulation for every dependency it needs to resolve.

@segfault-magnet suggested:
To reduce the number of simulations performed, we can add a high number of variable outputs to the tx before simulation and then inspect it afterwards to see how many were used.

Additionally, we'll have to watch the tx size limit. We can only add so many variable outputs until the limit is reached, then if the tx still reverts with missing outputs we have to communicate that there is no way of constructing a valid transaction.

@MujkicA MujkicA added the enhancement New feature or request label May 16, 2024
@segfault-magnet segfault-magnet self-assigned this May 29, 2024
segfault-magnet added a commit that referenced this issue Jun 6, 2024
closes: #1380 
The number of variable outputs is now determined by filling the dry-run
tx with as much variable outputs as the node will allow and counting the number of `TransferOut` receipts made
by the dry run.
---------

Co-authored-by: Ahmed Sagdati <ahmed.sagdati@fuel.sh>
Co-authored-by: Oleksii Filonenko <12615679+Br1ght0ne@users.noreply.github.com>
Co-authored-by: hal3e <git@hal3e.io>
hal3e added a commit that referenced this issue Jun 11, 2024
closes: #1380
The number of variable outputs is now determined by filling the dry-run
tx with as much variable outputs as the node will allow and counting the number of `TransferOut` receipts made
by the dry run.
---------

Co-authored-by: Ahmed Sagdati <ahmed.sagdati@fuel.sh>
Co-authored-by: Oleksii Filonenko <12615679+Br1ght0ne@users.noreply.github.com>
Co-authored-by: hal3e <git@hal3e.io>
hal3e added a commit that referenced this issue Jun 12, 2024
closes: #1380
The number of variable outputs is now determined by filling the dry-run
tx with as much variable outputs as the node will allow and counting the number of `TransferOut` receipts made
by the dry run.
---------

Co-authored-by: Ahmed Sagdati <ahmed.sagdati@fuel.sh>
Co-authored-by: Oleksii Filonenko <12615679+Br1ght0ne@users.noreply.github.com>
Co-authored-by: hal3e <git@hal3e.io>
hal3e added a commit that referenced this issue Jun 12, 2024
closes: #1380
The number of variable outputs is now determined by filling the dry-run
tx with as much variable outputs as the node will allow and counting the number of `TransferOut` receipts made
by the dry run.
---------

Co-authored-by: Ahmed Sagdati <ahmed.sagdati@fuel.sh>
Co-authored-by: Oleksii Filonenko <12615679+Br1ght0ne@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants