Bitcoin Dominance

FreeBSD Bitcoin - Setup Bitcoin Dominance (BTCD) Full Node With Go Lang


The term Bitcoin Dominance (BTCD) itself refers to the ratio of Bitcoin's market capitalization to the total market capitalization of all other cryptocurrencies (altcoins). If the BTCD figure increases, it means that BTC's share of the crypto market is also increasing. However, if it falls, then the advantage of the largest crypto asset is also decreasing.

Bitcoin Dominance can increase in two ways. First, the price of BTC can soar faster than other altcoins. Such a situation often occurs during rapid recovery actions in the crypto market, precisely when large capital first flows into the Bitcoin market.

Second, the price of BTC can fall more slowly than the price of altcoins. This often happens during long-term bear market periods, namely when the riskier altcoin group experiences a much greater outflow of capital than the relatively stable Bitcoin.

Conversely, if Bitcoin Dominance falls, it means that Bitcoin is experiencing slower growth than other, younger crypto assets. In theory, there is also a chance that the price of BTC falls and the altcoin market rises. However, this condition is very rare and usually only involves individual altcoins.

FreeBSD Bitcoin

 

1. Btcd installation

Since Btcd is written in Go, the main requirement to install Btcd is that you must first install Go on your FreeBSD server. For those of you who are used to installing Bitcoin core, it will definitely be very easy to install Btcd. Even though there are many feature abstractions, the configuration process is almost the same as Bitcoin Core. Btcd also has an RPC interface that is compatible with Bitcoin core. Apart from the wallet and blockchain features, everything is almost the same as Bitcoin core.

FreeBSD does not provide a PKG package or port system for Btcd, you have to download it from the official Btcd repository on Github. Follow the instructions below to start Btcd configuration.

root@ns7:~ # cd /usr/local/etc
root@ns7:/usr/local/etc # git clone https://github.com/btcsuite/btcd.git
root@ns7:/usr/local/etc # cd btcd
root@ns7:/usr/local/etc/btcd #

After that, you run the following command to update the Btcd application, all dependencies, and then install it on the FreeBSD FreeBSD server.

root@ns7:/usr/local/etc/btcd # mkdir -p bin
root@ns7:/usr/local/etc/btcd # git pull

Already up to date.
root@ns7:/usr/local/etc/btcd # go install -v . ./cmd/...

The above install command will create a bin executable file. On FreeBSD the location of the Btcd bin file is /root/go/bin. It's up to you whether you want to move the bin file or not. We recommend moving the file to the Btcd folder.  

root@ns7:/usr/local/etc/btcd # mv /root/go/bin/* /usr/local/etc/btcd/bin

 

2. Btcd Configuration

Because Btcd and Bitcoin core are in the same family, the configuration method is almost the same. In FreeBSD the location of the Btcd data file is "/root/.btcd". Copy the "/usr/local/etc/btcd/sample-btcd.conf" file, to the "/root/.btcd" folder. Follow these commands to copy it.

root@ns7:/usr/local/etc/btcd # mkdir -p /root/.btcd
root@ns7:/usr/local/etc/btcd # mkdir -p /root/.btcd/data
root@ns7:/usr/local/etc/btcd # cp /usr/local/etc/btcd/sample-btcd.conf /root/.btcd/btcd.conf

The command above is used to create a .btcd folder and copy and rename the sample-btcd.conf file to btcd.conf.

To better understand how to configure Btcd, run the command btcd -help to see where we will place our configuration options.

 

root@ns7:/usr/local/etc/btcd # cd bin
root@ns7:/usr/local/etc/btcd/bin # ./btcd -h
Usage:
  btcd [OPTIONS]

