Automatically set block height

Fixes #23