From: Joseph Poon <joseph@lightning.network>
To: Btc Drak <btcdrak@gmail.com>
Cc: Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] [BIP-draft] CHECKSEQUENCEVERIFY - An opcode for relative locktime
Date: Thu, 13 Aug 2015 16:42:13 -0700 [thread overview]
Message-ID: <20150813234213.GH2123@lightning.network> (raw)
In-Reply-To: <CADJgMztgE_GkbrsP7zCEHNPA3P6T=aSFfhkcN-q=gVhWP0vKXg@mail.gmail.com>
Very cool! This will certainly help make Lightning Network testable on
the main-chain and permit channels to remain open indefinitely. I'm
looking forward to it.
On Thu, Aug 13, 2015 at 12:06:44PM +0100, Btc Drak via bitcoin-dev wrote:
> // Note that unlike CHECKLOCKTIMEVERIFY we do not need to
> // accept 5-byte bignums since any value greater than or
> // equal to SEQUENCE_THRESHOLD (= 1 << 31) will be rejected
> // anyway. This limitation just happens to coincide with
> // CScriptNum's default 4-byte limit with an explicit sign
> // bit.
I haven't tested the details of this, but is there another bit available
for use in the future for the relative blockheight?
I strongly believe that Lightning needs mitigations for a systemic
supervillan attack which attemps to flood the network with transactions,
which can hypothetically be mitigated with something like a timestop
bit (as originally suggested by gmaxwell).
Summary: If a block is flagged as timestopped (whether automatically or
by vote or other mechanism), then an auxillary blockheigh is frozen and
does not increment. This auxillary blockheight is only used for
accounting in timestopped height computation (and isn't used for
anything else). So as the real blockheight increments, the auxillary
blockheight can sometimes stop and stay the same. If a transaction has a
timestop bit enabled, then the transaction's OP_CSV relative height is
dependent upon the auxillary height, not the real block height. This
allows for a large backlog of transactions which must occur before a
particular (relative) block height to enter into the blockchain.
I'm not sure if it's out of scope, but it could make sense to consider
the possibility for additional state(s) with relative height computation
today. Ideally, there'd be some kind of "version" byte which can be
recontextualized into something later, but I don't know how that could
cleanly fit into the data structure/code.
--
Joseph Poon
next prev parent reply other threads:[~2015-08-13 23:42 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 11:06 [bitcoin-dev] [BIP-draft] CHECKSEQUENCEVERIFY - An opcode for relative locktime Btc Drak
2015-08-13 18:12 ` Mark Friedenbach
2015-08-13 19:20 ` Gregory Maxwell
2015-08-13 23:42 ` Joseph Poon [this message]
2015-08-14 0:47 ` Mark Friedenbach
2015-08-14 18:53 ` Matt Corallo
2015-08-14 21:29 ` Mark Friedenbach
2015-08-14 22:24 ` Jorge Timón
2015-08-17 19:58 ` Btc Drak
2015-08-19 10:37 ` Jorge Timón
2015-08-19 16:21 ` Mark Friedenbach
2015-08-19 21:27 ` Joseph Poon
2015-08-19 21:32 ` Jorge Timón
2015-08-20 21:23 ` Peter Todd
2015-08-24 0:25 ` Tom Harding
2015-08-24 1:01 ` Gregory Maxwell
2015-08-24 2:23 ` Jorge Timón
2015-08-24 2:37 ` Mark Friedenbach
2015-08-25 22:08 ` Mark Friedenbach
2015-08-25 22:36 ` Tier Nolan
2015-08-27 23:32 ` Mark Friedenbach
2015-09-16 22:40 ` Btc Drak
2015-09-16 23:23 ` Eric Lombrozo
2015-09-17 4:23 ` Mark Friedenbach
2015-09-18 1:21 ` Rusty Russell
2015-09-17 7:43 ` jl2012
2015-08-24 2:40 ` jl2012
2015-08-24 2:54 ` Mark Friedenbach
2015-08-24 7:00 ` jl2012
2015-08-25 10:15 ` Btc Drak
2015-08-27 3:08 ` Rusty Russell
2015-08-27 11:03 ` David A. Harding
2015-08-27 12:29 ` jl2012
2015-08-30 21:33 ` Rusty Russell
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=20150813234213.GH2123@lightning.network \
--to=joseph@lightning.network \
--cc=bitcoin-dev@lists.linuxfoundation.org \
--cc=btcdrak@gmail.com \
/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