Bitcoin Forum
May 10, 2024, 10:38:46 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I do not understand a part of the GETDATA message correctly.  (Read 163 times)
MixMAx123 (OP)
Full Member
***
Offline Offline

Activity: 161
Merit: 168


View Profile
March 23, 2019, 10:13:02 PM
Merited by HeRetiK (1), ABCbits (1)
 #1

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
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715337526
Hero Member
*
Offline Offline

Posts: 1715337526

View Profile Personal Message (Offline)

Ignore
1715337526
Reply with quote  #2

1715337526
Report to moderator
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
March 23, 2019, 10:53:06 PM
Merited by HeRetiK (1), ABCbits (1)
 #2

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

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
MixMAx123 (OP)
Full Member
***
Offline Offline

Activity: 161
Merit: 168


View Profile
March 23, 2019, 11:11:06 PM
 #3

many thanks :-)

Is there any other documentation with this information except in the code itself?
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
March 23, 2019, 11:17:18 PM
 #4

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

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
MixMAx123 (OP)
Full Member
***
Offline Offline

Activity: 161
Merit: 168


View Profile
March 23, 2019, 11:25:58 PM
 #5

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
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
March 24, 2019, 01:23:04 PM
Merited by HeRetiK (1)
 #6

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!