Bitcoin Forum
November 13, 2019, 07:13:39 AM *
News: Help collect the most notable posts made over the last 10 years.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Protocol Buffer example file for Bitcoins  (Read 1106 times)
galeru
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
December 05, 2010, 10:53:55 PM
 #1

The current network serialization and implementation is really quite specialized, which is at cross-purposes to the goal of having several different clients that can all interact with the network.  I think that having our serialization and network data in a common format which already has several implementations in different languages would be very helpful to the long-term distribution of the bitcoin network.

In this view, I've created a quick and dirty Protocol Buffers version of the network protocol.  I doubt that it's particularly interoperable with the current code, but it does allow for all the information that goes over the network, according to the draft spec on the wiki.  I've uploaded the file at http://pastebin.com/SAgvHwa0
1573629219
Hero Member
*
Offline Offline

Posts: 1573629219

View Profile Personal Message (Offline)

Ignore
1573629219
Reply with quote  #2

1573629219
Report to moderator
The Bitcoin Forum is turning 10 years old! Join the community in sharing and exploring the notable posts made over the years.
1573629219
Hero Member
*
Offline Offline

Posts: 1573629219

View Profile Personal Message (Offline)

Ignore
1573629219
Reply with quote  #2

1573629219
Report to moderator
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1582
Merit: 1006


View Profile
December 06, 2010, 03:35:55 AM
 #2

The draft spec on the wiki is incomplete crap.

Your example is missing obvious data central to bitcoin -- transaction and block data.

It also seems that your hashes shrank to 32 bits.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
galeru
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
December 06, 2010, 04:51:25 AM
 #3

I did shrink the hashes, they're now fixed so they can be the 32 bytes they are. http://pastebin.com/zQEyKV0A

Could you please point me to where the transaction and block data is in the source code?  I thought I already had them encapsulated in the Tx and Block messages, but if there's more, having it all in one place can only help.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!