Bitcoin Forum
March 19, 2024, 06:24:57 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Protocol Buffer example file for Bitcoins  (Read 1175 times)
galeru (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 2


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
1710829497
Hero Member
*
Offline Offline

Posts: 1710829497

View Profile Personal Message (Offline)

Ignore
1710829497
Reply with quote  #2

1710829497
Report to moderator
1710829497
Hero Member
*
Offline Offline

Posts: 1710829497

View Profile Personal Message (Offline)

Ignore
1710829497
Reply with quote  #2

1710829497
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1710829497
Hero Member
*
Offline Offline

Posts: 1710829497

View Profile Personal Message (Offline)

Ignore
1710829497
Reply with quote  #2

1710829497
Report to moderator
1710829497
Hero Member
*
Offline Offline

Posts: 1710829497

View Profile Personal Message (Offline)

Ignore
1710829497
Reply with quote  #2

1710829497
Report to moderator
1710829497
Hero Member
*
Offline Offline

Posts: 1710829497

View Profile Personal Message (Offline)

Ignore
1710829497
Reply with quote  #2

1710829497
Report to moderator
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


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 (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 2


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:  

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