您的位置:首页 > 其它

altcoin笔记------不断更新

2016-04-10 20:26 183 查看
环境为debian虚拟机制作

第一步:注册建立github项目

第二步:下载源码git clone https://github.com/yacoin/yacoin.git
第三步:讲下载的源码改名并上传github

%git clone https://github.com/yacoin/yacoin.git cloning in to yacoin
%mv yacoincicoin
%cdcicoin
%rm -rf .git
%git init
initializing git repository in ~/cicoin
%git add -A -f *
%git commit -m "first commit"
%git remote add origin https://github.com/cicoin/cicoin.git %git push -u origin master
username for git@github.com:cicoin
password forcicoin@github.com: **********

第四步:建立linux编译环境,编译一次试试,确定编译环境都正常

Retrieve Dependency Packages

On recent Ubuntu releases, the libdb4.8++-dev package is not in the default repositories. However it's in the bitcoin repository, which we can add with:

sudo apt-add-repository ppa:bitcoin/bitcoin

Then we need to make sure our build environment is up to date. For Debian and Ubuntu:

$ apt-get update
$ apt-get install git build-essential g++ libssl-dev libboost-all-dev libdb4.8++-dev libqrencode-dev qt4-qmake libqt4-dev

Download and Install Mini-UPnPC

$ mkdir miniupnpc
$ cd miniupnpc
$ wget "http://miniupnp.tuxfamily.org/files/miniupnpc-1.9.tar.gz"
$ tar -zxvf miniupnpc-1.9.tar.gz
$ cd miniupnpc-1.9/
$ sudo make install
$ cd ~/


Compile the
cicoin
daemon

$ cd ~/cicoin/src
$ make -f makefile.unix
$ stripcicoind

# daemon will be compiled, and can be started from the command line

Compile the
cicoin
Wallet Client

$ cd ~/cicoin
$ qmake
$ make
$ stripcicoin

 #qt wallet will be compiled, and can be run by double clicking peershares executable

第五步:更改源码内虚拟币名称等参数

第六步:更改端口等

net.cpp  line1172 getport==9050

init.cpp line536
getport==9050

line528
getport==9050


protocol.h  line18-24

#definecicoin_PORT  9921------9820

#define RPC_PORT     9922------9823

#define TESTNET_PORT 47891------47882

#define TESTNET_RPC_PORT 47892------47893

#define PEERCOIN_RPC_PORT         9902------9913

#define PEERCOIN_TESTNET_RPC_PORT 9904-----9915

irc.cpp      line223            CService addrConnect("92.243.23.21", 6667); // irc.lfnet.org

                                            CService addrIRC("irc.lfnet.org", 6667, true);

protocol.cpp line22-29

static unsigned char pchMessageStartTestOld[4] = { 0xdb, 0xe1, 0xf2, 0xf6 };

static unsigned char pchMessageStartTestNew[4] = { 0xcb, 0xf2, 0xc0, 0xef };

static unsigned int nMessageStartTestSwitchTime = 1346200000;

//cicoin message start (switched from Bitcoin's in Peercoin v0.2)

static unsigned char pchMessageStartBitcoin[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };

static unsigned char pchMessageStartcicoin[4] = { 0xe6, 0xe8, 0xe9, 0xe5 };

static unsigned int nMessageStartSwitchTime = 1347300000;

改成

// unsigned char pchMessageStartTestBitcoin[4] = { 0xfa, 0xbf, 0xb5, 0xda };

static unsigned char pchMessageStartTestOld[4] = { 0x67, 0x6f, 0x6f, 0x64 };

static unsigned char pchMessageStartTestNew[4] = { 0x69, 0x64, 0x65, 0x61 };

static unsigned int nMessageStartTestSwitchTime = 1346200000;

//cicoin message start (switched from Bitcoin's in Peercoin v0.2)

static unsigned char pchMessageStartBitcoin[4] = { 0x63, 0x68, 0x65, 0x6e };

static unsigned char pchMessageStartcicoin[4] = { 0xe5, 0xe9, 0xe6, 0xe8 };

static unsigned int nMessageStartSwitchTime = 1347300000;

checkpoint.cpp  line368

const std::string CSyncCheckpoint::strMasterPubKey = "04c0c707c28533fd5c9f79d2d3a2d80dff259ad8f915241cd14608fb9bc07c74830efe8438f2b272a866b4af5e0c2cc2a9909972aefbd976937e39f46bb38c277c";

改为04ea05d8010794f33d1ee0caad9bda8b833238848e495170d61c6d8a356b7caa38153448df4dd4715cb4fe39826ae6f104095ea2a47e41328509c858fecc85bf3a

main.h line48  修改币总量

static const int64 IPO_CIB = 1000000000 * COIN;

net.cpp line1000-1006

static const char *strDNSSeed[][2] = {

    // NOTE: Only testnet nodes are included in this build. If you are using this

    // for a realcicoin offering, you will want to remove the "t" that

    // appears before the node name and IP

    {"tcicoin NODE_2_EU-Ireland", "t54.72.105.68"},

    {"tcicoin NODE_3_SE-A_Singapore", "t54.255.142.16"},

};

irc.cpp  line295-303

        if (fTestNet) {

            Send(hSocket, "JOIN #cicoinTEST\r");

            Send(hSocket, "WHO #cicoinTEST\r");

        } else {

            // randomly join #bitcoin00-#bitcoin99

            int channel_number = GetRandInt(100);

            Send(hSocket, strprintf("JOIN #cicoin%02d\r", channel_number).c_str());

            Send(hSocket, strprintf("WHO #cicoin%02d\r", channel_number).c_str());

        }

第七步:编译测试,然后上传github

cicoin% git add -A -F *
cicoin% git commit -m "changes"
cicoin% git push origin master


第八步:创世块

第九步:修改logo图片
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: