问题
我正在使用自定义帐户和密钥运行具有 2 个本地节点的私有链。
对等发现有效,但区块尚未最终确定。
Idle (1 peers), best: #0 (0xb166…8ad2), finalized #0 (0xb166…8ad2),
Idle (1 peers), best: #0 (0xb166…8ad2), finalized #0 (0xb166…8ad2),
...
描述
在chain_spec.rs
:
从Armstrong、Armstrong//stash、Aldrin、Aldrin//stash种子中创建一组新帐户,方法是在 bin/node 中完成:
AccountPublic::from(sp_core::Public::Pair::from_string(seed)).into_account()
将初始权限设置为控制帐户Armstrong和Aldrin。
为初始权限创建
SessionKeys
。BalancesConfig
: 为每个账户赋予一些余额。SessionConfig
: 使用SessionKeys
我刚刚创建的。StakingConfig
: 设置stakers
为 4-tuple 包含(stash, controlller, amount, StakerStatus::Validator)
这会产生一个构建规范,如:
托盘会话
{
"keys": [
[
"<STASH_ID>",
{
"grandpa": "...",
"babe": "<CONTROLLER_ID>",
"im_online": "<CONTROLLER_ID>",
"authority_discovery": "<CONTROLLER_ID>"
}
],
[
"<STASH_ID>",
{
"grandpa": "...",
"babe": "<CONTROLLER_ID>",
"im_online": "<CONTROLLER_ID>",
"authority_discovery": "<CONTROLLER_ID>"
}
]
]
}
托盘放样
"stakers": [
[
"<STASH_ID>",
"<CONTROLLER_ID>",
<STASH_AMOUNT>,
"Validator"
],
[
"<STASH_ID>",
"<CONTROLLER_ID>",
<STASH_AMOUNT>,
"Validator"
]
]
Polkadot.js 用户界面
- Peer 显示在 Explorer -> Node info 中:
- 我可以将创建的帐户添加到通讯簿,但它们没有显示在帐户中:
- Stash 帐户在 Stacking 屏幕中显示为验证器,但 Account 操作会显示一条
No funds staked yet. Bond funds to validate or nominate a validator
消息: