有没有办法调整基板中的块间隔?

Is there way to adjust block interval in substrate?

我知道基于 substrate 的链的默认区块间隔是 6s。

我的问题是能不能定制

如果可以,我该怎么做?它必须在链开始之前设置,或者你可以在节点 运行.

上动态更改它

在节点模板中,该值在此处设置并且可自定义https://github.com/substrate-developer-hub/substrate-node-template/blob/v2.0.0/runtime/src/lib.rs#L104. You should be able to update this value for a running chain by way of Substrate's forkless runtime upgrade capabilities, which you can learn more about here https://substrate.dev/docs/en/knowledgebase/advanced/executor#runtime-upgrades and here https://substrate.dev/docs/en/knowledgebase/runtime/upgrades