简体   繁体   English

与Kaleido部署simpleStorage合同

[英]Deploying simpleStorage contract with Kaleido

I have been following this tutorial to connect the consortium i have created using the Kaleido UI to truffle: link . 我一直在按照本教程进行操作,以将我使用Kaleido UI创建的财团连接到truffle: link When i finally do : ./truffle_migrate.sh it gets stuck in there, here is the output: 当我终于做:./truffle_migrate.sh时,它卡在了那里,这是输出:

$ ./truffle_migrate.sh + truffle migrate --network supnode --reset Using network 'supnode'. $ ./truffle_migrate.sh +松露迁移--network supnode --reset使用网络'supnode'。

Running migration: 1_initial_migration.js Saving artifacts... Running migration: 2_deploy_simplestorage.js Deploying SimpleStorage... 运行迁移:1_initial_migration.js正在保存工件...运行迁移:2_deploy_simplestorage.js部署SimpleStorage ...
... 0xd6d9cfe1ab5b01abb759fb8280920d8f7ba0cef73340af22e47a9c7e40120c14 ... 0xd6d9cfe1ab5b01abb759fb8280920d8f7ba0cef73340af22e47a9c7e40120c14

I don't understand where is the problem, i'm sure i have followed the tutorial carefully and i ve created the same scenario.. If anyone have any idea i would appreciate it. 我不明白问题出在哪里,我确定我已经仔细阅读了本教程,并且创建了相同的方案。 Thanks. 谢谢。

So I went through step by step in an attempt to recreate your scenario - 3 nodes running Quorum + Raft and a private transaction between nodes 1 & 3. 因此,我逐步尝试重新创建您的方案-3个运行Quorum + Raft的节点以及节点1和3之间的私有事务。

On the initial migration attempt I came across the same hung state as you observed. 在最初的迁移尝试中,我遇到了与您观察到的相同的挂起状态。 Inspection of the block explorer reveals that both contracts were actually deployed, however neither were invoked (ie no state was set for simple storage via the migration file). 对区块浏览器的检查显示,这两个合同实际上都已部署,但是都没有被调用(即,未通过迁移文件为简单存储设置任何状态)。

I then changed the truffle_migrate.sh file to target the original privateFor node (3) and used the original targeted node (1) as the new privateFor recipient. 然后,我将truffle_migrate.sh文件更改为以原始privateFor节点(3)为目标,并将原始目标节点(1)用作新的privateFor接收者。 This worked immediately. 这立即起作用。 The question is why :) 问题是为什么:)

Truffle is finicky sometimes, especially when using RAFT with private transactions. 松露有时是挑剔的,尤其是在将RAFT与私人交易结合使用时。

I would suggest: 我会建议:

  1. Check your block explorer to ensure that the connection to the network was successful and the contracts were deployed. 检查您的区块浏览器,以确保与网络的连接成功并且已部署合同。
  2. Kill the running migrate process and just kick it off again. 终止正在运行的迁移过程,然后再次开始。
  3. If that doesn't work, try the flip flop process I described. 如果那不起作用,请尝试我描述的触发器过程。

I'm curious if there is a correlation with targeting the RAFT leader or if perhaps truffle just needs a few extra nudges sometimes. 我很好奇,是否与定位RAFT领导者有关,或者松露有时仅需要一些额外的推动。 We will investigate. 我们将进行调查。

FYI I tried originally with a public transaction and used a truffle.js file with only a single node. 仅供参考,我最初尝试使用公共事务,并且仅在单个节点上使用了truffle.js文件。 This also worked immediately. 这也立即起作用。 So my supposition is there is some nuanced approach for private transactions and RAFT. 因此,我的假设是对于私人交易和RAFT有一些细微差别的方法。

In the meantime this should give you a potential workaround; 同时,这应该为您提供潜在的解决方法; you'll just have the original migration and simple storage contracts as orphans in your environment. 您只需将原始迁移和简单存储合同作为您环境中的孤儿。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 部署智能合约的意义 - Meaning of deploying a Smart Contract 在没有API_KEY的情况下将合同部署到Infura? - deploying contract to infura without API_KEY? 如何在部署时管理合同的所有权 - How to manage ownership of contract while deploying 在币安智能链中部署合约时面临错误 - Facing error on deploying contract in Binance Smart Chain 在rinkeby测试网络上部署固态智能合约的问题 - issues deploying solidity smart contract to rinkeby test network 使用Web3部署智能合约时不支持同步请求 - Synchronous requests are not supported when deploying smart contract using web3 在 docker 上的私有区块链节点上使用 truffle 部署智能合约 - Deploying smart contract using truffle on private blockchain node on docker 错误{代码:-32000,消息:'invalid sender'}在将solidity合约部署到rinkeby测试网络时 - error { code: -32000, message: 'invalid sender' } while deploying a solidity contract to rinkeby test network 在使用VSCode在天蓝色的区块链服务上部署合同时,如何解决HttpService.sendRPCRequest ECONNREFUSED错误? - How to resolve HttpService.sendRPCRequest ECONNREFUSED error while deploying contract on azure blockchain service using VSCode? 在测试网上部署 ERC-721 合约时,我得到了不切实际的低 gas 费 - I'm getting unrealistically low gas fee's when deploying an ERC-721 contract on testnet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM