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
|
Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
helo=mx.sourceforge.net)
by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
(envelope-from <gmaxwell@gmail.com>) id 1Tm2Wk-0005we-Fl
for bitcoin-development@lists.sourceforge.net;
Fri, 21 Dec 2012 13:20:38 +0000
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com
designates 209.85.223.177 as permitted sender)
client-ip=209.85.223.177; envelope-from=gmaxwell@gmail.com;
helo=mail-ie0-f177.google.com;
Received: from mail-ie0-f177.google.com ([209.85.223.177])
by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.76) id 1Tm2Wg-0008Rp-U4
for bitcoin-development@lists.sourceforge.net;
Fri, 21 Dec 2012 13:20:38 +0000
Received: by mail-ie0-f177.google.com with SMTP id k13so6027069iea.8
for <bitcoin-development@lists.sourceforge.net>;
Fri, 21 Dec 2012 05:20:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.203.74 with SMTP id ko10mr13210803igc.26.1356096029592;
Fri, 21 Dec 2012 05:20:29 -0800 (PST)
Received: by 10.64.171.73 with HTTP; Fri, 21 Dec 2012 05:20:29 -0800 (PST)
In-Reply-To: <B03D534F-BAB6-4068-A8B4-AE28764F3D88@gmail.com>
References: <B03D534F-BAB6-4068-A8B4-AE28764F3D88@gmail.com>
Date: Fri, 21 Dec 2012 08:20:29 -0500
Message-ID: <CAAS2fgRG6kY8ke4hTdUjVBB1dmCppmzwo7qmOM-ytKS1299Z1w@mail.gmail.com>
From: Gregory Maxwell <gmaxwell@gmail.com>
To: Eric Lombrozo <elombrozo@gmail.com>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -1.6 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
See http://spamassassin.org/tag/ for more details.
-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
sender-domain
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(gmaxwell[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1Tm2Wg-0008Rp-U4
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Multiwallet support
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Fri, 21 Dec 2012 13:20:38 -0000
On Fri, Dec 21, 2012 at 3:53 AM, Eric Lombrozo <elombrozo@gmail.com> wrote:
> I started working on a new feature to allow for watch-only addresses in
> wallets. https://github.com/bitcoin/bitcoin/pull/2121
>
> In order to integrate this feature nicely into bitcoin / bitcoin, it will be
> necessary to disable signing and privkey export operations for watch-only
> addresses. Since disabling these things for only some of the keys in a
> wallet but not others is an API nightmare and complicates CreateTransaction
> logic, I propose adding multiple wallet capabilities and specifying upon
> creation whether a wallet is a:
>
> 1) full signing wallet
> - importaddress is disabled.
>
> 2) watch-only wallet
> - signing and privkey export operations are disabled.
> - importprivkey only saves the associated address but not the private key.
> (behaves like importaddress <address for privkey>)
>
> In order to do the above, it will be necessary to add multiple wallet
> support. Anyhow, that was my initial motivation for multiple wallets - but
> obviously, there are a number of other reasons why people might want
> multiple wallet support.
>
> ----------------------
>
> Adding the ability to specify multiple wallets with associated names and
> passphrases in the config file should be fairly straightforward. However,
> exposing multiple wallets via RPC will be tricky as the existing RPC is not
> designed to support multiple wallets.
>
> As to not break compatibility with the existing RPC calls, we can have a
> main wallet which is always used as the default wallet. If the user wants to
> use a different wallet, the name of the wallet would have to be specified in
> the call. Unfortunately, it doesn't look like we can use many of the
> existing RPC calls (sendfrom, sendmany,sendtoaddress, etc...) since they all
> have optional parameters already and it would be awkward to just tack on the
> wallet name parameter at the end. Also, walletpassphrase is problematic as
> it is not stateless. So it looks like we need a whole separate set of calls
> which require a wallet name and passphrase (if the wallet is encrypted).
>
> For instance,
> walletsendtoaddress <walletname> <passphrase> <bitcoinaddress> <amount>
> [comment] [comment-to]
>
> I welcome any proposals or suggestions as to how this should be done.
>
How about a rpc like "usewallet <foo> <normal RPC>" that simply
generalizes all the rpcs?
And instead of explicitly deactivating rpcs that don't make sense,
simply have them return an error. Or, for example, sendtoaddress on
a watching wallet should actually return an unsigned raw transaction
and a wallet specific message that tells you where to find the private
key.
I think it's desirable to not break compatibility but for this kind of
feature compatibility should not get in the way of doing it right.
|