[doc] deploying and using libbitcoin for setting up Bitcoin SON #527

Open
opened 2023-03-30 14:32:09 +00:00 by bobinson · 3 comments
bobinson commented 2023-03-30 14:32:09 +00:00 (Migrated from gitlab.com)

We have introduced libbitcoin and documentation updates is required.

cc @vampik

We have introduced libbitcoin and documentation updates is required. cc @vampik
bobinson commented 2023-03-30 14:32:09 +00:00 (Migrated from gitlab.com)

assigned to @Bharathi-Chandrasekaran

assigned to @Bharathi-Chandrasekaran
vampik commented 2023-03-30 15:48:01 +00:00 (Migrated from gitlab.com)

@hirunda Can you please provide the details for documentation for libbitcoin.

@hirunda Can you please provide the details for documentation for libbitcoin.
hirunda commented 2023-03-31 11:02:20 +00:00 (Migrated from gitlab.com)

Hi @vampik ,

We have downloaded database which already synced > 700 000 blocks. We did that because syncing libbitcoin server takes more than one week.

  1. We need to download libbitcoin database. @rilesdun already did that with the script which should do the job for us.

  2. In the configuration file for libbitcoin server bs.cfg we should set the line

`[database]
#The blockchain database directory, defaults to 'blockchain'.

directory = /home/hirunda/Desktop/libbitcoin-server/libbitcoin-server/build-libbitcoin-server/libbitcoin-server/console/blockchainto point on the downloaded database.

The name of database should be blockchain.

  1. The next step is to initialize libbitcoin server. Run the command: ./bs -c /path_to_config_file/bs.cfg -i

  2. After initialization is done, we should run libbitcoin server with the following command: ./bs -c /path_to_config_file

  3. Sync should start. It will take one day to capture remaining diff from 700 000 until the current bitocoin block

  4. Server should not be terminated ever. It could with CTRL + C, but it might happen that termination will end up in dead loop which will result in database corruption so steps 1) - 5) should be repeated. During my research I found that CTRL + C will not end up with dead loop if we set manually peers in configuration file.
    For example:

outbound_connections = 0

peer = 194.182.162.2:8333

The available nodes could be found on the : https://bitnodes.io/

  1. Within peerplays the transaction and block events will be triggered once the server is already synced.

  2. Please note that libbitcoin server only works with P2SH_WSH. So it doesn't support P2WSH address format.

  3. In witness node configuration file if server is not running on the localhost it should be set:

`libbitcoin-server-ip = 10.11.12.204``

  1. If for some reason we don't want to use libbitcoin server and instead we want to switch to legacy bitcoind it could be configured in peerplays config file as following:
    use-bitcoind-client = true
Hi @vampik , We have downloaded database which already synced > 700 000 blocks. We did that because syncing libbitcoin server takes more than one week. 1) We need to download libbitcoin database. @rilesdun already did that with the script which should do the job for us. 2) In the configuration file for libbitcoin server `bs.cfg` we should set the line `[database] #The blockchain database directory, defaults to 'blockchain'. directory = /home/hirunda/Desktop/libbitcoin-server/libbitcoin-server/build-libbitcoin-server/libbitcoin-server/console/blockchain` to point on the downloaded database. ` The name of database should be `blockchain`. 3) The next step is to initialize libbitcoin server. Run the command: `./bs -c /path_to_config_file/bs.cfg -i` 4) After initialization is done, we should run libbitcoin server with the following command: `./bs -c /path_to_config_file` 5) Sync should start. It will take one day to capture remaining diff from 700 000 until the current bitocoin block 6) Server should not be terminated ever. It could with CTRL + C, but it might happen that termination will end up in dead loop which will result in database corruption so steps 1) - 5) should be repeated. During my research I found that CTRL + C will not end up with dead loop if we set manually peers in configuration file. For example: `outbound_connections = 0` `peer = 194.182.162.2:8333` The available nodes could be found on the : https://bitnodes.io/ 7) Within peerplays the transaction and block events will be triggered once the server is already synced. 8) Please note that libbitcoin server only works with `P2SH_WSH`. So it doesn't support `P2WSH` address format. 9) In witness node configuration file if server is not running on the localhost it should be set: `libbitcoin-server-ip = 10.11.12.204`` 10) If for some reason we don't want to use libbitcoin server and instead we want to switch to legacy bitcoind it could be configured in peerplays config file as following: `use-bitcoind-client = true`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#527
No description provided.