Why would a Notary node or an Oracle node know the custom flows?


(Sean Zhang) #1

Since I ran out of quota posting on stackoverflow, I am asking the question here -

When listing flows via the shell command flow list on the Notary node or the Oracle node, we see all the custom initialing flows.
Is that reasonable? Why could users on notary or oracle start flows not in the
cordapps list per the gradle deployNodes task?

\Sean


(Joel Dudley) #2

When you run deployNodes, any CorDapps in the project’s directory are packaged up and installed on all nodes by default. I’d assume this is what is happening here? See if you can delete the cordapp jar from the notary/oracle node’s plugins folder.


(Sean Zhang) #3

If I delete the custom jar from the validating notary’s plugins folder, we got the following. Even though it says only a warning, the actual flow failed. So it looks like there being a dependency between the notary and the custom jar.

\Sean

net.corda.core.flows.FlowSessionException: Counterparty flow on CN=A,O=A,L=Amsterdam,C=NL had an internal error and has terminated.

[WARN ] 2017-07-20T14:13:44,537 [Node thread] flow.[1880a032-bc66-4fc7-bdf7-493213e31f35].run - Terminated by unexpected exception
com.esotericsoftware.kryo.KryoException: Unable to find class: argent.state.ArgentState
Serialization trace:
data (net.corda.core.contracts.TransactionState)
at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:160) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:133) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:693) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:118) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:816) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:134) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:40) ~[kryo-4.0.0.jar:?]
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:816) ~[kryo-4.0.0.jar:?]
at net.corda.core.serialization.WireTransactionSerializer.read(Kryo.kt:351) ~[corda-core-0.13.0.jar:?]
at net.corda.core.serialization.WireTransactionSerializer.read(Kryo.kt:319) ~[corda-core-0.13.0.jar:?]
at net.corda.core.serialization.NoReferencesSerializer$read$1.invoke(Kryo.kt:536) ~[corda-core-0.13.0.jar:?]
at net.corda.core.serialization.KryoKt.withoutReferences(Kryo.kt:547) ~[corda-core-0.13.0.jar:?]
at net.corda.core.serialization.NoReferencesSerializer.read(Kryo.kt:536) ~[corda-core-0.13.0.jar:?]
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813) ~[kryo-4.0.0.jar:?]
at net.corda.core.serialization.KryoKt$deserialize$1$1.execute(Kryo.kt:109) ~[corda-core-0.13.0.jar:?]
at com.esotericsoftware.kryo.pool.KryoPoolQueueImpl.run(KryoPoolQueueImpl.java:61) ~[kryo-4.0.0.jar:?]
at net.corda.core.serialization.KryoKt.deserialize(Kryo.kt:109) ~[corda-core-0.13.0.jar:?]
at net.corda.core.transactions.WireTransaction$Companion.deserialize(WireTransaction.kt:49) ~[corda-core-0.13.0.jar:?]
at net.corda.core.transactions.WireTransaction$Companion.deserialize$default(WireTransaction.kt:48) ~[corda-core-0.13.0.jar:?]
at net.corda.core.transactions.SignedTransaction$tx$2.invoke(SignedTransaction.kt:41) ~[corda-core-0.13.0.jar:?]
at net.corda.core.transactions.SignedTransaction$tx$2.invoke(SignedTransaction.kt:30) ~[corda-core-0.13.0.jar:?]
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130) ~[kotlin-stdlib-1.1.1.jar:1.1.1]
at net.corda.core.transactions.SignedTransaction.getTx(SignedTransaction.kt) ~[corda-core-0.13.0.jar:?]
at net.corda.core.transactions.SignedTransaction.getId(SignedTransaction.kt:48) ~[corda-core-0.13.0.jar:?]
at net.corda.core.transactions.SignedTransaction.checkSignaturesAreValid(SignedTransaction.kt:98) ~[corda-core-0.13.0.jar:?]
at net.corda.core.transactions.SignedTransaction.verifySignatures(SignedTransaction.kt:74) ~[corda-core-0.13.0.jar:?]
at net.corda.node.services.transactions.ValidatingNotaryFlow.checkSignatures(ValidatingNotaryFlow.kt:40) ~[corda-node-0.13.0.jar:?]
at net.corda.node.services.transactions.ValidatingNotaryFlow.receiveAndVerifyTx(ValidatingNotaryFlow.kt:32) ~[corda-node-0.13.0.jar:?]
at net.corda.flows.NotaryFlow$Service.call(NotaryFlow.kt:105) ~[corda-core-0.13.0.jar:?]
at net.corda.flows.NotaryFlow$Service.call(NotaryFlow.kt:100) ~[corda-core-0.13.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:107) [corda-node-0.13.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:39) [corda-node-0.13.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.call(Executors.java:511) [?:1.8.0_141]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_141]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_141]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_141]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_141]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_141]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:69) [corda-node-0.13.0.jar:?]
Caused by: java.lang.ClassNotFoundException: argent.state.ArgentState
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_141]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[?:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_141]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_141]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_141]
at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:154) ~[kryo-4.0.0.jar:?]
… 43 more