According to Barclays Bank, a smart contract is an agreement whose execution is enforceable and automatable. Automatable by computers while some parts need human control and input. They are enforceable either by tamper proof execution or legal enforcement of rights and obligations.
Smart contracts are pieces of software that extend blockchains’ utility from keeping financial transaction records to automatically implement terms of multiparty agreements.
A computer network that uses consensus protocols is the one that executes smart contracts to agree upon the action sequence resulting from the contract’s code.
Having a shared database that runs a blockchain protocol, the smart contracts auto executes, and the outcome is validated instantaneously without the need for a third-party intermediary.
Classification of Blockchain Ledgers
Based on the choice of the functional components described above, blockchain architectures may be classified broadly into two categories – private and public. In the case of public architectures, the generation process and verification of transactions are available to the public, so that anyone in the network may perform these actions. Most importantly, the mining process is open to all users in the network. However, the mining process heavily depends on some concepts of proof-of-work, which may be monopolized by computing power or supremacy in finance. In private blockchain architectures, the generation processes and verification of transactions may be restricted and access controlled to only some users of the network.
This often results in a simpler consensus mechanism, which at times requires a competitive mining. Another popular naming system in this line identifies the blockchain architecture as permissioned and permissionless. A permissionless blockchain is identified if the transactions can be made or verified by any user in the network, while a permissioned blockchain is where the transactions can be verified by predetermined authorized entities. To add to that, the permissioned blockchains might include designed access control structures that determine which user in the network can mine blocks, verify blocks and view the blockchain ledger. In Bitcoin, which is aa permissionless blockchain protocol, majority consensus is followed, where the longest chain is maintained. In permissioned blockchains, auditors and the miners are trusted entities, which leads to the consensus scheme being designed to be much simpler.