EOSIO Dawn 4.2版本在 Github 发布,本次版本的更新旨在对漏洞进行修复和稳定性的提升。更新内容主要有:eosio.system合约账户分离;chain插件配置更新;producer插件增加管理rpc接口;不再默认生成genesis.json;BIOS BOOT过程文档更新。
本文翻译自:https://github.com/EOSIO/eos/releases/tag/dawn-v4.2.0
原文翻译
With EOSIO version 1.0 right around the corner, today we have tagged a Dawn 4.2 release of the EOSIO software. A couple of small features worked their way into the code, but as you’ll see below, we’ve been focused on bug fixes and stability improvements.
随着EOSIO 1.0版本发布的临近,EOSIO Dawn4.2现在发布。我们在代码方面做了些许修改,如下文所述,我们的关注点始终在漏洞修复和系统的稳定性提升。
主要更新内容
EOSIO.SYSTEM合约资金账号分离
To ensure the allocation of system funds is clear we’ve decided to segregate system funds as follows:
1、implemented a 1% fee on all RAM buying and selling
2、all RAM trading fees sent from user to eosio.ramfee
3、all proceeds from selling RAM sent from eosio.ram
4、all staked tokens sent to eosio.stake
5、all unstaked tokens sent from eosio.stake
6、all auction proceeds sent to eosio.names
7、unallocated inflation sent to eosio.saving
8、producer block pay sent to eosio.bpay
9、producer vote pay sent to eosio.vpay
See contracts/eosio.system/producer_pay.cpp for details.
为了明确系统资金的分配,我们决定分离系统资金账户如下:
1、RAM买卖收取1%手续费
2、RAM交易费用由用户发给eosio.ramfee
3、卖出RAM的收益由eosio.ram发放
4、抵押的token由用户发给eosio.stake
5、释放的token由eosio.stake转给用户
6、所有账户名称拍卖得到的收益发给eosio.names
7、未分配的通货膨胀发给eosio.saving
8、节点出块收益会发送到eosio.bpay
9、生产者投票收益会发送到eosio.vpay
查看contracts/eosio.system/producer_pay.cpp文件了解更多。
chain插件
We’ve seen a little confusion in the community about some of the data stored on disk and options available to users that are running nodes, and have attempted to make things clearer via the following updates.
We renamed the "shared_mem" directory to "state" and changed a few of the plugin options:
1、"--block-log-dir" renamed to "--blocks-dir"
2、"--checkpoint" shorthand alias "-c" was removed
3、"--shared-memory-size-mb" renamed to "--chain-state-db-size-mb"
4、added "--reversible-blocks-db-size-mb" to change default size of reversible blocks DB
5、"--resync-blockchain" renamed to "--delete-all-blocks" to discourage the use of this option
6、“--contracts-console” prints contract output to console and is also available via config.ini now
7、added “--hard-replay-blockchain” to move block logs and data into a backup directory and construct a new “blocks.log” file and will then continue as if “--replay-blockchain” was used
8、added “--force-all-checks” to force checking authorizations on input transactions, inline actions, and contract-generated transactions
9、added “--fix-reversible-blocks” to allow nodeos to try to recover from the “reversible” blocks database and then immediately exit
10、updated “--hard-replay-blockchain” to attempt to recover and replay as many reversible blocks as possible from the “reversible” block database, even if it is left in a dirty state
我们发现社区中有些人对磁盘中的数据以及运行节点的可用选项有些混淆,我们做了如下更新让这些配置能更加明了。
我们将“shared_mem”目录重命名为“state”,并更改了一些插件选项:
1、"--block-log-dir" 改为 "--blocks-dir"
2、"--checkpoint" 简称别名 "-c" 被去除
3、"--shared-memory-size-mb" 改为 "--chain-state-db-size-mb"
4、增加"--reversible-blocks-db-size-mb" 选项以更改可逆区块DB的默认大小
5、"--resync-blockchain" 改为 "--delete-all-blocks" ,需慎重使用该选项
6、"--contracts-console" 选项表示打印合约输出到控制台,也可以在config.ini中配置
7、添加 "--hard-replay-blockchain" 选项将日志和数据移动到备份目录并创建一个新的 8、"blocks.log" 文件,然后执行 "--replay-blockchain" 的工作
9、添加 "--force-all-checks" 选项,表示强制检查输入交易、内联 action 以及合约交易的授权
添加 "--fix-reversible-blocks" 选项,允许nodeos尝试从“可逆”块数据库中恢复,然后立即退出
10、更新 "--hard-replay-blockchain" 选项,尝试从“可逆”块数据库尽可能多地恢复和重放可逆块
producer插件
We added a command line argument (--max-irreversible-block-age) that will cause a node to automatically stop production when the last irreversible block time is older than N seconds, an indication that there are not enough producers confirming blocks for the chain to continue forward. This option prevents producers from producing an excessive number of blocks that will need to be rationalized upon resuming production once enough producers rejoin the network.
We added the ability to pause node production on demand. The goal is to allow producers to coordinate during bad situations to resume/pause the chain without having the variability of replay/resync time etc.
For reference:
POST /v1/producer/pause - pause production
POST /v1/producer/resume - resume from paused production
POST /v1/producer/paused - return true/false depending on whether the node is currently paused
我们添加了一个命令行参数(--max-irreversible-block-age),当最近的不可逆区块的时间早于N秒时,表示没有足够的生产者确认区块使得链无法继续运行,这时会自动停止出块。这个选项可以防止生产者产生过量的块,一旦足够的生产者进入网络,将恢复出块。
我们增加了按需停止节点出块的功能。目的是使得生产者可以在恶劣的环境下暂停/继续出块,而无需重放/重同步。
供参考的相关接口:
POST /v1/producer/pause - 暂停出块
POST /v1/producer/resume - 继续出块
POST /v1/producer/paused - 返回节点的状态,是否暂停
不再默认生成genesis.json文件
genesis.json is no longer expected to be in the config directory and will not be automatically generated. Here’s what you’ll need to do:
nodeos --extract-genesis-json
Modify the file, change the timestamp, change the initial producer key and any other parameters that you normally change. Share the file as you’ve done in the past.
nodeos --delete-all-blocks --genesis-json to initialize a new blockchain (on all nodes)
On subsequent launches, do not specify --genesis-json, nodeos will pull the genesis state from the block log, and of course do not --delete-all-blocks either.
If nodeos does not restart cleanly, --replay-blockchain and if that does not work --hard-replay-blockchain.
The resync option has been renamed to --delete-all-blocks to indicate what it is actually doing.
genesis.json 文件不再需要在config目录中,并且不会自动生成。如果需要,请运行下面命令:
nodeos --extract-genesis-json
编辑这个文件,定制 timestamp、生产者公钥和其他参数。然后分享这个文件。其他节点运行"nodeos --delete-all-blocks --genesis-json" 命令来初始化一条新的链。
后续启动链时,不要指定 "--genesis-json" 参数,nodeos 会从块日志中提取 genesis 状态,当然也不能指定 "--delete-all-blocks" 参数。
如果 nodeos 无法完成重启,带上 "--replay-blockchain",如果还不行,就带上 "--hard-replay-blockchain"。
resync 选项重命名为 "--delete-all-blocks" , 表示实际进行的操作,提示用户慎重使用。
BIOS Boot 过程文档更新
We made improvements to the BIOS boot tutorial including producers claim pay, proxy voting, eosio account resigning, producers use eosio.msig contract to replace eosio.system contract and some bug fixes. Please note that we moved the tutorial support files from the “programs” directory to a new “tutorials” directory.
我们完善了BIOS boot 教程,包括生产者报酬、代理投票、eosio账户更新、生产者使用eosio.msig合约来代替eosio.system合约以及其他一些bug。请注意,我们将教程文件从"programs"目录迁移到"tutorials"目录。
其他更新内容
As was mentioned last week in the “Quality Name Distribution & Namespaces” (#3189) proposal, the name auction has been implemented though it will not become active until two weeks after the network unlocks (15% votes).
Producers can now only increase RAM size and never decrease. This was done to prevent potential manipulation of the RAM market by block producers.
We’ve updated the version of the Boost library that we build against from 1.66 to 1.67.
The “data/shared_mem” directory has been renamed to “data/state”.
The “block-log-dir” config.ini option has been renamed to “blocks-dir”.
Changed the “set_active_producers” intrinsic to “set_proposed_producers” to more accurately reflect the intention of the function which is to propose a new, active producer schedule.
Following last week’s change to the token symbol, we added the ability to specify the core token symbol in the Dockerfile. We also switched to Ubuntu 18.04 LTS for the Docker builder image.
You may now set the chain ID from CMake. By default, it is set to sha256("eosio::chain version 1.0").
We noticed, and fixed, an unexpectedly high rate of mini forks on producer handoff, especially with high network latency between producers.
Block producers may now change blockchain parameters via the system contract by using the newly added “setparams” action.
Several testnets noticed that the grace period for inactivating recently voted in producers was too strict. The grace period has been changed from roughly four minutes to three hours. A few other corner cases for deactivation were ad
We greatly reduced the memory usage of the history plugin by reducing the tracked actions to only those that match explicit filter rules. There is now no way to track all actions since that is susceptible to filling shared_mem.
We discovered, and corrected, an infinite recursion bug with various, malformed abi definitions.
We changed producer deactivation logic to prevent block producers from being removed from the production schedule improperly. We now update the producer field “time_became_active” every time a producer gets voted in as opposed to the first time only. If it's the first time or it's been over a day since a producer was last voted in, we don't check their “last_produced_block_time” and we don't deactivate them. Otherwise, the logic stays the same. This way we don't penalize a producer for not producing blocks after getting voted out.
正如上周在“完善名字分配和命名空间” (#3189)提案中提到的,名字拍卖已经实现了,会在主网启动(15% 投票)后两周内生效。
生产者只能增加RAM大小,不能减少。这是防止生产者操控RAM市场。
Boost库的版本从1.66更新到1.67。
"data/shared_mem" 目录改名为 "data/state"。
config.ini中 "block-log-dir" 参数改名为 "blocks-dir"。
"set_active_producers" 改为 "set_proposed_producers",能更准确地反映了提出新的积极的生产调度的意图。
在上周对token符号进行更改之后,我们添加了在Dockerfile中指定token符号的功能。并且使用Ubuntu 18.04作为Docker基础构建镜像。
现在,也可以在CMake中指定chain ID。默认被设置为sha256("eosio::chain version 1.0")。
我们注意到并且修复了一个问题,是生产者移交过程中会产生小的分叉,特别是生产者之间网络延迟较高的情况下会出现。
块生产者现在可以通过使用新增加的"setparams" Action来通过系统合约更改区块链参数。
有几家测试网络注意到,最近对节点投票停用的宽限期过于严格。 宽限期从大约四分钟改为三小时。 通过将跟踪的操作减少到仅符合明确过滤原则的情况,我们很大程度减少了历史插件的内存使用量。 现在无法跟踪所有操作,因为这可能会填充shared_mem。
我们发现并更正了一个无限递归错误,其中包含各种有缺陷的abi定义。
我们更改了出块者停用逻辑,以防止错误地将出块者从生产计划中移除。 我们现在每当节点投票都会更新生产者字段“time_became_active”,以防首次投票产生的问题。 如果这是第一次,或者是出块者上次投票后的一天,那我们将不会检查他的“last_produced_block_time”,也不会停用它们。 否则,逻辑保持不变。 这样我们就不会为了投票后不出块而惩罚节点。
Patroneos
*We introduced Patroneos last week, and it is now available to the community via the EOSIO GitHub repository, *
https://github.com/EOSIO/patroneos.
As a reminder, Patroneos provides a layer of protection for EOSIO nodes designed to protect against some of the basic Denial of Service attack vectors.
上周我们对Patroneos进行了介绍,现在社区可以通过EOSIO GItHub的项目库获取相关信息。链接为:https://github.com/EOSIO/patroneos.
友情提示,Patroneos为EOSIO节点提供了一层保护,旨在防止一些基本的拒绝服务攻击媒介。
Dawn4.2于GitHub发布
EOSIO Dawn 4.2 is available on GitHub here (https://github.com/EOSIO/eos/releases/tag/dawn-v4.2.0) so that developers and block producer candidates can continue testing their applications and networks.
Dawn 4.2版本现可在GitHub上查看,链接为:https://github.com/EOSIO/eos/releases/tag/dawn-v4.2.0,新版本的发布旨在促进开发者和节点代表能够测试他们的应用程序和网络运行情况。
社区支持
As a reminder, we love hearing from our community and are dedicated to helping them run EOSIO successfully. Our EOSIO Stack Exchange (https://eosio.stackexchange.com/) beta is going well and we encourage questions about how to use the software on Stack Exchange. Please continue to report any potential bugs you may see in GitHub and include the following information:
*Testnet: *
EOSIO git version: <”nodeos -v” output>
config.ini: attach your config.ini file
genesis.json: attach your genesis.json file
Command line: your full nodeos command line
Console output: attach console debug output around the error that you are seeing (ok to paste into the description if it is small)
友情提示,我们会倾听来社区的声音并致力于帮助他们顺利运行EOSIO。我们的EOSIO Stake Exchange (https://eosio.stackexchange.com/,eosio问答平台) beta版本运行状况良好,我们会鼓励向我们提问关于如何使用Stake Exchange的问题。请在Github上告知我们任何潜在的Bug,信息格式如下:
Testnet:
EOSIO git version: <"nodeos -v" 输出>
config.ini: 附上你的config.ini文件
genesis.json: 附上你的genesis.json文件
Command line: 操作命令
Console output: 附上控制台调试输出的错误结果(如果内容不多,可以复制到描述中)
将来版本的发布
We’re on target for the EOSIO Version 1.0 release on June 1st. You can follow the issues that we are committed to working on over the next few weeks by observing the Version 1.0 milestone (https://github.com/EOSIO/eos/milestone/10) in GitHub.
我们的所作所为都是为了六月一号EOSIO 1.0的发布。您可以通过GitHub中的1.0版本 milestone (https://github.com/EOSIO/eos/milestone/10) 这一栏来了解我们所承诺的在未来几周内要解决的问题。
= END =
长按识别下方二维码
即可关注IMEOS.ONE公众号