Xdag:pow + DAG

Source: Internet
Author: User
Tags pow truncated

Hello everyone, I am frozen, today is very fortunate to share with you xdag, thanks to Copitrak Academy's invitation!

Before the Institute has repeatedly invited to do about the Xdag project technical introduction, has not found the right time, today finally find the right time for the right place to share with you.

Friendly reminder!

Tonight's share is very dry, by default you have a deeper understanding of blockchain-related knowledge.

Let's start sharing.

First, the outline of the next Xdag project is introduced, and Xdag is a cryptographic currency based on the POW consensus algorithm and DAG technology. The Xdag project was developed by the Russian anonymous mathematician Daniel started around September 2017, January 5, 2018, the main network officially launched, February 2, 2018 Xdag code handover community, the community began to develop and maintain. The project has no ICO, no pre-dug, and is completely community driven.

The community is comprised of enthusiasts from all regions of the world, with 17 community developers, responsible for core code development, graphics miner software, wallet development, block browser, pool scripting tools, and a variety of gadget development.

Bitcoin pioneered the blockchain, known as the Blockchain 1.0 era, ethereum the concept of the global computer into reality, is considered to be the Blockchain 2.0 era, the current EOS will blockchain the technology to carry forward the vast majority, some people think it is the opening of the Blockchain 3.0 era.

Although the industry has evolved over the years, the blockchain-based blockchain technology itself faces many problems and is becoming more and more prominent as the scope of popularization expands. While many blockchain developers in the industry are trying to find a variety of technologies to solve the problems they are currently experiencing, there is no breakthrough in the current state of technology development.

At present, there are two main problems encountered in the following areas

1. Blockchain's own TPS bottleneck limits the performance of blockchain technology

2, Blockchain longer confirmation time also limits the extensive use of blockchain technology

In view of the above two issues, whether it is the EOS partial-centric solution, or currently in full swing of the fragmented technology, side-chain technology has some unresolved problems.

This situation indirectly indicates that the expansion based on blockchain itself will face great difficulties and challenges.

Is there any other way to break apart from the expansion of the blockchain? The answer is yes.

That's DAG technology!

DAG (Directed acyclic graph) is not a new technology, but a mathematical concept in the branch-graph theory of mathematics, as early as 1736, in computer technology is in computer science and technology has existed in the early days of a data storage structure. In theory, a DAG structure is more complex than a single-chain structure, but has better extensibility.

There are already some public links in the industry that are based on DAG data structures, but each public chain has different implementations and scenarios for the understanding of DAG technology.

This is the implementation of the Nano, the main idea is that each account has its own chain, the different accounts based on transactions in series together, thus forming a dag.

This is the Iota Dag look, the main idea is based on the different height and weight of the transaction to allow users to determine the effectiveness of the transaction.

This is the Hashgraph DAG appearance, the main idea is to use the modified gossip algorithm between nodes to form a sequence of time, thus constituting a dag.

This is the Byteball Dag, and his idea is to use the witness node to add a witness unit to each transaction to increase the weight on the branch to determine the main chain in the current DAG.

The above multiple DAG implementations do not have a good solution for de-centering, high TPS, and low acknowledgement time.

What makes the difference is that Xdag attempts to redesign the data structure at the bottom of the blockchain technology and adopt a different DAG composition, skillfully combining the POW consensus algorithm with DAG technology, and providing simultaneous transaction processing between different nodes. Increase TPS reduction confirmation time with guaranteed network security and fairness.

This figure shows a local dag composition in Xdag.

A means the wallet address block, TX represents the trade block, M represents the main block the POW produces, and w I name it the witness block. There has always been a feature in Xdag, that is, block = Trade = Address

The data structure of a chunk in Xdag is used to persist stored data, as shown in.

The block structure consists of 16 structures named Xdag_field, each of which is a struct, consisting of a struct and a union.

The transport_header is used to represent the serial number during transmission and is used to hold the address of the next block after receiving processing.

Type is a 64-bit field that represents the type of 16 fields in a block, which is divided into 16 parts, each part 4bit, which is half a byte, 4 bits can represent 16 types, so the type of this field represents a field corresponding to each 4 bits.

Time is used to indicate when a block is produced, in a format of 1/1024 seconds, in which a second is represented as 2^10. At the same time, the data exchange between nodes as the starting point of the request time range.

A hash is a truncated hash value of 24 bytes, usually a truncated hash of another chunk.

Amount is a quantity value in Cheato, used to record the number of Xdag, Cheato is the basic unit in Xdag, and 1 Xdag contains 2^32 Cheato.

The end_time is used to indicate the end point of the request time range when exchanging data between nodes.

Data is a 32-byte hash value

The blocks described above in Xdag are generated entirely by each node and each wallet itself and will not be interfered with, thereby guaranteeing the independence of the block processing on the basis of the design and laying the groundwork for the subsequent high TPS.

This diagram shows how Xdag uses internal blocks to simplify transaction status and the processing logic for chunk balances when building a dag. This inner block is only used during XDAG logic processing and does not persist storage.

Here is a simple Xdag transfer processing structure.

A for the address, M for the main block, and Tx1 as a transfer to the A2 address for the A1 address, w i name it the witness block.

A typical double-flower detection is presented.

Assuming that the A1 address has 10 XDAG,A1 wallet has been maliciously copied two copies, and initiated two transfers, a Tx1 from A1 to 5 Xdag to A2 address, the other Tx2 from A1 to 7 Xdag to A2 address. The two transfers total 12 xdag, exceeding the A1 address original 10 Xdag, is a typical double flower.

The logic of the Xdag detection is that when the nodes receive Tx1 and Tx2 at the same time, the W blocks generated by the nodes refer to Tx1 and Tx2, and according to the stable collation Tx2 are populated in the field with a lower order number when referenced by the W block, thus Tx2 precedence is processed, and Tx1 is later processed, This verifies that the cost of Tx1 is a double flower, which marks the transaction block that the hash value points to as a reject state in the inner block, and Tx1 the transaction block is always recorded in the Dag and is not deleted.

It shows a more complex double-flower detection.

Prerequisites and the previous, assuming that the A1 address has 10 xdag,a1 of the wallet has been maliciously copied two copies, at the same time initiated two transfers, a Tx1 from A1 transferred 5 Xdag to A2 address, the other Tx2 from A1 7 Xdag to A2 address. The two transfers total 12 xdag, exceeding the A1 address original 10 Xdag, is a typical double flower. But this situation has changed, that is, this person malicious use of technical means to connect the wallet to different nodes, so it will be different nodes between the double-flower detection.

The node receiving the TX1 transaction does not know the existence of the TX2 transaction at this time, and the node receiving the TX2 transaction also does not know the existence of the TX1 transaction, so this situation requires the data interaction between the nodes to detect.

At this time the POW consensus has a role, in the Xdag every 64 seconds to produce a main block, through the main block M1 ' M1 ' more difficult, to determine the M1 ' difficulty is higher, so M1 ' The referenced block TX2 takes precedence over the M1 ' referenced Tx1 when sorting, so that Tx1 is detected as a double flower, thus marking the trade block that the hash value points to as a deny state in the inner block, and Tx1 this trade block is always recorded in the Dag and is not deleted.

Xdag is a more comprehensive DAG structure that omits the wallet address blocks from the previous graphs for the sake of simplicity.

node represents different nodes, M represents the main block the POW digs, W marks the extra block, and I name it the witness block. TX is a trading block.

The different nodes receive their own trading blocks, and the behavior of splicing the transaction blocks into the DAG is less coupled, and the connection between the data interaction between nodes is established, so that the different nodes can absorb high concurrency to achieve high TPS.

At the same time every 64 seconds through the POW generated a main block, to the central public chain transaction confirmation time is also greatly shortened, generally in 1-2 minutes can be confirmed.

Xdag the future direction is not just to do a high TPS to the central public chain, but also plan to bring the anonymity of transactions and smart contracts, so that Xdag has a wider range of application scenarios than payment attributes.

Currently, the Android Wallet and iOS wallet in the Community development program have been released in beta, collecting feedback from the community and providing updated versions in a timely manner.

The light purse and the full-node wallet are still in the plan.

The implementation of the Golang version has started with basic development, and the C + + version is also being developed on the basis of related.

The Python version is used for teaching and introductory Xdag development, and now has Python's mining machine implementation.

At present, the Xdag community needs more contributors, and more people need help.

The way to help Xdag is to share communication xdag related knowledge, to discuss various proposals with the community, to report problems to the community, to help the community do local translation, to participate directly in the XDAG project development contribution code!

Thanks to all the developers who have helped and are now helping Xdag, they have

Daniel, Evgeniy, Frozen, Sgaragaghu, Trueserve, amazingMan2017, Ssyijiu, Solar, Wendy, Czslience, RUBENCM, KBS1

Thanks to all the miners, the pool and all the other contributors!

Have their selfless dedication to xdag such a project exists!

Https://jq.qq.com/?_wv=1027&k=5nOyPQ9 (two-dimensional Code automatic identification)

Can scan code to follow the public number to get the latest Xdag progress

The scan code joins the developer QQ Group, discusses the Xdag technical route together.

Thanks to Copitrak Research to provide such an opportunity to communicate with everyone!

What are the questions you can ask or talk about now?

Q&a:

Q1: Can the witness block elaborate that it is neither a trade nor an address?

A1: The witness block is generated by the node, and when the node has received a new block, the block is not connected to the DAG, but instead is joined to the DAG by the witness block generated by the node.

Q2: It looks like the sort rules inside the xdag are especially important for determining the double-flower trade, what are the collations?

A2: Sorting rules are more complex. It might take a moment to share it alone.

Related Keywords:
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.