[Deleted] Quote from: martin on July 30, 2010, 11:37:59 AM
The encoded protocol buffer is just 55 bytes, wheras the bitcoin version is 85 0x00 sets (each one representing 2 bytes each I assume). This means that my badly designed protocol buffer is over half the size of the hand built layout!
The “0x00” groups each represent one byte. The length of the standard version packet is 87 bytes plus 20 for the header. The header could be massively optimized as well: Code:message start “magic bytes” - 0xF9 0xBE 0xB4 0xD9 command - name of command, 0 padded to 12 bytes “version\0\0\0\0\0” size - 4 byte int checksum (absent for messages without data and version messages) - 4 bytes Obviously using proto buffers here, while absolutely a breaking change, would save a fair bit of space, especially because the “I’ve created a transaction” packet has the name “tx” meaning that there’s at least 10 bytes of overhead in every one of those packets.