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

Make ResourceCache Owner-Aware #3696

Open
Torres-ssf opened this issue Feb 11, 2025 · 0 comments · May be fixed by #3697
Open

Make ResourceCache Owner-Aware #3696

Torres-ssf opened this issue Feb 11, 2025 · 0 comments · May be fixed by #3697
Assignees
Labels
chore Issue is a chore

Comments

@Torres-ssf
Copy link
Contributor

Because of updates in fuel-core 0.41, the coinsToSpend query now limits how many resources can be ignored when fetching resources. This limit is set by the max_inputs value in the chain configuration.

As a result, we need to update the resource cache logic on the ResourceCache class. Currently, the cache does not track which owner a resource belongs to; it combines UTXO IDs and Message nonces from different owners.

However, since the coinsToSpend query is meant for a single owner, the cache needs to be changed to handle ownership. This way, when calling coinsToSpend, we will be able to exclude resources that belong to one specific user, making it less likely to exceed the max_inputs limit.

@Torres-ssf Torres-ssf self-assigned this Feb 11, 2025
@Torres-ssf Torres-ssf linked a pull request Feb 11, 2025 that will close this issue
4 tasks
@Torres-ssf Torres-ssf added the chore Issue is a chore label Feb 18, 2025
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 a pull request may close this issue.

1 participant