Close Menu
  • Home
  • Altcoin
  • Bitcoin
  • Crypto
  • Forex
  • Online Money
What's Hot

bitcoin core – How does uncapping OP_RETURN impact long-term fee-market quality and security budget?

September 13, 2025

Wall Street sets pace for Asia: Nikkei and KOSPI hit record highs – Forecasts – 12 September 2025

September 13, 2025

FTC probes Google and Amazon over ad pricing disclosures

September 13, 2025
Facebook X (Twitter) Instagram
  • Altcoin
  • Bitcoin
  • Crypto
  • Forex
  • Online Money
Facebook X (Twitter) Instagram
Cointelegraphe
  • Home
  • Altcoin
  • Bitcoin
  • Crypto
  • Forex
  • Online Money
Cointelegraphe
Home»Bitcoin»checksequenceverify – What prevents an arbitrarily high nSequence value when spending an OP_CSV output?
checksequenceverify – What prevents an arbitrarily high nSequence value when spending an OP_CSV output?
Bitcoin

checksequenceverify – What prevents an arbitrarily high nSequence value when spending an OP_CSV output?

adminBy adminMarch 5, 2025No Comments2 Mins Read
Share
Facebook Twitter LinkedIn Pinterest Email


I have gone through the many related questions here on stack exchange and obviously read BIP68 and BIP112, but I still cannot seem to come to a clear answer for the following question: what is preventing a transaction that spends an output encumbered by OP_CSV from setting an arbitrarily high nSequence value?

Let’s imagine the following scenario:

  • txA has a single output encumbered by 10 OP_CSV, meaning this output can only be included in a transaction that is mined 10 blocks after txA is confirmed
  • txB spends a single input, which is the one output created from txA

The function that performs the check is

template 
bool GenericTransactionSignatureChecker::CheckSequence(const CScriptNum& nSequence) const
{
    // Relative lock times are supported by comparing the passed
    // in operand to the sequence number of the input.
    const int64_t txToSequence = (int64_t)txTo->vin[nIn].nSequence;

    ...
    omitted logic
    ...

    // Now that we know we're comparing apples-to-apples, the
    // comparison is a simple numeric one.
    if (nSequenceMasked > txToSequenceMasked)
        return false;

    return true;
}

Why should the spending transaction not be able to set nSequence for the input in such a way that txToSequenceMasked is always higher than nSequenceMasked? What exactly is preventing this? I feel like I’m missing something obvious here.

Hopefully my question makes sense, thanks!



Source link

arbitrarily checksequenceverify High nSequence OP_CSV output prevents Spending
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
admin
  • Website

Related Posts

bitcoin core – How does uncapping OP_RETURN impact long-term fee-market quality and security budget?

September 13, 2025

Ethereum Supply Shock? BitMine Absorbs 319,000 ETH In A Week

September 11, 2025

You Cannot Stop Bitcoin Metaprotocols

September 10, 2025

Ledger CTO Warns of NPM Supply-Chain Attack Hitting 1B+ Downloads

September 9, 2025
Add A Comment
Leave A Reply Cancel Reply

Top Insights

bitcoin core – How does uncapping OP_RETURN impact long-term fee-market quality and security budget?

September 13, 2025

Wall Street sets pace for Asia: Nikkei and KOSPI hit record highs – Forecasts – 12 September 2025

September 13, 2025

FTC probes Google and Amazon over ad pricing disclosures

September 13, 2025

XION is available for trading!

September 13, 2025
ads

Subscribe to Updates

Get the latest creative news from Cointelegraphe about Crypto, bItcoin and Altcoin.

About Us
About Us

At CoinTelegraphe, we are dedicated to bringing you the latest and most insightful news, analysis, and updates from the dynamic world of cryptocurrency. Our mission is to provide our readers with accurate, timely, and comprehensive information to help them navigate the complexities of the crypto market.

Facebook X (Twitter) Instagram Pinterest YouTube
Top Insights

bitcoin core – How does uncapping OP_RETURN impact long-term fee-market quality and security budget?

September 13, 2025

Wall Street sets pace for Asia: Nikkei and KOSPI hit record highs – Forecasts – 12 September 2025

September 13, 2025

FTC probes Google and Amazon over ad pricing disclosures

September 13, 2025
Get Informed

Subscribe to Updates

Get the latest creative news from Cointelegraphe about Crypto, bItcoin and Altcoin.

Please enable JavaScript in your browser to complete this form.
Loading
  • About us
  • Contact Us
  • Shop
  • Privacy Policy
  • Terms and Conditions
Copyright 2024 Cointelegraphe Design By Horaam Sultan.

Type above and press Enter to search. Press Esc to cancel.