From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 1B040F68 for ; Wed, 3 Apr 2019 07:51:24 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D37087A6 for ; Wed, 3 Apr 2019 07:51:20 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id d11so4244674edp.11 for ; Wed, 03 Apr 2019 00:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=TnMgL6eYlk4NtA0w1+pTJI84h1gaDPKtM5Fn712kuyM=; b=hVUdEfzhFvjuSsfEH+u7pY2nur8WbrjVTU1dosF0ZjiY0hymRU+K9l0x7Y3+ZvCS6h Rha8q1TncmSJolfSDXF2m+9UHuXM+cyrLbCsP9Bw0sUGevJRnAddsoprWrddguUM8XZ8 +I7SMmDKPEFGLMI1yyhXCSB9fd8HOOuD5He5PntIh2RolCE6fanuGVqEjNol3Km2uh1V NwAhgOmor+dCt9/4e42uVUiJzo8isbetJpVmUciCvAn7ooc4D9ZkZDYPMZAtcgu734S/ WRdBwjQyjqGGf2I1Moe94u/k5AYb6rNO/7ncAH0eMb0UxUjiic10n5eV0NZTjxbXyr/K X4LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=TnMgL6eYlk4NtA0w1+pTJI84h1gaDPKtM5Fn712kuyM=; b=FMpLXn3mbTQewnJts12XWtGYc23UXj6DZlL4kNFXEKKzFlJ1W9RbdRQq/DfOULngQW iAyDTlHGgzuosGRuSjkvfiPLLiu9qB7rKvSh9kQOuVvzUZie5zSpsCU+8mzdORPCXGG0 0nI7ghgf6igaUJJCubtNAnbPEQl4337n/r6VWSniecO7myI82R6kh63bhhZHM3dbdO74 qV7AyKbQkaf7UkkhThRtwSWkU9jEUNnGFiGexBBeChbrclyxS9vN2dE3fpMCIR669smo LYFEkk9bFM37+H7GgvFyxzSCv5wwmQBLJfYSuuyypQoZlydVoTvkHgbYi4yfOym+p+ut zYQA== X-Gm-Message-State: APjAAAW3hU8nLuyPkrm1Tqh8aoT8lWZ5j0wmGpyTcn0BO8/LVh7imyOk fNjFXZH8awi/jnEko2d+EfkKLna8OGf/yeWn1BxTSyPg X-Google-Smtp-Source: APXvYqyPyut5mPgU2YihQVyRT8JVonNT9xiF/Wyu1jILxeqeKwJCf45LryqDRXr1ZUejGeyTX2Vzzr5Dg9ls+Z0biHI= X-Received: by 2002:a17:906:6c0d:: with SMTP id j13mr42348787ejr.249.1554277878984; Wed, 03 Apr 2019 00:51:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nicolas Dorier Date: Wed, 3 Apr 2019 16:51:04 +0900 Message-ID: To: Bitcoin Dev Content-Type: multipart/alternative; boundary="000000000000dbf57405859b8472" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Wed, 03 Apr 2019 19:23:04 +0000 Subject: [bitcoin-dev] assumeutxo and UTXO snapshots 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: Wed, 03 Apr 2019 07:51:24 -0000 --000000000000dbf57405859b8472 Content-Type: text/plain; charset="UTF-8" James, You might be interested by my work which is currently used in production, without any change to bitcoin core. I properly explain how to verify the utxoset independently. https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md People are using it, since I get around 10 download a day. What can be done to help at Bitcoin Core level is actually very minimal. First, instead of asking signers of by UTXOSet to sign the utxoset hash from gettxoutsetinfo, I ask them to sign the hash of the tarball of my UTXO Set. The reason is that it is currently impossible to stop BitcoinD on a specific block then asking the serialized hash of the UTXO Set. So instead, a verifier download the tarball (300 blocks + utxoset at specific height), sync to the latest block, then compare the gettxoutsetinfo of the newly synched node with another trusted node. If it match, the verifier sign the tarball. I create a new utxoset snapshot every 6 months, so people have time to verify it and add their signatures. (Approximately once every bitcoin core release) The easiest thing that could be done at Bitcoin Core level does not require any code change, but a change in the release process. The new process would be to ask to the gitian signers to not only build the source themselves, but also verify a tarball following the procedure I explain in the link above. More complicated solution like signing the serialized utxoset itself, while possible, would require bothersome code changes. Nicolas, On Wed, Apr 3, 2019 at 9:25 AM < bitcoin-dev-request@lists.linuxfoundation.org> wrote: > Send bitcoin-dev mailing list submissions to > bitcoin-dev@lists.linuxfoundation.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > or, via email, send a message with subject or body 'help' to > bitcoin-dev-request@lists.linuxfoundation.org > > You can reach the person managing the list at > bitcoin-dev-owner@lists.linuxfoundation.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of bitcoin-dev digest..." > > > Today's Topics: > > 1. BIP: Bitcoin Integrated Address Feature? (nathanw@tutanota.com) > 2. Re: BIP: Bitcoin Integrated Address Feature? (htimSxelA) > 3. assumeutxo and UTXO snapshots (James O'Beirne) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 2 Apr 2019 18:53:11 +0200 (CEST) > From: > To: > Subject: [bitcoin-dev] BIP: Bitcoin Integrated Address Feature? > Message-ID: > Content-Type: text/plain; charset="utf-8" > > To whom it may concern, > > I believe a missing feature in Bitcoin is the ability to have an > "integrated address", where the address resolves into a Bitcoin address, > and also a transaction message or some other kind of identifier. > > By having this feature we could enhance the security of exchange > cold-wallet systems, by allowing them to easily receive all payments to a > single address from an infinite number of customers. We would also greatly > simplify the process of setting up and managing exchange cold-wallet > systems, because we would eliminate the "sweeping" step required to move > multiple customer deposits from a hot address into a single cold address. > > Although it would be nice to have all customers deposit directly into cold > addresses, this quickly becomes impractical when large amounts of customers > begin to use exchange wallets as their personal web-wallet, frequently > depositing and withdrawing without trading action. You end up needing to > have a staff member moving funds away from cold deposit addresses as a full > time job - if you wish to handle customer funds in a completely secure > manner. > > Thus we see that most exchanges now use the hot-deposit system, where > customers deposit into a hot address that is then automatically swept into > a singular cold address, by a service which holds customers private keys > online. You can observe this service at work simply by making a deposit to > most major exchanges (including the largest exchange Binance), as you will > see the funds quickly being "swept" to their cold wallet address in a > manner which heavily suggests automation by a program which possesses > private keys to the address you are sending funds to. This means there is > always the danger of a sophisticated hacker being able to capture private > keys to customer deposit addresses (as they are clearly being held online). > An integrated address would allow all exchanges using this automated > hot-deposit service to easily switch to a far more secure alternative of > having all customers depositing directly into their singular cold wallet > address. > > There are several other more minor advantages such a feature would have, > including: > - Lower fees for exchanges (which could be passed onto customers), by > reducing a transaction step out of the deposit-to-withdrawal flow. > - Less need for large rescans after loading huge amounts of customer > addresses into client software. > - Exchanges can more easily provision deposit addresses to new customers > in a secure manner, by simply generating a hex or other value, creating an > integrated address from the cold wallet address, and then providing this to > the customer. > - By providing a singular cold address for exchanges publicly, customers > can more easily verify that no man-in-the-middle has given them an > incorrect address to deposit to. > The integrated address could work by combining the Bitcoin address > together with some kind of hex or other value, allowing users to choose the > amount they wish to deposit themselves, but ensuring their deposits are > uniquely trackable. > > I'm not sure if some kind of functionality already exists in BTC, as I > haven't been able to find it. If not, can I submit a proposal to implement > this? This feature would be a godsend to all exchange developers if it was > widely accepted. > > Thanks for your time. > Regards, > > Nathan Worsley > CTO - LocalCoinSwap.Com > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190402/400c1e1b/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Tue, 02 Apr 2019 20:01:34 +0000 > From: htimSxelA > To: "nathanw@tutanota.com" , Bitcoin Protocol > Discussion > Subject: Re: [bitcoin-dev] BIP: Bitcoin Integrated Address Feature? > Message-ID: > > protonmail.com> > > Content-Type: text/plain; charset="utf-8" > > Hello, > > I see two immediate issues with this: > 1. Increased resource requirements per transaction > 2. Embedding identifying information into the blockchain is generally bad > for privacy > > It may help your case to provide some technical details of how you'd like > to see this implemented, but without overcoming the issues mentioned above > I think this proposal will be a very tough sell. > > > ...this quickly becomes impractical when large amounts of customers > begin to use exchange wallets as their personal web-wallet, frequently > depositing and withdrawing without trading action. You end up needing to > have a staff member moving funds away from cold deposit addresses as a full > time job - if you wish to handle customer funds in a completely secure > manner. > > I am not sure if I see how this issue is solved by your proposal. > Assumedly, a human will still need to manually approve cold-wallet > withdrawals in order to maintain security. So it seems to me that removing > the 'hot-wallet' component of the backend would only amplify the need for > human interaction. > > I assume you are familiar with hierarchical deterministic wallets? They > can allow an exchange to assign/identify user deposits based on address > derivation path. Keys for deposit addresses can be kept offline if wanted, > and a proper implementation of an HD wallet system should also remove the > need for rescans of user deposit addresses. > > There is also a functionality built into Bitcoin that allows a user to > prove that they own the private keys to some address: signing an agreed > upon message using the private key that controls that address. > Unfortunately I don't think this is a workable solution for you, since the > majority of modern wallet software does not include this feature-- but > perhaps worth mentioning nonetheless. > > Best, > Alex > > ??????? Original Message ??????? > On Tuesday, April 2, 2019 9:53 AM, Nathan Worsley via bitcoin-dev < > bitcoin-dev@lists.linuxfoundation.org> wrote: > > > To whom it may concern, > > > > I believe a missing feature in Bitcoin is the ability to have an > "integrated address", where the address resolves into a Bitcoin address, > and also a transaction message or some other kind of identifier. > > > > By having this feature we could enhance the security of exchange > cold-wallet systems, by allowing them to easily receive all payments to a > single address from an infinite number of customers. We would also greatly > simplify the process of setting up and managing exchange cold-wallet > systems, because we would eliminate the "sweeping" step required to move > multiple customer deposits from a hot address into a single cold address. > > > > Although it would be nice to have all customers deposit directly into > cold addresses, this quickly becomes impractical when large amounts of > customers begin to use exchange wallets as their personal web-wallet, > frequently depositing and withdrawing without trading action. You end up > needing to have a staff member moving funds away from cold deposit > addresses as a full time job - if you wish to handle customer funds in a > completely secure manner. > > > > Thus we see that most exchanges now use the hot-deposit system, where > customers deposit into a hot address that is then automatically swept into > a singular cold address, by a service which holds customers private keys > online. You can observe this service at work simply by making a deposit to > most major exchanges (including the largest exchange Binance), as you will > see the funds quickly being "swept" to their cold wallet address in a > manner which heavily suggests automation by a program which possesses > private keys to the address you are sending funds to. This means there is > always the danger of a sophisticated hacker being able to capture private > keys to customer deposit addresses (as they are clearly being held online). > An integrated address would allow all exchanges using this automated > hot-deposit service to easily switch to a far more secure alternative of > having all customers depositing directly into their singular cold wallet > address. > > > > There are several other more minor advantages such a feature would have, > including: > > - Lower fees for exchanges (which could be passed onto customers), by > reducing a transaction step out of the deposit-to-withdrawal flow. > > - Less need for large rescans after loading huge amounts of customer > addresses into client software. > > - Exchanges can more easily provision deposit addresses to new customers > in a secure manner, by simply generating a hex or other value, creating an > integrated address from the cold wallet address, and then providing this to > the customer. > > - By providing a singular cold address for exchanges publicly, customers > can more easily verify that no man-in-the-middle has given them an > incorrect address to deposit to. > > > > The integrated address could work by combining the Bitcoin address > together with some kind of hex or other value, allowing users to choose the > amount they wish to deposit themselves, but ensuring their deposits are > uniquely trackable. > > > > I'm not sure if some kind of functionality already exists in BTC, as I > haven't been able to find it. If not, can I submit a proposal to implement > this? This feature would be a godsend to all exchange developers if it was > widely accepted. > > > > Thanks for your time. > > > > Regards, > > > > Nathan Worsley > > CTO - LocalCoinSwap.Com > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190402/ade34235/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Tue, 2 Apr 2019 16:43:11 -0400 > From: "James O'Beirne" > To: bitcoin-dev@lists.linuxfoundation.org > Subject: [bitcoin-dev] assumeutxo and UTXO snapshots > Message-ID: > XwngA@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi, > > I'd like to discuss assumeutxo, which is an appealing and simple > optimization in the spirit of assumevalid[0]. > > # Motivation > > To start a fully validating bitcoin client from scratch, that client > currently > needs to perform an initial block download. To the surprise of no one, IBD > takes a linear amount time based on the length of the chain's history. For > clients running on modest hardware under limited bandwidth constraints, > say a mobile device, completing IBD takes a considerable amount of time > and thus poses serious usability challenges. > > As a result, having fully validating clients run on such hardware is rare > and > basically unrealistic. Clients with even moderate resource constraints > are encouraged to rely on the SPV trust model. Though we have promising > improvements to existing SPV modes pending deployment[1], it's worth > thinking about a mechanism that would allow such clients to use trust > models closer to full validation. > > The subject of this mail is a proposal for a complementary alternative to > SPV > modes, and which is in the spirit of an existing default, `assumevalid`. It > may > help modest clients transact under a security model that closely resembles > full validation within minutes instead of hours or days. > > # assumeutxo > > The basic idea is to allow nodes to initialize using a serialized version > of the > UTXO set rendered by another node at some predetermined height. The > initializing node syncs the headers chain from the network, then obtains > and > loads one of these UTXO snapshots (i.e. a serialized version of the UTXO > set > bundled with the block header indicating its "base" and some other > metadata). > > Based upon the snapshot, the node is able to quickly reconstruct its > chainstate, > and compares a hash of the resulting UTXO set to a preordained hash > hard-coded > in the software a la assumevalid. This all takes ~23 minutes, not > accounting for > download of the 3.2GB snapshot[2]. > > The node then syncs to the network tip and afterwards begins a simultaneous > background validation (i.e., a conventional IBD) up to the base height of > the > snapshot in order to achieve full validation. Crucially, even while the > background validation is happening the node can validate incoming blocks > and > transact with the benefit of the full (assumed-valid) UTXO set. > > Snapshots could be obtained from multiple separate peers in the same manner > as > block download, but I haven't put much thought into this. In concept it > doesn't > matter too much where the snapshots come from since their validity is > determined via content hash. > > # Security > > Obviously there are some security implications due consideration. While > this > proposal is in the spirit of assumevalid, practical attacks may become > easier. > Under assumevalid, a user can be tricked into transacting under a false > history > if an attacker convinces them to start bitcoind with a malicious > `-assumevalid` > parameter, sybils their node, and then feeds them a bogus chain > encompassing > all of the hard-coded checkpoints[3]. > > The same attack is made easier in assumeutxo because, unlike in > assumevalid, > the attacker need not construct a valid PoW chain to get the victim's node > into > a false state; they simply need to get the user to accept a bad > `-assumeutxo` > parameter and then supply them an easily made UTXO snapshot containing, > say, a > false coin assignment. > > For this reason, I recommend that if we were to implement assumeutxo, we > not > allow its specification via commandline argument[4]. > > Beyond this risk, I can't think of material differences in security > relative to > assumevalid, though I appeal to the list for help with this. > > # More fully validating clients > > A particularly exciting use-case for assumeutxo is the possibility of > mobile > devices functioning as fully validating nodes with access to the complete > UTXO > set (as an alternative to SPV models). The total resource burden needed to > start a node > from scratch based on a snapshot is, at time of writing, a ~(3.2GB > + blocks_to_tip * 4MB) download and a few minutes of processing time, which > sounds > manageable for many mobile devices currently in use. > > A mobile user could initialize an assumed-valid bitcoin node within an > hour, > transact immediately, and complete a pruned full validation of their > assumed-valid chain over the next few days, perhaps only doing the > background > IBD when their device has access to suitable high-bandwidth connections. > > If we end up implementing an accumulator-based UTXO scaling design[5][6] > down > the road, it's easy to imagine an analogous process that would allow very > fast > startup using an accumulator of a few kilobytes in lieu of a multi-GB > snapshot. > > --- > > I've created a related issue at our Github repository here: > https://github.com/bitcoin/bitcoin/issues/15605 > > and have submitted a draft implementation of snapshot usage via RPC here: > https://github.com/bitcoin/bitcoin/pull/15606 > > I'd like to discuss here whether this is a good fit for Bitcoin > conceptually. Concrete > plans for deployment steps should be discussed in the Github issue, and > after all > that my implementation may be reviewed as a sketch of the specific software > changes necessary. > > Regards, > James > > > [0]: > https://bitcoincore.org/en/2017/03/08/release-0.14.0/#assumed-valid-blocks > [1]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki > [2]: as tested at height 569895, on a 12 core Intel Xeon Silver 4116 CPU @ > 2.10GHz > [3]: > > https://github.com/bitcoin/bitcoin/blob/84d0fdc/src/chainparams.cpp#L145-L161 > [4]: Marco Falke is due credit for this point > [5]: utreexo: https://www.youtube.com/watch?v=edRun-6ubCc > [6]: Boneh, Bunz, Fisch on accumulators: https://eprint.iacr.org/2018/1188 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190402/46b25dd8/attachment.html > > > > ------------------------------ > > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > > > End of bitcoin-dev Digest, Vol 47, Issue 6 > ****************************************** > --000000000000dbf57405859b8472 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
James,