Application Options:
      --addcheckpoint=        Add a custom checkpoint.  Format: '<height>:<hash>'
  -a, --addpeer=              Add a peer to connect with at startup
      --addrindex             Maintain a full address-based transaction index which makes the searchrawtransactions RPC available
      --agentblacklist=       A comma separated list of user-agent substrings which will cause btcd to reject any peers whose user-agent contains any of the blacklisted
                              substrings.
      --agentwhitelist=       A comma separated list of user-agent substrings which will cause btcd to require all peers' user-agents to contain one of the whitelisted
                              substrings. The blacklist is applied before the blacklist, and an empty whitelist will allow all agents that do not fail the blacklist.
      --banduration=          How long to ban misbehaving peers.  Valid time units are {s, m, h}.  Minimum 1 second (default: 24h0m0s)
      --banthreshold=         Maximum allowed ban score before disconnecting and banning misbehaving peers. (default: 100)
      --blockmaxsize=         Maximum block size in bytes to be used when creating a block (default: 750000)
      --blockminsize=         Minimum block size in bytes to be used when creating a block
      --blockmaxweight=       Maximum block weight to be used when creating a block (default: 3000000)
      --blockminweight=       Minimum block weight to be used when creating a block
      --blockprioritysize=    Size in bytes for high-priority/low-fee transactions when creating a block (default: 50000)
      --blocksonly            Do not accept transactions from remote peers.
  -C, --configfile=           Path to configuration file (default: /root/.btcd/btcd.conf)
      --connect=              Connect only to the specified peers at startup
      --cpuprofile=           Write CPU profile to the specified file
      --memprofile=           Write memory profile to the specified file
  -b, --datadir=              Directory to store data (default: /root/.btcd/data)
      --dbtype=               Database backend to use for the Block Chain (default: ffldb)
  -d, --debuglevel=           Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,...
                              to set the log level for individual subsystems -- Use show to list available subsystems (default: info)
      --dropaddrindex         Deletes the address-based transaction index from the database on start up and then exits.
      --dropcfindex           Deletes the index used for committed filtering (CF) support from the database on start up and then exits.
      --droptxindex           Deletes the hash-based transaction index from the database on start up and then exits.
      --externalip=           Add an ip to the list of local addresses we claim to listen on to peers
      --generate              Generate (mine) bitcoins using the CPU
      --limitfreerelay=       Limit relay of transactions with no transaction fee to the given amount in thousands of bytes per minute (default: 15)
      --listen=               Add an interface/port to listen for connections (default all interfaces port: 8333, testnet: 18333)
      --logdir=               Directory to log output. (default: /root/.btcd/logs)
      --maxorphantx=          Max number of orphan transactions to keep in memory (default: 100)
      --maxpeers=             Max number of inbound and outbound peers (default: 125)
      --miningaddr=           Add the specified payment address to the list of addresses to use for generated blocks -- At least one address is required if the generate option
                              is set
      --minrelaytxfee=        The minimum transaction fee in BTC/kB to be considered a non-zero fee. (default: 1e-05)
      --nobanning             Disable banning of misbehaving peers
      --nocfilters            Disable committed filtering (CF) support
      --nocheckpoints         Disable built-in checkpoints.  Don't do this unless you know what you're doing.
      --nodnsseed             Disable DNS seeding for peers
      --nolisten              Disable listening for incoming connections -- NOTE: Listening is automatically disabled if the --connect or --proxy options are used without also
                              specifying listen interfaces via --listen
      --noonion               Disable connecting to tor hidden services
      --nopeerbloomfilters    Disable bloom filtering support
      --norelaypriority       Do not require free or low-fee transactions to have high priority for relaying
      --nowinservice          Do not start as a background service on Windows -- NOTE: This flag only works on the command line, not in the config file
      --norpc                 Disable built-in RPC server -- NOTE: The RPC server is disabled by default if no rpcuser/rpcpass or rpclimituser/rpclimitpass is specified
      --nostalldetect         Disables the stall handler system for each peer, useful in simnet/regtest integration tests frameworks
      --notls                 Disable TLS for the RPC server -- NOTE: This is only allowed if the RPC server is bound to localhost
      --onion=                Connect to tor hidden services via SOCKS5 proxy (eg. 127.0.0.1:9050)
      --onionpass=            Password for onion proxy server
      --onionuser=            Username for onion proxy server
      --profile=              Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536
      --proxy=                Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)
      --proxypass=            Password for proxy server
      --proxyuser=            Username for proxy server
      --prune=                Prune already validated blocks from the database. Must specify a target size in MiB (minimum value of 1536, default value of 0 will disable
                              pruning)
      --regtest               Use the regression test network
      --rejectnonstd          Reject non-standard transactions regardless of the default settings for the active network.
      --rejectreplacement     Reject transactions that attempt to replace existing transactions within the mempool through the Replace-By-Fee (RBF) signaling policy.
      --relaynonstd           Relay non-standard transactions regardless of the default settings for the active network.
      --rpccert=              File containing the certificate file (default: /root/.btcd/rpc.cert)
      --rpckey=               File containing the certificate key (default: /root/.btcd/rpc.key)
      --rpclimitpass=         Password for limited RPC connections
      --rpclimituser=         Username for limited RPC connections
      --rpclisten=            Add an interface/port to listen for RPC connections (default port: 8334, testnet: 18334)
      --rpcmaxclients=        Max number of RPC clients for standard connections (default: 10)
      --rpcmaxconcurrentreqs= Max number of concurrent RPC requests that may be processed concurrently (default: 20)
      --rpcmaxwebsockets=     Max number of RPC websocket connections (default: 25)
      --rpcquirks             Mirror some JSON-RPC quirks of Bitcoin Core -- NOTE: Discouraged unless interoperability issues need to be worked around
  -P, --rpcpass=              Password for RPC connections
  -u, --rpcuser=              Username for RPC connections
      --sigcachemaxsize=      The maximum number of entries in the signature verification cache (default: 100000)
      --simnet                Use the simulation test network
      --signet                Use the signet test network
      --signetchallenge=      Connect to a custom signet network defined by this challenge instead of using the global default signet test network -- Can be specified multiple
                              times
      --signetseednode=       Specify a seed node for the signet network instead of using the global default signet network seed nodes
      --testnet               Use the test network
      --torisolation          Enable Tor stream isolation by randomizing user credentials for each connection.
      --trickleinterval=      Minimum time between attempts to send new inventory to a connected peer (default: 10s)
      --utxocachemaxsize=     The maximum size in MiB of the UTXO cache (default: 250)
      --txindex               Maintain a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC
      --uacomment=            Comment to add to the user agent -- See BIP 14 for more information.
      --upnp                  Use UPnP to map our listening port outside of NAT
  -V, --version               Display version information and exit
      --whitelist=            Add an IP network or IP that will not be banned. (eg. 192.168.1.0/24 or ::1)

