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

chore: handle exceeding maximum inputs when funding a transaction #2822

Merged
merged 23 commits into from
Aug 7, 2024

Conversation

mvares
Copy link
Contributor

@mvares mvares commented Jul 23, 2024

Release notes

In this release, we:

Summary

Enforces a maximum limit of 255 inputs for funding a transaction. If this limit is exceeded, an error is triggered to prevent processing.

Checklist

  • I addedtests to prove my changes
  • I updated — all the necessary docs
  • I reviewed — the entire PR myself, using the GitHub UI
  • I described — all breaking changes and the Migration Guide

@github-actions github-actions bot added the chore Issue is a chore label Jul 23, 2024
Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvares Nice work on this 👍 and thanks again for helping us.

I've left some suggestions

packages/errors/src/error-codes.ts Outdated Show resolved Hide resolved
packages/account/src/account.ts Outdated Show resolved Hide resolved
packages/account/src/account.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvares We also need to implement a test case for this

@mvares
Copy link
Contributor Author

mvares commented Jul 23, 2024

@mvares We also need to implement a test case for this

I'm working on this. How could we simulate more than 250 inputs?

@mvares
Copy link
Contributor Author

mvares commented Jul 23, 2024

Aditionally, the tests of CI are falling after the changes.

cc @Torres-ssf

packages/account/src/account.ts Outdated Show resolved Hide resolved
packages/account/src/account.ts Outdated Show resolved Hide resolved
@mvares mvares requested a review from Torres-ssf July 25, 2024 12:20
@mvares
Copy link
Contributor Author

mvares commented Jul 25, 2024

TY, @Torres-ssf! Currently, I'm considering to mock txParameters.maxInputs to the test.

@danielbate danielbate marked this pull request as draft July 26, 2024 14:54
@mvares mvares requested a review from nedsalk August 1, 2024 14:28
Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvares is this ready for review?

packages/errors/src/error-codes.ts Show resolved Hide resolved
@mvares mvares marked this pull request as ready for review August 5, 2024 16:07
Torres-ssf
Torres-ssf previously approved these changes Aug 6, 2024
Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk>
Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvares
Copy link
Contributor Author

mvares commented Aug 6, 2024

:shipit:

@petertonysmith94 petertonysmith94 merged commit 0110fd8 into FuelLabs:master Aug 7, 2024
25 checks passed
@mvares mvares deleted the mv/chore/max-input branch August 7, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exceeding Maximum Number of Inputs When Funding a Transaction
5 participants