gpt4 book ai didi

substrate - 在 Substrate 中, `spec_version` 和 `authoring_version` 之间有什么区别?

转载 作者:行者123 更新时间:2023-12-03 16:47:39 26 4
gpt4 key购买 nike

每个 Substrate 运行时都有一个 RuntimeVersion .此 RuntimeVersion 结构中的字段指示运行时的各个方面何时发生变化,并且每个字段都有自己在这些文档中描述的语义。
我不确定是什么 authoring_version意味着什么时候应该改变。文档中的描述对我来说并不完全清楚

authoring_version: u32

authoring_version is the version of the authorship interface.
An authoring node will not attempt to author blocks unless this
is equal to its native runtime.
如果可能,请提供升级示例,其中:
  • 两者 spec_versionauthoring_version会改变
  • spec_version会改变,但 authoring_version不会
  • authoring_version会改变,但 spec_version不会
  • 最佳答案

    我将分享 Substrate 核心开发人员提供给我的答案 Bastian Köcher :

    There aren't that much changes that result in a bump of the authoring_version

    If you for example change the BlockBuilder runtime api in a non-backwards compatible way, you will need to bump the authoring_version

    As validators will not be able to build new blocks, without updating the node implementation

    And if you just change the runtime api in such a way that you make it incompatible to the previous while don't changing any internals in the runtime that would lead to a different storage root, you would only bump the authoring_version. However, I expect that this probably never happens in reality

    关于substrate - 在 Substrate 中, `spec_version` 和 `authoring_version` 之间有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64806322/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com