Skip to content
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

non-mandatory-script-verify-flag error when broadcasting tx with electrum #83

Closed
zoedberg opened this issue Jun 12, 2024 · 3 comments
Closed
Assignees

Comments

@zoedberg
Copy link
Contributor

I've discovered a bug while developing the rgb-integrations-tests. When broadcasting a TX I receive a non-mandatory-script-verify-flag error. Here some info I've gathered:

  • appears when broadcasting via electrum (doesn't appear when using esplora as indexer)
  • happens when the transfer type is witness
  • happens when sending an asset received back, after several other transfers (including at least a blank transition)
    • if the sending wallet is tapret the error is Protocol(Object {"code": Number(2), "message": String("non-mandatory-script-verify-flag (Invalid Schnorr signature)")})
    • if the sending wallet is opret the error is Protocol(Object {"code": Number(2), "message": String("non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)")})
  • it may be related to the fact that descriptor-wallet is using an old rust-bitcoin version and/or the fact that when converting the psbt returned from the pay method we cast it from v2 to v0 (because of descriptor-wallet not supporting v2)

For more info on the code that triggers the issue, see the PR RGB-WG/rgb-tests#2 (using RUST_BACKTRACE=1 it's possible to see that the error arises from the last transfer of the transfer_loop test)

@dr-orlovsky I know descriptor-wallet will be eventually replaced by bp-wallet, but currently there are no other libraries we can use to use RGB with tapret1st, so either we fix this or we complete work on bp-wallet to completely drop descriptor-wallet.

@dr-orlovsky
Copy link
Member

I had four times tried to update descriptor wallet bitcoin dependency, but failed spending couple of days with no success - too many API breaking changes in bitcoin + conflicts with strict types used in descriptor wallet which were rewritten after. I will give it another try, but if I'll fail, it will be probably faster for me to complete signing in bp-wallet.

@dr-orlovsky
Copy link
Member

dr-orlovsky commented Jun 29, 2024

I have failed updating descriptor-wallet to latest rust-bitcoin (it was something like 6th attempt already), so I ended up adding signing abilities to BP libraries.

Here is WIP:

Next I will try to add this functionality to bp cli to test it UPD: new PR to bp-wallet is added above

@zoedberg
Copy link
Contributor Author

Closing this since we can now drop descriptor-wallet, which has been deprecated in favor of bp-wallet. I've opened BP-WG/bp-wallet#62 to track this issue (since it happens also there)

@zoedberg zoedberg closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in RGB release v0.11 Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants