accounts
accounts copied to clipboard
CreateAccount flow error: Flow sessions were not provided for the following transaction participants
Corda OS: 4.1 Accounts: 1.0-RC03
Steps to reproduce:
- Start node using
java -jar corda.jar
- Run
flow start CreateAccount name: test
- Error doesn't happen in a mock network (i.e. using flow tests), it only happens when running flow from inside the node console.
I attached my Intellij debugger to the node and it happens here:
- CreateAccount class:
val finalisedTransaction = subFlow(FinalityFlow(signedTransaction, emptyList()))
- Which is caused by this check inside FinalityFlow class:
require(missingRecipients.isEmpty()) {
"Flow sessions were not provided for the following transaction participants: $missingRecipients"
}
If I run the flow from the node terminal:
-
externalTxParticipants
= The node that started the flow -
sessionParties
is empty -
oldParticipants
is empty as well
So missingRecipients
is not empty (it has the node the started the flow), which throws that error.
If I run the flow using flow tests, externalTxParticipants
is empty; so the list missingRecipients
is empty and the check passes.
Further investigation inside FinalityFlow.extractExternalParticipants()
shows that the owningKey
is different between ltx.outputStates.flatMap { it.participants }
and serviceHub.myInfo.legalIdentities
even though the CordaX500Name is identical; it's weird because my node that initiated the flow is used as the Issuer of the AccountInfo state and the Issuer is the sole participant so I would think that serviceHub.myInfo.legalIdentities
and it.participants
should be identical (CordaX500Name and owningKey wise).
I deployed my cordapp to GCP VM with Postgress DB and everything works fine, I guess it only fails when running the node locally (built through deployNodes
and ran with java -jar corda.jar
).
Thanks for flagging this - we'll look into it on Monday. cc: @willhr3 @roastario