On customised distributed consensus - the "firmware" of blockchains