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
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}

Saturday, September 28, 2013

Installing R on Mint

Well, you start here and click all the way to here but then, I didn't know which to choose

To obtain the latest R packages, add an entry like
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu raring/
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu quantal/
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu lucid/

So it turns out that raring, quantal, precise etc are names of Ubuntu packages (duh). Googeling 'linux version' got me here so my Linux Mint Maya corresponds to precise!

Now I added
deb precise/
sudo apt-get update
sudo apt-get install r-base 
and it's done.

Sunday, September 15, 2013

Grab screen color utility on Linux

The following link provides a super basic command line utility for grabbing the hex and RGB color codes of any pixel on your screen.
After installation just type
> grabc
Your cursor then becomes this little + that can placed anywhere on your screen and when you click the mouse button you get the hex and RGB value of the color of that pixel.


Sunday, September 8, 2013

Upgrade ruby with RVM

rvm get stable
rvm list known

now pick the one before HEAD, say it is -p247

rvm install ruby-2.0.0-p247

After that rspec spec crashed with :

`require': no such file to load -- rubygems

The solution is to run

rvm use

which apparently solves the ambiguity between several installed ruby versions

Rspec fails to run after bundle update

Turns out that the problem goes away if you change

gem 'selenium-webdriver', '2.0.0'


gem 'selenium-webdriver', '~> 2.35.1'

as was mentioned here

Saturday, August 10, 2013

Bitcoin Perspective

Most of my interactions regarding Bitcoin are with bitcoin enthusiasts. This gives a very skewed perspective on the prospects of Bitcoin. Interestingly enough, over the past few days I had two lengthy discussions with people who just don't believe Bitcoin stands a chance.
It was interesting to hear that and get a reality check.

The first guy I spoke with is a young Rails developer who put forward the (known) argument that bitcoin is doomed because it is designed to clash heads on with governments, basically stealing their lunch, and will thus be destroyed by these dormant giants (as the guy put it).
The second person I spoke with works in the Israeli VC industry. His argument was different, basically that Fiat money works well and thus Bitcoin is solving a non-existing problem.
While both points of view are valid, I feel differently. I feel (perhaps hope) that Bitcoin is a real technological innovation that cannot and should not be stopped and will inevitably carve a sizable niche of the world economy.

However, it was a useful psychological exercise to hear other views are be reminded that being invested in Bitcoin (either by owning, or thinking and writing about it or trying to create innovation within the crypto currency space) is highly risky and can easily be wiped out in short notice.
As the saying goes, it is hard to predict, especially the future, and so we will have to wait and see what the future will bring us in terms of Bitcoin and crypto-currencies in general.

I would bet that whatever the future holds, it is going to be quiet different from what we imagine it to be.
I also bet that when the dust settles it will be a win-win both for the Bitcoin community and for national economies that may feel threatened by it, much like how electronic communication technologies, from telephone to internet to emails and even Facebook and Twitter, have always been an initial threat to the status-quo and ended up giving a tremendous economic boost to those who embraced them.

And remember, it ain't over til the fat lady sings.