altcoin笔记------不断更新
2016-04-10 20:26
183 查看
环境为debian虚拟机制作
第一步:注册建立github项目
第二步:下载源码git clone https://github.com/yacoin/yacoin.git
第三步:讲下载的源码改名并上传github
第四步:建立linux编译环境,编译一次试试,确定编译环境都正常
Then we need to make sure our build environment is up to date. For Debian and Ubuntu:
Compile the
Compile the
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
第八步:创世块
第九步:修改logo图片
第一步:注册建立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 thecicoin
daemon
$ cd ~/cicoin/src
$ make -f makefile.unix
$ stripcicoind
# daemon will be compiled, and can be started from the command line
Compile thecicoin
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图片
相关文章推荐
- [bzoj1068]压缩[区间动规]
- 20145237第六周学习总结
- 虚拟机linux上网问题(http://blog.csdn.net/wqx521/article/details/50832698)
- paramsPreparParamsStack拦截器栈
- 【Android】9、活动的基本用法(二)
- hdu 3795 Billboard(线段树)
- 20145313Java第一次实验
- C++游戏系列3:用多文件组织角色类
- 欢迎使用CSDN-markdown编辑器
- 7CSS动画-2D、3D转换,过滤,动画,多列以及用多列实现瀑布流
- 《我的结对项目心得》
- mbstowcs()/wcstombs() 函数 宽字符转多字符互转
- 十款最常见的Linux发行版
- 老程序猿招人是怎么读你的简历的
- oracle视图总结(创建、查询、改动、删除等)
- Learning_and_Transferring_Mid-Level_Image_Representations_using_Convolutional_Neural_Networks
- 无向图的判环
- java学习,从一个字符串中统计同一类型出现的次数
- 进程间通讯---共享内存
- hdu 4251 The Famous ICPC Team Again(划分树)