Open michaelsutton opened 1 month ago
Perhaps a better way to handle this is to move more of modify_block_template
logic to within consensus where storage mass activation is already accessible and can be checked. It feels slightly weird that consensus sensitive code is in the mempool block builder
Perhaps a better way to handle this is to move more of
modify_block_template
logic to within consensus where storage mass activation is already accessible and can be checked. It feels slightly weird that consensus sensitive code is in the mempool block builder
I agree that it feels a bit off that consensus sensitive logic isn't in consensus. I would think a better way is for consensus to have something like consensus.calc_hash_merkle_root
and from within consensus, decide whether to use the HF version or not.
Fixes a TN11 bug where transaction mass field hashing was not activated when modifying a cached block template. This produced invalid blocks when two miners with different addresses were connected to the same node, frequently triggering this code path and resulting in many bad Merkle root blocks