You might= be interested by my work which is currently used in production, without an= y change to bitcoin core.

I properly explain how t= o verify the utxoset independently.

https://github.com/btcpayserver/btcpayserver-dock= er/blob/master/contrib/FastSync/README.md=C2=A0=C2=A0

People are using it, since I get around 10 download= a day.
What can be done to help at Bitcoin Core level is actuall= y very minimal.

First, instead of asking signers o= f by UTXOSet to sign the utxoset hash from gettxoutsetinfo, I ask them to s= ign the hash of the tarball of my UTXO Set.

The re= ason is that it is currently impossible to stop BitcoinD on a specific bloc= k then asking the serialized hash of the UTXO Set.

So instead, a verifier download the tarball (300 blocks + utxoset at speci= fic height), sync to the latest block, then compare the gettxoutsetinfo of = the newly synched node with another trusted node. If it match, the verifier= sign the tarball.

I create a new utxoset snapshot= every 6 months, so people have time to verify it and add their signatures.= (Approximately once every bitcoin core release)

T= he easiest thing that could be done at Bitcoin Core level=C2=A0does not req= uire any code change, but a change in the release process.

The new process would be to ask to the gitian signers to not only = build the source themselves, but also verify a tarball following the proced= ure I explain in the link above.

More complicated = solution like signing the serialized utxoset itself, while possible, would = require bothersome code changes.

