Testnet似乎不支持带有SignatureConstraint的Corda4

Testnet似乎不支持带有SignatureConstraint的Corda4,corda,Corda,我使用SignatureConstraint构建Corda4,并使用Testnet进行部署。然后当我做交易时,我得到了这个例外 net.corda.core.node.ZoneVersionTooLowException: Signature constraints requires all nodes on the Corda compatibility zone to be running at least platform version 4. The current zone is on

我使用SignatureConstraint构建Corda4,并使用Testnet进行部署。然后当我做交易时,我得到了这个例外

net.corda.core.node.ZoneVersionTooLowException: Signature constraints requires all nodes on the Corda compatibility zone to be running at least platform version 4. The current zone is only enforcing a minimum platform version of 1. Please contact your zone operator.
    at net.corda.core.internal.CordaUtilsKt.checkMinimumPlatformVersion(CordaUtils.kt:36) ~[corda-core-4.0.jar:?]
    at net.corda.core.internal.Verifier.verifyConstraints(TransactionVerifierServiceInternal.kt:332) ~[corda-core-4.0.jar:?]
    at net.corda.core.internal.Verifier.verify(TransactionVerifierServiceInternal.kt:61) ~[corda-core-4.0.jar:?]
    at net.corda.core.transactions.LedgerTransaction.verify(LedgerTransaction.kt:125) ~[corda-core-4.0.jar:?]
    at net.corda.core.transactions.TransactionBuilder.addMissingDependency(TransactionBuilder.kt:173) ~[corda-core-4.0.jar:?]
    at net.corda.core.transactions.TransactionBuilder.toWireTransactionWithContext$core(TransactionBuilder.kt:160) ~[corda-core-4.0.jar:?]
    at net.corda.core.transactions.TransactionBuilder.toWireTransactionWithContext$core$default(TransactionBuilder.kt:128) ~[corda-core-4.0.jar:?]
    at net.corda.core.transactions.TransactionBuilder.toWireTransaction(TransactionBuilder.kt:125) ~[corda-core-4.0.jar:?]
    at net.corda.core.transactions.TransactionBuilder.toLedgerTransaction(TransactionBuilder.kt:451) ~[corda-core-4.0.jar:?]
    at net.corda.core.transactions.TransactionBuilder.verify(TransactionBuilder.kt:459) ~[corda-core-4.0.jar:?]
    at th.co.jventures.ddlp.cordapp.flows.CustomerIssueFlow.call(CustomerIssueFlow.kt:166) ~[cordapp-flows-1.0.jar:?]
    at th.co.jventures.ddlp.cordapp.flows.CustomerIssueFlow.call(CustomerIssueFlow.kt:32) ~[cordapp-flows-1.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:228) ~[corda-node-4.0.jar:?]
    at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:45) ~[corda-node-4.0.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_201]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_201]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_201]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_201]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_201]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_201]
    at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:63) ~[corda-node-4.0.jar:?]

这是否意味着Testnet不支持签名约束?Corda Testnet目前是最低平台版本1。有一个新的Testnet,其最低平台版本4将在适当的时候发布,它将支持Corda V4,因此支持签名约束


来源:我是R3 Corda测试网的技术负责人。

目前Corda测试网是最低平台版本1。有一个新的Testnet,其最低平台版本4将在适当的时候发布,它将支持Corda V4,因此支持签名约束


来源:我是R3 Corda测试网的技术负责人。

如果您正在测试并想要调试,模拟网络也不支持V4,因此您也无法模拟它

另一种方法是在本地运行节点,并使用Corda的节点驱动程序连接调试器,如

这就是我在模拟测试中启用的方式:

 HashSet<TestCordapp> cordapps = new HashSet<>(asList( TestCordapp.findCordapp("com.r3.corda.lib.tokens.money"),
            TestCordapp.findCordapp("com.r3.corda.lib.tokens.contracts"),
            TestCordapp.findCordapp("com.r3.corda.lib.tokens.workflows")));

        List<String> packages = Arrays.asList("[your packages]");

        #Create new drive parameters and generate new network parameters copying defult
        # except the minimun supported version
        DriverParameters driverParameters = new DriverParameters().withIsDebug(true).withCordappsForAllNodes(cordapps);
        NetworkParameters networkParameters = driverParameters.getNetworkParameters();
        NetworkParameters parameters = networkParameters.copy(4, networkParameters.getNotaries(), networkParameters.getMaxMessageSize(), networkParameters.getMaxTransactionSize(), networkParameters.getModifiedTime(), networkParameters.getEpoch(), networkParameters.getWhitelistedContractImplementations());

        InMemoryMessagingNetwork.ServicePeerAllocationStrategy servicePeerAllocationStrategy = new InMemoryMessagingNetwork.ServicePeerAllocationStrategy.Random();
        MockNetworkParameters mockNetworkParameters = new MockNetworkParameters(cordapps);
        MockNetworkNotarySpec mockNetworkNotarySpec = new MockNetworkNotarySpec(new CordaX500Name("Notary", "London", "GB"), false);
        mockNet =  new MockNetwork(packages,mockNetworkParameters,false,false,servicePeerAllocationStrategy,Arrays.asList(mockNetworkNotarySpec),parameters);
        issuerNode = mockNet.createNode(new CordaX500Name("Issuer", "London", "GB"));

        issuer = issuerNode.getInfo().getLegalIdentities().get(0);

