public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Mike Hearn <mike@plan99.net>
To: Matt Corallo <bitcoin-list@bluematt.me>
Cc: bitcoin-development <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Bloom Filter Implementation
Date: Wed, 15 Aug 2012 12:07:14 +0200	[thread overview]
Message-ID: <CANEZrP1BtD6Ps5h2zaxE5ePVhXtT6bXmpRw54+Fg7yWtJFD+=A@mail.gmail.com> (raw)
In-Reply-To: <1344990391.4355.21.camel@bmthinkpad.lan.bluematt.me>

This is great, thanks!

A few remarks:

If you have to update the filter after every block, IBD will require a
round-trip after every single block download instead of doing bulk
requests with getblocks. That sounds like it'd kill any performance
gains won by the feature. There needs to be a way to do bulk getblocks
on hundreds/thousands of blocks at a time and then have the data
stream in. Perhaps the server node can update the filter for you, as
the rules are deterministic?

As you know the remote end will request the transactions given their
hashes anyway, why not save the bandwidth for the hashes and the
network round-trip by just providing the transactions immediately in
the block? I was imagining something like:

// A CMerkleTx without the redundant block hash
class CLiteMerkleTx : public CTransaction {
  std::vector<uint256> vBranch;
  int nIndex;
}

class CMerkleBlock {
    int nVersion;
    uint256 hashPrevBlock;
    uint256 hashMerkleRoot;
    unsigned int nTime;
    unsigned int nBits;
    unsigned int nNonce;

    std::vector<CLiteMerkleTx> vMatchedTxns;
}



      reply	other threads:[~2012-08-15 10:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15  0:26 [Bitcoin-development] Bloom Filter Implementation Matt Corallo
2012-08-15 10:07 ` Mike Hearn [this message]

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='CANEZrP1BtD6Ps5h2zaxE5ePVhXtT6bXmpRw54+Fg7yWtJFD+=A@mail.gmail.com' \
    --to=mike@plan99.net \
    --cc=bitcoin-development@lists.sourceforge.net \
    --cc=bitcoin-list@bluematt.me \
    /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