-
Notifications
You must be signed in to change notification settings - Fork 125
Bundle with multisig transaction fails verification with "Transaction 1 has invalid signature (using 6 fragments)" #218
Comments
Hi @rav1112 the exception has a from pprint import pprint
try:
...
except Exception as exc:
context = getattr(exc, "context", {})
pprint(context)
raise |
I tried with above exception i got ---- {'filter_errors': {'multisigInput': [{'code': 'wrong_type', 'message': 'Address is not valid (allowed types: MultisigAddress).', 'context': {'value': Address(------XXXXXXXX-------'), 'filter': 'Type(MultisigAddress, allow_subclass=True)', 'key': 'multisigInput', 'replacement': None, 'code': 'wrong_type'}, 'exc_info': None}]}} I have pass multisignature value in string type so that's why it is coming i think.... May I know how to convert string to MultisigAddress. |
Gotcha. Hmmmm, I think the only reason why The only other reason I can think of why a Try constructing a multisig_input = MultisigAddress(
trytes="ADDY",
digests=[], # list of `Digest` objects, if you have them
balance=42, # optional
)
# If you set `digests` to an empty list, you will need to
# manually set the security level. This must be equal to
# the sum of the security levels of each of the digests
# used to build the multisig address.
multisig_input.security_level = 10
api.prepare_multisig_transfer(transfers, multisig_input, change_address) |
Thanks for your support |
['Transaction 1 has invalid signature (using 6 fragments).'] |
Sure! The "using 6 fragments" part indicates that the signature was split across 6 transactions (fragments) within the bundle (see https://iota.stackexchange.com/a/147/283 for more info). "invalid signature" is a frustrating error to troubleshoot, because there's really no way to get any forensic data. The validator ran the signature through a kerl sponge, and the end result was different than the expected value. By design, it's mathematically imposible to reverse the computation to find out where things went wrong. If this is coming from a multisig address, the invalid signature is likely caused by one of the following problems:
|
Ya Error is coming from multisig process. I have double check the conditions but not able to figure out what will be the problem. I am doing N-of-N Signing Process withe private keys. But I am not able to transfer the value. And I am doing this process in my local with same computer. May I know what steps I can take now? |
Hmm. The next thing I would try is re-creating the Then compare these values to look for discrepancies:
|
I recreated multisignature address from the scratch but then too it is giving same error i.e. Transaction 1 has invalid signature (using 6 fragments). after signing the process. I have follow the same process of https://pyota.readthedocs.io/en/latest/multisig.html#generating-multisignature-address. |
Oooh... ok that's... concerning. This might be indicative of a bug in PyOTA. Could you try re-creating the multisig address using the JS lib and see if you get a different result? |
In JS lib, It is giving same result for digests and multisignature address. But after signing and validated it is transfering the value properly ... while in pyota it gives Transaction 1 has invalid signature (using 6 fragments) after signing and validated . |
Thanks @rav1112 ! This is def a bug in PyOTA then; I'm re-opening this one. Unit tests should have caught this; now I'm wondering what we missed 🙀 I'll take a quick peek at the tests to see if we have a case that covers this scenario. |
exc.context["filter_errors"]
contains more information).
Just to confirm, do the transactions in the bundle have signatures attached to them (i.e., does the code also invoke the |
Yes the bundle have Signature attached to the transactions. Its something while validate_signature_fragments() it returns false which means return actual_public_key == public_key.as_trits() is false basically it is not satisfying the condition. |
Awesome, thanks! Will look into this!! |
Ok ! Thanks! Let me know once it is done! |
Same issue as #276 , problem is in PyOTA multisig signing process somewhere... |
I am using MultiSignature Code. When I am preparing transfer, I am the error ---
ValueError: Request failed validation ({'multisigInput': ['wrong_type']}) (
exc.context["filter_errors"]
contains more information).What can be the issue as I am inserting proper multisignature address
The text was updated successfully, but these errors were encountered: