-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Reject transactions for already spent coins #2935
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
Conversation
AurelienFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The tx pool start to have a lot of little caches maybe we should try to generalize them etc in the future
| self.spend_inputs_by_tx_id(tx_id); | ||
| } | ||
|
|
||
| pub fn spend_inputs_by_tx_id(&mut self, tx_id: TxId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would prefer a naming such a mark_input_as_spent or confirm_input_spent from what I understand it helps to understand the code
|
|
||
| #[cfg(test)] | ||
| #[allow(non_snake_case)] | ||
| mod tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move these tests to the service level? I don't think we should have tests on the internal details of the service.
|
|
||
| impl TransactionExt for MaybeCheckedTransaction { | ||
| fn inputs(&self) -> ExecutorResult<&Vec<Input>> { | ||
| fn inputs(&self) -> Cow<[Input]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
| pub struct SpentInputs { | ||
| /// Use LRU to support automatic clean up of old entries. | ||
| spent_inputs: LruCache<InputKey, ()>, | ||
| /// When it is unclear whether an input has been spent, we want to store which | ||
| /// transaction spent it. Later, this information can be used to unspent | ||
| /// or fully spend the input. | ||
| spender_of_inputs: HashMap<TxId, Vec<InputKey>>, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like -
| pub struct SpentInputs { | |
| /// Use LRU to support automatic clean up of old entries. | |
| spent_inputs: LruCache<InputKey, ()>, | |
| /// When it is unclear whether an input has been spent, we want to store which | |
| /// transaction spent it. Later, this information can be used to unspent | |
| /// or fully spend the input. | |
| spender_of_inputs: HashMap<TxId, Vec<InputKey>>, | |
| } | |
| pub struct SpentInputs { | |
| /// Use LRU to support automatic clean up of old entries. | |
| spent_inputs: LruCache<InputKey, ()>, | |
| /// Direct-indexed vec for transaction data | |
| tx_data: Vec<Option<(TxId, Vec<InputKey>)>>, | |
| /// Number of active entries | |
| tx_count: usize, | |
| } |
just an idea, given the following assumptions/reasoning -
- TxId already hashed, we don't want to double hash it for insertions
- HashMap has poor cache locality ~ if it is large enough then we might remove other important things from the cpu cache. i'm assuming here that this will be a huge cache with
xxx - i think it is worth it to benchmark with real characteristic of how the txpool calls these functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vec<Option<(TxId, Vec<InputKey>)>> means that we need to remove from the middle of the vector, plus the search here will be slow. It is possible that complexity will be O(n) instead of O(1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
search can be O(1) if we use https://www.ietf.org/archive/id/draft-eastlake-fnv-21.html / equivalent to compute an index with a given TxId.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still, removal is O(n)=) Plus this HashMap will be in most cases small or empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O(n) only in rare cases though. if you expect the hashmap to be small then there will be no collisions and therefore removal will be O(1) then
## Version 0.43.0 ### Breaking - [2882](#2882): Changed the type of the `resolved_outputs` for pre-confirmations. Now it also includes `Utxoid`. `resolved_outputs` field contains only `Change` and `Variable` outputs, so the `UtxoId` for them could be hard to derive, if transaction has known inputs. This information should help to create dependent transactions more easily. - [2900](#2900): Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. - [2909](#2909): Compressed block headers now include a merkle root of the temporal registry after compression was performed. - [2931](#2931): In `fuel-core-compression`, the `compress` function now takes a reference to `Config` instead of the value. ### Added - [2848](#2848): Link all components of preconfirmations and add E2E tests. - [2882](#2882): Listen to tx status update from `TxStatusManager` in `TxPool`. Added logic to clean up transactions from the pool if received squeezed out pre confirmations. Added logic to promote transactions on sentry nodes when receive pre-confirmation. - [2885](#2885): Notify P2P from `TxStatusManager` in case of bad preconfirmation message. - [2901](#2901): New query `dryRunRecordStorageReads` which works like `dryRun` but also returns storage reads, allowing use of execution tracer or local debugger - [2912](#2912): Add the `allow_partial` parameter to the `coinsToSpend` query. The default value of this parameters is `false` to preserve the old behavior. If set to `true`, the query returns available coins instead of failing when the requested amount is unavailable. - [2914](#2914): Tests ensuring the proof generation and validation of tables with sparse and merklized blueprints work. ### Changed - [2859](#2859): Swap out off-chain worker compression for dedicated compression service in `fuel-core-bin`. - [2914](#2914): Break out test logic to trait methods for `root_storage_tests` and `basic_merkleized_storage_tests` test macros. - [2925](#2925): Make preconfirmation optional on API endpoints. ### Fixed - [2918](#2918): Only cancel background work if primary RocksDB instance is dropped - [2935](#2935): The change rejects transactions immediately, if they use spent coins. `TxPool` has a SpentInputs LRU cache, storing all spent coins. ### Removed - [2859](#2859): Removed DA compression from off-chain worker in favor of dedicated compression service in `fuel-core-bin`. ## What's Changed * Rework `TxStatusManager` tests by @rafal-ch in #2871 * fix(storage): custom impl of EnumCount for MerkleizedColumn by @rymnc in #2875 * Update network versions on README by @github-actions in #2889 * fix(version-compatibility): pin async-graphql to 7.0.15 by @rymnc in #2891 * Fix proptest for tx status manager by @rafal-ch in #2893 * fault_proving(compression): glue code for integ into fuel-core by @rymnc in #2859 * Link and activate preconfirmations and add integrations tests by @AurelienFT in #2848 * refactor: Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. by @netrome in #2900 * fix(compression_service): post merge reviews by @rymnc in #2895 * Listen status updates from in TxStatusManager in TxPool by @AurelienFT in #2882 * chore(compression): include registry root in compressed block header by @rymnc in #2909 * Improve TxStatusManager tests coverage by @AurelienFT in #2911 * ci(benchmarks): run nightly benchmark and create PR by @rymnc in #2915 * fix: Only cancel background work if primary RocksDB instance is dropped by @netrome in #2918 * fix(ci): nightly benchmark by @rymnc in #2922 * fix(ci): explicitly push before creating PR by @rymnc in #2926 * Add allow_partial parameter to the "coins to spend" query by @AurelienFT in #2912 * fix(compression): improve robustness on startup and shutdown by @rymnc in #2923 * chore(compression): metrics for compression service by @rymnc in #2920 * chore(compression): pass compression config by reference by @rymnc in #2931 * Dry run execution tracing by @Dentosal in #2901 * Make preconfirmation optional on API endpoints by @AurelienFT in #2925 * Notify P2P in case of bad preconfirmation message by @AurelienFT in #2885 * chore(1.85): 1.85.0 readiness by @rymnc in #2937 * Reject transactions for already spent coins by @xgreenx in #2935 * feat: add tests for sparse and merkleized blueprint proof generation by @netrome in #2914 **Full Changelog**: v0.42.0...v0.43.0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
## Version 0.43.0 ### Breaking - [2882](FuelLabs/fuel-core#2882): Changed the type of the `resolved_outputs` for pre-confirmations. Now it also includes `Utxoid`. `resolved_outputs` field contains only `Change` and `Variable` outputs, so the `UtxoId` for them could be hard to derive, if transaction has known inputs. This information should help to create dependent transactions more easily. - [2900](FuelLabs/fuel-core#2900): Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. - [2909](FuelLabs/fuel-core#2909): Compressed block headers now include a merkle root of the temporal registry after compression was performed. - [2931](FuelLabs/fuel-core#2931): In `fuel-core-compression`, the `compress` function now takes a reference to `Config` instead of the value. ### Added - [2848](FuelLabs/fuel-core#2848): Link all components of preconfirmations and add E2E tests. - [2882](FuelLabs/fuel-core#2882): Listen to tx status update from `TxStatusManager` in `TxPool`. Added logic to clean up transactions from the pool if received squeezed out pre confirmations. Added logic to promote transactions on sentry nodes when receive pre-confirmation. - [2885](FuelLabs/fuel-core#2885): Notify P2P from `TxStatusManager` in case of bad preconfirmation message. - [2901](FuelLabs/fuel-core#2901): New query `dryRunRecordStorageReads` which works like `dryRun` but also returns storage reads, allowing use of execution tracer or local debugger - [2912](FuelLabs/fuel-core#2912): Add the `allow_partial` parameter to the `coinsToSpend` query. The default value of this parameters is `false` to preserve the old behavior. If set to `true`, the query returns available coins instead of failing when the requested amount is unavailable. - [2914](FuelLabs/fuel-core#2914): Tests ensuring the proof generation and validation of tables with sparse and merklized blueprints work. ### Changed - [2859](FuelLabs/fuel-core#2859): Swap out off-chain worker compression for dedicated compression service in `fuel-core-bin`. - [2914](FuelLabs/fuel-core#2914): Break out test logic to trait methods for `root_storage_tests` and `basic_merkleized_storage_tests` test macros. - [2925](FuelLabs/fuel-core#2925): Make preconfirmation optional on API endpoints. ### Fixed - [2918](FuelLabs/fuel-core#2918): Only cancel background work if primary RocksDB instance is dropped - [2935](FuelLabs/fuel-core#2935): The change rejects transactions immediately, if they use spent coins. `TxPool` has a SpentInputs LRU cache, storing all spent coins. ### Removed - [2859](FuelLabs/fuel-core#2859): Removed DA compression from off-chain worker in favor of dedicated compression service in `fuel-core-bin`. ## What's Changed * Rework `TxStatusManager` tests by @rafal-ch in FuelLabs/fuel-core#2871 * fix(storage): custom impl of EnumCount for MerkleizedColumn by @rymnc in FuelLabs/fuel-core#2875 * Update network versions on README by @github-actions in FuelLabs/fuel-core#2889 * fix(version-compatibility): pin async-graphql to 7.0.15 by @rymnc in FuelLabs/fuel-core#2891 * Fix proptest for tx status manager by @rafal-ch in FuelLabs/fuel-core#2893 * fault_proving(compression): glue code for integ into fuel-core by @rymnc in FuelLabs/fuel-core#2859 * Link and activate preconfirmations and add integrations tests by @AurelienFT in FuelLabs/fuel-core#2848 * refactor: Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. by @netrome in FuelLabs/fuel-core#2900 * fix(compression_service): post merge reviews by @rymnc in FuelLabs/fuel-core#2895 * Listen status updates from in TxStatusManager in TxPool by @AurelienFT in FuelLabs/fuel-core#2882 * chore(compression): include registry root in compressed block header by @rymnc in FuelLabs/fuel-core#2909 * Improve TxStatusManager tests coverage by @AurelienFT in FuelLabs/fuel-core#2911 * ci(benchmarks): run nightly benchmark and create PR by @rymnc in FuelLabs/fuel-core#2915 * fix: Only cancel background work if primary RocksDB instance is dropped by @netrome in FuelLabs/fuel-core#2918 * fix(ci): nightly benchmark by @rymnc in FuelLabs/fuel-core#2922 * fix(ci): explicitly push before creating PR by @rymnc in FuelLabs/fuel-core#2926 * Add allow_partial parameter to the "coins to spend" query by @AurelienFT in FuelLabs/fuel-core#2912 * fix(compression): improve robustness on startup and shutdown by @rymnc in FuelLabs/fuel-core#2923 * chore(compression): metrics for compression service by @rymnc in FuelLabs/fuel-core#2920 * chore(compression): pass compression config by reference by @rymnc in FuelLabs/fuel-core#2931 * Dry run execution tracing by @Dentosal in FuelLabs/fuel-core#2901 * Make preconfirmation optional on API endpoints by @AurelienFT in FuelLabs/fuel-core#2925 * Notify P2P in case of bad preconfirmation message by @AurelienFT in FuelLabs/fuel-core#2885 * chore(1.85): 1.85.0 readiness by @rymnc in FuelLabs/fuel-core#2937 * Reject transactions for already spent coins by @xgreenx in FuelLabs/fuel-core#2935 * feat: add tests for sparse and merkleized blueprint proof generation by @netrome in FuelLabs/fuel-core#2914 **Full Changelog**: FuelLabs/fuel-core@v0.42.0...v0.43.0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
## Version 0.43.0 ### Breaking - [2882](FuelLabs/fuel-core#2882): Changed the type of the `resolved_outputs` for pre-confirmations. Now it also includes `Utxoid`. `resolved_outputs` field contains only `Change` and `Variable` outputs, so the `UtxoId` for them could be hard to derive, if transaction has known inputs. This information should help to create dependent transactions more easily. - [2900](FuelLabs/fuel-core#2900): Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. - [2909](FuelLabs/fuel-core#2909): Compressed block headers now include a merkle root of the temporal registry after compression was performed. - [2931](FuelLabs/fuel-core#2931): In `fuel-core-compression`, the `compress` function now takes a reference to `Config` instead of the value. ### Added - [2848](FuelLabs/fuel-core#2848): Link all components of preconfirmations and add E2E tests. - [2882](FuelLabs/fuel-core#2882): Listen to tx status update from `TxStatusManager` in `TxPool`. Added logic to clean up transactions from the pool if received squeezed out pre confirmations. Added logic to promote transactions on sentry nodes when receive pre-confirmation. - [2885](FuelLabs/fuel-core#2885): Notify P2P from `TxStatusManager` in case of bad preconfirmation message. - [2901](FuelLabs/fuel-core#2901): New query `dryRunRecordStorageReads` which works like `dryRun` but also returns storage reads, allowing use of execution tracer or local debugger - [2912](FuelLabs/fuel-core#2912): Add the `allow_partial` parameter to the `coinsToSpend` query. The default value of this parameters is `false` to preserve the old behavior. If set to `true`, the query returns available coins instead of failing when the requested amount is unavailable. - [2914](FuelLabs/fuel-core#2914): Tests ensuring the proof generation and validation of tables with sparse and merklized blueprints work. ### Changed - [2859](FuelLabs/fuel-core#2859): Swap out off-chain worker compression for dedicated compression service in `fuel-core-bin`. - [2914](FuelLabs/fuel-core#2914): Break out test logic to trait methods for `root_storage_tests` and `basic_merkleized_storage_tests` test macros. - [2925](FuelLabs/fuel-core#2925): Make preconfirmation optional on API endpoints. ### Fixed - [2918](FuelLabs/fuel-core#2918): Only cancel background work if primary RocksDB instance is dropped - [2935](FuelLabs/fuel-core#2935): The change rejects transactions immediately, if they use spent coins. `TxPool` has a SpentInputs LRU cache, storing all spent coins. ### Removed - [2859](FuelLabs/fuel-core#2859): Removed DA compression from off-chain worker in favor of dedicated compression service in `fuel-core-bin`. ## What's Changed * Rework `TxStatusManager` tests by @rafal-ch in FuelLabs/fuel-core#2871 * fix(storage): custom impl of EnumCount for MerkleizedColumn by @rymnc in FuelLabs/fuel-core#2875 * Update network versions on README by @github-actions in FuelLabs/fuel-core#2889 * fix(version-compatibility): pin async-graphql to 7.0.15 by @rymnc in FuelLabs/fuel-core#2891 * Fix proptest for tx status manager by @rafal-ch in FuelLabs/fuel-core#2893 * fault_proving(compression): glue code for integ into fuel-core by @rymnc in FuelLabs/fuel-core#2859 * Link and activate preconfirmations and add integrations tests by @AurelienFT in FuelLabs/fuel-core#2848 * refactor: Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. by @netrome in FuelLabs/fuel-core#2900 * fix(compression_service): post merge reviews by @rymnc in FuelLabs/fuel-core#2895 * Listen status updates from in TxStatusManager in TxPool by @AurelienFT in FuelLabs/fuel-core#2882 * chore(compression): include registry root in compressed block header by @rymnc in FuelLabs/fuel-core#2909 * Improve TxStatusManager tests coverage by @AurelienFT in FuelLabs/fuel-core#2911 * ci(benchmarks): run nightly benchmark and create PR by @rymnc in FuelLabs/fuel-core#2915 * fix: Only cancel background work if primary RocksDB instance is dropped by @netrome in FuelLabs/fuel-core#2918 * fix(ci): nightly benchmark by @rymnc in FuelLabs/fuel-core#2922 * fix(ci): explicitly push before creating PR by @rymnc in FuelLabs/fuel-core#2926 * Add allow_partial parameter to the "coins to spend" query by @AurelienFT in FuelLabs/fuel-core#2912 * fix(compression): improve robustness on startup and shutdown by @rymnc in FuelLabs/fuel-core#2923 * chore(compression): metrics for compression service by @rymnc in FuelLabs/fuel-core#2920 * chore(compression): pass compression config by reference by @rymnc in FuelLabs/fuel-core#2931 * Dry run execution tracing by @Dentosal in FuelLabs/fuel-core#2901 * Make preconfirmation optional on API endpoints by @AurelienFT in FuelLabs/fuel-core#2925 * Notify P2P in case of bad preconfirmation message by @AurelienFT in FuelLabs/fuel-core#2885 * chore(1.85): 1.85.0 readiness by @rymnc in FuelLabs/fuel-core#2937 * Reject transactions for already spent coins by @xgreenx in FuelLabs/fuel-core#2935 * feat: add tests for sparse and merkleized blueprint proof generation by @netrome in FuelLabs/fuel-core#2914 **Full Changelog**: FuelLabs/fuel-core@v0.42.0...v0.43.0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
## Version 0.43.0 ### Breaking - [2882](FuelLabs/fuel-core#2882): Changed the type of the `resolved_outputs` for pre-confirmations. Now it also includes `Utxoid`. `resolved_outputs` field contains only `Change` and `Variable` outputs, so the `UtxoId` for them could be hard to derive, if transaction has known inputs. This information should help to create dependent transactions more easily. - [2900](FuelLabs/fuel-core#2900): Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. - [2909](FuelLabs/fuel-core#2909): Compressed block headers now include a merkle root of the temporal registry after compression was performed. - [2931](FuelLabs/fuel-core#2931): In `fuel-core-compression`, the `compress` function now takes a reference to `Config` instead of the value. ### Added - [2848](FuelLabs/fuel-core#2848): Link all components of preconfirmations and add E2E tests. - [2882](FuelLabs/fuel-core#2882): Listen to tx status update from `TxStatusManager` in `TxPool`. Added logic to clean up transactions from the pool if received squeezed out pre confirmations. Added logic to promote transactions on sentry nodes when receive pre-confirmation. - [2885](FuelLabs/fuel-core#2885): Notify P2P from `TxStatusManager` in case of bad preconfirmation message. - [2901](FuelLabs/fuel-core#2901): New query `dryRunRecordStorageReads` which works like `dryRun` but also returns storage reads, allowing use of execution tracer or local debugger - [2912](FuelLabs/fuel-core#2912): Add the `allow_partial` parameter to the `coinsToSpend` query. The default value of this parameters is `false` to preserve the old behavior. If set to `true`, the query returns available coins instead of failing when the requested amount is unavailable. - [2914](FuelLabs/fuel-core#2914): Tests ensuring the proof generation and validation of tables with sparse and merklized blueprints work. ### Changed - [2859](FuelLabs/fuel-core#2859): Swap out off-chain worker compression for dedicated compression service in `fuel-core-bin`. - [2914](FuelLabs/fuel-core#2914): Break out test logic to trait methods for `root_storage_tests` and `basic_merkleized_storage_tests` test macros. - [2925](FuelLabs/fuel-core#2925): Make preconfirmation optional on API endpoints. ### Fixed - [2918](FuelLabs/fuel-core#2918): Only cancel background work if primary RocksDB instance is dropped - [2935](FuelLabs/fuel-core#2935): The change rejects transactions immediately, if they use spent coins. `TxPool` has a SpentInputs LRU cache, storing all spent coins. ### Removed - [2859](FuelLabs/fuel-core#2859): Removed DA compression from off-chain worker in favor of dedicated compression service in `fuel-core-bin`. ## What's Changed * Rework `TxStatusManager` tests by @rafal-ch in FuelLabs/fuel-core#2871 * fix(storage): custom impl of EnumCount for MerkleizedColumn by @rymnc in FuelLabs/fuel-core#2875 * Update network versions on README by @github-actions in FuelLabs/fuel-core#2889 * fix(version-compatibility): pin async-graphql to 7.0.15 by @rymnc in FuelLabs/fuel-core#2891 * Fix proptest for tx status manager by @rafal-ch in FuelLabs/fuel-core#2893 * fault_proving(compression): glue code for integ into fuel-core by @rymnc in FuelLabs/fuel-core#2859 * Link and activate preconfirmations and add integrations tests by @AurelienFT in FuelLabs/fuel-core#2848 * refactor: Get rid of `Deref` impl on `ImportResult` by introducing wrapper type. by @netrome in FuelLabs/fuel-core#2900 * fix(compression_service): post merge reviews by @rymnc in FuelLabs/fuel-core#2895 * Listen status updates from in TxStatusManager in TxPool by @AurelienFT in FuelLabs/fuel-core#2882 * chore(compression): include registry root in compressed block header by @rymnc in FuelLabs/fuel-core#2909 * Improve TxStatusManager tests coverage by @AurelienFT in FuelLabs/fuel-core#2911 * ci(benchmarks): run nightly benchmark and create PR by @rymnc in FuelLabs/fuel-core#2915 * fix: Only cancel background work if primary RocksDB instance is dropped by @netrome in FuelLabs/fuel-core#2918 * fix(ci): nightly benchmark by @rymnc in FuelLabs/fuel-core#2922 * fix(ci): explicitly push before creating PR by @rymnc in FuelLabs/fuel-core#2926 * Add allow_partial parameter to the "coins to spend" query by @AurelienFT in FuelLabs/fuel-core#2912 * fix(compression): improve robustness on startup and shutdown by @rymnc in FuelLabs/fuel-core#2923 * chore(compression): metrics for compression service by @rymnc in FuelLabs/fuel-core#2920 * chore(compression): pass compression config by reference by @rymnc in FuelLabs/fuel-core#2931 * Dry run execution tracing by @Dentosal in FuelLabs/fuel-core#2901 * Make preconfirmation optional on API endpoints by @AurelienFT in FuelLabs/fuel-core#2925 * Notify P2P in case of bad preconfirmation message by @AurelienFT in FuelLabs/fuel-core#2885 * chore(1.85): 1.85.0 readiness by @rymnc in FuelLabs/fuel-core#2937 * Reject transactions for already spent coins by @xgreenx in FuelLabs/fuel-core#2935 * feat: add tests for sparse and merkleized blueprint proof generation by @netrome in FuelLabs/fuel-core#2914 **Full Changelog**: FuelLabs/fuel-core@v0.42.0...v0.43.0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Our e2e tests were flaky, example: https://github.com/FuelLabs/fuel-core/actions/runs/14343235447/job/40207476637
The reason was that during transaction reconciliation(after we fixed that), we included transactions that had already been executed and confirmed in the pending pool. After the timeout on the pending pool we will remove all dependent transactions, and in the case of the test, it was a transaction from another test suite that used
Changeoutput(which already was confirmed and existed on the chain) of the transaction from the first test suite.So basically, the e2e tests revealed that it was possible to submit transactions with already spent inputs, which will be included in the pending pool and later discarded along with all dependent transactions(even if outputs already were stored on the chain as coins).
This change rejects transactions immediately, if they use spent coins. TxPool has a
SpentInptusLRU cache, storing all spent coins.Checklist
Before requesting review