Include tx_id into SqueezedOut reason to simplify debugging. (#3133)
## Linked Issues/PRs #3132 ## Description Include tx_id into SqueezedOut reason to simplify debugging in the future ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else? <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds `tx_id` to all `SqueezedOut` reasons and updates types/APIs to construct, carry, and expose it across txpool, executor, p2p, GraphQL, and tests. > > - **Types/Status Model**: > - Introduce `services::preconfirmation::SqueezedOut` and `transaction_status::statuses::SqueezedOut` with `new(reason, tx_id)` and `reason()`; reason now includes ``TxId`` suffix. > - Change `PreconfirmationStatus::SqueezedOut` to hold the new struct; `TransactionStatus::squeezed_out` now requires ``tx_id``. > - Update conversions between preconfirmation and transaction statuses to use `reason()`. > - **TxPool/Executor/Services**: > - Propagate `tx_id` when emitting squeezed-out statuses (insertion errors, removals, TTL expiry, skipped deps) and when forwarding preconfirmations. > - Refactor pool removals to build `SqueezedOut::new(error.to_string(), tx_id)`; worker uses `Error::Removed(Ttl)` for expirations. > - Executor adds `tx_id` to squeezed-out preconfirmations. > - P2P default test data and POA receiver/tests updated to new struct. > - **GraphQL/API**: > - `SqueezedOutStatus.reason()` now reads via `status.reason()`. > - **Tests/Utilities**: > - Update tests and helpers to construct `SqueezedOut` with `tx_id` and assert reasons include appended ``TxId``; adapt status waiters to pass ``tx_id``. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ee2fd1e68dbedf393bac66d4b229ea2f91de003a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
S
Saeed Dadkhah committed
6e03c02b1a34e1aa6b5270d863c20b147c6c8d20
Parent: b9d108a
Committed by GitHub <noreply@github.com>
on 11/19/2025, 1:17:13 AM