Closed anilmurty closed 1 year ago
This is dependent on the RPC node (and blockchain) responding back with the state of the certificates but we should at least add a wait. state to the user so they know that things are happening
Hi @anilmurty , wanted to work on it, can you please assign it to me. I will happily take it as my first PR :)
Hi @anilmurty, trying to regenerate the issue, am i going in the right direction?
hey @yshsaxena - thanks for helping out on this. The specific page is actually the preflight check page (/new-deployment/akash-games/tetris/preflight-check) not the cert generation page, that needs some kind of loading state to let the user know that the app is waiting on the rpc node (and blockchain) to query the cert list and come back.
So from the state you have (no active certs) - leave that as-is, then go and deploy something (just pick fun & games | tetris for example) and then when you get there and see this page:
When you click generate cert the app will show no wait state but it is actually waiting on the new cert to be available on the blockchain. If you wait long enough or refresh the page, you'll see the state change. This is where we need the wait state
Hi @anilmurty, thanks for your help, what I observed is that "Create Certificate" button in preflight page is same as "Generate new certificate" button in settings, If yes, then shouldn't we use the same code as we are doing in Setting page?
@yshsaxena - it should ideally be using the same logic but it is totally possible that it isn't, right now.
My best guess is that it is missing a "setShowProgress(true)" and "refetch()" and some more logic that settings has:
const handleCreateCertificate = React.useCallback(async () => {
setShowProgress(true);
await createAndBroadcastCertificate(rpcEndpoint(), keplr);
refetch();
setCreateOpen(false);
}, [keplr]);
vs
const handleCreateCertificate = async () => {
const result = await createAndBroadcastCertificate(rpcEndpoint(), keplr);
if (result.code === 0 && result.certificate) {
setCertificate(result.certificate);
}
};
but don't take my word for it -- @jtary is the tech lead for Console and will be able to provide better guidance on the differences and what's needed.
Hi @anilmurty, thanks for assigned it to me, I have came up with this, any suggestions?
@yshsaxena - that looks great! A minor suggestion and a couple questions:
Hi @anilmurty, thanks for the feedback, let me do a full deployment check then I will be able to give answer of your question, but for that do I have to buy some AKT?
@yshsaxena - Please share the keplr AKT wallet address you want to use for deploys here and I'll send you 10 $AKT to use for deployments (you should be able to test 100s of deployments with that, if you don't keep them running and just use for test)
Hi @anilmurty, here is my AKT wallet address "cosmos105ucpt4sqana3ayy0jaylvvtm9qkgsf87dgva8". thanks in advance.
@yshsaxena - that's your cosmos wallet. need your akash walllet addr. something like "akash1tf5avu5d4fh..."
"akash105ucpt4sqana3ayy0jaylvvtm9qkgsf8nk9tya"
sent - please confirm 10AKT received
received
Yeah!! its working, without refresh, status is changing.
awesome! - once you confirm a deployment (you can test a games | tetris deploy or something simple) and close it out (delete). If that full cycle works, you can raise the PR
Hi @anilmurty, while deploying, it showing me this error, any idea? also just created a certificate last night, now i have only 4.9 ATK.
You need to accept a bid and deploy.
Do you have any open deployments in your deployments list. Close them and you'll get your 5AKT escrow back
Check the deploy docs (link I posted above)
What is DSEQ? where will i find it?
Got it
Hi @anilmurty, I have tested the full deployment and it is working fine, PFB the screenshot.
Good work @yshsaxena ! - this sounds like it is ready for a PR - please open one and @jtary can help review/ merge.
Side note - you may want to close any open deployments from the deployments list, so as to preserve AKT (unless they're actual valid deployments that you want to keep running)
Hi @anilmurty, I have raised a Pull request regarding this issue, Kindly review. and please let me know if I did something wrong.
Looks good to me. Thanks @yshsaxena. @jtary should be able to review and merge during the US day time.
Describe the bug Generating a certificate from the pre-flight check page, can take anywhere from several seconds to several minutes to update certificate state, causing users to either 1) think the app is broken and abandon it or 2) think that they need to regenerate (and click the button multiple times, leading to multiple certs being created).
To Reproduce Steps to reproduce the behavior:
Expected behavior Should refresh instantaneously (1-2secs) so that the user does not regenerate certificates and/ or doesn't refresh the page (which will cause SDL to be invalid) or assume that the product is broken and give up.
If it is not possible for Console to speed this up (because it is dependent on the RPC node responding after querying the blockchain) then we should AT LEAST add a wait/ loading state.
The specific page is the preflight check page (/new-deployment/akash-games/tetris/preflight-check) not the cert generation page, that needs some kind of loading state to let the user know that the app is waiting on the rpc node (and blockchain) to query the cert list and come back.
So from the state you have (no active certs) - leave that as-is, then go and deploy something (just pick fun & games | tetris for example) and then when you get there and see this page:
When you click generate cert the app will show no wait state but it is actually waiting on the new cert to be available on the blockchain. If you wait long enough or refresh the page, you'll see the state change. This is where we need the wait state