diff --git a/Makefile.Inc b/Makefile.Inc index 9b8bf7ed9..09df5fe7d 100644 --- a/Makefile.Inc +++ b/Makefile.Inc @@ -50,7 +50,7 @@ else endif endif -POSTRS_SETUP_REV = 0.7.0-rc1-distributed-verification +POSTRS_SETUP_REV = 0.7.0-rc2-distributed-verification POSTRS_SETUP_ZIP = libpost-$(platform)-v$(POSTRS_SETUP_REV).zip POSTRS_SETUP_URL_ZIP ?= https://github.com/spacemeshos/post-rs/releases/download/v$(POSTRS_SETUP_REV)/$(POSTRS_SETUP_ZIP) ifeq ($(platform), windows) diff --git a/internal/postrs/proof.go b/internal/postrs/proof.go index 31fa2e421..97b6641bb 100644 --- a/internal/postrs/proof.go +++ b/internal/postrs/proof.go @@ -236,7 +236,7 @@ func (v *Verifier) VerifyProof(proof *shared.Proof, metadata *shared.ProofMetada return nil case C.VerifyResult_InvalidIndex: result := castBytes[C.VerifyResult_InvalidIndex_Body](result.anon0[:]) - return ErrInvalidIndex{Index: int(result.index_id)} + return &ErrInvalidIndex{Index: int(result.index_id)} case C.VerifyResult_InvalidArgument: return fmt.Errorf("invalid argument") default: diff --git a/verifying/verifying.go b/verifying/verifying.go index 4d1e6579b..f193f3226 100644 --- a/verifying/verifying.go +++ b/verifying/verifying.go @@ -12,6 +12,9 @@ import ( "github.com/spacemeshos/post/shared" ) +// Reexport from internal pkg. +type ErrInvalidIndex = postrs.ErrInvalidIndex + // VerifyVRFNonce ensures the validity of a nonce for a given node. // AtxId is the id of the ATX that was selected by the node for its commitment. func VerifyVRFNonce(nonce *uint64, m *shared.VRFNonceMetadata, opts ...OptionFunc) error {