Open odeke-em opened 2 weeks ago
the constant is consensus critical, so any tx or node that has a different value will have different blob share commitments and different data roots
therefore its safe to panic if a negative value is used, although I don't think we need to add if statements that check for this everywhere given its consensus critical
alternatively to panicking, we could pass the app version to https://github.com/celestiaorg/go-square/blob/f0bf09056c663a3d6aad93b453bac71665c2dba5/inclusion/blob_share_commitment_rules.go#L78-L98
Summary of Bug
Found by fuzzing in less than 2 minutes and even on CI/CD per https://github.com/celestiaorg/go-square/actions/runs/11515786009/job/32057128298?pr=119, we have a divide by zero at https://github.com/celestiaorg/go-square/blob/f0bf09056c663a3d6aad93b453bac71665c2dba5/inclusion/blob_share_commitment_rules.go#L84 or simply
Please define what happens when we have a subtreeRootThreshold=0
Version
f0bf09056c663a3d6aad93b453bac71665c2dba5
Steps to Reproduce
Please see above.
Kindly cc-ing @cristaloleg @walldiss @Wondertan
For Admin Use