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

cli bug: Cache doesn't take into account target chain #206

Open
dangush opened this issue Sep 16, 2024 · 0 comments
Open

cli bug: Cache doesn't take into account target chain #206

dangush opened this issue Sep 16, 2024 · 0 comments
Labels
bug Something isn't working devx Issues related to improving dev experience / tooling quartz-cli

Comments

@dangush
Copy link
Contributor

dangush commented Sep 16, 2024

Summary

I noticed when switching between transacting on a local wasmd chain and the DO node that the cache will provide the wrong code_id / contract due to not updating when the user changes which chain they are interacting with.

The solution is to make the cache entry include the a unique identifier for the chain being interacted with, with cache reading functions taking this identifier as input to know which code_id to provide.

I'm not exactly sure what an appropriate unique identifier would be, however, since chain_id isn't guaranteed to be unique. However, maybe this is to be ignored? Not sure what the convention is within the cosmos ecosystem for this kind of thing.

Also, the cache reading functions should be more resilient as to not throw a panic/error if, for example, a file exists in the cache for a given contract but is empty instead of containing the code_id (which can happen if the user manually deletes the contents of the file). Such a case should just cause the cache to behave as though the cache is empty.

Acceptance Criteria

@dangush dangush changed the title Cache doesn't take into account target chain CLI UX: Cache doesn't take into account target chain Sep 16, 2024
@dangush dangush added bug Something isn't working devx Issues related to improving dev experience / tooling quartz-cli labels Sep 16, 2024
@dangush dangush changed the title CLI UX: Cache doesn't take into account target chain cli bug: Cache doesn't take into account target chain Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working devx Issues related to improving dev experience / tooling quartz-cli
Projects
None yet
Development

No branches or pull requests

1 participant