-
Notifications
You must be signed in to change notification settings - Fork 2
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
save app params #65
save app params #65
Conversation
🦋 Changeset detectedLatest commit: 6249c29 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
It seems that this solution, as well as #64, does not handle the case where the chain-id can change without changing the RPC |
chain-id should not change for the lifetime of the chain. if chain-id changes without changing the rpc, the rpc is serving a new chain. at this point all local state is invalid. since chain-id is part of idb name in the storage package services will connect to a (probably new) idb database correct for the chain, and begin sync. this is equivalent to clearing the cache, but the old chain-id state remains available the old database name. there is not really a correct solution to this unless idb connection names are changed |
All the time we had only one RPC for the testnet, while the chain-id changed many times. If RPC starts serving a new chain, then when indexed-db is initialized, the chain-id from local storage (old chain) will be used. This means that the data of the new chain will be written to the same database on top of the old data, and this will probably lead to various bugs |
you're correct, sorry. i had some logic previously in sercices-context init that i believe was comprehensive |
on phone rn and difficult to link properly but ab9d743 of penumbra-zone web should contain something usable that could be copied from services-context index |
We can actually prioritize remote params, and only if they are not available use locally stored params |
9a3e352
to
2fe1e7d
Compare
2fe1e7d
to
6249c29
Compare
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!
But it seems that extension without network doesn't work as expected (you can't see your balances)
at some point saving app params to local was removed.
this restores ability to operate offline.
edit: fixes #32
accidentally duplicating work in #64