Nicolas,
On Wed, A= pr 3, 2019 at 9:25 AM <bitcoin-dev-request@lists.linuxfoundation.org> wrote= :
Send bitcoin-d= ev mailing list submissions to
=C2=A0 =C2=A0 =C2=A0 =C2=A0 bitcoin-dev@lists.linuxfoundation.org

To subscribe or unsubscribe via the World Wide Web, visit
=C2=A0 =C2=A0 =C2=A0 =C2=A0 https://li= sts.linuxfoundation.org/mailman/listinfo/bitcoin-dev
or, via email, send a message with subject or body 'help' to
=C2=A0 =C2=A0 =C2=A0 =C2=A0 bitcoin-dev-request@lists.linuxfoundati= on.org

You can reach the person managing the list at
=C2=A0 =C2=A0 =C2=A0 =C2=A0 bitcoin-dev-owner@lists.linuxfoundation.o= rg

When replying, please edit your Subject line so it is more specific
than "Re: Contents of bitcoin-dev digest..."


Today's Topics:

=C2=A0 =C2=A01. BIP: Bitcoin Integrated Address Feature? (nathanw@tutanota.com)
=C2=A0 =C2=A02. Re: BIP: Bitcoin Integrated Address Feature? (htimSxelA) =C2=A0 =C2=A03. assumeutxo and UTXO snapshots (James O'Beirne)


----------------------------------------------------------------------

Message: 1
Date: Tue, 2 Apr 2019 18:53:11 +0200 (CEST)
From: <nathanw= @tutanota.com>
To: <bitcoin-dev@lists.linuxfoundation.org>
Subject: [bitcoin-dev] BIP: Bitcoin Integrated Address Feature?
Message-ID: <LbTxyE4--3-1@tutanota.com>
Content-Type: text/plain; charset=3D"utf-8"

To whom it may concern,

I believe a missing feature in Bitcoin is the ability to have an "inte= grated address", where the address resolves into a Bitcoin address, an= d also a transaction message or some other kind of identifier.

By having this feature we could enhance the security of exchange cold-walle= t systems, by allowing them to easily receive all payments to a single addr= ess from an infinite number of customers. We would also greatly simplify th= e process of setting up and managing exchange cold-wallet systems, because = we would eliminate the "sweeping" step required to move multiple = customer deposits from a hot address into a single cold address.

Although it would be nice to have all customers deposit directly into cold = addresses, this quickly becomes impractical when large amounts of customers= begin to use exchange wallets as their personal web-wallet, frequently dep= ositing and withdrawing without trading action. You end up needing to have = a staff member moving funds away from cold deposit addresses as a full time= job - if you wish to handle customer funds in a completely secure manner.<= br>
Thus we see that most exchanges now use the hot-deposit system, where custo= mers deposit into a hot address that is then automatically swept into a sin= gular cold address, by a service which holds customers private keys online.= You can observe this service at work simply by making a deposit to most ma= jor exchanges (including the largest exchange Binance), as you will see the= funds quickly being "swept" to their cold wallet address in a ma= nner which heavily suggests automation by a program which possesses private= keys to the address you are sending funds to. This means there is always t= he danger of a sophisticated hacker being able to capture private keys to c= ustomer deposit addresses (as they are clearly being held online). An integ= rated address would allow all exchanges using this automated hot-deposit se= rvice to easily switch to a far more secure alternative of having all custo= mers depositing directly into their singular cold wallet address.

There are several other more minor advantages such a feature would have, in= cluding:
- Lower fees for exchanges (which could be passed onto customers), by reduc= ing a transaction step out of the deposit-to-withdrawal flow.
- Less need for large rescans after loading huge amounts of customer addres= ses into client software.
- Exchanges can more easily provision deposit addresses to new customers in= a secure manner, by simply generating a hex or other value, creating an in= tegrated address from the cold wallet address, and then providing this to t= he customer.
- By providing a singular cold address for exchanges publicly, customers ca= n more easily verify that no man-in-the-middle has given them an incorrect = address to deposit to.
The integrated address could work by combining the Bitcoin address together= with some kind of hex or other value, allowing users to choose the amount = they wish to deposit themselves, but ensuring their deposits are uniquely t= rackable.

I'm not sure if some kind of functionality already exists in BTC, as I = haven't been able to find it. If not, can I submit a proposal to implem= ent this? This feature would be a godsend to all exchange developers if it = was widely accepted.

Thanks for your time.
Regards,

Nathan Worsley
CTO - LocalCoinSwap.Com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attach= ments/20190402/400c1e1b/attachment-0001.html>

------------------------------

Message: 2
Date: Tue, 02 Apr 2019 20:01:34 +0000
From: htimSxelA <htimsxela@protonmail.com>
To: "nathanw= @tutanota.com" <nathanw@tutanota.com>,=C2=A0 =C2=A0 =C2=A0 Bitcoin Proto= col
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Discussion <bitcoin-dev@lists.linuxfoundatio= n.org>
Subject: Re: [bitcoin-dev] BIP: Bitcoin Integrated Address Feature?
Message-ID:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <wtbAF1FAGePDAkY3xkqANuFJtAhEXvz0JeGWnc_OZcG= EyFQb-1B590I3IbwtW2FBivur0yONbSQtxaWqiQTJeoDdadivtbGkWwJnLnnzQQE=3D@protonmail.= com>

Content-Type: text/plain; charset=3D"utf-8"

Hello,

I see two immediate issues with this:
1. Increased resource requirements per transaction
2. Embedding identifying information into the blockchain is generally bad f= or privacy

It may help your case to provide some technical details of how you'd li= ke to see this implemented, but without overcoming the issues mentioned abo= ve I think this proposal will be a very tough sell.

> ...this quickly becomes impractical when large amounts of customers be= gin to use exchange wallets as their personal web-wallet, frequently deposi= ting and withdrawing without trading action. You end up needing to have a s= taff member moving funds away from cold deposit addresses as a full time jo= b - if you wish to handle customer funds in a completely secure manner.

I am not sure if I see how this issue is solved by your proposal. Assumedly= , a human will still need to manually approve cold-wallet withdrawals in or= der to maintain security. So it seems to me that removing the 'hot-wall= et' component of the backend would only amplify the need for human inte= raction.

I assume you are familiar with hierarchical deterministic wallets? They can= allow an exchange to assign/identify user deposits based on address deriva= tion path. Keys for deposit addresses can be kept offline if wanted, and a = proper implementation of an HD wallet system should also remove the need fo= r rescans of user deposit addresses.

There is also a functionality built into Bitcoin that allows a user to prov= e that they own the private keys to some address: signing an agreed upon me= ssage using the private key that controls that address. Unfortunately I don= 't think this is a workable solution for you, since the majority of mod= ern wallet software does not include this feature-- but perhaps worth menti= oning nonetheless.

Best,
Alex

??????? Original Message ???????
On Tuesday, April 2, 2019 9:53 AM, Nathan Worsley via bitcoin-dev <bitco= in-dev@lists.linuxfoundation.org> wrote:

> To whom it may concern,
>
> I believe a missing feature in Bitcoin is the ability to have an "= ;integrated address", where the address resolves into a Bitcoin addres= s, and also a transaction message or some other kind of identifier.
>
> By having this feature we could enhance the security of exchange cold-= wallet systems, by allowing them to easily receive all payments to a single= address from an infinite number of customers. We would also greatly simpli= fy the process of setting up and managing exchange cold-wallet systems, bec= ause we would eliminate the "sweeping" step required to move mult= iple customer deposits from a hot address into a single cold address.
>
> Although it would be nice to have all customers deposit directly into = cold addresses, this quickly becomes impractical when large amounts of cust= omers begin to use exchange wallets as their personal web-wallet, frequentl= y depositing and withdrawing without trading action. You end up needing to = have a staff member moving funds away from cold deposit addresses as a full= time job - if you wish to handle customer funds in a completely secure man= ner.
>
> Thus we see that most exchanges now use the hot-deposit system, where = customers deposit into a hot address that is then automatically swept into = a singular cold address, by a service which holds customers private keys on= line. You can observe this service at work simply by making a deposit to mo= st major exchanges (including the largest exchange Binance), as you will se= e the funds quickly being "swept" to their cold wallet address in= a manner which heavily suggests automation by a program which possesses pr= ivate keys to the address you are sending funds to. This means there is alw= ays the danger of a sophisticated hacker being able to capture private keys= to customer deposit addresses (as they are clearly being held online). An = integrated address would allow all exchanges using this automated hot-depos= it service to easily switch to a far more secure alternative of having all = customers depositing directly into their singular cold wallet address.
>
> There are several other more minor advantages such a feature would hav= e, including:
> - Lower fees for exchanges (which could be passed onto customers), by = reducing a transaction step out of the deposit-to-withdrawal flow.
> - Less need for large rescans after loading huge amounts of customer a= ddresses into client software.
> - Exchanges can more easily provision deposit addresses to new custome= rs in a secure manner, by simply generating a hex or other value, creating = an integrated address from the cold wallet address, and then providing this= to the customer.
> - By providing a singular cold address for exchanges publicly, custome= rs can more easily verify that no man-in-the-middle has given them an incor= rect address to deposit to.
>
> The integrated address could work by combining the Bitcoin address tog= ether with some kind of hex or other value, allowing users to choose the am= ount they wish to deposit themselves, but ensuring their deposits are uniqu= ely trackable.
>
> I'm not sure if some kind of functionality already exists in BTC, = as I haven't been able to find it. If not, can I submit a proposal to i= mplement this? This feature would be a godsend to all exchange developers i= f it was widely accepted.
>
> Thanks for your time.
>
> Regards,
>
> Nathan Worsley
> CTO - LocalCoinSwap.Com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attach= ments/20190402/ade34235/attachment-0001.html>

------------------------------

Message: 3
Date: Tue, 2 Apr 2019 16:43:11 -0400
From: "James O'Beirne" <james.obeirne@gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Subject: [bitcoin-dev] assumeutxo and UTXO snapshots
Message-ID:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <CAPfvXf+JS6ZhXUieWVxiaNa4uhhWwafCk3odMKy5F_= yi=3DXwngA@mail.g= mail.com>
Content-Type: text/plain; charset=3D"utf-8"

Hi,

I'd like to discuss assumeutxo, which is an appealing and simple
optimization in the spirit of assumevalid[0].

# Motivation

To start a fully validating bitcoin client from scratch, that client
currently
needs to perform an initial block download. To the surprise of no one, IBD<= br> takes a linear amount time based on the length of the chain's history. = For
clients running on modest hardware under limited bandwidth constraints,
say a mobile device, completing IBD takes a considerable amount of time
and thus poses serious usability challenges.

As a result, having fully validating clients run on such hardware is rare and
basically unrealistic. Clients with even moderate resource constraints
are encouraged to rely on the SPV trust model. Though we have promising
improvements to existing SPV modes pending deployment[1], it's worth thinking about a mechanism that would allow such clients to use trust
models closer to full validation.

The subject of this mail is a proposal for a complementary alternative to SPV
modes, and which is in the spirit of an existing default, `assumevalid`. It=
may
help modest clients transact under a security model that closely resembles<= br> full validation within minutes instead of hours or days.

# assumeutxo

The basic idea is to allow nodes to initialize using a serialized version of the
UTXO set rendered by another node at some predetermined height. The
initializing node syncs the headers chain from the network, then obtains an= d
loads one of these UTXO snapshots (i.e. a serialized version of the UTXO se= t
bundled with the block header indicating its "base" and some othe= r
metadata).

Based upon the snapshot, the node is able to quickly reconstruct its
chainstate,
and compares a hash of the resulting UTXO set to a preordained hash
hard-coded
in the software a la assumevalid. This all takes ~23 minutes, not
accounting for
download of the 3.2GB snapshot[2].

The node then syncs to the network tip and afterwards begins a simultaneous=
background validation (i.e., a conventional IBD) up to the base height of the
snapshot in order to achieve full validation. Crucially, even while the
background validation is happening the node can validate incoming blocks an= d
transact with the benefit of the full (assumed-valid) UTXO set.

Snapshots could be obtained from multiple separate peers in the same manner=
as
block download, but I haven't put much thought into this. In concept it=
doesn't
matter too much where the snapshots come from since their validity is
determined via content hash.

# Security

Obviously there are some security implications due consideration. While thi= s
proposal is in the spirit of assumevalid, practical attacks may become
easier.
Under assumevalid, a user can be tricked into transacting under a false
history
if an attacker convinces them to start bitcoind with a malicious
`-assumevalid`
parameter, sybils their node, and then feeds them a bogus chain encompassin= g
all of the hard-coded checkpoints[3].

The same attack is made easier in assumeutxo because, unlike in assumevalid= ,
the attacker need not construct a valid PoW chain to get the victim's n= ode
into
a false state; they simply need to get the user to accept a bad
`-assumeutxo`
parameter and then supply them an easily made UTXO snapshot containing,
say, a
false coin assignment.

For this reason, I recommend that if we were to implement assumeutxo, we no= t
allow its specification via commandline argument[4].

Beyond this risk, I can't think of material differences in security
relative to
assumevalid, though I appeal to the list for help with this.

# More fully validating clients

A particularly exciting use-case for assumeutxo is the possibility of mobil= e
devices functioning as fully validating nodes with access to the complete UTXO
set (as an alternative to SPV models). The total resource burden needed to<= br> start a node
from scratch based on a snapshot is, at time of writing, a ~(3.2GB
+ blocks_to_tip * 4MB) download and a few minutes of processing time, which=
sounds
manageable for many mobile devices currently in use.

A mobile user could initialize an assumed-valid bitcoin node within an hour= ,
transact immediately, and complete a pruned full validation of their
assumed-valid chain over the next few days, perhaps only doing the
background
IBD when their device has access to suitable high-bandwidth connections.
If we end up implementing an accumulator-based UTXO scaling design[5][6] down
the road, it's easy to imagine an analogous process that would allow ve= ry
fast
startup using an accumulator of a few kilobytes in lieu of a multi-GB
snapshot.

---

I've created a related issue at our Github repository here:
=C2=A0 https://github.com/bitcoin/bitcoin/issues/1560= 5

and have submitted a draft implementation of snapshot usage via RPC here: =C2=A0 https://github.com/bitcoin/bitcoin/pull/15606

I'd like to discuss here whether this is a good fit for Bitcoin
conceptually. Concrete
plans for deployment steps should be discussed in the Github issue, and
after all
that my implementation may be reviewed as a sketch of the specific software=
changes necessary.

Regards,
James


[0]:
https://bitcoincore.org/en= /2017/03/08/release-0.14.0/#assumed-valid-blocks
[1]: https://github.com/bitcoin/bips/b= lob/master/bip-0157.mediawiki
[2]: as tested at height 569895, on a 12 core Intel Xeon Silver 4116 CPU @<= br> 2.10GHz
[3]:
https://github.com/bitc= oin/bitcoin/blob/84d0fdc/src/chainparams.cpp#L145-L161
[4]: Marco Falke is due credit for this point
[5]: utreexo: https://www.youtube.com/watch?v=3DedRun-6= ubCc
[6]: Boneh, Bunz, Fisch on accumulators: https://eprint.iacr.org/20= 18/1188
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments= /20190402/46b25dd8/attachment.html>

------------------------------

_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev


End of bitcoin-dev Digest, Vol 47, Issue 6
******************************************
--000000000000dbf57405859b8472--