================================================================
 BigCoin Core (Linux x86-64)  v1.5
 Author: Masashi Takamoto
 (A Japanese version of this file is included: README.ja.txt)
================================================================

BigCoin is an independent SHA-256d proof-of-work blockchain forked
from Bitcoin Core v31.1. It is not Bitcoin: different genesis block,
different network magic, different ports, different address format,
and no compatibility with the Bitcoin network in either direction.

No ICO. No premine sale. Nothing is for sale. The founder does not
sell BIG and there is no exchange or custody service behind this
project. Block 1 contains a 1,000,000 BIG founder reward, which is
visible on-chain and can be checked by anyone.


■ QUICK START (3 lines)

    tar xzf bigcoin-linux-x64-v1.5.tar.gz
    cd bigcoin
    ./mine-bigcoin.sh

  That is all. The script starts a node, waits for the chain to sync,
  creates a wallet and mining addresses, and mines until you press
  Ctrl-C. There is nothing to compile and nothing to apt install.


■ REQUIREMENTS

  - Linux x86-64
  - glibc 2.35 or newer
      Ubuntu 22.04 / 24.04 / 26.04, Debian 12 / 13,
      Fedora 36+, openSUSE Leap 15.5+, and anything newer
  - Check yours with:  ldd --version

  Boost, libevent and SQLite are statically linked into the
  binaries, so there are no packages to install. The only dynamic
  dependencies are glibc itself and libm:

      linux-vdso.so.1  libm.so.6  libc.so.6  ld-linux-x86-64.so.2

  No GUI wallet is included in this release. bigcoin-qt is currently
  Windows only.


■ RUNNING ON A RENTED SERVER

  Check your provider's terms of service before you start mining.
  Many shared VPS hosts prohibit mining outright, while plans with
  dedicated resources often allow it. Running a node without mining
  is almost always fine. This is your responsibility, not ours.


★ IMPORTANT (v1.4 and later)

  At block height 17,325 the difficulty adjustment algorithm changed
  to ASERT. This is a hard fork and it has been live since
  2026-11-07. Nodes running v1.3 or older reject every block from
  that height onwards, so you must run v1.4 or later. This release
  (v1.5) is fully compatible with v1.4 - no consensus changes.


■ CHAIN PARAMETERS

  Ticker            BIG (smallest unit: sat; max supply ~22,000,000)
  Genesis block     000086c5bc212db5bf8760b3fb3a30dfcd6af76257fd529814bc032c8134424d
  Network magic     "BIGC" (0x42 0x49 0x47 0x43)
  P2P port          8338
  RPC port          8337
  Address format    big1... (bech32) / B... (base58, legacy)
  Block time        ~10 minutes, halving every 210,000 blocks
  Block reward      50 BIG
                    (block 1 only: 1,000,000 BIG founder reward)
  Difficulty        ASERT (aserti3-2d), half-life 2 days,
                    active from height 17,325
  Seed node         133.242.139.204:8338
  Explorer          http://133.242.139.204/


■ WHAT IS IN THIS ARCHIVE

  bitcoind         the node
  bigcoin-cli      the command line client
  bitcoin          multiprocess wrapper (you will not normally use it)
  mine-bigcoin.sh  easy solo-mining script
  bitcoin.conf     config file template
  README.txt       this file
  README.ja.txt    the same document in Japanese


■ USING THE MINING SCRIPT

    ./mine-bigcoin.sh        mine with (CPU cores - 1) workers
    ./mine-bigcoin.sh 4      mine with exactly 4 workers

  More workers means more hashrate, but one core is left to the OS by
  default. The script is short and does nothing hidden - read it
  before you run it. Every command it issues is a local RPC call to
  the bitcoind next to it, and the keys it creates never leave ./data.

  Two things worth knowing about how it works:

  1) Each worker mines to its own address.

     A generatetoaddress block template is fully determined by the
     previous block, the height, the coinbase output and nTime - and
     nTime only has one-second granularity. Two workers that start in
     the same second on the same address therefore grind a
     byte-identical block header in the identical nonce order, and
     one of them does no useful work whatsoever. Giving each worker
     its own address changes the coinbase, which changes the merkle
     root, which splits the search space for certain.

     The addresses are saved in data/mining-addresses.txt and all
     belong to the same 'miner' wallet, so the balances simply add up.

     Note that a count of mining addresses is NOT a count of miners.
     One person can hold any number of them.

  2) It raises rpcthreads automatically.

     generatetoaddress holds one RPC thread for the entire duration of
     the call. bitcoind only serves 4 threads by default, so without
     this change extra workers would just queue behind each other
     instead of mining in parallel. The script writes
     (workers + 4) into data/bitcoin.conf.

     If a node was already running when you start the script, the
     running node keeps using its old value; the script tells you so
     and shows you how to restart it.

  Stop mining with Ctrl-C. The node keeps running. To stop the node:

      ./bigcoin-cli -datadir=$PWD/data stop

  On a headless server you will probably want it detached:

      nohup ./mine-bigcoin.sh 4 > mine.log 2>&1 &
      tail -f mine.log          # watch it
      kill %1                   # stop it (or: pkill -f mine-bigcoin.sh)

  A detached run cannot be stopped with Ctrl-C - there is no terminal
  to press it in - so use kill. The script handles SIGTERM the same way
  it handles Ctrl-C: it stops the workers and leaves the node running.


