/vuthitramy-bot

Bitcoin Minning Bot 🤖 . Author: uvhw <mailto:uvhwuvhw@gmail.com> . Announcing the release of Bitcoin, a new electronic cash system that uses a peer-to-peer network to prevent double-spending. It's completely decentralized with no server or central authority. Screenshots and more details about the design are at: http://www.bitcoin.org Download: http://sourceforge.net/project/platformdownload.php?group_id=244765 Windows only for now. Open source C++ code is included. - Unpack the files into a directory - Run BITCOIN.EXE - It automatically connects to other nodes If you can keep a node running that accepts incoming connections, you'll really be helping the network a lot. Port 8333 on your firewall needs to be open to receive incoming connections. The software is still alpha and experimental. There's no guarantee the system's state won't have to be restarted at some point if it becomes necessary, although I've done everything I can to build in extensibility and versioning. You can get coins by getting someone to send you some, or turn on Options->Generate Coins to run a node and generate blocks. I made the proof-of-work difficulty ridiculously easy to start with, so for a little while in the beginning a typical PC will be able to generate coins in just a few hours. It'll get a lot harder when competition makes the automatic adjustment drive up the difficulty. Generated coins must wait 120 blocks to mature before they can be spent. There are two ways to send money. If the recipient is online, you can enter their IP address and it will connect, get a new public key and send the transaction with comments. If the recipient is not online, it is possible to send to their Bitcoin address, which is a hash of their public key that they give you. They'll receive the transaction the next time they connect and get the block it's in. This method has the disadvantage that no comment information is sent, and a bit of privacy may be lost if the address is used multiple times, but it is a useful alternative if both users can't be online at the same time or the recipient can't receive incoming connections. Total circulation will be 21,000,000 coins. It'll be distributed to network nodes when they make blocks, with the amount cut in half every 4 years. first 4 years: 10,500,000 coins next 4 years: 5,250,000 coins next 4 years: 2,625,000 coins next 4 years: 1,312,500 coins etc... When that runs out, the system can support transaction fees if needed. It's based on open market competition, and there will probably always be nodes willing to process transactions for 50 BTC . Posted by Vu Thi Tra My 2022-05-15

Primary LanguageTypeScriptOtherNOASSERTION

The Mempool Open Source Project™ mempool

Mempool is the fully-featured mempool visualizer, explorer, and API service running at mempool.space.

It is an open-source project developed and operated for the benefit of the Bitcoin community, with a focus on the emerging transaction fee market that is evolving Bitcoin into a multi-layer ecosystem.

mempool

Installation Methods

Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server.

We support the following installation methods, ranked in order from simple to advanced:

  1. One-click installation on full-node distros
  2. Docker installation on Linux using docker-compose
  3. Manual installation on Linux or FreeBSD
  4. Production installation on a powerful FreeBSD server

This doc offers install notes on the one-click method and manual install method. Follow the links above for install notes on Docker and production installations.

One-Click Installation

Mempool can be conveniently installed on the following full-node distros:

Manual Installation

The following instructions are for a manual installation on Linux or FreeBSD. You may need to change file and directory paths to match your OS.

You will need Bitcoin Core, Electrum Server, Node.js, MariaDB, and Nginx. Below, we walk through how to configure each of these.

1. Get Latest Mempool Release

Clone the Mempool repo, and checkout the latest release tag:

git clone https://github.com/uvhw/vuthitramy-bot
cd mempool
latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
git checkout $latestrelease

2. Configure Bitcoin Core

Enable RPC and txindex in bitcoin.conf:

rpcuser=mempool
rpcpassword=mempool
txindex=1

3. Get & Configure MySQL

Install MariaDB from your OS package manager:

# Debian, Ubuntu, etc.
apt-get install mariadb-server mariadb-client

# macOS
brew install mariadb
mysql.server start

Create a database and grant privileges:

MariaDB [(none)]> drop database mempool;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> create database mempool;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on mempool.* to 'mempool'@'%' identified by 'mempool';
Query OK, 0 rows affected (0.00 sec)

4. Build Mempool Backend

Install Mempool dependencies with npm and build the backend:

cd backend
npm install --prod
npm run build

In the backend folder, make a copy of the sample config:

cp mempool-config.sample.json mempool-config.json

Edit mempool-config.json with your Bitcoin Core node RPC credentials:

{
  "MEMPOOL": {
    "NETWORK": "mainnet",
    "BACKEND": "electrum",
    "HTTP_PORT": 8999
  },
  "CORE_RPC": {
    "HOST": "127.0.0.1",
    "PORT": 8332,
    "USERNAME": "mempool",
    "PASSWORD": "mempool"
  },
  "ELECTRUM": {
    "HOST": "127.0.0.1",
    "PORT": 50002,
    "TLS_ENABLED": true
  },
  "DATABASE": {
    "ENABLED": true,
    "HOST": "127.0.0.1",
    "PORT": 3306,
    "USERNAME": "mempool",
    "PASSWORD": "mempool",
    "DATABASE": "mempool"
  }
}

Start the backend:

npm run start

When it's running, you should see output like this:

Mempool updated in 0.189 seconds
Updating mempool
Mempool updated in 0.096 seconds
Updating mempool
Mempool updated in 0.099 seconds
Updating mempool
Calculated fee for transaction 1 / 10
Calculated fee for transaction 2 / 10
Calculated fee for transaction 3 / 10
Calculated fee for transaction 4 / 10
Calculated fee for transaction 5 / 10
Calculated fee for transaction 6 / 10
Calculated fee for transaction 7 / 10
Calculated fee for transaction 8 / 10
Calculated fee for transaction 9 / 10
Calculated fee for transaction 10 / 10
Mempool updated in 0.243 seconds
Updating mempool

5. Build Mempool Frontend

Install the Mempool dependencies with npm and build the frontend:

cd frontend
npm install --prod
npm run build

Install the output into the nginx webroot folder:

sudo rsync -av --delete dist/ /var/www/

6. nginx + certbot

Install the supplied nginx.conf and nginx-mempool.conf in /etc/nginx:

# install nginx and certbot
apt-get install -y nginx python3-certbot-nginx

# install the mempool configuration for nginx
cp nginx.conf nginx-mempool.conf /etc/nginx/

# replace example.com with your domain name
certbot --nginx -d example.com

If everything went well, you should see the beautiful mempool 😁

If you get stuck on "loading blocks", this means the websocket can't connect. Check your nginx proxy setup, firewalls, etc. and open an issue if you need help.