Skip to content
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

morpheus-cli hangs during transfer action #603

Closed
yesil opened this issue Nov 3, 2023 · 4 comments · Fixed by #571
Closed

morpheus-cli hangs during transfer action #603

yesil opened this issue Nov 3, 2023 · 4 comments · Fixed by #571
Assignees
Labels
bug Something isn't working

Comments

@yesil
Copy link

yesil commented Nov 3, 2023

I followed examples/morpheusvm/README.md and the token transfer step seems to be hanging constantly.

database: .morpheus-cli
address: morpheus1rvzhmceq997zntgvravfagsks6w0ryud3rylh4cdvayry0dl97nsp30ucp
chainID: 2eoHq1wiumDYpBErNHSFE7YV25uwtgBRhH1W6wFdCggkPT5HsS
balance: 9999998999.999975204 RED
recipient: morpheus1fl5nngach956zeng90c0jm9m9c8h499nk5kaz559ld56vskfkreqh74sk6
amount: 10
continue (y/n): y
@patrick-ogrady
Copy link
Contributor

Were you able to capture any interesting logs during this?

@yesil
Copy link
Author

yesil commented Nov 6, 2023

I added extra logs, and it seems it is not able to find the txID.
After ctrl+C I was able to confirm that the actual transfer succeeded.

image

@patrick-ogrady
Copy link
Contributor

patrick-ogrady commented Nov 6, 2023

I figured this out. This is because the default mode in ./scripts/run.sh no longer keeps a tx index (it does get confirmed on-chain, I was able to repro). I need to migrate the CLI to use websockets:

https://github.com/ava-labs/hypersdk/blob/f735d9422ef7db029ec64bb26a2bf9af563dac98/examples/morpheusvm/cmd/morpheus-cli/cmd/resolutions.go#L24C1-L48

In the meantime, I'll revert this default change and it should work in the next release.

@patrick-ogrady
Copy link
Contributor

patrick-ogrady commented Nov 6, 2023

I decided to rip the bandaid off and just migrate the CLI to use WS. I already made this change on tokenvm but forgot to port it to morpheusvm:

var res *chain.Result
for {
txID, dErr, result, err := scli.ListenTx(ctx)
if dErr != nil {
return false, ids.Empty, dErr
}
if err != nil {
return false, ids.Empty, err
}
if txID != tx.ID() {
continue
}
res = result
break
}

@patrick-ogrady patrick-ogrady self-assigned this Nov 6, 2023
@patrick-ogrady patrick-ogrady added the bug Something isn't working label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants