Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

eosio.system can not deploy on nodeos 1.8.1 #7647

Closed
dawnFromDark opened this issue Jul 13, 2019 · 1 comment
Closed

eosio.system can not deploy on nodeos 1.8.1 #7647

dawnFromDark opened this issue Jul 13, 2019 · 1 comment

Comments

@dawnFromDark
Copy link

my system contract is : eosio.system (https://github.com/EOSIO/eosio.contracts) master branch,
and my nodeos is 1.8.1
the system contract can not deployed on chain,the error message is following:

image

@jgiszczak
Copy link
Contributor

From the eosio.contracts 1.7.0 release notes:

EOSIO.Contracts v1.7.0 is required to support activation of nearly all of the consensus protocol upgrades introduced in EOSIO v1.8.0. The eosio.system and eosio.bios contracts contained in this release can only be deployed on an EOSIO blockchain after the activation of the PREACTIVATE_FEATURE consensus protocol upgrade.

In detail:

The implementation of the activate action requires linking against a new intrinsic function which is only made available after the PREACTIVATE_FEATURE protocol feature is activated on the EOSIO blockchain. This means that until that protocol feature is activated, it will not be possible to deploy this system contract to the chain.

From the EOSIO 1.8.0 release notes:

This release adds the foundations needed to support consensus protocol upgrades (#6831, #7167). PR #6831 also introduced the consensus protocol upgrade feature (or just protocol feature for short) with the codename PREACTIVATE_FEATURE which, after activation, enables operators of an EOSIO blockchain to use an on-chain process to activate further protocol features.

From the pull request #6831 documentation:

Two new intrinsics, preactivate_feature and is_feature_activated, which become linkable (via the mechanism of pillar 2 above) on activation of the PREACTIVATE_FEATURE intrinsic, enable, respectively, pre-activating a protocol feature from within a privileged contract and checking if a particular protocol feature has been activated from within any contract (#6431).

To enable the new intrinsics when setting up your testnet, first enable the producer_api_plugin. If you're following the BIOS Boot Sequence tutorial, 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.

Next, run the appropriate start script and once nodeos is running and producing blocks, call the get_supported_protocol_features API.

curl --request POST \
  --url http://host/:port/v1/producer/get_supported_protocol_features \
  --header 'content-type: application/x-www-form-urlencoded; charset=UTF-8'

In the results, find the section containing the PREACTIVATE_FEATURE:

[
  {
    "feature_digest": "0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd",
    "subjective_restrictions": {
      "enabled": false,
      "preactivation_required": false,
      "earliest_allowed_activation_time": "1970-01-01T00:00:00.000"
    },
    "description_digest": "64fe7df32e9b86be2b296b3f81dfd527f84e82b98e363bc97e40bc7a83733310",
    "dependencies": [],
    "protocol_feature_type": "builtin",
    "specification": [
      {
        "name": "builtin_feature_codename",
        "value": "PREACTIVATE_FEATURE"
      }
    ]
  }
]

Copy the feature_digest value and use it to schedule activation:

curl --request POST \
  --url http://host/:port/v1/producer/schedule_protocol_feature_activation \
  --header 'content-type: application/json'
  --data-binary '{"protocol_features_to_activate":["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'

Once a block has been produced the new intrinsics required by v1.7.0 of the BIOS and system contracts will be available and you may set code as before.

Updates to the developer portal documentation are in progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants