mimblewimble / grin

Minimal implementation of the Mimblewimble protocol.
https://grin.mw/
Apache License 2.0
5.04k stars 990 forks source link

handle is_bad_data correctly for various block errors #3627

Closed antiochp closed 3 years ago

antiochp commented 3 years ago

Related #3605.

We currently "squash" errors and simply wrap them in either Other or Unfit. not entirely sure why we do this as we wrap block errors in another layer of block error here. We do not convert them to another type of error. I suspect this is unintentional and the result of some old refactoring/rework.

We want to propagate the underlying block related errors up so we can correctly handle is_bad_data() which in turn will result in peer banning logic kicking in.