eosio更改genesis.json配置

链启动后想要更改genesis.json可以通过系统合约 eosio.system 的 setparams 操作来更新链参数

1、准备参数 JSON

准备前务必先执行第3步获取最新配置(setparams的参数都会更改genesis.json,需要获取一下最新的数据设置到setparams参数里面)
{
“max_block_net_usage”: 1048576,
“target_block_net_usage_pct”: 1000,
“max_transaction_net_usage”: 524288,
“base_per_transaction_net_usage”: 12,
“net_usage_leeway”: 500,
“context_free_discount_net_usage_num”: 20,
“context_free_discount_net_usage_den”: 100,
“max_block_cpu_usage”: 300000,
“target_block_cpu_usage_pct”: 1000,
“max_transaction_cpu_usage”: 280000,
“min_transaction_cpu_usage”: 100,
“max_transaction_lifetime”: 3888000,
“deferred_trx_expiration_window”: 600,
“max_transaction_delay”: 3888000,
“max_inline_action_size”: 4096,
“max_inline_action_depth”: 4,
“max_authority_depth”: 6
}

2、使用setParams动作

cleos push action eosio setparams ‘[{“max_transaction_lifetime”:7200, …}]’ -p eosio@active

如下:

cleos push action eosio setparams ‘[{“max_block_net_usage”:1048576,“target_block_net_usage_pct”:1000,“max_transaction_net_usage”:524288,“base_per_transaction_net_usage”:12,“net_usage_leeway”:500,“context_free_discount_net_usage_num”:20,“context_free_discount_net_usage_den”:100,“max_block_cpu_usage”:300000,“target_block_cpu_usage_pct”:1000,“max_transaction_cpu_usage”:280000,“min_transaction_cpu_usage”:100,“max_transaction_lifetime”:3888000,“deferred_trx_expiration_window”:600,“max_transaction_delay”:3888000,“max_inline_action_size”:4096,“max_inline_action_depth”:4,“max_authority_depth”:6}]’ -p eosio@active
在这里插入图片描述

3、使用命令,cleos get table eosio eosio global -L 0 -l 1 验证是否生效

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xiegwei

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值