Sunday, February 16, 2014

Research paper about block-hiding mining strategies in Bitcoin-like networks

I uploaded to the Arxiv a paper I have been working on recently and finally had some spare time to finish. This research was done on my spare time motivated by the Selfish Miners paper. The main result is a more detailed view of the structure of phase space of mining strategies that involve hiding some blocks from the rest of the network and only publishing them when you see fit. Interestingly enough, the structure of phase space suggests a kind of symmetry between the relative hashing power of a block-hiding miner and her connectivity parameter controlling how many standard miners work on her block in case of a bifurcation. As long as miners have small enough hashing power and connectivity, the standard mining strategy advocated by Satoshi is the preferred strategy for maximizing the probability of ripping block rewards. Once a miner has too much mining power or connectivity (read the article for details, but heuristically the figures are somewhere between one quarter and one third) using block hiding strategies increases the probability for wining blocks and thus may, theoretically, convince miners to start using such strategies. For a recent discussion of miners centrality see Vitalik Buterin's article in Bitcoin magazine.

Monday, January 6, 2014

Divide spec into slow and fast tests

Some tests are too slow to run each time. In Rspec you can do this. Add on the top of the spec.rb file the following command:
RSpec.configure do |c|
  c.filter_run_excluding :slow => true
end
Now you tag the slow tests:
describe "add a user", slow: :true do
Next time you run "rspec spec" the slow tests will not run

No DRb server is running. Running in local process instead ...
Run options: exclude {:slow=>true}
...............................................
If you want to run the slow tests, use a flag:
rspec spec --tag slow
and now they run

No DRb server is running. Running in local process instead ...
Run options: include {:slow=>true}
...................