Glittr
  • Introduction
  • Protocol Overview
  • Contract Primitives
    • MOAs - Mint Only Assets
    • MBAs - Mint and Burn Assets
      • Vaults
    • Spec Contracts
    • Oracle Commitments
  • Building on Glittr
    • Setup
    • Faucet
    • Glittr SDK
    • Glittr Transactions
    • Glittr Contracts
    • Installing Glittr Wallet
    • Local Development Guide
  • GLIP
  • Node
    • Run a Bitcoin Node
    • Run a Glittr Node
  • Examples & Guide
    • Creating Tokens
    • Contract Custody
    • Complex Tokens
    • Vesting and Freemint Contract
    • Wrapped BTC Contract
    • USD Contract
    • Oracle Implementation Guide
    • Glittr Output Structure
    • AMM Contract
  • API Reference
    • Getting Assets API
  • APP EXAMPLES
    • Freemint App (NextJS)
    • Freemint App (React + Vite)
    • NFT App (React + Vite)
Powered by GitBook
On this page
  • Getting bitcoind executables
  • Checking correct installation
  • Bitcoin Config for testnet4
  • Bitcoin Config for local development
  • Running the bitcoin node
  1. Node

Run a Bitcoin Node

PreviousGLIPNextRun a Glittr Node

Last updated 3 months ago

This guide is designed for setting up a Glittr node on testnet4 or a local network.

Getting bitcoind executables

Download or build bitcoind and bitcoin-cli

Make sure you are using at least version 28.x (testnet4 support).

Linux

  • Download prebuilt executables:

  • Build from source:

After you obtain the executables, set your PATH environment variable to where the binaries are are (bitcoin-28.0/bin/ for prebuilt).

MacOS

  • Install using brew

  • Build from source:

After you build the executables by building from source, set your PATH environment variable to where the binaries are are (src/ usually). You may not need to do this if you installed using brew.

Windows

  • Download prebuilt executables:

  • Build from source:

After you obtain the executables, set your PATH environment to where the binaries are are (bitcoin-28.0/bin/ for prebuilt).

Checking correct installation

To check that bitcoind is installed correctly, open a terminal and run bitcoind. To avoid syncing the entire blockchain (very long process), follow the instructions for testnet4 or local development below THE FIRST TIME YOU RUN bitcoind.

Bitcoin Config for testnet4

Create a new directory [mkdir], e.g. bitcointestnet4, and then create a new file bitcoin.conf

Copy the text below into bitcointestnet4/bitcoin.conf

testnet4=1

[testnet4]
rpcuser=root
rpcpassword=root
# generate using https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py
rpcauth=rpcauth=root:98307881641a85ed72ac421b4997b8ce$206a7001fc977b92a67fd0bc9012765335eff452a2fde6a943d53f998a71256d

coinstatsindex=1
blockfilterindex=1
server=1
txindex=1
listen=1

maxconnections=100
datadir=/home/bitcoind/data

Bitcoin Config for local development

Create a new directory [mkdir], e.g. bitcoinlocal, and then create a new file bitcoin.conf

Copy the text below into bitcoinlocal/bitcoin.conf

[regtest]
regtest=1
dnsseed=0
rpcuser=user
rpcpassword=password
txindex=1
rpcallowip=127.0.0.1/0
rpcbind=127.0.0.1
fallbackfee=0.00001
datacarriersize=10000
maxburnamount=10000

Running the bitcoin node

Open your terminal (or PowerShell if you are on Windows). Run bitcoind using the datadir parameter and then add the network -testnet4or -regtest.

$ bitcoind -datadir=<bitcoin-data-location> -testnet4

e.g.

$ bitcoind -datadir=./bitcointestnet4/ -testnet4
$ bitcoind -datadir=./bitcoinlocal/ -regtest

note: rpcauth can be generated by using this script

https://bitcoincore.org/bin/bitcoin-core-28.0/bitcoin-28.0-x86_64-linux-gnu.tar.gz
https://github.com/bitcoin/bitcoin/blob/28.x/doc/build-unix.md
https://formulae.brew.sh/formula/bitcoin
https://github.com/bitcoin/bitcoin/blob/28.x/doc/build-osx.md
https://bitcoincore.org/bin/bitcoin-core-28.0/bitcoin-28.0-win64.zip
https://github.com/bitcoin/bitcoin/blob/28.x/doc/build-windows.md
https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py