hyperledger / besu-native

Apache License 2.0
12 stars 34 forks source link

Improve robustness of RLP codec in ipa-multipoint #154

Closed thomas-quadratic closed 4 months ago

thomas-quadratic commented 4 months ago

Currently, there is no error handling for RLP encoding and decoding in the rust native lib ipa-multipoint. The lib assumes correct inputs or crashes otherwise. Although we have control over the inputs, it would be safer to implement proper error handling and propagation for RLP codec. This means:

  1. Catching codec errors on the rust side
  2. Throwing appropriate Exception in the JVM

Tests should include bad inputs to test that exceptions are properly thrown.

gfukushima commented 4 months ago

I'm not sure I understood part of this issue. Are we're creating a issue here to add error handling on the rust side?

thomas-quadratic commented 4 months ago

Hi @gfukushima : after discussion on telegram, I think we should try to do without RLP encoding. If you are OK, we can close this Issue, especially that error handling has been added in a new PR.