BCSkill (Block chain skill ) 技术社区
社区QQ群:791420381
社区论坛:http://wiki.bcskill.com
Telegram: https://t.me/bcskill

零基础EOS 节点部署,BP出块(二)-->节点连接

1.进入eosio主机终端,

cd ~/.local/share/eosio/nodeos/config
//编辑配置文件
vi config.ini
//修改p2p-server-address 为本机ip
p2p-server-address = 192.168.1.116:9876
//修改初始化创世块
enable-stale-production = true
//修改producer-name 为eosio(创世节点必须此名)
producer-name = eosio
//修改key
private-key = ["EOS5DkKbBZnSKNSV1iu27ovnygGhoCA99eH69KyNNkSkNrrbBoiRe","5KeqsXty9Sa8GfJgNfkckYxKKGcAWE4AWmUHiw6ifDcn3jjUg2i"]
//添加插件支持
plugin = eosio::producer_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::wallet_api_plugin
#plugin = eosio::account_history_api_plugin
plugin = eosio::http_plugin

2.进入 eosio.bp1主机终端

cd ~/.local/share/eosio/nodeos/config
//编辑配置文件
vi config.ini
//修改p2p-server-address 为本机ip
p2p-server-address = 192.168.1.116:9876
//p2p-peer-address 添加 eosio和eosio.bp2 ip
p2p-peer-address = 192.168.1.112:9876
p2p-peer-address = 192.168.1.168:9876
//修改 producer-name
producer-name = eosio.bp1
//修改 key
private-key = ["EOS6hfh1yup4tZjbjhD3oPuZwMFqL4iUVehgMsukuvx5ojTWuurtT","5HragVTsSmmAg1mznNMDSeAp2ZezcNBw6SbczrNpNtUqRcx4vhh"]
//添加插件支持
plugin = eosio::chain_api_plugin
plugin = eosio::chain_plugin
plugin = eosio::producer_plugin
plugin = eosio::http_plugin
plugin = eosio::net_api_plugin
plugin = eosio::net_plugin
plugin = eosio::wallet_api_plugin
plugin = eosio::history_api_plugin

3.进入eosio.bp2主机终端 同2

//注意修改 config.ini
//p2p-peer-address 添加 eosio和eosio.bp1 ip

EOS 节点部署,BP出块(三)-->开始部署

cleos system newaccount failed with “to account does not exist” error message

The following accounts need to be created before you can use eosio.system contract via cleos system newaccount to create accounts:

systemAccounts = [
    'eosio.bpay',
    'eosio.msig',
    'eosio.names',
    'eosio.ram',
    'eosio.ramfee',
    'eosio.saving',
    'eosio.stake',
    'eosio.token',
    'eosio.upay',
]

//创建系统预留账户
cleos create account eosio eosio.bpay EOS5iezVa6bsmvZ3HNxdqgyX6GFRMWzE7FsjS3cui8Foavxnj8CfR EOS5iezVa6bsmvZ3HNxdqgyX6GFRMWzE7FsjS3cui8Foavxnj8CfR
cleos create account eosio eosio.msig EOS8K1wkfCzPmxAjjfqvqw6zQ1Dbc82YsQyR8MmwNFLcRHcJtth89 EOS8K1wkfCzPmxAjjfqvqw6zQ1Dbc82YsQyR8MmwNFLcRHcJtth89
cleos create account eosio eosio.names EOS5ps938c5zj6UqhdCfssyAy7WSbHgfZoraqD6HrnbpmpEwPwX7S EOS5ps938c5zj6UqhdCfssyAy7WSbHgfZoraqD6HrnbpmpEwPwX7S
cleos create account eosio eosio.ram EOS7DA8jGA6HfZXYcGSGJNsWJL5Q6t5bWcvm4zNykN3Jw7tASzBCR EOS7DA8jGA6HfZXYcGSGJNsWJL5Q6t5bWcvm4zNykN3Jw7tASzBCR
cleos create account eosio eosio.ramfee EOS7R1Ds4zLMPN6onVXjL8XGgKHHCMWjLT7wn3bHcHnQX3dVLErjE EOS7R1Ds4zLMPN6onVXjL8XGgKHHCMWjLT7wn3bHcHnQX3dVLErjE
cleos create account eosio eosio.saving EOS4uDMpca1dAK7HZZRQ1SqWZHvJNnakzsSuTmM12crvzwRorwQcQ EOS4uDMpca1dAK7HZZRQ1SqWZHvJNnakzsSuTmM12crvzwRorwQcQ
cleos create account eosio eosio.stake EOS6BDfFaFZgvx889BQbdaGTMYSn5tUuxaynGQDhpDGD662eBGwkF EOS6BDfFaFZgvx889BQbdaGTMYSn5tUuxaynGQDhpDGD662eBGwkF
cleos create account eosio eosio.upay EOS7zS7sHctU54oD6is2oPfq11duCMSWfda3HXJAghSfqqr2BZZnV EOS7zS7sHctU54oD6is2oPfq11duCMSWfda3HXJAghSfqqr2BZZnV

先创建系统预留账户,然后再创建其他账户

Not producing block because the irreversible block is too old

修改 config.ini
max-irreversible-block-age = -1 //无限制

Set contract eosio.system error 3080006: transaction took too long (2)

$ nodeos --max-transaction-time=1000 --resync

$ cleos create key  # for eosio.token
$ cleos wallet import ...
$ cleos create account eosio eosio.token ...
$ cleos set contract eosio.token build/contracts/eosio.token
$ cleos push action eosio.token create '[ "eosio", "10000000000.0000 SYS", 0, 0, 0]' -p eosio.token
$ cleos push action eosio.token issue '[ "eosio", "1000000000.0000 SYS", "memo" ]' -p eosio

$ cleos set contract eosio build/contracts/eosio.system

先部署eosio.token合约,发SYS代币后,再部署 eosio.system合约

EOS Error 3080006: transaction took too long

cd eos/build
make install
cleos set contract build/contracts/eosio eosio.system -x 1000