Help Options:
  -h, --help                  Show this help message

 

Now we continue by editing the btcd.conf file. Adjust the configuration to your computer equipment and FreeBSD server specifications.

After everything is configured, run Btcd with the command "./btcd"

root@ns7:/usr/local/etc/btcd/bin # ./btcd --configfile=/root/.btcd/btcd.conf
2024-01-11 17:21:32.586 [INF] BTCD: RPC service is disabled
2024-01-11 17:21:32.586 [INF] BTCD: Version 0.24.0-beta
2024-01-11 17:21:32.586 [INF] BTCD: Loading block database from '/root/.btcd/data/mainnet/blocks_ffldb'
2024-01-11 17:21:32.647 [INF] BTCD: Block database loaded
2024-01-11 17:21:32.673 [INF] INDX: Committed filter index is enabled
2024-01-11 17:21:32.673 [INF] CHAN: Pre-alloacting for 251 MiB:
2024-01-11 17:21:32.805 [INF] INDX: Catching up indexes from height -1 to 0
2024-01-11 17:21:32.805 [INF] INDX: Indexes caught up to height 0
2024-01-11 17:21:32.805 [INF] CHAN: Chain state (height 0, hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, totaltx 1, work 4295032833)
2024-01-11 17:21:32.806 [INF] AMGR: Loaded 0 addresses from file '/root/.btcd/data/mainnet/peers.json'
2024-01-11 17:21:32.806 [INF] CMGR: Server listening on [::]:8333
2024-01-11 17:21:32.807 [INF] CMGR: Server listening on 0.0.0.0:8333
2024-01-11 17:21:33.065 [INF] CMGR: 40 addresses found from DNS seed seed.bitnodes.io
2024-01-11 17:21:33.178 [INF] CMGR: 37 addresses found from DNS seed seed.bitcoinstats.com
2024-01-11 17:21:33.345 [INF] CMGR: 37 addresses found from DNS seed seed.btc.petertodd.net
2024-01-11 17:21:33.480 [INF] CMGR: 37 addresses found from DNS seed seed.bitcoin.jonasschnelli.ch
2024-01-11 17:21:34.456 [INF] CMGR: 39 addresses found from DNS seed seed.bitcoin.sipa.be
2024-01-11 17:21:34.643 [INF] CMGR: 31 addresses found from DNS seed dnsseed.bluematt.me
2024-01-11 17:21:37.933 [INF] SYNC: New valid peer 155.137.251.136:8333 (outbound) (/Satoshi:25.0.0/)
2024-01-11 17:21:37.933 [INF] SYNC: Syncing to block height 825278 from peer 155.137.251.136:8333
2024-01-11 17:21:37.933 [INF] SYNC: Downloading headers for blocks 1 to 11111 from peer 155.137.251.136:8333
2024-01-11 17:21:38.174 [INF] SYNC: New valid peer 93.176.165.238:8333 (outbound) (/Satoshi:25.0.0/)
2024-01-11 17:21:38.196 [INF] SYNC: New valid peer 89.149.200.202:8333 (outbound) (/Satoshi:24.0.1/)
2024-01-11 17:21:38.217 [INF] SYNC: New valid peer 81.106.103.172:8333 (outbound) (/Satoshi:25.1.0/)
2024-01-11 17:21:38.245 [INF] SYNC: New valid peer 65.21.199.219:8333 (outbound) (/Satoshi:24.0.1/)
2024-01-11 17:21:38.530 [INF] SYNC: Verified downloaded block header against checkpoint at height 11111/hash 0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d
2024-01-11 17:21:38.530 [INF] SYNC: Received 11111 block headers: Fetching blocks
2024-01-11 17:21:38.641 [INF] SYNC: Lost peer 81.106.103.172:8333 (outbound)
2024-01-11 17:21:39.161 [INF] SYNC: New valid peer 131.188.40.47:8333 (outbound) (/Satoshi:26.0.0/)
2024-01-11 17:21:39.169 [INF] SYNC: Lost peer 89.149.200.202:8333 (outbound)
2024-01-11 17:21:42.374 [INF] CHAN: Verified checkpoint at height 11111/block 0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d
2024-01-11 17:21:42.374 [INF] SYNC: Downloading headers for blocks 11112 to 33333 from peer 155.137.251.136:8333
2024-01-11 17:21:42.891 [INF] CMGR: 1 addresses found from DNS seed dnsseed.bitcoin.dashjr.org
2024-01-11 17:21:43.222 [INF] SYNC: Verified downloaded block header against checkpoint at height 33333/hash 000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6
2024-01-11 17:21:43.222 [INF] SYNC: Received 22222 block headers: Fetching blocks
^C2024-01-11 17:21:43.577 [INF] BTCD: Received signal (interrupt).  Shutting down...
2024-01-11 17:21:43.578 [INF] BTCD: Gracefully shutting down the server...
2024-01-11 17:21:43.578 [WRN] SRVR: Server shutting down
2024-01-11 17:21:43.578 [INF] SYNC: Lost peer 155.137.251.136:8333 (outbound)
2024-01-11 17:21:43.578 [INF] SYNC: Sync manager shutting down
2024-01-11 17:21:43.581 [INF] SYNC: Syncing to block height 825279 from peer 65.21.199.219:8333
2024-01-11 17:21:43.581 [INF] SYNC: Downloading headers for blocks 11112 to 33333 from peer 65.21.199.219:8333
2024-01-11 17:21:43.581 [INF] CHAN: Flushing UTXO cache of 98 MiB with 10594 entries to disk. For large sizes, this can take up to several minutes...

The sync process may take 3-4 days, depending on your internet connection and machine specifications. But you can start testing the blockchain data beforehand while it is synchronizing. Use bitcoin testnet by adding the --testnet flag to btcd. This way you can easily test transactions with testnet coins.

 

 

  b518dc0f000b5419a6ef83ff1f2c702da04e39c643298e0a155ffe2b6c05bb78.jpg  

The FreeBSD Handbook - System Administrator

## Table Of Content ##
1. FreeBSD Getting Started Guide
2. PKG and Ports For Managing Software
3. Working with Files and Directories
4. Managing Users And Groups
5. Updating and Building the Kernel
6. Monitor Server Performance

Read Ebook

 

Author:

Linux BSD Blockchain - publish0x

 

How do you rate this article?

4


BSD Blockchain
BSD Blockchain

https://unixwinbsd.site


Linux BSD Blockchain
Linux BSD Blockchain

Opensource Blog (FreeBSD, Linux, OpenBSD) For Blockchain Network

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.