FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.26k stars 1.34k forks source link

UTXOs Cache Mechanism Needs To Consider Message Nonces #2855

Closed Torres-ssf closed 1 month ago

Torres-ssf commented 1 month ago

The current UTXOs cache mechanism needs to be refactored to include caching of message nonces. This is essential because message coins, uniquely identified by their nonces, are resources that can be used to fund transactions.

The cache mechanism must account for message coins to ensure the SDK is aware of all resources to be spent. This refactor will prevent errors such as the SDK using the same message to fund multiple transactions submitted within a short period of time (to be processed and mined at the same node).

arboleya commented 1 month ago

Consider mentioning why we enable cache by default in the docs: