首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用所有气体后,Kaleido私有网络事务因错误(状态0)而退出

使用所有气体后,Kaleido私有网络事务因错误(状态0)而退出
EN

Ethereum用户
提问于 2019-07-12 02:07:22
回答 1查看 516关注 0票数 2

我使用Kaleido (版本1.0.13)创建了一个带有两个geth节点的专用PoA网络,并试图使用松露的毛毛雨-kaleido盒样板部署一些智能协议。我从模板中更改的唯一一件事是为节点和连接URL添加凭据。

当我用truffle develop在本地测试部署时,它成功地完成了:

代码语言:javascript
复制
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网络时,会出现以下错误:

代码语言:javascript
复制
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块资源管理器中,我可以看到契约创建事务成功完成,但是智能契约的调用失败。

EN

回答 1

Ethereum用户

回答已采纳

发布于 2019-07-12 21:05:32

更新的坚固版本已经解决了天然气问题,部署我们的样本合同。

在块菌-config.js中指定稳固版本。

代码语言:javascript
复制
  compilers: {
    solc: {
      version: "0.5.0",
    },
  }

来自@cruz:

代码语言:javascript
复制
@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

票数 3
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/72830

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档