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

zcash-sign: ensure signing 2 inputs works #488

Open
conradoplg opened this issue Feb 19, 2025 · 0 comments
Open

zcash-sign: ensure signing 2 inputs works #488

conradoplg opened this issue Feb 19, 2025 · 0 comments

Comments

@conradoplg
Copy link
Contributor

During the demo we got this error while trying to sign a transaction with 2 inputs:

zcash-sign sign --tx-plan ~/Downloads/tx-plan.json --ufvk uview1y2wm5u5yu0f0p475x4ux0us368gplnla57v8cal9td623x5npm2537xa6cfh0j9qvnsged62r5q23ehj5kufgdt67qm7zth2f0fhaswh02y4a2ddlha4p7k2q0j78g3suggk79e5actcg0zqxq7gq6klkqdw6wt49rdt4hyxw2qugen6aqncxvmsptgqlm8h0lj3qdlvrvna2cqel2a4j9nxm78ltem5t0h06y7eer59jz43cxmfd0p3xqrw2rpsfmkhhne8472xvwrsnyc2ucuft7c42zk5p5erh3dqmyg4ea2rf5xkmrwdh44qhqsd6runnxccvqjcje9r7tpv3rdmput0wlfchntkdq0ns8ce50ds29rj34fr0gfkmc27wfnpgcqqsfrqu -o ~/Downloads/tx-signed.raw
SIGHASH: ca1a0b0faabddb928daa24b85b54f72924683710227f09d821912dc32f76ec62
Randomizer #0: 80deb7e680c00dc8165419df9c88e7e8d1f90bbe4bc559611b4f7e890137ee04
Input hex-encoded signature #0: 
5d4a58827b4e7e54e1e447339b290f6a0fe9d0a87711b2b84a0385913ff3f20e629d59aa2a4f8ae29e2e9030be0019bb55d5f3772d0959fc10c6a87992077321
Randomizer #1: a7ef6173a96a4128e94afee2507b1fcfcfa74ff074e8e12880722f218478d20d
Input hex-encoded signature #1: 
ae7484849b1f9bfe72ec1025f828402e7d44e3bb414b7f1c9c30e220aaf9461aba472486d35172ebbb1f6f9943a7c691342258f5fcfd9edc069d553c30c1f334
thread 'main' panicked at /home/conrado/.cargo/git/checkouts/frost-zcash-demo-cebbfb4290b095fb/3613c1b/zcash-sign/src/sign.rs:257:14:
called `Result::unwrap()` on an `Err` value: InvalidExternalSignature
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

However it was caused by me copying the wrong value to be signed (I copied the signature just above the randomizer, instead of the sighahs):

frost-client coordinator -s frostd.zfnd.org --group af66f02a7fefeb7ae041ede0fba85656c7d2ee3e738c0b316dc69a05909d3f33 -S 97e89b49517f97972c827c76ca4872eb6341ee5d3b99b0cae9d4b748c12bc67d,e76d2f673eb91aca53d6054c0f5271c25790cf6c15805ff3324ee2b83ab96c6d -m - -r -
The message to be signed (hex encoded)
5d4a58827b4e7e54e1e447339b290f6a0fe9d0a87711b2b84a0385913ff3f20e629d59aa2a4f8ae29e2e9030be0019bb55d5f3772d0959fc10c6a87992077321
Enter the randomizer (hex string):
a7ef6173a96a4128e94afee2507b1fcfcfa74ff074e8e12880722f218478d20d
Logging in...
Creating signing session...
Waiting for participants to send their commitments........
Sending SigningPackage to participants...
Waiting for participants to send their SignatureShares...
...
Signature:
ae7484849b1f9bfe72ec1025f828402e7d44e3bb414b7f1c9c30e220aaf9461aba472486d35172ebbb1f6f9943a7c691342258f5fcfd9edc069d553c30c1f334

Nevertheless we haven't really tested this case thoroughly. Check if it really works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant