Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 381D34D3 for ; 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 ; Mon, 10 Aug 2015 21:19:05 +0000 (UTC) Received: by wicja10 with SMTP id ja10so42728830wic.1 for ; 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 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 To: Gavin Andresen Message-ID: <20150810211901.GD12450@navy> References: <55C79FF0.8040100@thinlink.com> <55C7CECB.7050905@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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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