Bitcoin Finance Network - Start Building

BTF offers the world’s mostpowerful suite of institutional crypto tradingsolutions.






Bitcoin Finance(BTF) Network Builders

BTF Bitcoin Finance is a new chain based on the fork of the BTC blockchain network. It is not fundamentally different from BTC.
Bitcoin Finance Network's token protocol can support a variety of projects, and you can easily launch your own token project.
It will challenge previous blockchain asset accounting and transactions in terms of transparency and scalability in storing and
managing tokens on the blockchain. Based on WEB3 technology, the interaction between the digital world and the physical world is
further enhanced, including computing servers, storage, energy networks, geospatial data, etc.

This development document is pulled from the official Bitcoin document(https://github.com/bitcoin-dot-org/)
For more detail information,
visit developer.bitcoin.org(https://github.com/bitcoin-dot-org/developer.bitcoin.org).

If there is any incorrect information in this document, please email us. Thank you for your correction.

About BTF Foundation:
BTF Foundation https://www.btf.finance/future.html


Dynamic CBlock (BTFI-DCR) Last valid block

Due to the surge in popularity of the Bitcoin Finance (BTF) Network, the number of devices on the entire network has surged to more than 1 million devices[1].

[1]Data report from Pool on 2024/05/01:
ccminer/cgminer/cpuminer/Asics/FPGAs:
[ Bitforce ] 1,106,203 workers - https://www.bitforcepool.com
[ IEpool ] >200,000 workers - https://www.iepool.com

BTFI-DCR is designed for avoid being attacks or version conflicting.
As 2024-5-1 51% attacks caused other unknown service providers or
node vendors to have a great impact on Satoshi-BTF (BitcoinFinance) Network,
we designed Dynamic CBlock Rechecker(BTFI-DCR) for Satoshi-BTF (BitcoinFinance) Network
in coinbase transactions and also this code will also ban illegal peers from P2P Network.

The latest valid block of the Bitcoin Finance (BTF) Network hard fork:

Block #236,861 (hash: 0000000000000393bca75c57ce7632ed64a9cdfb00b788a882d588957dc2d6c4 )
It means that over Block #236,861 should have Identifier of Dynamic CBlock Rechecker(BTFI-DCR)
in coinbase transactions.

BTF Network Identifier of Dynamic CBlock Rechecker(BTFI-DCR)



BTFI-DCR information is base on SHA256(openssl not hmac) of coinbase transactions in block.vin[0].cscript.
Pool Developers should add this function on your stratum protocol in coinbase transactions.
Also you should add openssl header in your C++/golang code.



#HEADERS
//BitcoinFinance(BTF) Network Btfi-DCR Headers
#include "iostream"
#include "string"
#include "openssl/sha.h"
#include "iomanip"
#include "string"
    
#FUNCTION
//Bitcoin Finance(BTF) Network Identifier of Dynamic CBlock Rechecker(BTFI-DCR)
std::string identifierDCR(const int inpHeight) {
    std::string numstr=std::to_string(inpHeight);
    std::string BtfiDcrKey;
    std::string input = numstr+BtfiDcrKey;
    SHA256_CTX sha256;
    SHA256_Init(&sha256);
    SHA256_Update(&sha256, input.c_str(), input.size());
 
    unsigned char hash[SHA256_DIGEST_LENGTH];
    SHA256_Final(hash, &sha256);
 
    std::stringstream ss;
    for (int i = 0; i < SHA256_DIGEST_LENGTH; ++i) {
        ss << std::hex << std::setw(2) << std::setfill('0') << (int)hash[i];
    }
    std::string start="<";
    std::string end=">";
    return start+(ss.str()).substr(0, 10)+end;
} 

//DynamicCblockRechecker in BitcoinFinance-core 
static bool DynamicCblockRechecker(const CBlock& block,const int inputHeight){
    std::string coinbaseString=HexStr(block.vtx[0]->vin[0].scriptSig.begin(),block.vtx[0]->vin[0].scriptSig.end());
    if (inputHeight<=236861){
         return true;
    }
    if (contains(hexToUtf8(coinbaseString),identifierDCR(inputHeight))){
        return true;
    }
    if(!(contains(hexToUtf8(coinbaseString),identifierDCR(inputHeight)))){
        return false;
    }
    
    return false;
}

#configure
./configure   -lssl -lcrypto -std=c++11;

Developers - Identifier of Dynamic CBlock Rechecker(BTFI-DCR):



If you are pool developers you should download SDK : https://www.btf.finance first,
and then send your Pool information for us ([email protected]) to get support.

Application conditions for mining pool developers:

- Active community of more than 2,000 members
- Operation team of no less than 10 developers
- Developers are proficient in BitcoinCore node code and Stratum V1/V2 protocols
If you meet the above requirements, please send
your mining pool information, team introduction, community link, and Twitter link
to the BTF Foundation ([email protected]), and we will review it as soon as possible.

Getting Started

The site aims to provide the information you need to understand the forked chain from bitcoin, BitcoinFinance(BTF) Network and start building BTF applications. To make the best use of this documentation, make sure you’re running a node.

For technical support, we recommend Bitcoin Stack Exchange. For errors or suggestions related to this documentation, please open an issue on `BTF_Foundation`_.

Acknowledgments

This documentation would not be possible without the many contributions to the Bitcoin project over the years from core developers and other people. A very special thanks, however, goes to `David Harding`_ who in 2014 helped lead the effort to compose and bring together a significant amount of the material found here. Also, to `Cornelius Schumacher`_ for envisioning new ways to extend the developer documentation that led to this site.