The BCH community is abuzz these days, and new sparks are coming out of the discussion. This weekend, there’s a new application in BCH Ecology, Bitcoin Files Protocol (BFP). BFP is an open source project, Created by Simple Ledger Protocol (SLP) developers James Cramer, Ryan X. Charles, Mark B. Lundeberg, Calin Culianu, Jonald Fyookball, And BCH developer Unwriter. It allows you to upload small files (< 5KB) to the Bitcoin Cash blockchain and download them. The reason for this is the lack of a reliable service for uploading anonymous files to the Web and a good free API. Now all reliable cloud storage services generally do not allow uploads without logging in or having an API key. These services are centralized and can be vetted at will. So the BFP development team launched the program to address these issues. The original purpose of this protocol was to simplify the uploading of JSON documents that might be associated with specific SLP tokens in GENESIS transactions for tokens. BFP is a different protocol from SLP Token, but it is designed to link file blocks and metadata together through multiple transactions using daGs, so it is similar to SLP Token. Upload file Files are uploaded to the blockchain as a series of file blocks encapsulated in an OP_RETURN message located at vout=0(the first output). File blocks refer to each other, using the vout=1 output as a pointer to the location of the next data block. The file can be shared with anyone simply by sharing the transaction ID of the last block to which the file was uploaded, which also contains optional file metadata. The following figure shows an example of a multi-part file upload using this protocol:

In the uploaded file data block series, the transaction ID of the last transaction is the handle to the file. The last transaction contains a special set of optional file metadata parameters, most importantly the number of blocks that need to be associated with the file in order to know how many data blocks to download. For example: Create an initial financing transaction (as shown above) to cover the cost of all subsequent transactions. The reason for this is that all transactions can be signed one by one, and then all signed transactions can be committed to the network in batches. This also reduces the total cost of file uploads, since transactions per file block have only 1 input. Download file At this point the file is located in the blockchain and the file is downloaded using the transaction ID of the file metadata OP_RETURN message. Content in order to download the complete files, software only need according to the following steps: 1, download file metadata transaction 2, parsing is located in the transaction of the first output (i.e. vout: 0) metadata OP_RETURN 3, if there is only one piece of news, and the metadata in the message provides a block, then the process is completed. 4. If there are more blocks to download, use the transaction ID specified in vin:0 to find the next block and repeat the process until all blocks have been downloaded. Validation should be performed at each step to ensure compliance with the protocol rules. 5. Parse pure data blocks using the “Chunk Transaction OP_RETURN” format specified above. 6. Rebuild the file block using the first signed = first block rule. The protocol has been built into the latest Electron Cash SLP wallet codebase. Its developer, James Cramer, also published an article on the social media platform Yours.org with a simple example of how BFP can be used.

The launch of BFP adds new functions to the application of BCH. The emergence of more and more applications will enrich the BCH ecosystem and drive adoption. For BCH, strengthening adoption should be an important task at this stage. The BCH community welcomes developers to create more fun and useful applications. And developers can show off their talents by participating in the BCH DEVCON hackathon.