小编Jos*_*rff的帖子

在 Substrate 中,`spec_version` 和 `authoring_version` 有什么区别?

每个 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.
Run Code Online (Sandbox Code Playgroud)

如果可能,请提供升级示例,其中:

  • 双方spec_versionauthoring_version会改变
  • spec_version会改变,但authoring_version不会
  • authoring_version会改变,但spec_version不会

parity-io substrate

6
推荐指数
1
解决办法
97
查看次数

如何在基板运行时进行浮点运算

如何在基板运行时对浮点值进行数学运算。作为一个简单的例子,假设我想跟踪去中心化金融中的利率。

我可以使用百分比作为整数进行原型设计

let rate = 2;
let dividend = capital * rate / 100;
Run Code Online (Sandbox Code Playgroud)

但是如果我的利率是 2.5% 或 2.4554% 呢?

是否有任何标准方法来进行浮点运算?

blockchain parity-io substrate

3
推荐指数
1
解决办法
150
查看次数

如何在 Substrate 节点模板中使用 Polkadot-js API?

在 Substrate 生态系统中,通过分叉Substrate Node Template开始编写新的区块链节点是很常见的。用户界面有几个选项(例如Appsfront-end-template),它们都基于相同的底层Polkadot-JS API

某些版本的 API 与某些版本的节点模板一起使用,无需任何自定义配置,但通常必须向 API 提供有关节点使用哪些类型的信息。提供类型的过程记录在https://polkadot.js.org/api/start/types.extend.html#impact-on-extrinsics我需要提供哪些类型

substrate

2
推荐指数
1
解决办法
717
查看次数

在Substrate中,Babe,Aura和Grandpa之间有什么区别

Substrate支持“可插入共识”,因此开发人员可以从几种共识算法中进行选择。它标配有四种算法:

Some of these (eg babe and grandpa) can even be used together in a single node. What are the differences between each consensus algorithm, and which ones can or should be used together?

consensus blockchain parity-io substrate

1
推荐指数
1
解决办法
102
查看次数

标签 统计

substrate ×4

parity-io ×3

blockchain ×2

consensus ×1