-
Notifications
You must be signed in to change notification settings - Fork 217
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
Blockchain tip not set in REST context #1647
Comments
Thanks for the report. I can reproduce this error locally with the |
I recall a configuration change in Jörmungandr regarding the API prefix. It used to be included in the configuration but was later removed and assumed to always be "/api" and implicitly required. Could it be linked? |
If I am not mistaken the issue is that currently during Jormungandr bootstrap when you ask it for a network tip the response is Start Jorm:
Check status:
While it is boostrapping, try to get the tip:
And I suppose this is what is happening, we are asking for tip while Jormungandr is still bootsrapping and it returns 500 then. Probably here -> https://github.com/input-output-hk/cardano-wallet/blob/master/lib/jormungandr/src/Cardano/Wallet/Jormungandr/Network.hs#L277, instead of asking for tip make sure that Jormungandr is no longer in Boostrapping state. |
Doh ... it keeps changing. The endpoint used to return HTTP status 503 during bootstrap. But before that I think it did return 500 - however now we consider 500 to be a fatal error. |
Well, the alternative is to raise error in Jormungandr and desrcibe what would we expect. 🤷♂️ |
1681: jormungandr: Fix "Blockchain tip not set in REST context" r=piotr-iohk a=rvl ### Issue Number Resolves #1647 Resolves #1649 ### Overview Jormungandr seems to have changed the HTTP response status code for bootstrap again. This will fix the resulting error, in such a way that if the status code changes back to 503, things will still work. ### Comments It may be better to poll the `/api/v0/node/stats`, but that would be a substantially bigger code change. Tested with: cardano-wallet-jormungandr launch --port 8090 --genesis-block-hash 8e4d2a343f3dcf9330ad9035b3e8d168e6728904262f2c434a4f8f934ec7b676 --state-dir ../blockchains/state-itn_rewards_v1.2020-05-06 -- --config itn_rewards_v1-config.yaml Co-authored-by: Rodney Lorrimar <[email protected]>
Context
Unless I'm missing some configuration changes, it appears that the latest two cardano-wallet versions don't work paired with jormungandr. Either with existing or wiped database (chain folder).
Steps to Reproduce
$ cardano-wallet launch --node-port 3100 --genesis-block-hash $(cat genesis-hash.txt) -- --config ./stakepool-config.yaml
Above referenced files exist and are valid, as previous versions of cardano-wallet and jormungandr v0.8.15 and v0.8.18 on their own run well with them.
Expected behavior
Jormungandr bootstraps successfully and cardano-wallet starts communicating with it.
Actual behavior
Fails as follows:
Resolution
QA
The text was updated successfully, but these errors were encountered: