You are viewing a single comment's thread from:

RE: bitcoin spinoff fork - how to make a clean fork without any replay attack and no blockchain visible changes

in #bitcoin9 years ago

Right that's what I meant sorry, 4 bytes are signed but only 1 byte goes into the serialized transaction for broadcast. So what I'm asking is, where in the Tx serialization process is the 4 bytes reduced to 1? Like literally where in the code or protocol spec?

Sort:  

the signature is generated, 70 to 72 bytes (maybe I am off by 1 here), and the sighash byte is just added to the end. It is in the protocol spec, so that is what I did and it works. not familiar with bitcoind code as I wrote iguanacore from scratch

yes, you found it. casting an int to char will truncate it

Coin Marketplace

STEEM 0.15
TRX 0.25
JST 0.037
BTC 94614.55
ETH 1777.74
USDT 1.00
SBD 0.87