Efficient Random Beacons with Adaptive Security for Ungrindable Blockchains