@n8maninger noticed a flipped conditional in validateV2FileContracts; after fixing it, I updated TestValidateV2Block to update the ChainIndexElement proofs, but the test still failed -- with commitment hash mismatch, which is a weird error. Further investigation revealed that V2Block.EncodeTo was mutating the block. Specifically, it was nil-ing out the V2StorageProof history proof, which is why this wasn't caught earlier: since the test wasn't updating the proofs in the first place, they were always nil, so EncodeTo didn't affect them. Anyway, this cascade of failures has all been fixed now :P
@n8maninger noticed a flipped conditional in
validateV2FileContracts
; after fixing it, I updatedTestValidateV2Block
to update the ChainIndexElement proofs, but the test still failed -- withcommitment hash mismatch
, which is a weird error. Further investigation revealed thatV2Block.EncodeTo
was mutating the block. Specifically, it wasnil
-ing out theV2StorageProof
history proof, which is why this wasn't caught earlier: since the test wasn't updating the proofs in the first place, they were alwaysnil
, soEncodeTo
didn't affect them. Anyway, this cascade of failures has all been fixed now :P