erigontech / erigontech/silkworm
Inconsistency when handling block rewards.
- Dominant language
- C++
- Stars
- 318
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
There some inconsistency when calculating block rewards. e.g. in https://github.com/erigontech/silkworm/blob/29b40fc5c4a8039503b7dd3912ebd8c1efd2202e/silkworm/rpc/commands/erigon_api.cpp#L496C3-L496C3
The reward is only calculated when using ethash: (chain_config.config.count("ethash") != 0)
but in https://github.com/erigontech/silkworm/blob/29b40fc5c4a8039503b7dd3912ebd8c1efd2202e/silkworm/rpc/core/evm_trace.cpp#L1220
The reward is computed regardless.
Should the compute_reward function be made a more general way so we can have different block rewards for different rule_set or at least make sure we only count rewards when using ethash?
Contributor guide
Assessment
This issue has not been assessed yet.