Tag: corda

如何将CORDA序列化的类型列入白名单

我希望能够将java.util.Date传递给模型java.util.Date的CORDA API端点 该模型 public final class Message{ public Date birthday; public Message(Date birthday) { this.birthday = birthday; } private Message() { // This is only here so the serializer can spin up a new instance. } public Date getBirthday() { return birthday; } } API @Path("foo") public final class FooApi { @PUT @Path("bar") @Produces(MediaType.APPLICATION_JSON) public […]

Corda:由于请求者尚未注册,所以拒绝会话请求

我有一个Corda应用程序,使用M14来构建和运行corda来运行TwoPartyProtocol,双方可以交换数据以达到数据有效性共识。 我遵循Corda流程食谱来建立一个流程。 此外,从几个不同的corda里程碑阅读文档后,我明白,M14不再需要发行说明中提到的flowSessions,这也消除了需要注册服务。 我的TwoPartyFlow内部FlowLogics: class TwoPartyFlow{ @InitiatingFlow @StartableByRPC open class Requestor(val price: Long, val otherParty: Party) : FlowLogic<SignedTransaction>(){ @Suspendable override fun call(): SignedTransaction { val notary = serviceHub.networkMapCache.notaryNodes.single().notaryIdentity send(otherParty, price) /*Some code to generate SignedTransaction*/ } } @InitiatedBy(Requestor::class) open class Responder(val requestingParty : Party) : FlowLogic<SignedTransaction>(){ @Suspendable override fun call(): SignedTransaction { val request = […]

简单的PBFT问题

当我使用简单验证相同的代码和3个节点RAFT都没问题。 但是我改成了BFT。 报告下面的错误。 其实我只用一个不消耗的作为输入。 但不知道为什么报告下面的错误。 我的代码基于M14版本。 [WARN] 2017-09-26T14:01:38,402Z [Node thread] flow。[9c5ea2df-43ef-4ff8-a954-c6b81ca2740f] .run – 由于接收异常而导致流结束net.corda.core.flows.NotaryException:Error来自公证人的响应 – 事务中的一个或多个输入状态0EFBAA4B3FAC43D15EB51CD6F7D352C62AC9C5438F56949C50484D1FE38E0A5A已经在net.corda.node.services.statemachine.FlowStateMachineImpl.erroredEnd(FlowStateMachineImpl.kt:373)〜[corda-node-0.14.0.jar :?]在net.corda.core.flows.FlowLogic.waitForLedgerCommit的net.corda.node.services.statemachine.FlowStateMachineImpl.waitForLedgerCommit(FlowStateMachineImpl.kt:212)〜[corda-node-0.14.0.jar :?] (FlowLogic.kt:232)〜[corda-core-0.14.0.jar :?] at com.legalcontract.flow.LegalContractFlow $ Initiator.call(LegalContractFlow.kt:266)〜[kotlin-source-0.1.jar: ?]在net.corda.node.services.statemachine.FlowStateMachineImpl.run(Fl)上的com.legalcontract.flow.LegalContractFlow $ Initiator.call(LegalContractFlow.kt:44)〜[kotlin-source-0.1.jar :?] (在线状态机器类型):101)[corda-node-0.14.0.jar:?] at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:33)[corda-node-0.14.0.jar :?] at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1067)[quasar-core-0.7.6-jdk8.jar:0.7.6] at co.paralleluniverse.fibers.Fiber.exec(Fiber。 java:767)[quasar-core-0.7.6-jdk8.jar:0.7.6] at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100)[quasar-core-0.7.6-jdk8.jar :0.7.6] at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91)[quasar-core-0.7.6-jdk8.jar:0.7.6] at java.util.concurrent.Executors $ RunnableAdapter。在java.util.concurrent.FutureTask.run(未知源)调用(未知源)[?:1.8.0_144] [java.util.concurrent.ScheduledThreadPoolExecutor $?1.8.0_144] $ ScheduledFutureTask.access $ 201(Unknown Source) java.util.concurrent.ScheduledThreadPoolExecutor上的[?:1.8.0_144] $ […]

胶囊例外

我试图启动Corda教程应用程序 ,并在我$ sh runnodes后得到这个错误。 之前没有和JDK一起工作,所以要求详细的解释。 bash -c'cd / Users / marieleaf / Dropbox / blockchain / corda / cordapp-tutorial / kotlin-source / build / nodes / Controller; / usr / libexec / java_home -v 1.8 –exec java -Dname = Controller-corda.jar -Dcapsule.jvm.args = -agentlib:jdwp = transport = dt_socket,server = y,suspend = n,address = 5005 -jar corda.jar […]

未解决的引用:jvmName

我正在尝试在终端中建立一个带有gradle的kotlin文件。 我得到这个错误: Unresolved reference: jvmName 这里是代码行的副本: val outputContract = IOUContract::class.jvmName 语法似乎罚款。 如果有人能够指出这一点,将不胜感激

希望会员声明

我试图建立一个kotlin文件(Corda),但遇到以下错误: e:/Users/pro/Documents/Code/Corda/Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt:(59,5):期待成员声明e:/ Users /pro/Documents/Code/Corda/Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt:(59,11):期待成员声明e:/ Users / pro / Documents /Code/Corda/Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt:(59,17):期待成员声明e:/ Users / pro / Documents / Code / Corda /Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt:(59,19):期待成员声明 这里是第59行的一个片段: // A transaction is considered valid if the verify() function of the contract of each of the transaction's input // and output states does not throw an exception. // Our Create Command Class Create: […]