FeaturesGuide
Bit
Window
SidechainsDownload →

How Bitcoin Core and the enforcer work in BitWindow

BitWindow runs Bitcoin Core, the BIP300/301 enforcer and its own daemon. See how they start and stop, the sync status and the daemon settings.

Last updated

BitWindow does not talk to the Bitcoin network directly. It starts three local programs that do the work: Bitcoin Core, the BIP300301 Enforcer and the BitWindow daemon. This chapter tells what each program does, how they start and stop, and which settings you can change.

The three programs

Program Name in the app What it does
Bitcoin Core Bitcoin Core daemon Downloads and keeps the blocks of the network.
BIP300301 Enforcer BIP300301 Enforcer daemon Manages the Drivechain rules (BIP300 and BIP301).
BitWindow daemon BitWindow daemon The backend of the app. It starts and stops the others.

The BitWindow daemon also starts the sidechains that you select. Read sidechains.

Full mode and light mode

You select the mode at the first start. To change it later, open Settings → Node mode and use the Full mode toggle.

  • Full mode runs Bitcoin Core and the enforcer locally. The app says that it uses about 1 TB of disk.
  • Light mode uses an Electrum Bitcoin wallet. On the eCash networks, the local sidechains use a remote enforcer.

When you change to light mode, BitWindow stops Bitcoin Core and the local enforcer. Your chain data stays on disk. When you change to full mode, BitWindow downloads Bitcoin Core and the enforcer, then syncs the chain. In both cases, no wallet and no key is deleted.

A wallet that uses Bitcoin Core cannot work in light mode. If your active wallet uses Bitcoin Core, change to an Electrum wallet first. If a network has no remote enforcer and no Bitcoin wallet server, the row Light mode is unavailable here shows.

How the programs start

When you open BitWindow, the app starts the BitWindow daemon. In full mode, the daemon then starts the other programs in this order:

  1. Bitcoin Core starts.
  2. The wallet loads.
  3. Bitcoin Core downloads the blocks.
  4. The enforcer starts and reads the blocks from Bitcoin Core.

How the programs stop

When you close the window or click Quit bitwindow, the window closes at once. The backend then stops Bitcoin Core, the enforcer and the sidechains in the background. Bitcoin Core can take some time to stop. The programs stop only when no app uses them.

The sync status

The bottom bar shows the status of all programs in one line, for example:

  • Downloading mainchain... or Downloading enforcer...
  • Syncing mainchain blocks
  • Syncing enforcer blocks
  • All binaries connected

The bottom bar also shows the time since the last block and the number of peers. Move the pointer onto the peer count to see the address of each peer.

The Daemon Status dialog

Click the status text in the bottom bar to open the Daemon Status dialog. It has one card for each program. Each card shows:

  • The status: connected, Initializing... or Not connected.
  • The sync step, for example Fetching mainchain headers or Syncing mainchain.
  • The number of Blocks and the number of blocks that are Verified.

Each card also has buttons:

  • Start or Stop: start or stop the program.
  • View logs: open the log of the program.
  • Update: shows when a newer version of the program is published.
  • The settings icon: open the settings of the program.

In light mode, the enforcer card shows the remote enforcer, and it has no Start or Stop button.

The settings of a program

The settings icon on a card opens a dialog with these tabs:

  • Overview: the version, the repository, the date of the latest release and of your install, and the SHA256 hash of the file. The tab compares the hash with the release server and shows Hashes match the release server. when they agree.
  • Paths: the installation directory, the data directory, the log path and the binary arguments.
  • Chain: only for Bitcoin Core. It shows the network, the Core height and the Enforcer height.

Reset to Block

On the Chain tab, you can move the node back to an earlier block.

  1. Type a height or a block hash.
  2. Click Reset to Block.

The node moves back to that block, then syncs forward to the tip again. The blocks stay on disk, so the node downloads nothing.

Wipe and reinstall

Wipe and reinstall deletes the program, its data and its wallets, then installs it again. Back up your seed phrase before you use it.

Daemon settings you can change

bitcoin.conf

Open Settings → Network → bitcoin.conf and click Edit. You can also click Open configurator in the settings of Bitcoin Core. The page Conf File Configurator opens.

  • Load a preset... gives three presets: Default, Performance and Storage Optimized.
  • Save writes the file.
  • Apply saves the file and restarts Bitcoin Core, so the changes take effect.
  • Reset removes your changes that are not saved.

The enforcer

Open the settings of the enforcer and click Open configurator. The page Enforcer Conf Configurator opens. The enforcer does not read a config file. BitWindow changes these settings to command-line arguments when the enforcer starts. The CLI Preview shows the arguments.

  • Load a preset... gives two presets: Default and Minimal.
  • If the node settings of the enforcer do not agree with Bitcoin Core, click Sync from Bitcoin Core.
  • Restart the enforcer after you save, so the changes take effect.

Settings → Network

Row What it does
Network The network this node connects to.
Data directory Where Bitcoin Core writes chain data. Click Browse to change it.
bitcoin.conf Opens the configurator.
Build Which Bitcoin Core build runs.
UTXO snapshot Loads a snapshot, so the node does not download the old history.
Esplora server The server that an Electrum wallet reads from and sends to.
Tor routing Hides your IP from the Esplora server and reaches .onion servers.

The builds are Bitcoin Patched, Bitcoin Core and Knots. The eCash networks use the eCash build. When you change the build, BitWindow stops Bitcoin Core, downloads the new build if necessary, and starts it again.

When you change the data directory, Bitcoin Core restarts. The new chain data goes to the folder that you selected.

The RPC console

You can send commands to the programs directly. Open the Console tab, or open This Node → Debug Window and the Console tab. The console knows these commands:

  • bitcoin-cli for Bitcoin Core
  • enforcer-cli for the enforcer
  • bitwindow-cli for the BitWindow daemon
  • drivechain-cli for the backend
  • A command for each sidechain, such as thunder-cli or bitnames-cli

The console fills in the command names that each program reports. Read more about the Debug Window in updates and troubleshooting.

The connection to the node

BitWindow writes and reads its own bitcoin.conf file. If you have your own bitcoin.conf file, BitWindow uses it. That file then controls the network and the data directory, and BitWindow does not change them. Read networks.

Questions

What is the BIP300301 Enforcer in BitWindow?

The enforcer is a program that manages the Drivechain rules, BIP300 and BIP301, next to Bitcoin Core. BitWindow downloads it and starts it after Bitcoin Core.

What is the difference between full mode and light mode?

Full mode runs Bitcoin Core and the enforcer on your computer and uses about 1 TB of disk. Light mode uses an Electrum Bitcoin wallet and, on eCash, a remote enforcer.

How do I see if Bitcoin Core is in sync?

Click the status text in the bottom bar. The Daemon Status dialog shows the blocks and the sync step of Bitcoin Core and of the enforcer.

How do I change the bitcoin.conf settings in BitWindow?

Open Settings → Network → bitcoin.conf and click Edit. Change the settings, then click Apply to save them and restart Bitcoin Core.

Where is the RPC console in BitWindow?

Open the Console tab, or open This Node → Debug Window and the Console tab. There you can type bitcoin-cli commands and commands for the other programs.