celestiaorg / celestiaorg/celestia-node
params: `BlockTimeFor` func reporting block time of a network
Open
area:params
- Dominant language
- Go
- Stars
- 996
- Forks
- 1.1k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 34
Description
There should be a way for the Node to know what block time of a network the node operates on. Options:
* The node can calc an avrg time between headers it rcvs from the network
* Or we can hardcode another registry in `params` of block times per each network we support.
The second option simplifies logic for the code that works with block time, as it's constant and does not change in the runtime. And there is no clear reason to complicate things with the first option yet, so we should go with the second.
It can be implemented similarly to existing registry for network bootstrappers.
Contributor guide
Assessment
This issue has not been assessed yet.