From 23ab8a435d32cb5fe324660cc908323fa633a4b9 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Mon, 3 Jun 2024 20:20:57 +0000 Subject: [PATCH] mixpool: Remove ban for invalid UTXO check None of the existing UTXO checks result in an automatic ban, so avoid this behavior for an invalid signature proof as well. --- mixing/mixpool/errors.go | 4 ---- mixing/mixpool/mixpool.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/mixing/mixpool/errors.go b/mixing/mixpool/errors.go index b6249d2f9..e7ad02196 100644 --- a/mixing/mixpool/errors.go +++ b/mixing/mixpool/errors.go @@ -76,10 +76,6 @@ var ( // that exceeds the total input value. ErrInvalidTotalMixAmount = newBannableError("invalid total mix amount") - // ErrInvalidUTXOProof is returned by AcceptMessage if a pair request - // fails to prove ownership of each utxo. - ErrInvalidUTXOProof = newBannableError("invalid UTXO ownership proof") - // ErrMissingUTXOs is returned by AcceptMessage if a pair request // message does not reference any previous UTXOs. ErrMissingUTXOs = newBannableError("pair request contains no UTXOs") diff --git a/mixing/mixpool/mixpool.go b/mixing/mixpool/mixpool.go index ecae2110f..8846ff98c 100644 --- a/mixing/mixpool/mixpool.go +++ b/mixing/mixpool/mixpool.go @@ -1313,7 +1313,7 @@ func (p *Pool) checkUTXOs(pr *wire.MsgMixPairReq, curHeight int64) error { valid := validateOwnerProofP2PKHv0(extractPubKeyHash160, entry.PkScript(), utxo.PubKey, utxo.Signature, pr.Expires()) if !valid { - return ruleError(ErrInvalidUTXOProof) + return ruleError(fmt.Errorf("invalid UTXO ownership proof")) } totalValue += entry.Amount()