Author

Topic: I do not understand a part of the GETDATA message correctly. (Read 177 times)

sr. member
Activity: 279
Merit: 435
Unfortunately, I could not find this "Wittnes flag" in both.

But now I know it. Thanks for the quick help.  Smiley

I am currently writing a JSON message parser. For that I needed the information.

Thanks  Smiley
Hi,

this flag is part of the services https://en.bitcoin.it/wiki/Protocol_documentation#version.
full member
Activity: 161
Merit: 168
Unfortunately, I could not find this "Wittnes flag" in both.

But now I know it. Thanks for the quick help.  Smiley

I am currently writing a JSON message parser. For that I needed the information.

Thanks  Smiley
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
I know two which are pretty much equal but sometimes have little differences:
- The developer's documentation: https://bitcoin.org/en/developer-reference (you can edit this on GitHub if you find something wrong or missing)
- Bitcoin wiki: https://en.bitcoin.it/wiki/Protocol_documentation
full member
Activity: 161
Merit: 168
many thanks :-)

Is there any other documentation with this information except in the code itself?
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
Bitcoin has one of the best documentations but unfortunately it is not updated regularly with new changes. I've been updating it as I go through things but haven't reached that part yet.

To answer your question you have to look at bitcoin-core's code: https://github.com/bitcoin/bitcoin/blob/3f125151998d9fead198fd44243dd64006b5a56b/src/protocol.h#L380
Which is addition of MSG_TX (=1) and MSG_WITNESS_FLAG (=1 << 30) which is basically giving you this:
0b01000000_00000000_00000000_00000001
full member
Activity: 161
Merit: 168
Hello

I do not understand a part of the GETDATA message correctly.

0x01010000405e6f372d50cde73484916321fcef5549b62d7b00317aa36c4fe3f40be2a78ad4

01 01000040 5e6f372d50cde73484916321fcef5549b62d7b00317aa36c4fe3f40be2a78ad4

01 = the number of line in the array. OK
01000040  = do not quite understand this part Huh
5e6f372d50cde73484916321fcef5549b62d7b00317aa36c4fe3f40be2a78ad4 = The Tx hash code. OK


01000040 These 4 bytes should actually be (as in the "inv" the hash code type.)
But in the Protocoll documentation only hashcode type 01,02,03,04 is described. Where does the 04 come from?

Many Thanks
Jump to: