You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of the removal of 09-localhost light client implementation, we need to add migration logic in order to delete any localhost existing in the client store.
The following should be done in two separate PRs:
Genesis migration logic
Upgrade handler migration logic
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged/assigned
The text was updated successfully, but these errors were encountered:
The migration logic should iterate through all client states and check if the clientID matches "localhost". The idea is to remove any existing localhost client (if it was created). Note there can only be one localhost client, so the could may break early if it is found and deleted.
I question whether we need genesis migrations, since there is only 1 localhost. The chain doing a dump state/restart could manually remove the localhost and its associated consensus states (this is assuming a chain ever enabled a localhost client that doesn't function).
If we do decide to support genesis migrations. They should be done in a similar way to v1 migrations.
Here is the entry point (note, I'd name the directory v5 (or whatever migration this is for) instead of v500. There should be a corresponding function called in 02-client. This should iterate over all the clients and look for a client with the name exported.Localhost. Note, we will need the old localhost proto files generated into this folder and it needs to implement the ClientState interface, in the same way I did for the solomachine. Once you find the localhost, delete it from the genesis and delete all of its consensus states. You'll need to find the consensus states as well
Good tests should be written. I ran into many subtle bugs writing the previous migration code for v1
Flagged with needs discussion during planning session. It seems unlikely that anyone has ever used the 09-localhost so if it's not necessary to write the migration it might be best to not waste developer time.
Summary
As part of the removal of
09-localhost
light client implementation, we need to add migration logic in order to delete any localhost existing in the client store.The following should be done in two separate PRs:
For Admin Use
The text was updated successfully, but these errors were encountered: