Execution of business processes on blockchain platforms
Blockchain A public shared ledger maintained by all nodes in a peer-to-peer network. Blockchain platform All the components that make a blockchain work, including wallets, code, transactions, the blockchain network, and the blockchain itself. Smart contracts Code on a blockchain platform designed to replicate the legal concept of a contract. Script Smart contract code that can be executed as a process instance. Script template A script that contains logic but not the parameters required to make the script executable. Execution of process instance scripts on the blockchain and the services provided by smart contracts. Triggers Programs that connect blockchain process execution with the outside world and can run on blockchain full nodes. Mediators Process instances that act as neutral third parties in transactions. Monitors Process instances that listen to transactions and act as message relays.
Short answer questions
What are the key differences between Bitcoin and Ethereum in terms of smart contract implementation?
What is the difference between a script template and a script?
What role does a translator play in converting a process specification to a script template?
Explain the role of triggers in blockchain process execution.
List and describe at least three factors that can influence whether a task is executed on-chain or off-chain.
What is the main difference between the monitor pattern and the mediator pattern?
Describe the role of data encryption in blockchain process execution and how it is implemented.
What is an ABI and what role does it play in smart contract deployment?
Explain how process instances maintain the state of process execution on the blockchain.
What are the main advantages of executing business processes on the blockchain?
Short answer questions
Bitcoin uses a non-Turing-complete scripting language that does not support loops, while Ethereum uses a Turing-complete scripting language that allows for more complex contract logic. In addition, Bitcoin scripts are used to verify transactions, while Ethereum smart contracts exist independently and can perform various functions.
A script template is a semi-finished script that contains process logic but does not contain specific parameters, while a script is code that makes the script template complete and executable by adding parameters.
The translator is responsible for converting process specifications into script templates that can be executed on the blockchain. It analyzes the process specification, identifies on-chain and off-chain tasks, and generates a script template that contains the process logic.
Triggers act as a bridge between blockchain process execution and the outside world. They query the blockchain to obtain the state of the process instance, call external API functions to drive the process, and receive API calls from participants.
Factors that influence whether a task is performed on-chain or off-chain include: a) the level of trust between participants, b) the type of task (e.g., physical tasks are usually performed off-chain), and c) the data requirements and computational cost of the task.
In the monitor pattern, the smart contract is a passive participant that only listens to transactions and acts as a message relay. Whereas in the mediator pattern, the smart contract is an active participant that executes process logic and automatically performs actions according to predefined rules.
Data encryption protects the privacy of participants by encrypting data before adding it to the blockchain. This can be achieved by using a shared key or asynchronous encryption using the recipient's public key.
The ABI (Application Binary Interface) defines how to interact with smart contracts. It specifies contract functions, parameters, and data types, allowing external applications to interact with contracts on the blockchain.
Process instances maintain the state of process execution by updating state variables stored on the blockchain. Each time a task or decision is performed, the state variables are updated to reflect the current state of the process.
The main advantages of executing business processes on the blockchain include: a) decentralization and increased transparency, b) enhanced security, and c) reduced need for trusted third parties.