dcrd: How to invalidate certain transaction? As node seems stuck with one.

2019-01-18 09:15:02.029 [ERR] RPCS: Failed to create new block template: failed to do final check for check connect block when making new block template: output 942d8d10866af14d660b5175ed4b9f9807e73eb96b1eea369ecae7291f5698ce:0 referenced from transaction 87c0cd6b139421108605cf1590f4981abda99b8befbcb3df065df7f7db336112:0 either does not exist or has already been spent

Cannot create new block template as node (v1.2) stucking at this message. Is newer version resolved this?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

v1.4.0-rc1 is shit, please do NOT upgrade or you will get lots of orphan blocks.

The following patch will stop that from happening on 1.3.0:

diff --git a/mempool/mempool.go b/mempool/mempool.go
index f4ac8846..4915cb73 100644
--- a/mempool/mempool.go
+++ b/mempool/mempool.go
@@ -858,8 +858,22 @@ func (mp *TxPool) maybeAcceptTransaction(tx *dcrutil.Tx, isNew, rateLimit, allow
                tx.SetTree(wire.TxTreeStake)
        }

-       // Reject votes before stake validation height.
        isVote := txType == stake.TxTypeSSGen
+       if msgTx.Version >= 2 && !isVote {
+               for _, txIn := range msgTx.TxIn {
+                       sequenceNum := txIn.Sequence
+                       if sequenceNum&wire.SequenceLockTimeDisabled != 0 {
+                               continue
+                       }
+
+                       str := "violates sequence lock consensus bug"
+                       return nil, txRuleError(wire.RejectInvalid, str)
+               }
+       }
+
+       // Reject votes before stake validation height.
        stakeValidationHeight := mp.cfg.ChainParams.StakeValidationHeight
        if isVote && nextBlockHeight < stakeValidationHeight {
                str := fmt.Sprintf("votes are not valid until block height %d (next "+

As an update, we’ve tracked down the issue and have a PR open to address it. Thanks to those who reported the issue and helped test the release candidate to discover the issue. This is why there are release candidates.

I’ll leave this issue open until a new RC is released which addresses it.

@davecgh The patch works properly. The v1.3 nodes run continuously ever after. Thank you for your support.