-
Notifications
You must be signed in to change notification settings - Fork 7
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
398 client runner #400
398 client runner #400
Conversation
…with new client - info pallet
Co-authored-by: Marcel Ebert <[email protected]>
Co-authored-by: Marcel Ebert <[email protected]>
Co-authored-by: Marcel Ebert <[email protected]>
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.
Looks good overall, I just left some comments about minor issues.
How would you suggest we approach this kind of test? |
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.
The code looks good overall.
How sure are we that this works as expected though @gianfra-t? You said you tested it locally once and it worked with downloading the binary from a target location and replacing the current vault executable, correct?
Yes. I tested locally with a release of the client and also tested updating it on a local chain. It detected the changes and downloaded/started the new one. |
I also tested it and can confirm that the runner manages to read the URL stored in the clients-info pallet and downloads the release from there. However, the checksum did not match. To make it work regardless, I just used the hash that the runner calculates and put that on chain. Afterward, downloading etc. worked. But this is not an ideal solution of course. |
I actually had the same problem, the polkadot.js hash did not work. I thought it was a problem with it so I used this tool. Do you think it is a different hashing algorithm/implementation? |
Yes, let's try to use the same hashing algorithm for convenience. I tried to find what polkadot.js uses and I think it is blake2. The UI calls this function and according to this test it uses blake2 by default but can be overridden with a custom definition here. I think we don't specify a custom hasher so let's try hashing with blake2 in the vault client and see if the checksum then matches the one generated by polkadot.js upon file upload. Update: |
I would say It really boils down to the deployment workflow we want. |
Alright. Let's stick to sha256 and not rely on the hash shown in polkadot.js. It's just a UI and we can use other means, like e.g. the tool you linked to. |
It's the issue related to stellar update, so let's wait for that to be solved and we can merge those changes. |
I'll merge this since the ubuntu CI job passed. |
Addition of an implementation of the runner client taken from interlay clients.
In summary, the runner fetches periodically for the on-chain information about the vault client, both download URI and checksum. It will then proceed to download and execute it, also checking for new releases and handling them.
The only difference on this implementation is: