Skip to content

Assemble Tx requires spendable inputs #2992

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

Merged

Conversation

MitchTurner
Copy link
Member

@MitchTurner MitchTurner commented May 5, 2025

Linked Issues/PRs

closes #2991

Description

We need to not allow data messages to be included as counted inputs during assemble tx since they can't be used to cover fees.

Checklist

  • New behavior is reflected in tests

Before requesting review

  • I have reviewed the code myself

@MitchTurner MitchTurner marked this pull request as ready for review May 6, 2025 19:49
@MitchTurner MitchTurner requested review from a team, xgreenx, Dentosal and netrome as code owners May 6, 2025 19:49
netrome
netrome previously approved these changes May 7, 2025
Copy link
Contributor

@netrome netrome left a comment

Choose a reason for hiding this comment

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

Nice stuff!

let Some(owner) = input.input_owner() else {
continue;
};
if !input.is_message_data_signed() && !input.is_message_data_predicate() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: It would be helpful to break this out into a separate function with an informative name. Something like input.is_spendable() perhaps.

Copy link
Contributor

@netrome netrome left a comment

Choose a reason for hiding this comment

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

Nice!

@MitchTurner MitchTurner merged commit 36ee0ca into master May 8, 2025
34 checks passed
@MitchTurner MitchTurner deleted the bugfix/assemble-tx-should-require-spendable-inputs branch May 8, 2025 18:24
Dentosal added a commit that referenced this pull request May 26, 2025
## Version 0.44.0

### Breaking
- [2887](#2887): Bump Rust
version to `1.85.0`.
Starting with this release, newly generated WASM state transition
functions are no longer compatible with old versions of the `fuel-core`.
So, the change breaks forward compatibility for the network and each
node should start to use a new `fuel-core` release.
- [2943](#2943): Registry root
calculation for compression tables no longer accounts for the evictor
cache.
- [2947](#2947): Upgrade to
2024 Rust edition.
- [2958](#2958): Changed
return type of `balance` endpoint from `u64` to `u128`
- [3002](#3002): Update
`fuel-vm` to `0.61.1`. In doing this, we've changed Receipts to use the
`SubId` scalar type for sub asset IDs.

### Added
- [2954](#2954): Made
`registry` mod public in `fuel-core-compression`
- [2956](#2956): Add
excluded_contract filter to extract of transaction from TxPool.
- [2994](#2994): Simple
makefile with basic commands.
- [3004](#3004): Additional
error logs for Ethereum provider failures.

### Changed
- [3021](#3021): Updated
fuel-vm to 0.62.0, see
https://github.com/fuelLabs/fuel-vm/releases/v0.62.0

### Fixed
- [2969](#2969): Ensure that
vm heap memory is zeroed out on rellocation after `reset`. Adds support
for `GM::GetGasPrice` Bumps `fuel-vm` to `0.60.2`.
- [2984](#2984): Fix client
coins endpoint so that passing `None` for `asset_id` no longer defaults
to `AssetId::default()` but correctly returns all asset types.
- [2987](#2987): Make txpool
pre-conf broadcast conditional on there being some txs in the list
- [2989](#2989): Prevent
syncing compression database from genesis if override cli arg
`--da-compression-starting-height` is provided.
- [2992](#2992): Make sure
assemble tx doesn't count message data inputs as spendable inputs for
covering fee
- [2993](#2993): Pin the
graphiql playground to v3, and cache the result to be reused across
multiple calls to render the playground.

### Removed
- [2955](#2955): Remove
unnecessary lifetime constraints on fuel-core-client.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assemble_tx Fails With NoSpendableInput When TX Carries A Message Input W/ Amount and Data
3 participants