kaspanet / rusty-kaspa

Kaspa full-node and related libraries in the Rust programming language. This is a Beta version at the final testing phases.
ISC License
350 stars 105 forks source link

Submitting TXs with incomplete keys must produce easily understandable error #452

Open coderofstuff opened 1 month ago

coderofstuff commented 1 month ago

Describe the bug When submitting a transaction where not all inputs are signed, the script engine produces a cryptic error that's not easily linkable to missing signatures in the signed transaction.

To Reproduce Steps to reproduce the behavior:

  1. Sign a tx but skip some needed keys
  2. Submit the tx to the node
  3. Get the error something like stack needs 1 but has 0

Expected behavior

  1. If there are unsigned inputs, either the submit or the script engine should yield a comprehensive error that allows the developer to figure out what the error actually is