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
Quartz initialization requires initializing a light client which requires a trusted height and hash. Currently we set the trusted height to 1 and fetch the corresponding hash. However if the chain is already more than a couple weeks old, this will be stale (outside the trusting period) and light client verification will fail. Dave just ran into this issues since our remote chain is now >2 weeks old.
Instead when we setup the light client we should fetch the most recent height and hash and use that instead.
The light client setup happens in the start.sh script
We currently do a silly thing where we try to get a proof for height 1 with a bogus hash, and then we let it print the correct hash. This is completely unnecessary. Instead we should just query the blockchain for the latest block, and get the latest hash from that.
Instead we should figure out how to use variables in the manifest file, so we can just set those variables instead of having to use sed and overwrite things.
This is similar to what we want to do with passing in the port per #77
Currently to get things working Dave just hardcoded a new hash for himself, but we should do it properly. That will clean up the start.sh script, make sure we don't run into this problem again, and it will make it easier to build the quartz start command per #61
The text was updated successfully, but these errors were encountered:
Quartz initialization requires initializing a light client which requires a trusted height and hash. Currently we set the trusted height to 1 and fetch the corresponding hash. However if the chain is already more than a couple weeks old, this will be stale (outside the trusting period) and light client verification will fail. Dave just ran into this issues since our remote chain is now >2 weeks old.
Instead when we setup the light client we should fetch the most recent height and hash and use that instead.
The light client setup happens in the
start.sh
scriptWe currently do a silly thing where we try to get a proof for height 1 with a bogus hash, and then we let it print the correct hash. This is completely unnecessary. Instead we should just query the blockchain for the latest block, and get the latest hash from that.
The other thing we do is hardcode the height and hash in the manifest file: https://github.com/informalsystems/cycles-quartz/blob/main/apps/transfers/enclave/quartz.manifest.template#L24
And we use
sed
to overwrite the value of the hash: https://github.com/informalsystems/cycles-quartz/blob/main/apps/transfers/scripts/start.sh#L42Instead we should figure out how to use variables in the manifest file, so we can just set those variables instead of having to use sed and overwrite things.
This is similar to what we want to do with passing in the port per #77
Currently to get things working Dave just hardcoded a new hash for himself, but we should do it properly. That will clean up the start.sh script, make sure we don't run into this problem again, and it will make it easier to build the
quartz start
command per #61The text was updated successfully, but these errors were encountered: