主页 > imtoken华为手机更新不了 > 山寨币创世区块的快速生产

山寨币创世区块的快速生产

imtoken华为手机更新不了 2023-01-17 05:06:00

比特币是工作的,它首先是通过创世块启动的,所以要制作一个山寨币重生之2011比特币,首先要解决的问题是创建一个创世块。一些大神在网上分享了它的创作。区块工具,一个python脚本,可以快速计算莱特币使用的scrypt加密算法和比特币使用的SHA256的创世区块信息。有了创世块数据,它可以用来创建你自己的山寨币。首先,你需要准备一个linux系统。最好的办法是准备一个虚拟机重生之2011比特币,在虚拟机中安装最新版本的linux系统。我安装了 ubuntu14.04..

下载地址:一个python脚本,其中可以使用莱特币使用的scrypt加密算法和比特币使用的SHA256快速计算创世块信息。有了创世块数据,它可以用来创建你自己的山寨币。

重生之2011比特币

要使用这个脚本,首先需要在linux系统安装pip,然后安装python的scrypt模块,(重要提示:升级最新版openssl1.0.1g) .

重生之2011比特币

1、安装pip如下:

重生之2011比特币

sudo apt-get install python-pip python-dev build-essential 
sudo pip install --upgrade pip 
sudo pip install --upgrade virtualenv 

重生之2011比特币

2、将 scrypt 模块安装为 python

重生之2011比特币

sudo pip install scrypt construct

3、接下来就可以使用脚本了。脚本使用方法基本如下:

下面的命令是创建了一个SHA256,基于比特币的创世块信息,之后,你将这些信息替换到比特币源代码即可中,恭喜你已经山寨了一个比特币。。
    python genesis.py  -z "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" -n 2083236893 -t 1231006505
Output:
    algorithm: sha256
    merkle hash: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
    pszTimestamp: The Times 03/Jan/2009 Chancellor on brink of second bailout for banks
    pubkey: 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
    time: 1231006505
    bits: 0x1d00ffff
    Searching for genesis hash..
    genesis hash found!
    nonce: 2083236893
    genesis hash: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
=========================================
下面的命令用于创建scrypt加密算法的创世块命令格式,只是比上面的多了一个scrypt关键字。。
    python genesis.py --scrypt -z "NY Times 05/Oct/2011 Steve Jobs, Apple’s Visionary, Dies at 56" -p "040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9" -t 1317972665 -n 2084524493
    
在里说一下,-z参数后面的文本串,对应了比特币或是莱特币源代码中的,pszTimestamp变量值。
##命令参数选项说明
    python genesis.py -h
    
    使用: genesis.py [参数选项]
    参数选项:
    -h, --help            显示帮助提示信息并退出
    -t TIME, --time=TIME   TIME 是一个unix时间,可以通过python的time.time()得到。它是代表创世块的生成时间
    -z TIMESTAMP, --timestamp=TIMESTAMP
                          the pszTimestamp found in the coinbase of the
                          genesisblock
    -n NONCE, --nonce=NONCE
                          the first value of the nonce that will be incremented
                          when searching the genesis hash
    -s, --scrypt          calculate genesis block using scrypt
    -p PUBKEY, --pubkey=PUBKEY
                          The pubkey found in the output script