shadow / shadow-plugin-bitcoin

A Shadow plug-in that runs the Bitcoin Satoshi reference software

Home Page:https://shadow.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples for more complicated networks?

haasn opened this issue · comments

Being able to run two bitcoind nodes is nice and all, but would it be possible to provide an example of how to extend this to larger networks? (Say, 1000 nodes and 10 miners)

Since the connections seem to be hard-coded in the XML file it's not quite clear to me, apart from manually generating a big XML file with randomized connections, how to do this in a more pragmatic way.

Generating a big XML file with hard-coded -connect args for each bitcoin node is the approach that I took. I agree that approach is not ideal, though...

Do you happen to still have scripts lying around for that? Publishing them in the wiki or something would be useful to somebody down the road.

I don't have anything usable lying around. Generating Shadow config files is fairly straight forward; just generate a bunch of nodes that run the bitcoind plugin and set the arguments for those nodes correctly. The unknown part is which nodes should connect to which other nodes, but there may be data out there for that or you might just decide on the connections arbitrarily.

An example of generating a Shadow config file is here:
https://github.com/shadow/shadow/blob/master/tools/generate_example_config.py#L16

You would just want to change the "tgen" application with bitcoind.

Sorry this is not a great answer, but I hope that helps!