How to verify Multichain Verack Signature ?

+1 vote
As per the unofficial documentation for connecting to multichain from an external application, Im trying as per below with a java based SPV wallet and a multichain node running with multichain protocol and anyone-can-connect=true.

unofficial documentation from multichain:

3. anyone-can-connect=true

3.1 First connection to the seed:  Node X connects to seed node S, node X doesn't have information about blockchain at all

X sends "version" message with default "message start" - fbb4c7de
S sends "version" message (behaviour inherited from Bitcoin Core)
X ignores "version" message
S sends "verack" message with full paramset
X verifies signature in verack (it cannot verify paramsethash yet), stores parameter set, disconnects

 

My wallet X has obtained the verack message sent by S and I'm able to obtain the signature and the public key of the sender. What does X verifies signature mean?  I verify the signature against the public key for what? the paramsethash or the entire msg?

 

Also is the signature in the form of base 64 encoding?
asked Aug 22, 2018 by jeshocarmel
edited Aug 23, 2018 by jeshocarmel

1 Answer

0 votes
It is a mistake in unofficial documentation. When anyone-can-connect=true, signature is not verified.
answered Aug 26, 2018 by Michael
Noted Michael. So basically I just need to ignore the signature also and move on to the next step right?

It would be great if you could send me an updated copy of your handshake.txt and handshake-example.txt. Would be really helpful.
It's been sent - hope you received it.
Finally my sample-BitcoinWallet is able to perform the complete handshake with a chain running with multichain protocol :) The blocks are downloading and synchronizing as well. Thanks to Dr.Gideon and Michael for your guidance and patience.

There is one issue currently where the payload for verackack message seems to be 140 or 141 bytes depending on the ECDSA signature and this is causing an error at times. The handshake-example.txt has payload for verackack at both 140 and 141. How do I handle this?
I'm not sure I understand the question. It can be indeed either 140 or 141, in this case the size of sigScript is either 106 or 107 and the signature itself 71 or 72. Each of these numbers is encoded in verackack message. You just have to parse every verackack message separately.
Ok. I understand. I thought there was fixed size and harcoded. My bad. Thanks for the clarification.
...