The existing tests of Update and Remove behavior do not actually store the updated/removed states, so as a result, it's as of each Update/Remove were being applied on the clean group as created. Instead, they need to be applied to the group on top of each other.
Fixing this bug revealed several ways in which the State logic was incorrect. Most notably, the transcript hash computations were wrong, using digest.Sum() incorrectly.
The existing tests of Update and Remove behavior do not actually store the updated/removed states, so as a result, it's as of each Update/Remove were being applied on the clean group as created. Instead, they need to be applied to the group on top of each other.
Fixing this bug revealed several ways in which the State logic was incorrect. Most notably, the transcript hash computations were wrong, using
digest.Sum()
incorrectly.