Return-Path: Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 472DFC07FF for ; Mon, 30 Mar 2020 01:25:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 319B0880CA for ; Mon, 30 Mar 2020 01:25:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mpk0UWoKdTjX for ; Mon, 30 Mar 2020 01:25:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by hemlock.osuosl.org (Postfix) with ESMTPS id 537B9880C7 for ; Mon, 30 Mar 2020 01:25:44 +0000 (UTC) Date: Mon, 30 Mar 2020 01:25:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1585531541; bh=II6pCCWQUVYNX8iNuEVDsSjegBBor0FfUiFxyl3qULI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=vs+5I/4LkyfoXW2rM8lAhocDriPXclT4wds/xyaJwtaRav6k8NfcE9SnJMwm683fD Y++olt+l6pvDzAB5elo+2b5c0FL+x2KJfs1GUSPPd0G/2rqsY6667qMfnJxlvR6VXj HQtNbs1NdrDM831zScKgcxUUK65HZTLTybXyBUsQ= To: Ruben Somsen From: ZmnSCPxj Reply-To: ZmnSCPxj Message-ID: <70epI8yeOu69uXQfxbyWEfrH7hYLzsx9CDIgA9gL_GlaqDEmshtP4Ogf6Dl7GH408GTPDveir1MKy1euEcPbOhJEtzjLbV9m506quXhnKOg=@protonmail.com> In-Reply-To: References: <20200327171017.GM28113@mcelrath.org> <6SFA-3YOsuEl4D3N5eA5G6q1B6ROWHmNefjCC5cRPpHg6iu9PVdG21PKjV28IMYXY_tOcmrSB60tnQRgm4pcHXB_MxOPaa9zZIbBeo0aHS4=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Bitcoin Protocol Discussion , Tom Trevethan Subject: Re: [bitcoin-dev] Statechain implementations X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 01:25:46 -0000 Good morning Ruben, > Hi ZmnSCPxj, > > > the current owner can ask the statechain entity to sign an alternative = to the first stage, with 0 relative locktime > > Unless I am misunderstanding something, this seems to run into the proble= m that the original first stage transaction is already out there (and its r= elative timelock started ticking). There is no mechanism ensuring that the = new tx will have precedence. And even if it did work, I doubt it's cleaner = than doing a cooperative peg-out that simultaneously happens to peg back in= , creating a brand new statechain UTXO with no history. If: * You are sure the old first stage tx has > 0 relative locktime. * The replacement tx (which replaces the old first stage) has a 0 relative = locktime. * The replacement tx redirects the funds to a new funding output for a (l= ogically continuous, onchain new) statechain. Then the replacement tx, having a smaller relative locktime than the old fi= rst stage, has precedence. Indeed, having a *smaller* relative locktime is exactly the mechanism Decke= r-Wattenhofer uses. So this is the state, with the kickoff having just been confirmed onchain: ***blockchain*** [funding tx]->[kickoff tx]-+ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ offchain | +->[[ 7] stage]->[[ 0] stage]->[[14] stag= e]-> state outputs Since the first stage is still "ticking" it is not yet confirmable onchain. You ask the statechain to create an alternative, 0-relative-locktime, re-fu= nding tx, and create a new mechanism: ***blockchain*** [funding tx]->[kickoff tx]-+ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ offchain | +->[[ 7] stage]->[[ 0] stage]->[[14] stag= e]-> state outputs (OR) | +->[[ 0] funding tx]->[kickoff tx]->[[14]= stage]->[[14] stage]->[[14] stage]->state outputs Because it has a time advantage, this new re-funding tx has higher priority= (and is the same mechanism Decker-Wattenhofer has anyway). Regards, ZmnSCPxj