Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C60192C for ; Fri, 29 Sep 2017 02:06:56 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-vk0-f47.google.com (mail-vk0-f47.google.com [209.85.213.47]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4D513D3 for ; Fri, 29 Sep 2017 02:06:56 +0000 (UTC) Received: by mail-vk0-f47.google.com with SMTP id q190so1752581vkd.13 for ; Thu, 28 Sep 2017 19:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=TMIED2GOUKBneuU0YfGDYMiZufLR8uccxpfPkcMQqU8=; b=nHdmY3VHOSvgqU7/gfpvmPnX/6lXwkAcXT2o2v8rhA1fL7OYfMh+wXo1ostM2uzH5B 0wpB8Aktqkp57MrcI7+tfNs9k+U91cgvYal3s0OtT4AQuevlD8I0N4TIp/qQagCKlT5w eFecP6/TvDACg7S64kobs1V4wMDIe4UeAga4L9Ja9c6R9nM+ITyhA7fNAa3/Ma8kiin6 1qO6e41/qk12tcAZ4x51YYMFzQXAyM56j2HP9ewXAmfEKYL4HK1GNhMKXuJXVL6g5I1d pIDsn/tDkGkOwgFlGIY7j25fmY0pL2A3nqVCfsuCOC4GM8PeIp0vNARFjjdKywHvhbJR P9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=TMIED2GOUKBneuU0YfGDYMiZufLR8uccxpfPkcMQqU8=; b=r8CUk2b5LZ55Lbx2ROCp4VdoXXjY9hdKJS0hR6GxGCCsjX2AYbu4PysSKMefzj2/3e qW2Xm4K0Py4oUga3JKAwfV1cFF8jDY8e8XffER+YuFcgU0n9XuUf8gKvAz/LO/l2j8Sf 1MuifJoARvFNAnYdyLXXXa2u4GFR7ajZ47qgcvxptCskxpKJgDvIsOwh0Yd6q/FvJPQP uOsq7XF4HzFqpyPU4fCN4REbH8BLArbKBNwJMtIZJPzdo+llsLzCymzBVJcaorQXgZeX 87HzGh5j55AIlChw2Hm9kExt9TpDFh4yJAgcKDJ5FEnPHUapwGIUalvGhfRcNvUzx1WU Txvg== X-Gm-Message-State: AMCzsaXYS34lLohQVtLWlOSNm3GkNDYx5wQYUenCSx9c37k0CJl9GLO/ GcOmMI1rLCJ+/GYnHFdc3Xik3l05efFrjayQR05xxg== X-Google-Smtp-Source: AOwi7QCqTshf6qqxKA5N6wKrNnGmVR9jOX8L1JjOSEKCRTPJ9QVT1hN2E96NfR/AudNuLqw14vfzHkBAWreQ/TBz8kE= X-Received: by 10.31.78.4 with SMTP id c4mr3649999vkb.15.1506650815419; Thu, 28 Sep 2017 19:06:55 -0700 (PDT) MIME-Version: 1.0 Sender: gmaxwell@gmail.com Received: by 10.103.146.67 with HTTP; Thu, 28 Sep 2017 19:06:54 -0700 (PDT) In-Reply-To: <20170929015048.GC11956@savin.petertodd.org> References: <20170927160654.GA12492@savin.petertodd.org> <20170929015048.GC11956@savin.petertodd.org> From: Gregory Maxwell Date: Fri, 29 Sep 2017 02:06:54 +0000 X-Google-Sender-Auth: 3Htv4eAtUqjGnXte9j3XD3D9Xvs Message-ID: To: Peter Todd Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Address expiration times should be added to BIP-173 X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2017 02:06:57 -0000 On Fri, Sep 29, 2017 at 1:50 AM, Peter Todd wrote: > What do you mean by "an embedded amount"? I ask you to pay 1 Bitcoin to bc1blahblah. ...you make a typo, or a poorly placed cosmic ray switches it in your ram to bc1blohblahbah. No problem, it'll get rejected. (even if the cosmic ray happens just before signing... if the software is robust it'll reencode from the signed transaction and check against the original input. But if instead the typo converts it to 2 Bitcoins or the cosmic ray converts it to 2.34217728... the payment will happily go through, assuming your wallet had enough, and you're stuck asking me to refund you the excess. Sure, you can put amounts in URIs and whatnot, but they're not error protected... so there will always be unprotected poritons where a glitch can radically change the amount. In many cases you know exactly what amount you're asking for when you generate an address. There isn't any reason the amount couldn't be covered by the addresses checksum in those cases. There are a couple ways of doing that... e.g. adding it explicitly, where the checksum includes it but not the address itself; so it errors out if you get it wrong. But this is unfortunate because it can't tell you the expected amount when its wrong. Another way would be to embed the amount in the address, and then the software can tell you the amount the address was expecting and not let you proceed until they match.