HashSet-cordapps=new-HashSet(asList(TestCordapp.findCordapp(“com.r3.corda.lib.tokens.money”),
TestCordapp.findCordapp(“com.r3.corda.lib.tokens.contracts”),
TestCordapp.findCordapp(“com.r3.corda.lib.tokens.workflows”);
List packages=Arrays.asList(“[您的包]”);
#创建新的驱动器参数并生成新的网络参数
#除了支持的最小版本
DriverParameters DriverParameters=新的DriverParameters()。withIsDebug(true)。withCordappsForAllNodes(cordapps);
NetworkParameters NetworkParameters=driverParameters.getNetworkParameters();
NetworkParameters parameters=NetworkParameters.copy(4,NetworkParameters.Get公证人(),NetworkParameters.getMaxMessageSize(),NetworkParameters.getMaxTransactionSize(),NetworkParameters.getModifiedTime(),NetworkParameters.getEpoch(),NetworkParameters.GetWhiteListedContentractionImplements());
InMemoryMessageNetwork.ServicePeerAllocationStrategy ServicePeerAllocationStrategy=新建InMemoryMessageNetwork.ServicePeerAllocationStrategy.Random();
MockNetworkParameters MockNetworkParameters=新的MockNetworkParameters(cordapps);
MockNetworkNotarySpec MockNetworkNotarySpec=新的MockNetworkNotarySpec(新的CordaX500Name(“公证人”、“伦敦”、“GB”),false);
mockNet=新的MockNetwork(包、mockNetworkParameters、false、false、servicePeerAllocationStrategy、Arrays.asList(mockNetworkNotarySpec)、参数);
issuerNode=mockNet.createNode(新的CordaX500Name(“发卡机构”、“伦敦”、“GB”));
issuer=issuerNode.getInfo().GetLegaleIdentities().get(0);

如果您正在测试并想要调试,Mock network也不支持V4,因此您也无法对其进行模拟

另一种方法是在本地运行节点,并使用Corda的节点驱动程序连接调试器,如

这就是我在模拟测试中启用的方式:

 HashSet<TestCordapp> cordapps = new HashSet<>(asList( TestCordapp.findCordapp("com.r3.corda.lib.tokens.money"),
            TestCordapp.findCordapp("com.r3.corda.lib.tokens.contracts"),
            TestCordapp.findCordapp("com.r3.corda.lib.tokens.workflows")));

        List<String> packages = Arrays.asList("[your packages]");

        #Create new drive parameters and generate new network parameters copying defult
        # except the minimun supported version
        DriverParameters driverParameters = new DriverParameters().withIsDebug(true).withCordappsForAllNodes(cordapps);
        NetworkParameters networkParameters = driverParameters.getNetworkParameters();
        NetworkParameters parameters = networkParameters.copy(4, networkParameters.getNotaries(), networkParameters.getMaxMessageSize(), networkParameters.getMaxTransactionSize(), networkParameters.getModifiedTime(), networkParameters.getEpoch(), networkParameters.getWhitelistedContractImplementations());

        InMemoryMessagingNetwork.ServicePeerAllocationStrategy servicePeerAllocationStrategy = new InMemoryMessagingNetwork.ServicePeerAllocationStrategy.Random();
        MockNetworkParameters mockNetworkParameters = new MockNetworkParameters(cordapps);
        MockNetworkNotarySpec mockNetworkNotarySpec = new MockNetworkNotarySpec(new CordaX500Name("Notary", "London", "GB"), false);
        mockNet =  new MockNetwork(packages,mockNetworkParameters,false,false,servicePeerAllocationStrategy,Arrays.asList(mockNetworkNotarySpec),parameters);
        issuerNode = mockNet.createNode(new CordaX500Name("Issuer", "London", "GB"));

        issuer = issuerNode.getInfo().getLegalIdentities().get(0);

HashSet-cordapps=new-HashSet(asList(TestCordapp.findCordapp(“com.r3.corda.lib.tokens.money”),
TestCordapp.findCordapp(“com.r3.corda.lib.tokens.contracts”),
TestCordapp.findCordapp(“com.r3.corda.lib.tokens.workflows”);
List packages=Arrays.asList(“[您的包]”);
#创建新的驱动器参数并生成新的网络参数
#除了支持的最小版本
DriverParameters DriverParameters=新的DriverParameters()。withIsDebug(true)。withCordappsForAllNodes(cordapps);
NetworkParameters NetworkParameters=driverParameters.getNetworkParameters();
NetworkParameters parameters=NetworkParameters.copy(4,NetworkParameters.Get公证人(),NetworkParameters.getMaxMessageSize(),NetworkParameters.getMaxTransactionSize(),NetworkParameters.getModifiedTime(),NetworkParameters.getEpoch(),NetworkParameters.GetWhiteListedContentractionImplements());
InMemoryMessageNetwork.ServicePeerAllocationStrategy ServicePeerAllocationStrategy=新建InMemoryMessageNetwork.ServicePeerAllocationStrategy.Random();
MockNetworkParameters MockNetworkParameters=新的MockNetworkParameters(cordapps);
MockNetworkNotarySpec MockNetworkNotarySpec=新的MockNetworkNotarySpec(新的CordaX500Name(“公证人”、“伦敦”、“GB”),false);
mockNet=新的MockNetwork(包、mockNetworkParameters、false、false、servicePeerAllocationStrategy、Arrays.asList(mockNetworkNotarySpec)、参数);
issuerNode=mockNet.createNode(新的CordaX500Name(“发卡机构”、“伦敦”、“GB”));
issuer=issuerNode.getInfo().GetLegaleIdentities().get(0);

发布日期是否接近预期?从那以后,我离开了R3-值得询问他们的公开时间并报告。发布日期是否接近预期?从那以后,我离开了R3-值得询问他们的公开时间并报告。