美文网首页
env.is_feature_activated无法解决

env.is_feature_activated无法解决

作者: 小蜗牛爬楼梯 | 来源:发表于2020-05-22 09:35 被阅读0次

您仍然可以发布系统合同,但首先要为v1.8.x节点激活该协议功能:

TLDR:

1.  add `eosio::producer_api_plugin`
2.  run `curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'`

If it doesn't work:

1.  run `curl -X POST http://127.0.0.1:8888/v1/producer/get_supported_protocol_features`
2.  find `feature_digest` value for `PREACTIVATE_FEATURE`
3.  use it in above's curl.

Possible Errors

Error 3070000: WASM Exception

Error Details:

env.is_feature_activated unresolveable

pending console output:

//This is because 'is_feature_activated' is new intrinsic which is introduced in EOSIO v1.8.x. It would be activated by hard fork, but not yet supported.

//To solve it, follow the below solutions:

1. Add '--plugin eosio::producer_api_plugin' to the arguments of nodeos in each of the genesis_start.sh and start.sh scripts described in the tutorial.

2. Run the appropriate start script and once nodeos is running and producing blocks, call the get_supported_protocol_features API:

curl -X POST http://127.0.0.1:8888/v1/producer/get_supported_protocol_features -d '{}' | jq

3. In the results, find the section containing the PREACTIVATE_FEATURE:

"feature_digest":"0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"

4. Copy the feature_digest value and use it to schedule activation:

Curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}' | jq

5. Post the system contracts again.

You can still post system contract but first activate that protocol feature for v1.8.x node:

TLDR:

add eosio::producer_api_plugin

run curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'

If it doesn't work:

run curl -X POST http://127.0.0.1:8888/v1/producer/get_supported_protocol_features

find feature_digest value for PREACTIVATE_FEATURE

use it in above's curl.

Reference: https://www.jianshu.com/p/99bdf3f908f6

相关文章

网友评论

      本文标题:env.is_feature_activated无法解决

      本文链接:https://www.haomeiwen.com/subject/emifahtx.html