Skip to content

[feature]: checkMempoolAcceptance option to skip locktime and sequence verifications #2566

Description

@oren-z0

Is your feature request related to a problem? Please describe.
Following bitcoin/bitcoin#32142 and bitcoin/bitcoin#25434 , I'm looking for an ability to verify chains of pre-signed transactions that have absolute/relative locktimes (specifically for https://timelockrecovery.com and BIP-128).

Pre-signed transactions are very useful recovery mechanisms for long term HODLers, but using testmempoolaccept to verify their correctness will fail on future locktime/sequence issues - without mentioning whether there are other problems.

Describe the solution you'd like
Implement mempool.go's checkMempoolAcceptance with a flag like skipLocktimeVerifications that will:
a. be forwarded to CheckTransactionStandard and skip the call to blockchain.IsFinalizedTransaction.
b. skip the call to blockchain.SequenceLockActive.

It will also be nice to allow setting this flag in the testmempoolaccept command (or create a new command willtestmempoolaccept?). But even without it, I think I could build a specialized tool around the mempool.go library, knowing that the internal implementation was verified by the community.

Describe alternatives you've considered
Patching Bitcoin Core and running it as a full node.
This seems unnecessary for a one-time check of pre-signed transactions - just get a copy of the UTXOs, create a mempool.go "instance", and verify the specific pre-signed transactions.

Additional context
I'm an experienced developer but never wrote anything in Go.
It looks like a simple improvement, so I could try writing the PR myself if I get a green light from the maintainers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions