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

Wallet is crashing while connecting to local node. EraIndex: invalid index 4 #2839

Closed
3 tasks done
got3nks opened this issue Aug 23, 2021 · 3 comments
Closed
3 tasks done
Labels

Comments

@got3nks
Copy link

got3nks commented Aug 23, 2021

Just checking...

  • This is a cardano-wallet bug.
  • I am using the latest cardano-wallet release.
  • I am using the correct cardano-node version for that release of cardano-wallet.

Version

2021-08-11 (git revision: 9cc1b56)

Platform

Linux 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Installation method

IOHK Docker image

Network configuration

mainnet

Context

No response

Description

We recently updated the docker images to latest versions:

image: inputoutput/cardano-wallet:latest
image: inputoutput/cardano-node:latest

The node is sync'd but the wallet is failing to connect to the node throwing an exception.

[cardano-wallet.main:Info:4] [2021-08-23 13:32:13.96 UTC] Running as v2021-08-11 (git revision: 9cc1b563cd2363b1fd878ac5fe6aff874b36a1b8) on x86_64-linux
[cardano-wallet.main:Info:4] [2021-08-23 13:32:13.97 UTC] Command line: /bin/cardano-wallet serve --node-socket /ipc/node.socket --database /wallet-db --listen-address 0.0.0.0 --mainnet
[cardano-wallet.main:Debug:4] [2021-08-23 13:32:13.97 UTC] ServeArgs {_hostPreference = Host "0.0.0.0", _listen = ListenOnPort 8090, _tlsConfig = Nothing, _nodeSocket = CardanoNodeConn "/ipc/node.socket", _networkConfiguration = MainnetConfig, _database = Just "/wallet-db", _syncTolerance = SyncTolerance 300s, _enableShutdownHandler = False, _poolMetadataSourceOpt = Nothing, _tokenMetadataSourceOpt = Nothing, _logging = LoggingOptions {loggingMinSeverity = Debug, loggingTracers = Tracers {applicationTracer = Const (Just Info), apiServerTracer = Const (Just Info), tokenMetadataTracer = Const (Just Info), walletEngineTracer = Const (Just Info), walletDbTracer = Const (Just Info), poolsEngineTracer = Const (Just Info), poolsDbTracer = Const (Just Info), ntpClientTracer = Const (Just Info), networkTracer = Const (Just Info)}, loggingTracersDoc = Nothing}}
[cardano-wallet.main:Info:4] [2021-08-23 13:32:13.98 UTC] Wallet databases: Using directory: /wallet-db
[cardano-wallet.application:Info:4] [2021-08-23 13:32:13.98 UTC] Wallet backend server starting. Using /ipc/node.socket.
[cardano-wallet.application:Info:4] [2021-08-23 13:32:13.98 UTC] Node is Haskell Node on mainnet.
[cardano-wallet.token-metadata:Notice:4] [2021-08-23 13:32:14.04 UTC] No token metadata server is configured.
[cardano-wallet.wallet-db:Info:4] [2021-08-23 13:32:14.05 UTC] Found existing wallet: xxxx
[cardano-wallet.wallet-db:Info:24] [2021-08-23 13:32:14.06 UTC] Starting connection pool for /wallet-db/rnd.xxxx.sqlite
[cardano-wallet.token-metadata:Notice:4] [2021-08-23 13:32:14.17 UTC] No token metadata server is configured.
[cardano-wallet.token-metadata:Notice:4] [2021-08-23 13:32:14.17 UTC] No token metadata server is configured.
[cardano-wallet.token-metadata:Notice:4] [2021-08-23 13:32:14.17 UTC] No token metadata server is configured.
[cardano-wallet.pools-db:Info:4] [2021-08-23 13:32:14.17 UTC] Starting connection pool for /wallet-db/stake-pools.sqlite
[cardano-wallet.wallet-engine:Info:36] [2021-08-23 13:32:14.17 UTC] 55b40651: Chain following starting. Requesting intersection using 11 checkpoints, the latest being 55c06e88<-[d641dfdb-38156809#6149627]
[cardano-wallet.main:Info:4] [2021-08-23 13:32:14.45 UTC] Wallet backend server listening on http://0.0.0.0:8090/
[cardano-wallet.pools-engine:Info:57] [2021-08-23 13:32:14.50 UTC] Chain following starting. Requesting intersection using 2160 checkpoints, the latest being 55c06e88<-[d641dfdb-38156809#6149627]
[cardano-wallet.network:Warning:13] [2021-08-23 13:32:15.08 UTC] Connection lost with the node.
[cardano-wallet.network:Notice:13] [2021-08-23 13:32:15.33 UTC] Couldn't connect to node (x2). Retrying in a bit...
[cardano-wallet.api-server:Info:80] [2021-08-23 13:32:15.45 UTC] [RequestId 0] [GET] /v2/network/information
[cardano-wallet.pools-db:Info:4] [2021-08-23 13:32:15.76 UTC] Stopping database connection pool /wallet-db/stake-pools.sqlite
[cardano-wallet.pools-db:Info:4] [2021-08-23 13:32:15.76 UTC] Closing single database connection (/wallet-db/stake-pools.sqlite)
[cardano-wallet.main:Debug:4] [2021-08-23 13:32:15.76 UTC] Logging shutdown.
cardano-wallet: ExceptionInLinkedThread (ThreadId 11) (BlockedIndefinitely {blockedIndefinitelyCallStack = [("wrapBlockedIndefinitely",SrcLoc {srcLocPackage = "io-classes-0.2.0.0-8vqCa9RxYeSIAHkGOEppTU", srcLocModule = "Control.Monad.Class.MonadSTM", srcLocFile = "src/Control/Monad/Class/MonadSTM.hs", srcLocStartLine = 296, srcLocStartCol = 16, srcLocEndLine = 296, srcLocEndCol = 39}),("atomically",SrcLoc {srcLocPackage = "cardano-wallet-core-2021.8.11-9CfWGxilOndlEXObu7PRN", srcLocModule = "Ouroboros.Network.Client.Wallet", srcLocFile = "src/Ouroboros/Network/Client/Wallet.hs", srcLocStartLine = 628, srcLocStartCol = 5, srcLocEndLine = 628, srcLocEndCol = 32})], blockedIndefinitelyException = thread blocked indefinitely in an STM transaction})

The Cardano node log shows this error:

[1279f053:cardano.node.LocalErrorPolicy:Error:661] [2021-08-23 13:32:14.08 UTC] IP LocalAddress "" ErrorPolicyUnhandledApplicationException DecoderFailure (LocalStateQuery HardForkBlock (': * ByronBlock (': * (ShelleyBlock (ShelleyEra StandardCrypto)) (': * (ShelleyBlock (ShelleyMAEra 'Allegra StandardCrypto)) (': * (ShelleyBlock (ShelleyMAEra 'Mary StandardCrypto)) ('[] *))))) Query (HardForkBlock (': * ByronBlock (': * (ShelleyBlock (ShelleyEra StandardCrypto)) (': * (ShelleyBlock (ShelleyMAEra 'Allegra StandardCrypto)) (': * (ShelleyBlock (ShelleyMAEra 'Mary StandardCrypto)) ('[] *))))))) ClientAgency TokAcquired) (DeserialiseFailure 7 "EraIndex: invalid index 4")

