btcpool矿池-测试环境搭建及使用cgminer测试
注意:不管你做哪个币的池,都需要比特币源码,因为我们编译矿池的时候需要比特币源码里面的库
本项目未开源支付的代码,因此支付操作需要自己进行开发。
安装Bitcoind+ZMQ
apt-get -y install build-essential libtool autotools-dev automake autoconf pkg-config bsdmainutils python3
apt-get -y install libdb-dev libdb++-dev libminiupnpc-dev libzmq3-dev libssl-dev libboost-all-dev libevent-dev
apt-get -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev
#ToBuild
wget https://github.com/bitcoin/bitcoin/archive/v0.16.3.tar.gz
tar -zxvf v0.16.3.tar.gz
若我们想要创建非比特币矿池,我们无需对比特币源码进行编译,因此以下命令可以不执行;若创建比特币矿池,需要编译比特币钱包或自行前往比特币官方github下载
cd bitcoin-0.16.3/
./autogen.sh
./configure --with-incompatible-bdb --prefix=/work/bitcoin
make
make install
#start/stop service
cd /work/bitcoin/bin/
./bitcoind --daemon-testnet -zmqpubhashtx=tcp://0.0.0.0:18331 -zmqpubhashblock=tcp://0.0.0.0:18331
#./bitcoin-cli-testnet stop
安装ZooKeeper
apt-get install -y zookeeper zookeeper-bin zookeeperd
#mkdir for data
mkdir -p /work/zookeeper
mkdir /work/zookeeper/version-2
touch /work/zookeeper/myid
chown -R zookeeper:zookeeper /work/zookeeper
#set machine id
echo 1 >/work/zookeeper/myid
#edit config file
vim /etc/zookeeper/conf/zoo.cfg
initLimit=5
syncLimit=2
clientPort=2181
clientPortAddress=127.0.0.1
dataDir=/work/zookeeper
#伪分布式
server.1=127.0.0.1:2888:3888
#start/stop service
service zookeeper restart
#service zookeeper start/stop/restart/status
安装Kafka
#install depends
apt-get install -y default-jre
#install Kafka
mkdir /root/source
cd /root/source
wget https://archive.apache.org/dist/kafka/2.2.1/kafka_2.11-2.2.1.tgz
mkdir -p /work/kafka
cd /work/kafka
tar -zxf /root/source/kafka_2.11-2.2.1.tgz --strip 1
#edit conf
vim /work/kafka/config/server.properties
broker.id=1
offsets.topic.replication.factor=1
message.max.bytes=20000000
replica.fetch.max.bytes=30000000
log.dirs=/work/kafka-logs
listeners=PLAINTEXT://127.0.0.1:9092
#伪分布式
zookeeper.connect=127.0.0.1:2181
#start server
cd /work/kafka
nohup /work/kafka/bin/kafka-server-start.sh /work/kafka/config/server.properties >/dev/null 2>&1 &
安装BTCPool
cd /work
安装需要的包
apt-get update
apt-get install -y build-essential autotools-dev libtool autoconf automake pkg-config cmake \
openssl libssl-dev libcurl4-openssl-dev libconfig++-dev \
libboost-all-dev libgmp-dev libmysqlclient-dev libzookeeper-mt-dev \
libzmq3-dev libgoogle-glog-dev libhiredis-dev zlib1g zlib1g-dev \
libsodium-dev libprotobuf-dev protobuf-compiler
#zmq-v4.1.5
mkdir -p /root/source && cd /root/source
wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz
tar zxvf zeromq-4.1.5.tar.gz
cd zeromq-4.1.5
./autogen.sh && ./configure && make -j$CPUS && make check && make install && ldconfig
#glog-v0.3.4
mkdir -p /root/source && cd /root/source
wget https://github.com/google/glog/archive/v0.3.4
2021年5月底,金融委大会明确指出将严厉打击比特币挖矿和买卖个人行为。自此,内蒙古自治区等多地就发布通知,清除整治数字货币“挖矿”有关产业链。那时候,许多“矿场”还开朗的觉得,用夏汛的废电“挖矿”并不会导致电力工...
CPI超预期,BTC大跌,7天后将迎来9月加息会议。美股暴跌,差点熔断,华尔街都以为CPI会降到7开头,结果大跌眼镜,通胀不仅没控制住,甚至还超预期走高,也就是说月底必然会加息75基点,CPI公布之后,美联储加息100基...
一直以来,我们都觉得行情受到CPI的强烈影响,甚至会认为CPI具有决定性。逻辑是,CPI情况影响美联储的货币政策,如果CPI没能下跌、甚至继续上涨,美联储会采取强硬的紧缩政策,从而利空美股和币市。事实上,去年上半年,加息...
伴随着数字货币价钱爆跌及其全国各地政府部门全方位取缔数字货币挖币主题活动,先前因挖矿瘋狂买买买而价钱飙涨的独立显卡销售市场逐渐有一定的减温。6月20日,据每日财经新闻报导,在对深圳华强北,显卡的价格已有一定的松脱,...