-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation of damaged consignment panics instead of error #254
Comments
I agree on avoiding panics overall, but here It seems panic is necessary since it reveals a business-logic bug in validation code: the index of operations seems to be inconsistent. I need to debug: can you please provide details on how you have edited the consignment (or attach the consignment which doesn't work)? |
edited_consignment.zip Error message is:
|
Looking at the implementation: In the validation step, we use the @zoedberg can you provide the Also, @zoedberg It's not related to the error, but I noticed that your transition PS: This validation was recently added, see here. |
You should be able to easily convert the provided yaml consignment to a
The consignment has been created using the upstream |
I've manually edited a consignment and validation panicked.
In detail it panicked at
panic!("provided {opid} is absent");
(https://github.com/RGB-WG/rgb-core/blob/master/src/validation/validator.rs#L224)I think we should change this panic to an error and more in general we should avoid panicking during validation, otherwise an attacker can send invalid consignment on purpose to make a wallet panic.
The text was updated successfully, but these errors were encountered: