BLOCd

BLOC daemon configuration file

Start BLOCd with a configuration file so you do not have to remember all the command line arguments. Almost all of the command line arguments can be defined through the configuration file. This is the first step to do if you wish to use the BLOCd API. You can also generate a configuration file using this service

BLOCd Arguments

BLOCd daemon configuration file & informations

BLOCd can accept settings through a configuration file and/or command line using command line arguments on this page. Once started with the correct configuration you will be able to use the BLOCd HTTP RPC API and/or BLOCd JSON RPC API but also the Command Line Options.

Download the file, place it next to BLOCd and start it like this: ./BLOCd --config-file=BLOC.conf




{API}
BLOC - DAEMON

BLOC integration

Make sure you follow this instructions before getting started with BLOC

BLOC integration process may differes from other cryptocurrencies. Firstly, the coin has three separate binaries:

 

 

We also support the following official client bindings:

 

 

Please click on each of the service you would like to use to see how does it work and how to implement BLOC into your application and/or website.



{API}
BLOC - DAEMON

BLOCd Command Line Arguments

Use the form below to generate a configuration file and start BLOCd

This section describes BLOCd daemon starting process with correct arguments enabling access to the BLOCd HTTP RPC API, the BLOCd JSON RPC API and BLOCd Command Inline Options

 

BLOCd can accept settings through a configuration file and/or command line: -config-file=BLOC.conf

 

Almost all of the command line options can be defined through the configuration file. If a parameter is defined in the config and was also indicated in the command line, two behaviors are possible:

 

  • If the parameter accepts one value only (e.g., rpc-bind-ip), the command line value will be used, since it has a higher priority
  • If the parameter accepts several values (e.g., add-priority-node), then command line and configuration file values will be merged
  • If some of the options are not defined in the config, the default values will be applied
  • By default config file's name is BLOC.conf, which is located in the binaries folder
  • You may adjust the destination to the file via --config-file option in the command line.

 

Note:

  • Config files, where used, now use JSON formatted files instead of INI
  • Config files will be automatically upgraded to JSON and overwritten on first use
  • Config file's path is relative to current working directory, not server root.

Make sure you visit this guide to get you started with BLOCd Arguments in no time to learn how to create your custom config file and launch BLOCd using it. Then you can use this page to browse the different BLOCd Command Line Argument available.

 

Once you have selected all your options, place the file next to BLOCd and start it like this:

 

Windows: : BLOCd.exe --config-file=myconfig.conf

Mac and Linux : ./BLOCd --config-file=myconfig.conf

 

You are now ready to use the BLOCd HTTP RPC API the BLOCd JSON RPC API and/or the BLOCd Command Inline Options



Implementation Notes

--help

  • Display the help message and configuration settings.

Example

./BLOCd --help

ScreenShot


Implementation Notes

--version

  • Output daemon version information

Example

./BLOCd --version

ScreenShot


Implementation Notes

--os-version

  • Output Operating System version information

Example

./BLOCd --os-version

ScreenShot


Implementation Notes

-c, --config-file <path>

  • Specify a configuration file to start BLOCd. This is much more simple to use if you have a particular configuration and you do not want to type all the arguments while launching BLOCd.

Example

./BLOCd --config-file=BLOC.conf

ScreenShot


Implementation Notes

--data-dir <path>

  • Specify another data directory than the original one set by BLOCd.
  • The data directory contains the blockchain files from BLOC.
  • Creating a new empty data directory will resynch the blockchain from 0.
  • (default:/home/test/.BLOC)

Example

./BLOCd --data-dir=/home/bloc/.MYFOLDER

ScreenShot


Implementation Notes

--log-file <path>

  • Specify another log file than the original one created by BLOCd named (BLOCd.log)
  • The specified log file will be created in the same folder where BLOCd was started

Example

./BLOCd --log-file=test.log

ScreenShot


Implementation Notes

--log-level

  • Specify another log file than the original one created by BLOCd with a level 2
  • There is 5 different level. The higher you choose, the more details you get.
  • Log level must be 0...5

Example

./BLOCd --log-level=2

ScreenShot


Implementation Notes

--no-console

  • Disable the BLOCd daemon console.
  • Can be usefull in case you do not want to allow anyone to run commands through the BLOCd daemon
  • As you can see on the screenshot, nothing happen when running the help command

Example

./BLOCd --no-console

ScreenShot


Implementation Notes

--enable-cors <domain>

  • Adds header 'Access-Control-Allow-Origin' to the RPC responses using the <domain>
  • Uses the value specified as the domain
  • Use * for all.

Example

./BLOCd --enable-cors=*
./BLOCd --enable-cors=yourdomain.com

ScreenShot


Implementation Notes

--enable-blockexplorer

  • To enable blockexplorer API access (like for getblocks, gettransactionpool, etc.)

Example

./BLOCd --enable-blockexplorer

ScreenShot


Implementation Notes

--print-genesis-tx

  • Prints genesis block tx hex to insert it to config and exits
  • Use this method if you like to fork BLOC to generate a new GENESIS_COINBASE_TX_HEX and create your own cryptocurrency
  • More details can be found in the CryptoNoteConfig.h

Example

./BLOCd --print-genesis-tx

ScreenShot


Implementation Notes

--genesis-block-reward-address <address>

  • Premine wallet address
  • Use this method combined with the next one if you like to generate a premine wallet into your new created cryptocurrency
  • More details can be found in the CryptoNoteConfig.h

Example

