# A MILP Model for a Byzantine Fault Tolerant Blockchain Consensus
## 1 Introduction  
Mixed-Integer Linear Programming (MILP) is considered by [PERSON], one of its creators, to be an art as much as it is science [1], due to its ability to find optimal solutions for challengingoptimization problems. Some MILP models for problems of interest may be quickly solved, while other \"seemingly easy\" problems of huge practical importance remain unsolved [2], despite several decades of great efforts [3]. It is unquestionable that MILP has been successfully applied to a wide range of applications, with an astounding success in some specific applications, such as the traveling salesman problem [4]. We present novel possibilities of MILP applications within a recent and innovative field of interest: the blockchain technology. Blockchain is a disrupting technology, with importance to financial applications and _trustless_ architectures, as a decentralized platform for cooperation between parties that do not trust each other. Among existing blockchains and Distributed Ledger Technologies (DLT), Bitcoin [5] is the oldest and most successful case. Since its inception in 2008 by [PERSON], a consensus based on Proof of Work (PoW) has started on Bitcoin network and never stopped producing new information chunks, called _blocks_, through computationally expensive tasks called _mining_. Network consensus participants, or _miners_, have to agree on which sequence of blocks deserves continuation and aggressively compete to quickly find a SHA-2 [6] hash value that correctly matches and expands the _chain of blocks_. Since each block _points to_ (includes a hash reference to) previous blocks, it is not possible to change past information without affecting the whole future chain of blocks. Through in-time participation of miners, the blockchain network is always able to generate new blocks, while keeping past information immutable. One fundamental feature of PoW-based consensus (or _Nakamoto Consensus_) is that nodes may naturally disagree on the next block (since mining process may be completed at the same time, with different hashes on different nodes), but every node must select only one of these \"paths\" to follow, commonly resolving these _forks_ in a few blocks (the most _supported fork_ is maintained). Each block aggregates a batch of operations, called _transactions_. On Bitcoin, transactions typically represent asset transfers between involved parties (validated through elliptic curve cryptography [7]), solving the challenging double-spending problem with a transparent and global public ledger. However, transactions and blocks could also contain more complex computations. In 2013, Ethereum [8] project launched a blockchain capable of performing Turing-complete [9] computations, also including a global storage system. The consensus system was the same as Bitcoin, including the PoW strategy. During the same year, Neo project [10] gave its first steps (under the name _Antshares_) towards the design of a Turing-complete blockchain with One Block Finality (1 BF) consensus, without relying on a computationally expensive PoW. This consensus system was named Delegated Byzantine Fault Tolerance (dBFT), adding network voting mechanisms over the groundbreaking work of [PERSON] and [PERSON] [11], the Practical Byzantine Fault Tolerance (PBFT). The fundamental aspect of PBFT over other fault-tolerant consensus such as Paxos [12], is that PBFT allow resistance to malicious agents, or _Byzantine_, as named on the classic Byzantine generals problem [13]. This allows a set of \(N=3f+1\) nodes, typically named _Consensus Nodes_, to cooperate and agree on a total-order of events, despite intentional and non-intentional failures up to \(f\) simultaneous nodes. These ideas were soon adapted for the context of DLTs and blockchain [10]. On dBFT, the consensus nodes cooperate via a Peer-to-Peer (P2P) network, collecting transactions submitted by nodes and organizing them in a memory pool mechanism (_mempool_).