The start of handle_block
The 'hex' codec is a hack, binascii is the preferred method