PEM Project
  • Index
  • Abstract
  • 1. Project Background
    • 1.1 Overview of Blockchain and Cryptocurrency
    • 1.2 Growing Demand for AI Computing Power
    • 1.3 The Necessity of Constructing a Cloud Computing + Blockchain Network
  • 2. PemChain Overview
    • 2.1 Project Introduction
    • 2.2 Core Architecture
    • 2.3 Technical Features
    • 2.4 Ecosystem
  • 3. Blockchain Technology Applications
    • 3.1 Edge Cloud Computing Network
    • 3.2 Multi-chain nodes + Cloud computing clusters
    • 3.3 Cloud Computing Reward Mechanism
    • 3.4 Proof of Work Consensus Algorithm
    • 3.5 Consensus Mechanism
    • 3.6 Algorithm Advantages
    • 3.7 Smart Contracts
  • 4. PEM Token Issuance
  • 4.1 Issuance programme
  • 4.2 Token Value and Incentive Structure
  • 4.3 Economic Model Design
  • 5. Ecological Construction and Governance
    • 5.1. Ecological Construction Plan
    • 5.2. Community Governance Mechanism
    • 5.3. Incentive Mechanism Design
  • 6. PEM Coin Information
    • 6.1 Basic Information about PEM
    • 6.2 PEM Allocation
  • 7. Development Roadmap
  • 8. Team Information
  • 9. Disclaimer
Powered by GitBook
On this page
  1. 3. Blockchain Technology Applications

3.5 Consensus Mechanism

Previous3.4 Proof of Work Consensus AlgorithmNext3.6 Algorithm Advantages

Last updated 5 months ago

  1. Miners Select Transactions

Miners choose transactions from the memory pool (mempool) that are pending processing, often selecting transactions with higher fees to increase profits.

  1. Creating a Candidate Block

Miners package the selected transactions into a candidate block, which includes the following information :

  • Block Header

  • Transaction List

  • State Root

  • Transaction Root

  1. Calculating Hash

Miners need to calculate the hash value of the candidate block to find a hash that meets specific conditions. The specific steps are as follows: hash the block header information (including version number, parent block hash, timestamp, difficulty, nonce, etc.). The goal is to find a hash value that is less than the current difficulty target. This process involves continuously adjusting the nonce value until the appropriate hash is found.

  1. Difficulty Adjustment

The difficulty of PemChain adjusts dynamically based on the network's overall hash rate. Every 10,000 blocks, the difficulty is adjusted based on the block production time of the past 10,000 blocks to maintain an average block production time of approximately 15 seconds.

  • D_previous: The difficulty of the previous block.

  • T_target: The target time (usually 15 seconds).

  • T_actual: The average time it took to generate the last 10,000 blocks.

  1. Submission of a New Block

Once a miner finds a valid hash, they broadcast the candidate block to the network. Other nodes verify the validity of the block, including:

  • Confirming the validity of the transactions.

  • Checking if the block header's hash meets the difficulty requirements.

  • Verifying if the state changes in the block are correct.

  1. Block Reward

If the new block is successfully added to the blockchain, the miner will receive a block reward. This typically includes:

  • A fixed block reward (which may vary at different stages of PemChain).

  • Transaction fees (fees from all transactions included in the block).

  1. Reorganization and Orphan Blocks

Due to network latency and competition among miners, it is possible for multiple miners to find a valid block almost simultaneously. In such cases, "orphan blocks" may occur. PemChain handles orphan blocks based on the principle of the longest chain, with the final confirmed chain being the one that contains the most proof of work (PoW).

  1. Security

The security of the PoW mechanism relies on the expenditure of work effort; an attacker would need to control more than 50% of the network's hash rate to mount an effective attack, such as a double spend.