Enforce coinbase maturity in consensus rules #90
Labels
Difficulty: Intermediate
This issue can be worked on by someone with a moderate amount of experience with the codebase
Enhancement
New feature or request
Help Wanted
Extra attention is needed
Milestone
XEX is currently spendable as soon as it is mined. The issue with this instant allowance is that if a fork were to occur shortly after a block is generated, and the XEX generated in the coinbase of that block is spent, all transactions with that XEX would be invalidated (not delayed as what happens in a regular fork, as these transactions could never be valid because they are referencing a coinbase transaction that no longer exists). We need to define a coinbase maturation period which dictates how many blocks must be generated before a coinbase is deemed safe to spend. Bitcoin's coinbase maturation period is 101 blocks ~17 hours.
We should consider how many blocks a highly unlikely fork would constitute and base the maturation period from that. If we wanted to wait ~24 hours for coinbase transactions to be spendable we could set this threshold to 720 blocks.
The text was updated successfully, but these errors were encountered: