我使用Kaleido (版本1.0.13)创建了一个带有两个geth节点的专用PoA网络,并试图使用松露的毛毛雨-kaleido盒样板部署一些智能协议。我从模板中更改的唯一一件事是为节点和连接URL添加凭据。
当我用truffle develop在本地测试部署时,它成功地完成了:
Starting migrations...
======================
> Network name: 'develop'
> Network id: 5777
> Block gas limit: 0x6691b7
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
> transaction hash: 0xf91e6153d679ccf4fdad200521ad972426fab239ef85333806ed0623cf5762b2
> Blocks: 0 Seconds: 0
> contract address: 0xd4c950E4FE47827a78fBBb7216851f58f849E7A4
> block number: 6
> block timestamp: 1562896906
> account: 0x80adCcD98263A73f825E7EA530755368cCE545C1
> balance: 99.9846609
> gas used: 261393
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.00522786 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0.00522786 ETH
2_deploy_contracts.js
=====================
Deploying 'SimpleStorage'
-------------------------
> transaction hash: 0x47b0c7011e179553ec7331fc89c19c6f7941c3756098dae9439eff5f135586d7
> Blocks: 0 Seconds: 0
> contract address: 0x5db95A3571f2F09d8B4963b765F73DC77aDF314c
> block number: 8
> block timestamp: 1562896907
> account: 0x80adCcD98263A73f825E7EA530755368cCE545C1
> balance: 99.98118462
> gas used: 131791
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.00263582 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0.00263582 ETH
Summary
=======
> Total deployments: 2
> Final cost: 0.00786368 ETH当我试图使用truffle migrate部署到Kaleido网络时,会出现以下错误:
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Starting migrations...
======================
> Network name: 'development'
> Network id: 189197727
> Block gas limit: 0x2fefd800
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
> transaction hash: 0x18aaa22b46e9960915764f730d2b4ecb689e2312dfe9654ef170e3808878f58f
> Blocks: 1 Seconds: 4
> contract address: 0x0bd4eE9A9fA5a7278b35E2b95505A91eb579E88a
> block number: 489
> block timestamp: 1562897041
> account: 0x321dE13B9216c29AF9505b0b28D9C2aA128697f9
> balance: 10000
> gas used: 261393
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
⠴ Saving migration to chain.Error: Error: StatusError: Transaction: 0xef6609f245c2b1473fee10c474a88a6c4049c8b18c45af4cb676966392e25449 exited with an error (status 0) after consuming all gas.
Please check that the transaction:
- satisfies all conditions set by Solidity `assert` statements.
- has enough gas to execute the full transaction.
- does not trigger an invalid opcode by other means (ex: accessing an array out of bounds).
at Object.run (/Users/allirvin/.nvm/versions/node/v9.9.0/lib/node_modules/truffle/build/webpack:/packages/truffle-migrate/index.js:92:1)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:118:7)
Truffle v5.0.26 (core: 5.0.26)
Node v9.9.0请注意,汽油价格是0。
合同使用的是pragma solidity >=0.4.21 <0.6.0;
在Kaleido块资源管理器中,我可以看到契约创建事务成功完成,但是智能契约的调用失败。

发布于 2019-07-12 21:05:32
更新的坚固版本已经解决了天然气问题,部署我们的样本合同。
在块菌-config.js中指定稳固版本。
compilers: {
solc: {
version: "0.5.0",
},
}来自@cruz:
@adam.chasen I believe in one of the more recent versions of truffle, we bumped the solidity version to 0.5.8 (which defaults the evmVersion to petersburg and would probably be the cause of outputing diff bytecode) (edited)注意:不再推荐松露版本,并且不再返回正确的版本信息。需要查看编译输出,以查看是否使用可靠松露。
参考资料:https://github.com/kaleido-io/truffle-kaleido-box/issues/3
https://ethereum.stackexchange.com/questions/72830
复制相似问题