■ DOING IT BY HAND

  1. Create a data directory
       mkdir -p data
  2. Copy the config template (the seed node is already in it)
       cp bitcoin.conf data/
  3. Start the node
       ./bitcoind -datadir=$PWD/data -daemon
  4. Check the state
       ./bigcoin-cli -datadir=$PWD/data getblockchaininfo
  5. Create a wallet
       ./bigcoin-cli -datadir=$PWD/data createwallet mywallet
  6. Get an address
       ./bigcoin-cli -datadir=$PWD/data getnewaddress
  7. Mine
       ./bigcoin-cli -datadir=$PWD/data generatetoaddress 1 <big1address> 20000000

     The last number is the nonce ceiling for one call, and you should
     always pass it: the default (1,000,000) gives up almost
     immediately. Do not make it enormous either - the call does not
     notice a new chain tip while it runs, so a worker would keep
     grinding a stale template after someone else found the block.
     20,000,000 is about 40 s at 0.5 MH/s and about 4 s at 5 MH/s.
     If nothing is found the call returns an empty array [], so call
     it in a loop.
  8. Stop
       ./bigcoin-cli -datadir=$PWD/data stop


■ RUNNING A NODE PERMANENTLY (systemd example)

  Create /etc/systemd/system/bigcoind.service:

    [Unit]
    Description=BigCoin node
    After=network-online.target

    [Service]
    User=bigcoin
    ExecStart=/opt/bigcoin/bitcoind -datadir=/var/lib/bigcoin
    Restart=on-failure
    Type=simple

    [Install]
    WantedBy=multi-user.target

  Then:  systemctl enable --now bigcoind


■ SECURITY AND BACKUPS

  - Your private keys live in the wallet file inside the data
    directory. Back it up:
      ./bigcoin-cli -datadir=$PWD/data -rpcwallet=miner backupwallet /path/to/backup.dat
  - Mining rewards become spendable after 100 confirmations, which is
    roughly one day.
  - NEVER expose RPC port 8337 to the internet. Forward only the P2P
    port 8338.
  - Opening port 8338 lets other nodes connect to you, which helps
    the network. It is optional.


■ REPRODUCING THESE BINARIES

  Built from the published source archive. Anyone can repeat this.

    Source  : bigcoin-source-v1.5-unix.tar.gz
    SHA256  : (see http://133.242.139.204/downloads)
    Toolchain: Ubuntu 22.04 (glibc 2.35), GCC 12.3.0, CMake 3.22.1

  Build:

    tar xzf bigcoin-source-v1.5-unix.tar.gz && cd bigcoin-source-v1.5
    make -C depends NO_QT=1 NO_ZMQ=1 NO_USDT=1 -j"$(nproc)"
    cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake \
      -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=OFF -DBUILD_TESTS=OFF \
      -DBUILD_BENCH=OFF -DBUILD_FUZZ_BINARY=OFF -DINSTALL_MAN=OFF \
      -DENABLE_IPC=OFF -DWITH_ZMQ=OFF -DWITH_USDT=OFF \
      -DAPPEND_LDFLAGS="-static-libstdc++ -static-libgcc"
    cmake --build build -j"$(nproc)"

  Binaries land in build/bin/. Most of the depends build time goes to
  capnproto and Boost.

  ★ If you use the .zip source archive instead, fix two things first

    bigcoin-source-v1.5.zip was created on Windows and will NOT build
    on Linux as shipped. The -unix.tar.gz archive above is the same
    source with exactly these two problems already fixed; if you
    prefer the zip, apply them yourself after unzipping:

    1) Line endings are CRLF.
       Every shebang is read as "/bin/sh\r" and fails with
       "bad interpreter"; the Makefiles break as well.

         sudo apt install dos2unix
         find . -type f ! -name '*.png' ! -name '*.raw' -print0 \
           | xargs -0 dos2unix -q

       (dos2unix detects and skips binary files.)

    2) The zip format did not preserve the executable bit.
       If depends/config.guess cannot run, build_os comes out empty,
       which empties build_TAR and build_SHA256SUM, and the depends
       Makefile collapses into hundreds of
       "/bin/sh: Syntax error: \"|\" unexpected".

         grep -rlI --null '^#!' . | xargs -0 chmod +x
         chmod +x depends/config.guess depends/config.sub depends/gen_id

  ★ One build flag that does not do what it looks like

    Passing MULTIPROCESS=0 to depends disables nothing. The Makefile
    tests  ifneq ($(MULTIPROCESS),)  so "0" is a non-empty string and
    falls on the ENABLED side - the opposite polarity of the NO_*
    variables. In 31.x capnproto and libmultiprocess are part of the
    default depends set regardless of that flag; -DENABLE_IPC=OFF is
    what actually keeps the IPC binaries out of the build.


■ CHANGELOG

  v1.5 (2026-11-08) Linux x86-64 build added (this package), with
                    mine-bigcoin.sh bundled, plus an LF-ending source
                    archive that builds on Linux as-is. No consensus
                    changes - same source as Windows v1.5.
  v1.5 (2026-11-07) Bundled the easy mining script mine-bigcoin.cmd.
                    Removed build-environment local folder path
                    strings that had been embedded in the shipped
                    binaries (no effect on behaviour).
  v1.4 (2026-11-07) Moved the ASERT activation height forward from
                    18,000 to 17,325.
  v1.3 (2026-11-02) Difficulty adjustment switched to ASERT
                    (aserti3-2d).
  v1.2 (2026-11-01) Added the GUI wallet bigcoin-qt.exe (Windows only).
  v1.1 (2026-11-01) Fixed a header sync bug; pinned the early blocks.
  v1.0 (2026-11-01) First release.


■ LINKS

  Mining guide  http://133.242.139.204/mining
  Downloads     http://133.242.139.204/downloads
  Explorer      http://133.242.139.204/
  Seed node     133.242.139.204:8338

  Licence: MIT, as inherited from Bitcoin Core.
================================================================
