BFT in Blockchain: Optimizations and Applications