EIP-155 states:
If
block.number >= FORK_BLKNUM
andv = CHAIN_ID * 2 + 35
orv = CHAIN_ID * 2 + 36
, then when computing the hash of a transaction for purposes of signing or recovering, instead of hashing only the first six elements (ie. nonce, gasprice, startgas, to, value, data), hash nine elements, with v ...
These are instructions for the hashing party, but not the the original signing party. Therefore, the question arises: when signing a transaction, should one use the first equation (with 35) or second equation (with 36). Practically speaking, sometimes only the former works and sometimes only the latter and I was unable to find a clear rationale.
Could someone explain the logic by which to choose between these 2 options? A reference to a document which defines the needed logic here would also be much appreciated.
Thanks in advance,
Tal