What I want is configurable 1/10/100 millisecond ticks, and accurate flow of information.

It doesn't seem necessary to really emulate the whole protocol, nor to be overly concerned with the content of messages, nor to simulate every little housekeeping step or network message.

I'm not looking for a bitcoin-network-in-a-bottle, I just want to see flows.  In the current situation, how often does a miner win if they hold their block until they see another one?  How does that change with various numbers of remote sensors?

Other applications in the future could very well involve transaction spread, double spends, network partitions, transaction replacement, etc.

If the simulation run in question involves blocks, I'd like realistic latencies for blocks.  If it is about transactions, the latencies should be realistic for transactions.

What is realistic for those?  That brings me to...

I'll kick in another 1 BTC for an instrumentation package for the reference client.  Same conditions as before.  A runtime option, disabled by default, that collects data for the simulator.  If this creates an uproar, I'll also accept a compile-time option.  Support dumping to a file that can be uploaded to a parser as the bare minimum, and if you are feeling clever, add automatic uploads to a server specified in the conf file, or whatever.  All data should be anonymous, of course.  Local file should be in a format that humans can read (JSON, XML, CSV, etc) so that people can verify that the data is indeed anonymous.

I want stats on peers (number, turnover, latency, in/out, etc), stats on local operations (I/O stats, sigs per second when verifying a block, fraction of sig cache hits when validating, etc) and whatever else might be useful to a simulator.  Each parameter should collect min, max, mean, std. deviation, etc so that the simulator can provide realistic virtual nodes.

Also, I don't want anyone to think that they need to satisfy me personally to collect on either of these two bounties.  I will pay mine for a product that is generally along the lines I have laid out, if a couple of the core devs (Gavin, Greg, Jeff, sipa, Luke, etc) agree that your work is useful.


Christophe Biocca wrote:

I might try building this sometime soon. I think it may also serve an educational purpose when trying to understand the whole network's behaviour.

What level of accuracy are we looking for though? Obviously we need to fully emulate the steps of the network protocol, and we need to be able to specify time taken for transmission/processing for each node. Do we care about the actual contents of the messages (to be able to simulate double spend attempts, invalid transactions and blocks, SPV node communication), and their validation (actual signatures and proof of work)?

I imagine the latter is pretty useless, beyond specifying that the signature/proof of work is valid/invalid.

If we could build up a set of experiments we'd like to run on it, it would help clarify what's needed.

Off the top of my head:

- Peter Todd's miner strategy of sending blocks to only 51% of the hashpower.
- Various network split conditions, and how aware of the split nodes would be (and the effect of client variability).
- Testing the feasability of network race double spends, or Finney attacks.
- Various network partition scenarios.
- Tricking SPV nodes.

On Nov 6, 2013 6:37 AM, "Jeff Garzik" <jgarzik@bitpay.com> wrote:

I will contribute 1 BTC to this bounty, under same terms and expiration.


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development



------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk


_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development