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

Invalidation of the Metadata cache after Transaction modification #516

Open
xgreenx opened this issue Jul 20, 2023 · 0 comments
Open

Invalidation of the Metadata cache after Transaction modification #516

xgreenx opened this issue Jul 20, 2023 · 0 comments
Labels
bug Something isn't working tech-debt

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Jul 20, 2023

The Metadata shouldn't affect the correctness of the code. We use it during serialization/deserialization and caching of the transaction id. If someone modifies the transaction after caching, the cache and transaction may be invalid or create incorrect behaviors.

Maybe we need to invalidate the cache if someone modifies the transaction(or if someone modifies only valuable parts). Or wrap the transaction into a Cached type as we did with Checked.

Note: The Interpreter also modifies the transaction outputs, but they shouldn't invalidate the cache.

Ref FuelLabs/sway@4c9ad3e

@xgreenx xgreenx added the bug Something isn't working label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tech-debt
Projects
None yet
Development

No branches or pull requests

1 participant