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

[docs] Add How To: Minimal Test Chain with Consensus Protocol Upgrade #7180

Open
tbfleming opened this issue Apr 23, 2019 · 6 comments
Open
Assignees
Labels
documentation Requires attention from documentation team. e.g. documentation is expected to be generated.

Comments

@tbfleming
Copy link
Contributor

tbfleming commented Apr 23, 2019

This starts a minimal test chain with upgrades activated. This guide assumes you're already familiar with creating and using test chains.

Install and build

  • Install eosio v1.8.0 RC1
  • Install eosio.cdt v1.6.x
  • Use the eosio.cdt to build eosio.contracts v1.7.0 RC1

Create a wallet, or unlock existing

Use cleos wallet create or cleos wallet unlock

Add the default key

cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

Create a test chain

This will create a fresh chain in directory my-chain. Both chain_api_plugin and producer_api_plugin enable the commands which follow.

mkdir my-chain
cd my-chain
nodeos -d ./data --config-dir ./config --plugin eosio::chain_api_plugin --plugin eosio::producer_api_plugin -p eosio -e 2>stderr &

Preactivate feature

Do this before installing eosio.bios:

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

Install bios and activate remaining features

cleos set contract eosio .../path/to/contracts/build/contracts/eosio.bios -p eosio

cleos push action eosio activate '["f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d"]' -p eosio # GET_SENDER
cleos push action eosio activate '["2652f5f96006294109b3dd0bbde63693f55324af452b799ee137a81a905eed25"]' -p eosio # FORWARD_SETCODE
cleos push action eosio activate '["8ba52fe7a3956c5cd3a656a3174b931d3bb2abb45578befc59f283ecd816a405"]' -p eosio # ONLY_BILL_FIRST_AUTHORIZER
cleos push action eosio activate '["ad9e3d8f650687709fd68f4b90b41f7d825a365b02c23a636cef88ac2ac00c43"]' -p eosio # RESTRICT_ACTION_TO_SELF
cleos push action eosio activate '["68dcaa34c0517d19666e6b33add67351d8c5f69e999ca1e37931bc410a297428"]' -p eosio # DISALLOW_EMPTY_PRODUCER_SCHEDULE
cleos push action eosio activate '["e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526"]' -p eosio # FIX_LINKAUTH_RESTRICTION
cleos push action eosio activate '["ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99"]' -p eosio # REPLACE_DEFERRED
cleos push action eosio activate '["4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f"]' -p eosio # NO_DUPLICATE_DEFERRED_ID
cleos push action eosio activate '["1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241"]' -p eosio # ONLY_LINK_TO_EXISTING_PERMISSION
cleos push action eosio activate '["4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67"]' -p eosio # RAM_RESTRICTIONS
@dixia
Copy link
Contributor

dixia commented Feb 20, 2020

@tbfleming looks good note. What kind of guide or tutorial is to be create based on this note?

@dixia dixia self-assigned this Feb 20, 2020
@iamveritas
Copy link
Contributor

@tbfleming the bios boot tutorial is doing exactly this.
https://developers.eos.io/welcome/latest/tutorials/bios-boot-sequence

@tbfleming
Copy link
Contributor Author

Good. Still need a separate set of instructions for quickly getting a non-system-contract chain up with features activated.

The instructions I wrote above are for people already familiar with setting up test chains. May need:

  • Something similar to the above that doesn't add a bunch of stuff people already know. Suitable for quick reference.
  • A more tutorial-oriented version that goes into explanations and maybe cover additional material.

@dixia
Copy link
Contributor

dixia commented Feb 26, 2020

@tbfleming could you share more on the goal or intended purpose of this tutorial?

@lparisc
Copy link
Contributor

lparisc commented Feb 26, 2020

@dixia I discussed this with @tbfleming yesterday. Basically, this would be a quick "how-to" (not a full tutorial) for starting minimal test chain with protocol features activated. This is to be performed manually by following the instructions provided. The more "tutorial-oriented" version is somewhat covered already in the bios-boot tutorial, but I think it would need to be adapted to a minimal (single node) test chain.

@dixia
Copy link
Contributor

dixia commented Mar 9, 2020

I would say we already have this covered with getting start tutorial that creates a chain but does not load up any system contract.

Maybe we should create a how-to guide on how to activate protocol features

@iamveritas iamveritas changed the title Minimal Test Chain with Consensus Protocol Upgrade [docs] Add How To: Minimal Test Chain with Consensus Protocol Upgrade Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Requires attention from documentation team. e.g. documentation is expected to be generated.
Projects
None yet
Development

No branches or pull requests

4 participants