From: Anthony Towns <aj@erisian.com.au>
To: Jeremy <jlrubin@mit.edu>
Cc: Bitcoin Protocol Discussion
<bitcoin-dev@lists.linuxfoundation.org>,
lightning-dev <lightning-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] [Lightning-dev] Eltoo / Anyprevout & Baked in Sequences
Date: Wed, 14 Jul 2021 13:32:00 +1000 [thread overview]
Message-ID: <20210714033200.GA7155@erisian.com.au> (raw)
In-Reply-To: <CAD5xwhitb0g3-JPsn2tQF-KqgSp+goLnVbSmRX0LUh-818tSVw@mail.gmail.com>
On Mon, Jul 12, 2021 at 03:07:29PM -0700, Jeremy wrote:
> Perhaps there's a more general principle -- evaluating a script should
> only return one bit of info: "bool tx_is_invalid_script_failed"; every
> other bit of information -- how much is paid in fees (cf ethereum gas
> calculations), when the tx is final, if the tx is only valid in some
> chain fork, if other txs have to have already been mined / can't have
> been mined, who loses funds and who gets funds, etc... -- should already
> be obvious from a "simple" parsing of the tx.
> I don't think we have this property as is.
> E.g. consider the transaction:
> TX:
> locktime: None
> sequence: 100
> scriptpubkey: 101 CSV
That tx will never be valid, no matter the state of the chain -- even if
it's 420 blocks after the utxo it's spending: it fails because "top stack
item is greater than the transaction input sequence" rule from BIP 112.
> How will you tell it is able to be included without running the script?
You have to run the script at some point, but you don't need to run the
script to differentiate between it being valid on one chain vs valid on
some other chain.
> What's nice is the transaction in this form cannot go from invalid to valid --
> once invalid it is always invalid for a given UTXO.
Huh? Timelocks always go from invalid to valid -- they're invalid prior
to some block height (IsFinal() returns false), then valid after.
Not going from valid to invalid is valuable because it limits the cases
where you have to remove txs (and their descendents) from the mempool.
Cheers,
aj
prev parent reply other threads:[~2021-07-14 3:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 1:00 [bitcoin-dev] Eltoo / Anyprevout & Baked in Sequences Jeremy
2021-07-08 8:44 ` Anthony Towns
2021-07-08 15:48 ` Jeremy
2021-07-12 5:01 ` [bitcoin-dev] [Lightning-dev] " Anthony Towns
2021-07-12 22:07 ` Jeremy
2021-07-14 3:32 ` Anthony Towns [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210714033200.GA7155@erisian.com.au \
--to=aj@erisian.com.au \
--cc=bitcoin-dev@lists.linuxfoundation.org \
--cc=jlrubin@mit.edu \
--cc=lightning-dev@lists.linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox