BAP-2: The first UTXO-based asset standard

Desktop-b6b49804ded5ad89ba2fa6f84cf76521

Bytomd 1.0.9 was released on April 22, 2019, compared to the original team, the most important of which was the "Bytom Asset Protocol". BAP-2 clearly displays asset-related information through the structural closure of Key-Value, which helps all developers use asset-related content in browser and mobile application development.

1 , the meaning of the standard

Standards are of great importance to the development of all industries. In the Internet age, the TCP/IP standard contributed to the Internet's prosperity, and in the blockchain world, the Ethereum ERC20 led to the prosperity of Token. The standard allows ecosystem participants to abide by a rule that is conducive to product compatibility and to the benign development of the industry.

2 , BMIP002

The BMIP002 is an improvement over the original chain proposal to standardize development standards over the original chain platform, including but not limited to core protocols, client apis, virtual machine specifications, and contract standards. This BAP (Bytom Assets Protocol) belongs to the BMIP002 improvement protocol, and technical enthusiasts from all communities are welcome to participate.

The BAP protocol defines the meaning of an asset: an asset is a value that can be published on a blockchain, where all units of a given asset are replaceable. This BAP defines homogeneous assets, that is, there is no difference between the assets per unit quantity. The simple analogy is the assets of the ERC20 standard. Each asset has a globally unique asset ID from the release program and asset definition.

The BAP protocol defines asset fields: these include asset names, asset symbols, and asset descriptions. The BAP protocol also provides a simple way to publish assets as follows:

13982762-c8eeab9267d34e73

Use this smart contract on the original chain to create an asset that meets BAP specifications. In addition, if you define that the asset is not allowed to be issued after a certain height, it becomes an asset of deflation type.

BMIP002 's document address: https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki

3, the advantages of BAP

Parallelism: Asset transactions based on BUTXO have good parallelism and can be sent to multiple different people simultaneously in a transaction, which is equivalent to sending multiple transactions at once. At the same time, through chain trading, multiple transactions can be packaged in one block to form a transaction chain, which cannot be completed by assets in an account model such as Ethereum.

Multi-asset: Contains a variety of different types of BAP2 assets in a single transaction than the original chain support, which can lead to various financial models, including contract swaps for different assets.

Security: UTXO for each BAP2 asset has its own smart contract guard. If a hacker attacks a smart contract and can only take away the assets locked in the smart contract, it cannot obtain all the same type of assets, so the asset security is more high.

4 , standard display

With the BAP2 standard, various ecological parties (such as wallets, exchanges, and application developers) can be docked according to the standard. The assets after docking can be seamlessly and conveniently distributed on various platforms, and the docking is very simple.

Blockmeta.com, the original block browser, has taken the lead in supporting the BAP2 standard and is showing it. Other partners in the community can design their own products based on Blockmeta. By judging the specified fields of the assets, it is screened whether the BAP2 standard is met and whether the assets of the BAP standard are displayed.

5, Bytomd1.0.9 other features

Trading scenario:

1. Save the index of all historical transactions and use when the "txindex" flag appears.

2. Add dust trading filter rules to filter the volume of dust output transactions;

Node selection and discovery:

1. Add the keep_dial option to automatically retry the connection to the provided node;

2. Add a custom node alias feature to support the name of the custom node by configuration;

3. Support mDNS LAN node discovery to reduce the network bandwidth required for communication;

Estimated handling fee:

1. Add weird transaction tests that may occur in multiple scenarios, such as insufficient fees, transaction imbalances, overflows, and signature failure tests;

2. Accurately estimate the gas charges for standard and issue asset transactions;

safety:

1. Add a timestamp as the random number generator seed number to ensure random number security;

Bytomd1.0.9 experience address https://github.com/Bytom/bytom/releases/tag/v1.0.9