./BLOCd --print-genesis-tx --genesis-block-reward-address=abLoc9fgn3Lcirw7U6nthwTBgwoffUJajEHr3vtSb9nPPL91XWG1Brt5TNCKRZojEbCGhMdSSjpCQfiMnfGEzMQbfs25N6HC6JR

ScreenShot


Implementation Notes

--load-checkpoints <path>

  • Use builtin default checkpoints
  • Or use checkpoint csv file for faster initial blockchain sync
  • Specify a file <path> containing a CSV of Blockchain checkpoints for faster sync.
  • A value of default uses the built-in checkpoints.

Example

./BLOCd --load-checkpoints=checkpoints.csv


Implementation Notes

--fee-address <address>

  • This is a new feature implemented in BLOC v3.0
  • Read more about Nodes Fees
  • Sets the convenience charge <address> for light wallets that use the daemon
  • Make sure you combine this argument with --fee-amount

Example

./BLOCd --fee-address=abLoc9fgn3Lcirw7U6nthwTBgwoffUJajEHr3vtSb9nPPL91XWG1Brt5TNCKRZojEbCGhMdSSjpCQfiMnfGEzMQbfs25N6HC6JR --fee-amount=1

ScreenShot


Implementation Notes

--fee-amount #

  • This is a new feature implemented in BLOC v3.0
  • Read more about Nodes Fees
  • Sets fee amount for light wallets that use the daemon
  • Make sure you combine this argument with --fee-address
  • Remember BLOC is using Atomic Units
  • --fee-amount=1 means 0.0001 BLOC fees will be sent to the --fee-address specified
  • --fee-amount=1000 means 1 BLOC fees will be sent to the --fee-address specified

Example

./BLOCd --fee-address=abLoc9fgn3Lcirw7U6nthwTBgwoffUJajEHr3vtSb9nPPL91XWG1Brt5TNCKRZojEbCGhMdSSjpCQfiMnfGEzMQbfs25N6HC6JR --fee-amount=1

ScreenShot


Implementation Notes

--rpc-bind-ip <ip>

  • Interface for RPC service
  • Started by default on 127.0.0.1 when running ./BLOCd
  • If you want to use local only : 127.0.0.1
  • if you want to open to public : 0.0.0.0
  • More details about the BLOCd HTTP RPC API
  • More details about the BLOCd HTTP RPC API

Example

(Public)
./BLOCd --rpc-bind-ip=0.0.0.0

(Local)
./BLOCd --rpc-bind-ip=127.0.0.1

ScreenShot


Implementation Notes

--rpc-bind-port #

Example

./BLOCd --rpc-bind-port=10000

ScreenShot


Implementation Notes

--p2p-bind-ip <ip>

  • Interface for p2p network protocol
  • Started by default on 0.0.0.0 when running ./BLOCd
  • If you want to use local only : 127.0.0.1
  • if you want to open to public : 0.0.0.0
  • (default: 0.0.0.0)

Example

(Public)
./BLOCd --p2p-bind-ip=0.0.0.0

(Local)
./BLOCd --p2p-bind-ip=127.0.0.1

ScreenShot


Implementation Notes

--p2p-bind-port #

  • Port for p2p network protocol
  • Started by default on 2082 when running ./BLOCd
  • You can change this port here

Example

./BLOCd --p2p-bind-port=3000

ScreenShot


Implementation Notes

--p2p-external-port #

  • External TCP port for the P2P service (NAT port forward)
  • (default: 0)

Example

./BLOCd --p2p-external-port=5000

ScreenShot


Implementation Notes

--allow-local-ip

  • Allow the local IP to be added to the peer list, mostly in debug purposes

Example

./BLOCd --allow-local-ip

ScreenShot


Implementation Notes

--add-peer <ip:port>

  • Manually add a peer to the local peer list

Example

./BLOCd --add-peer=PEER.IP.ADDRESS


Implementation Notes

--add-priority-node <ip:port>

  • Manually add a peer to the local peer list and attempt to maintain a connection to it [ip:port]

Example

./BLOCd --add-priority-node=NODE.IP.ADDRESS


Implementation Notes

  • Manually add a peer to the local peer list ONLY attempt connections to it. [ip:port]
  • If this option is given the options add-priority-node and seed-node are ignored

Example

./BLOCd --add-exclusive-node=NODE.IP.ADDRESS


Implementation Notes

--seed-node <ip:port>

  • Connect to a node to retrieve the peer list and then disconnect

Example

./BLOCd --seed-node=NODE.IP.ADDRESS


Implementation Notes

--hide-my-port

  • Do not announce yourself as a peerlist candidate

Example

./BLOCd --hide-my-port


Implementation Notes

--db-threads #

  • Number of background threads used for compaction and flush
  • Default is 2

Example

./BLOCd --db-threads=2


Implementation Notes

--db-max-open-files #

  • Number of files that can be used by the database at one time
  • (default: 100)

Example

./BLOCd --db-max-open-files=100


Implementation Notes

--db-write-buffer-size #

  • Size of the database write buffer in megabytes (MB)
  • (default: 256)

Example

./BLOCd --db-write-buffer-size=256


Implementation Notes

--db-read-buffer-size #

  • Size of the database read cache in megabytes (MB)
  • (default: 10)

Example

./BLOCd --db-read-buffer-size=10


Implementation Notes

--dump-config

  • Prints the current configuration of BLOCd to the screen.

Example

./BLOCd --dump-config


Implementation Notes

--save-config <file>

  • Save the configuration to the specified file

Example

./BLOCd --save-config