Specify depth of a block before indexing it in plutus-chain-index
koslambrou opened this issue · comments
Describe the feature you'd like
It is often said that rollbacks frequently occur in the Cardano blockchain, but the rollback depth is low. Thus, to reduce the amount of rollbacks dApp need to deal with, we can add a config option which specifies the min depth of a block before indexing it in the chain-index's database.
Step to implement:
1- Add a config which specifies the depth of a block before indexing it (let's call it minIndexingDepth
). This has a different semantic than securityParam
which is the depth when a block is not "rollbackable".
2- Then, we need to change the syncing logic to append a block only when it has reached the min depth.
3- Finally, document the config option in the CLI and the Haskell config type. In the doc, mention that right now, the industry standard is a depth of 10-20 blocks (also called confirmations).
Describe alternatives you've considered
No response