Uploaded image for project: 'Corda'
  1. CORDA-2615

Cannot complete transaction that has unknown states in the transaction history

    Details

    • Type: Bug
    • Status: Done (View workflow)
    • Priority: High
    • Resolution: Done
    • Affects versions: Corda 4 RC05
    • Fix versions: Corda 4.1
    • Components: None
    • Labels:
      None
    • Severity:
      High
    • Target Version/s:
    • Feature Team:
      Versioning and Modules
    • Sprint:

      Description

      Clone http://github.com/corda/samples
      Checkout release-V4 branch
      md samples/obligation-cordapp
      Run ./gradlew :kotlin-source:deployNodes
      Delete kotlin-source/build/nodes/PartyC/cordapps/kotlin-source-0.1.jar
      Run kotlin-source/build/nodes/runnodes
      Navigate to https://localhost:10007 (PartyA webapp)
      Create an obligation for 100 GBP between PartyA and PartyB
      Self issue 100 GBP Cash
      Settle the obligation

      Party B should now have 100 GBP Cash in it's vault.

      From the PartyB shell, run:
      flow start CashPaymentFlow amount: "100 GBP", recipient: PartyC, anonymous: false

      The flow completes successfully.

      On PartyC shell, run: run vaultQuery contractStateType: net.corda.finance.contracts.asset.Cash$State

      There should be no cash there.
      Check the logs for PartyC, it should show an error:

      [INFO ] 2019-02-17T10:11:17,537Z [Node thread-1] corda.flow.run - Flow raised an error... sending it to flow hospital {fiber-id=10000001, flow-id=97562d1d-ae9f-4234-a55a-5d8467e95f5c, invocation_id=00403235-87bf-4349-a3c0-c6d2da508cd0, invocation_timestamp=2019-02-17T10:11:11.296Z, origin=O=PartyB, L=New York, C=US, session_id=00403235-87bf-4349-a3c0-c6d2da508cd0, session_timestamp=2019-02-17T10:11:11.296Z, thread-id=252, tx_id=3A36EF00BDFB43B9C48EE0B121FEBC978671FACA0D743E8ADB55B612D9277C7B}
      net.corda.core.contracts.TransactionVerificationException$UntrustedAttachmentsException: Attempting to load untrusted transaction attachments: [9499E591C686CC35E5ADDD074EF50E5A5ED377F31DBCE095F230C5CF3A7210CB]. At this time these are not loadable because the DJVM sandbox has not yet been integrated. You will need to install that app version yourself, to whitelist it for use. Please follow the operational steps outlined in https://docs.corda.net/cordapp-build-systems.html#cordapp-contract-attachments to learn more and continue.
      

      Following the instructions on the given page, on the PartyC shell run:
      run openAttachment id: 9499E591C686CC35E5ADDD074EF50E5A5ED377F31DBCE095F230C5CF3A7210CB
      And save to a local file.
      Then run:
      run uploadAttachment jar: path/to/the/trusted-file.jar

      Close PartyC and restart Corda

      On PartyC shell, run: run vaultQuery contractStateType: net.corda.finance.contracts.asset.Cash$State

      There is still no cash there. Check the logs for PartyC:

      [INFO ] 2019-02-17T10:34:26,165Z [Node thread-1] corda.flow.run - Flow raised an error... sending it to flow hospital {fiber-id=10000001, flow-id=97562d1d-ae9f-4234-a55a-5d8467e95f5c, invocation_id=00403235-87bf-4349-a3c0-c6d2da508cd0, invocation_timestamp=2019-02-17T10:11:11.296Z, origin=O=PartyB, L=New York, C=US, session_id=00403235-87bf-4349-a3c0-c6d2da508cd0, session_timestamp=2019-02-17T10:11:11.296Z, thread-id=216}
      net.corda.core.internal.TransactionDeserialisationException: Failed to deserialise group OUTPUTS_GROUP at index 0 in transaction: net.corda.core.contracts.TransactionState (erased) -> data(net.corda.core.contracts.ContractState) -> net.corda.examples.obligation.Obligation: Interface net.corda.core.contracts.LinearState requires a field named participants but that isn't found in the schema or any superclass schemas
      	at net.corda.core.internal.TransactionUtilsKt$deserialiseComponentGroup$1.invoke(TransactionUtils.kt:82) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.core.internal.TransactionUtilsKt$deserialiseComponentGroup$1.invoke(TransactionUtils.kt) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.core.internal.LazyMappedList.get(InternalUtils.kt:533) ~[corda-core-4.0-RC05.jar:?]
      	at java.util.AbstractList$Itr.next(AbstractList.java:358) ~[?:1.8.0_181]
      	at kotlin.collections.IndexingIterator.next(Iterators.kt:40) ~[kotlin-stdlib-1.2.71.jar:1.2.71-release-64 (1.2.71)]
      	at kotlin.collections.IndexingIterator.next(Iterators.kt:37) ~[kotlin-stdlib-1.2.71.jar:1.2.71-release-64 (1.2.71)]
      	at net.corda.node.services.vault.NodeVaultService$makeUpdates$1.invoke(NodeVaultService.kt:723) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.vault.NodeVaultService.makeUpdates(NodeVaultService.kt:308) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.vault.NodeVaultService.access$makeUpdates(NodeVaultService.kt:55) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.vault.NodeVaultService$notifyAll$1.invoke(NodeVaultService.kt:218) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.vault.NodeVaultService.notifyAll(NodeVaultService.kt:229) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.api.ServiceHubInternal$Companion$recordTransactions$1.invoke(ServiceHubInternal.kt:106) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.api.ServiceHubInternal$Companion$recordTransactions$1.invoke(ServiceHubInternal.kt:51) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:219) ~[corda-node-api-4.0-RC05.jar:?]
      	at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:199) ~[corda-node-api-4.0-RC05.jar:?]
      	at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:205) ~[corda-node-api-4.0-RC05.jar:?]
      	at net.corda.node.services.api.ServiceHubInternal$Companion.recordTransactions(ServiceHubInternal.kt:60) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.recordTransactions(ServiceHubInternal.kt:132) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.recordTransactions(AbstractNode.kt:964) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.core.internal.ResolveTransactionsFlow.call(ResolveTransactionsFlow.kt:112) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.core.internal.ResolveTransactionsFlow.call(ResolveTransactionsFlow.kt:28) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.node.services.statemachine.FlowStateMachineImpl.subFlow(FlowStateMachineImpl.kt:290) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:314) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.core.flows.ReceiveTransactionFlow.call(ReceiveTransactionFlow.kt:46) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.core.flows.ReceiveTransactionFlow.call(ReceiveTransactionFlow.kt:27) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.node.services.statemachine.FlowStateMachineImpl.subFlow(FlowStateMachineImpl.kt:290) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:314) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.core.flows.ReceiveFinalityFlow.call(FinalityFlow.kt:260) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.core.flows.ReceiveFinalityFlow.call(FinalityFlow.kt:255) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.node.services.statemachine.FlowStateMachineImpl.subFlow(FlowStateMachineImpl.kt:290) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:314) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.finance.flows.CashPaymentReceiverFlow.call(CashPaymentFlow.kt:107) ~[?:?]
      	at net.corda.finance.flows.CashPaymentReceiverFlow.call(CashPaymentFlow.kt:98) ~[?:?]
      	at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:228) ~[corda-node-4.0-RC05.jar:?]
      	at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:45) ~[corda-node-4.0-RC05.jar:?]
      	at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
      	at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
      	at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
      	at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_181]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_181]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_181]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_181]
      	at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:63) ~[corda-node-4.0-RC05.jar:?]
      Caused by: java.io.NotSerializableException: net.corda.core.contracts.TransactionState (erased) -> data(net.corda.core.contracts.ContractState) -> net.corda.examples.obligation.Obligation: Interface net.corda.core.contracts.LinearState requires a field named participants but that isn't found in the schema or any superclass schemas
      	at net.corda.serialization.internal.model.SchemaBuildingRemoteTypeCarpenter.carpent(RemoteTypeCarpenter.kt:35) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.model.ClassCarpentingTypeLoader$load$carpented$1$1.apply(TypeLoader.kt:53) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.model.ClassCarpentingTypeLoader$load$carpented$1$1.apply(TypeLoader.kt:24) ~[corda-serialization-4.0-RC05.jar:?]
      	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1688) ~[?:1.8.0_181]
      	at net.corda.serialization.internal.model.ClassCarpentingTypeLoader$load$carpented$1.invoke(TypeLoader.kt:52) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.model.ClassCarpentingTypeLoader$load$carpented$1.invoke(TypeLoader.kt:24) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.model.CarpentryDependencyGraph.buildInOrder(CarpentryDependencyGraph.kt:65) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.model.CarpentryDependencyGraph.access$buildInOrder(CarpentryDependencyGraph.kt:14) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.model.CarpentryDependencyGraph$Companion.buildInReverseDependencyOrder(CarpentryDependencyGraph.kt:24) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.model.ClassCarpentingTypeLoader.load(TypeLoader.kt:51) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DefaultRemoteSerializerFactory.reflect(RemoteSerializerFactory.kt:122) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DefaultRemoteSerializerFactory.access$reflect(RemoteSerializerFactory.kt:47) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DefaultRemoteSerializerFactory$get$1.invoke(RemoteSerializerFactory.kt:67) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DefaultRemoteSerializerFactory$get$1.invoke(RemoteSerializerFactory.kt:47) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DefaultDescriptorBasedSerializerRegistry.getOrBuild(DescriptorBasedSerializerRegistry.kt:28) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DefaultRemoteSerializerFactory.get(RemoteSerializerFactory.kt:62) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.ComposedSerializerFactory.get(SerializerFactory.kt) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DeserializationInput.readObject$serialization(DeserializationInput.kt:172) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DeserializationInput.readObjectOrNull$serialization(DeserializationInput.kt:147) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DescribedTypeReadStrategy.readProperty(ComposableTypePropertySerializer.kt:202) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.ComposableTypePropertySerializer.readProperty(ComposableTypePropertySerializer.kt) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.ComposableObjectReader$readObject$$inlined$ifThrowsAppend$lambda$1.invoke(ObjectSerializer.kt:140) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.ComposableObjectReader$readObject$$inlined$ifThrowsAppend$lambda$1.invoke(ObjectSerializer.kt:122) ~[corda-serialization-4.0-RC05.jar:?]
      	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:149) ~[kotlin-stdlib-1.2.71.jar:1.2.71-release-64 (1.2.71)]
      	at net.corda.serialization.internal.amqp.ComposableObjectReader.readObject(ObjectSerializer.kt:219) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.ComposableObjectSerializer.readObject(ObjectSerializer.kt:91) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DeserializationInput.readObject$serialization(DeserializationInput.kt:182) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DeserializationInput.readObjectOrNull$serialization(DeserializationInput.kt:147) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DeserializationInput$deserialize$1.invoke(DeserializationInput.kt:124) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DeserializationInput.des(DeserializationInput.kt:99) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.DeserializationInput.deserialize(DeserializationInput.kt:119) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme.deserialize(AMQPSerializationScheme.kt:225) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:102) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:72) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:102) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:70) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:86) ~[corda-core-4.0-RC05.jar:?]
      	at net.corda.serialization.internal.SerializationFactoryImpl.deserialize(SerializationScheme.kt:102) ~[corda-serialization-4.0-RC05.jar:?]
      	at net.corda.core.internal.TransactionUtilsKt$deserialiseComponentGroup$1.invoke(TransactionUtils.kt:78) ~[corda-core-4.0-RC05.jar:?]
      	... 45 more
      

      (full logs attached)

        Attachments

          Activity

            People

            • Assignee:
              Tudor.Malene Tudor Malene
              Reporter:
              Anthony.Keenan Anthony Keenan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: