From: Andy Parkins <andyparkins@gmail.com>
To: bitcoin-development@lists.sourceforge.net
Subject: Re: [Bitcoin-development] Suggestion for enhancements to getblock
Date: Thu, 7 Jul 2011 20:02:04 +0100 [thread overview]
Message-ID: <201107072002.04793.andyparkins@gmail.com> (raw)
In-Reply-To: <CANEZrP1eEmjqLAhAWHXTWurUVP7P1pxuf6e0w_0UF2DGZo3ZQw@mail.gmail.com>
On Thursday 07 July 2011 17:44:48 Mike Hearn wrote:
> > What I want to be able to do though is calculate a balance for an
> > aribtrary address. Not every address; just the particular ones that
> > the client is interested in. It's complete overkill to require the
> > whole block chain just to calculate the balance of a few addresses.
>
> But what is that for? You said it's for a lightweight client to do
> that when it receives a transaction, to verify that all the
> dependencies are in blocks recursively. But why?
There is no way for a client to know in advance whether any broadcast
transaction contains a send to an address in its wallet. So every incoming
transaction has to be examined.
Then, there is no way to know if while you were offline any of the
transactions in the blocks you missed contained transactions for an address
in your wallet.
Also, a feature I am interested in supporting is a split wallet -- where the
private key is held elsewhere. I'd still want to be able to report the
current balance in a particular address though. That address can be added
at any time.
Also, I would like to make some blockexplorer-like facilities available to
lightweight clients.
> > Not entirely. If I ask for "the block that contains transaction with
> > hash 12345678abcd..." then when I get that full block, I can verify
> > the merkle tree myself.
>
> Well, it's more efficient to just verify the merkle branch. But yes.
We're only talking about one verifying one (or minimal numbers of) blocks;
"efficient" isn't really going to matter much in that context. Also, if
we're talking about a situation where we don't necessarily trust the remote,
we've got to verify the whole block, not just the one transaction we're
interested in, since we told the remote which one we were interested in when
we requested it.
> > I'm not entirely sure I see how a filter helps. If I've been offline
> > for ten minutes then I need all the transactions pending in the last
> > ten minutes. No amount of filtering makes that list any smaller.
>
> Why do you need all of them? You just care about the ones sending
> coins to you, surely?
Is the filter going to be filter-by-address then? I misunderstood in that
case, I thought you were talking about filter-by-hash, which obviously tells
you nothing about the contents of the transaction.
> > That would be fine. My reason for suggesting using getblocks was that
> > it didn't introduce a new command.
>
> IMHO it's fine to introduce new commands. They'll just be ignored by
> old clients in any event.
That's good to know. I'm trying to be circumspect in what my client does; I
want to be 100% compatible, which means if I need a new feature, it's got to
be in the official client first.
I accept that this is all big talk, and there are plenty of people who start
new clients and then give up; which might still happen to me.
Andy
--
Dr Andy Parkins
andyparkins@gmail.com
next prev parent reply other threads:[~2011-07-07 19:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 9:49 [Bitcoin-development] Suggestion for enhancements to getblock Andy Parkins
2011-07-07 15:42 ` Mike Hearn
2011-07-07 16:19 ` Andy Parkins
2011-07-07 16:44 ` Mike Hearn
2011-07-07 19:02 ` Andy Parkins [this message]
2011-07-07 17:45 ` Gregory Maxwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201107072002.04793.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=bitcoin-development@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox