vocdoni/storage-proofs-eth-go

Misleading documentation / wrong implementation

Opened this issue · 0 comments

ed255 commented

// VerifyEIP1186 verifies the whole Ethereum proof obtained with eth_getProof
// method against a StateRoot. It verifies Account proof against StateRoot and
// all Storage proofs against StorageHash.
func VerifyEIP1186(proof *StorageProof) (bool, error) {
for _, sp := range proof.StorageProof {
sp := sp
if ok, err := VerifyEthStorageProof(&sp, proof.StorageHash); !ok {
return false, err
}
}
return true, nil
}

The documentation of this function states that it verifies the account proof but it does not!