LNP-BP / client_side_validation

Standard implementation of client-side-validation APIs
https://docs.rs/client_side_validation
Apache License 2.0
22 stars 19 forks source link

broken MerkleBlock conceal procedure #124

Closed zoedberg closed 1 year ago

zoedberg commented 1 year ago

Executing rgb-lib tests we found an issue that sometimes happens and seems very similar to https://github.com/RGB-WG/rgb-node/issues/208, but I'm not sure it's the same.

The error we receive is MerkleBlock conceal procedure is broken and comes from ~/.cargo/git/checkouts/client_side_validation-8dff74d720902144/46cb8a7/commit_verify/src/mpc/block.rs:418:21.

@dr-orlovsky could you please investigate this?

dr-orlovsky commented 1 year ago

No, this appears to be an issue unrelated to the original one. Investigating its possible source. Can you pls provide me with the source data with which you are getting this panic?

nicbus commented 1 year ago

Here's the stock.dat file for a wallet that encounters the issue while calling .transfer(contract_id, beneficiaries) on the Runtime (in a regtest environment).

stock.dat.zip

dr-orlovsky commented 1 year ago

@nicbus should be solved with https://github.com/LNP-BP/client_side_validation/pull/125

Can you pls check & confirm that the solution works for your tests?

zoedberg commented 1 year ago

I've checked (running the test 120 times to be sure :sweat_smile:) and I confirm that #125 seems to fix this error. Nice catch @dr-orlovsky

dr-orlovsky commented 1 year ago

Yeah, took about a week to hunt it down.