summaryrefslogtreecommitdiff
path: root/66/ff99eb1dd3f0563ba2ce14354b3f6d2267f5b5
blob: 8eb0a5f66fd881b059b57f237b7f70172c1e3fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Return-Path: <anthony.j.towns@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 381D34D3
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 10 Aug 2015 21:19:07 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com
	[209.85.212.173])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D782416F
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 10 Aug 2015 21:19:05 +0000 (UTC)
Received: by wicja10 with SMTP id ja10so42728830wic.1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 10 Aug 2015 14:19:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=sender:date:from:to:cc:subject:message-id:references:mime-version
	:content-type:content-disposition:in-reply-to:user-agent;
	bh=PXvSzCxZcILw4pg8vlKtNs1FD0ywpmnoWk7I5MV8/Tw=;
	b=r8pSoKBVw2gc6an9lRHAd/UYfsNLPX25UR06NMWaqfnCoYVowur9gp8YDMtVaMwgZU
	XQMpEGemE2IlkxHE4Ts39CLZQy3Su04b40Km2YHwGh8b7+E1XPBmFwKdHWhfe1BXnKhd
	mlI05gGpK0TcGED6VDKtgMQoORXnFeAKz0hfo02vbqnQPkmSDO/jq+HPMuNo75iX6dna
	P3rzUA5iaeoEHBWzNjA8lb6OWwSxqhdCNeMBFEsh78x+CUGbNvXKNNrJ8bkR13wJmbcH
	OA6+9hhmb7kwBFJAC5q1ydfR4yHBzrikX9+DQjYi0k9zKkvzIas+Ue+lomUziNT/0rOa
	daZw==
X-Received: by 10.180.75.9 with SMTP id y9mr28963477wiv.67.1439241544605;
	Mon, 10 Aug 2015 14:19:04 -0700 (PDT)
Received: from erisian.com.au (tmo-102-58.customers.d1-online.com.
	[80.187.102.58]) by smtp.gmail.com with ESMTPSA id
	yu4sm31293818wjc.43.2015.08.10.14.19.02
	(version=TLSv1 cipher=RC4-SHA bits=128/128);
	Mon, 10 Aug 2015 14:19:03 -0700 (PDT)
Sender: Anthony Towns <anthony.j.towns@gmail.com>
Received: by erisian.com.au (sSMTP sendmail emulation);
	Tue, 11 Aug 2015 05:19:01 +0800
Date: Tue, 11 Aug 2015 05:19:01 +0800
From: Anthony Towns <aj@erisian.com.au>
To: Gavin Andresen <gavinandresen@gmail.com>
Message-ID: <20150810211901.GD12450@navy>
References: <CA+w+GKTLBWj6b4ppwrmnXb_gybYFcrX7haLBSdCnMaijy2An4w@mail.gmail.com>
	<CABm2gDpWPhYNh=g-ZXCsfe-aPq=N6NKSWKP9kr-KtPVrWAxB7Q@mail.gmail.com>
	<CAAO2FKHsczkwwqO87cJFtxBp9JE=vf=GcxLx37GpRUkPq8VGHQ@mail.gmail.com>
	<55C79FF0.8040100@thinlink.com>
	<CAOG=w-skYq84=PtN45FB-dGoY1783Jz7K1T16e2JVGjLazWuyA@mail.gmail.com>
	<CALJP9GDMgqn2VeR4y4RVxqJ_iW57hExwXBHNSkxo+-AK+7Zb6g@mail.gmail.com>
	<55C7CECB.7050905@gmail.com>
	<CAAO2FKFBC46rFe7FV+F_H0gPiVfY8S7g09O2RNxMoZMCwywp6A@mail.gmail.com>
	<CABsx9T03BXULmu_mNq+3Qd-68CYpYy67+CpMV9hCYaYb1Bc+1A@mail.gmail.com>
	<20150810210240.GC12450@navy>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20150810210240.GC12450@navy>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Cc: Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] What Lightning Is
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Aug 2015 21:19:07 -0000

On Tue, Aug 11, 2015 at 05:02:40AM +0800, Anthony Towns wrote:
> On Sun, Aug 09, 2015 at 06:44:08PM -0400, Gavin Andresen via bitcoin-dev wrote:
> > I'd love to see somebody write up a higher-level description of what the
> > user experience is like, what communication happens underneath, and what
> > new pieces of infrastructure need to get built to make it all work.
> > 
> > A use-case to start with:
> > 
> > A customer starts with eleven on-chain bitcoin. They want to pay for a nice
> > cup of tea.

Sigh, kanzure on irc points out I misread this -- I read "on-channel"
not "on-chain".

In that case, I think the answer is "the customer doesn't pay for tea
via lightning". They have to setup a channel with someone first, and
to do that, they'll need a "sufficiently confirmed" anchor transaction,
and I don't think zero confirmations would be enough for that.

So:

 -1 "Oh, how did that guy pay for tea with his phone? That's cool!"
    "Scan the QR code, yeah, where the lightning logo is"
    "Cool, I'll try it tomorrow"

 0 go home, "open a lightning channel", sleep, look forward to getting
   tea tomorrow

For step 0, I guess it's:

 0.1 "Choose a hub to connect to" (could be randomly selected)
 0.2 "Choose an amount to fund the channel" (0.5 btc would be a lot)
 0.3 "Are you sure?"
 0.4 [wait briefly while counterparty signs]
 0.5 [wait for 10 confirmations?]

I don't think it's at all clear how 0.1 works in practice yet -- routing
has barely been spitballed, and without knowing how routing works, it's
hard to say who to connect to.

Hard to say how much to put in in step 0.2 too -- if it takes a while to
refresh funds in a channel (you have to do a blockchain txn eg), then
that you should put more in; if you have multiple channels for whatever
reason, maybe you can put less in each.

The "Are you sure?" might require some legal T&Cs in practice.

You need to have some realtime communication with your channel
counterpary when creating the anchor; but that should be fairly quick.
You also need to establish some random numbers and keys, but those could
be done in advance.

I think you (or your counterparty) will want to wait for a few
confirmations before your channel is actually usable. So I think it'll
take over an hour for a channel to be "open" in even the best case.

Cheers,
aj