【问题标题】:Missing signatures on transaction 58C11D for keys: DL9YufujsPipKTb8fjj82ogVS1s67PBWD3vn2fGzjUbEnN, by signers: notary交易 58C11D 中缺少密钥的签名:DL9YufujsPipKTb8fjj82ogVS1s67PBWD3vn2fGzjUbEnN,签名者:公证人
【发布时间】:2019-06-10 16:14:31
【问题描述】:

我正在使用 Corda 版本 4。

我的 CorDapp 有四个节点 - 公证节点(验证)、“节点 A”、“节点 B”和“节点 C”。以下是应用程序中定义的流程 -

流程1:“节点A”签署并向“节点B”发送交易请求。 “节点 C”也会收到通知。

以下是我的流程 1 的代码:

val tx = TransactionBuilder(notary).withItems(
              StateAndContract(tradeProposal, IOU_CONTRACT_ID),
              Command(IOUContract.Commands.Issue(),     listOf(tradeProposal.sender.owningKey)))
              .addAttachment(secHash)
tx.setTimeWindow(serviceHub.clock.instant(), 180.seconds)
val signedTx = serviceHub.signInitialTransaction(tx)
signedTx.verify(serviceHub)
val NodeBFlow = initiateFlow(NodeB)
val NodeCFlow = initiateFlow(NodeC)
subFlow(FinalityFlow(signedTx, listOf(NodeBFlow ,NodeCFlow )))
return signedTx.tx.outRef<State>(0)

流程 2:“节点 B”批准交易请求,自签名,从 A 获得签名并关闭交易。 “节点 C”也会收到通知。

val tx = TransactionBuilder(notary).
withItems(
latestRecord,
StateAndContract(newState, IOU_CONTRACT_ID),
Command(IOUContract.Commands.Completed(),
newState.participants.map { it.owningKey }))
tx.setTimeWindow(serviceHub.clock.instant(), 600.seconds)
tx.verify(serviceHub)
val partSignedTx = serviceHub.signInitialTransaction(tx)
val NodeAFlow = initiateFlow(newState.sender)
val NodeCFlow = initiateFlow(newState.recipient2)
val fullySignedTx = subFlow(CollectSignaturesFlow(partSignedTx,     setOf(NodeAFlow ,NodeCFlow)))
return subFlow(FinalityFlow(fullySignedTx, listOf(NodeAFlow ,NodeCFlow)))

执行流程 1 时出现以下错误 -

Missing signatures on transaction 58C11D for keys:         aL9YufujsPipKTb8fjj897654322ogVS1s67PBWD3vn2fGzjUbEnN, by signers: notary
net.corda.core.transactions.SignedTransaction$SignaturesMissingException:     Missing signatures on transaction 58C11D for keys:         aL9YufujsPipKTb8fjj897654322ogVS1s67PBWD3vn2fGzjUbEnN, by signers: notary

【问题讨论】:

    标签: corda


    【解决方案1】:

    公证人抛出该错误,因为 NodeC 包含在 FinalityFlow 中(它将交易发送给公证人),但它不是交易签名者的一部分

    如果您想通知节点 C 而不使其成为交易的必需参与者和签署人,您想使用“观察者”类型设置,您可以在此处找到代码示例:

    https://docs.corda.net/tutorial-observer-nodes.html

    • R3 的开发人员关系

    【讨论】:

      猜你喜欢
      • 2020-10-01
      • 1970-01-01
      • 2013-05-28
      • 1970-01-01
      • 2022-06-18
      • 2013-11-10
      • 2017-06-21
      • 2013-08-17
      • 2012-07-26
      相关资源
      最近更新 更多