@got3nks got3nks added the Bug label Aug 23, 2021
@piotr-iohk
Copy link
Contributor

I think this is a node issue as latest tag does not point to latest version. (https://hub.docker.com/r/inputoutput/cardano-node/tags?page=1&ordering=last_updated&name=latest)

In the meantime for mainnet I think it is safest to use last official releases of node and wallet:
https://github.com/input-output-hk/cardano-wallet/releases/tag/v2021-06-11
https://github.com/input-output-hk/cardano-node/releases/tag/1.27.0

image: inputoutput/cardano-wallet:2021.6.11
image: inputoutput/cardano-node:1.27.0 

@got3nks
Copy link
Author

got3nks commented Aug 23, 2021

When updating the image:inputoutput/cardano-wallet:latest using docker-compose pull command, v2021-08-11 (git revision: 9cc1b56) was installed as you can see from the logs.

I updated the docker-compose.yml file to use the images you mentioned and the wallet is working again, thanks.

An update for the upcoming fork is coming soon? I suppose cardano-wallet:2021.6.11 won't work after the fork?

@piotr-iohk
Copy link
Contributor

An update for the upcoming fork is coming soon? I suppose cardano-wallet:2021.6.11 won't work after the fork?

Yes, 2021.6.11 will not work after hard-fork and there will be official cardano-node and cardano-wallet releases published prior to hardfork. v2021-08-11 is a pre-release that is intended mainly for testing on alonzo-purple testnet. To retain normal operations on mainnet pls use recent official releases for the time being. Sorry for inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants