DxChain Wiki
  • ๐Ÿ‘‹Welcome to DxChain!
    • About $DX
    • About DxChain V3
    • Important Links
    • Project Updates
  • ๐Ÿ“The Basics
    • ๐Ÿ“–DxChain V3 LitePaper
      • Notice
      • 1. Background
      • 2. Introduction
      • 3. The Ecosystem Powered by DxChain 3.0
      • 4. DxChain Design Principles & Architecture
        • 4.1 Fully Compatible with EVM
        • 4.2 DPoS Consensus Algorithm
        • 4.3 Cross Chain
        • 4.4 API Layer
        • 4.5 Blacklist Management
        • 4.6 P2P Decentralized Network Layer
        • 4.7 MPT + LevelDB
        • 4.8 Ellipse Curve Digital Signature Algorithm
      • 5. Economic system
      • 6. Governance
      • 7. Roadmap
      • 8. Follow Us
      • 9. Reference
      • 10. Risk Warning
  • ๐Ÿช™Stake and Trade
    • About DX DPoS
    • How to Earn DX
    • Stake on DxChain
      • DxChain V3 Staking
      • Wallet
      • Consensus
      • How to Stake
    • Develop on DxChain
      • Compile and Run
      • On-chain Interaction
        • DPoS API
      • Smart Contract
      • Private Chain Construction
      • Genesis Block
      • Parameters Table
      • Mainnet
      • Testnet
      • Participate as Validator
    • Trade on DxChain
      • Cross Chain Bridge
  • โ›๏ธLiquidity Mining
    • Introduction of DxFarm
      • Functions
    • Tutorial
  • ๐ŸŽ™๏ธMedia Press
  • ๐ŸŒไธญๆ–‡็คพๅŒบ
    • ๐Ÿ“™DxChainๆ–ฐไบบๆ‰‹ๅ†Œ
    • ๐Ÿ“œDxChain V3ๆŠ€ๆœฏๆ–‡ๆกฃ
      • 1. ่ƒŒๆ™ฏ
      • 2. ็ฎ€ไป‹
      • 3. DxChain 3.0่ต‹่ƒฝ็š„็”Ÿๆ€็ณป็ปŸ
      • 4. ๆŠ€ๆœฏ็š„่ฎพ่ฎกๅŽŸ็†ไธŽๆžถๆž„
        • 4.1 ๅ…จ้ขๅ…ผๅฎนEVM
        • 4.2 DPOSๅ…ฑ่ฏ†ๆœบๅˆถ
        • 4.3 ่ทจ้“พ
        • 4.4 ๆŽฅๅฃๅฑ‚
        • 4.5 ไธฅๆ ผ็š„้ป‘ๅๅ•็ฎก็†
        • 4.6 P2Pๅˆ†ๅธƒๅผ็ฝ‘็ปœๅฑ‚
        • 4.7 MPT + LevelDB
        • 4.8 ๆคญๅœ†ๆ›ฒ็บฟๆ•ฐๅญ—็ญพๅ็ฎ—ๆณ•
      • 5. ็ปๆตŽ็ณป็ปŸ
      • 6. ็คพๅŒบๆฒป็†
      • 7. ๅœจ็คพไบคๅช’ไฝ“ไธŠไธŽๆˆ‘ไปฌไบ’ๅŠจ
      • 8. ๅ‚่€ƒๆ–‡็Œฎ
      • 9. ้ฃŽ้™ฉๆ็คบ
      • ๅ…่ดฃๅฃฐๆ˜Ž
    • โ›“๏ธ้‡่ฆ้“พๆŽฅ
    • ๐Ÿ’ปๅผ€ๅ‘่€…ๆ–‡ๆกฃ
      • ๅ…ณไบŽDxChain 3.0
      • ้’ฑๅŒ…
      • ๅ…ฑ่ฏ†
      • ๅˆ›ไธ–ๅ—
      • ๅผ€ๅ‘่€…
        • ็ผ–่ฏ‘ๅ’Œ่ฟ่กŒ
        • ้“พไธŠไบคไบ’
          • DPoS API
        • ๆ™บ่ƒฝๅˆ็บฆ
        • ็ง้“พๆญๅปบ
        • ไธป็ฝ‘
        • ๆต‹่ฏ•็ฝ‘
      • ๅ‚ไธŽๅŒบๅ—้ชŒ่ฏ
      • ๅ‚ๆ•ฐ่กจ
    • ๐Ÿ’Žใ€ŒDX V3ๅŽปไธญๅฟƒๅŒ–่ดจๆŠผใ€
      • ่ดจๆŠผๆŠ•็ฅจ
        • 1๏ผ‰่ฟžๆŽฅ้’ฑๅŒ…
        • 2๏ผ‰่ฟ›่กŒๆŠ•็ฅจ
          • ๅฏ่ƒฝๅ‡บ็Žฐ็š„้—ฎ้ข˜
        • 3๏ผ‰้ข†ๅ–ๅฅ–ๅŠฑ
        • 4๏ผ‰ๅ–ๆถˆๆŠ•็ฅจ
      • ๆˆไธบ่Š‚็‚น
        • 1๏ผ‰้ƒจ็ฝฒ่Š‚็‚น
        • 2๏ผ‰็”ณ่ฏท่Š‚็‚น
        • 3๏ผ‰ๅŒๆ„่Š‚็‚น
        • 4๏ผ‰ๆˆไธบ่Š‚็‚น
        • 5๏ผ‰ๅ–ๆถˆ่Š‚็‚น
        • 6๏ผ‰ๆขๅค่Š‚็‚น
      • ๆต‹่ฏ•็Žฏๅขƒ
    • ๐Ÿ’Žใ€ŒDX V3ๆ‰˜็ฎก็คพๅŒบใ€
      • ๆ‰˜็ฎก็คพๅŒบFAQ
      • ็Ÿฟๆœบ่Š‚็‚น
        • 1๏ผ‰่ฟ›่กŒๆŠ•็ฅจ
        • 2๏ผ‰้ข†ๅ–ๅฅ–ๅŠฑ
        • 3๏ผ‰ๅ–ๆถˆๆŠ•็ฅจ
      • ่ถ…็บง่Š‚็‚น
        • 1๏ผ‰ๆˆไธบ่ถ…็บง่Š‚็‚น
        • 2๏ผ‰ไฟฎๆ”นๅฅ–ๅŠฑๆฏ”ไพ‹ๅ’Œ่ดจๆŠผๆ•ฐ
        • 3๏ผ‰ๆŸฅ็œ‹่Š‚็‚นๆ‰˜็ฎก่ดน็”จ
        • 4๏ผ‰ๆŸฅ็œ‹่Š‚็‚นๆ”ถ็›Š
        • 5๏ผ‰ๆขๅค/ๅ–ๆถˆ่Š‚็‚น
    • ๐Ÿ’ก้ช†้ฉผๅฐ่ฏพๅ ‚
      • ๐Ÿช™USDTๆ˜ฏไป€ไนˆ๏ผŸ
      • ๐Ÿช™ไป€ไนˆๆ˜ฏๅธๅธไบคๆ˜“๏ผŸ
      • ๐Ÿช™ๅฆ‚ไฝ•ๆ”ฏไป˜่Š‚็‚นๆ‰˜็ฎก่ดน็”จ๏ผŸ
      • ๐Ÿ’ฌๅฆ‚ไฝ•ๅŠ ๅ…ฅDxChainๅ…จ็ƒ็คพๅŒบ
      • ๐ŸŒ‰ใ€่ทจ้“พๆกฅใ€‘่ฟ›่กŒไบ†่ทจ้“พไบคๆ˜“ไฝ†ไธๅˆฐ่ดฆ
      • ๐Ÿ“ฑDxChain3.0ๆต‹่ฏ•ๆ•™็จ‹
      • ๐ŸงฌๅŒบๅ—้“พ็š„ๅ…ฑ่ฏ†ๆœบๅˆถ
      • ๐Ÿ”็ง้’ฅ/ๅŠฉ่ฎฐ่ฏๆ˜ฏไป€ไนˆ
      • ๐ŸŒ‰ไป€ไนˆๆ˜ฏๅŒบๅ—้“พ็š„่ทจ้“พๆŠ€ๆœฏ
    • ๐Ÿชง็คพๅŒบๅธƒๅ‘Š
      • ่Š‚็‚นๆ‰˜็ฎกๆ”ถ่ดน็ป†ๅˆ™
      • DxChain V3่Š‚็‚นๅ…ฌๅ‘Š
      • ใ€Œๆ็Žฐ็™ฝๅๅ•ใ€ๅŠŸ่ƒฝไธŠ็บฟๅ…ฌๅ‘Š
      • DXๅ…ณไบŽ็ƒญ้’ฑๅŒ…ไฝฟ็”จๅฎ‰ๅ…จ็š„ๅ…ฌๅ‘Š
      • DXๅ…ณไบŽCoinbase้’ฑๅŒ…ๆ”ฏๆŒDX-ERC20็š„ๅ…ฌๅ‘Š
Powered by GitBook
On this page

Was this helpful?

  1. The Basics
  2. DxChain V3 LitePaper
  3. 4. DxChain Design Principles & Architecture

4.6 P2P Decentralized Network Layer

Previous4.5 Blacklist ManagementNext4.7 MPT + LevelDB

Last updated 3 years ago

Was this helpful?

P2P network technology is commonly used in blockchain to connect and propagate information between nodes. Essentially, a P2P network is an overlay network usually built on the Internet and can be viewed as a directed graph from a mathematical point of view, each computer is a peer node in the network. As shown in figure 8, there should be at least one path between all peers to achieve a network connection in an ideal situation. Since each peer has an incomplete view of the whole network topology and other peers, an intermediate node is required to forward the message to the correct peer. This connectivity ensures resilience even if the peer node changes. For each peer node, the connectivity of the graph is reflected by the adjacency to other peers. Adjacent peers may hold incorrect information when peer nodes join or leave the network. Therefore, overlay maintenance mechanisms are required to keep adjacency information updated so that all nodes will remain connectivity.

DxChain uses Kademlia to implement the peer discovery protocol (RLPx Node Discovery Protocol). A number or enodeID is used to identify each node and locate values. Each peer has a data structure consisting of 256 distinct buckets, where bucket i stores information about 16 peers at a distance 2^(i-1) to 2^i from its own enode ID. To discover a new peer, the node on DxChain chooses itself as target x, find 16 nodes closest to the target x in the buckets, and ask them to return 16 nodes from their buckets โ€œcloserโ€ to the target x, resulting in up to 16x16 newly discovered nodes. The process will be repeated until no new nodes are found.

Similarly, when a node joins or leaves DxChain network, Kademlia can quickly perform network maintenance to ensure that all nodes connect with other nodes through the optimal path. After the connection of the peer node is established, the DxChain node exchanges blockchain information with other peers through encrypted and authenticated TCP connections, which include broadcasts of different types of transactions, broadcasts generated by blocks, and data synchronization between nodes, etc., to ensure that all nodes maintain the same set of blockchain ledger, so as to achieve the consistency of node information in the network.

๐Ÿ“
๐Ÿ“–
Figure 8: Directed Graph of P2P Network