Distributed Computing Blockchain System Learning
Glossary
Term DefinitionBlockchain is a distributed database that uses cryptography to ensure data security and immutability. Smart Contract is a piece of code stored on the blockchain that is automatically executed when the preset conditions are met. Distributed Computing is the process of breaking down a computing task into multiple subtasks, which are completed by different computers and the results are finally summarized. Node is a computer connected to the blockchain network that participates in maintaining blockchain data. Resource Allocation is the process of allocating computing tasks to the most suitable node for processing. Network Topology describes the structure of the connection relationship between each node in the network. Security Contract is responsible for ensuring the security of data transmission during distributed computing. Validation Contract verifies the calculation results to ensure the correctness of the results. Public Key/Private Key is a pair of keys used in asymmetric encryption algorithms. The public key can be made public and the private key must be kept confidential. RSA (Rivest-Shamir-Adleman) is a commonly used asymmetric encryption algorithm. Diffie-Hellman Key Exchange (Diffie-Hellman Key Exchange) is a secure key exchange protocol that allows two parties to negotiate a shared key in an insecure network. Peer-to-Peer (P2P) is a decentralized network architecture in which nodes can directly connect and communicate. Kademlia Protocol (Kademlia Protocol) is a node routing and search protocol for distributed peer-to-peer networks.
Short answer questions
Please briefly describe the advantages of distributed computing on blockchain.
Distributed computing uses the decentralized nature of blockchain to distribute computing tasks to multiple nodes in the network for processing, thereby improving computing efficiency. At the same time, the security of blockchain can ensure the reliability of computing results and avoid single point failures and data tampering.
What role do smart contracts play in distributed computing?
Smart contracts define rules such as distributed computing task allocation, execution process, result verification, and payment methods. It executes automatically to ensure that the computing process is transparent and trustworthy.
Explain the role of resource allocation contracts and how to choose appropriate nodes.
The resource allocation contract is responsible for receiving computing task requests and node information, and selecting the most suitable node set to perform computing tasks based on factors such as the node's computing power, connection capability, and storage capacity.
How does the network contract help establish the network topology for distributed computing?
Based on the selected node information, the network contract determines the network topology and generates configuration parameters containing node connection information to guide the establishment of connections between nodes.
How does the security contract ensure information security in the distributed computing process?
Security contracts can use asymmetric encryption algorithms, such as RSA, to generate public and private keys for nodes to ensure the security of data transmission between nodes and prevent information leakage and tampering.
Briefly describe how the verification contract confirms the correctness of the calculation results.
The verification contract receives the calculation results from the distributed computing layer and verifies them using a predefined verification method, such as TrueBit. If the verification passes, the result is confirmed to be correct, otherwise the result is marked invalid.
Explain why it is necessary to associate physical addresses with blockchain accounts.
In distributed computing, network connections between nodes need to be established, and blockchain accounts are only logical identifiers. They need to be associated with the physical addresses of nodes (such as IP addresses) to achieve network communication.
Describe two methods for securely associating physical addresses with blockchain accounts.
Method 1: Encrypted physical address exchange. Nodes use encryption algorithms such as RSA to encrypt their physical addresses, and then exchange information with other nodes through the blockchain to ensure that only nodes participating in the calculation know each other's physical addresses. Method 2: Peer discovery. Nodes use the same pre-assigned index to search in the peer-to-peer network to find each other's physical addresses without disclosing the association between blockchain accounts and physical addresses.
Explain the role of parameter server architecture in distributed machine learning.
In the parameter server architecture, the parameter server stores model parameters and coordinates multiple worker nodes for model training. Each worker node is responsible for processing a part of the data and sending the calculated parameter updates to the parameter server, which summarizes the updates and feeds back to the worker nodes to iteratively optimize the model parameters.
How do newly joined nodes synchronize blockchain data and join the distributed computing network?
Newly joined nodes need to download blockchain data or part of the data and write their own account information into the smart contract, including information such as computing power, connection capacity, and storage capacity, so that other nodes can identify and establish connections with them.