2
I was looking over the Abe code once again, and came to a stumbling point. I can't understand how this is accurate:
tx['size'] = len(tx['tx'])
Transaction size is simply the length of the raw transaction string? I did not think that 1 character of that string was equal to one byte.
Edit: while tinkering around with this with a simple python command line program, I was able to determine that the block size is actually half of the raw transaction string length. I also found out this:
http://en.wikipedia.org/wiki/Hexadecimal
Each hexadecimal digit represents four binary digits (bits), and the primary use of hexadecimal notation is a human-friendly representation of binary-coded values in computing and digital electronics. One hexadecimal digit represents a nibble, which is half of an octet or byte (8 bits).
Though it still doesn't answer the question, why isn't the size divided by two in the ABE source code?
This answer in StackExchange might help: http://bitcoin.stackexchange.com/a/3011/38618
– MCCCS – 2016-07-14T10:41:14.7573As you said tx['tx'] is the "raw transaction string" and not it's hexadecimal representation. In this case 1 char does represent 1 byte – Dylan James McGannon – 2016-09-10T00:11:46.880
You are confusing hexadecimal (which is not raw) with a raw string. For example, the raw string "X" can be represented by the hexadecimal string "58". There is no reason to halve the length of the raw transaction string. – David Schwartz – 2017-06-07T05:05:53.310