LayerTwo-Labs / bip300301_enforcer

CUSF software enforcing BIP300 and BIP301 rules.
1 stars 4 forks source link

validator: avoid erroring on invalid BMM requests #54

Closed torkelrogstad closed 6 days ago

torkelrogstad commented 1 week ago

Invalid BMM requests are not an error in our system, and should not stop our syncing progress.

Prior to this commit we would stop syncing at 26313 due to the inclusion of a BMM request that was not accepted by miners:

2024-10-21T06:26:22.262496Z ERROR bip300301_enforcer: src/main.rs:185: Failed to connect block: Error handling M8: Cannot include BMM request; not accepted by miners
nchashch commented 6 days ago

55 seems to be better, because we are solving this problem systematically for all kinds of non-fatal errors, not just BMM errors. And it is better for readability, because you can look at the error enum variant and see if it is marked as #[fatal] -- with the approach in this PR you'd have to dig through the actual implementation code to see if an error is fatal or not.

nchashch commented 6 days ago

I'll close this one, then we can decide between #55 and #56.