Title: block raw decode Post by: FabioCarpi on January 14, 2015, 07:39:09 PM get the raw of block 0
Code: f9beb4d9 - mainnet i miss a byte like "tx lengh" after the tx count... my dificult is because the script count maybe 1 or 2 bytes... Title: Re: block raw decode Post by: grau on January 14, 2015, 07:45:58 PM No need for tx length. Parse transactions starting afte rthe block header following https://en.bitcoin.it/wiki/Protocol_specification#tx
Title: Re: block raw decode Post by: johoe on January 14, 2015, 09:03:14 PM have a easy way to get the raw of each tx? i miss a byte like "tx lengh" after the tx count... You have to parse the transaction. my dificult is because the script count maybe 1 or 2 bytes... the script length is a varint (https://en.bitcoin.it/wiki/Protocol_specification#Variable_length_integer). You got the parsing a wrong in the second script. 43 is the length of the script. The script is 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4ce f38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac, the first opcode (0x41) pushes the next 0x41 bytes (public key), the second opcode is 0xac (OP_CHECKSIG) Title: Re: block raw decode Post by: amaclin on January 15, 2015, 07:59:06 AM Quote f9beb4d9 - mainnet 1d010000 - lenght (varint) 01000000 - versao block length is not varint |