I am deploying three nodes of indy-node deployed in 3 different machines, when I deploy them, they normally work fine and I can publish and get DIDs from the DLT doing something like:
indy> pool create identity_pool gen_txn_file=/var/lib/indy/sandbox/pool_transactions_genesis
Pool config "identity_pool" has been created
indy> pool connect identity_pool
Pool "identity_pool" has been connected
pool(identity_pool):indy> wallet create actor_wallet key=abc
Wallet "actor_wallet" has been created
pool(identity_pool):indy> wallet open actor_wallet key=abc
Wallet "actor_wallet" has been opened
pool(identity_pool):actor_wallet:indy> did new seed=100A000000300000c0000000Steward1 metadata="steward DID"
Did "RnXJMDxifkBaceAkPizz8F" has been created with "~9F4P9aQysR1YATnARMuhxt" verkey
Metadata has been saved for DID "RnXJMDxifkBaceAkPizz8F"
pool(identity_pool):actor_wallet:indy> did use RnXJMDxifkBaceAkPizz8F
Did "RnXJMDxifkBaceAkPizz8F" has been set as active
pool(identity_pool):actor_wallet:did(RnX...z8F):indy> ledger nym did=RnXJMDxifkBaceAkPizz8F
Nym request has been sent to Ledger.
Metadata:
+------------------------+-----------------+---------------------+---------------------+
| From | Sequence Number | Request ID | Transaction time |
+------------------------+-----------------+---------------------+---------------------+
| RnXJMDxifkBaceAkPizz8F | 4 | 1721395027316620804 | 2024-07-19 13:17:07 |
+------------------------+-----------------+---------------------+---------------------+
Data:
+------------------------+------+
| Did | Role |
+------------------------+------+
| RnXJMDxifkBaceAkPizz8F | - |
+------------------------+------+
It works, but after publishing a few DIDs, or after a while, for some reason the command ledger nym did=<NEW_DID>
stops working and gives a timeout error such:
Transaction response has not been received
But if I do:
ledger get-nym did=<EXISTENT_DID>
It still works properly from any of the nodes and I get the existent information about the DID:
pool(identity_pool):actor_wallet:did(RnX...z8F):indy> ledger get-nym did=RnXJMDxifkBaceAkPizz8F
Following NYM has been received.
Metadata:
+------------------------+-----------------+---------------------+---------------------+
| Identifier | Sequence Number | Request ID | Transaction time |
+------------------------+-----------------+---------------------+---------------------+
| RnXJMDxifkBaceAkPizz8F | 4 | 1721395092477092709 | 2024-07-19 13:17:07 |
+------------------------+-----------------+---------------------+---------------------+
Data:
+------------------------+------------------------+-------------------------+---------+
| Identifier | Dest | Verkey | Role |
+------------------------+------------------------+-------------------------+---------+
| L4vaBJDbZiaX68mVHLuZ2E | RnXJMDxifkBaceAkPizz8F | ~9F4P9aQysR1YATnARMuhxt | STEWARD |
+------------------------+------------------------+-------------------------+---------+
I have checked my pool_transactions_genesis
file and I'm sure it's correct, as I can publish DIDs at some point, but suddenly I cannot anymore.
So the problem might be arising due to having only 3 nodes.
From: RBFT paper (what indy uses for nodes)
Page 300, IV. THE RBFT PROTOCOL.
As for the other robust BFT protocols, RBFT requires 3f + 1 nodes (i.e., 3f + 1 physical machines). Each node runs f + 1 protocol instances of a BFT protocol in parallel (see Figure 4). As we theoretically show in the companion technical report [3], f + 1 protocol instances is necessary and sufficient to detect a faulty primary and ensure the robustness of the protocol.
The question You have asked Probably arises because of the same issue.
When the ledger is doing a view change, the write operations are suspended, but read operations work normally, when you have 3 nodes instead of 4, or 3f+1 as stated on the paper, the view change event never completes due to insufficient nodes.
You can look at
ledger get-validator-info
and check the node json for:
"VC_in_progress":false
or not, if it is true for a long time, your nodes are probably stuck on a view change.