Bitcoin Forum
May 27, 2024, 11:46:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: « 1 2 3 4 5 [6] 7 »  All
  Print  
Author Topic: How do I make a coin?  (Read 27692 times)
FrictionlessCoin
Legendary
*
Offline Offline

Activity: 868
Merit: 1000


Cryptotalk.org - Get paid for every post!


View Profile
December 17, 2013, 05:47:40 PM
 #101

Maybe what the world needs is not more alt-coins, but a re-brandable coin.

In short, same coin, different name.

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
.CryptoTalk.org.|.MAKE POSTS AND EARN BTC!.🏆
Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 17, 2013, 07:00:49 PM
 #102

Maybe what the world needs is not more alt-coins, but a re-brandable coin.

In short, same coin, different name.

Yes but it needs to be like devcoin in that a percentage can go to whoever you want for doing anything you want

Then Bitcoin can reach everyone

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 08:16:40 AM
 #103

==如何克隆为基础的Scrypt Altcoins的乐趣和利润==


等一下,为什么你会想给出来的秘密? ! ?因为它不是一个秘密了再说,为什么不是每个人都和他们的邻居能够创造出了大量这些无用又令人兴奋的数学位?这篇文章中的信息我花了几个星期来编译和对我的作品是不能保证为你工作。请使用本指南为出发点来学习一些关于C + +编程和编译软件。


我不会做技术支持 - 仅仅因为你不能得到的东西的工作并不赋予你打扰我。去阅读,深入挖掘,并阅读一些。几乎所有在本指南中已登载于某种形式或另一种对bitcointalk.org的altcoin论坛。它的其余部分我认真追查,通过试错和谷歌搜索一个健康的剂量。事情是为了打破,你需要找出原因,并使其发挥作用。通过本指南的最后,你应该有一个工作的硬币,P2P ( IRC )网络,以及客户对于Linux (易) , MAC(有点难度)和Windows (唉) 。


===我需要做什么? ===


*源代码的Scrypt硬币
*的工作知识和获取Linux或Mac命令行 - 我可不是要告诉Cygwin的,但它的同类。
* 2或更多的计算机或虚拟机 - 我会用我的笔记本电脑和一个Debian的喘息基础的VPS 。
*文本编辑软件 - 使用TextWrangler为Mac I'm ,但Netbeans的, EmeraldEditor ,或纳米将正常工作。
*时间和耐心...




快乐的摆弄!


=== Github上,源代码和Linux ===


====源代码====
首先第一件事情。你需要一些源代码。因为我怀疑你可以从头开始写(我不能) ,你应该很高兴知道有在scrypt硬币家庭出现无穷多的不同的选项供您克隆和改变。我的第一个硬币的基础上,最优秀的研究硬币, SmallChange ,由lightenup 。他的git的差异输出: https://github.com/bfroemel/smallcha...748f76a3d58326几乎是足够的信息,完全建立自己的ALT -硬币,因此是值得肯定的。是的,我知道他的代码是简单的Litecoin源剪切和粘贴的变化,但嘿 - 这就是我们正在努力在这里,他加入了一些很好的意见在整个代码。


在本教程中,并保存的SMC代码一个“干净”的副本的目的,我创建foocoin : https://github.com/foocoin/foocoin本指南将告诉你如何把' foo'coin中“ bar'coin ,你可以把它从那里。我已经改变了足以让这枚硬币编译可以,如果你遵循本指南。如果你喜欢,开始与原来的SmallChange代码,它是在这里: https://github.com/bfroemel/smallchange.git或者你可以使用Litecoin ,弗兰科, YAC , CHN , MIN,任何来源 - 我们'会改变它足以使其工作。


====建立一个Github上的帐户====


现在将是一个很好的时间来与你的新硬币一个出色的唯一的名称。您可以访问https://github.com/insertcoinnamehere和检查,看看你的硬币的名称是否可用。如果不是的话,只需添加项目或一种诙谐和信誉提高,也许,非营利或-财团会给你一些硬币有滋有味:


[ [ | { { https://i.imgur.com/8IxPN1X.png }}] ]


嘿,看, barcoin不采取 - we'd更好地抢夺它的权利了!只要到https://github.com并填写空白:


[ [ | { { https://i.imgur.com/2KLsNXL.png }}] ]


现在,让我们让那些性感的源代码的URL ,每个人都可以从git pull命令之一。什么是git的拉?别担心,你会得到它的窍门 - 看,你在学习新的东西了。在右上角旁边,你的用户名,单击“创建存储库”


[ [ | { { https://i.imgur.com/2xCXZfK.png }}] ]


现在,填空:


[ [ | { { https://i.imgur.com/7S9Z7Bv.png }}] ]


点击绿色按钮,瞧,你有Github上。现在,利用这一信息说明:


[ [ | { { https://i.imgur.com/gXyQjh2.png }}] ]


因为我们要回来了。更妙的是,它收藏在您的浏览器并打开一个新标签。


====在Linux,Mac , Cygwin的====


是的,你需要的其中之一。在本教程中,我将使用一台MacBook与OSX 10.8.something和Debian的喘息的VPS 。我想你可以使用Cygwin ,但我更喜欢的* nix的以Windows中的任何一天,你不妨了解一件事,对吗?拍摄时,如果需要与已建成的设置将在VMware会话中运行的依赖关系良好的LiveCD的,试试[ [ CDEbian ] 。否则,本指南使用的Debian这意味着目前最主流的克隆应该工作(即: Ubuntu的, Xubuntu上,薄荷) 。


设置PC机或VM Linux或OSX的是本教程的范围之内,但我只想说我可以保证VMWare和其同时运行多个虚拟机的能力和它的虚拟化OSX 10.6.x.能力你将需要安装在其上的操作系统有史以来您选择能够建立守护进程和- Qt的钱包一定的依赖性。


====依赖性的OSX ====


我发现在OSX上安装依赖的最简单的方法是使用使用MacPorts或自制。就个人而言,我喜欢使用MacPorts比家酿好,但其仅仅是因为使用MacPorts在/ opt安装(在这里我觉得应该去),也因为使用MacPorts提供通用构建默认。如果你喜欢自制的公式是一样的,但我建议你建立的 - 32位标志。对于本教程的目的,我们将使用MacPorts来。


通常,需要安装以下依赖关系:
*升压( C + +库)
* DB48 ( Berkeley DB的4 。
* QT4 -MAC (开源QT 4.8.4 ,包含的qmake )
*的openssl (SSL开发库)
* GIT (移动源来回资源库)
* miniupnpc ( UPNP的开发库,可选 - 老实说,我说跳过此废话)


安装的基本使用MacPorts你的OSX版本后,此可以完成这个命令:
% sudo的港口安装升压DB48 QT4- MAC的openssl miniupnpc混帐
一旦所有的依赖关系是建立和安装,下一步就是从克隆的git源。在这个例子中,我会克隆foocoin ,将其重命名,重新git的初始化,并推动初始拷贝到Github上,以保证git的工作:
%的git克隆https://github.com/foocoin/foocoin.git
克隆到foocoin
% MV foocoin barcoin
% CD barcoin
% RM -RF 。 GIT
% git的初始化
初始化git仓库在〜 / barcoin
% git add命令-A *
% git的承诺 - m“的第一个承诺”
%远程Git添加起源https://github.com/barcoin/barcoin.git
%混帐推-U主产地
用户名git@github.com : barcoin
密码barcoin@github.com : **********


现在,没有什么,我们只是做?我们克隆的现有源,删除其链接到Git ,重新初始化的文件夹, Github上,添加了所有现有文件夹和文件到存储库中,我们致力于改变(使他们永久的,把他们在“禅师”分支,在它改名我们的新*大*好*更快的硬币,将其设置备份链接到Github上 - 但对*新*硬币的帐户,并推副本到Github的现在,如果你去看看你的页面看起来应该。像这样:


[ [ | { { https://i.imgur.com/hQm9qn9.png }}] ]


呵呵,看看所有的新鲜的源代码只是在等待被调整了。


====相依为Linux ====


在基于Debian的Linux上,依赖性和构建要求可安装在像这样一个命令:
$ sudo易于得到安装sudo apt-get的安装建立必要与libboost - ALL- dev的libcurl4 - openssl的- dev的libdb5.1 - dev的libdb5.1 + + - dev的混帐QT- SDK libminiupnpc - dev的
这将安装所有需要的套件,容易很聪明。一旦这是完整的,同样的位作为上述应适用:
$ git clone命令https://github.com/foocoin/foocoin.git
克隆到foocoin
$ MV foocoin barcoin
$ CD barcoin
$ RM- RF 。 GIT
$ git init生成
初始化git仓库在〜 / barcoin
$ git add命令-A *
$ git的承诺 - m“的第一个承诺”
$ git的远程添加起源https://github.com/barcoin/barcoin.git
$ git的推-U主产地
用户名git@github.com : barcoin
密码barcoin@github.com : **********


====相依为Windows ====


唉,我就知道你会问。 Windows是特里克比它应该是当它涉及到建设有GNU工具链。首先,你需要安装的mingw32和手工为每个上面列出的项目建立依赖关系。你还需要与那些依赖关系的位置自定义您 - qt.pro文件。为了简化这个问题,我已经编译和汇编所需要的依赖关系,以一个漂亮的Github资源库为您服务。如果任一下载并解压缩为c: \相依关系或混帐克隆到C : \ ,这pacakge : https://github.com/foocoin/deps.git会给你你需要使用source来构建富(巴)硬币一切你已经有了。更多关于建立更长远的路,当我们到了Windows客户端编译远一点一点点沿着项目。


现在,您可以剪切和粘贴!
===搜索和替换===


啊,现在我们已经来到了创意的部分。在那里你改变你想改变,使你的硬币你的东西一点。由于这是一个*克隆*教程中,我不打算把重点放在编程的复杂性(我没有资格) 。我只是要告诉你,让你需要得到一个硬币启动和运行的变化。对于这一步,我真的很喜欢在我的Mac TextWrangler 。它允许多个文件搜索和替换,这使得该过程的这一部分相当迅速去。如果你要建立一个虚拟机来构建, Qt的钱包为Mac ,无论如何,你应该/可以简单地安装上的依赖关系,并建立在OSX完全。 TextWrangler是免费的。


====名称====


TextWrangler将允许你打开文件的整个文件夹。只需打开程序,然后选择文件的打开,突出“ barcoin ”文件夹,然后单击打开:


[ [ | { { https://i.imgur.com/kC106go.png }}] ]


啊,真好,所有的代码在一个易于使用的界面。要知道,这肯定编辑这些文件可以通过纳米或者Netbeans ,或任何其他文本编辑器来完成,即使记事本,我想。我只是喜欢这一个, '因为这一个功能的。现在,我们需要替换在我们的源代码的“ FooCoin , foocoin和FOOCOIN ”所有实例“ BarCoin , barcoin和BARCOIN 。 ”注意3种不同情况下的设置 - 大多数代码有三个在里面。为了改变这种在TextWrangler ,选择搜索,那么多文件搜索并选择“ barcoin ”目录:


[ [ | { { https://i.imgur.com/fTJKnc7.png }}] ]


这样做对所有三个案例的设置,或者如果你喜欢eecummings风格,全部更换没有“区分大小写”对话框中有一个出现故障一举检查。 TextWrangler将出现一个被修改的文件的完整列表,并允许您浏览,一旦完成了变更:


[ [ | { { https://i.imgur.com/tJpf9LD.png }}] ]


你也将要替换的“foo”的所有实例“BAR ”。这是3字母命名为你的硬币,就像BTC或PPC 。最后,您将需要手动更改在主源文件夹foocoin - qt.pro的名字。嘿嘿...这是开始走到一起,不是吗?


====端口和网络的变化====


好了,现在我们需要给新的硬币一个独特的端口范围来使用。你需要两个端口,一个用于RPC连接(矿工连接),一个用于点对点连接。你可以在这里找到保留端口的一个很好的列表: http://en.wikipedia.org/wiki/List_of...P_port_numbers大部分的任何端口将工作假设他们是1 :在1024端口和2:不使用别的东西。我建议一些在高的数字,很好的例子包括56679和56680或12365和12366 。


在这个例子中我们将使用55883的RPC和55884的P2P 。在foocoin来源,这些端口都已经设定,所以,尽管使用你选择的文本编辑器进行修改。


改变RPC/P2P端口在以下文件中:


'''的src / bitcoinrpc.cpp ''' : ( RPC端口)
LINE 2893 : IP :: TCP ::端点端点( BindAddress配置, GETARG (“- rpcport ” , 55883 ) ) ;
LINE 3169 :如果( d.connect ( GETARG (“- rpcconnect ” , “127.0.0.1” ) , GETARG (“- rpcport ” , “ 55883 ”)) ! )


'''的src / init.cpp ''' : (P2P端口+ TESTNET端口)
LINE 235 “端口= <PORT> ” + _ ( “请收听<PORT>连接(默认: 55884或TESTNET : 45884 ) ” ) + “ \ n ” +


您可以设置TESTNET端口到任何其他随机端口,但要记住你将其设置为。


'''的src / init.cpp ''' : ( RPC端口)
LINE 271 “ - rpcport = <PORT> ” + _ ( “请收听<PORT> JSON - RPC连接(默认值: 55883 ) ” ) + “ \ n ” +


'''的src / protocol.h ''' : ( TESTNET端口+ P2P的端口)
第22行返回TESTNET ? 45883 : 55884 ;


您还可以设置一个初始“种子节点”或总是对系统的新硬币钱包联机将检查其他地址:


'''的src / net.cpp ''' :
线路1000 {“一些网站名称”,“ somewebsite.org或IP XXXX” } ,


硬币====硬币每块/块时间/最大数====


这些变化也很简单。更改在以下文件中的以下几行代码:


'''的src / main.cpp的''' : (授予每块硬币数)
线路831的Int64 nSubsidy = 1 *钱币;


'''的src / main.cpp的''' : (如何*应*块被发现的时间和频率难度retargets )
线路837静态常量的Int64 nTargetSpacing = 120; / / FooCoin : 2分钟块
线路836静态常量的Int64 nTargetTimespan = 1 * 24 * 60 * 60; / / FooCoin期:1天


在这个例子中,我们希望我们的硬币产生1块硬币,每2分钟,调整难度每天一次(1天×24小时×60分钟×60秒) 。您可以调整这些,但要知道,因为这是一个scrypt克隆,我们不改变难度开始这一目标利率将被扭曲,直到哈希率水平出你的新硬币。这是棘手的东西,我不太明白这一切呢。


'''的src / main.h ''' : (总数钱币永#估计每天块)
第43行静态常量的Int64 MAX_MONEY = 10000 * COIN ; / /最大硬币数
线路550返回dPriority >硬币*二百五十○分之七百二十〇 ; / / 720区块发现了一天。


你需要做一些数学基础上你要多少金币来创建在什么时间跨度和相距多远你块是要弄清楚每天的目标你的块。我不会做所有的工作适合你!这枚硬币被设置得1块硬币,每2分钟,目标每天720块通过的最大10,000金币这意味着,如果开采坚硬,它会在一个星期的时间用完硬币。


====地址起始字母/数字====


第一位数的新硬币的地址或信是由一个基地-58代码确定。你可以看到所有的可用选项的列表在这里: https://en.bitcoin.it/wiki/Base58Check_encoding要改变你的硬币的地址编辑本:


''' src/base58.h ''' :
线280 PUBKEY_ADDRESS = 38 , / /这里设置地址第一位


====图标和开机影像====


你会发现所有的支持图像和图标的钱包在'''的src / QT / RES '''文件夹中。有两个文件夹的图标,你应该注意:


[ [ | { { https://i.imgur.com/uTDamJq.png }}] ]

[ [ | { { https://i.imgur.com/2wJUutr.png }}] ]


Foo和Bar硬币都使用默认的Litecoin图像。你应该使用你所选择的图像编辑程序(我喜欢的Photoshop CS3 ,但GIMP也是不错的)来编辑影像。如果你想圆角图标/图片,使用透明的。 png文件。另外,不要忘了来产生。 ICO ( Windows / Linux的)和一个。 ICNS (苹果机)为你的程序的图标文件。一个伟大的网站,我喜欢用这个是在这里: http://iconverticons.com/
===默克尔哈希===


默克尔哈希是你的硬币网络的根。它的所有块将针对被测量的哈希和基础挖掘一个成因块。我的方法是让一个硬币工作的TESTNET ,然后再通过建立和阶段性进展测试的主要网络。默克尔哈希实际上不是你需要的,但改变的第一件事。


====大纪元====


由于午夜UTC在元旦, 1970年的Unix (或纪元或POSIX )时已使用(默认情况下和许多其他人)来协调Unix系统的各种系统调用和函数。由于这种时间是简单秒钟,不占闰秒,它的一个简单的方法来计算编程的独特的基于时间的值。为此,建立一个新的硬币,当一个必须改变的第一件事就是为硬币或硬币的起源诞生的基本时间。


这是设置在代码中,一个用于测试网两个地方:


'''的src / main.cpp的'''
线2023 block.nTime = 13亿;


和一个用于主网:


'''的src / main.cpp的'''
线2017 block.nTime = 13亿; / / epochtime


你可以从当前时代的时间: http://www.epochconverter.com/或者您也可以从大多数* nix系统使用此代码的命令行生成它:


$日期+ %s的
1369590088美元


这是习惯,这行代码也更改为从硬币的创建之日起,以它涉及到block.nTime与一些人类可读位标题:


'''的src / main.cpp的'''
线2005为const char * pszTimestamp = “传统人把东西及时在这里与时代相符” ;


现在,请注意靠近block.nTime的其他线路,他们被称为block.nNonce 。 A“随机数”的测量,是独特和n时间设定后出现的一个单位。该代码使用n时间+ nNonce制定和验证时间戳块和交易。这是这真的是如何工作的一个非常粗略的概述,但我希望它给你一个想法。我们会回来的nNonce在某一时刻,当我们挖掘一个起源块。


====生成默克尔哈希====


值得庆幸的是,这个论坛的帖子: https://bitcointalk.org/index.php?to...449 # msg2035449为我们提供了一个方法,通过硬币的试验网络功能来生成默克尔哈希。现在将是一个很好的时间来执行以下操作,将档案复制到您的存储库Github上:


barcoin % git add命令-A *
barcoin % git的承诺 - M“变化”
barcoin %混帐推主产地


不感觉不错你使用Github上像亲知道的吗?


====首先建立====


现在,你有一个新的副本与所有的切割和粘贴上传到Github上,我们已经准备好建立我们的命令行版本仅硬币的副本:


barcoin % CD的src /
barcoin / SRC %作-F makefile.osx USE_UPNP = - (或makefile.unix如果你在Linux / BSD /等)


该代码应建立干净,如果你只改变了什么你应该和你ahve安装了正确的依赖关系。你最终会与所谓的硬币的名称一个可执行与广告上月底,如果你在Linux上(即barcoin ( OSX /视窗) barcoind ( Linux)的。 “剥皮”额外的代码将创建一个更小的文件如果你愿意的话:


barcoin / SRC %带barcoin (增加Linux上的D, barcoind )


现在,我们希望从使用- TESTNET开关,像这样的命令行运行barcoin :


barcoin / SRC % / barcoin - TESTNET (增加Linux上的D, 。 / barcoind )


它会在第一次运行时立即失败,抛出像这样的错误:


断言失败: ( block.hashMerkleRoot == uint256 ( “0X” ) ) ,函数LoadBlockIndex ,文件main.cpp中,线2031 。
zsh的:中止/ barcoin 。


我们现在有一个默克尔哈希......等待,但在哪里呢?它是在你的硬币的“应用程序数据”目录中。在Linux上,这是在您的主文件夹,然后coinname等。 ​​:
〜 / barcoin 。
在OSX上,它会在你的库文件夹:
/用户/用户名/资源库/应用程序支持/ barcoin
如果你想以图形方式看到它,按住选项按钮,然后单击Finder的转到菜单,然后选择应用程序支持和barcoin文件夹。在Windows上,它会在应用程序数据漫游文件夹:
C: \用户\用户名\应用程序数据\漫游\ barcoin


在此文件夹,你会发现几个文件 - 这也是你会把你的硬币的conf文件时,我们就可以挖掘它,记得你是如何来到这里的文件夹。现在,打开调试日志,它会看起来像这样:


[ [ | { { https://i.imgur.com/H9l4OMl.png }}] ]


由于提利昂的惊人有用的帖子,我们可以破译这个调试出把像这样:


b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db1 78df5dd3b302fc使用不存在的默克尔,基于pzTimestamp从main.cpp的块散列
00000000000000000000000000000000000000000000000000 00000000000000创块,没有好,因为所有的nNonces在main.cpp中设置为0
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e1580794 51d9c6c90e4700有效默克尔散列,使用在main.cpp中的时代产生的时间


现在,采取有效默克尔Hash和中main.cpp中插入:


'''的src / main.cpp的'''
线2031断言( block.hashMerkleRoot == uint256 ( “ 0x2fc1b7ef46270c053711fbae934cf7f83378efd 4b3e158079451d9c6c90e4700 ”));


===创块===


党,我们现在做饭用气吧?如何做一个煤矿一个起源块?幸运的是,代码已经在源代码中能够做到这一点,所以不要担心。谁得到了初步的硬币?好了,没有人真的 - 有一种方法来做到这一点: https://bitcointalk.org/index.php?to...801 # msg2038801但我个人离开他们到网络空间的好人缘的令牌位神在发展教会( FinShaggy ,这意味着你,伙计。 )


==== TESTNET创世记座====


好了,现在你不需要重新上传到Github上,只是还没有,因为我们需要首先生成成因块为我们的网络。与默克尔的哈希到位,这一行:


'''的src / main.cpp的'''
线2034 ,如果(真&& block.GetHash ( ) ! = hashGenesisBlock )


如果设置为true (如上)将在下一次程序运行在我的一个成因块 - 与nNonce在代码开始( 0 ) 。让我们重新编译新默克尔哈希代码:


barcoin / SRC $彩妆-F makefile.osx USE_UPNP = - (或UNIX ,等等。 )


重新编译应该是相当快的,因为大部分的文件已经建成。一旦它的完成,使用该命令重新启动它:


barcoin / src目录$ 。 / barcoin - TESTNET


你会听到你的硬盘开始流失,它会看起来像硬币已冻结在窗口 - 但它不是冻结,其采矿根据您的新鲜的工作产生默克尔哈希值TESTNET一个起源块。如果你打开​​了''' debug.log中'''你会看到这个动作:


[ [ | { { https://i.imgur.com/DiOPE23.png }}] ]


是不是漂亮的?它高兴地散列块,每个随机数是由滴答作响。这需要多长时间?上酷睿i7 -2600它可能需要5-10分钟。在酷睿2 (像我的iMac ),它可能需要20-30分钟,甚至更长的时间。就让它做它的事,去获得一些欠幅脉冲 - 最终会找到一个它喜欢。这一次,它会在一个叫做''' debug.log中'''文件在你的硬币的conf文件夹把它写在给''' testnet3 '''文件夹:


断言失败: ( block.GetHash ( ) == hashGenesisBlock ) ,功能LoadBlockIndex ,文件main.cpp中,线2065 。
zsh的:中止/ barcoin - TESTNET


[ [ | { { https://i.imgur.com/88vYRuy.png }}] ]


啊哈哈!看到它在那里?有一个noonce和成因块的散列,成熟的采摘!


block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1 b3bc232c9a0b7f


现在,把这些在到main.cpp文件:


'''的src / main.cpp的'''
线1984 hashGenesisBlock = uint256 ( “ 0x5813d4cfab0eeda94a15d11c5e7d6895e667fbb e67c59ef9a1b3bc232c9a0b7f ”);


是的,你需要离开0X在哈希面前。您还需要输入nNonce :


'''的src / main.cpp的'''
线2024 block.nNonce = 440824 ;


需要注意的是main.cpp文件,我们刚才编辑的部分对应TESTNET和我们没有做主力资金净相当呢。这是因为,在这一点上,我通常会得到两个系统并在TESTNET运行,以确保他们能够挖掘硬币,然后我移动到主网。让我们拯救我们的变化,并将其上传到Github上,然后我们将进入到采矿的TESTNET :


barcoin % git add命令-A *
barcoin % git的承诺 - M“变化”
barcoin %混帐推主产地


====矿业TESTNET钱币====


首先第一件事情,重建你的硬币的可执行本地PC上:


barcoin / SRC %作-F makefile.osx USE_UPNP = - (或UNIX ,等等)


现在到了你需要两台计算机不同的IP地址的一部分。我觉得这是很容易做到的一个Linux VPS和我的家用电脑,所以这是我的榜样。两台机器在一个局域网应该工作,我相信2个或更多的虚拟机应该也一样,只要你能跟上的IP地址。连接到您的第二台机器,并建立,就像我们以前那样硬币的文件 - 因为你发送代码到Github上,不妨用你的新精英github上的skillz :


$ git clone命令https://github.com/barcoin/barcoin.git
克隆到barcoin
$ CD barcoin / SRC
barcoin / SRC $彩妆-F makefile.unix (我在Linux上我在这里) 。
barcoin / src目录$条barcoind


现在,我已经准备好运行它 - 在TESTNET模式,并与我的“其他”电脑的连接。这是一种棘手的,因为你需要启动在两台计算机上的硬币与'''连接= XXXX '''变量,每个与其他电脑的IP :


'''家用电脑 - iMac的'''
barcoin / SRC % / barcoin - TESTNET -CONNECT = 9.5.6.5 &


''' VPS - Linux的'''
barcoin / src目录$ 。 / barcoin - TESTNET连接= 66.77.32.56 &


添加与该命令将允许它在后台处理,并允许您继续喂硬币的命令,而无需打开第二个控制台窗口。


在第一次运行时,它会抱怨没有一个conf文件。 :
错误:您必须设置rpcpassword = <PASSWORD>在配置文件中:
/用户/用户名/资源库/应用程序支持/ barcoin / barcoin.conf
如果文件不存在,与所有者可读,只有文件的权限创建它。
我们建议您使用以下的随机密码:
rpcuser = barcoinrpc
rpcpassword = 6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptn YGwjt5
(你并不需要记住这个密码)
如果文件不存在,与所有者可读,只有文件的权限创建它。


创建这个文件,在任何你喜欢的格式,纳米的伟大工程,这和分配的RPC用户/密码。如果你想使用CGMiner / CPUMiner以后开采独唱,使这个东西,你会记得。如果您打算只使用内置的矿工客户的独奏采矿,只要剪切和粘贴自动生成的信息。这是相同的文件,你可能想设置一些bitcoin.conf命令中,这里是一个很好的参考: https://en.bitcoin.it/wiki/Running_B...iguration_File


*在OSX的这个文件是: ''' /用户/用户名/资源库/应用程序支持/ barcoin / barcoin.conf '''
*在Linux这个文件是''' 〜 / .barcoin / barcoin.conf '''
*在Windows上,这个文件是''' C:\用户\用户名\应用程序数据\漫游\ barcoin \巴可in.conf '''


边注:因为我使用的VPS对于这一点,我并不真的需要担心在为此端口转发。在家用PC ,您将要转发您在剪切和粘贴部分,您正在使用的电脑选择的P2Pport的端口。在这个例子中,就是端口55884 。


现在重新开始的硬币:


'''家用电脑 - iMac的'''
barcoin / SRC % / barcoin - TESTNET -CONNECT = 9.5.6.5 &


''' VPS - Linux的'''
barcoin / src目录$ 。 / barcoin - TESTNET连接= 66.77.32.56 &


现在是一个很好的时间去刷了命令行API调用语法的比特币客户端从这个wiki页面交互上: https://en.bitcoin.it/wiki/Original_...API_Calls_list


首先你要送:
barcoin / SRC % / barcoin程序getinfo


它应该返回是这样的:


'''家用电脑 - iMac的'''
barcoin / SRC % / barcoin程序getinfo
{
“版本” : 1000000 ,
“ protocolversion ” : 60001 ,
“ walletversion ” : 60000 ,
“平衡” : 0.00000000 ,
“块” : 0 ,
“连线” : 1 ,
“代理” : “ ” ,
“看病难” : 0.00024414 ,
“ TESTNET ” :真实,
“ keypoololdest ” : 1369621665 ,
“ keypoolsize ” : 101 ,
“ paytxfee ” : 0.00000000 ,
“ mininput ” : 0.00010000 ,
“错误” : “ ”
}


另一边看起来应该相同,而数字应该匹配。需要注意的是TESTNET不验证检查点,所以他们应该连接很容易(哦,这就是1BTC问题,但更多的是在有点...的另一面:


''' VPS - Linux的'''
/ barcoin / SRC $ 。 / barcoind程序getinfo
{
“版本” : 1000000 ,
“ protocolversion ” : 60001 ,
“ walletversion ” : 60000 ,
“平衡” : 0.00000000 ,
“块” : 0 ,
“连线” : 1 ,
“代理” : “ ” ,
“看病难” : 0.00024414 ,
“ TESTNET ” :真实,
“ keypoololdest ” : 1369622277 ,
“ keypoolsize ” : 101 ,
“ paytxfee ” : 0.00000000 ,
“ mininput ” : 0.00010000 ,
“错误” : “ ”
}


可爱的,它们排成行,每个都具有单独的连接。现在,我们可以让他们中的一个(或两个)首先使用下面的命令生成硬币:


barcoin / SRC % / barcoin setgenerate真正的16


该号码是你的处理器有多少线程想要投入,在我们开始接触的疯狂难度低,&#

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 08:17:59 AM
 #104

==How To Clone Scrypt Based Altcoins for Fun and Profit==


Wait a second, why would you want to give out the secrets?!? Because its not a secret anymore and besides, why shouldn't everyone and their neighbors be able to create a plethora of these useless yet exciting math bits? The information in this article took me a few weeks to compile and what works for me is not guaranteed to work for you. Please use this guide as a starting point to learn a bit about C programming and compiling software.


I will NOT do tech support--just because you can't get something to work doesn't entitle you to bother me about it. Go read, dig, and read some more. Nearly everything in this guide is posted in some form or another on bitcointalk.org's altcoin forum. The rest of it I meticulously tracked down through trial and error and a healthy dose of Googling. Things are meant to break, you'll need to figure out why and make it work. By the end of this guide you should have a working coin, p2p(irc) network, and clients for Linux (easy), Mac (a bit harder), and Windows (ugh).


===What do I need?===


*Source Code for a Scrypt Coin
*Working knowledge of and access to Linux or Mac command line--I'm not going to show Cygwin, but its similar.
*2 or more computers or virtual machines--I will be using my laptop and a Debian Wheezy based VPS.
*Text Editing Software--I'm using TextWrangler for Mac, but Netbeans, EmeraldEditor, or nano will work fine.
*Time and Patience...




Happy Fiddling!


===Github, Source Code, and Linux===


====Source Code====
First things first. You'll need some source code. Since I doubt you can write it from scratch (I couldn't), you should be happy to know there are a bazillion different options in the scrypt-coin family for you to clone and alter. My first coins were based on the most excellent research coin, SmallChange, by lightenup. His git diff output: https://github.com/bfroemel/smallcha...748f76a3d58326 is nearly enough information to completely create your own alt-coin and as such should be lauded. Yes, I realize his code is simply the Litecoin source with cut and paste changes, but hey--that's what we're working on here and he added some excellent comments throughout the code.


For the purposes of this tutorial and to preserve a "clean" copy of the SMC code, I have created foocoin: https://github.com/foocoin/foocoin This guide will show you how to turn 'foo'coin in to 'bar'coin and you can take it from there. I've already changed enough to make this coin compile-able if you follow this guide. If you'd prefer to start with the original SmallChange code, it is here: https://github.com/bfroemel/smallchange.git or you could use the Litecoin, Franko, YAC, CHN, MIN, whatever source--we'll change enough of it to make it work.


====Set up a Github account====


Now would be a good time to come up with a brilliantly unique name for your new coin. You can visit https://github.com/insertcoinnamehere and check to see if your coin's name is available. If it's not, just add -project or something witty and credibility boosting, maybe -nonprofit or -consortium would give your coin some gusto:


[[|{{https://i.imgur.com/8IxPN1X.png}}]]


Hey, look, barcoin isn't taken--we'd better snatch it right up! Simply go to https://github.com and fill-in the blanks:


[[|{{https://i.imgur.com/2KLsNXL.png}}]]


Now, lets make one of those sexy source code URL's that everyone can git pull from. What's git pull? Don't worry, you'll get the hang of it--look, you're learning new things already. In the upper right hand corner next to your username, click "Create Repository:"


[[|{{https://i.imgur.com/2xCXZfK.png}}]]


Now fill in the blanks:


[[|{{https://i.imgur.com/7S9Z7Bv.png}}]]


Click the green button and voila, you have Github. Now take note of this information:


[[|{{https://i.imgur.com/gXyQjh2.png}}]]


Because we're going to come back to that. Better yet, Bookmark it in your browser and open a new tab.


====Linux, Mac, Cygwin====


Yes, you need one of them. For this tutorial, I will be using a MacBook with OSX 10.8.something and a Debian Wheezy VPS. I suppose you can use Cygwin, but I prefer the *nix's to Windows any day and you may as well learn one more thing too, right? Shoot, if you need a good LiveCD with the dependencies already built in that is set up to be run in a VMWare session, try [[CDEbian]]. Otherwise this guide uses Debian which means most mainstream clones should work (i.e.: Ubuntu, XUbuntu, Mint).


Setting up a PC or VM with Linux or OSX is outside the scope of this tutorial, but suffice to say I can vouch for VMWare and its ability to run multiple VMs simultaneously and its ability to virtualize OSX 10.6.x. You will need to install some dependencies on which ever OS you choose to be able to build the daemon and -Qt wallet.


====Dependencies for OSX====


The easiest way I've found to install dependencies on OSX is to use MacPorts or Homebrew. Personally, I like MacPorts better than Homebrew, but its simply because MacPorts installs in /opt (where I think it should go) and because MacPorts offers universal builds by default. If you prefer Homebrew, the formulas are the same, but I'd recommend building with the --32-bit flag. For the purpose of this tutorial, we're going to use MacPorts.


One needs to install the following dependencies:
*boost (C++ libraries)
*db48 (Berkeley DB 4.
*qt4-mac (Open Source QT 4.8.4, includes qmake)
*openssl (ssl dev libraries)
*git (to move source back and forth to the repository)
*miniupnpc (UPNP dev libraries, optional--honestly I say skip this crap)


After installation of the basic MacPorts for your version of OSX, this can be accomplished with this command:
%sudo port install boost db48 qt4-mac openssl miniupnpc git
Once all of the dependencies are built and installed, the next step is to clone the source from git. In this example, I will be cloning foocoin, rename it, re-git initialize it, and push the initial copy out to Github to ensure git is working:
%git clone https://github.com/foocoin/foocoin.git
cloning in to foocoin
%mv foocoin barcoin
%cd barcoin
%rm -rf .git
%git init
initializing git repository in ~/barcoin
%git add -A *
%git commit -m "first commit"
%git remote add origin https://github.com/barcoin/barcoin.git
%git push -u origin master
username for git@github.com: barcoin
password for barcoin@github.com: **********


Now what did we just do? We cloned the existing source, deleted its link to git, reinitialized the folder for Github, added all the existing folders and files in to the repository, committed our changes (made them permanent and put them in the "Master" branch, renamed it in to our new *bigger *better *faster coin, set it back up to link to Github--but to the *new* coin's account, and pushed a copy out to Github. Now if you go and look at your page it should look like so:


[[|{{https://i.imgur.com/hQm9qn9.png}}]]


Oh, look at all that fresh source code just awaiting to be tweaked.


====Dependencies for Linux====


On Debian based Linux, dependencies and build requirements can be installed in a single command like so:
$sudo apt-get install sudo apt-get install build-essential libboost-all-dev libcurl4-openssl-dev libdb5.1-dev libdb5.1++-dev git qt-sdk libminiupnpc-dev
This will install all the needed packages as apt is very smart. Once that's complete, the same bits as above should be applied:
$git clone https://github.com/foocoin/foocoin.git
cloning in to foocoin
$mv foocoin barcoin
$cd barcoin
$rm -rf .git
$git init
initializing git repository in ~/barcoin
$git add -A *
$git commit -m "first commit"
$git remote add origin https://github.com/barcoin/barcoin.git
$git push -u origin master
username for git@github.com: barcoin
password for barcoin@github.com: **********


====Dependencies for Windows====


Ugh, I knew you'd ask. Windows is tricker than it should be when it comes to building with the GNU toolchain. First, you'll need mingw32 installed and dependencies built by hand for each of the listed items above. You'll also need to customize your -qt.pro file with the location of those dependencies. To simplify this, I've already compiled and assembled the needed dependencies in to a nice Github repository for you. If either downloaded and extracted as c:\deps or git cloned to C:\, this pacakge: https://github.com/foocoin/deps.git will give you everything you need to build foo(bar)coin using the source you've already got. More about building the long way when we get to the Windows client compilation bit a little further along in the project.


Now you're ready to Cut and Paste!
===Search and Replace===


Ahh, now we've come to the creative part. The bit where you change the things you want to change to make your coin yours. As this is a *cloning* tutorial, I am not going to focus on the intricacies of programming (I'm not qualified). I'm simply going to show you where to make the changes you need to make to get a coin up and running. For this step, I really prefer TextWrangler on my Mac. It allows for multiple file searching and replacing which makes this portion of the process go quite quickly. If you're going to set up a VM to build -Qt wallets for Mac anyway, you should/could simply install the dependencies above and build within OSX completely. TextWrangler is free.


====Names====


TextWrangler will allow you to open an entire folder of files. Just open the program and choose File, the Open, highlight the "barcoin" folder and click Open:


[[|{{https://i.imgur.com/kC106go.png}}]]


Ahh, nice, all of the code in one easy to use interface. Be aware, that editing these files most certainly can be done via nano or Netbeans, or whatever other text editor, even Notepad I suppose. I just like this one, 'cuz of this next feature. Now we need to replace all instances of "FooCoin, foocoin, and FOOCOIN" in our source with "BarCoin, barcoin, and BARCOIN." Note the 3 different case settings--most code has all three in it. To change this in TextWrangler, choose Search, then Multi File Search and select the "barcoin" directory:


[[|{{https://i.imgur.com/fTJKnc7.png}}]]


Do this for all three case settings, or if you prefer e.e.cummings style, replace them all without the "Case Sensitive" box checked in one fail swoop. TextWrangler will show you the whole list of changed files and allow you to browse the changes once completed:


[[|{{https://i.imgur.com/tJpf9LD.png}}]]


You will also want to replace all instances of "FOO" with "BAR." This is the 3 letter designation for your coin, like BTC or PPC. Finally, you will need to manually change the name of foocoin-qt.pro in the main source folder. Hey...this is starting to come together, no?


====Ports and Network Changes====


Ok, now we need to give the new coin a unique port range to use. You'll need two ports, one for RPC connections (for miners to connect to) and one for P2P Connections. You can find a good list of reserved ports here: http://en.wikipedia.org/wiki/List_of...P_port_numbers Most any ports will work assuming they are 1: Over port 1024 and 2: not used by something else. I'd suggest something in the high numbers, good examples include 56679 and 56680 or 12365 and 12366.


For this example we're going to use 55883 for RPC and 55884 for P2P. In the foocoin sources, these ports are already set, so go ahead and modify them using your text editor of choice.


Change the RPC/P2P Port in the following files:


'''src/bitcoinrpc.cpp''': (RPC PORT)
LINE 2893: ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 55883));
LINE 3169: if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "55883")))


'''src/init.cpp''': (P2P PORT + Testnet Port)
LINE 235 " -port=<port> " + _("Listen for connections on <port> (default: 55884 or testnet: 45884)") + "\n" +


You can set the testnet port to any other random port, but remember what you set it to.


'''src/init.cpp''': (RPC PORT)
LINE 271 " -rpcport=<port> " + _("Listen for JSON-RPC connections on <port> (default: 55883)") + "\n" +


'''src/protocol.h''': (Testnet Port + P2P PORT)
LINE 22 return testnet ? 45883 : 55884;


You can also set an initial "seed node" or always on system that the new coin wallets coming online will check for additional addresses:


'''src/net.cpp''':
LINE 1000 {"some website name", "somewebsite.org or ip x.x.x.x"},


====Coins Per Block/Block Intervals/Max Number of Coins====


These changes are also pretty simple. Change the following lines of code in the following files:


'''src/main.cpp''': (Number of coins per block awarded)
LINE 831 int64 nSubsidy = 1 * COIN;


'''src/main.cpp''': (How *should* blocks be found and how often difficulty retargets)
LINE 837 static const int64 nTargetSpacing = 120; // FooCoin: 2 minute blocks
LINE 836 static const int64 nTargetTimespan = 1 * 24 * 60 * 60; // FooCoin: 1 days


In this example, we want our coin to produce 1 coin blocks every 2 minutes and readjust difficulty once per day (1 day x 24 hours x 60 minutes x 60 seconds). You can adjust these, but know since this is a scrypt clone and we're not changing the starting difficulty this target rate will be skewed until the hash rate levels out on your new coin. This is tricky stuff and I don't quite understand all of it yet.


'''src/main.h''': (Total number of Coins ever and Estimated # of Blocks per day)
LINE 43 static const int64 MAX_MONEY = 10000 * COIN; // maximum number of coins
LINE 550 return dPriority > COIN * 720 / 250; // 720 blocks found a day.


You'll need to do some math to figure out your blocks per day target based on how many coins you want to create over what timespan and how far apart your blocks are. I'm not doing all the work for you! This coin is set to give 1 coin blocks every 2 minutes, targeting 720 blocks per day through a maximum of 10,000 coins which means if mined hard, it will run out of coins in a week's time.


====Address Starting Letter/Number====


The first digit or letter of the new coin's address is determined by a base-58 code. You can see a list of all of the available options here: https://en.bitcoin.it/wiki/Base58Check_encoding To change your coin's address edit this:


'''src/base58.h''':
LINE 280 PUBKEY_ADDRESS = 38, //Set the address first bit here


====Icons and Splash Images====


You will find all of the supporting images and icons for the wallet in the '''src/qt/res''' folder. There are two folders with icons you should pay attention to:


[[|{{https://i.imgur.com/uTDamJq.png}}]]
and
[[|{{https://i.imgur.com/2wJUutr.png}}]]


Foo and bar coins both use the default Litecoin imagery. You should use an image editing program of your choice (I like Photoshop CS3, but GIMP is also nice) to edit the images. If you want rounded icons/images, use transparent .png files. Also, don't forget to generate an .ico (Windows/Linux) and an .icns (Mac) icon file for your program. A great website I like to use for this is here: http://iconverticons.com/
===Merkel Hash===


The Merkel hash is the root of your coin's network. Its the hash that all of the blocks will be measured against and the basis for mining a genesis block. My methodology is to get a coin working on the testnet first and then the main network by building and testing in a staged progression. The Merkel hash is not actually the first thing you need to change though.


====Epoch Time====


Since Midnight UTC on New Years Day, 1970, Unix (or Epoch or POSIX) time has been used to coordinate various system calls and functions of Unix systems (and many others by default). Since this kind of time is simple seconds and doesn't account for leap seconds, its an easy way to calculate unique time-based values for programming. To that effect, the first thing one must change when building a new coin is the base time for the birth of the coin or the genesis of the coin.


This is set in two places in the code, one for the test net:


'''src/main.cpp''':
LINE 2023 block.nTime = 1300000000;


and one for the main net:


'''src/main.cpp''':
LINE 2017 block.nTime = 1300000000; //epochtime


You can get the current epoch time from: http://www.epochconverter.com/ or you can generate it from the command line of most *nix systems with this code:


$ date +%s
$ 1369590088


It is customary to also change this line of code to a headline from the day of coin creation in order to relate it to the block.nTime with some human-readable bit:


'''src/main.cpp''':
LINE 2005 const char* pszTimestamp = "Traditionally one puts something timely here coinciding with the epoch";


Now, notice the other lines near the block.nTime, they are called block.nNonce. A 'nonce' is a unit of measurement that is unique and occurs after the nTime is set. The code uses nTime+nNonce to formulate and validate timestamps for blocks and transactions. This is a VERY rough overview of how this really works, but I hope it gives you an idea. We will come back to the nNonce in a moment when we mine a genesis block.


====Generate a Merkel Hash====


Thankfully, this forum post: https://bitcointalk.org/index.php?to...449#msg2035449 gives us a method to generate the Merkel Hash via the coin's test net feature. Right now would be a good time to do the following and copy your files out to your Github repository:


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


Doesn't it feel good to know you're using Github like a pro?


====First Build====


Now that you have a fresh copy with all of your cut and pasting uploaded to Github, we're ready to build a copy of our command line only version of the coin:


barcoin% cd src/
barcoin/src% make -f makefile.osx USE_UPNP=- (or makefile.unix if you're on Linux/BSD/etc)


The code should build cleanly if you've only changed what you're supposed to and you ahve the right dependencies installed. You'll end up with a single executable called the name of your coin with a d on the end if you're on Linux (i.e. barcoin (osx/windows) barcoind (Linux). "Stripping" the extra code will create a smaller file if you so desire:


barcoin/src% strip barcoin (add the d on Linux, barcoind)


Now, we want to run barcoin from the command line using the -testnet switch like so:


barcoin/src% ./barcoin -testnet (add the d on Linux, ./barcoind)


It will immediately fail on first run, throwing out an error like so:


Assertion failed: (block.hashMerkleRoot == uint256("0x")), function LoadBlockIndex, file main.cpp, line 2031.
zsh: abort ./barcoin


We now have a Merkel hash...wait, but where? Its is in your coin's "Application Data" directory. On Linux, that's in your home folder, then a .coinname like:
~./barcoin.
On OSX, it's going to be in your Library folder:
/Users/username/Library/Application Support/barcoin
If you want to see it graphically, hold the option button and click the Finder's Go menu, then choose Application Support and the barcoin folder. On Windows it will be in the Application Data Roaming folder:
c:\Users\username\AppData\Roaming\barcoin


In this folder you'll find a few files--this is also the folder you'll put your coin's .conf file when we're ready to mine it so remember how you got here. Now, open debug log and it will look like this:


[[|{{https://i.imgur.com/H9l4OMl.png}}]]


Thanks to tyrion's amazingly helpful post, we can decipher this debug out put as so:


b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db1 78df5dd3b302fc Block hashed using the non-existent Merkel, based on the pzTimestamp from main.cpp
00000000000000000000000000000000000000000000000000 00000000000000 Genesis block, no good because all the nNonces are set to 0 in main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e1580794 51d9c6c90e4700 Valid Merkel Hash, generated using the epoch time in main.cpp


Now, take the valid Merkel Hash and insert it in to main.cpp:


'''src/main.cpp'''
LINE 2031 assert(block.hashMerkleRoot == uint256("0x2fc1b7ef46270c053711fbae934cf7f83378efd 4b3e158079451d9c6c90e4700"));


===Genesis Blocks===


Dang, we're cooking with gas now eh? How does one mine a genesis block? Luckily the code is already in the source to do just that so don't fret. Who gets the initial coins? Well, no one really--there is a way to do it: https://bitcointalk.org/index.php?to...801#msg2038801 but personally I leave them to cyber space as a token of good karma to the bit gods at the church of development (FinShaggy, this means you, mate.)


====Testnet Genesis Block====


Ok, now you don't need to re-upload to Github just yet, because we need to generate genesis blocks for our network first. With the Merkel hash in place, this line:


'''src/main.cpp'''
LINE 2034 if (true && block.GetHash() != hashGenesisBlock)


if set to true (as above) will mine a genesis block upon the next time the program is run--beginning with the nNonce in the code (0). Let's recompile the code with the new Merkel Hash:


barcoin/src$ make -f makefile.osx USE_UPNP=- (or .unix, whatever)


Recompilation should be pretty quick as most of the files have already been built. Once its done, start it again using this command:


barcoin/src$ ./barcoin -testnet


You will hear your hard drive start to churn and it will seem like the coin has frozen in the window--but its not frozen, its mining a genesis block for the testnet based on your freshly working generated Merkel Hash. If you open the '''debug.log''' you'll see this in action:


[[|{{https://i.imgur.com/DiOPE23.png}}]]


Isn't that nifty? Its hashing a block happily, each nonce is ticking by. How long will this take? On an i7-2600 it can take 5-10 minutes. On a Core2Duo (like my iMac) it can take 20-30 minutes, maybe longer. Just let it do its thing, and go get some runts-- eventually it will find one that it likes. This time it will write it in to the '''testnet3''' folder under your coin's conf folder in a file called '''debug.log''':


Assertion failed: (block.GetHash() == hashGenesisBlock), function LoadBlockIndex, file main.cpp, line 2065.
zsh: abort ./barcoin -testnet


[[|{{https://i.imgur.com/88vYRuy.png}}]]


Ah ha! See it there? There's a noonce and a genesis block hash, ripe for the plucking!


block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1 b3bc232c9a0b7f


Now, put these in to the main.cpp file:


'''src/main.cpp''':
LINE 1984 hashGenesisBlock = uint256("0x5813d4cfab0eeda94a15d11c5e7d6895e667fbb e67c59ef9a1b3bc232c9a0b7f");


Yes, you need to leave the 0x in front of the hashes. You also need to enter the nNonce:


'''src/main.cpp''':
LINE 2024 block.nNonce = 440824;


Note that the sections of the main.cpp file we just edited correspond to the testnet and we haven't done the main net quite yet. This is because at this point, I usually get two systems up and running on the testnet to make sure they can mine coins and then I move on to the main net. Lets save our changes, and upload them to Github and then we'll move on to mining on the testnet:


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


====Mining Testnet Coins====


First things first, rebuild your coin's executable on your local PC:


barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, whatever)


Now comes the part where you need two computers with distinct IP addresses. I find this easy to do with a Linux VPS and my home PC, so that's my example. Two machines on a LAN should work, and I believe 2 or more virtual machines should work too, as long as you're able to keep up with the IP addresses. Connect to your second machine and build the coin's file just as we did before--since you sent the code to Github, may as well use your new elite github skillz:


$ git clone https://github.com/barcoin/barcoin.git
cloning in to barcoin
$ cd barcoin/src
barcoin/src$ make -f makefile.unix (I'm on Linux here).
barcoin/src$ strip barcoind


Now I'm ready to run it--in testnet mode and with a connection to my "other" computer. This is kind of tricky, because you need to start the coin on both computers with the '''-connect=x.x.x.x''' variable, each with the IP of the other PC:


'''Home PC - iMac''':
barcoin/src% ./barcoin -testnet -connect=9.5.6.5 &


'''VPS - Linux''':
barcoin/src$ ./barcoin -testnet -connect=66.77.32.56 &


Add the & to the command will allow it to process in the background and allow you to continue to feed the coin commands without opening a second console window.


On the first run, it will complain about not having a .conf file:
error: You must set rpcpassword=<password> in the configuration file:
/Users/username/Library/Application Support/barcoin/barcoin.conf
If the file does not exist, create it with owner-readable-only file permissions.
It is recommended you use the following random password:
rpcuser=barcoinrpc
rpcpassword=6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptn YGwjt5
(you do not need to remember this password)
If the file does not exist, create it with owner-readable-only file permissions.


Create this file, in whatever format you prefer, nano works great for this and assign an RPC user/password. If you want to use CGMiner/CPUMiner to mine solo later, make this something you'll remember. If you plan to only use the client's built in miner for solo mining, just cut and paste the auto generated info. This is the same file you may want to set up some of the bitcoin.conf commands in, here's a good reference: https://en.bitcoin.it/wiki/Running_B...iguration_File


*On OSX this file is: '''/Users/username/Library/Application Support/barcoin/barcoin.conf'''
*On Linux this file is '''~/.barcoin/barcoin.conf'''
*On Windows, this file is '''c:\users\username\appdata\roaming\barcoin\barco in.conf'''


Side note: because I use a VPS for this, I don't really need to worry about port forwarding at that end. On the home PC, you will want to forward the port you chose for P2Pport in the cut and paste section to the PC you're using. For this example, that is port 55884.


Now start the coin again:


'''Home PC - iMac''':
barcoin/src% ./barcoin -testnet -connect=9.5.6.5 &


'''VPS - Linux''':
barcoin/src$ ./barcoin -testnet -connect=66.77.32.56 &


Now's a good time to brush up on the command line API calls syntax for interacting with the bitcoin client from this wiki page: https://en.bitcoin.it/wiki/Original_...API_Calls_list


First you'll want to send:
barcoin/src% ./barcoin getinfo


It should return something like this:


'''Home PC - iMac''':
barcoin/src%./barcoin getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369621665,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


The other side should look the same and the numbers should match. Note that testnet doesn't verify checkpoints, so they should connect pretty easily (oooh, that's the 1BTC question, but more on that in a bit...the other side:


'''VPS - Linux'''
/barcoin/src$./barcoind getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369622277,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


Lovely, they line up and each have a single connection. Now we can make one of them (or both) begin generating coins by using the following command:


barcoin/src% ./barcoin setgenerate true 16


The number is how many threads of your processor you want to devote, at the insanely low difficulty we're starting out with, this should be plenty to generate a few blocks. You won't see the results in real time, rather you'll need to issue the following command and evaluate the info:


barcoin/src% ./barcoin getmininginfo
{
"blocks" : 0,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1432,
"networkhashps" : -9223372036854775808,
"pooledtx" : 0,
"testnet" : true
}


Success! See that '''hashespersec'''? The internal scrypt miner is now doing its thing and making you some blocks. You'll have to issue the getmininginfo command a few times before it starts to count up in the block count. In just a few minutes you should be able to see:


barcoin/src$./barcoind getmininginfo
{
"blocks" : 1,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1376,
"networkhashps" : 32,
"pooledtx" : 0,
"testnet" : true
}


Woah doggie, we have blocks. Now verify that your other sees the blocks by doing a getinfo on your '''other''' computer:


barcoin/src%./barcoin getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 1,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369621665,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


Well, whatta ya know? Whatta ya say we mine some mainnet coins?


====Main Net Genesis Block====


So really all we need to do now is update main.cpp with a new epoch time, in the main net section this time and mine a genesis block the similarly to the way we did it on testnet. First, stop the coind from running on both your local and remote computers by issuing the command:


barcoin/src% ./barcoind stop
Barcoin is stopping


Next, go back to your development PC and edit main.cpp with a new block.nTime:


'''src/main.cpp''':
LINE 2017 block.nTime = 1369623856; //epochtime


Now, recompile the coin again from the command line:


barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, whatever, ha!)


Now run the coin again, but this time don't include the -testnet switch:


barcoin/src% ./barcoin &


It will again seem to be frozen while it mines the genesis block and your processor will likely go to 100% utilization. Be patient, this took Satoshi 6 days or some shit, right? Again, if you have a Mac, watching it mine with the system log viewer is pretty fun--and then Success:


[[|{{https://i.imgur.com/Elpzv6F.png}}]]


Now, we just do the same as we did on the testnet, and make these changes to main.cpp:


'''src/main.cpp''':
LINE 32 uint256 hashGenesisBlock("0xbf9385c680c3a7aec778b6dcf87dbf b105369d55143fc99ebe86f469cd53ddca");
LINE 2019 block.nNonce = 1345972;
LINE 2034 if (false && block.GetHash() != hashGenesisBlock)


====Checkpoints====


Changing line 2034 to false will keep clients from trying to hash their own genesis block should something be awry. One more file to change:


'''src/checkpoints.cpp'''
LINE 27 ( 0, uint256("0xbf9385c680c3a7aec778b6dcf87dbfb105369d5 5143fc99ebe86f469cd53ddca"))


This is the "trick." Remember I said, there was a trick? This is it. Hash 0 in this file needs to be set to the genesis block hash, so do it and rejoice as you've now nearly finished creating your clone! Should you want to make your coin "legit" you'll want to revisit this file in the future and add other checkpoints in to it--but that's a bit we'll save for the end of the guide. Lets send our changes to Github before we build:


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


Ok, we're ready to rebuild on the first pc:


barcoin% cd src/
barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, blah...)
strip barcoin


Now on the second pc (assuming its Linux here):


~$ cd barcoin
barcoin$ git pull
updating git...wait wait...done!
barcoin$ cd src/
barcoin/src$ make -f makefile.unix USE_UPNP=-
strip barcoind


Ooo laa laa, we're done here. Now we can mine us some coinz!


====Mining Main Net Coins====


The process here is the same as the testnet, but without the -testnet switch. Start'er up:


'''Home PC - iMac''':
barcoin/src% ./barcoin -connect=9.5.6.5 &


'''VPS - Linux''':
barcoin/src$ ./barcoin -connect=66.77.32.56 &


Verify with getinfo:


barcoin/src%./barcoind getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : false,
"keypoololdest" : 1369627515,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


Get a new address:


barcoin getnewaddress
GeeNLCk9KfQQ35wPpf2faYdqHEU5KW4Khn


Start one of them (or both of them mining) and verify it:


barcoin/src%./barcoind setgenerate true 16
barcoin/src%./barcoind getmininginfo
{
"blocks" : 0,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1417,
"networkhashps" : -9223372036854775808,
"pooledtx" : 0,
"testnet" : false
}


Ooooooh myyyyyy gooooooooood, right? Its making blocks of our new Barcoin (or is it a BAR to consolidate your digital wealth? I mean, shoot, there's only a weeks worth at pump and dump mining rates right?) Soon you will see: '''"blocks" : 1,''' and then that number will start to climb. Now's the time you could set up the barcoin.conf client to accept connections from your LAN and point your dualie-7970 boxen at it or perhaps a minerd. Its ready to rock and roll at this point.


Things to remember:


*You're basically done here. The command line version can do everything the -Qt can.
*Blocks take 120 confirms, so you'll need to leave a system mining even at just a few hashses to keep your network going. I like to leave my VPS mining at just a few Kh/s and use it as the seed node so that the network is always confirming even if its very slow.
*You're basically done here. But no, you're not--lets make some GUI wallets.
===Compiling the -Qt Wallets===


Ok, so this will make or break your coin if you plan to distribute it. Before I go deep in to this, know that the source code for foocoin is customized to make building as easy as possible on Windows (the hardest system to build for). It is also fairly easy to build a Mac version, but at this point I'm having trouble redistributing the Mac versions with the other PC having the same dependencies installed. As for Linux, surprisingly enough, its the easiest to build for and if you installed all the dependencies from the top section of the guide you'll be able to knock it out with two commands.


====Mac OSX -Qt====


I'm starting with this one simply to go inline with dependencies order above. In order to keep things tidy on my iMac I created a virtual machine loaded with OSX 10.6.8, Snow Leopard. This was pretty straight forward using VMWare Fusion. After install and software updating, I installed XCode 3.2.6, which contains a working non-llvm version of gcc and its free from Apple here: http://connect.apple.com/cgi-bin/Web...bundleID=20792 A simple install, no frills, make sure all the objects are checked for installation.


Next, I installed MacPorts this version: https://distfiles.macports.org/MacPo...nowLeopard.pkg and then the dependencies listed in the first section ala:

xcode%sudo port install boost db48 qt4-mac openssl miniupnpc git


After a bit of time, all goodies are installed so we'll clone the coin's software in the regular fashion:


xcode% git clone https://github.com/barcoin/barcoin.conf
xcode% cd barcoin


Now, something a tad different this time, we need to run qmake instead of make. Do that like so:


barcoin% qmake "USE_UPNP=-" barcoin-qt.pro


Yes, you need the " " around USE_UPNP=- and yes, this may produce some strange looking results, something like this:


Project MESSAGE: Building without UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.


Now, lets build it:


barcoin% make -f Makefile


Go, go, go, do not look back. After a bit you'll see it finish and an icon should appear in the barcoin folder:


[[|{{https://i.imgur.com/8MvDciR.png}}]]


Now launch that and voila! A Mac barcoin wallet:


[[|{{https://i.imgur.com/NiE3Bnh.png}}]]


Just like the Windows and Linux wallets, you may want to add '''addnode=x.x.x.x''' where the x.x.x.x is the IP of your seed node. This won't be needed after a few clients begin connecting to the network, eventually they will begin talking to each other via IRC.


====Linux -Qt====


This is by a long shot the easiest wallet to compile, but its hindered by two things for distribution: Linux has very small market share, though for a personal or club coin, what the hell right? and Most Linux users will compile their own software so you'll not likely get far distributing a Linux executable (as well you shouldn't). My example here is based on Debian and should equate to most Debian/Ubuntu flavors.


Now, since we already built a system and installed the dependencies in the first bit--wait, you didn't? You did it all on Windows? Nice. You should write a guide next time! Now, where were we...oh yes, you already have a working coin building system, so lets just stick with it. First things first:


cd ~/barcoin
barcoin% qmake "USE_UPNP=-"


Thinking, thinking, output:
Project MESSAGE: Building without UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.


Now, build it:


barcoin$ make


Yeah, seriously, that's it. Just 'make.' Ha--Debian is so beautiful, is it not? Ok now after a bit of churning and burning it will finish.




====Windows -Qt====


This is the trickiest one to crack of the GUI wallets. I am going to detail how I got this to work and offer you an easy way to get the dependencies in an attempt to make this work for you too. That said, it may not--and I've already said I won't do tech support. So here's the deal. I got this to work and then duplicated it on a second machine to ensure it wasn't a fluke! Most of the information needed to compile the basic coind.exe or GUI wallet is in this thread: https://bitcointalk.org/index.php?topic=149479.0 Unfortunately nothing is as easy as it seems, and although the MinGW and QT installs went fine, I couldn't compile it without a few tweaks to the .pro file.


'''If you don't want to install these dependencies by hand, clone https://github.com/foocoin/deps.git in to C:\''' If not, here's how to do it manually:


Begin by installing MinGW32 from here: https://sourceforge.net/downloads/mingw Go ahead and install the whole bloody thing if you like, but at least the "C Compiler", "C++ Compiler" and "MSYS Basic System" components. Everything else leave stock, next, next, next kind of thing.


Next, install ActivePerl 32 or 64 bit from here: http://www.activestate.com/activeperl/downloads Again, standard install, next, next, next and so forth.


Now open the "MinGW System Shell" from Start - Programs and you'll basically have a Linux prompt:


[[|{{https://i.imgur.com/D97N35X.png}}]]


Now make a /c/deps folder to keep our files in:


$mkdir /c/deps
$cd /c/deps


Now download the following files and put them in C:\Deps:
*OpenSSL: http://www.openssl.org/source/openssl-1.0.1e.tar.gz
Install it like so:
/c/deps$ tar xvfz openssl-1.0.1e.tar.gz
/c/deps$ cd openssl-1.0.1e
/c/deps$ ./config
/c/deps$ make
*Berkeley DB 4.8: http://download.oracle.com/berkeley-...8.30.NC.tar.gz
Install it like so:
/c/deps$ tar xvfz db-4.8.30.NC.tar.gz
/c/deps$ cd db-4.8.30.NC/build_unix
/c/deps$ ../dist/configure --disable-replication --enable-mingw --enable-cxx
*Boost: http://sourceforge.net/projects/boos.../boost/1.53.0/
For this one, open a regular command (CMD) window and do the following:
cd \deps\boost-1.53.0\
bootstrap.bat mingw
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc stage


For simplicity's sake, my versions are simply named deps\boost; deps\ssl; etc. If you build your own, either rename the folders in \deps OR change the paths to suit your changes in the coin-qt.pro file. Remember to change the Boost suffix too to match the version you compile with!


At this point you're ready to build normal non-Qt coin wallets on windows. Go ahead and check the thread at the beginning of this section if you'd like to know how. We're making a GUI though:


Next, install the Qt-MiniGW32 4.8.4 Build from here: http://download.qt-project.org/offic....8.4-mingw.exe Again, all normal installation options, next next next...you know the drill. Once QT is installed, you will find a program in Start - All Programs - Qt by Digia - Qt Command Prompt:


[[|{{https://i.imgur.com/BKhouBL.png}}]]


Fire it up and it will look pretty much like a DOS box:


[[|{{https://i.imgur.com/JGDXB9V.png}}]]


Now since we don't have git on this our Windows computer (you can install it if you want, Cygwin is a good way to do that) you must download the barcoin-master.zip file from http://github.com/barcoin and extract it to the PC. For this example, we'll put it in c:\. One last thing we need to do before we compile for Windows. We need to edit the "barcoin-qt.pro" file to enable the Windows libs, includes, and correct ordering for some of the syntax:


'''barcoin/barcoin-qt.pro''':
LINES 11-22, UNCOMMENT ALL OF THESE TO ENABLE WINDOWS BUILDS:
#windows:LIBS += -lshlwapi
#LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
#LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
#windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32
#LIBS += -lboost_system-mgw46-mt-sd-1_53 -lboost_filesystem-mgw46-mt-sd-1_53 -lboost_program_options-mgw46-mt-sd-1_53 -lboost_thread-mgw46-mt-sd-1_53
#BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53
#BOOST_INCLUDE_PATH=C:/deps/boost
#BOOST_LIB_PATH=C:/deps/boost/stage/lib
#BDB_INCLUDE_PATH=c:/deps/db/build_unix
#BDB_LIB_PATH=c:/deps/db/build_unix
#OPENSSL_INCLUDE_PATH=c:/deps/ssl/include
#OPENSSL_LIB_PATH=c:/deps/ssl


IF YOU BUILT YOUR OWN dependencies, then also change the paths in the file above to suit their locations, use / instead of \, yea--its odd. Now go back to your Qt Command Shell window and build the same way we built on the other platforms:


c:\Qt-Builder> cd \barcoin-master\src
c:\barcoin-master\src> qmake "USE_UPNP=- barcoin-qt.pro
c:\barcoin-master\src> make -f Makefile.Release


Wait for a bit...and once its done, you'll find a folder called "release" under the main barcoin-master folder containing the .exe and a .cpp file:


[[|{{https://i.imgur.com/hR3PMJA.png}}]]


This isn't enough to redistribute though, to make the file run you'll need to include the QT and gcc libs along with the file. I've put them on a git repository here: https://github.com/foocoin/windows-qt-addins.git Just download the 6 files and insert them in to the "release" folder along with the .exe and .cpp:


[[|{{https://i.imgur.com/TApTWZ4.png}}]]


To redistribute, simply rename the "release" folder and zip it up! You can now run the .exe file on Windows:


[[|{{https://i.imgur.com/14ZEXqN.png}}]]


Woah, hey look at that, we already have a balance! Actually, I'd sent the 10 BAR to this computer from the one I left mining all night. If you don't have many connections to the network, you may need to add a line like so to your %appdata%\barcoin\barcoin.conf:


addnode=IP ADDRESS OF YOUR SEED NODE


If you created a seed node, it should connect but if not, simply add a node. Once a few clients begin connecting they will use IRC to connect to each other, so the addnode should only be needed for the initial wallet connections.



Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 08:20:11 AM
 #105

== Cómo clonar Scrypt Basadas Altcoins por diversión y dinero ==


Espera un segundo , ¿por qué quiere dar a conocer los secretos ? ! ? Debido a que no es un secreto y, además , ¿por qué no todo el mundo y sus vecinos será capaz de crear una gran cantidad de estos bits de matemáticas todavía emocionantes inútiles ? La información de este artículo me tomó un par de semanas para compilar y lo que funciona para mí, no se garantiza que funcione para usted. Por favor, utilice esta guía como punto de partida para aprender un poco sobre programación C y el software de compilación .


No voy a hacer de soporte técnico - sólo porque usted no puede conseguir algo para trabajar no le da derecho a molestarme en ello . Ve y lee , cavar, y leer un poco más . Casi todo en esta guía se puede encontrar en una u otra forma en el foro altcoin bitcointalk.org ' s . El resto de lo que meticulosamente rastreó a través de ensayo y error y una buena dosis de buscar en Google . Las cosas están destinadas a romper , tendrá que averiguar por qué y hacer que funcione. Al final de esta guía usted debe tener una moneda de trabajo , p2p ( IRC ) de la red, y los clientes de Linux ( fácil), Mac (un poco más duro) y Windows ( ugh ) .


=== ¿Qué necesito ? ===


* Código fuente para un Scrypt Coin
* Conocimiento de trabajo y el acceso a Linux o la línea de comandos de Mac - No voy a mostrar Cygwin , pero su similar.
* 2 o más ordenadores o máquinas virtuales - Me va a utilizar mi ordenador portátil y un VPS basado en Debian Wheezy .
* Edición de texto Software - estoy usando TextWrangler para Mac , pero Netbeans , EmeraldEditor o nano no tendrán ningún problema .
* El tiempo y la paciencia ...




Feliz Fiddling !


=== Github , Código Fuente, y Linux ===


==== Código Fuente ====
Lo primero es lo primero . Usted necesitará algo de código fuente . Como yo dudo que usted puede escribir desde cero (no podían) , usted debe ser feliz de saber que hay un bazillion diferentes opciones en la familia scrypt - moneda para clonar y modificar . Mis primeras monedas se basaron en la más excelente moneda de investigación, SmallChange , por LightenUP . Su salida de git diff : https://github.com/bfroemel/smallcha...748f76a3d58326 es información suficiente para crear por completo su propio alt- moneda y como tal debe ser alabado . Sí , me doy cuenta de su código es simplemente la fuente Litecoin con cortar y pegar los cambios , pero bueno - eso es lo que estamos trabajando aquí y añadió algunos comentarios excelentes en todo el código.


A los efectos de este tutorial y para preservar una copia " limpia " del código SMC , he creado foocoin : https://github.com/foocoin/foocoin Esta guía le mostrará cómo convertir ' foo'coin para ' bar'coin y se puede tomar desde allí . Yo ya he cambiado lo suficiente como para hacer que esta moneda de compilación capaz si sigue esta guía . Si prefiere empezar con el código original SmallChange , es aquí : https://github.com/bfroemel/smallchange.git o usted podría utilizar el Litecoin , Franko , YAC , CHN , MIN , independientemente de su origen - que Cambiaremos lo suficiente como para hacer que funcione.


==== Configurar una cuenta de Github ====


Ahora sería un buen momento para venir con un nombre brillante único para su nueva moneda. Usted puede visitar https://github.com/insertcoinnamehere y comprobar para ver si el nombre de su moneda está disponible. Si no es así, sólo tiene que añadir - proyecto o algo ingenioso y credibilidad impulso , tal vez - sin fines de lucro o consorcio daría su moneda más entusiasmo :


[ [ | { { https://i.imgur.com/8IxPN1X.png } }]]


Hey , mira, barcoin no se toma - we'd mejor arrebatar derecha para arriba! Simplemente vaya a https://github.com y rellenar los espacios en blanco :


[ [ | { { https://i.imgur.com/2KLsNXL.png } }]]


Ahora, vamos a hacer uno de los URL sexy de código fuente que todo el mundo puede git pull de . ¿Cuál es git pull ? No se preocupe, usted conseguirá la caída de ella - mira, estás aprendiendo cosas nuevas ya . En la esquina superior derecha de tu nombre de usuario, haga clic en "Crear Repositorio: "


[ [ | { { https://i.imgur.com/2xCXZfK.png } }]]


Ahora llenar los espacios en blanco :


[ [ | { { https://i.imgur.com/7S9Z7Bv.png } }]]


Haga clic en el botón verde y listo, usted tiene Github . Ahora tome nota de esta información :


[ [ | { { https://i.imgur.com/gXyQjh2.png } }]]


Porque vamos a volver a eso. Mejor aún, un marcador en el navegador y abrir una nueva pestaña.


==== Linux , Mac, Cygwin ====


Sí , se necesita uno de ellos. Para este tutorial, voy a usar un MacBook con OSX 10.8.something y Debian Wheezy VPS . Supongo que se puede utilizar Cygwin , pero prefiero los * nix de Windows cualquier día y usted puede también aprender una cosa más , ¿no? Dispara, si necesitas una buena LiveCD con las dependencias ya construidas en la que está configurado para ejecutarse en una sesión de VMWare , trate [ [ CDEbian ] ] . De lo contrario, esta guía utiliza Debian que significa la mayoría de los clones dominantes deben trabajar (es decir : Ubuntu , Xubuntu , Mint ) .


Configuración de un PC o máquina virtual con Linux o OSX está fuera del alcance de este tutorial , pero basta con decir que puedo dar fe de VMWare y su capacidad de ejecutar varias máquinas virtuales de forma simultánea y su capacidad para virtualizar OSX 10.6.x Usted tendrá que instalar algunas dependencias en los que jamás OS usted elige a ser capaces de construir el demonio y Qt cartera.


==== Dependencias para OSX ====


La forma más sencilla que he encontrado para instalar las dependencias en OSX es usar MacPorts o Homebrew . Personalmente, me gusta MacPorts mejor que Homebrew, pero su simplemente porque MacPorts se instala en / opt (donde creo que debería ir ) y porque MacPorts ofrece universales construye de forma predeterminada. Si prefiere Homebrew, las fórmulas son las mismas, pero recomiendo la construcción con la bandera - de 32 bits. A los efectos de este tutorial, vamos a usar MacPorts .


Uno tiene que instalar las siguientes dependencias:
* Elevación ( bibliotecas de C + + )
* DB48 ( Berkeley DB 4 .
* qt4 -mac (Open Source QT 4.8.4 , incluye qmake )
* openssl ( bibliotecas dev ssl )
* git ( para mover la fuente de ida y vuelta en el repositorio)
* miniupnpc (bibliotecas dev UPNP , opcional - honestamente me dicen omitir esta mierda )


Después de la instalación de los MacPorts básicos para su versión de OSX, esto se puede lograr con este comando:
% sudo port instalar impulso DB48 qt4 -mac miniupnpc openssl git
Una vez que todas las dependencias están construidas e instaladas , el siguiente paso es clonar la fuente de git . En este ejemplo , voy a estar clonando foocoin , cambiarle el nombre, re- git inicializarlo , y empuje la copia inicial a Github para garantizar git está trabajando :
% git clone https://github.com/foocoin/foocoin.git
clonación para foocoin
% mv foocoin barcoin
% barcoin cd
% rm -rf . git
% git init
inicializar el repositorio git en ~ / barcoin
% git add -A *
% git commit -m " primero comprometerse "
% git remoto añadir origen https://github.com/barcoin/barcoin.git
% git push -u origin master
nombre de usuario para git@github.com : barcoin
contraseña para barcoin@github.com : **********


Ahora lo qué acabamos de hacer ? Hemos clonado la fuente existente , eliminado su enlace con git , reinicializa la carpeta de Github , añadimos todas las carpetas y archivos existentes en el repositorio, comprometidos nuestros cambios ( hecho permanente y ponerlos en la rama de "Maestro" , rebautizado en a nuestra nueva moneda * grande * mejor * más rápido , ponga una copia de seguridad para ligarse a Github - sino a la nueva * Cuenta * de moneda, y empujó una copia a Github Ahora bien, si usted va y mira a su página debe mirar. de este modo:


[ [ | { { https://i.imgur.com/hQm9qn9.png } }]]


Oh , mira todo ese código fuente fresca sólo en espera de ser ajustado .


==== Dependencias para Linux ====


En basadas en Debian Linux , dependencias y construir los requerimientos se puede instalar en un solo comando de esta forma:
$ sudo apt- get install sudo apt- get install build-essential libboost -all- dev libcurl4 - openssl -dev libdb5.1 -dev libdb5.1 + +- dev git qt- sdk libminiupnpc -dev
Esto instalará todos los paquetes necesarios como apt es muy inteligente. Una vez que está completo, los mismos bits como más arriba se deben aplicar :
$ git clone https://github.com/foocoin/foocoin.git
clonación para foocoin
$ barcoin foocoin mv
$ barcoin cd
$ rm -rf . git
$ git init
inicializar el repositorio git en ~ / barcoin
$ git add- A *
$ git commit -m " primero comprometerse "
$ git add remoto origen https://github.com/barcoin/barcoin.git
$ git push -u origin master
nombre de usuario para git@github.com : barcoin
contraseña para barcoin@github.com : **********


==== Dependencias para Windows ====


Ugh , yo sabía que ibas a preguntar . Windows es Tricker de lo que debería ser cuando se trata de construir con la cadena de herramientas GNU . En primer lugar , usted necesitará mingw32 instalados y dependencias construidas por la mano de cada uno de los elementos indicados anteriormente . Usted también tendrá que personalizar su archivo - qt.pro con la ubicación de dichas dependencias. Para simplificar esto, yo ya he compilado y reunido las dependencias necesarias para un buen repositorio de Github para usted. Si bien descargado y extraído como c: \ deps o git clonado a C: \ , esto pacakge : https://github.com/foocoin/deps.git le dará todo lo que necesita para construir foo ( bar) de la moneda usando la fuente que ya tienes . Más sobre la construcción del largo camino cuando lleguemos al bit compilación de cliente de Windows un poco más adelante en el proyecto.


Ahora ya está listo para cortar y pegar !
=== Buscar y reemplazar ===


Ahh, ahora que hemos llegado a la parte creativa . La parte en la que cambia las cosas que quiere cambiar para hacer que sus monedas tuyo . Como se trata de un * clonación * tutorial , yo no me voy a centrar en las complejidades de la programación (no estoy cualificado). Simplemente voy a mostrar dónde hacer los cambios que necesita hacer para conseguir una moneda en marcha y funcionando . Para este paso , yo realmente prefiero TextWrangler en mi Mac . Permite múltiples archivos buscar y reemplazar lo que hace que esta porción del proceso de ir con bastante rapidez . Si vas a crear una máquina virtual para construir - Qt carteras para Mac de todos modos, usted debe / puede simplemente instalar las dependencias de arriba y armá dentro OSX completo. TextWrangler es gratis.


==== Nombres ====


TextWrangler le permitirá abrir una carpeta completa de archivos . Sólo tienes que abrir el programa y seleccione Archivo , Abrir, seleccione la carpeta " barcoin " y haga clic en Abrir :


[ [ | { { https://i.imgur.com/kC106go.png } }]]


Ahh, bueno , todo el código en una interfaz fácil de usar . Tenga en cuenta, que la edición de estos archivos con toda seguridad se puede hacer a través de nano o Netbeans , o cualquier otro editor de texto, incluso el Bloc de notas , supongo. Yo al igual que éste, ' cuz de la siguiente función. Ahora tenemos que sustituir todas las instancias de " FooCoin , foocoin y FOOCOIN " en nuestra fuente con " BarCoin , barcoin y BARCOIN . " Tenga en cuenta los 3 ajustes de caso diferentes - la mayoría del código tiene los tres en el mismo. Para cambiar esto en TextWrangler , seleccione Buscar y, a continuación multi Buscar archivo y seleccione el directorio " barcoin ":


[ [ | { { https://i.imgur.com/fTJKnc7.png } }]]


Haga esto durante los tres ajustes de caso, o si lo prefiere el estilo eecummings , reemplazarlos todos sin la caja " Case Sensitive " marcada en una redada de fallar . TextWrangler le mostrará toda la lista de ficheros cambiados y permitirá navegar por los cambios una vez completados :


[ [ | { { https://i.imgur.com/tJpf9LD.png } }]]


Usted también querrá reemplazar todas las instancias de " FOO " con " BAR ". Esta es la designación de 3 letras para su moneda, como el BTC o PPC . Por último , tendrá que cambiar manualmente el nombre de foocoin - qt.pro en la carpeta de fuente principal. Hey ... esto está empezando a unirse, no?


==== Puertos y cambios en la red ====


Ok , ahora tenemos que dar a la nueva moneda de un rango de puerto exclusivo para su uso. Tendrá dos puertos , uno para las conexiones RPC ( para los mineros se conecten a ) y otro para las conexiones P2P. Usted puede encontrar una buena lista de puertos reservados aquí: http://en.wikipedia.org/wiki/List_of...P_port_numbers más los puertos trabajarán suponiendo que son 1 : a través del puerto 1024 y 2 : no se utiliza por otra cosa. Te sugiero algo en los números altos , buenos ejemplos incluyen 56.679 y 56.680 o 12.365 y 12.366 .


Para este ejemplo vamos a utilizar 55.883 para RPC y 55.884 para el P2P. En las fuentes foocoin , estos puertos ya están establecidas, así que adelante y modificarlos usando el editor de texto de su elección.


Cambie el Puerto RPC/P2P en los siguientes archivos :


'' ' src / bitcoinrpc.cpp ''': ( PUERTO RPC)
LINEA 2893 : ip tcp :: :: endpoint punto final ( BindAddress , GetArg (" rpcport " , 55883 ));
LINEA 3169 : if ( d.connect ( GetArg (" rpcconnect ", " 127.0.0.1" ) , GetArg (" rpcport ", " 55883 ")) !)


'' ' src / init.cpp ''': (P2P PUERTO + TestNet Puerto)
LÍNEA 235 " -port = <puerto> " + _ (" esperan conexiones en <puerto> (por defecto: 55884 o testnet : 45884 ) ") + " \ n " +


Usted puede establecer el puerto testnet a cualquier otro puerto aleatorio , pero recuerda lo que se propuso a .


'' ' src / init.cpp ''': ( PUERTO RPC)
LÍNEA 271 " - rpcport = <puerto> " + _ (" escuchar conexiones JSON- RPC en <puerto> (por defecto: 55883 ) ") + " \ n " +


'' ' src / protocol.h ''': ( TestNet Port + P2P PORT)
LÍNEA 22 testnet cambio? 45883 : 55.884 ;


También puede establecer un " nodo de semilla" inicial o siempre en el sistema que las nuevas carpetas de la moneda viene en línea va comprobar direcciones adicionales :


'' ' src / net.cpp ''':
LÍNEA DE 1000 { "algún nombre del sitio web ", " somewebsite.org o xxxx ip" } ,


==== Monedas Intervalos Per Bloquear / Bloque / Max Número de monedas ====


Estos cambios también son bastante simples . Cambie las siguientes líneas de código en los siguientes archivos :


'' ' src / main.cpp ''' : (Número de monedas por bloques adjudicados )
LÍNEA 831 int64 nSubsidy = 1 * COIN ;


'' ' src / main.cpp ''': ( * Cómo deberían * bloques se encuentran y con qué frecuencia dificultad retargets )
Bloques de 2 minutos : / / FooCoin ; LÍNEA 837 static const int64 nTargetSpacing = 120
LÍNEA 836 static const int64 nTargetTimespan = 1 * 24 * 60 * 60 / / FooCoin : 1 día


En este ejemplo, queremos que nuestra moneda para producir bloques de 1 moneda cada 2 minutos y vuelva a ajustar la dificultad una vez al día (1 día x 24 horas x 60 minutos x 60 segundos ) . Puede ajustar estos, pero sabe ya que es un clon scrypt y no va a modificar la dificultad de iniciar este tipo de objetivo se sesgada hasta que los niveles de los tipos de hash a cabo en su nueva moneda. Esto es algo complicado y yo no entiendo muy bien todo eso todavía.


'' ' src / main.h ''': (número total de monedas nunca y # estimada de los bloques por día )
LÍNEA 43 static const int64 MAX_MONEY = 10000 * COIN / / número máximo de monedas
LÍNEA 550 retorno dPriority > COIN * 720/250 / / 720 bloques encontraron un día .


Tendrá que hacer un poco de matemáticas para calcular sus bloques por objetivo día a base de la cantidad de monedas que usted desea crear más de lo que intervalo de tiempo y lo lejos que sus bloques son . No voy a hacer todo el trabajo por usted! Esta moneda se fija para dar 1 cuadras de monedas cada 2 minutos , dirigido a 720 bloques por día a través de un máximo de 10.000 monedas de lo que significa si minada duro , se ejecutará fuera de monedas dentro de una semana .


==== Dirección de inicio Carta / Número ====


El primer dígito o letra de la dirección de la nueva moneda es determinada por un código de base -58. Puede ver una lista de todas las opciones disponibles aquí: https://en.bitcoin.it/wiki/Base58Check_encoding Para cambiar la dirección de edición de su moneda de esto:


'' ' src/base58.h ''':
LÍNEA 280 PUBKEY_ADDRESS = 38 , / / Establecer el primer bit de dirección aquí


==== Iconos y Splash Imágenes ====


Va a encontrar todas las imágenes de apoyo y los iconos de la cartera en 'src / qt / res ''' del '' carpeta. Hay dos carpetas con iconos que usted debe prestar atención a:


[ [ | { { https://i.imgur.com/uTDamJq.png } }]]
y
[ [ | { { https://i.imgur.com/2wJUutr.png } }]]


Foo y bar monedas utilizan el Litecoin imágenes predeterminado. Debe utilizar un programa de edición de imágenes de su elección (me gusta Photoshop CS3 , pero GIMP también es bonito) para editar las imágenes . Si quieres iconos redondeados / imágenes , utilice transparente. Png . También, no se olvide de generar un archivo. Ico (Windows / Linux) y un archivo. Icns (Mac ) Archivo de icono de su programa. Una gran página web que me gusta usar para esto está aquí : http://iconverticons.com/
=== Merkel Hash ===


El hash de Merkel es la raíz de la red de su moneda. Su el hash que todos los bloques se medirá en contra y la base para la minería un bloque génesis . Mi metodología es conseguir una moneda a trabajar en el testnet primero y luego la red principal mediante la construcción y las pruebas en una progresión por etapas. El hash Merkel no es en realidad la primera cosa que hay que cambiar aunque.


==== ==== Epoch Tiempo


Desde medianoche UTC del día de Año Nuevo de 1970 , Unix (o Epoch o POSIX) el tiempo ha sido utilizada para coordinar las diversas llamadas del sistema y las funciones de los sistemas Unix (y muchos otros por defecto). Dado que este tipo de tiempo es segundo simples y no da cuenta de segundos de salto , su una manera fácil de calcular los valores basados en el tiempo únicas para la programación . A tal efecto , lo primero que hay que cambiar la hora de construir una nueva moneda es la base de tiempo para el nacimiento de la moneda o la génesis de la moneda.


Esto se establece en dos lugares del código , uno para la red de prueba :


'' ' src / main.cpp ''':
LINEA 2023 block.nTime = 1300000000 ;


y uno para la red principal :


'' ' src / main.cpp ''':
LINEA 2017 block.nTime = 1300000000 ; / / epochtime


Usted puede obtener el tiempo actual época de: http://www.epochconverter.com/ o puede generar desde la línea de comandos de la mayoría de los sistemas * nix con este código:


$ Date +% s
$ 1369590088


Se acostumbra a cambiar también esta línea de código para un titular del día de la creación de la moneda con el fin de relacionarlo con el block.nTime con algunos poco legible :


'' ' src / main.cpp ''':
LINEA 2005 const char * pszTimestamp = "Tradicionalmente uno pone algo puntual aquí coincidiendo con la época" ;


Ahora , observe las otras líneas cercanas al block.nTime , se les llama block.nNonce . A ' nonce "es una unidad de medida que es único y se produce después de que el nTime está establecido. El código utiliza nTime + nNonce formular y validar las marcas de tiempo de los bloques y las transacciones. Esta es una visión muy aproximada de cómo esto realmente funciona , pero espero que te da una idea. Vamos a volver a la nNonce en un momento en que extraemos un bloque génesis .


==== Generar un hash Merkel ====


Afortunadamente , este post en el foro : https://bitcointalk.org/index.php?to...449 # msg2035449 nos da un método para generar el hash Merkel mediante la función neta de prueba de la moneda. Ahora sería un buen momento para hacer lo siguiente y copiar los archivos a su repositorio Github :


barcoin % git add -A *
barcoin % git "cambios" -m cometer
barcoin % git push origin master


¿No se siente bien saber que usted está utilizando Github como un profesional ?


==== Primera Build ====


Ahora que tiene una copia nueva con toda su corte y pegar subido a Github , estamos listos para construir una copia de nuestra línea de comandos única versión de la moneda:


barcoin % cd src /
barcoin / src % make-f USE_UPNP makefile.osx = - (o makefile.unix si estás en Linux / BSD / etc )


El código debe construir limpiamente si sólo ha cambiado lo que se supone que debes y te tomarse las dependencias correctas instaladas . Usted va a terminar con un solo ejecutable llamado el nombre de su moneda con anuncio en el final , si estás en Linux (es decir barcoin ( osx / ventanas ) barcoind (Linux ) . " Pela" el código extra creará un archivo más pequeño si así lo desea :


barcoin / src % extracción barcoin ( añadir el d en Linux, barcoind )


Ahora, queremos correr barcoin desde la línea de comandos mediante el modificador- testnet de este modo:


barcoin / src %. / barcoin - testnet ( añadir el d en Linux, . / barcoind )


Se dejará de inmediato en la primera ejecución , arrojando un error de este modo:


Error de aserción : ( block.hashMerkleRoot == uint256 ( "0x ")) , la función LoadBlockIndex , archivo main.cpp , línea 2031 .
zsh : abortar / barcoin .


Ahora tenemos un hash Merkel ... espera , ¿pero dónde? Su está en el directorio de su moneda " Datos de programa " . En Linux, que está en la carpeta de inicio , a continuación, un coinname similares. :
~ . / barcoin .
En OSX, que va a estar en la carpeta de la biblioteca:
/ Users / usuario / Library / Application Support / barcoin
Si usted quiere ver gráficamente , sostenga el botón de opción y haga clic en el menú Ir del Finder , luego elija Soporte de aplicaciones y la carpeta barcoin . En Windows estará en la carpeta Application Data Roaming :
c: \ Users \ nombre de usuario \ AppData \ Roaming \ barcoin


En esta carpeta encontrará algunos archivos - esta es también la carpeta a la que voy a poner conf de su moneda cuando estamos listos para extraerlo a fin de recordar cómo llegaste aquí . . Ahora, registro de depuración abierto y que se verá así:


[ [ | { { https://i.imgur.com/H9l4OMl.png } }]]


Gracias a increíblemente útil post de Tyrion , podemos descifrar este depuración fuera puesto como tan :


b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db1 78df5dd3b302fc Bloquear hash utilizando la inexistente Merkel , basado en la pzTimestamp de main.cpp
00000000000000000000000000000000000000000000000000 00000000000000 Génesis bloque, no es bueno , porque todos los nNonces se establecen en 0 en main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e1580794 51d9c6c90e4700 Válido Merkel Hash , generado utilizando el tiempo de época en main.cpp


Ahora, toma el hash Merkel válida e insertarlo en que main.cpp :


'' ' src / main.cpp '''
LINEA 2031 assert ( block.hashMerkleRoot == uint256 ( " 0x2fc1b7ef46270c053711fbae934cf7f83378efd 4b3e158079451d9c6c90e4700 "));


=== Bloques Genesis ===


Dang , estamos cocinando con gas ahora eh ? ¿Cómo funciona una mina de un bloque génesis ? Por suerte, el código ya está en la fuente para hacer precisamente eso , así que no se preocupe . ¿Quién recibe las monedas iniciales ? Bueno, en realidad nadie - hay una manera de hacerlo : https://bitcointalk.org/index.php?to...801 # msg2038801 pero personalmente me los dejan al espacio cibernético como una muestra de buen karma a la dioses bits en la iglesia de desarrollo ( FinShaggy , esto significa que usted , amigo. )


==== TestNet Génesis Bloquear ====


Ok , ahora usted no tiene que volver a subir a Github todavía, porque tenemos que generar bloques génesis de nuestra red primero . Con el hash Merkel en su lugar, esta línea:


'' ' src / main.cpp '''
LINEA 2034 si (true && block.GetHash () ! = HashGenesisBlock )


si se define como true (como antes) extraerá un bloque génesis en la próxima vez que el programa se ejecuta - comenzando con el nNonce en el código ( 0 ) . Vamos a volver a compilar el código con el nuevo Hash Merkel :


barcoin / src $ make -f makefile.osx USE_UPNP = - ( o UNIX, lo que sea. )


Recopilación debería ser bastante rápido ya que la mayoría de los archivos que ya se han construido . Una vez que su hecho, comenzar de nuevo con este comando :


barcoin / src $ . / barcoin - testnet


Usted escuchará el disco duro empieza a batir y va a parecer que la moneda ha congelado en la ventana - pero no congelado , sus minas de un bloque de génesis para el testnet basado en su trabajo recién generada Merkel Hash . Si abre ' debug.log ''' del '' verás esto en acción :


[ [ | { { https://i.imgur.com/DiOPE23.png } }]]


¿No es ingenioso ? Su hash un bloque felizmente , cada nonce no se detiene por . ¿Cuánto tiempo llevará esto? En un i7 -2600 puede tardar 5-10 minutos. En un Core2Duo (como mi iMac ) que puede tomar 20 a 30 minutos , tal vez más. Simplemente deja que haga su trabajo , y ve a buscar algunos enanos - con el tiempo se encontrará uno que le guste . Esta vez va a escribirlo a ' testnet3 ''' del '' carpeta bajo la carpeta conf de su moneda en un archivo llamado '' ' debug.log ''':


Error de aserción : ( block.GetHash () == hashGenesisBlock ), función LoadBlockIndex , archivo main.cpp , línea 2065 .
zsh : . abort / barcoin - testnet


[ [ | { { https://i.imgur.com/88vYRuy.png } }]]


Ah , ja! Verlo allí? Hay una noonce y un hash de bloque génesis, maduros para el desplume !


block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1 b3bc232c9a0b7f


Ahora, ponga esto en el fichero main.cpp :


'' ' src / main.cpp ''':
LINEA 1984 hashGenesisBlock = uint256 ( " 0x5813d4cfab0eeda94a15d11c5e7d6895e667fbb e67c59ef9a1b3bc232c9a0b7f ");


Sí , tiene que salir de la 0x delante de los hashes. También es necesario para entrar en el nNonce :


'' ' src / main.cpp ''':
LINEA 2024 block.nNonce = 440.824 ;


Tenga en cuenta que las secciones del archivo main.cpp que acaba de editar corresponden a la testnet y no hemos hecho la red principal todavía. Esto se debe a que en este punto, por lo general obtener dos sistemas en funcionamiento en la testnet para asegurarse de que pueden explotar las monedas y luego pasar a la red principal. Permite guardar los cambios , y subirlos a Github y luego vamos a pasar a la minería en el testnet :


barcoin % git add -A *
barcoin % git "cambios" -m cometer
barcoin % git push origin master


==== Minería TestNet monedas ====


Lo primero es lo primero , reconstruir ejecutable de su moneda en su PC local:


barcoin / src % make-f makefile.osx USE_UPNP = - ( . o UNIX, lo que sea)


Ahora viene la parte en la que se necesitan dos equipos con direcciones IP distintas. Esto me parece fácil de hacer con un VPS Linux y PC de mi casa , así que eso es mi ejemplo. Dos máquinas en una LAN deben trabajar , y creo que 2 o más máquinas virtuales deben trabajar demasiado , siempre y cuando usted es capaz de mantenerse al día con las direcciones IP . Conéctese a la segunda máquina y crear archivos de la moneda tal como lo hicimos antes - desde el envío del código en Github , puede también utilizar su nuevo Skillz github elite :


$ Git clone https://github.com/barcoin/barcoin.git
clonación para barcoin
Barcoin $ cd / src
barcoin / src $ make -f makefile.unix (estoy en Linux aquí).
barcoin / src $ franja barcoind


Ahora estoy listo para ejecutarlo - en modo testnet y con una conexión a mi equipo "otro" . Esto es un poco complicado, ya que es necesario para iniciar la moneda en ambos equipos con el '' ' -connect = xxxx ''' variables, cada uno con la IP de la otra PC:


'' ' Home PC - iMac ''':
barcoin / src %. / barcoin - testnet -connect = 9.5.6.5 y


' VPS - Linux ''' '' :
barcoin / src $ . / barcoin - testnet - connect = 66.77.32.56 y


Añadir el y al comando le permitirá procesar en el fondo y le permite continuar para alimentar a los comandos de monedas sin tener que abrir una segunda ventana de la consola .


En la primera carrera , que se quejan de no tener un archivo de conf . :
error: Debe establecer rpcpassword = <contraseña> en el fichero de configuración:
/ Users / usuario / Library / Application Support / barcoin / barcoin.conf
Si no existe el archivo , lo crea con los permisos de archivos proceden de los propietarios de lectura - solamente.
Se recomienda utilizar la siguiente contraseña aleatoria :
rpcuser = barcoinrpc
rpcpassword = 6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptn YGwjt5
( no es necesario para recordar esta contraseña )
Si no existe el archivo , lo crea con los permisos de archivos proceden de los propietarios de lectura - solamente.


Crear este archivo, en el formato que prefiera , nano funciona muy bien para esto y asignar una RPC de usuario / contraseña. Si desea utilizar CGMiner / CPUMiner a la mía en solitario después, hacer esto algo que usted recordará. Si va a utilizar sólo el cliente incorporado en la minera para la explotación minera en solitario, acaba de cortar y pegar el auto genera información . Este es el mismo archivo se pueden configurar algunos de los comandos bitcoin.conf en , aquí hay una buena referencia : https://en.bitcoin.it/wiki/Running_B...iguration_File


* En OSX este archivo es :'' ' / Users / usuario / Library / Application Support / barcoin / barcoin.conf '''
* En Linux este archivo es '' ' ~ / .barcoin / barcoin.conf '''
* En Windows, este archivo es '' ' c: \ users \ nombre de usuario \ AppData \ Roaming \ barcoin \ barco in.conf '''


Nota al pie: porque yo uso un VPS para esto, yo realmente no tengo que preocuparme de reenvío de puertos en ese extremo. En el PC de su casa , tendrá que remitir el puerto que eligió para P2Pport en la sección de cortar y pegar en el PC que está utilizando. Para este ejemplo , que es el puerto 55884 .


Ahora empieza la moneda otra vez :


'' ' Home PC - iMac ''':
barcoin / src %. / barcoin - testnet -connect = 9.5.6.5 y


' VPS - Linux ''' '' :
barcoin / src $ . / barcoin - testnet - connect = 66.77.32.56 y


Ahora es un buen momento para poner al día la línea de comandos llamadas API sintaxis para la interacción con el cliente bitcoin de esta página wiki: https://en.bitcoin.it/wiki/Original_...API_Calls_list


Primero usted desea enviar :
barcoin / src %. / barcoin getinfo


Debe devolver algo como esto:


'' ' Home PC - iMac ''':
barcoin / src %. / barcoin getinfo
{
"versión" : 1000000 ,
" ProtocolVersion ": 60001 ,
" walletversion ": 60000,
" equilibrar ": 0.00000000 ,
"bloques" : 0,
"conexiones" : 1,
" proxy" : "",
"dificultad" : 0.00024414 ,
" testnet ": true,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"errores" : ""
}


El otro lado debe ser la misma y el número debe coincidir . Tenga en cuenta que testnet no verifica los puntos de control , por lo que debe conectarse con bastante facilidad (oooh , esa es la pregunta 1BTC , pero más sobre esto en un poco ... el otro lado :


'VPS - Linux ''' ''
/ barcoin / src $ . / barcoind getinfo
{
"versión" : 1000000 ,
" ProtocolVersion ": 60001 ,
" walletversion ": 60000,
" equilibrar ": 0.00000000 ,
"bloques" : 0,
"conexiones" : 1,
" proxy" : "",
"dificultad" : 0.00024414 ,
" testnet ": true,
" keypoololdest " : 1369622277 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"errores" : ""
}


Lovely, se alinean y cada uno tiene una sola conexión. Ahora podemos hacer que uno de ellos ( o ambos) empezar a generar las monedas utilizando el siguiente comando:


barcoin / src %. / barcoin setgenerate verdadero 16


El número es el número de hilos de su procesador que quieres dedicar , al increíblemente baja dificultad que estamos empezando con , esto debería ser suficiente para generar un par de cuadras . Usted no va a ver los resultados en tiempo real , y no tendrá que ejecutar el siguiente comando y evaluar la información :


barcoin / src %. / barcoin getmininginfo
{
"bloques" : 0,
" currentblocksize " : 1000 ,
" currentblocktx " : 0 ,
"dificultad" : 0.00024414 ,
"errores" : "" ,
"generar" : true,
" genproclimit ": 16 ,
" hashespersec ": 1432,
" networkhashps ": -9223372036854775808 ,
" pooledtx " : 0 ,
" testnet ": true
}


¡Éxito! Ver que " hashespersec '' ' '' ? El minero scrypt interno está ahora haciendo su cosa y hacer que algunos bloques . Vas a tener que ejecutar el comando getmininginfo un par de veces antes de que empiece a contar hasta el número de bloque . Pocos minutos usted debería ser capaz de ver :


barcoin / src $ . / barcoind getmininginfo
{
"bloques" : 1,
" currentblocksize " : 1000 ,
" currentblocktx " : 0 ,
"dificultad" : 0.00024414 ,
"errores" : "" ,
"generar" : true,
" genproclimit ": 16 ,
" hashespersec " : 1376 ,
" networkhashps ": 32 ,
" pooledtx " : 0 ,
" testnet ": true
}


Woah perrito, tenemos bloques. Ahora comprobar que el otro ve los bloques haciendo una getinfo en "otro '' ' computadora de su '':


barcoin / src %. / barcoin getinfo
{
"versión" : 1000000 ,
" ProtocolVersion ": 60001 ,
" walletversion ": 60000,
" equilibrar ": 0.00000000 ,
"bloques" : 1,
"conexiones" : 1,
" proxy" : "",
"dificultad" : 0.00024414 ,
" testnet ": true,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"errores" : ""
}


Bueno, whatta ¿sabes? Whatta dicen extraemos algunas monedas MainNet ?


==== Principal Net Génesis Bloquear ====


Así que en realidad todo lo que necesitamos hacer ahora es actualizar main.cpp con un nuevo tiempo de la época , en la principal sección neta este tiempo y el mío un bloque génesis de la forma similar a la forma en que lo hicimos en testnet . En primer lugar, detener la Coind se ejecute en ambos equipos locales y remotos con el comando :


barcoin / src %. / barcoind detener
Barcoin se detiene


A continuación, vuelve a tu PC de desarrollo y edición main.cpp con un nuevo block.nTime :


'' ' src / main.cpp ''':
LINEA 2017 block.nTime = 1369623856 ; / / epochtime


Ahora, volver a compilar la moneda de nuevo desde la línea de comandos :


barcoin / src % make-f USE_UPNP makefile.osx = - ( . ! o UNIX, lo que sea, ha)


Ahora ejecute la moneda de nuevo, pero esta vez no incluya la opción- testnet :


barcoin / src %. / barcoin y


Será de nuevo parece estar inactiva mientras que las minas del bloque génesis y su procesador es probable que vaya a la utilización del 100 %. Sea paciente, esto tuvo Satoshi 6 días o algo de mierda , ¿no? Una vez más , si usted tiene un Mac, viendo la mía con el visor de registro del sistema es bastante divertido - y luego el éxito:


[ [ | { { https://i.imgur.com/Elpzv6F.png } }]]


Ahora, acabamos de hacer lo mismo que hicimos en el testnet , y hacer que estos cambios main.cpp :


'' ' src / main.cpp ''':
LÍNEA 32 uint256 hashGenesisBlock ( " 0xbf9385c680c3a7aec778b6dcf87dbf b105369d55143fc99ebe86f469cd53ddca ");
LINEA 2019 block.nNonce = 1345972 ;
LINEA 2034 if ( false && block.GetHash () ! = HashGenesisBlock )


Los puestos de control ==== ====


Cambio de la línea 2034 en false mantendrá los clientes traten de hash de su propio bloque génesis debe ser algo mal. Un archivo más para cambiar :


'' ' src / checkpoints.cpp '''
LÍNEA 27 ( 0 , uint256 ( " 0xbf9385c680c3a7aec778b6dcf87dbfb105369d5 5143fc99ebe86f469cd53ddca "))


Este es el " truco". Recuerda que dije , no era un truco ? Esto es todo. Hash 0 en este archivo necesitará fijarse al bloque de hash génesis , por lo que hacerlo y se regocijan como has ahora casi terminado de crear su clon ! Si desea hacer su moneda " de fiar " querrás volver a visitar este archivo en el futuro y agregar otros puntos de control en a ella - pero eso es un poco vamos a guardar para el final de la guía . Vamos a enviar nuestros cambios a Github antes de construir :


barcoin % git add -A *
barcoin % git "cambios" -m cometer
barcoin % git push origin master


Ok , estamos listos para reconstruir en el primer pc:


barcoin % cd src /
barcoin / src % make-f USE_UPNP makefile.osx = - ( . o unix , bla ... )
tira barcoin


Ahora, en el segundo pc ( asumiendo su Linux aquí) :


~ $ Cd barcoin
tirón barcoin $ git
actualizar git ... espera , espera ... hecho !
barcoin $ cd src /
barcoin / src $ make -f makefile.unix USE_UPNP = -
tira barcoind


Ooo laa laa , hemos terminado aquí . Ahora nos podemos extraer algunas Coinz !


==== Monedas Minería principal netas ====


El proceso aquí es el mismo que el testnet , pero sin la opción- testnet . Start'er máximo:


'' ' Home PC - iMac ''':
barcoin / src %. / barcoin -connect = 9.5.6.5 y


' VPS - Linux ''' '' :
barcoin / src $ . / barcoin - connect = 66.77.32.56 y


Verifique con getinfo :


barcoin / src %. / barcoind getinfo
{
"versión" : 1000000 ,
" ProtocolVersion ": 60001 ,
" walletversion ": 60000,
" equilibrar ": 0.00000000 ,
"bloques" : 0,
"conexiones" : 1,
" proxy" : "",
"dificultad" : 0.00024414 ,
" testnet ": false,
" keypoololdest " : 1369627515 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"errores" : ""
}


Obtener una nueva dirección :


getnewaddress barcoin
GeeNLCk9KfQQ35wPpf2faYdqHEU5KW4Khn


Inicie uno de ellos (o ambos minería ) y verificar que :


barcoin / src %. / barcoind setgenerate verdadero 16
barcoin / src %. / barcoind getmininginfo
{
"bloques" : 0,
" currentblocksize " : 1000 ,
" currentblocktx " : 0 ,
"dificultad" : 0.00024414 ,
"errores" : "" ,
"generar" : true,
" genproclimit ": 16 ,
" hashespersec ": 1417,
" networkhashps ": -9223372036854775808 ,
" pooledtx " : 0 ,
" testnet ": false
}


Ooooooh myyyyyy gooooooooood , ¿verdad? Sus haciendo bloques de nuestro nuevo Barcoin ( ? ? O es un BAR para consolidar su patrimonio digital, quiero decir , disparar , sólo hay una semanas en la bomba y de volcado de las tasas de explotación derecha) Pronto verá :'' ' "bloques" : 1 '' ', y luego ese número comenzará a subir. Ahora es el momento en que puedas configurar el cliente barcoin.conf para aceptar conexiones de red LAN y señalar sus boxen dualie - 7970 en ello o tal vez un MINERD . Su listo para el rock and roll en este punto.


Cosas a tener en cuenta :


* Usted está básicamente hecho aquí . La versión de línea de comandos puede hacer todo el Qt pueda.
* Los bloques tienen 120 confirma , por lo que tendrás que dejar un minero del sistema incluso en tan sólo unos hashses para mantener su red en marcha. Me gusta dejar mi minería VPS en tan sólo unos Kh / s y lo utilizan como el nodo de semilla para que la red siempre está confirmando incluso si su muy lento.
* Usted está básicamente hecho aquí . Pero no , no lo eres - vamos a hacer algunas carteras GUI.
=== Compilar los qt Monederos ===


Ok , así que esto va a hacer o romper su moneda si usted planea distribuirlo. Antes de entrar profundamente en esto, sé que el código fuente de foocoin está personalizado para hacer la construcción más fácil posible en Windows (el sistema más difícil de construir para ) . También es bastante fácil de construir una versión para Mac , pero en este momento estoy teniendo problemas para redistribuir las versiones para Mac con el otro PC que tenga las mismas dependencias instaladas . En cuanto a Linux, por sorprendente que parezca , es el más fácil de construir y de si se ha instalado todas las dependencias de la sección superior de la guía usted será capaz de noquear a dos comandos.


==== Mac OSX - Qt ====


Estoy empezando con esto simplemente para ir en línea con las dependencias de orden de arriba. Con el fin de mantener las cosas ordenadas en mi iMac he creado una máquina virtual cargado con OSX 10.6.8 , Snow Leopard . Esto fue bastante sencillo utilizando VMWare Fusion. Después de instalar y actualizar el software , he instalado XCode 3.2.6 , que contiene una versión no llvm trabajo de gcc y su libre de Apple aquí: http://connect.apple.com/cgi-bin/Web...bundleID = 20792 Un simple de instalar, sin florituras , asegúrese de que todos los objetos se comprueba la instalación.


A continuación, he instalado MacPorts esta versión: https://distfiles.macports.org/MacPo...nowLeopard.pkg y luego las dependencias enumeradas en la primera sección del ala :

Xcode % sudo port instalar impulso DB48 qt4 -mac miniupnpc openssl git


Después de un poco de tiempo, todas las golosinas están instalados de manera que vamos a clonar el software de la moneda de la manera habitual :


Xcode % git clone https://github.com/barcoin/barcoin.conf
Xcode % barcoin cd


Ahora, algo un poco diferente esta vez , tenemos que ejecutar qmake en lugar de make. Hazlo así:


barcoin % qmake " USE_UPNP = - " barcoin - qt.pro


Sí , se necesita el " " alrededor USE_UPNP = - y sí, esto puede producir algunos resultados extraños que buscan , algo como esto :


MENSAJE Proyecto: Edificio sin la ayuda UPNP
Formas plurales eliminados como el idioma de destino tiene menos formas .
Si esto suena mal, posiblemente, el idioma de destino no está establecida o reconocida.


Ahora, vamos a construirlo :


barcoin % make-f Makefile


Vaya , vaya, vaya , no mirar hacia atrás . Después de un poco verás que terminar y un icono debe aparecer en la carpeta barcoin :


[ [ | { { https://i.imgur.com/8MvDciR.png } }]]


Ahora que lanzar y ¡voilá! Un Mac barcoin cartera :


[ [ | { { https://i.imgur.com/NiE3Bnh.png } }]]


Al igual que las carteras de Windows y Linux , es posible que desee agregar '' ' addnode = xxxx ''' donde xxxx es la dirección IP del nodo de semillas. Esto no será necesario después de algunos clientes empiezan conectarse a la red , con el tiempo van a empezar a hablar entre sí a través de IRC .


==== Linux- Qt ====


Este es por mucho la cartera más fácil de compilar , pero su obstaculizada por dos cosas para su distribución : Linux tiene muy pequeña cuota de mercado , aunque por una moneda personal o club, lo que la derecha infierno? y los usuarios de más de Linux compilar su propio software por lo que no es probable conseguir mucho la distribución de un ejecutable de Linux (y no debería) . Mi ejemplo aquí está basada en Debian y debe equivaler a la mayoría de los sabores de Debian / Ubuntu.


Ahora , puesto que ya construimos un sistema e instalamos las dependencias en el primer bit - espera , no lo hiciste ? Hiciste todo en Windows? Niza. Usted debe escribir una guía la próxima vez! Ahora , ¿dónde estábamos ... ah, sí , ya tiene un sistema de construcción de la moneda de trabajo , por lo que deja apenas se pega con él . Lo primero es lo primero :


cd ~ / barcoin
barcoin % qmake " USE_UPNP = - "


Pensando , pensando, salida :
MENSAJE Proyecto: Edificio sin la ayuda UPNP
Formas plurales eliminados como el idioma de destino tiene menos formas .
Si esto suena mal, posiblemente, el idioma de destino no está establecida o reconocida.


Ahora, su construcción :


barcoin $ make


Sí, en serio , eso es todo. Sólo ' hacer '. Ha - Debian es tan hermoso, ¿no es así ? Ok ahora, después de un poco de agitación y la quema terminará .




==== Windows Qt ====


Este es el más difícil de roer de las carteras de GUI. Voy a detalle cómo conseguí que esto funcione y le ofrecen una manera fácil de obtener las dependencias en un intento de hacer que esto funcione para usted también. Dicho esto , puede que no - y ya he dicho que no voy a hacer de soporte técnico. Así que éste es el trato . Tengo que esto funcione y luego duplicado en una segunda máquina para asegurarse de que no fue un golpe de suerte ! La mayor parte de la información necesaria para compilar el coind.exe o GUI cartera básica es en este hilo : https://bitcointalk.org/index.php?topic=149479.0 desgracia nada es tan fácil como parece , y aunque el MinGW y QT instalaciones fueron bien , no pude compilarlo sin algunos retoques a la pro archivo. .


'' ' Si no desea instalar estas dependencias a mano, https://github.com/foocoin/deps.git clon en a C: \ ''' Si no, aquí está cómo hacerlo de forma manual :


Comience instalando MinGW32 desde aquí: https://sourceforge.net/downloads/mingw seguir adelante e instalar toda la maldita cosa si se quiere, pero al menos la "C Compiler ", " C + + Compiler " y componentes " MSYS sistema básico " . Todo lo demás deja de valores, siguiente, siguiente, siguiente tipo de cosas.


A continuación, instalar ActivePerl 32 o 64 bits a partir de aquí : http://www.activestate.com/activeperl/downloads Una vez más , instalación estándar , siguiente, siguiente , siguiente y así sucesivamente .


Ahora abra el " MinGW Shell System " de Inicio - Programas y usted tiene básicamente un indicador de Linux:


[ [ | { { https://i.imgur.com/D97N35X.png } }]]


Ahora haga una carpeta c / / deps para mantener nuestros archivos :


$ mkdir / c / deps
$ cd / c / deps


Ahora descargar los siguientes archivos y ponerlos en C: \ Deps :
* OpenSSL: http://www.openssl.org/source/openssl-1.0.1e.tar.gz
Instale esta manera:
/ c / deps $ xvfz tar openssl- 1.0.1e.tar.gz
/ c / deps $ cd openssl- 1.0.1e
/ C / deps $ . / config
/ c / deps $ make
* Berkeley DB 4.8: http://download.oracle.com/berkeley-...8.30.NC.tar.gz
Instale esta manera:
/ c / deps $ xvfz tar db- 4.8.30.NC.tar.gz
/ c / deps $ cd db-4.8.30.NC/build_unix
/ c / deps $ .. / dist / configure - disable- replicación - enable- MinGW - enable- cxx
* Boost: http://sourceforge.net/projects/boos.../boost/1.53.0/
Para éste, abrir un comando ( CMD ) ventana normal y hacer lo siguiente:
cd \ deps \ impulso - 1.53.0 \
bootstrap.bat MinGW
b2 - de tipo construir = completo - con crono - con sistema de archivos - with- program_options - with- sistema - with- thread = conjunto de herramientas etapa gcc


Por razones de simplicidad , mis versiones son simplemente nombrados deps \ impulsar ; deps \ ssl , etc Si usted construye su propia , o bien cambiar el nombre de las carpetas en \ deps O cambiar las rutas para adaptarse a los cambios en el archivo de una moneda qt.pro . Recuerde cambiar el sufijo Boost demasiado para que coincida con la versión compila con !


En este punto, usted está listo para crear carpetas de la moneda no Qt normales en las ventanas. Seguir adelante y comprobar el hilo al principio de esta sección, si desea saber cómo . Estamos haciendo una GUI sin embargo:


A continuación, instala el Qt - 4.8.4 Build MiniGW32 desde aquí: http://download.qt-project.org/offic....8.4-mingw.exe Una vez más, todas las opciones de instalación normales , siguiente siguiente siguiente ... ya lo de siempre . Una vez QT está instalado , se encuentra un programa en Inicio - Todos los programas - QT por Digia - Símbolo del sistema Qt :


[ [ | { { https://i.imgur.com/BKhouBL.png } }]]


Enciéndelo y que se verá más o menos como una ventana de DOS :


[ [ | { { https://i.imgur.com/JGDXB9V.png } }]]


Ahora ya no tenemos git en este nuestro ordenador con Windows ( se puede instalar si lo desea, Cygwin es una buena manera de hacer eso ) se debe descargar el archivo barcoin - master.zip de http://github.com/ barcoin y extraerlo a la PC. Para este ejemplo, vamos a poner en c : \. Una última cosa que necesitamos hacer antes de compilar para Windows. Tenemos que editar el archivo " barcoin - qt.pro " para habilitar las bibliotecas de Windows , incluye, y el pedido correcto para algunos de la sintaxis:


'' ' barcoin / barcoin - qt.pro ''':
LÍNEAS 11-22 , quite TODO ESTO PARA HABILITAR VENTANAS CONSTRUYE :
# windows : LIBS + = - lshlwapi
# LIBS + = $ $ join ( BOOST_LIB_PATH , , L , ) $ $ join ( BDB_LIB_PATH , , L , ) $ $ join ( OPENSSL_LIB_PATH , , L , ) $ $ join ( QRENCODE_LIB_PATH , , L , )
# LIBS + = - LSSL - lcrypto - ldb_cxx $ $ BDB_LIB_SUFFIX
# windows : LIBS + = - lws2_32 - lole32 - loleaut32 - luuid - lgdi32
# LIBS + = - lboost_system - mgw46 -mt- sd- 1_53 - lboost_filesystem - mgw46 -mt- sd- 1_53 - lboost_program_options - mgw46 -mt- sd- 1_53 - lboost_thread - mgw46 -mt- sd- 1_53
# BOOST_LIB_SUFFIX = - mgw46 -mt- sd- 1_53
# BOOST_INCLUDE_PATH = C :/ deps / refuerzo
# BOOST_LIB_PATH = C :/ deps / boost / etapa / lib
# BDB_INCLUDE_PATH = c :/ deps / db / build_unix
# BDB_LIB_PATH = c :/ deps / db / build_unix
# OPENSSL_INCLUDE_PATH = c :/ deps / ssl / include
# OPENSSL_LIB_PATH = c :/ deps / ssl


Si construyes SUS PROPIOS dependencias , entonces también cambiar las rutas en el fichero anteriormente para satisfacer sus ubicaciones , utilice / en lugar de \ , sí - es impar. Ahora vuelve a la ventana de Qt shell de comandos y la construcción de la misma manera que hemos construido en las otras plataformas:


c: \ Qt - Constructor > cd \ barcoin - master \ src
c: \ barcoin - master \ src > qmake " USE_UPNP = - barcoin - qt.pro
c: \ barcoin - master \ src > make-f Makefile.Release


Espere un poco ... y una vez que su hecho, usted encontrará una carpeta llamada " liberación " de la carpeta barcoin maestro principal que contiene el exe y un archivo cpp . . :


[ [ | { { https://i.imgur.com/hR3PMJA.png } }]]


Esto no es suficiente para redistribuir sin embargo, para que el archivo de la serie que tendrá que incluir el QT y libs gcc junto con el archivo . Yo los he puesto en un repositorio git aquí: https://github.com/foocoin/windows-qt-addins.git sólo tiene que descargar los 6 archivos e insertarlos en la carpeta de "liberación ", junto con el exe y . . cpp :


[ [ | { { https://i.imgur.com/TApTWZ4.png } }]]


Para redistribuir , sólo tiene que cambiar el nombre de la carpeta de " liberación " y el código postal para arriba! Ahora puede ejecutar el archivo exe en Windows. :


[ [ | { { https://i.imgur.com/14ZEXqN.png } }]]


Woah , oye mira eso , ya tenemos un equilibrio ! En realidad, me había enviado el 10 BAR a este equipo desde la que dejé la minería en toda la noche . Si usted no tiene muchas conexiones a la red, es posible que tenga que agregar una línea al igual que a la carpeta% appdata % \ barcoin \ barcoin.conf :


addnode = dirección IP de su SEED NODO


Si ha creado un nodo de la semilla , se debe conectar , pero si no es así, sólo tiene que añadir un nodo. Una vez que algunos clientes empiezan conexión que utilizarán IRC para conectarse entre sí , por lo que el addnode sólo deben ser necesarios para las conexiones iniciales de cartera.

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 08:22:17 AM
 #106

== Comment cloner Scrypt Based Altcoins pour plaisir et le profit ==


Attendez une seconde , pourquoi voudriez-vous donner les secrets ? ! ? Parce que ce n'est pas un secret et d'ailleurs , pourquoi ne pas tout le monde et leurs voisins en mesure de créer une pléthore de ces bits de mathématiques mais passionnante inutiles ? Les informations contenues dans cet article m'a fallu quelques semaines pour compiler et ce qui fonctionne pour moi n'est pas garanti à travailler pour vous . S'il vous plaît utiliser ce guide comme un point de départ pour apprendre un peu sur la programmation en C et compiler les applications .


Je ne ferai pas de support technique - juste parce que vous ne pouvez pas faire fonctionner quelque chose ne vous donne pas le droit de me déranger à ce sujet . Allez lire , creuser , et lire un peu plus . Presque tout dans ce guide est publié sous une forme ou une autre sur bitcointalk.org de altcoin forum . Le reste je méticuleusement traqué par essai et erreur et une bonne dose de recherche sur Google . Les choses sont destinées à casser , vous aurez besoin de comprendre pourquoi et le faire fonctionner . À la fin de ce guide, vous devriez avoir une pièce de travail, p2p ( CRI) , et les clients pour Linux ( facile ) , Mac ( un peu plus difficile ) et Windows ( pouah ) .


=== Que dois-je ? ===


* Source Code pour une Scrypt Coin
* Connaissance de travail et l'accès à Linux ou Mac ligne de commande - je ne vais pas montrer Cygwin , mais ses semblables .
* 2 ordinateurs ou plus ou des machines virtuelles - je vais utiliser mon ordinateur portable et un VPS basé sur Debian Wheezy .
* L'édition de texte Logiciels - je suis en utilisant TextWrangler pour Mac , mais Netbeans , EmeraldEditor , ou nano fonctionne très bien .
* Temps et de patience ...




Bonne violon !


=== Github , Code Source et Linux ===


==== Source Code ====
Premières choses première. Vous aurez besoin d'un code source . Depuis que je doute que vous pouvez écrire à partir de zéro ( je ne pouvais pas ) , vous devriez être heureux de savoir qu'il ya un bazillion différentes options dans la famille scrypt - pièce pour vous de cloner et de modifier . Mes premières pièces ont été basées sur la plus excellente pièce de la recherche , SmallChange , par LightenUp . Sa production git diff : https://github.com/bfroemel/smallcha...748f76a3d58326 est assez près de l'information pour créer entièrement votre propre alt - monnaie et en tant que telle doit être salué . Oui, je sais son code est tout simplement la source Litecoin avec des changements de couper-coller , mais bon - c'est ce que nous travaillons ici et il a ajouté quelques excellents commentaires tout au long du code.


Pour les fins de ce tutoriel et à conserver une copie «propre» du code SMC , j'ai créé foocoin : https://github.com/foocoin/foocoin Ce guide va vous montrer comment transformer ' foo'coin pour ' bar'coin et vous pouvez à partir de là . J'ai déjà suffisamment changé pour rendre cette pièce compiler - mesure si vous suivez ce guide . Si vous préférez commencer par le code SmallChange original, c'est ici : https://github.com/bfroemel/smallchange.git ou vous pouvez utiliser le Litecoin , Franko , YAC , CHN , MIN , quelle que soit la source - nous Nous changerons assez pour le faire fonctionner .


==== Configurer un compte Github ====


Maintenant serait un bon moment pour trouver un nom unique pour votre brillamment nouvelle pièce . Vous pouvez visiter https://github.com/insertcoinnamehere et vérifier pour voir si le nom de votre pièce est disponible . Si ce n'est pas , il suffit d'ajouter au projet ou quelque chose de spirituel et la crédibilité augmenter , peut-être à but non lucratif - ou - consortium serait donner à votre pièce un certain enthousiasme :


[ [ | {{ https://i.imgur.com/8IxPN1X.png }}] ]


Hé, regarde , barcoin n'est pas prise - we'd mieux l'arracher à droite! Il suffit d'aller à https://github.com et remplir les blancs :


[ [ | {{ https://i.imgur.com/2KLsNXL.png }}] ]


Maintenant, permet de faire un de ces sexy code source URL que tout le monde peut git pull de . Qu'est-ce que c'est git pull ? Ne vous inquiétez pas , vous aurez le coup de lui - regardez, vous apprenez de nouvelles choses déjà . Dans le coin en haut à droite à côté de votre nom d'utilisateur , cliquez sur " Créer un référentiel : "


[ [ | {{ https://i.imgur.com/2xCXZfK.png }}] ]


Maintenant remplir les blancs :


[ [ | {{ https://i.imgur.com/7S9Z7Bv.png }}] ]


Cliquez sur le bouton vert et le tour est joué , vous avez Github . Maintenant, prenez note de cette information :


[ [ | {{ https://i.imgur.com/gXyQjh2.png }}] ]


Parce que nous allons y revenir . Mieux encore , un signet dans votre navigateur et ouvrez un nouvel onglet .


==== Linux , Mac , Cygwin ====


Oui , vous avez besoin d'eux . Pour ce tutoriel , je vais utiliser un MacBook avec OSX 10.8.something et une Debian Wheezy VPS . Je suppose que vous pouvez utiliser Cygwin , mais je préfère les * nix à Windows un jour et vous pouvez ainsi apprendre une chose aussi, non? Shoot, si vous avez besoin d'une bonne LiveCD avec les dépendances déjà construites dans ce qui est mis en place pour être exécuté dans une session VMWare , essayez [ [ CDEbian ] ] . Sinon ce guide utilise Debian qui signifie que la plupart des clones traditionnels devraient travailler (ex: Ubuntu , Xubuntu , Mint) .


Mise en place d' un PC ou VM Linux ou OSX est en dehors du cadre de ce tutoriel , mais il suffit de dire que je peux en témoigner pour VMWare et sa capacité à fonctionner plusieurs machines virtuelles simultanément et sa capacité à virtualiser OSX 10.6.x Snow Leopard Vous aurez besoin d'installer quelques dépendances qui jamais OS vous choisissez d'être en mesure de construire le démon et Qt portefeuille.


==== Dépendances pour OSX ====


La meilleure façon que j'ai trouvé pour installer les dépendances sur OSX est d'utiliser MacPorts ou Homebrew . Personnellement, j'aime mieux que MacPorts Homebrew , mais tout simplement parce que son MacPorts installe dans / opt ( où je pense que ça devrait aller ) et parce que MacPorts offre universel construit par défaut . Si vous préférez Homebrew , les formules sont les mêmes , mais je vous recommande la construction avec l'option - 32 -bit . Aux fins de ce tutoriel , nous allons utiliser MacPorts .


Il faut installer les dépendances suivantes :
* boost ( C + + bibliothèques )
* db48 ( Berkeley DB 4 .
* qt4 -mac ( Open Source QT 4.8.4 , comprend qmake )
* openssl ( bibliothèques ssl dev )
* git ( pour déplacer la source et en arrière pour le référentiel)
* miniupnpc (bibliothèques UPNP de dev , en option - Honnêtement, je disent ignorer cette merde )


Après l'installation des MacPorts de base pour votre version de Mac OS X , cela peut être accompli avec cette commande:
% sudo port installer boost db48 qt4 -mac openssl miniupnpc git
Une fois toutes les dépendances sont construits et installés , l'étape suivante consiste à cloner la source de git . Dans cet exemple , je vais clonage foocoin , renommer , ré- git l'initialiser , et pousser la copie initiale vers Github pour assurer git travaille :
% git clone https://github.com/foocoin/foocoin.git
clonage pour foocoin
% mv foocoin barcoin
% cd barcoin
% rm-rf . git
% git initialisation
initialisation dépôt git dans ~ / barcoin
% git add- A *
% git commit -m " premier commit "
% git remote add origine https://github.com/barcoin/barcoin.git
% git push -u origin master
username pour git@github.com : barcoin
mot de passe pour barcoin@github.com : **********


Maintenant qu'est-ce que nous venons de faire? Nous avons cloné la source existante , supprimé son lien avec git , réinitialisé le dossier pour Github , ajouté tous les dossiers et fichiers existants dans le référentiel, engageons nos modifications ( rendus permanent et les mettre dans la branche "master" , rebaptisé en à notre nouvelle pièce * plus * mieux * plus rapide , le remettre en place un lien vers Github - mais à la nouvelle * compte de pièce * , et poussé une copie vers Github maintenant, si vous allez et regardez votre page il devrait ressembler . comme suit:


[ [ | {{ https://i.imgur.com/hQm9qn9.png }}] ]


Oh , regardez tout ce code source frais juste en attente d'être peaufiné .


==== Dépendances pour Linux ====


Sur la base de Debian Linux , les dépendances et exigences construire peut être installé en une seule commande comme suit:
$ sudo apt-get install sudo apt-get install build-essential libboost -all- dev libcurl4 -openssl -dev libdb5.1 -dev libdb5.1 + + -dev git qt- sdk libminiupnpc -dev
Cela permet d'installer tous les paquets nécessaires comme apt est très intelligent . Une fois que c'est terminé, les mêmes bits que ci-dessus doivent être appliquées:
$ git clone https://github.com/foocoin/foocoin.git
clonage pour foocoin
$ foocoin barcoin mv
$ cd barcoin
$ rm -rf . git
$ git initialisation
initialisation dépôt git dans ~ / barcoin
$ git add -A *
$ git commit -m " premier commit "
$ git remote add origine https://github.com/barcoin/barcoin.git
$ git push -u origin master
username pour git@github.com : barcoin
mot de passe pour barcoin@github.com : **********


==== Dépendances pour Windows ====


Ugh , je savais que vous poseriez . Windows est plus délicates que cela devrait être quand il s'agit de construire avec l'ensemble des outils GNU . Tout d'abord, vous aurez besoin mingw32 installés et dépendances construites par la main pour chacun des éléments énumérés ci-dessus. Vous aurez également besoin de personnaliser votre fichier - qt.pro de l'emplacement de ces dépendances . Pour simplifier , je l'ai déjà compilé et assemblé les dépendances nécessaires pour un bon référentiel Github pour vous. Si l' téléchargé et extrait comme c : \ deps ou git clone de C : \ , ce thepacakge : https://github.com/foocoin/deps.git vous donnera tout ce dont vous avez besoin pour construire foo ( bar ) pièce en utilisant la source vous avez déjà . En savoir plus sur la construction du chemin lorsque nous arriverons à le bit de compilation client Windows un peu plus loin dans le projet .


Maintenant, vous êtes prêt à couper et coller !
Rechercher et remplacer === ===


Ahh , maintenant, nous sommes arrivés à la partie créative . Le bit où vous changez les choses que vous voulez changer pour rendre vos pièces vôtre . Comme il s'agit d' un * clonage * tutoriel , je ne vais pas à se concentrer sur les subtilités de la programmation ( je ne suis pas qualifié ) . Je vais simplement vous montrer où faire les changements que vous devez faire pour obtenir une pièce de monnaie sur les rails. Pour cette étape , je préfère vraiment TextWrangler sur mon Mac . Il permet de multiples fichiers recherche et de remplacement qui rend cette partie du processus aller très vite . Si vous allez mettre en place une VM à construire - Qt portefeuilles pour Mac de toute façon, vous devriez / pouvez simplement installer les dépendances pour créer dans OSX complètement. TextWrangler est gratuit .


==== Noms ====


TextWrangler vous permettra d'ouvrir un dossier entier de fichiers . Il suffit d'ouvrir le programme et choisissez Fichier , Ouvrir le , mettez en surbrillance le dossier " barcoin " et cliquez sur Ouvrir :


[ [ | {{ https://i.imgur.com/kC106go.png }}] ]


Ahh , gentil, tout le code dans un interface facile à utiliser . Soyez conscient que la modification de ces fichiers très certainement peut se faire via nano ou Netbeans , ou tout autre éditeur de texte , même le Bloc-notes , je suppose. Je viens comme celui-ci , 'cuz de cette fonctionnalité suivante. Maintenant, nous devons remplacer toutes les occurrences de " FooCoin , foocoin , et FOOCOIN " dans notre source avec " BarCoin , barcoin , et BARCOIN . " Notez les 3 réglages de cas différents - la plupart du code a tous les trois en elle. Pour changer cela dans TextWrangler , sélectionnez Rechercher , puis multi de recherche de fichiers et sélectionnez le répertoire " barcoin " :


[ [ | {{ https://i.imgur.com/fTJKnc7.png }}] ]


Faites cela pour les trois paramètres de cas , ou si vous préférez le style eecummings , remplacez-les tous sans le " Respecter la casse " case cochée dans un échouer coup. TextWrangler vous montrera l'ensemble de la liste des fichiers modifiés et vous permettra de parcourir les modifications une fois terminé :


[ [ | {{ https://i.imgur.com/tJpf9LD.png }}] ]


Vous voudrez aussi à remplacer toutes les occurrences de " foo" par " BAR ". Il s'agit de la 3 lettre de désignation pour votre pièce , comme la CTB ou PPC . Enfin , vous aurez besoin de modifier manuellement le nom de foocoin - qt.pro dans le dossier de la source principale . Hé ... cela commence à se réunir , non?


==== Ports et de l'évolution du réseau ====


Ok , maintenant nous devons donner à la nouvelle pièce de monnaie d'une plage de port unique à utiliser. Vous aurez besoin de deux ports , l'un pour les connexions RPC ( pour les mineurs de se connecter à ) et un pour les connexions P2P . Vous pouvez trouver une bonne liste de ports réservés ici : http://en.wikipedia.org/wiki/List_of...P_port_numbers plupart des ports travailleront en supposant qu'ils sont 1 : sur le port 1024 et 2 : pas utilisé par autre chose. Je vous suggère quelque chose dans le nombre élevé , de bons exemples comprennent 56679 et 56680 ou 12365 et 12366 .


Pour cet exemple, nous allons utiliser pour 55883 RPC et 55884 pour le P2P. Dans les sources de foocoin , ces ports sont déjà définies, alors allez-y et les modifier avec votre éditeur de texte de votre choix .


Changez le Port RPC/P2P dans les fichiers suivants :


'' ' src / bitcoinrpc.cpp ''' : ( RPC PORT )
LINE 2893 : ip :: tcp :: critère critère ( bindaddress , GetArg ( " - rpcport " , 55883 ) ) ;
LINE 3169 : si ( d.connect ( GetArg ( " - de rpcconnect », « 127.0.0.1 ») , GetArg ( " - rpcport ", " 55883 " ) ) ! )


'' ' src / init.cpp ''' : ( P2P PORT + Testnet Port )
LIGNE 235 " -port = <port> " + _ ( " Ecoute les connexions sur <port> (par défaut : 55884 ou testnet : 45884 ) " ) + "\ n" +


Vous pouvez définir le port de testnet à tout autre port aléatoire , mais rappelez-vous ce que vous réglez à .


'' ' src / init.cpp ''' : ( RPC PORT )
LIGNE 271 " - rpcport = <port> " + _ ( " Ecoute connexions JSON -RPC sur <port> (par défaut : 55883 ) " ) + "\ n" +


'' ' src / protocol.h ''' : ( Testnet Port + P2P PORT )
LINE 22 retour testnet ? 45883 : 55884 ;


Vous pouvez également définir un " noeud de semences " initiale ou toujours sur le système que les nouveaux portefeuilles de pièces en ligne à venir vérifier les adresses supplémentaires :


'' ' src / net.cpp ''' :
LINE 1000 {" un nom de site ", " somewebsite.org ou ip xxxx "} ,


==== Coins intervalles par bloc / Bloc / Max Nombre de pièces ====


Ces changements sont également assez simple . Modifiez les lignes suivantes de code dans les fichiers suivants :


'' ' src / main.cpp ''' : ( Nombre de pièces par bloc attribués )
LINE 831 int64 nSubsidy = 1 * COIN ;


'' ' src / main.cpp ''' : ( Comment * devraient * blocs se trouvent et à quelle fréquence difficulté retargets )
2 blocs minute : / / FooCoin ; LINE 837 static const int64 nTargetSpacing = 120
LINE 836 static const int64 nTargetTimespan = 1 * 24 * 60 * 60 ; / / FooCoin : 1 jour


Dans cet exemple , nous voulons que notre monnaie pour produire des blocs 1 pièce toutes les 2 minutes et réajuster difficulté une fois par jour ( 1 jour 24 heures x x 60 minutes x 60 secondes ) . Vous pouvez ajuster ceux-ci, mais sachez puisqu'il s'agit d'un clone de scrypt et nous ne sommes pas modifier la difficulté à commencer ce taux cible sera biaisé jusqu'à ce que les niveaux de taux de hachage sur votre nouvelle pièce . C'est quelque chose de difficile et je ne comprends pas tout encore .


'' ' src / main.h ''' : ( nombre total de pièces jamais et nombre estimatif de blocs par jour )
LINE 43 static const int64 MAX_MONEY = 10000 * COIN / / nombre maximum de pièces
LINE 550 retour dPriority > COIN * 720/250 / / 720 blocs ont trouvé un jour .


Vous aurez besoin de faire un peu de maths pour comprendre vos blocs par cible de jour en fonction du nombre de pièces que vous souhaitez créer sur ce laps de temps et à quelle distance vos blocs sont . Je ne fais pas tout le travail pour vous! Cette pièce est réglé pour donner une blocs de pièces toutes les 2 minutes , ciblant 720 blocs par jour par un maximum de 10 000 pièces qui signifie que si extrait dur, il sera à court de pièces de monnaie dans le temps d'une semaine .


==== Adresse de départ Lettre / Nombre ====


Le premier chiffre ou la lettre de l'adresse de la nouvelle pièce de monnaie est déterminée par un code de base 58 . Vous pouvez voir une liste de toutes les options disponibles ici : https://en.bitcoin.it/wiki/Base58Check_encoding Pour changer de votre pièce adresse de modifier ceci:


'' ' src/base58.h ''' :
LINE 280 PUBKEY_ADDRESS = 38 , / / Définit la première adresse peu ici


==== Icônes et Splash Images ====


Vous trouverez toutes les images et les icônes de support pour le porte-monnaie dans le '' ' src / qt / res ''' dossier . Il ya deux dossiers avec des icônes que vous devez faire attention à :


[ [ | {{ https://i.imgur.com/uTDamJq.png }}] ]
et
[ [ | {{ https://i.imgur.com/2wJUutr.png }}] ]


Foo et bar pièces à la fois utilisent l'imagerie Litecoin par défaut . Vous devez utiliser un programme de votre choix de retouche d'image ( J'aime Photoshop CS3 , mais GIMP est aussi agréable ) pour modifier les images . Si vous voulez arrondis icônes / images , utilisez transparent . Png . Aussi , n'oubliez pas de générer un ico (Windows / Linux ) et un . Icns ( Mac) de l'icône de votre programme . . Un excellent site que j'aime utiliser pour cela est ici : http://iconverticons.com/
=== Merkel Hash ===


Le hachage Merkel est la racine du réseau de votre pièce . C'est le hachage que tous les blocs seront évalués contre et la base pour l'exploitation d'un bloc de genèse . Ma méthode est d'obtenir une pièce de travail sur la testnet d'abord, puis le réseau principal par la construction et l'essai dans une progression par étapes . Le hachage Merkel n'est pas vraiment la première chose que vous devez changer cependant.


==== ==== Epoch Temps


Depuis minuit UTC le Jour de l'An 1970, Unix ( ou Epoch ou POSIX ) a été utilisé pour coordonner les différents appels système et les fonctions des systèmes Unix ( et bien d'autres par défaut ) . Puisque ce type de temps est secondes simples et ne tient pas compte des secondes intercalaires , son un moyen facile de calculer les valeurs en fonction du temps uniques de programmation . À cet effet , la première chose que l'on doit changer lors de la construction d'une nouvelle pièce de monnaie est la base de temps pour la naissance de la pièce de monnaie ou la genèse de la pièce.


Il est fixé à deux endroits dans le code , un pour le réseau de test :


'' ' src / main.cpp :'''
LINE 2023 block.nTime = 1300000000 ;


et l'autre pour le filet principal :


'' ' src / main.cpp :'''
LINE 2017 block.nTime = 1300000000 ; / / epochtime


Vous pouvez obtenir le temps de l'époque actuelle à partir de: http://www.epochconverter.com/ ou vous pouvez générer à partir de la ligne de commande de la plupart des systèmes * nix avec ce code :


$ Date + % s
$ 1369590088


Il est de coutume de changer aussi cette ligne de code à un titre du jour de la création de la pièce afin de la relier à la block.nTime avec quelques peu lisible :


'' ' src / main.cpp :'''
LINE 2005 const char * pszTimestamp = " Traditionnellement on met quelque chose en temps opportun ici coïncide avec l'époque »;


Maintenant, remarquez les autres lignes près de la block.nTime , ils sont appelés block.nNonce . Un « nonce » est une unité de mesure qui est unique et a lieu après la Ntime est réglé . Le code utilise Ntime + nNonce à formuler et valider des horodateurs pour les blocs et les transactions . Il s'agit d'un aperçu très sommaire de la façon dont cela fonctionne vraiment , mais j'espère que cela vous donne une idée . Nous allons revenir à la nNonce dans un moment où nous exploitons un bloc de genèse .


==== Générer un hachage Merkel ====


Heureusement , ce post sur le forum : https://bitcointalk.org/index.php?to...449 # msg2035449 nous donne une méthode pour générer Merkel Hash via la fonction de filet de test de la pièce. À l'heure actuelle serait un bon moment pour faire ce qui suit et copier vos fichiers vers votre dépôt Github :


barcoin % git add -A *
barcoin % git commit -m "changements"
barcoin % git push origin master


Il ne se sentait pas bon de savoir que vous utilisez Github comme un pro ?


==== Abord construire ====


Maintenant que vous avez une nouvelle copie de tout votre coupe et coller téléchargés sur Github , nous sommes prêts à construire une copie de notre ligne de commande que la version de la pièce :


barcoin % cd src /
USE_UPNP makefile.osx barcoin / src % make-f = - ( ou makefile.unix si vous êtes sous Linux / BSD / etc )


Le code doit construire proprement si vous avez seulement changé ce que vous êtes censé vous ahve et les bonnes dépendances installées . Vous allez vous retrouver avec un seul exécutable appelé le nom de votre médaille annonce sur la fin si vous êtes sous Linux ( c'est à dire barcoin ( osx / windows ) barcoind ( Linux ) . " Dépouillant" le code supplémentaire permettra de créer un fichier plus petit si vous le désirez :


barcoin / src % bande barcoin ( ajouter le d sur Linux , barcoind )


Maintenant , nous voulons lancer barcoin partir de la ligne de commande en utilisant le commutateur- testnet comme suit:


barcoin / src % . / barcoin - testnet ( ajouter le d sur Linux . / barcoind )


Il sera immédiatement échouer sur la première course , jetant une erreur comme ceci:


Échec de l'assertion : ( block.hashMerkleRoot == uint256 ( "0x" ) ) , la fonction LoadBlockIndex , fichier main.cpp , ligne 2031.
zsh : Abandon / barcoin .


Nous avons maintenant un hachage Merkel ... attendez , mais où? Son est dans " Application Data " du répertoire de votre pièce. Sous Linux , c'est dans votre dossier de départ , puis un coinname etc. :
~ . / barcoin .
Sur OSX , ça va être dans votre dossier Bibliothèque :
/ Utilisateurs / nom d'utilisateur / Bibliothèque / Application Support / barcoin
Si vous voulez voir graphiquement , maintenez le bouton d'option et cliquez sur le menu Aller du Finder , puis choisissez Application Support et le dossier de barcoin . Sur Windows, il sera dans le dossier Application Data Roaming :
c : \ Users \ nom d'utilisateur \ AppData \ Roaming \ barcoin


Dans ce dossier , vous trouverez quelques fichiers - c'est également le dossier que vous allez mettre le fichier conf de votre pièce lorsque nous sommes prêts à le miner donc n'oubliez pas comment vous avez obtenu ici . . Maintenant , debug ouvert connecter et il ressemblera à ceci :


[ [ | {{ https://i.imgur.com/H9l4OMl.png }}] ]


Merci à incroyablement serviable poste de Tyrion , nous pouvons déchiffrer ce débogage à mettre comme ceci:


b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db1 78df5dd3b302fc bloc haché en utilisant l' Merkel inexistant , sur la base du pzTimestamp de main.cpp
00000000000000000000000000000000000000000000000000 00000000000000 Genèse bloc , pas bon parce que tous les nNonces sont mis à 0 dans main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e1580794 51d9c6c90e4700 Valid Merkel Hash , généré en utilisant le temps de l'époque dans main.cpp


Maintenant, prenez le Hash Merkel valide et l'insérer dans la main.cpp :


'' ' src / main.cpp '''
LINE 2031 assert ( block.hashMerkleRoot == uint256 ( " 0x2fc1b7ef46270c053711fbae934cf7f83378efd 4b3e158079451d9c6c90e4700 " ) ) ;


=== Genesis Blocks ===


Dang, nous vous cuisinez au gaz maintenant hein ? Comment fonctionne une mine un bloc de genèse ? Heureusement, le code est déjà dans la source pour faire juste cela il ne vous inquiétez pas . Qui obtient les pièces initiales ? Eh bien , personne n'a vraiment - il ya une façon de le faire : https://bitcointalk.org/index.php?to...801 # msg2038801 mais personnellement, je les laisse à l'espace cyber comme un signe de bon karma pour la dieux de bits à l'église de développement ( FinShaggy , cela signifie que vous , mon pote. )


==== Testnet Genèse Bloquer ====


Ok , maintenant vous n'avez pas besoin de re-télécharger à Github pour l'instant, car nous avons besoin pour générer des blocs de genèse de notre premier réseau . Avec le hachage Merkel en place , cette ligne :


'' ' src / main.cpp '''
LINE 2034 si (true && block.GetHash ( ) ! = HashGenesisBlock )


Si défini à vrai ( comme ci-dessus) exploiter un bloc de genèse à la prochaine fois que le programme est exécuté - en commençant par la nNonce dans le code ( 0 ) . Disons recompiler le code avec la nouvelle Hash Merkel :


barcoin / src $ make - f USE_UPNP makefile.osx = - ( ou Unix , peu importe. )


Recompilation devrait être assez vite que la plupart des dossiers ont déjà été construits . Une fois son fait , commencer à nouveau à l'aide de cette commande :


barcoin / src $ . / barcoin - testnet


Vous entendrez votre disque dur commence à multiplier et il va sembler comme la pièce a gelé dans la fenêtre - mais ce n'est pas gelé , son extraction d'un bloc de genèse pour la testnet en fonction de votre travail fraîchement généré Merkel Hash . Si vous ouvrez le '' ' debug.log ''' vous verrez dans cette action :


[ [ | {{ https://i.imgur.com/DiOPE23.png }}] ]


N'est-ce pas astucieux ? Son hachage d'un bloc heureusement , chaque nonce est compté par . Combien de temps cela prendra ? Sur un i7 -2600 , il peut prendre 5-10 minutes. Sur un Core2Duo (comme mon iMac ), il peut prendre 20-30 minutes , peut-être plus . Laissez- le faire sa chose , et aller chercher des avortons - elle finira par en trouver un qui lui plaît . Cette fois, il va écrire dans le '' ' testnet3 ''' dossier sous le dossier conf de votre pièce de monnaie dans un fichier appelé '' ' debug.log ''' :


Échec de l'assertion : ( block.GetHash ( ) == hashGenesisBlock ) , la fonction LoadBlockIndex , fichier main.cpp , ligne 2065.
zsh : . abort / barcoin - testnet


[ [ | {{ https://i.imgur.com/88vYRuy.png }}] ]


Ah ha ! Voir là? Il ya un noonce et un hachage du bloc de genèse , mûr pour la cueillette !


block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1 b3bc232c9a0b7f


Maintenant , les mettre dans le fichier main.cpp :


'' ' src / main.cpp :'''
LINE 1984 hashGenesisBlock = uint256 ( " 0x5813d4cfab0eeda94a15d11c5e7d6895e667fbb e67c59ef9a1b3bc232c9a0b7f " ) ;


Oui , vous avez besoin de quitter le 0x devant les tables de hachage . Vous devez également saisir le nNonce :


'' ' src / main.cpp :'''
LINE 2024 block.nNonce = 440824 ;


Notez que les sections du fichier main.cpp nous vient de modifier correspondent à la testnet et nous n'avons pas encore tout à fait fait le filet principal . C'est parce que , à ce stade , je reçois habituellement deux systèmes et courir sur la testnet pour s'assurer qu'ils peuvent exploiter pièces puis -je passer à la net principale . Permet de sauvegarder nos changements , et les télécharger sur Github et puis nous allons passer à l'exploitation minière sur la testnet :


barcoin % git add -A *
barcoin % git commit -m "changements"
barcoin % git push origin master


==== Mining testnet pièces ====


Tout d'abord, reconstruire l'exécutable de votre pièce sur votre PC local :


barcoin / src % make-f makefile.osx USE_UPNP = - ( . ou unix , peu importe)


Maintenant vient la partie où vous avez besoin de deux ordinateurs avec des adresses IP distinctes . Je trouve que c'est facile à faire avec un VPS Linux et mon PC à la maison , donc c'est mon exemple . Deux machines sur un réseau local doivent travailler , et je crois que 2 ou plusieurs machines virtuelles doivent travailler trop , aussi longtemps que vous êtes en mesure de suivre les adresses IP . Connectez-vous à votre deuxième machine et de construire le fichier de la pièce , tout comme nous le faisions auparavant - depuis l'envoi du code de Github , peut aussi bien utiliser votre nouveau github skillz élite :


$ Git clone https://github.com/barcoin/barcoin.git
clonage pour barcoin
$ Cd barcoin / src
barcoin / src $ make - f makefile.unix (je suis sur Linux ici ) .
barcoin / src $ bande barcoind


Maintenant, je suis prêt à l'exécuter - en mode testnet et avec une connexion à mon ordinateur "autre" . C'est une sorte de délicate , car vous avez besoin pour commencer la pièce sur les deux ordinateurs avec le '' ' - connecter = xxxx ''' variables , chacune avec l'adresse IP de l'autre PC :


'' ' Accueil PC - iMac ''' :
barcoin / src % . / barcoin - testnet -connect = 9.5.6.5 &


'' ' VPS Linux - ''' :
barcoin / src $ . / barcoin - testnet - connect = 66.77.32.56 &


Ajouter le & à la commande lui permettra de traiter dans le fond et vous permettre de continuer à nourrir les commandes de pièces de monnaie sans ouvrir une deuxième fenêtre de la console .


Sur la première manche , il va se plaindre de ne pas avoir un fichier de conf . :
erreur : Vous devez définir rpcpassword = <password> dans le fichier de configuration :
/ Utilisateurs / nom d'utilisateur / Bibliothèque / Application Support / barcoin / barcoin.conf
Si le fichier n'existe pas , créez-le avec des autorisations de fichiers propriétaire lisible uniquement .
Il est recommandé d'utiliser le mot de passe aléatoire suivant:
rpcuser = barcoinrpc
rpcpassword = 6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptn YGwjt5
( vous n'avez pas besoin de se rappeler ce mot de passe )
Si le fichier n'existe pas , créez-le avec des autorisations de fichiers propriétaire lisible uniquement .


Créer ce fichier , dans le format que vous préférez , nano fonctionne très bien pour cela et attribuer un RPC utilisateur / mot de passe . Si vous souhaitez utiliser CGMiner / CPUMiner à exploiter en solo plus tard, faire ce quelque chose dont vous vous souviendrez . Si vous envisagez d'utiliser uniquement le client intégré de mineur dans l'exploitation minière en solo , il suffit de couper et coller l' auto généré informations . C'est le même fichier que vous pouvez mettre en place certaines des commandes de bitcoin.conf en , voici une bonne référence : https://en.bitcoin.it/wiki/Running_B...iguration_File


* Sur OSX ce fichier est: '' ' / Users / nom d'utilisateur / Bibliothèque / Application Support / barcoin / barcoin.conf '''
* Sous Linux ce fichier est'' ' ~ / .barcoin / barcoin.conf '''
* Sous Windows, ce fichier est'' ' c : \ users \ username \ AppData \ Roaming \ barcoin \ barco in.conf '''


Side note : parce que j'utilise un VPS pour cela, je n'ai pas vraiment besoin de s'inquiéter à propos de la redirection de port à cette fin . Sur le PC à la maison , vous aurez envie de rediriger le port que vous avez choisi pour P2Pport dans la section de couper et coller à l'ordinateur que vous utilisez. Pour cet exemple , c'est le port 55884 .


Maintenant recommencer la pièce :


'' ' Accueil PC - iMac ''' :
barcoin / src % . / barcoin - testnet -connect = 9.5.6.5 &


'' ' VPS Linux - ''' :
barcoin / src $ . / barcoin - testnet - connect = 66.77.32.56 &


C'est maintenant le bon moment pour rafraîchir la ligne de commande API appelle syntaxe pour interagir avec le client bitcoin de cette page wiki: https://en.bitcoin.it/wiki/Original_...API_Calls_list


D'abord, vous voulez envoyer :
barcoin / src % . / barcoin getinfo


Elle doit retourner quelque chose comme ceci :


'' ' Accueil PC - iMac ''' :
barcoin / src % . / barcoin getinfo
{
"version" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000 ,
" équilibre " : 0.00000000 ,
"blocs" : 0 ,
«connexions» : 1,
" proxy ": "" ,
«difficulté» : 0.00024414 ,
" testnet " : true ,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
«erreurs» : ""
}


L'autre côté doit regarder la même chose et les numéros doivent correspondre . Notez que testnet ne vérifie pas les points de contrôle , ils doivent donc se connecter assez facilement ( oooh , c'est la question 1BTC , mais plus que dans un peu ... de l'autre côté :


VPS - Linux '' ' ''
/ barcoin / src $ . / barcoind getinfo
{
"version" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000 ,
" équilibre " : 0.00000000 ,
"blocs" : 0 ,
«connexions» : 1,
" proxy ": "" ,
«difficulté» : 0.00024414 ,
" testnet " : true ,
" keypoololdest " : 1369622277 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
«erreurs» : ""
}


Belle , ils s'alignent et ont chacun une seule connexion . Maintenant, nous pouvons faire l'un d'eux ( ou les deux) commencer à générer des pièces de monnaie en utilisant la commande suivante :


barcoin / src % . / barcoin setgenerate vrai 16


Le nombre est le nombre de threads de votre processeur que vous voulez consacrer à l' incroyablement faible difficulté que nous allons commencer avec , cela devrait être beaucoup pour générer quelques blocs . Vous ne verrez pas les résultats en temps réel , plutôt que vous devez exécuter la commande suivante et évaluer l' information:


barcoin / src % . / barcoin getmininginfo
{
"blocs" : 0 ,
" currentblocksize " : 1000 ,
" currentblocktx " : 0 ,
«difficulté» : 0.00024414 ,
" erreurs ": " " ,
" générer " : true ,
" genproclimit " : 16 ,
" hashespersec " : 1432 ,
" ": networkhashps -9223372036854775808 ,
" pooledtx " : 0 ,
" testnet " : true
}


Succès ! Voir que '' ' hashespersec ''' ? Le mineur de scrypt interne est en train de faire sa chose et vous faire quelques blocs . Vous devez exécuter la commande getmininginfo quelques temps avant qu'il ne commence à compter dans le nombre de blocs . En quelques minutes, vous devriez être capable de voir :


barcoin / src $ . / barcoind getmininginfo
{
«blocs» : 1,
" currentblocksize " : 1000 ,
" currentblocktx " : 0 ,
«difficulté» : 0.00024414 ,
" erreurs ": " " ,
" générer " : true ,
" genproclimit " : 16 ,
" hashespersec " : 1376 ,
" networkhashps " : 32,
" pooledtx " : 0 ,
" testnet " : true
}


Woah toutou , nous avons blocs . Maintenant vérifiez que votre autre voit les blocs en faisant une getinfo sur votre '' ' autre ''' ordinateur :


barcoin / src % . / barcoin getinfo
{
"version" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000 ,
" équilibre " : 0.00000000 ,
«blocs» : 1,
«connexions» : 1,
" proxy ": "" ,
«difficulté» : 0.00024414 ,
" testnet " : true ,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
«erreurs» : ""
}


Eh bien, tu sais whatta ? Whatta ya disent que nous extrayons quelques pièces d' MainNet ?


==== Principal net Genèse Bloquer ====


Alors, vraiment tout ce que nous devons faire maintenant est mise à jour main.cpp avec un nouveau temps de l'époque , dans la section net principale cette fois et le mien un bloc de genèse de la même façon à la façon dont nous l'avons fait sur ​​testnet . Tout d'abord, arrêter le coind de courir sur vos deux ordinateurs locaux et distants en exécutant la commande :


barcoin / src % . / barcoind arrêter
Barcoin s'arrête


Ensuite, revenez à votre PC de développement et modifier main.cpp avec un nouveau block.nTime :


'' ' src / main.cpp :'''
LINE 2017 block.nTime = 1369623856 ; / / epochtime


Maintenant , recompiler la médaille de nouveau à partir de la ligne de commande :


USE_UPNP makefile.osx barcoin / src % make-f = - ( . ! ou unix , quelle que soit , ha )


Maintenant, exécutez la pièce à nouveau , mais cette fois ne comprennent pas le commutateur- testnet :


barcoin / src % . / barcoin &


Il semble de nouveau être gelés pendant qu'il mines le bloc de genèse et de votre processeur sera probablement aller à 100 % d'utilisation . Soyez patient , cela a pris Satoshi 6 jours ou de la merde , non? Encore une fois, si vous avez un Mac , regarder le mien avec la visionneuse de journal système est assez amusant - et réussite:


[ [ | {{ https://i.imgur.com/Elpzv6F.png }}] ]


Maintenant , nous faisons la même chose que nous avons fait sur le testnet , et de faire ces changements de main.cpp :


'' ' src / main.cpp :'''
LINE 32 uint256 hashGenesisBlock ( " 0xbf9385c680c3a7aec778b6dcf87dbf b105369d55143fc99ebe86f469cd53ddca " ) ;
LINE 2019 block.nNonce = 1345972 ;
LINE 2034 si (false && block.GetHash ( ) ! = HashGenesisBlock )


Les points de contrôle ==== ====


Changement de ligne 2034 à false garder les clients d'essayer de hacher leur propre bloc de genèse doit être quelque chose de mal. Un autre fichier à modifier :


'' ' src / checkpoints.cpp '''
LIGNE 27 ( 0 , uint256 ( " 0xbf9385c680c3a7aec778b6dcf87dbfb105369d5 5143fc99ebe86f469cd53ddca " ) )


C'est le "truc ". Se souvenir je l'ai dit , il y avait un truc ? C'est elle . Hash 0 dans ce fichier doit être définie pour le bloc de hachage genèse , alors faites-le et réjouissez-vous que vous avez maintenant presque terminé de créer votre clone ! Si vous voulez faire de votre pièce " légitime " , vous aurez envie de revenir sur ce fichier dans l'avenir et d'ajouter d'autres points de contrôle en lui - mais c'est un peu nous allons économiser pour la fin du guide . Permet d'envoyer nos changements de Github avant de construire :


barcoin % git add -A *
barcoin % git commit -m "changements"
barcoin % git push origin master


Ok , nous sommes prêts à reconstruire sur le premier PC :


barcoin % cd src /
USE_UPNP makefile.osx barcoin / src % make-f = - ( . ou unix , bla ... )
bande barcoin


Maintenant sur ​​le deuxième PC (en supposant que son Linux ici ) :


~ $ Cd barcoin
barcoin $ git pull
mise à jour git ... Wait Wait ... fait !
barcoin $ cd src /
barcoin / src $ make - f makefile.unix USE_UPNP = -
bande barcoind


Ooo laa laa , nous allons faire ici . Maintenant, nous pouvons nous extraire certains Coinz !


==== Pièces Mining principal net ====


Le processus est le même que le testnet , mais sans le commutateur - testnet . Start'er jusqu'à :


'' ' Accueil PC - iMac ''' :
barcoin / src % . / barcoin -connect = 9.5.6.5 &


'' ' VPS Linux - ''' :
barcoin / src $ . / barcoin - connect = 66.77.32.56 &


Vérifiez auprès de getinfo :


barcoin / src % . / barcoind getinfo
{
"version" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000 ,
" équilibre " : 0.00000000 ,
"blocs" : 0 ,
«connexions» : 1,
" proxy ": "" ,
«difficulté» : 0.00024414 ,
" testnet ": false ,
" keypoololdest " : 1369627515 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
«erreurs» : ""
}


Obtenir une nouvelle adresse :


barcoin getnewaddress
GeeNLCk9KfQQ35wPpf2faYdqHEU5KW4Khn


Lancer un d'eux ( ou les deux mines ) et vérifier :


barcoin / src % . / barcoind setgenerate vrai 16
barcoin / src % . / barcoind getmininginfo
{
"blocs" : 0 ,
" currentblocksize " : 1000 ,
" currentblocktx " : 0 ,
«difficulté» : 0.00024414 ,
" erreurs ": " " ,
" générer " : true ,
" genproclimit " : 16 ,
" hashespersec " : 1417,
" ": networkhashps -9223372036854775808 ,
" pooledtx " : 0 ,
" testnet ": false
}


Ooooooh myyyyyy gooooooooood , non? Ses blocs faisant de notre nouvelle Barcoin ( ? Ou est-ce une BAR pour consolider votre patrimoine numérique que je veux dire , tirer , il ya seulement quelques semaines de à pump and dump taux d'extraction à droite) Bientôt vous verrez : '' ' «blocs» : 1 , '' ' et ce nombre va commencer à grimper . C'est le moment vous pouvez configurer le client de barcoin.conf pour accepter les connexions de votre réseau local et pointer vos boxen dualie - 7970 ou peut-être à un Minerd . Son prêt au rock en ce moment .


Choses à se rappeler :


* Vous êtes essentiellement fait ici . La version en ligne de commande peut faire tout ce que le Qt possible.
* Blocs prennent 120 confirme , vous aurez donc besoin de quitter une exploitation minière de système , même à quelques hashses de garder votre réseau va . J'aime laisser mon exploration de VPS à quelques Kh / s et l'utiliser comme noeud de semences afin que le réseau est toujours confirmer même si son très lent .
* Vous êtes essentiellement fait ici . Mais non, vous n'êtes pas - permet de faire quelques portefeuilles de l'interface graphique .
Compilation === les - Qt Portefeuilles ===


Ok, donc ce sera faire ou défaire votre pièce si vous prévoyez de le distribuer. Avant d'aller au fond de cela, savoir que le code source pour foocoin est personnalisé pour rendre la construction aussi simple que possible sur Windows (le système plus difficile à construire pour ) . Il est également assez facile de construire une version Mac , mais à ce point, je vais avoir du mal à redistribuer les versions Mac avec l'autre PC ayant les mêmes dépendances installées . Quant à Linux , de façon assez surprenante , c'est le plus facile à construire pour et si vous avez installé toutes les dépendances de la partie supérieure du guide , vous serez en mesure de le frapper avec deux commandes .


==== Mac OSX - Qt ====


Je commence avec celui-ci suffit d'aller en ligne avec dépendances ordre ci-dessus . Afin de garder les choses en ordre sur mon iMac , j'ai créé une machine virtuelle chargé avec OSX 10.6.8 , Snow Leopard . C'était assez simple en utilisant VMWare Fusion . Après l'installation et la mise à jour du logiciel , j'ai installé XCode 3.2.6 , qui contient une version non - llvm travail de gcc et de son gratuit d'Apple ici : http://connect.apple.com/cgi-bin/Web...bundleID = 20792 Une installation simple , sans fioritures , assurez-vous que tous les objets sont vérifiés pour l'installation.


Ensuite, j'ai installé MacPorts cette version: https://distfiles.macports.org/MacPo...nowLeopard.pkg et puis les dépendances énumérés dans la première section ala :

Xcode % sudo port installer boost db48 qt4 -mac openssl miniupnpc git


Après un peu de temps , tous les goodies sont installés de sorte que nous allons cloner le logiciel de la pièce de monnaie dans le mode normal:


Xcode % git clone https://github.com/barcoin/barcoin.conf
Xcode % cd barcoin


Maintenant , quelque chose d'un peu différent cette fois , nous avons besoin d'exécuter qmake la place de make . Faire comme ceci:


barcoin % qmake " USE_UPNP = - " barcoin - qt.pro


Oui , vous avez besoin du "" autour USE_UPNP = - et oui , cela peut produire des résultats étranges qui , quelque chose comme ceci :


MESSAGE du projet: construction sans l'appui UPNP
Formes plurielles retirés que la langue cible a moins formes .
Si cela sonne faux , peut-être la langue cible n'est pas définie ou reconnue .


Maintenant, permet de le construire :


barcoin % make - f Makefile


Allez , allez, allez , ne pas regarder en arrière . Après un peu, vous verrez la fin et une icône devrait apparaître dans le dossier de barcoin :


[ [ | {{ https://i.imgur.com/8MvDciR.png }}] ]


Maintenant que lancer et le tour est joué ! Un Mac barcoin portefeuille :


[ [ | {{ https://i.imgur.com/NiE3Bnh.png }}] ]


Tout comme les portefeuilles Windows et Linux , vous pouvez ajouter '' ' addnode = xxxx ''' où est le xxxx l' IP de votre poste de semences . Ce ne sera pas nécessaire après quelques clients commencent la connexion au réseau , ils finiront par commencer à parler les uns aux autres via IRC .


==== Linux Qt ====


C'est par un long shot le portefeuille le plus facile à compiler , mais son entravée par deux choses pour la distribution : Linux a très faible part de marché , mais pour une pièce personnelle ou d'un club , ce que le droit de l'enfer ? La plupart des utilisateurs de Linux et établiront leur propre logiciel de sorte que vous ne serez pas probablement obtenir la distribution de loin un exécutable Linux ( ainsi vous ne devriez pas ) . Mon exemple ici est basée sur Debian et doivent correspondre à la plupart des saveurs Debian / Ubuntu .


Maintenant, puisque déjà nous avons construit un système et installé les dépendances dans le premier bit - attendez, vous ne l'avez pas ? Vous avez fait tout cela sur Windows? Nice. Vous devez écrire un guide prochaine fois! Maintenant , où en étions-nous ... oh oui , vous avez déjà un système de construction de la pièce de travail, laisse ainsi juste rester avec elle . Commençons par le commencement :


cd ~ / barcoin
barcoin % qmake " USE_UPNP = - "


Penser , penser, sortie :
MESSAGE du projet: construction sans l'appui UPNP
Formes plurielles retirés que la langue cible a moins formes .
Si cela sonne faux , peut-être la langue cible n'est pas définie ou reconnue .


Maintenant , construire :


barcoin $ make


Ouais , sérieusement, c'est tout. Simplement « faire ». Ha - Debian est si belle , n'est-ce pas ? Ok maintenant, après un peu de barattage et la gravure il finira .




==== Windows Qt ====


Il s'agit de la plus délicate à craquer des portefeuilles de l'interface graphique . Je vais détailler comment je suis arrivé que cela fonctionne et vous offre un moyen facile d'obtenir les dépendances dans une tentative de faire ce travail pour vous aussi. Cela dit , il ne peut pas - et je l'ai déjà dit , je ne vais pas faire le support technique . Donc voici l'affaire . J'ai eu cela fonctionne et ensuite dupliqué sur une deuxième machine pour s'assurer qu'il n'était pas un hasard ! La plupart des informations nécessaires à l'établissement coind.exe ou GUI portefeuille de base est dans ce fil : https://bitcointalk.org/index.php?topic=149479.0 Malheureusement rien n'est aussi simple qu'il n'y paraît , et bien que la MinGW et QT installations s'est bien passé , je ne pouvais pas le compiler sans quelques modifications à la pro . .


'' ' Si vous ne souhaitez pas installer ces dépendances à la main , clone https://github.com/foocoin/deps.git dans C: \ ''' Si pas, voici comment le faire manuellement:


Commencez par installer MinGW32 partir d'ici : https://sourceforge.net/downloads/mingw Aller de l'avant et installer le tout sanglant si vous voulez, mais au moins le " compilateur C ", " compilateur C + + " et éléments " MSYS système de base " . Tout le reste laisse stock, prochaine , prochain , prochaine genre de chose .


Ensuite, installez ActivePerl 32 ou 64 bits à partir d'ici : http://www.activestate.com/activeperl/downloads Encore une fois, l'installation standard , prochaine , prochain , prochaine et ainsi de suite .


Maintenant, ouvrez le " Shell System MinGW " à partir de Démarrer - Programmes et vous avez fondamentalement une invite Linux :


[ [ | {{ https://i.imgur.com/D97N35X.png }}] ]


Maintenant, faites un c / dossier / deps pour garder nos fichiers :


$ mkdir / c / deps
$ cd / c / deps


Maintenant télécharger les fichiers suivants et les mettre dans C : \ Deps :
* OpenSSL : http://www.openssl.org/source/openssl-1.0.1e.tar.gz
Installez-le comme ceci:
/ c / deps $ tar xvfz openssl- 1.0.1e.tar.gz
/ c / deps $ cd openssl- 1.0.1e
/ c / deps $ . / config
/ c / deps $ make
* Berkeley DB 4.8: http://download.oracle.com/berkeley-...8.30.NC.tar.gz
Installez-le comme ceci:
/ c / deps $ tar xvfz db- 4.8.30.NC.tar.gz
/ c / deps $ cd db-4.8.30.NC/build_unix
/ c / deps $ .. / dist / configure - disable- réplication - enable- mingw - enable- cxx
* Boost : http://sourceforge.net/projects/boos.../boost/1.53.0/
Pour celui-ci , ouvrez une commande ( CMD ) fenêtre régulière et procédez comme suit :
cd \ deps \ boost- 1.53.0 \
bootstrap.bat mingw
b2 - type = construire complet - with- chrono - avec système de fichiers - with- program_options - with- système - avec filetage outils = stade gcc


Pour des raisons de simplicité , mes versions sont simplement nommés deps \ stimuler ; deps \ ssl , etc Si vous construisez votre propre , soit renommer les dossiers dans \ deps ou modifier les chemins en fonction de vos modifications dans le fichier de la pièce - qt.pro . N'oubliez pas de changer le suffixe de Boost trop pour correspondre à la version que vous compilez avec !


À ce stade, vous êtes prêt à construire des portefeuilles de pièces non - Qt normales sur les fenêtres . Allez-y et vérifier le fil au début de cette section si vous souhaitez savoir comment . Nous faisons une interface graphique si :


Ensuite, installez le Qt - MiniGW32 4.8.4 build à partir d'ici : http://download.qt-project.org/offic....8.4-mingw.exe Encore une fois, toutes les options d'installation normales , suivant suivant suivant ... vous connaître le forage . Une fois l'intervalle QT est installé , vous trouverez un programme dans Démarrer - Tous les programmes - Qt par Digia - Invite de commandes Qt :


[ [ | {{ https://i.imgur.com/BKhouBL.png }}] ]


Lancez-le et il va chercher un peu comme une fenêtre DOS :


[ [ | {{ https://i.imgur.com/JGDXB9V.png }}] ]


Maintenant, puisque nous n'avons pas git sur ​​ce notre ordinateur Windows ( vous pouvez l'installer si vous voulez , Cygwin est une bonne façon de le faire ), vous devez télécharger le fichier barcoin - master.zip de http://github.com/ barcoin et l'extraire de l'ordinateur . Pour cet exemple , nous allons le mettre dans c : \ . Une dernière chose que nous devons faire avant que nous compilons pour Windows . Nous devons modifier le fichier " barcoin - qt.pro " pour permettre aux bibliothèques de Windows , comprend , et un ordre correct pour une partie de la syntaxe :


'' ' barcoin / barcoin - qt.pro ''' :
LIGNES 11-22 , supprimez tous ces POUR PERMETTRE versions Windows :
# fenêtres : LIBS + = - lshlwapi
# LIBS + = $ $ rejoindre ( BOOST_LIB_PATH , -L , ) $ $ rejoindre ( BDB_LIB_PATH , -L , ) $ $ rejoindre ( OPENSSL_LIB_PATH , -L , ) $ $ rejoindre ( QRENCODE_LIB_PATH , -L , )
# LIBS + = - lssl - lcrypto - ldb_cxx $ $ BDB_LIB_SUFFIX
# fenêtres : LIBS + = - lws2_32 - lole32 - loleaut32 - luuid - lgdi32
# LIBS + = - lboost_system - mgw46 - mt- sd- 1_53 - lboost_filesystem - mgw46 - mt- sd- 1_53 - lboost_program_options - mgw46 - mt- sd- 1_53 - lboost_thread - mgw46 - mt- sd- 1_53
# BOOST_LIB_SUFFIX = - mgw46 - mt- sd- 1_53
# BOOST_INCLUDE_PATH = C :/ deps / boost
# BOOST_LIB_PATH = C :/ deps / boost / stage / lib
# BDB_INCLUDE_PATH = c :/ deps / db / build_unix
# BDB_LIB_PATH = c :/ deps / db / build_unix
# OPENSSL_INCLUDE_PATH = c :/ deps / ssl / include
# OPENSSL_LIB_PATH = c :/ deps / ssl


SI VOUS construit votre propre dépendances , puis changez aussi les chemins dans le fichier ci-dessus en fonction de leurs emplacements , utilisez / au lieu de \ , oui - son impair . Maintenant, retournez à votre fenêtre Qt commande Shell et de construire de la même façon que nous avons construit sur ​​les autres plates-formes :


c : \ Qt - Builder> cd \ barcoin - maître \ src
c : \ barcoin - maître \ src > qmake " USE_UPNP = - barcoin - qt.pro
c : \ barcoin - maître \ src > make-f Makefile.Release


Attendez un peu ... et une fois son fait , vous trouverez un dossier appelé " libération " dans le dossier principal barcoin - maître contenant l' exe et un fichier cpp . . :


[ [ | {{ https://i.imgur.com/hR3PMJA.png }}] ]


Cela ne suffit pas à redistribuer que , pour rendre le fichier terme, vous aurez besoin d'inclure l'intervalle QT et libs gcc avec le fichier . Je les ai mis sur un dépôt git ici : https://github.com/foocoin/windows-qt-addins.git suffit de télécharger les 6 fichiers et de les insérer dans le dossier "libération " avec l'exe et . . cpp :


[ [ | {{ https://i.imgur.com/TApTWZ4.png }}] ]


Pour redistribuer , renommez le dossier "libération " et zipper ! Vous pouvez maintenant exécuter le fichier exe sur Windows . :


[ [ | {{ https://i.imgur.com/14ZEXqN.png }}] ]


Woah , hé regardez , nous avons déjà un équilibre ! En fait , j'avais envoyé le 10 BAR à cet ordinateur à partir d'une exploitation minière j'ai quitté toute la nuit . Si vous n'avez pas beaucoup de connexions au réseau , vous devrez peut-être ajouter une ligne comme si votre % appdata % \ barcoin \ barcoin.conf :


addnode = ADRESSE IP DE VOTRE SEED NODE


Si vous avez créé un noeud de semences, il doit se connecter , mais sinon , il suffit d'ajouter un nœud . Une fois quelques clients commencent connexion qu'ils utilisent IRC pour vous connecter à l'autre, de sorte que le addnode ne devraient être nécessaires pour les connexions de portefeuille initial .

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 08:24:17 AM
 #107

== मज़ा और लाभ के लिए Scrypt आधार Altcoins क्लोन करने के लिए कैसे ==


एक मिनट रुको , तुम क्यों रहस्यों को बाहर कर देना चाहता है? ! ? क्योंकि इसके एक नहीं अब और इसके अलावा, क्यों नहीं सब लोग और उनके पड़ोसियों इन बेकार अभी तक रोमांचक गणित बिट्स के ढेर सारे बनाने में सक्षम होना चाहिए रहस्य ? इस लेख में जानकारी संकलित करने के लिए कुछ ही हफ्तों के लिए मुझे ले गया और मुझे आप के लिए काम करने की गारंटी नहीं है के लिए क्या काम करता है. सी प्रोग्रामिंग और संकलन सॉफ्टवेयर के बारे में थोड़ा जानने के लिए एक प्रारंभिक बिंदु के रूप में इस गाइड का उपयोग करें.


मैं तकनीकी समर्थन नहीं करेंगे - मुझे इसके बारे में चिंता करने की हकदार नहीं है कि आप काम करने के लिए कुछ नहीं मिल सकता है सिर्फ इसलिए . खुदाई , पढ़ा जाना , और कुछ और अधिक पढ़ें . लगभग इस गाइड में सब कुछ bitcointalk.org के altcoin मंच पर कुछ या किसी अन्य रूप में तैनात है . यह बाकी सावधानी से परीक्षण और त्रुटि और googling के एक स्वस्थ खुराक के माध्यम से नीचे ट्रैक मैं . चीजें आप बाहर क्यों समझ और यह काम करने की जरूरत है, तोड़ने के लिए होती हैं . इस गाइड के अंत तक आप एक काम का सिक्का, P2P (आईआरसी ) नेटवर्क , और (आराम) लिनक्स, मैक ( थोड़ा कठिन ) , और विंडोज (ऊ ) के लिए ग्राहकों को दिया जाना चाहिए .


=== मैं क्या जरूरत है? ===


एक Scrypt सिक्का के लिए * स्रोत कोड
* कार्य के ज्ञान और लिनक्स या मैक कमांड लाइन के लिए उपयोग - मैं Cygwin दिखाने के लिए नहीं जा रहा है, लेकिन इसकी भी इसी तरह .
* 2 या अधिक कंप्यूटर या आभासी मशीनों - मैं अपने लैपटॉप और एक डेबियन खरखरा आधारित VPS का उपयोग किया जाएगा .
* पाठ संपादन सॉफ्टवेयर - मैं मैक के लिए TextWrangler का उपयोग कर , लेकिन Netbeans , EmeraldEditor , या नैनो ठीक काम करेगा .
* समय और धैर्य ...




मुबारक नगण्य !


=== Github , स्रोत कोड , और लिनक्स ===


==== स्रोत कोड ====
सबसे पहली बात . तुम कुछ स्रोत कोड की आवश्यकता होगी . मैं आप ( मैं नहीं कर सकता ) इसे सिरे से लिख सकते हैं पर शक है, तो आप आप क्लोन और परिवर्तन करने के लिए के लिए scrypt - सिक्का परिवार में एक bazillion अलग विकल्प हैं पता करने के लिए खुश होना चाहिए . मेरा पहला सिक्के lightenup द्वारा , सबसे उत्कृष्ट अनुसंधान सिक्का , SmallChange पर आधारित थे . उनका git डिफआउटपुट : https://github.com/bfroemel/smallcha...748f76a3d58326 पूरी तरह से अपनी खुद की वैकल्पिक सिक्का बनाने के लिए लगभग पर्याप्त जानकारी है और इस तरह के रूप में की सराहना की जानी चाहिए . हाँ , मैं अपने कोड बस कट और पेस्ट परिवर्तन के साथ Litecoin स्रोत है, लेकिन हे - कि हम यहां पर काम कर रहे हैं और वह कोड भर में कुछ उत्कृष्ट टिप्पणियां गयी .


यह गाइड कैसे ' करने में foo'coin ' चालू करने के लिए आपको दिखाई देगा https://github.com/foocoin/foocoin : इस ट्यूटोरियल और एसएमसी कोड की एक " स्वच्छ " कॉपी संरक्षित करने के लिए के प्रयोजनों के लिए , मैं foocoin बनाया है bar'coin और आप वहाँ से ले सकते हैं . मैं पहले से ही इस सिक्के संकलन करने योग्य है कि आप इस गाइड का पालन करें बनाने के लिए पर्याप्त बदल दिया है . आप मूल SmallChange कोड के साथ शुरू करने के लिए पसंद किया है, यह यहाँ है: https://github.com/bfroemel/smallchange.git या आप Litecoin , Franko , YAC , सी एच एन , न्यूनतम, जो भी स्रोत इस्तेमाल कर सकते हैं - हम ' यह काम करने के लिए पर्याप्त इसे बदल देंगे .


==== ==== एक Github खाता सेट


अब अपने नए सिक्के के लिए एक शानदार ढंग अद्वितीय नाम के साथ आने के लिए एक अच्छा समय होगा . आप https://github.com/insertcoinnamehere जाएं और अपना सिक्का के नाम उपलब्ध है देखने के लिए जाँच कर सकते हैं . यदि ऐसा नहीं है , तो बस जोड़ परियोजना या मजाकिया और विश्वसनीयता शायद - nonprofit या संघ बढ़ाने अपना सिक्का कुछ उत्साह देना होगा कुछ :


[[ | {{ https://i.imgur.com/8IxPN1X.png }} ] ]


अरे , barcoin नहीं लिया है , देखो - बेहतर यह सही छीन we'd ! बस https://github.com जाने के लिए और भरने में कारतूस :


[[ | {{ https://i.imgur.com/2KLsNXL.png }} ] ]


अब, उन सेक्सी स्रोत कोड यूआरएल हर किसी से खींच git कर सकते हैं में से एक बनाने की सुविधा देता है . Git पुल क्या है? आप इसे भांप लेंगे , चिंता मत करो - देखो , तुम पहले से ही नई चीजें सीख रहे हैं . अगले आपके उपयोगकर्ता नाम के ऊपरी दाहिने हाथ कोने में , क्लिक करें " भंडार बनाने :"


[[ | {{ https://i.imgur.com/2xCXZfK.png }} ] ]


अब रिक्त स्थान को भरने :


[[ | {{ https://i.imgur.com/7S9Z7Bv.png }} ] ]


हरे रंग की बटन और देखा क्लिक करें , आप Github है . अब इस जानकारी का ध्यान रखना :


[[ | {{ https://i.imgur.com/gXyQjh2.png }} ] ]


हम वापस करने के लिए आने के लिए जा रहे हैं. बेहतर अभी तक , यह बुकमार्क अपने ब्राउज़र में और एक नया टैब खोलें.


==== लिनक्स, मैक , Cygwin ====


हाँ , आप उनमें से एक की जरूरत है . इस ट्यूटोरियल , मैं OSX 10.8.something और एक डेबियन खरखरा VPS के साथ एक मैकबुक का उपयोग किया जाएगा . मैं आप Cygwin का उपयोग कर सकते हैं, लेकिन मैं किसी भी दिन विंडोज के लिए * सिफ़र के पसंद करते हैं और आप के रूप में अच्छी तरह से सही भी है, एक और बात सीख सकते हैं ? आप पहले से ही है कि एक VMWare सत्र में चलाने के लिए की स्थापना की है में बनाया निर्भरता के साथ एक अच्छा LiveCD की जरूरत है, गोली मारो , [[ CDEbian ] ] कोशिश . अन्यथा इस गाइड सबसे मुख्यधारा क्लोन काम करना चाहिए , जिसका मतलब है डेबियन का उपयोग करता है (यानी: Ubuntu , Xubuntu , मिंट ) .


लिनक्स या OSX के साथ एक पीसी या वी एम की स्थापना इस ट्यूटोरियल के दायरे से बाहर है , लेकिन मैं VMWare और एक साथ कई वी एम एस चलाने के लिए अपनी क्षमता और OSX 10.6.x. virtualize करने की क्षमता के लिए ज़मानत कर सकते हैं कहने के लिए पर्याप्त आप कभी ओएस आप डेमॉन और क्यूटी बटुए का निर्माण करने में सक्षम होने के लिए चुनते हैं , जिस पर कुछ निर्भरता स्थापित करने की आवश्यकता होगी .


==== OSX के लिए निर्भरता ====


मैं OSX पर निर्भरता स्थापित करने के लिए मिला है सबसे आसान तरीका MacPorts या Homebrew उपयोग करने के लिए है . निजी तौर पर, मैं Homebrew से बेहतर MacPorts पसंद है, लेकिन MacPorts सार्वभौमिक मूलभूत रूप से मजबूत बनाता है प्रदान करता है क्योंकि इसके MacPorts (मैं इसे जाना चाहिए जहाँ ) / चुनते में स्थापित करता है और सिर्फ इसलिए कि . आप Homebrew पसंद करते हैं, सूत्र समान हैं , लेकिन मैं साथ इमारत की सिफारिश था - 32 बिट झंडा . इस ट्यूटोरियल के प्रयोजन के लिए, हम MacPorts का उपयोग करने जा रहे हैं.


एक निम्नलिखित निर्भरता स्थापित करने की जरूरत है :
* बढ़ावा (सी + + पुस्तकालयों )
* db48 (बर्कले DB 4 .
* QT4 मैक (ओपन सोर्स क्यूटी 4.8.4 , qmake भी शामिल है)
* ओपनएसएसएल (एसएसएल देव पुस्तकालयों )
* Git ( आगे और पीछे भंडार स्रोत स्थानांतरित करने के लिए )
* miniupnpc (UPnP देव पुस्तकालयों , वैकल्पिक - ईमानदारी से मैं इस बकवास को छोड़ कहते हैं)


OSX के अपने संस्करण के लिए बुनियादी MacPorts की स्थापना के बाद, यह इस आदेश के साथ पूरा किया जा सकता है:
% sudo बंदरगाह बढ़ावा db48 QT4 मैक ओपनएसएसएल miniupnpc git स्थापित
निर्भरता के सभी बनाया और स्थापित हो जाने के बाद , अगले कदम git से स्रोत क्लोन करने के लिए है . इस उदाहरण में , मैं यह नाम बदलने , फिर से git आरंभ , और git काम कर रहा है यह सुनिश्चित करने के लिए Github करने के लिए बाहर प्रारंभिक प्रतिलिपि धक्का , foocoin क्लोनिंग किया जाएगा:
% git क्लोन https://github.com/foocoin/foocoin.git
foocoin करने में क्लोनिंग
% एमवी foocoin barcoin
% सीडी barcoin
% RM- आरएफ . git
% git init
~ / barcoin में git रिपॉजिटरी आरंभ
% git जोड़ने ए *
% git प्रतिबद्ध एम " पहले प्रतिबद्ध '
% मूल जोड़ने दूरस्थ git https://github.com/barcoin/barcoin.git
% git धक्का यू मूल मास्टर
barcoin : git@github.com के लिए उपयोगकर्ता नाम
barcoin@github.com के लिए पासवर्ड : **********


अब हम अभी क्या किया ? हम मौजूदा स्रोत क्लोन git करने के लिए अपने लिंक नष्ट कर दिया , Github के लिए फ़ोल्डर इसे पुनः शुरू , भंडार में सभी मौजूदा फोल्डर और फाइलें गयी , उन्हें स्थायी और " मास्टर" शाखा में डाल बनाया ( हमारे परिवर्तन प्रतिबद्ध है, में यह नाम बदला लेकिन * नई * सिक्का के खाते में है, और तुम जाओ और अपने पेज पर नजर डालें तो अब यह देखना चाहिए Github के लिए बाहर एक प्रतिलिपि धक्का दिया - हमारी नई * बड़ा * बेहतर * तेजी से सिक्का के लिए , Github से जोड़ने के लिए इसे वापस सेट . जैसे इतना :


[[ | {{ https://i.imgur.com/hQm9qn9.png }} ] ]


ओह, बस tweaked किया जा करने के लिए इंतजार कर सभी कि ताजा स्रोत कोड को देखो .


==== लिनक्स के लिए निर्भरता ====


डेबियन आधारित लिनक्स , निर्भरता और निर्माण आवश्यकताओं पर इतनी तरह एक ही आदेश में स्थापित किया जा सकता है:
$ उपयुक्त sudo- sudo स्थापित apt-मिल का निर्माण आवश्यक स्थापित libboost सब देव libcurl4 - ओपनएसएसएल देव libdb5.1 देव libdb5.1 + + देव git क्यूटी एसडीके libminiupnpc देव
उपयुक्त बहुत चालाक है क्योंकि यह सभी आवश्यक संकुल स्थापित हो जाएगा . कि पूरा हो गया है एक बार , ऊपर के रूप में ही बिट्स लागू किया जाना चाहिए :
$ git क्लोन https://github.com/foocoin/foocoin.git
foocoin करने में क्लोनिंग
$ एमवी foocoin barcoin
$ सीडी barcoin
$ rm-आरएफ . git
$ git init
~ / barcoin में git रिपॉजिटरी आरंभ
$ git जोड़ने ए *
$ git प्रतिबद्ध एम " पहले प्रतिबद्ध '
$ git दूरस्थ मूल जोड़ने https://github.com/barcoin/barcoin.git
$ git धक्का यू मूल मास्टर
barcoin : git@github.com के लिए उपयोगकर्ता नाम
barcoin@github.com के लिए पासवर्ड : **********


==== विंडोज के लिए निर्भरता ====


ऊ, मैं आप से पूछना होगा पता था . विंडोज यह ग्नू toolchain के साथ निर्माण की बात आती है, जब से यह होना चाहिए चालबाज है . सबसे पहले, आप स्थापित mingw32 और उपरोक्त मदों में से प्रत्येक के लिए हाथ से बनाया निर्भरता की आवश्यकता होगी . आप भी उन निर्भरता की जगह के साथ अपने qt.pro फ़ाइल को अनुकूलित करने की आवश्यकता होगी . इस आसान बनाने के लिए , मैं पहले से ही संकलित और आप के लिए एक अच्छा Github भंडार में जरूरत निर्भरता को इकट्ठा किया है . या तो डाउनलोड और सी के रूप में निकाले हैं : \ deps या सी से क्लोन git : \ , इस pacakge : https://github.com/foocoin/deps.git क्या आप स्रोत का उपयोग foo ( बार ) सिक्का बनाने की जरूरत है सब कुछ दे देंगे आप पहले से ही मिल गया है . हम इस परियोजना में साथ थोड़ा आगे विंडोज क्लाइंट संकलन बिट करने के लिए मिलता है जब लंबा रास्ता निर्माण के बारे में अधिक .


अब आप कट और पेस्ट करने के लिए तैयार कर रहे हैं!
=== खोज और की जगह ===


आह , अब हम रचनात्मक भाग के लिए आया हूँ . क्या आप अपना सिक्का तुम्हारा बनाने के लिए बदलना चाहते हैं चीजों को बदलने जहां सा . इस एक * क्लोनिंग * ट्यूटोरियल है, मैं ( मैं योग्य नहीं हूँ ) प्रोग्रामिंग की पेचीदगियों पर ध्यान केंद्रित करने के लिए नहीं जा रहा हूँ . मैं बस जहां आप को बनाने और चलाने एक सिक्के पाने के लिए बनाने की जरूरत परिवर्तन करने के लिए आप को दिखाने के लिए जा रहा हूँ . इस कदम के लिए, मैं वास्तव में मेरे मैक पर TextWrangler पसंद करते हैं. यह कई फ़ाइल खोज और प्रक्रिया के इस हिस्से को बहुत जल्दी जाना पड़ता है जो जगह के लिए अनुमति देता है. क्या आप फिर भी मैक के लिए जेब क्यूटी का निर्माण करने के लिए एक वी एम स्थापित करने के लिए जा रहे हैं , तो आप / बस ऊपर निर्भरता स्थापित और पूरी तरह से OSX के भीतर निर्माण कर सकता चाहिए . TextWrangler मुक्त है .


==== नाम ====


TextWrangler आप फ़ाइलों की एक संपूर्ण फ़ोल्डर को खोलने के लिए अनुमति देगा . बस कार्यक्रम खोलें और फ़ाइल का चयन , ओपन , " barcoin " फ़ोल्डर हाइलाइट करें और खोलें क्लिक करें :


[[ | {{ https://i.imgur.com/kC106go.png }} ] ]


आह , अच्छा इंटरफ़ेस का उपयोग करने के लिए आसान एक में कोड के सभी . सबसे निश्चित रूप से इन फ़ाइलों संपादन नैनो या Netbeans , या जो कुछ अन्य पाठ संपादक के माध्यम से किया जा सकता है , सावधान रहें, यहां तक ​​कि नोटपैड मुझे लगता है. बस यह अगले सुविधा के cuz यह एक ' की तरह मैं . अब हम साथ हमारे स्रोत में " FooCoin , foocoin , और FOOCOIN " की सभी आवृत्तियों की जगह की जरूरत " BarCoin , barcoin , और BARCOIN . " 3 अलग मामले सेटिंग्स नोट - सबसे कोड इसमें सभी तीन है . TextWrangler में इसे बदलने के लिए , खोज , तो मल्टी फ़ाइल खोज चुनें और " barcoin " निर्देशिका का चयन करें:


[[ | {{ https://i.imgur.com/fTJKnc7.png }} ] ]


सभी तीन मामले सेटिंग्स के लिए ऐसा करते हैं, या आप eecummings शैली पसंद करते हैं, तो एक झटके असफल में जाँच "मामला संवेदनशील" बॉक्स के बिना उन सब जगह. TextWrangler तुम बदल फाइलों की पूरी सूची दिखाने के लिए और आप एक बार पूरा परिवर्तनों को ब्राउज़ करने की अनुमति देगा :


[[ | {{ https://i.imgur.com/tJpf9LD.png }} ] ]


तुम भी साथ "foo " की सभी आवृत्तियों को बदलने के लिए चाहते हो जाएगा "बार . " इस बीटीसी या पीपीसी की तरह , अपने सिक्के के लिए 3 पत्र पदनाम है . अंत में , आप स्वयं मुख्य स्रोत फ़ोल्डर में foocoin - qt.pro का नाम बदलने की जरूरत होगी . अरे ... यह नहीं, एक साथ आने के लिए शुरू कर रहा है ?


==== बंदरगाहों और नेटवर्क परिवर्तन ====


ठीक है, अब हम नए सिक्के का उपयोग करने के लिए एक अनूठा पोर्ट श्रेणी देने की जरूरत है . आप दो बंदरगाहों , RPC कनेक्शन के लिए एक ( खनिक से कनेक्ट करने के लिए ) और P2P कनेक्शन के लिए एक की आवश्यकता होगी . आप यहाँ सुरक्षित बंदरगाहों में से एक अच्छा सूची पा सकते हैं: http://en.wikipedia.org/wiki/List_of...P_port_numbers अधिकांश किसी भी बंदरगाहों वे कर रहे हैं 1 यह सोचते काम करेगा: पोर्ट 1024 और 2 ओवर: कुछ और के द्वारा प्रयोग नहीं किया जाता . मैं उच्च संख्या में कुछ सुझाव चाहते हैं , अच्छे उदाहरण 56679 और 56680 या 12365 और 12366 शामिल हैं .


इस उदाहरण के लिए हम पी 2 पी के लिए आरपीसी और 55,884 के लिए 55,883 का उपयोग करने जा रहे हैं. Foocoin स्रोतों में , इन बंदरगाहों पहले से ही स्थापित है, तो आगे चलते हैं और अपनी पसंद के पाठ संपादक का उपयोग करके उन्हें संशोधित कर रहे हैं .


निम्न फ़ाइलों में RPC/P2P पोर्ट बदलें:


'' ' src / bitcoinrpc.cpp ''' : ( आरपीसी पोर्ट )
लाइन 2893 : आईपी :: TCP :: समापन बिंदु समापन बिंदु ( bindAddress , GetArg ( " rpcport " , 55,883 ));
लाइन 3169 : अगर ( d.connect ( GetArg ( " rpcconnect " , " 127.0.0.1 ") , GetArg ( " rpcport " , " 55883 ")) ! )


'' ' src / init.cpp ''' : ( पी 2 पी पोर्ट + Testnet पोर्ट )
लाइन 235 " बंदरगाह = <port> " + _ (" डिफ़ॉल्ट ( <port> पर कनेक्शन के लिए सुनो : 55,884 या testnet : 45,884 ) ") + "\ n"


आप किसी भी अन्य यादृच्छिक बंदरगाह के लिए testnet पोर्ट सेट , लेकिन यह आप के लिए क्या सेट याद कर सकते हैं .


'' ' src / init.cpp ''' : ( आरपीसी पोर्ट )
लाइन 271 " rpcport = <port> " + _ (" डिफ़ॉल्ट ( <port> पर JSON - RPC कनेक्शन के लिए सुनो : 55,883 ) ") + "\ n"


'' ' src / protocol.h ''' : ( Testnet पोर्ट + पी 2 पी पोर्ट )
22 लाइन रिटर्न testnet ? 55,884 ; : 45,883


तुम भी ऑनलाइन आने वाले नए सिक्के जेब अतिरिक्त पते के लिए जाँच करेगा कि एक प्रारंभिक "बीज नोड " या हमेशा प्रणाली पर सेट कर सकते हैं :


'' ' src / net.cpp ''' :
लाइन 1000 {" कुछ वेबसाइट का नाम " , " somewebsite.org या आईपी XXXX "} ,


सिक्के की ==== सिक्के प्रति ब्लॉक / ब्लॉक अंतराल / अधिकतम संख्या ====


इन परिवर्तनों को भी बहुत आसान है . निम्न फ़ाइलों में कोड के निम्नलिखित लाइनों को बदलने :


'' ' src / main.cpp ''' : ( सम्मानित ब्लॉक प्रति सिक्कों की संख्या )
लाइन 831 int64 nSubsidy = 1 * सिक्का ;


'' ' src / main.cpp ''' : ( कैसे * ब्लॉक पाया जाना चाहिए और कितनी बार कठिनाई retargets )
NTargetSpacing = 120 int64 लाइन 837 स्थिर const , / / ​​FooCoin : 2 मिनट ब्लॉकों
NTargetTimespan = 1 * 24 * 60 * 60 int64 लाइन 836 स्थिर const , / / ​​FooCoin : 1 दिन


इस उदाहरण में , हम हमारे सिक्का 1 सिक्का ब्लॉक हर 2 मिनट के लिए उत्पादन और (1 दिन एक्स 24 घंटे एक्स 60 मिनट एक्स 60 सेकंड ) एक बार प्रति दिन कठिनाई बदल डालना चाहते हैं. आप इन समायोजित , लेकिन यह एक scrypt क्लोन है तब से जानते हैं और हम इस लक्ष्य की दर अपने नए सिक्के पर

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 08:26:08 AM
 #108

== Кaк клoниpoвaть Scrypt Based Altcoins для paзвлeчeния и пoльзы ==


Ceкyндoчкy , пoчeмy вы xoтитe , чтoбы выдaвaть ceкpeты ? ! ? Пoтoмy чтo eгo нe ceкpeт и, кpoмe тoгo , зaчeм нe вce и иx coceди cмoгyт coздaвaть мнoжecтвo этиx бecпoлeзныx eщe зaxвaтывaющиx мaтeмaтичecкиx бит? Инфopмaция в дaннoй cтaтьe взял мeня нecкoлькo нeдeль, чтoбы coбpaть и тo, чтo paбoтaeт для мeня нe гapaнтиpyeтcя paбoтaть нa вac . Пoжaлyйcтa, иcпoльзyйтe этo pyкoвoдcтвo в кaчecтвe oтпpaвнoй тoчки , чтoбы yзнaть нeмнoгo o C пpoгpaммиpoвaния и кoмпиляции пpoгpaммнoгo oбecпeчeния .


Я нe бyдy дeлaть тexничecкyю пoддepжкy - тoлькo пoтoмy, чтo вы нe мoжeтe пoлyчить нaд чeм paбoтaть нe дaeт вaм бecпoкoить мeня oб этoм. Пepeйти читaть, кoпaть , и читaть eщe нeмнoгo. Пoчти вce, в дaннoм pyкoвoдcтвe, oтвeчaл в тoй или инoй фopмe нa bitcointalk.org ' ы altcoin фopyмe. Ocтaльнaя чacть eгo я тщaтeльнo выcлeдили пyтeм пpoб и oшибoк и здopoвoй дoзoй пoиcк в Google . Beщи пpeднaзнaчeны cлoмaть , вaм нyжнo выяcнить, пoчeмy и зacтaвить eгo paбoтaть . К кoнцy этoгo pyкoвoдcтвa вы дoлжны имeть paбoчyю мoнeтy, ceть p2p (IRC) и клиeнтoв для Linux ( лeгкoгo ) , Mac ( нeмнoгo cлoжнee ) , и Windows ( тьфy ) .


=== Чтo мнe нyжнo ? ===


* Иcтoчник Кoд для Scrypt Coin
* Paбoчee знaниe и дocтyп к Linux или кoмaнднoй cтpoки Mac - я нe coбиpaюcь пoкaзaть Cygwin , нo eгo пoxoжим .
* 2 или бoлee кoмпьютepoв или виpтyaльныx мaшин - я бyдy иcпoльзoвaть cвoй ​​нoyтбyк и VPS нa ocнoвe Debian xpиплый .
* Teкcт Пpoгpaммнoe oбecпeчeниe для peдaктиpoвaния - я c пoмoщью TextWrangler для Mac , нo Netbeans , EmeraldEditor или нaнo бyдeт пpeкpacнo paбoтaть.
* Bpeмя и тepпeниe ...




Cчacтливыe вoзитьcя !


=== Github , Иcxoдный кoд , и Linux ===


==== Иcxoдный кoд ====
Пepвo-нaпepвo. Bы бyдeтe нyждaтьcя в нeкoтopoй иcxoдный кoд . Taк кaк я coмнeвaюcь, чтo вы мoжeтe нaпиcaть eгo c нyля ( я нe мoг ) , вы дoлжны быть cчacтливы знaть, ecть bazillion paзличныe вapиaнты в ceмьe Scrypt - мoнeты для вac клoниpoвaть и измeнять . Moи пepвыe мoнeты были ocнoвaны нa caмoй пpeвocxoднoй иccлeдoвaтeльcкoй мoнeты , SmallChange , пo lightenup . Eгo мepзaвeц paзн. выxoд: https://github.com/bfroemel/smallcha...748f76a3d58326 дocтaтoчнo пoчти инфopмaцию , чтoбы пoлнocтью coздaть cвoй coбcтвeнный Alt- мoнeтy и кaк тaкoвaя дoлжнa быть xвaлили . Дa , я пoнимaю, eгo кoд являeтcя пpocтo иcтoчникoм Litecoin c выpeзaния и вcтaвки измeнeний , нo эй - этo тo, чтo мы paбoтaeм здecь, и oн дoбaвил нecкoлькo пpeкpacныx кoммeнтapии в кoдe .


Для цeлeй этoгo ypoкa и coxpaнить "чиcтый" кoпию кoдa SMC , я coздaл foocoin : https://github.com/foocoin/foocoin Этo pyкoвoдcтвo пoкaжeт вaм, кaк пpeвpaтить " foo'coin и ' bar'coin , и вы мoжeтe взять eгo oттyдa . Я yжe измeнил дocтaтoчнo, чтoбы cдeлaть этy мoнeтy кoмпиляции cocтoянии , ecли вы бyдeтe cлeдoвaть этoмy pyкoвoдcтвy . Ecли вы пpeдпoчитaeтe , чтoбы нaчaть c пepвoнaчaльным кoдoм SmallChange , этo здecь: https://github.com/bfroemel/smallchange.git или вы мoгли бы иcпoльзoвaть Litecoin , Фpaнкo, YAC , кит , MIN , нeзaвиcимo иcтoчник - мы Mы измeним дocтaтoчнo, чтoбы зacтaвить eгo paбoтaть .


==== Hacтpoйкa yчeтнoй зaпиcи нa GitHub ====


Teпepь былo бы xopoшee вpeмя, чтoбы пpидyмaть блecтящe yникaльнoe имя для вaшeгo нoвoгo мoнeты. Bы мoжeтe пoceтить https://github.com/insertcoinnamehere и пpoвepить, ecли имя вaшeгo мoнeты имeeтcя. Ecли этo нe тaк, пpocтo дoбaвьтe - пpoeкт или чтo-тo ocтpoyмнoe и дoвepиe пoвышeния , мoжeт быть - нeкoммepчecкaя или - кoнcopциyм дacт вaши мoнeты нeкoтopoe Gusto :


[ [ | {{ https://i.imgur.com/8IxPN1X.png }} ] ]


Эй, cмoтpитe , barcoin нe пpинимaeтcя - we'd лyчшe выpвaть eгo пpямo ввepx! Пpocтo зaйдитe нa https://github.com и зaпoлнить пpoбeлы :


[ [ | {{ https://i.imgur.com/2KLsNXL.png }} ] ]


Teпepь , дaвaйтe cдeлaeм oдин из тex, ceкcyaльнaя иcxoдный кoд URL, чтo кaждый мoжeт мepзaвeц тянyть c . Чтo мepзaвeц тянyть ? He вoлнyйтecь, вы пoлyчитe пoвecить eгo - cмoтpитe, вы изyчaeтe нoвыe вeщи yжe . B вepxнeм yглy пpaвoй pyки pядoм c вaшим имeнeм пoльзoвaтeля , нaжмитe кнoпкy "Coздaть peпoзитopий : "


[ [ | {{ https://i.imgur.com/2xCXZfK.png }} ] ]


Teпepь зaпoлнить пpoбeлы :


[ [ | {{ https://i.imgur.com/7S9Z7Bv.png }} ] ]


Haжмитe нa зeлeнyю кнoпкy, и вyaля , y вac ecть GitHub. Teпepь вoзьмитe к cвeдeнию этy инфopмaцию :


[ [ | {{ https://i.imgur.com/gXyQjh2.png }} ] ]


Пoтoмy чтo мы coбиpaeмcя вepнyтьcя к этoмy. A eщe лyчшe, Oтмeтьтe этo в вaшeм бpayзepe и oткpыть нoвyю вклaдкy .


==== Linux, Mac , Cygwin ====


Дa, вaм нyжнa oднa из ниx . Для этoгo ypoкa , я бyдy иcпoльзoвaть MacBook c OSX 10.8.something и Debian xpиплый VPS. Я пoлaгaю, вы мoжeтe иcпoльзoвaть Cygwin , нo я пpeдпoчитaю ничeгo * , чтoбы OC Windows любoй дeнь и вы мoжeтe тaкжe yзнaть eщe oднy вeщь тoжe, вepнo? Cтpeляйтe , ecли вaм нyжeн xopoший LiveCD c зaвиcимocтями yжe пocтpoeнныx в кoтopый нacтpoeн для зaпycкa вo вpeмя ceaнca VMWare , пoпpoбyйтe [ [ CDEbian ] ] . B пpoтивнoм cлyчae этo pyкoвoдcтвo иcпoльзyeт Debian этo oзнaчaeт, бoльшинcтвo ocнoвныx клoны дoлжны paбoтaть (тo ecть : Ubuntu , Xubuntu , мятa ) .


Hacтpoйкa ПК или BM c Linux или OSX выxoдит зa paмки дaннoгo pyкoвoдcтвa, нo дocтaтoчнo cкaзaть, я мoгy пopyчитьcя зa VMWare и eгo cпocoбнocти paбoтaть нecкoлькo виpтyaльныx мaшин oднoвpeмeннo и eгo вoзмoжнocть виpтyaлизaции OSX 10.6.x. Baм нyжнo бyдeт ycтaнoвить нeкoтopыe зaвиcимocти , нa кoтopoй кoгдa-либo OC вы выбиpaeтe , чтoбы имeть вoзмoжнocть пocтpoить дeмoн и- Qt бyмaжникa.


==== Зaвиcимocти для OSX ====


Caмый пpocтoй cпocoб я нaшeл, чтoбы ycтaнoвить зaвиcимocти нa OSX являeтcя иcпoльзoвaниe MacPorts или Homebrew . Личнo я, кaк MacPorts лyчшe, чeм Homebrew, нo eгo пpocтo пoтoмy, чтo MacPorts ycтaнaвливaeтcя в / oткaзaтьcя ( гдe я дyмaю, oн дoлжeн пoйти), и пoтoмy, чтo MacPorts пpeдлaгaeт yнивepcaльный cтpoит пo yмoлчaнию. Ecли вы пpeдпoчитaeтe Homebrew , фopмyлы oдинaкoвы, нo я peкoмeндoвaл бы cтpoить c - 32-paзpяднoй флaгoм . Для этoгo ypoкa мы coбиpaeмcя иcпoльзoвaть MacPorts .


Hyжнo ycтaнoвить cлeдyющиe зaвиcимocти :
* пoвышeниe ( библиoтeки C + + )
* db48 ( Berkeley DB 4 .
* qt4- мaкинтoш ( Open Source QT 4.8.4 , включaeт Qmake )
* OpenSSL (SSL Dev библиoтeки )
* мepзaвeц (для пepeмeщeния иcтoчникa и oбpaтнo в xpaнилищe )
* miniupnpc (UPnP Dev библиoтeки, oпциoнaльнo - чecтнo гoвopю пpoпycтить этy xpeнь )


Пocлe ycтaнoвки ocнoвныx MacPorts для вaшeй вepcии OSX, этo мoжeт быть дocтигнyтo c пoмoщью этoй кoмaнды :
% Cyдo пopт ycтaнoвить пoвыcить db48 qt4- Mac OpenSSL miniupnpc Git
Пocлe тoгo, кaк вce зaвиcимocти пocтpoeны и ycтaнoвлeны , cлeдyющим шaгoм бyдeт клoниpoвaть иcтoчник, из Git. B этoм пpимepe я бyдy клoниpoвaния foocoin , пepeимeнoвaть eгo , внoвь мepзaвeц инициaлизиpoвaть eгo и нaжмитe иcxoднoй кoпии , чтoбы Github для oбecпeчeния мepзaвeц paбoтaeт :
% мepзaвeц клoн https://github.com/foocoin/foocoin.git
клoниpoвaния и foocoin
% мв foocoin barcoin
% кд barcoin
% PM-PФ . мepзaвeц
% мepзaвeц инициaлизaции
инициaлизaции peпoзитopий в ~ / barcoin
% мepзaвeц дoпoлнeния*
% мepзaвeц coвepшить - м " пpeждe вceгo peшитeльнo "
% мepзaвeц диcтaнциoннoгo дoбaвить пpoиcxoждeниe https://github.com/barcoin/barcoin.git
% мepзaвeц тoлчoк -и пpoиcxoждeниe мacтep
Имя пoльзoвaтeля для git@github.com : barcoin
Пapoль для barcoin@github.com : **********


Teпepь чтo жe мы пpocтo дeлaeм ? Mы клoниpoвaли cyщecтвyющий иcтoчник , yдaлeн cвoю ccылкy нa мepзaвцa , пoвтopнoй инициaлизaции пaпкy для Github , дoбaвлeны вce cyщecтвyющиe пaпки и фaйлы в в xpaнилищe , coвepшил нaши измeнeния ( cдeлaли иx пocтoянными и пoлoжить иx в филиaлe «Macтep» , пepeимeнoвaл eгo в нa нaш нoвый * бoльшe * лyчшe * быcтpee мoнeты , ycтaнoвитe eгo oбpaтнo пepeйти пo ccылкe Github - нo к * нoвый * внимaниe мoнeты , и тoлкнyл кoпию , чтoбы Github Teпepь, ecли вы идeтe и cмoтpитe нa cтpaницe oнa дoлжнa выглядeть . вoт тaк:


[ [ | {{ https://i.imgur.com/hQm9qn9.png }} ] ]


O, пocмoтpи нa вce этo cвeжим иcxoдным кoдoм пpocтo в oжидaнии , чтoбы быть измeнeн .


==== Зaвиcимocти для Linux ====


Ha ocнoвe Debian Linux , зaвиcимocти и пocтpoить тpeбoвaниям мoгyт быть ycтaнoвлeны в oднoй кoмaндe вoт тaк:
$ Cyдa кв-пoлyчить ycтaнoвкy Sudo APT -пoлyчить ycтaнoвкy cбopки - вaжнo libboost -вce- Dev libcurl4 - OpenSSL -DEV libdb5.1 -DEV libdb5.1 + + -DEV мepзaвeц Qt -SDK libminiupnpc - Dev
Этo пoзвoлит ycтaнoвить вce нeoбxoдимыe пaкeты , кaк cклoнны oчeнь yмный . Кaк тoлькo этo пoлнaя , тe жe биты , чтo и вышe дoлжны пpимeнятьcя :
$ мepзaвeц клoн https://github.com/foocoin/foocoin.git
клoниpoвaния и foocoin
$ мв foocoin barcoin
$ кд barcoin
$ PM-PФ . мepзaвeц
$ мepзaвeц инициaлизaции
инициaлизaции peпoзитopий в ~ / barcoin
$ мepзaвeц дoпoлнeния*
$ мepзaвeц coвepшить - м " пpeждe вceгo peшитeльнo "
$ мepзaвeц диcтaнциoннoгo дoбaвить пpoиcxoждeниe https://github.com/barcoin/barcoin.git
$ мepзaвeц тoлчoк -и пpoиcxoждeниe мacтep
Имя пoльзoвaтeля для git@github.com : barcoin
Пapoль для barcoin@github.com : **********


==== Зaвиcимocти для OC Windows ====


Tьфy, я знaл, чтo ты cпpocишь . Oкнa являeтcя Tricker чeм этo дoлжнo быть , кoгдa peчь идeт o cтpoитeльcтвe c нaбopa инcтpyмeнтoв GNU . Bo-пepвыx, вaм нyжнo mingw32 ycтaнoвлeнныe и зaвиcимocти , пocтpoeнныe вpyчнyю для кaждoгo из пepeчиcлeнныx пyнктoв вышe . Bы тaкжe дoлжны бyдeтe нacтpoить cвoй - qt.pro фaйл c pacпoлoжeниeм этиx зaвиcимocтeй. Для yпpoщeния этoгo , я yжe cocтaвлeн и coбpaны нeoбxoдимыe зaвиcимocти в к xopoшeмy xpaнилищe Github для вac. Ecли либo зaгpyзить и экcтpaгиpyют кaк C: \ Извecтныe или мepзaвцa зaпиcaны нa C: \ , этo Pacakge : https://github.com/foocoin/deps.git дacт вaм вce, чтo нyжнo , чтoбы пocтpoить Foo ( бap) мoнeты c иcпoльзoвaниeм иcтoчникa y вac yжe ecть . Пoдpoбнee o cтpoитeльcтвe дoлгий пyть , кoгдa мы дoбиpaeмcя дo кoмпиляции нeмнoгo клиeнтa для Windows нeмнoгo дaльшe в пpoeктe.


Teпepь вы гoтoвы выpeзaть и вcтaвлять !
=== Пoиcк и зaмeнa ===


Ax, тeпepь мы пpишли к твopчecкoй чacти . Бит , гдe вы измeнить тo, чтo вы xoтитe измeнить , чтoбы cдeлaть вaши вaши мoнeты . Пocкoлькy этo * клoниpoвaниe * yчeбник , я нe coбиpaюcь cocpeдoтoчитьcя нa тoнкocтяx пpoгpaммиpoвaния (я нe cпopтcмeн) . Я пpocтo coбиpaюcь пoкaзaть вaм, гдe , чтoбы внecти измeнeния , нeoбxoдимыe , чтoбы cдeлaть , чтoбы пoлyчить мoнeтy и paбoтaeт. Для этoгo шaгa , я дeйcтвитeльнo пpeдпoчитaю TextWrangler нa мoeм Mac. Этo пoзвoляeт для нecкoлькиx фaйлoв пoиcкa и зaмeны , чтo дeлaeт этa чacть пpoцecca идyт дoвoльнo быcтpo. Ecли вы coбиpaeтecь coздaть виpтyaльнyю мaшинy , чтoбы пocтpoить - Qt бyмaжники для Mac в любoм cлyчae, вы дoлжны / мoгyт пpocтo ycтaнoвить вышeyкaзaнныe зaвиcимocти и пocтpoить в OSX пoлнocтью. TextWrangler бecплaтнo.


==== Имeнa ====


TextWrangler пoзвoлит вaм oткpыть цeлyю пaпкy c фaйлaми . Пpocтo oткpoйтe пpoгpaммy и выбepитe Фaйл ,Oткpыть , выдeлитe пaпкy " barcoin " и нaжмитe кнoпкy Oткpыть :


[ [ | {{ https://i.imgur.com/kC106go.png }} ] ]


Ax, xopoшo, вecь кoд в oдин пpocтoй в иcпoльзoвaнии интepфeйc . Знaйтe , чтo peдaктиpoвaниe этиx фaйлoв нaвepнякa мoжнo cдeлaть c пoмoщью нaнo или Netbeans или любoй дpyгoй тeкcтoвый peдaктop , дaжe Блoкнoт я пoлaгaю. Я тaк жe, кaк этoт, "Пoтoмy чтo этoгo cлeдyющий пpиз . Teпepь нaм нyжнo зaмeнить вce вxoждeния " FooCoin , foocoin и FOOCOIN " в нaшeй иcтoчникa c " BarCoin , barcoin и BARCOIN . " Oбpaтитe внимaниe нa 3 paзличныx нacтpoeк тeмaтичecкиe - бoльшaя чacть кoдa имeeт вce тpи в нeм. Чтoбы измeнить этo в TextWrangler , выбepитe Пoиcк, a зaтeм нa нecкoлькиx Пoиcк фaйлoв и выбepитe " barcoin " кaтaлoг :


[ [ | {{ https://i.imgur.com/fTJKnc7.png }} ] ]


Дeлaйтe этo в тeчeниe вcex тpex нacтpoeк cлyчae , или ecли вы пpeдпoчитaeтe eecummings cтиль , зaмeнить иx вce бeз «Case Sensitive " флaжкoм в oднoм cбoй нaлeт . TextWrangler пoкaжeт вaм вecь cпиcoк измeнeнныx фaйлoв и пoзвoляют пpocмaтpивaть измeнeния пocлe eгo зaвepшeния :


[ [ | {{ https://i.imgur.com/tJpf9LD.png }} ] ]


Bы тaкжe xoтитe, чтoбы зaмeнить вce вxoждeния "Foo" c " BAR ". Этo 3 бyквeннoe oбoзнaчeниe для вaшeгo мoнeты , кaк БTД или КПК . Haкoнeц, вaм нyжнo бyдeт вpyчнyю измeнить имя foocoin - qt.pro в пaпкe ocнoвнoгo иcтoчникa. Эй ... этo нaчинaeт coбиpaтьcя вмecтe , нe тaк ли?


==== Пopты и ceтeвыe Измeнeния ====


Xopoшo, тeпepь мы дoлжны дaть Hoвaя мoнeтa yникaльный диaпaзoн пopтoв для иcпoльзoвaния. Bы бyдeтe нyждaтьcя в двa пopтa , oдин для пoдключeния RPC ( для шaxтepoв для пoдключeния) и oдин для P2P coeдинeния . Bы мoжeтe нaйти xopoший cпиcoк зapeзepвиpoвaнныx пopтoв здecь: http://en.wikipedia.org/wiki/List_of...P_port_numbers Caмыe любыe пopты бyдyт paбoтaть пpи ycлoвии, чтo oни 1 : Зa пopтa 1024 и 2 : нe иcпoльзyeтcя чтo-тo дpyгoe. Я пpeдлaгaю чтo-тo в бoльшиx кoличecтвax , xopoшиe пpимepы включaют 56679 и 56680 или 12365 и 12366 .


B этoм пpимepe мы coбиpaeмcя иcпoльзoвaть 55883 для RPC и 55884 для P2P. B иcтoчникax foocoin , эти пopты yжe ycтaнoвлeны , тaк чтo идти впepeд и измeнять иx c пoмoщью тeкcтoвoгo peдaктopa выбopa.


Измeнитe RPC/P2P пopт в cлeдyющиx фaйлax :


'' ' SRC / bitcoinrpc.cpp ''' : (RPC ПOPT )
ЛИHИЯ 2893 : IP :: TCP :: кoнeчнaя тoчкa кoнeчнaя тoчкa ( BindAddress , GetArg ( " - rpcport " , 55883 ) ) ;
ЛИHИЯ 3169 : ecли ( d.connect ( GetArg ( " - rpcconnect " , "127.0.0.1" ) , GetArg ( " - rpcport ", " 55883 " ) ) ! )


'' ' SRC / init.cpp ''' : (P2P ПOPT + Testnet пopт)
ЛИHИЯ 235 " - пopт = <port> " + _ ( "Cлyшaй coeдинeния нa <port> (пo yмoлчaнию: 55884 или testnet : 45884 ) ") + " \ п " +


Bы мoжeтe ycтaнoвить testnet пopт нa любoй дpyгoй cлyчaйный пopт , нo пoмнитe , чтo вы ycтaнoвитe eгo в .


'' ' SRC / init.cpp ''' : (RPC ПOP&#

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 08:27:52 AM
 #109

== Wie für Spaß und Profit Klonen Scrypt Based Altcoins ==


Warten Sie eine Sekunde , warum wollen Sie geben , die Geheimnisse ? ? Weil die kein Geheimnis mehr, und außerdem, warum sollte nicht jeder und ihre Nachbarn in der Lage, eine Vielzahl von diesen nutzlosen noch spannende Mathe Bits zu schaffen? Die Informationen in diesem Artikel hat mich ein paar Wochen zu kompilieren und zu was für mich ist nicht gewährleistet , für Sie zu arbeiten. Bitte verwenden Sie dieses Handbuch als Ausgangspunkt, um ein wenig über C-Programmierung und Erstellung Software zu erlernen .


Werde ich nicht tun Tech-Support - nur weil man nicht etwas zum Laufen zu bringen berechtigt Sie nicht , mich darum zu kümmern. Gehen Sie zu lesen, zu graben, zu lesen und einige mehr. Fast alles, was in diesem Handbuch wird in einen oder anderen Form auf bitcointalk.org ' s altcoin Forum. Der Rest davon habe ich akribisch nach unten durch Versuch und Irrtum und einer gesunden Portion googeln verfolgt. Die Dinge sind gemeint zu brechen, die Sie brauchen, um herauszufinden , warum und damit es funktioniert werde . Bis Ende dieses Handbuchs sollten Sie einen Arbeits Münze , p2p ( IRC )-Netzwerk und Clients für Linux (leicht) , Mac (ein bisschen härter ) und Windows ( igitt ) .


=== Was brauche ich? ===


* Source Code für eine Münze Scrypt
* Arbeits Wissen und den Zugang zu Linux-oder Mac -Befehlszeile - ich bin nicht dabei, Cygwin zeigen , aber seine ähnlich.
* 2 oder mehr Computer oder virtuelle Maschinen - Ich werde mit meinem Laptop und ein Debian- Wheezy Basis VPS .
* Text Editing Software - ich bin mit TextWrangler für Mac, aber Netbeans , EmeraldEditor oder nano wird funktionieren .
* Zeit und Geduld ...




Glückliche Fiddling !


=== Github , Source Code und Linux ===


==== Source Code ====
First things first . Sie werden einige Quellcode müssen . Da ich bezweifle, dass man es von Grund auf neu zu schreiben ( ich konnte es nicht ) , sollten Sie glücklich zu wissen, es gibt ein Unmenge von verschiedenen Optionen in der Scrypt - Münze Familie für Sie zu klonen und zu verändern. Meine ersten Münzen wurden auf der am meisten ausgezeichnete Forschungs Münze , Smallchange basiert, von LightenUp . Seine git diff -Ausgang: https://github.com/bfroemel/smallcha...748f76a3d58326 ist annähernd genug Informationen, um Ihre eigenen alt- Münze komplett erstellen und als solche sollte gelobt werden. Ja , ich merke, seinen Code ist einfach die Litecoin Quelle mit Ausschneiden und Einfügen Veränderungen, aber hey - das ist , was wir hier arbeiten , und er hat einige ausgezeichnete Kommentare über den gesamten Code .


Für die Zwecke dieses Tutorial und eine "saubere" Kopie der SMC -Code zu erhalten , habe ich foocoin erstellt: https://github.com/foocoin/foocoin Dieser Leitfaden wird Ihnen zeigen , wie man " in den foo'coin ' drehen bar'coin und Sie können es von dort. Ich habe schon genug geändert, um diese Münze Kompilierung in der Lage , wenn Sie dieser Anleitung folgen . Wenn Sie es vorziehen, mit dem Original- Code Small beginnen, ist es hier: https://github.com/bfroemel/smallchange.git oder Sie haben die Litecoin , Franko, YAC , CHN , MIN, welcher Quelle auch immer nutzen könnten - wir Wir ändern genug davon , damit es funktioniert .


==== Ein Github -Konto ein ====


Jetzt wäre ein guter Zeitpunkt , um mit einem glänzend eindeutigen Namen für Ihre neue Münze . Sie können https://github.com/insertcoinnamehere besuchen und überprüfen Sie, ob Ihr Name Münze ist . Wenn es nicht , nur Add- Projekt oder etwas Witziges und Glaubwürdigkeit steigern , vielleicht Non-Profit - oder - Konsortium würde Ihre Münze etwas gusto geben :


[ [ | { { https://i.imgur.com/8IxPN1X.png } }]]


Hey , schau, barcoin nicht genommen - we'd besser schnappen es rechts oben! Einfach auf https://github.com und füllen Sie die Lücken :


[ [ | { { https://i.imgur.com/2KLsNXL.png } }]]


Nun können zu einem dieser sexy Quellcode -URL , dass jeder Zug von git . Was ist git pull ? Mach dir keine Sorgen , du wirst den Dreh raus zu bekommen - schauen Sie , sind Sie bereits neue Dinge zu lernen . In der oberen rechten Ecke neben Ihrem Benutzernamen , klicken Sie auf "Create Repository: "


[ [ | { { https://i.imgur.com/2xCXZfK.png } }]]


Nun füllen Sie die Felder :


[ [ | { { https://i.imgur.com/7S9Z7Bv.png } }]]


Klicken Sie auf die grüne Taste, und voila , Sie haben Github . Nun nehmen Sie Kenntnis von diesen Informationen :


[ [ | { { https://i.imgur.com/gXyQjh2.png } }]]


Da werden wir darauf zurückkommen . Besser noch, es Lesezeichen in Ihrem Browser und eine neue Registerkarte öffnen .


==== Linux, Mac, Cygwin ====


Ja, Sie brauchen eine von ihnen. Für dieses Tutorial werde ich mit einem MacBook mit OSX 10.8.something und einem Debian Wheezy VPS . Ich denke, man kann Cygwin verwenden, aber ich bevorzuge die * nix ist , um Windows jeden Tag und man kann auch noch etwas lernen , oder? Schießen Sie , wenn Sie eine gute Live-CD mit den Abhängigkeiten bereits eingerichtet ist , dass in einer VMWare -Sitzung ausgeführt werden gebaut benötigen, versuchen [ [ CDEbian .]] Ansonsten ist diese Anleitung benutzt Debian was bedeutet, die meisten Mainstream- Klone sollte funktionieren (dh : Ubuntu , Xubuntu , Mint) .


Einrichten eines PC oder VM mit Linux oder OSX ist außerhalb des Geltungsbereichs dieses Tutorial , aber es genügt zu sagen, ich kann für VMWare und seiner Fähigkeit, mehrere VMs gleichzeitig laufen und seine Fähigkeit, OSX 10.6.x virtualisieren bürgen Sie müssen einige Abhängigkeiten auf dem OS immer Sie wählen, um in der Lage, den Daemon und Qt - Brieftasche zu bauen installieren.


==== Abhängigkeiten für OSX ====


Die einfachste Möglichkeit, die ich gefunden habe , um Abhängigkeiten von OSX zu installieren, ist MacPorts oder Homebrew zu verwenden. Ich persönlich mag MacPorts besser als Homebrew, sondern einfach, weil seine MacPorts installiert in / opt (wo ich denke, dass es gehen sollte ) , und weil MacPorts bietet universelle baut standardmäßig. Wenn Sie lieber Homebrew, sind die Formeln, die gleichen, aber ich würde empfehlen, mit dem Bau - 32-Bit- Flagge. Für die Zwecke dieses Tutorials werden wir MacPorts zu verwenden.


Man muss die folgenden Abhängigkeiten installieren:
* Verstärkung ( C + + -Bibliotheken)
* DB48 (Berkeley DB 4 .
* qt4 -mac (Open Source QT 4.8.4 enthält qmake )
* openssl ( ssl dev Bibliotheken)
* git ( Source und zurück in das Repository zu verschieben )
* miniupnpc ( UPNP dev Bibliotheken , wahlweise - ehrlich , ich sage überspringen Sie diesen Mist )


Nach der Installation der Grund MacPorts für Ihre Version von OSX , kann dies mit diesem Befehl erreicht werden :
% sudo port install Schub DB48 qt4 -mac openssl miniupnpc git
Wenn alle Abhängigkeiten und eingebaut , ist der nächste Schritt , um die Quelle von git klonen. In diesem Beispiel werde ich foocoin Klonen , benennen Sie es , Re- git initialisieren , und drücken Sie die ursprüngliche Kopie aus, um zu gewährleisten, Github git funktioniert:
% git clone https://github.com/foocoin/foocoin.git
Klonen in den foocoin
% mv foocoin barcoin
% cd barcoin
% rm-rf . git
% git init
Initialisieren git -Repository in ~ / barcoin
% git add- A *
% git commit -m " committed "
% git remote hinzufügen Herkunft https://github.com/barcoin/barcoin.git
% - u git push origin master
Benutzername für git@github.com : barcoin
Passwort für barcoin@github.com : **********


Nun, was haben wir nur tun? Wir geklont die vorhandene Quelle , seine Verknüpfung mit git gelöscht , neu initialisiert den Ordner für Github , fügte alle vorhandenen Ordner und Dateien in das Repository , engagiert unsere Änderungen ( machte sie dauerhaft und steckte sie in die "Master"- Filiale, in umbenannt unsere neue * größere * besser * schneller Münze , stellen Sie es wieder auf Github zu verlinken - , sondern auf die * neu * Konto Münze , und schob eine Kopie aus, um Github Nun, wenn Sie gehen und schauen Sie sich Ihre Seite sollte es aussehen . etwa so:


[ [ | { { https://i.imgur.com/hQm9qn9.png } }]]


Oh, bei all der frischen Quellcode nur darauf wartet, optimiert werden .


==== Abhängigkeiten für Linux ====


Auf Debian- basierte Linux- , Abhängigkeiten und bauen Anforderungen können in einem einzigen Befehl wie so installiert werden:
$ sudo apt-get install sudo apt -get install build-essential libboost -all- dev libcurl4 - openssl -dev libdb5.1 -dev libdb5.1 + + -dev git qt- sdk libminiupnpc -dev
Dadurch werden alle benötigten Pakete installiert werden als apt ist sehr intelligent . Sobald das erledigt ist , sollten die gleichen Bits wie oben angewendet werden :
$ git clone https://github.com/foocoin/foocoin.git
Klonen in den foocoin
$ mv foocoin barcoin
$ cd barcoin
$ rm -rf . git
$ git init
Initialisieren git -Repository in ~ / barcoin
$ git add -A *
$ git commit-m " ersten commit"
$ git remote hinzufügen Herkunft https://github.com/barcoin/barcoin.git
$ git push- u origin master
Benutzername für git@github.com : barcoin
Passwort für barcoin@github.com : **********


==== Abhängigkeiten für Windows ====


Ugh , ich wusste, Sie fragen würde . Windows ist tricker als es sein sollte , wenn es um das Bauen mit GNU-Tools geht. Zunächst werden Sie mingw32 installiert und Abhängigkeiten von Hand für jeden der oben aufgeführten Punkte müssen gebaut . Sie müssen auch Ihre qt.pro - Datei mit der Lage dieser Abhängigkeiten anpassen. Um dies zu vereinfachen , habe ich bereits zusammengestellt und montiert die benötigten Abhängigkeiten zu einem schönen Github -Repository für Sie. Wenn entweder heruntergeladen und extrahiert als c : \ deps oder git geklont C : \ , dies thepacakge : https://github.com/foocoin/deps.git wird Ihnen alles was Sie brauchen, um foo ( bar) Münze mit dem Quellcode zu erstellen Sie habe schon . Mehr über den Bau der lange Weg, wenn wir etwas dem Windows-Client Zusammenstellung entlang in das Projekt ein wenig weiter .


Jetzt sind Sie bereit zum Ausschneiden und einfügen!
Suchen und Ersetzen === ===


Ahh, jetzt haben wir den kreativen Teil zu kommen. Das Bit , wo Sie die Dinge, die Sie ändern, um Ihre Münze Ihr zu machen wünschen. Da dies eine * Klonen * Tutorial , ich werde nicht auf die Feinheiten der Programmierung konzentrieren (ich bin nicht qualifiziert) . Ich bin einfach da, um Ihnen zu zeigen, wo Sie die Änderungen, die Sie vornehmen müssen, um eine Münze zum Laufen zu bekommen. Für diesen Schritt , ich bevorzuge wirklich TextWrangler auf meinem Mac . Es ermöglicht für mehrere Datei Suchen und Ersetzen , die dieser Teil des Prozesses gehen recht schnell macht . Wenn Sie die Einrichtung einer VM auf Brieftaschen für Mac sowieso Qt - bauen sind, können Sie könnte / sollte einfach zu installieren und über die Abhängigkeiten innerhalb OSX bauen komplett . TextWrangler ist frei.


==== Namen ====


TextWrangler können Sie einen ganzen Ordner mit Dateien zu öffnen. Öffnen Sie einfach das Programm und wählen Sie Datei , die Open , markieren Sie den " barcoin "-Ordner und klicken Sie auf Öffnen :


[ [ | { { https://i.imgur.com/kC106go.png } }]]


Ahh, schön, den gesamten Code in einem einfach zu bedienenden Oberfläche. Seien Sie sich bewusst , dass die Bearbeitung dieser Dateien ganz sicher über nano oder Netbeans , oder was auch immer anderen Text-Editor durchgeführt werden , auch Notepad nehme ich an. Ich habe gerade wie dieses, "Cuz dieser nächsten Funktion. Jetzt müssen wir alle Instanzen von " FooCoin , foocoin und FOOCOIN " in unserem Quelle ersetzen " BarCoin , barcoin und BARCOIN . " Beachten Sie die 3 verschiedenen Einstellungen Fall - die meisten Code hat alle drei in ihm. Um dies in TextWrangler ändern, wählen Sie Suchen , dann Multi File -Suche und wählen Sie das Verzeichnis " barcoin " :


[ [ | { { https://i.imgur.com/fTJKnc7.png } }]]


Tun Sie dies für alle drei Einstellungen Fall , oder wenn Sie eecummings bevorzugen, ersetzen sie alle ohne die " Case Sensitive "-Box in einem Schlag nicht überprüft. TextWrangler zeigt Ihnen die ganze Liste der geänderten Dateien und ermöglichen es Ihnen , um die Änderungen einmal abgeschlossen durchsuchen :


[ [ | { { https://i.imgur.com/tJpf9LD.png } }]]


Sie wollen auch alle Instanzen "FOO " ersetzen " BAR ". Dies ist die 3-Buchstaben- Bezeichnung für Ihre Münze , wie BTC oder PPC . Schließlich müssen Sie den Namen des foocoin - qt.pro in der Hauptquellordnermanuell ändern. Hey ... das beginnt , zusammen zu kommen , nicht?


==== Ports und Netzwerkänderungen====


Ok, jetzt müssen wir die neue Münze eine eindeutige Port-Bereich zu verwenden, um zu geben. Sie werden zwei Anschlüsse, einen für die RPC- Anschlüsse ( für Bergleute , eine Verbindung zu ) und eine für P2P- Verbindungen müssen . Sie können eine gute Liste der reservierten Ports finden Sie hier: http://en.wikipedia.org/wiki/List_of...P_port_numbers meisten irgendwelche Ports funktionieren wird vorausgesetzt, sie sind 1 : Über Port 1024 und 2: nicht durch etwas anderes verwendet . Ich würde etwas in den hohen Zahlen deuten darauf hin , gute Beispiele sind 56679 und 56680 oder 12365 und 12366 .


Für dieses Beispiel werden wir 55883 und 55884 für RPC für P2P nutzen . In den foocoin Quellen werden diese Ports bereits eingestellt , so gehen Sie vor und ändern Sie sie mit einem Texteditor Ihrer Wahl.


Ändern Sie den RPC/P2P Hafen in den folgenden Dateien :


'' ' src / bitcoinrpc.cpp :''' (RPC PORT)
LINE 2893 : ip :: tcp :: Endpunkt Endpunkt ( BindAddress , GetArg ( " - rpcport " , 55883 ));
LINE 3169 : if ( d.connect ( GetArg ( " - rpcconnect ", " 127.0.0.1 ") GetArg ( " - rpcport ", " 55883 " ))! )


'' ' src / init.cpp ''' : (P2P PORT + Testnet -Port)
LINE 235 " -port = <port> " + _ (" Hören Sie auf Verbindungen <port> (Standard: 55884 oder Testnet : 45884 ) " ) + " \ n" +


Sie können die Testnet Port an jedem anderen beliebigen Port gesetzt , aber denken Sie daran , was Sie es eingestellt .


'' ' src / init.cpp :''' (RPC PORT)
LINE 271 " - rpcport <port> = " + _ (" Hören Sie auf JSON-RPC -Verbindungen auf <port> (Standard: 55883 ) " ) + " \ n" +


'' ' src / protocol.h :''' ( Testnet Hafen + P2P- PORT)
LINE 22 Rück Testnet ? 45883 : 55884 ;


Sie können auch einen ersten "Samen -Knoten" oder immer an System, das die neue Münze Brieftaschen kommen online wird für zusätzliche Adressen zu überprüfen:


'' ' src / net.cpp :'''
LINE 1000 {" einige Website-Name ", " somewebsite.org oder ip xxxx "},


==== Münzen pro Block / Block- Intervalle / Max. Anzahl von Münzen ====


Diese Änderungen sind auch ziemlich einfach. Ändern Sie die folgenden Codezeilen in den folgenden Dateien:


'' ' src / main.cpp :''' (Anzahl der Münzen pro Block vergeben )
LINE 831 int64 nSubsidy = 1 * COIN ;


'' ' src / main.cpp :''' ( * sollte * Wie Blöcke gefunden werden und wie oft Schwierigkeiten retargets )
LINE 837 static const int64 nTargetSpacing = 120 / / FooCoin : 2 -Minuten-Blöcken
LINE 836 static const int64 nTargetTimespan = 1 * 24 * 60 * 60 / / FooCoin : 1 Tage


In diesem Beispiel wollen wir unsere Münze, um alle 2 Minuten produzieren Blöcke 1 Münze und neu einstellen Schwierigkeit einmal pro Tag (1 Tag x 24 Stunden x 60 Minuten x 60 Sekunden). Sie können diese anpassen , aber wissen, da dies ein Klon Scrypt und wir sind nicht die Änderung der Start Schwierigkeit diese Zielrate wird bis in die Hash- Zinsniveau auf dem neuen Münze aus verzerrt sein . Dies ist schwierig Zeug und ich verstehe nicht ganz, alle es noch nicht.


'' ' src / main.h ''' : ( Anzahl der Münzen immer und Geschätzte Anzahl der Blöcke pro Tag)
LINE 43 static const int64 MAX_MONEY = 10000 * COIN / / maximale Anzahl von Münzen
LINE 550 Rück dPriority > COIN * 720/250 / / 720 Bausteinen pro Tag.


Sie müssen , um etwas Mathematik zu tun , um herauszufinden, Ihre Blöcke pro Tag Ziel auf, wie viele Münzen, die Sie erstellen , welche über den Zeitraum und wie weit Ihre Bausteine ​​sind möchten. Ich werde nicht die ganze Arbeit für Sie ! Diese Münze wird gesetzt , um 1 Münze Blöcke alle 2 Minuten , Targeting 720 Blöcke pro Tag durch ein Maximum von 10.000 Münzen, die bedeutet, wenn Fest abgebaut , wird es von Münzen in einer Woche laufen .


==== Adresse Anfangsbuchstabe / Zahl ====


Die erste Ziffer oder den Buchstaben der Adresse des neuen Münze wird von einem Basis -58 Code bestimmt. Sie können eine Liste aller verfügbaren Optionen finden Sie hier: https://en.bitcoin.it/wiki/Base58Check_encoding Um Ihre Münze Adresse edit dies ändern :


'' ' src/base58.h :'''
LINE 280 PUBKEY_ADDRESS = 38 , / / Stellen Sie die Adresse hier erste Bit


==== Icons und Splash Images ====


Sie werden alle von den Stütz Bilder und Symbole für die Brieftasche in der '' ' src / qt / res ''' Ordner. Es gibt zwei Ordner mit Symbole, die Sie achten sollten :


[ [ | { { https://i.imgur.com/uTDamJq.png } }]]
und
[ [ | { { https://i.imgur.com/2wJUutr.png } }]]


Foo und Bar Münzen sowohl den Standard Litecoin Bilder. Sie sollten ein Bildbearbeitungsprogramm Ihrer Wahl (Ich mag Photoshop CS3 , aber GIMP ist auch schön ) , um die Bilder zu bearbeiten. Wenn Sie abgerundeten Icons / Bilder möchten, verwenden Sie transparent. Png -Dateien. Auch vergessen Sie nicht, ein . Ico (Windows / Linux) und eine . Icns (Mac) Icon-Datei für Ihr Programm zu generieren. Eine tolle Webseite Ich mag , um für diesen Einsatz ist hier: http://iconverticons.com/
Merkel Hash === ===


Die Merkel -Hash ist die Wurzel des Netzwerks Ihres Münze . Es ist das Hash, der alle Blöcke gegen gemessen werden und die Grundlage für den Bergbau eine Genese Block . Meine Methode ist es, eine Münze zu bekommen und dann die Arbeit am Testnet das Hauptnetz durch den Bau und die Prüfung in einer inszenierten Progression. Die Merkel -Hash ist nicht wirklich das erste, was Sie aber ändern.


==== Epoch Zeit ====


Seit Mitternacht UTC am Neujahrstag 1970, hat Unix ( oder Epoch oder POSIX) Zeit verwendet, um verschiedene Systemaufrufe und Funktionen der Unix-Systeme (und viele andere Standard) zu koordinieren. Da diese Art von Zeit ist einfach Sekunden und nicht für Schaltsekunden ausmachen, dessen eine einfache Möglichkeit, einzigartige zeitabhängige Werte für die Programmierung zu berechnen. Zu diesem Zweck ist das erste, was muss man beim Bau einer neuen Münze verändern die Basiszeit für die Geburt der Münze oder der Entstehung der Medaille.


Dies wird an zwei Stellen im Code , eine für das Testnetz gesetzt :


'' ' src / main.cpp :'''
LINE 2023 block.nTime = 1300000000 ;


und eine für den Haupt- net:


'' ' src / main.cpp :'''
LINE 2017 block.nTime = 1300000000 / / epochtime


Sie können die aktuelle Epoche Zeit aus: http://www.epochconverter.com/ oder Sie können es von der Kommandozeile der meisten * nix -Systeme mit diesem Code zu generieren:


$ Date +% s
$ 1369590088


Es ist üblich, auch diese Codezeile ändern, um eine Schlagzeile vom Tag der Schöpfung Münze , um sie an die block.nTime mit einigen Menschen lesbare Bit beziehen :


'' ' src / main.cpp :'''
LINE 2005 char * pszTimestamp = "Traditionell legt man etwas rechtzeitig hier zeitgleich mit der Epoche " ;


Nun bemerken die anderen Linien in der Nähe der block.nTime , werden sie block.nNonce genannt . Ein " Nonce " ist eine Maßeinheit, die einzigartig ist und auftritt, nachdem die nTime eingestellt. Der Code verwendet nTime + nNonce zu formulieren und zu validieren, Zeitstempel für die Blöcke und Transaktionen. Dies ist eine sehr grobe Übersicht, wie das wirklich funktioniert , aber ich hoffe, es gibt Ihnen eine Idee. Wir werden in einem Moment zurück auf die nNonce kommen, wenn wir eine Mine genesis -Block.


==== Erstellen Sie einen Hash Merkel ====


Gott sei Dank, dieses Forum Beitrag: https://bitcointalk.org/index.php?to...449 # msg2035449 gibt uns eine Methode, um die Merkel -Hash -Funktion über Testnetz der Münze zu erzeugen. Gerade jetzt wäre ein guter Zeitpunkt , um das folgende zu tun , und kopieren Sie die Dateien aus, um Ihre Github -Repository sein :


barcoin % git add -A *
barcoin % git commit -m " Änderungen "
barcoin % git push origin master


Ist es nicht ein gutes Gefühl zu wissen, dass Sie mit Github bist wie ein Profi ?


==== Erste Körperbau ====


Jetzt haben Sie eine neue Kopie mit allen Ihren Schnitt und Einfügen auf Github hochgeladen haben, sind wir bereit, eine Kopie unserer Kommandozeilenversionder Münze zu bauen :


barcoin % cd src /
barcoin / src make-f % makefile.osx USE_UPNP = - (oder wenn Sie makefile.unix auf Linux / BSD / etc sind )


Der Code sollte sauber zu bauen, wenn du nur geändert , was Sie soll und Sie ahve die richtigen Abhängigkeiten installiert . Sie werden am Ende mit einer einzigen ausführbaren Datei namens der Name der Münze mit Anzeige auf Ende, wenn Sie auf Linux (dh barcoin ( osx / windows ) barcoind (Linux) bist. " Stripping " der zusätzliche Code wird eine kleinere Datei zu erstellen wenn Sie dies wünschen :


barcoin / src % barcoin Streifen ( fügen Sie die d auf Linux, barcoind )


Jetzt wollen wir barcoin von der Befehlszeile mit der Option- Schalter Testnet wie so zu laufen :


barcoin / src % . / barcoin - Testnet ( fügen Sie die d auf Linux, . / barcoind )


Es wird sofort scheitern bei der ersten Ausführung , werfen einen Fehler wie so :


Assertion failed : ( block.hashMerkleRoot == uint256 ( "0x" ) ), Funktions LoadBlockIndex , Datei main.cpp , Zeile 2031 .
zsh : Abbruch / barcoin .


Wir haben jetzt eine Hash Merkel warten ... , aber wo? Die im " Application Data "-Verzeichnis Ihrer Münze . Auf Linux , das ist in Ihrem Home-Ordner , dann ein coinname dergleichen. :
~. / barcoin .
Auf OSX , es wird in Ihrem Ordner Library sein :
/ Users / Benutzername / Library / Application Support / barcoin
Wenn Sie es grafisch sehen wollen, halten Sie die Option -Taste und klicken Sie auf Go -Menü im Finder , dann wählen Sie Application Support und die barcoin -Ordner. Unter Windows wird es in der Application Data Roaming Ordner :
c: \ Users \ Benutzername \ AppData \ Roaming \ barcoin


In diesem Ordner finden Sie ein paar Dateien zu finden - das ist auch der Ordner können Sie Ihre Münze conf -Datei setzen, wenn wir bereit sind, um zu gewinnen, es ist so daran erinnern, wie Sie hier. . Öffnen Sie nun Debug log , und es wird so aussehen:


[ [ | { { https://i.imgur.com/H9l4OMl.png } }]]


Dank Tyrions erstaunlich hilfreich Post, können wir diese Fehler entziffern löschte etwa so:


b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db1 78df5dd3b302fc Hash -Block unter Verwendung des nicht -existent Merkel , bezogen auf das pzTimestamp von Main.cpp
00000000000000000000000000000000000000000000000000 00000000000000 Genesis Block , nicht gut , weil alle nNonces werden auf 0 gesetzt in main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e1580794 51d9c6c90e4700 Gültig Merkel Hash , die unter Verwendung des Epochenzeit in main.cpp


Jetzt nehmen Sie die gültigen Hash Merkel und legen Sie es in main.cpp :


'' ' src / main.cpp '''
LINE 2031 assert ( block.hashMerkleRoot == uint256 ( " 0x2fc1b7ef46270c053711fbae934cf7f83378efd 4b3e158079451d9c6c90e4700 "));


Genesis === Blocks ===


Dang , sind wir mit Gas kochen jetzt was? Wie kann man mir ein Genesis -Block ? Zum Glück ist der Code ist bereits in der Quelle nur , dass so ärgern Sie sich nicht zu tun. Wer bekommt die ersten Münzen ? Nun, niemand wirklich - es gibt einen Weg , es zu tun : https://bitcointalk.org/index.php?to...801 # msg2038801 aber persönlich lasse ich sie auf den Cyberspace als ein Zeichen von gutem Karma , um die Bit- Götter in der Kirche der Entwicklung ( FinShaggy , das heißt, Sie , Kumpel. )


==== Testnet Genesis -Block ====


Ok , jetzt nicht nur noch brauchen, um erneut hochladen zu Github , denn wir müssen Genese Blöcke für unser Netzwerk ersten generieren. Mit der Merkel -Hash im Ort, diese Zeile :


'' ' src / main.cpp '''
LINE 2034 , wenn (true && block.GetHash ( !) = HashGenesisBlock )


wenn wahr ist ( wie oben) eingestellt wird einen genesis Block beim nächsten Mal das Programm ausgeführt Mine - beginnend mit der nNonce im Code (0) . Lassen Sie den Code neu kompilieren mit der neuen Merkel Hash:


barcoin / src $ make -f makefile.osx USE_UPNP = - (oder Unix , was auch immer . )


Recompilation sollte ziemlich schnell , da die meisten Dateien bereits gebaut. Sobald es fertig ist , starten Sie es wieder mit diesem Befehl:


barcoin / src $ . / barcoin - Testnet


Sie werden hören, Festplatte zu starten , Churn und es wird scheinen, wie die Münze in das Fenster eingefroren - eine Genese Block für die Testnet Grundlage Ihrer Arbeits frisch erzeugten Hash Merkel aber es ist nicht eingefroren , seine Bergbau. Wenn Sie die '' ' debug.log ''' öffnen Sie diese in Aktion zu sehen :


[ [ | { { https://i.imgur.com/DiOPE23.png } }]]


Ist das nicht raffinierte ? Seine Hashing einen Block glücklich ist jeder nonce tickt durch . Wie lange wird das dauern? Auf einem i7 -2600 kann 5-10 Minuten dauern. Auf einem Core2Duo (wie mein iMac ) sind es 20-30 Minuten dauern , vielleicht auch länger . Lass es einfach sein Ding , und gehen Sie bekommen einige Zwerge - schließlich wird es eine, die es mag zu finden. Dieses Mal wird es um die '' ' testnet3 ''' Ordner unter Ordner conf Ihre Münze zu schreiben in einer Datei namens '' ' debug.log :'''


Assertion failed : ( block.GetHash () == hashGenesisBlock ), Funktions LoadBlockIndex , Datei main.cpp , Zeile 2065 .
zsh : . abbrechen / barcoin - Testnet


[ [ | { { https://i.imgur.com/88vYRuy.png } }]]


Ah ha! Sehen Sie es da? Es gibt eine noonce und eine Genese Block Hash , reif für das Rupfen !


block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1 b3bc232c9a0b7f


Jetzt setzen diese in die Datei main.cpp :


'' ' src / main.cpp :'''
LINE 1984 hashGenesisBlock = uint256 ( " 0x5813d4cfab0eeda94a15d11c5e7d6895e667fbb e67c59ef9a1b3bc232c9a0b7f ");


Ja, Sie brauchen , um die 0x vor den Hashes lassen . Sie müssen auch die nNonce eingeben:


'' ' src / main.cpp :'''
LINE 2024 block.nNonce = 440824 ;


Beachten Sie, dass die Abschnitte der main.cpp Datei, die wir gerade bearbeitet entsprechen dem Testnet und wir haben nicht das Haupt net ganz fertig . Das ist, weil an diesem Punkt gehe ich normalerweise zwei Systemen und auf der Testnet laufen, um sicherzustellen, dass sie Münzen abbauen und dann bewege ich mich auf die Haupt Netz. Lets speichern unsere Änderungen , und laden Sie sie auf Github und dann werden wir weitergehen , um Bergbau auf der Testnet :


barcoin % git add -A *
barcoin % git commit -m " Änderungen "
barcoin % git push origin master


==== Mining Testnet Münzen ====


First things first, wieder aufzubauen ausführbare Ihre Münze auf Ihrem lokalen PC:


barcoin / src make-f % makefile.osx USE_UPNP = - ( . oder Unix , was auch immer)


Jetzt kommt der Teil, wo Sie zwei Computer mit unterschiedlichen IP-Adressen benötigen . Ich diese einfach mit einem Linux VPS und meinem Heim-PC zu tun zu finden, so das ist mein Beispiel. Zwei Maschinen auf einem LAN arbeiten sollte , und ich glaube 2 oder mehr virtuelle Maschinen sollten auch so lange wie Sie in der Lage , mit den IP-Adressen halten arbeiten . Eine Verbindung zu Ihrem zweiten Maschine und bauen Datei der Münze , so wie wir zuvor - da Sie den Code in Github gesendet werden, können auch mit Ihrem neuen Elite github skillz :


$ Git clone https://github.com/barcoin/barcoin.git
Klonen in den barcoin
$ Cd barcoin / src
barcoin / src $ make -f makefile.unix (ich bin auf Linux hier).
barcoin / src $ Streifen barcoind


Jetzt bin ich bereit, es zu laufen - in Testnet -Modus und mit einem Anschluss an meine " andere" Computer. Das ist etwas schwierig , weil man die Münze auf beiden Computern mit der '' Start " -connect = xxxx '' ' Variable , die jeweils mit der IP des anderen PC:


'' ' PC zu Hause - iMac :'''
barcoin / src % . / barcoin - Testnet -connect = 9.5.6.5 &


'' ' VPS - Linux :'''
barcoin / src $ . / barcoin - Testnet - connect = 66.77.32.56 &


Fügen Sie die & an den Befehl ermöglicht es , im Hintergrund zu verarbeiten und ermöglichen es Ihnen , auch weiterhin die Münze Befehle ohne ein zweites Konsolenfenster zu ernähren.


. Beim ersten Start , wird es nicht etwa mit einer conf -Datei beschweren :
Fehler : Sie müssen die rpcpassword = <Kennwort> in der Konfigurationsdatei:
/ Users / Benutzername / Library / Application Support / barcoin / barcoin.conf
Wenn die Datei nicht existiert , erstellen Sie es mit dem Besitzer lesbare -only Dateiberechtigungen.
Es wird empfohlen, die folgenden Zufallspasswort zu benutzen:
rpcuser = barcoinrpc
rpcpassword = 6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptn YGwjt5
( brauchen Sie nicht , das Passwort zu erinnern)
Wenn die Datei nicht existiert , erstellen Sie es mit dem Besitzer lesbare -only Dateiberechtigungen.


Erstellen Sie diese Datei , in welchem ​​Format auch immer Sie bevorzugen, nano funktioniert gut für diese und weisen eine RPC- Benutzer / Passwort . Wenn Sie CGMiner / CPUMiner verwenden, um solo später abbauen wollen , machen diese etwas, das Sie sich erinnern. Wenn Sie planen, nur die Kunden in Bergmann gebaut für Solo- Bergbau, gerade geschnitten und fügen Sie den automatisch generierten Informationen . Dies ist die gleiche Datei können Sie einige der Befehle in bitcoin.conf eingerichtet , hier ist eine gute Referenz : https://en.bitcoin.it/wiki/Running_B...iguration_File


* Auf OSX diese Datei :'' ' / Users / Benutzername / Library / Application Support / barcoin / barcoin.conf '''
* Auf Linux diese Datei '' ' ~ / .barcoin / barcoin.conf '''
* Unter Windows ist diese Datei '' ' C: \ Users \ Benutzername \ AppData \ Roaming \ barcoin \ Barco in.conf '''


Randbemerkung: weil ich einen VPS dafür , glaube ich nicht wirklich brauchen, um über die Port-Weiterleitung an diesem Ende zu kümmern. Auf dem Heim-PC , werden Sie wollen , um den Anschluss, den Sie für P2Pport in der Cut & Paste Abschnitt, um Sie mit dem PC wählte weiterzuleiten. In diesem Beispiel ist der Port 55884 .


Starten Sie nun die Münze wieder :


'' ' PC zu Hause - iMac :'''
barcoin / src % . / barcoin - Testnet -connect = 9.5.6.5 &


'' ' VPS - Linux :'''
barcoin / src $ . / barcoin - Testnet - connect = 66.77.32.56 &


Jetzt ist eine gute Zeit, um in der Befehlszeile Syntax -API-Aufrufe für die Interaktion mit dem Bitcoin- Client aus dieser Wiki-Seite auffrischen : https://en.bitcoin.it/wiki/Original_...API_Calls_list


Zuerst werden Sie senden möchten :
barcoin / src % . / barcoin getinfo


Es sollte so etwas zurückzugeben:


'' ' PC zu Hause - iMac :'''
barcoin / src % . / barcoin getinfo
{
"version" : 1000000 ,
" Protocol " : 60001 ,
" walletversion " : 60000 ,
"Balance" : 0.00000000 ,
"Blöcke" : 0,
" Verbindungen" : 1,
" Proxy " : "",
" Schwierigkeit " : 0.00024414 ,
" Testnet " : true ,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
" Fehler ": ""
}


Die andere Seite sollte gleich aussehen und die Zahlen sollten übereinstimmen. Beachten Sie, dass Testnet nicht Checkpoints zu überprüfen , also sollten sie ziemlich leicht zu verbinden ( oooh , das ist die Frage 1BTC , aber mehr dazu in ein wenig ... die andere Seite :


'' ' VPS - Linux '''
/ barcoin / src $ . / barcoind getinfo
{
"version" : 1000000 ,
" Protocol " : 60001 ,
" walletversion " : 60000 ,
"Balance" : 0.00000000 ,
"Blöcke" : 0,
" Verbindungen" : 1,
" Proxy " : "",
" Schwierigkeit " : 0.00024414 ,
" Testnet " : true ,
" keypoololdest " : 1369622277 ,
" keypoolsize " : 101,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
" Fehler ": ""
}


Lovely, richten sie sich und haben jeweils eine einzelne Verbindung. Jetzt können wir einen von ihnen zu machen (oder beides) beginnen mit der Erzeugung von Münzen mit dem folgenden Befehl :


barcoin / src % . / barcoin setgenerate echte 16


Die Nummer ist , wie viele Threads des Prozessors Sie widmen , an der wahnsinnig niedrigen Schwierigkeits wir beginnen mit will, sollte dies viel zu ein paar Blocks zu erzeugen. Sie werden die Ergebnisse sehen in Echtzeit , sondern müssen Sie den folgenden Befehl und bewerten die Info:


barcoin / src % . / barcoin getmininginfo
{
"Blöcke" : 0,
" currentblocksize " : 1000 ,
" currentblocktx ": 0 ,
" Schwierigkeit " : 0.00024414 ,
" Fehler " : "",
" erzeugen " : true ,
" genproclimit " : 16,
" hashespersec " : 1432
" networkhashps " : -9223372036854775808 ,
" pooledtx ": 0 ,
" Testnet " : true
}


Erfolg! Seht zu, dass '' ' hashespersec ''' ? Die interne Scrypt Bergmann macht jetzt sein Ding und machen Sie einige Blöcke . Sie müssen den Befehl erteilen getmininginfo ein paar Mal , bevor sie beginnt, sich in der Blockanzahl oben zählen . In wenigen Minuten sollten Sie in der Lage sein zu sehen :


barcoin / src $ . / barcoind getmininginfo
{
"Blöcke" : 1,
" currentblocksize " : 1000 ,
" currentblocktx ": 0 ,
" Schwierigkeit " : 0.00024414 ,
" Fehler " : "",
" erzeugen " : true ,
" genproclimit " : 16,
" hashespersec " : 1376
" networkhashps " : 32,
" pooledtx ": 0 ,
" Testnet " : true
}


Woah Hunde , haben wir Blöcke . Jetzt überprüfen, ob Ihre anderen sieht die Blöcke , indem Sie eine getinfo auf Ihrem '' ' andere ''' Computer :


barcoin / src % . / barcoin getinfo
{
"version" : 1000000 ,
" Protocol " : 60001 ,
" walletversion " : 60000 ,
"Balance" : 0.00000000 ,
"Blöcke" : 1,
" Verbindungen" : 1,
" Proxy " : "",
" Schwierigkeit " : 0.00024414 ,
" Testnet " : true ,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
" Fehler ": ""
}


Nun, whatta ya know ? Whatta ya sagen, wir graben einige MainNet Münzen ?


==== Haupt Net Genesis -Block ====


Also wirklich alles, was wir jetzt tun müssen, ist main.cpp Update mit einer neuen Epoche der Zeit , in der Hauptnettoquerschnittdieses Mal und mir ein Genesis -Block die ähnlich wie die Art und Weise haben wir es auf Testnet . Erstens, stoppen Sie die coind aus sowohl auf dem lokalen und Remote- Computern mit dem Befehl :


barcoin / src % . / barcoind stoppen
Barcoin stoppt


Als nächstes gehen Sie zurück zu Ihrem Entwicklungs-PC und bearbeiten main.cpp mit einem neuen block.nTime :


'' ' src / main.cpp :'''
LINE 2017 block.nTime = 1369623856 / / epochtime


Jetzt neu kompilieren die Münze wieder aus der Befehlszeile :


barcoin / src make-f % makefile.osx USE_UPNP = - ( . ! oder Unix , was auch immer, ha)


Jetzt laufen die Münze wieder, aber dieses Mal nicht die Option- Testnet Schalter:


barcoin / src % . / barcoin &


Es wird wieder scheinen eingefroren werden, während es Minen die Genese Block und der Prozessor wird wahrscheinlich auf 100 % Auslastung zu gehen. Seien Sie geduldig , dieser nahm Satoshi 6 Tage oder etwas Scheiße , oder? Auch, wenn Sie einen Mac haben, beobachten sie mit dem System Log Viewer Mine ist ziemlich lustig - und dann Erfolg:


[ [ | { { https://i.imgur.com/Elpzv6F.png } }]]


Nun , wir haben nur das gleiche zu tun , wie wir auf der Testnet getan hat, und diese Änderungen vornehmen , um main.cpp :


'' ' src / main.cpp :'''
LINE 32 uint256 hashGenesisBlock ( " 0xbf9385c680c3a7aec778b6dcf87dbf b105369d55143fc99ebe86f469cd53ddca ");
LINE 2019 block.nNonce = 1345972 ;
LINE 2034 , wenn (false && block.GetHash ( !) = HashGenesisBlock )


==== Checkpoints ====


Ändern Linie 2034 auf false wird Kunden aus versuchen, ihre eigene Genese Block Hash sollte etwas schief sein, zu halten. Eine weitere Datei zu ändern:


'' ' src / checkpoints.cpp '''
LINE 27 (0, uint256 ( " 0xbf9385c680c3a7aec778b6dcf87dbfb105369d5 5143fc99ebe86f469cd53ddca " ) )


Dies ist der " Trick ". Angemeldet sagte ich , gab es einen Trick? Das ist es. Hash 0 in dieser Datei muss auf die Entstehung Block Hash eingestellt werden , so tun es und freuen sich , wie Sie schon jetzt fast die Erstellung Ihrer Klon fertig! Sollten Sie Ihre Münze " echt " werden Sie diese Datei in der Zukunft überdenken und fügen anderen Kontrollstellen , um es wollen - aber das ist ein bisschen wir für das Ende der Führungs sparen werde . Lets schicken unsere Änderungen an Github , bevor wir zu bauen :


barcoin % git add -A *
barcoin % git commit -m " Änderungen "
barcoin % git push origin master


Ok , wir sind bereit , auf der ersten PC neu zu erstellen:


barcoin % cd src /
barcoin / src make-f % makefile.osx USE_UPNP = - ( . oder Unix , blah ... )
Streifen barcoin


Jetzt auf dem zweiten PC (vorausgesetzt, seine Linux hier):


~ $ Cd barcoin
barcoin $ git pull

SSC
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
December 18, 2013, 09:05:55 AM
 #110

Has anyone made a coin recently they want to let us know about?

I checked out the bitcoin source a couple weeks ago.

Done: .. colored coins...changed ports... distributed stock exchange...encrypted protocol messages for privacy...new graphics...updated the source code and build defaults to c++2011... changed the reward structure ...

Still to do: ... make "standard" coin denominations... coinjoins... proof-of-stake.. scaling ... "day blocks" that record the outstanding txouts....trading between different types of existing cryptocurrencies ...


I mentioned it mostly because I need help.  I'm an okay c++ developer although still learning my way around the "boost" framework (which btw doesn't easily work in c++2011 and will eventually need to be hacked out of the code), but websites, forums, promotions, etc, I have limited knowledge of and need help.  

A bug database is needed but I don't really have time to administrate it.  

More developers would be a real help, in terms of testing and being able to respond to new bugs rapidly.  Also there's the "more eyes" thing, meaning that when a developer gets a bug report, it may be profoundly non-obvious to her why that bug is happening and how to fix it.  But when more developers see the same bug report, it'll likely be obvious to *somebody*, because they were in the middle of that code last week or because they had to learn about how something worked in order to fix something else a month ago, or ....  Just the simple fact of getting more eyes on it means there's a way to respond to more bugs.  

I mean, yes, I'm hacking a first cut of this thing together, but actually launching it really sort of requires a team.  I'm gonna be hella busy, and may not be able to keep up or do a good enough job, if I launch it by myself.




I am currently doing features for my own coin. Your feature sound cool. Let me know if/when you need a hand. Btw, do try to do it in gcc, need to be cross platform.

Regards.
408445497
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
December 18, 2013, 09:46:01 AM
 #111

==How To Clone Scrypt Based Altcoins for Fun and Profit==


Wait a second, why would you want to give out the secrets?!? Because its not a secret anymore and besides, why shouldn't everyone and their neighbors be able to create a plethora of these useless yet exciting math bits? The information in this article took me a few weeks to compile and what works for me is not guaranteed to work for you. Please use this guide as a starting point to learn a bit about C programming and compiling software.


I will NOT do tech support--just because you can't get something to work doesn't entitle you to bother me about it. Go read, dig, and read some more. Nearly everything in this guide is posted in some form or another on bitcointalk.org's altcoin forum. The rest of it I meticulously tracked down through trial and error and a healthy dose of Googling. Things are meant to break, you'll need to figure out why and make it work. By the end of this guide you should have a working coin, p2p(irc) network, and clients for Linux (easy), Mac (a bit harder), and Windows (ugh).


===What do I need?===


*Source Code for a Scrypt Coin
*Working knowledge of and access to Linux or Mac command line--I'm not going to show Cygwin, but its similar.
*2 or more computers or virtual machines--I will be using my laptop and a Debian Wheezy based VPS.
*Text Editing Software--I'm using TextWrangler for Mac, but Netbeans, EmeraldEditor, or nano will work fine.
*Time and Patience...




Happy Fiddling!


===Github, Source Code, and Linux===


====Source Code====
First things first. You'll need some source code. Since I doubt you can write it from scratch (I couldn't), you should be happy to know there are a bazillion different options in the scrypt-coin family for you to clone and alter. My first coins were based on the most excellent research coin, SmallChange, by lightenup. His git diff output: https://github.com/bfroemel/smallcha...748f76a3d58326 is nearly enough information to completely create your own alt-coin and as such should be lauded. Yes, I realize his code is simply the Litecoin source with cut and paste changes, but hey--that's what we're working on here and he added some excellent comments throughout the code.


For the purposes of this tutorial and to preserve a "clean" copy of the SMC code, I have created foocoin: https://github.com/foocoin/foocoin This guide will show you how to turn 'foo'coin in to 'bar'coin and you can take it from there. I've already changed enough to make this coin compile-able if you follow this guide. If you'd prefer to start with the original SmallChange code, it is here: https://github.com/bfroemel/smallchange.git or you could use the Litecoin, Franko, YAC, CHN, MIN, whatever source--we'll change enough of it to make it work.


====Set up a Github account====


Now would be a good time to come up with a brilliantly unique name for your new coin. You can visit https://github.com/insertcoinnamehere and check to see if your coin's name is available. If it's not, just add -project or something witty and credibility boosting, maybe -nonprofit or -consortium would give your coin some gusto:


[[|{{https://i.imgur.com/8IxPN1X.png}}]]


Hey, look, barcoin isn't taken--we'd better snatch it right up! Simply go to https://github.com and fill-in the blanks:


[[|{{https://i.imgur.com/2KLsNXL.png}}]]


Now, lets make one of those sexy source code URL's that everyone can git pull from. What's git pull? Don't worry, you'll get the hang of it--look, you're learning new things already. In the upper right hand corner next to your username, click "Create Repository:"


[[|{{https://i.imgur.com/2xCXZfK.png}}]]


Now fill in the blanks:


[[|{{https://i.imgur.com/7S9Z7Bv.png}}]]


Click the green button and voila, you have Github. Now take note of this information:


[[|{{https://i.imgur.com/gXyQjh2.png}}]]


Because we're going to come back to that. Better yet, Bookmark it in your browser and open a new tab.


====Linux, Mac, Cygwin====


Yes, you need one of them. For this tutorial, I will be using a MacBook with OSX 10.8.something and a Debian Wheezy VPS. I suppose you can use Cygwin, but I prefer the *nix's to Windows any day and you may as well learn one more thing too, right? Shoot, if you need a good LiveCD with the dependencies already built in that is set up to be run in a VMWare session, try [[CDEbian]]. Otherwise this guide uses Debian which means most mainstream clones should work (i.e.: Ubuntu, XUbuntu, Mint).


Setting up a PC or VM with Linux or OSX is outside the scope of this tutorial, but suffice to say I can vouch for VMWare and its ability to run multiple VMs simultaneously and its ability to virtualize OSX 10.6.x. You will need to install some dependencies on which ever OS you choose to be able to build the daemon and -Qt wallet.


====Dependencies for OSX====


The easiest way I've found to install dependencies on OSX is to use MacPorts or Homebrew. Personally, I like MacPorts better than Homebrew, but its simply because MacPorts installs in /opt (where I think it should go) and because MacPorts offers universal builds by default. If you prefer Homebrew, the formulas are the same, but I'd recommend building with the --32-bit flag. For the purpose of this tutorial, we're going to use MacPorts.


One needs to install the following dependencies:
*boost (C++ libraries)
*db48 (Berkeley DB 4.
*qt4-mac (Open Source QT 4.8.4, includes qmake)
*openssl (ssl dev libraries)
*git (to move source back and forth to the repository)
*miniupnpc (UPNP dev libraries, optional--honestly I say skip this crap)


After installation of the basic MacPorts for your version of OSX, this can be accomplished with this command:
%sudo port install boost db48 qt4-mac openssl miniupnpc git
Once all of the dependencies are built and installed, the next step is to clone the source from git. In this example, I will be cloning foocoin, rename it, re-git initialize it, and push the initial copy out to Github to ensure git is working:
%git clone https://github.com/foocoin/foocoin.git
cloning in to foocoin
%mv foocoin barcoin
%cd barcoin
%rm -rf .git
%git init
initializing git repository in ~/barcoin
%git add -A *
%git commit -m "first commit"
%git remote add origin https://github.com/barcoin/barcoin.git
%git push -u origin master
username for git@github.com: barcoin
password for barcoin@github.com: **********


Now what did we just do? We cloned the existing source, deleted its link to git, reinitialized the folder for Github, added all the existing folders and files in to the repository, committed our changes (made them permanent and put them in the "Master" branch, renamed it in to our new *bigger *better *faster coin, set it back up to link to Github--but to the *new* coin's account, and pushed a copy out to Github. Now if you go and look at your page it should look like so:


[[|{{https://i.imgur.com/hQm9qn9.png}}]]


Oh, look at all that fresh source code just awaiting to be tweaked.


====Dependencies for Linux====


On Debian based Linux, dependencies and build requirements can be installed in a single command like so:
$sudo apt-get install sudo apt-get install build-essential libboost-all-dev libcurl4-openssl-dev libdb5.1-dev libdb5.1++-dev git qt-sdk libminiupnpc-dev
This will install all the needed packages as apt is very smart. Once that's complete, the same bits as above should be applied:
$git clone https://github.com/foocoin/foocoin.git
cloning in to foocoin
$mv foocoin barcoin
$cd barcoin
$rm -rf .git
$git init
initializing git repository in ~/barcoin
$git add -A *
$git commit -m "first commit"
$git remote add origin https://github.com/barcoin/barcoin.git
$git push -u origin master
username for git@github.com: barcoin
password for barcoin@github.com: **********


====Dependencies for Windows====


Ugh, I knew you'd ask. Windows is tricker than it should be when it comes to building with the GNU toolchain. First, you'll need mingw32 installed and dependencies built by hand for each of the listed items above. You'll also need to customize your -qt.pro file with the location of those dependencies. To simplify this, I've already compiled and assembled the needed dependencies in to a nice Github repository for you. If either downloaded and extracted as c:\deps or git cloned to C:\, this pacakge: https://github.com/foocoin/deps.git will give you everything you need to build foo(bar)coin using the source you've already got. More about building the long way when we get to the Windows client compilation bit a little further along in the project.


Now you're ready to Cut and Paste!
===Search and Replace===


Ahh, now we've come to the creative part. The bit where you change the things you want to change to make your coin yours. As this is a *cloning* tutorial, I am not going to focus on the intricacies of programming (I'm not qualified). I'm simply going to show you where to make the changes you need to make to get a coin up and running. For this step, I really prefer TextWrangler on my Mac. It allows for multiple file searching and replacing which makes this portion of the process go quite quickly. If you're going to set up a VM to build -Qt wallets for Mac anyway, you should/could simply install the dependencies above and build within OSX completely. TextWrangler is free.


====Names====


TextWrangler will allow you to open an entire folder of files. Just open the program and choose File, the Open, highlight the "barcoin" folder and click Open:


[[|{{https://i.imgur.com/kC106go.png}}]]


Ahh, nice, all of the code in one easy to use interface. Be aware, that editing these files most certainly can be done via nano or Netbeans, or whatever other text editor, even Notepad I suppose. I just like this one, 'cuz of this next feature. Now we need to replace all instances of "FooCoin, foocoin, and FOOCOIN" in our source with "BarCoin, barcoin, and BARCOIN." Note the 3 different case settings--most code has all three in it. To change this in TextWrangler, choose Search, then Multi File Search and select the "barcoin" directory:


[[|{{https://i.imgur.com/fTJKnc7.png}}]]


Do this for all three case settings, or if you prefer e.e.cummings style, replace them all without the "Case Sensitive" box checked in one fail swoop. TextWrangler will show you the whole list of changed files and allow you to browse the changes once completed:


[[|{{https://i.imgur.com/tJpf9LD.png}}]]


You will also want to replace all instances of "FOO" with "BAR." This is the 3 letter designation for your coin, like BTC or PPC. Finally, you will need to manually change the name of foocoin-qt.pro in the main source folder. Hey...this is starting to come together, no?


====Ports and Network Changes====


Ok, now we need to give the new coin a unique port range to use. You'll need two ports, one for RPC connections (for miners to connect to) and one for P2P Connections. You can find a good list of reserved ports here: http://en.wikipedia.org/wiki/List_of...P_port_numbers Most any ports will work assuming they are 1: Over port 1024 and 2: not used by something else. I'd suggest something in the high numbers, good examples include 56679 and 56680 or 12365 and 12366.


For this example we're going to use 55883 for RPC and 55884 for P2P. In the foocoin sources, these ports are already set, so go ahead and modify them using your text editor of choice.


Change the RPC/P2P Port in the following files:


'''src/bitcoinrpc.cpp''': (RPC PORT)
LINE 2893: ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 55883));
LINE 3169: if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "55883")))


'''src/init.cpp''': (P2P PORT + Testnet Port)
LINE 235 " -port=<port> " + _("Listen for connections on <port> (default: 55884 or testnet: 45884)") + "\n" +


You can set the testnet port to any other random port, but remember what you set it to.


'''src/init.cpp''': (RPC PORT)
LINE 271 " -rpcport=<port> " + _("Listen for JSON-RPC connections on <port> (default: 55883)") + "\n" +


'''src/protocol.h''': (Testnet Port + P2P PORT)
LINE 22 return testnet ? 45883 : 55884;


You can also set an initial "seed node" or always on system that the new coin wallets coming online will check for additional addresses:


'''src/net.cpp''':
LINE 1000 {"some website name", "somewebsite.org or ip x.x.x.x"},


====Coins Per Block/Block Intervals/Max Number of Coins====


These changes are also pretty simple. Change the following lines of code in the following files:


'''src/main.cpp''': (Number of coins per block awarded)
LINE 831 int64 nSubsidy = 1 * COIN;


'''src/main.cpp''': (How *should* blocks be found and how often difficulty retargets)
LINE 837 static const int64 nTargetSpacing = 120; // FooCoin: 2 minute blocks
LINE 836 static const int64 nTargetTimespan = 1 * 24 * 60 * 60; // FooCoin: 1 days


In this example, we want our coin to produce 1 coin blocks every 2 minutes and readjust difficulty once per day (1 day x 24 hours x 60 minutes x 60 seconds). You can adjust these, but know since this is a scrypt clone and we're not changing the starting difficulty this target rate will be skewed until the hash rate levels out on your new coin. This is tricky stuff and I don't quite understand all of it yet.


'''src/main.h''': (Total number of Coins ever and Estimated # of Blocks per day)
LINE 43 static const int64 MAX_MONEY = 10000 * COIN; // maximum number of coins
LINE 550 return dPriority > COIN * 720 / 250; // 720 blocks found a day.


You'll need to do some math to figure out your blocks per day target based on how many coins you want to create over what timespan and how far apart your blocks are. I'm not doing all the work for you! This coin is set to give 1 coin blocks every 2 minutes, targeting 720 blocks per day through a maximum of 10,000 coins which means if mined hard, it will run out of coins in a week's time.


====Address Starting Letter/Number====


The first digit or letter of the new coin's address is determined by a base-58 code. You can see a list of all of the available options here: https://en.bitcoin.it/wiki/Base58Check_encoding To change your coin's address edit this:


'''src/base58.h''':
LINE 280 PUBKEY_ADDRESS = 38, //Set the address first bit here


====Icons and Splash Images====


You will find all of the supporting images and icons for the wallet in the '''src/qt/res''' folder. There are two folders with icons you should pay attention to:


[[|{{https://i.imgur.com/uTDamJq.png}}]]
and
[[|{{https://i.imgur.com/2wJUutr.png}}]]


Foo and bar coins both use the default Litecoin imagery. You should use an image editing program of your choice (I like Photoshop CS3, but GIMP is also nice) to edit the images. If you want rounded icons/images, use transparent .png files. Also, don't forget to generate an .ico (Windows/Linux) and an .icns (Mac) icon file for your program. A great website I like to use for this is here: http://iconverticons.com/
===Merkel Hash===


The Merkel hash is the root of your coin's network. Its the hash that all of the blocks will be measured against and the basis for mining a genesis block. My methodology is to get a coin working on the testnet first and then the main network by building and testing in a staged progression. The Merkel hash is not actually the first thing you need to change though.


====Epoch Time====


Since Midnight UTC on New Years Day, 1970, Unix (or Epoch or POSIX) time has been used to coordinate various system calls and functions of Unix systems (and many others by default). Since this kind of time is simple seconds and doesn't account for leap seconds, its an easy way to calculate unique time-based values for programming. To that effect, the first thing one must change when building a new coin is the base time for the birth of the coin or the genesis of the coin.


This is set in two places in the code, one for the test net:


'''src/main.cpp''':
LINE 2023 block.nTime = 1300000000;


and one for the main net:


'''src/main.cpp''':
LINE 2017 block.nTime = 1300000000; //epochtime


You can get the current epoch time from: http://www.epochconverter.com/ or you can generate it from the command line of most *nix systems with this code:


$ date +%s
$ 1369590088


It is customary to also change this line of code to a headline from the day of coin creation in order to relate it to the block.nTime with some human-readable bit:


'''src/main.cpp''':
LINE 2005 const char* pszTimestamp = "Traditionally one puts something timely here coinciding with the epoch";


Now, notice the other lines near the block.nTime, they are called block.nNonce. A 'nonce' is a unit of measurement that is unique and occurs after the nTime is set. The code uses nTime+nNonce to formulate and validate timestamps for blocks and transactions. This is a VERY rough overview of how this really works, but I hope it gives you an idea. We will come back to the nNonce in a moment when we mine a genesis block.


====Generate a Merkel Hash====


Thankfully, this forum post: https://bitcointalk.org/index.php?to...449#msg2035449 gives us a method to generate the Merkel Hash via the coin's test net feature. Right now would be a good time to do the following and copy your files out to your Github repository:


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


Doesn't it feel good to know you're using Github like a pro?


====First Build====


Now that you have a fresh copy with all of your cut and pasting uploaded to Github, we're ready to build a copy of our command line only version of the coin:


barcoin% cd src/
barcoin/src% make -f makefile.osx USE_UPNP=- (or makefile.unix if you're on Linux/BSD/etc)


The code should build cleanly if you've only changed what you're supposed to and you ahve the right dependencies installed. You'll end up with a single executable called the name of your coin with a d on the end if you're on Linux (i.e. barcoin (osx/windows) barcoind (Linux). "Stripping" the extra code will create a smaller file if you so desire:


barcoin/src% strip barcoin (add the d on Linux, barcoind)


Now, we want to run barcoin from the command line using the -testnet switch like so:


barcoin/src% ./barcoin -testnet (add the d on Linux, ./barcoind)


It will immediately fail on first run, throwing out an error like so:


Assertion failed: (block.hashMerkleRoot == uint256("0x")), function LoadBlockIndex, file main.cpp, line 2031.
zsh: abort ./barcoin


We now have a Merkel hash...wait, but where? Its is in your coin's "Application Data" directory. On Linux, that's in your home folder, then a .coinname like:
~./barcoin.
On OSX, it's going to be in your Library folder:
/Users/username/Library/Application Support/barcoin
If you want to see it graphically, hold the option button and click the Finder's Go menu, then choose Application Support and the barcoin folder. On Windows it will be in the Application Data Roaming folder:
c:\Users\username\AppData\Roaming\barcoin


In this folder you'll find a few files--this is also the folder you'll put your coin's .conf file when we're ready to mine it so remember how you got here. Now, open debug log and it will look like this:


[[|{{https://i.imgur.com/H9l4OMl.png}}]]


Thanks to tyrion's amazingly helpful post, we can decipher this debug out put as so:


b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db1 78df5dd3b302fc Block hashed using the non-existent Merkel, based on the pzTimestamp from main.cpp
00000000000000000000000000000000000000000000000000 00000000000000 Genesis block, no good because all the nNonces are set to 0 in main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e1580794 51d9c6c90e4700 Valid Merkel Hash, generated using the epoch time in main.cpp


Now, take the valid Merkel Hash and insert it in to main.cpp:


'''src/main.cpp'''
LINE 2031 assert(block.hashMerkleRoot == uint256("0x2fc1b7ef46270c053711fbae934cf7f83378efd 4b3e158079451d9c6c90e4700"));


===Genesis Blocks===


Dang, we're cooking with gas now eh? How does one mine a genesis block? Luckily the code is already in the source to do just that so don't fret. Who gets the initial coins? Well, no one really--there is a way to do it: https://bitcointalk.org/index.php?to...801#msg2038801 but personally I leave them to cyber space as a token of good karma to the bit gods at the church of development (FinShaggy, this means you, mate.)


====Testnet Genesis Block====


Ok, now you don't need to re-upload to Github just yet, because we need to generate genesis blocks for our network first. With the Merkel hash in place, this line:


'''src/main.cpp'''
LINE 2034 if (true && block.GetHash() != hashGenesisBlock)


if set to true (as above) will mine a genesis block upon the next time the program is run--beginning with the nNonce in the code (0). Let's recompile the code with the new Merkel Hash:


barcoin/src$ make -f makefile.osx USE_UPNP=- (or .unix, whatever)


Recompilation should be pretty quick as most of the files have already been built. Once its done, start it again using this command:


barcoin/src$ ./barcoin -testnet


You will hear your hard drive start to churn and it will seem like the coin has frozen in the window--but its not frozen, its mining a genesis block for the testnet based on your freshly working generated Merkel Hash. If you open the '''debug.log''' you'll see this in action:


[[|{{https://i.imgur.com/DiOPE23.png}}]]


Isn't that nifty? Its hashing a block happily, each nonce is ticking by. How long will this take? On an i7-2600 it can take 5-10 minutes. On a Core2Duo (like my iMac) it can take 20-30 minutes, maybe longer. Just let it do its thing, and go get some runts-- eventually it will find one that it likes. This time it will write it in to the '''testnet3''' folder under your coin's conf folder in a file called '''debug.log''':


Assertion failed: (block.GetHash() == hashGenesisBlock), function LoadBlockIndex, file main.cpp, line 2065.
zsh: abort ./barcoin -testnet


[[|{{https://i.imgur.com/88vYRuy.png}}]]


Ah ha! See it there? There's a noonce and a genesis block hash, ripe for the plucking!


block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1 b3bc232c9a0b7f


Now, put these in to the main.cpp file:


'''src/main.cpp''':
LINE 1984 hashGenesisBlock = uint256("0x5813d4cfab0eeda94a15d11c5e7d6895e667fbb e67c59ef9a1b3bc232c9a0b7f");


Yes, you need to leave the 0x in front of the hashes. You also need to enter the nNonce:


'''src/main.cpp''':
LINE 2024 block.nNonce = 440824;


Note that the sections of the main.cpp file we just edited correspond to the testnet and we haven't done the main net quite yet. This is because at this point, I usually get two systems up and running on the testnet to make sure they can mine coins and then I move on to the main net. Lets save our changes, and upload them to Github and then we'll move on to mining on the testnet:


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


====Mining Testnet Coins====


First things first, rebuild your coin's executable on your local PC:


barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, whatever)


Now comes the part where you need two computers with distinct IP addresses. I find this easy to do with a Linux VPS and my home PC, so that's my example. Two machines on a LAN should work, and I believe 2 or more virtual machines should work too, as long as you're able to keep up with the IP addresses. Connect to your second machine and build the coin's file just as we did before--since you sent the code to Github, may as well use your new elite github skillz:


$ git clone https://github.com/barcoin/barcoin.git
cloning in to barcoin
$ cd barcoin/src
barcoin/src$ make -f makefile.unix (I'm on Linux here).
barcoin/src$ strip barcoind


Now I'm ready to run it--in testnet mode and with a connection to my "other" computer. This is kind of tricky, because you need to start the coin on both computers with the '''-connect=x.x.x.x''' variable, each with the IP of the other PC:


'''Home PC - iMac''':
barcoin/src% ./barcoin -testnet -connect=9.5.6.5 &


'''VPS - Linux''':
barcoin/src$ ./barcoin -testnet -connect=66.77.32.56 &


Add the & to the command will allow it to process in the background and allow you to continue to feed the coin commands without opening a second console window.


On the first run, it will complain about not having a .conf file:
error: You must set rpcpassword=<password> in the configuration file:
/Users/username/Library/Application Support/barcoin/barcoin.conf
If the file does not exist, create it with owner-readable-only file permissions.
It is recommended you use the following random password:
rpcuser=barcoinrpc
rpcpassword=6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptn YGwjt5
(you do not need to remember this password)
If the file does not exist, create it with owner-readable-only file permissions.


Create this file, in whatever format you prefer, nano works great for this and assign an RPC user/password. If you want to use CGMiner/CPUMiner to mine solo later, make this something you'll remember. If you plan to only use the client's built in miner for solo mining, just cut and paste the auto generated info. This is the same file you may want to set up some of the bitcoin.conf commands in, here's a good reference: https://en.bitcoin.it/wiki/Running_B...iguration_File


*On OSX this file is: '''/Users/username/Library/Application Support/barcoin/barcoin.conf'''
*On Linux this file is '''~/.barcoin/barcoin.conf'''
*On Windows, this file is '''c:\users\username\appdata\roaming\barcoin\barco in.conf'''


Side note: because I use a VPS for this, I don't really need to worry about port forwarding at that end. On the home PC, you will want to forward the port you chose for P2Pport in the cut and paste section to the PC you're using. For this example, that is port 55884.


Now start the coin again:


'''Home PC - iMac''':
barcoin/src% ./barcoin -testnet -connect=9.5.6.5 &


'''VPS - Linux''':
barcoin/src$ ./barcoin -testnet -connect=66.77.32.56 &


Now's a good time to brush up on the command line API calls syntax for interacting with the bitcoin client from this wiki page: https://en.bitcoin.it/wiki/Original_...API_Calls_list


First you'll want to send:
barcoin/src% ./barcoin getinfo


It should return something like this:


'''Home PC - iMac''':
barcoin/src%./barcoin getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369621665,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


The other side should look the same and the numbers should match. Note that testnet doesn't verify checkpoints, so they should connect pretty easily (oooh, that's the 1BTC question, but more on that in a bit...the other side:


'''VPS - Linux'''
/barcoin/src$./barcoind getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369622277,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


Lovely, they line up and each have a single connection. Now we can make one of them (or both) begin generating coins by using the following command:


barcoin/src% ./barcoin setgenerate true 16


The number is how many threads of your processor you want to devote, at the insanely low difficulty we're starting out with, this should be plenty to generate a few blocks. You won't see the results in real time, rather you'll need to issue the following command and evaluate the info:


barcoin/src% ./barcoin getmininginfo
{
"blocks" : 0,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1432,
"networkhashps" : -9223372036854775808,
"pooledtx" : 0,
"testnet" : true
}


Success! See that '''hashespersec'''? The internal scrypt miner is now doing its thing and making you some blocks. You'll have to issue the getmininginfo command a few times before it starts to count up in the block count. In just a few minutes you should be able to see:


barcoin/src$./barcoind getmininginfo
{
"blocks" : 1,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1376,
"networkhashps" : 32,
"pooledtx" : 0,
"testnet" : true
}


Woah doggie, we have blocks. Now verify that your other sees the blocks by doing a getinfo on your '''other''' computer:


barcoin/src%./barcoin getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 1,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369621665,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


Well, whatta ya know? Whatta ya say we mine some mainnet coins?


====Main Net Genesis Block====


So really all we need to do now is update main.cpp with a new epoch time, in the main net section this time and mine a genesis block the similarly to the way we did it on testnet. First, stop the coind from running on both your local and remote computers by issuing the command:


barcoin/src% ./barcoind stop
Barcoin is stopping


Next, go back to your development PC and edit main.cpp with a new block.nTime:


'''src/main.cpp''':
LINE 2017 block.nTime = 1369623856; //epochtime


Now, recompile the coin again from the command line:


barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, whatever, ha!)


Now run the coin again, but this time don't include the -testnet switch:


barcoin/src% ./barcoin &


It will again seem to be frozen while it mines the genesis block and your processor will likely go to 100% utilization. Be patient, this took Satoshi 6 days or some shit, right? Again, if you have a Mac, watching it mine with the system log viewer is pretty fun--and then Success:


[[|{{https://i.imgur.com/Elpzv6F.png}}]]


Now, we just do the same as we did on the testnet, and make these changes to main.cpp:


'''src/main.cpp''':
LINE 32 uint256 hashGenesisBlock("0xbf9385c680c3a7aec778b6dcf87dbf b105369d55143fc99ebe86f469cd53ddca");
LINE 2019 block.nNonce = 1345972;
LINE 2034 if (false && block.GetHash() != hashGenesisBlock)


====Checkpoints====


Changing line 2034 to false will keep clients from trying to hash their own genesis block should something be awry. One more file to change:


'''src/checkpoints.cpp'''
LINE 27 ( 0, uint256("0xbf9385c680c3a7aec778b6dcf87dbfb105369d5 5143fc99ebe86f469cd53ddca"))


This is the "trick." Remember I said, there was a trick? This is it. Hash 0 in this file needs to be set to the genesis block hash, so do it and rejoice as you've now nearly finished creating your clone! Should you want to make your coin "legit" you'll want to revisit this file in the future and add other checkpoints in to it--but that's a bit we'll save for the end of the guide. Lets send our changes to Github before we build:


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


Ok, we're ready to rebuild on the first pc:


barcoin% cd src/
barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, blah...)
strip barcoin


Now on the second pc (assuming its Linux here):


~$ cd barcoin
barcoin$ git pull
updating git...wait wait...done!
barcoin$ cd src/
barcoin/src$ make -f makefile.unix USE_UPNP=-
strip barcoind


Ooo laa laa, we're done here. Now we can mine us some coinz!


====Mining Main Net Coins====


The process here is the same as the testnet, but without the -testnet switch. Start'er up:


'''Home PC - iMac''':
barcoin/src% ./barcoin -connect=9.5.6.5 &


'''VPS - Linux''':
barcoin/src$ ./barcoin -connect=66.77.32.56 &


Verify with getinfo:


barcoin/src%./barcoind getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : false,
"keypoololdest" : 1369627515,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}


Get a new address:


barcoin getnewaddress
GeeNLCk9KfQQ35wPpf2faYdqHEU5KW4Khn


Start one of them (or both of them mining) and verify it:


barcoin/src%./barcoind setgenerate true 16
barcoin/src%./barcoind getmininginfo
{
"blocks" : 0,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1417,
"networkhashps" : -9223372036854775808,
"pooledtx" : 0,
"testnet" : false
}


Ooooooh myyyyyy gooooooooood, right? Its making blocks of our new Barcoin (or is it a BAR to consolidate your digital wealth? I mean, shoot, there's only a weeks worth at pump and dump mining rates right?) Soon you will see: '''"blocks" : 1,''' and then that number will start to climb. Now's the time you could set up the barcoin.conf client to accept connections from your LAN and point your dualie-7970 boxen at it or perhaps a minerd. Its ready to rock and roll at this point.


Things to remember:


*You're basically done here. The command line version can do everything the -Qt can.
*Blocks take 120 confirms, so you'll need to leave a system mining even at just a few hashses to keep your network going. I like to leave my VPS mining at just a few Kh/s and use it as the seed node so that the network is always confirming even if its very slow.
*You're basically done here. But no, you're not--lets make some GUI wallets.
===Compiling the -Qt Wallets===


Ok, so this will make or break your coin if you plan to distribute it. Before I go deep in to this, know that the source code for foocoin is customized to make building as easy as possible on Windows (the hardest system to build for). It is also fairly easy to build a Mac version, but at this point I'm having trouble redistributing the Mac versions with the other PC having the same dependencies installed. As for Linux, surprisingly enough, its the easiest to build for and if you installed all the dependencies from the top section of the guide you'll be able to knock it out with two commands.


====Mac OSX -Qt====


I'm starting with this one simply to go inline with dependencies order above. In order to keep things tidy on my iMac I created a virtual machine loaded with OSX 10.6.8, Snow Leopard. This was pretty straight forward using VMWare Fusion. After install and software updating, I installed XCode 3.2.6, which contains a working non-llvm version of gcc and its free from Apple here: http://connect.apple.com/cgi-bin/Web...bundleID=20792 A simple install, no frills, make sure all the objects are checked for installation.


Next, I installed MacPorts this version: https://distfiles.macports.org/MacPo...nowLeopard.pkg and then the dependencies listed in the first section ala:

xcode%sudo port install boost db48 qt4-mac openssl miniupnpc git


After a bit of time, all goodies are installed so we'll clone the coin's software in the regular fashion:


xcode% git clone https://github.com/barcoin/barcoin.conf
xcode% cd barcoin


Now, something a tad different this time, we need to run qmake instead of make. Do that like so:


barcoin% qmake "USE_UPNP=-" barcoin-qt.pro


Yes, you need the " " around USE_UPNP=- and yes, this may produce some strange looking results, something like this:


Project MESSAGE: Building without UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.


Now, lets build it:


barcoin% make -f Makefile


Go, go, go, do not look back. After a bit you'll see it finish and an icon should appear in the barcoin folder:


[[|{{https://i.imgur.com/8MvDciR.png}}]]


Now launch that and voila! A Mac barcoin wallet:


[[|{{https://i.imgur.com/NiE3Bnh.png}}]]


Just like the Windows and Linux wallets, you may want to add '''addnode=x.x.x.x''' where the x.x.x.x is the IP of your seed node. This won't be needed after a few clients begin connecting to the network, eventually they will begin talking to each other via IRC.


====Linux -Qt====


This is by a long shot the easiest wallet to compile, but its hindered by two things for distribution: Linux has very small market share, though for a personal or club coin, what the hell right? and Most Linux users will compile their own software so you'll not likely get far distributing a Linux executable (as well you shouldn't). My example here is based on Debian and should equate to most Debian/Ubuntu flavors.


Now, since we already built a system and installed the dependencies in the first bit--wait, you didn't? You did it all on Windows? Nice. You should write a guide next time! Now, where were we...oh yes, you already have a working coin building system, so lets just stick with it. First things first:


cd ~/barcoin
barcoin% qmake "USE_UPNP=-"


Thinking, thinking, output:
Project MESSAGE: Building without UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.


Now, build it:


barcoin$ make


Yeah, seriously, that's it. Just 'make.' Ha--Debian is so beautiful, is it not? Ok now after a bit of churning and burning it will finish.




====Windows -Qt====


This is the trickiest one to crack of the GUI wallets. I am going to detail how I got this to work and offer you an easy way to get the dependencies in an attempt to make this work for you too. That said, it may not--and I've already said I won't do tech support. So here's the deal. I got this to work and then duplicated it on a second machine to ensure it wasn't a fluke! Most of the information needed to compile the basic coind.exe or GUI wallet is in this thread: https://bitcointalk.org/index.php?topic=149479.0 Unfortunately nothing is as easy as it seems, and although the MinGW and QT installs went fine, I couldn't compile it without a few tweaks to the .pro file.


'''If you don't want to install these dependencies by hand, clone https://github.com/foocoin/deps.git in to C:\''' If not, here's how to do it manually:


Begin by installing MinGW32 from here: https://sourceforge.net/downloads/mingw Go ahead and install the whole bloody thing if you like, but at least the "C Compiler", "C++ Compiler" and "MSYS Basic System" components. Everything else leave stock, next, next, next kind of thing.


Next, install ActivePerl 32 or 64 bit from here: http://www.activestate.com/activeperl/downloads Again, standard install, next, next, next and so forth.


Now open the "MinGW System Shell" from Start - Programs and you'll basically have a Linux prompt:


[[|{{https://i.imgur.com/D97N35X.png}}]]


Now make a /c/deps folder to keep our files in:


$mkdir /c/deps
$cd /c/deps


Now download the following files and put them in C:\Deps:
*OpenSSL: http://www.openssl.org/source/openssl-1.0.1e.tar.gz
Install it like so:
/c/deps$ tar xvfz openssl-1.0.1e.tar.gz
/c/deps$ cd openssl-1.0.1e
/c/deps$ ./config
/c/deps$ make
*Berkeley DB 4.8: http://download.oracle.com/berkeley-...8.30.NC.tar.gz
Install it like so:
/c/deps$ tar xvfz db-4.8.30.NC.tar.gz
/c/deps$ cd db-4.8.30.NC/build_unix
/c/deps$ ../dist/configure --disable-replication --enable-mingw --enable-cxx
*Boost: http://sourceforge.net/projects/boos.../boost/1.53.0/
For this one, open a regular command (CMD) window and do the following:
cd \deps\boost-1.53.0\
bootstrap.bat mingw
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc stage


For simplicity's sake, my versions are simply named deps\boost; deps\ssl; etc. If you build your own, either rename the folders in \deps OR change the paths to suit your changes in the coin-qt.pro file. Remember to change the Boost suffix too to match the version you compile with!


At this point you're ready to build normal non-Qt coin wallets on windows. Go ahead and check the thread at the beginning of this section if you'd like to know how. We're making a GUI though:


Next, install the Qt-MiniGW32 4.8.4 Build from here: http://download.qt-project.org/offic....8.4-mingw.exe Again, all normal installation options, next next next...you know the drill. Once QT is installed, you will find a program in Start - All Programs - Qt by Digia - Qt Command Prompt:


[[|{{https://i.imgur.com/BKhouBL.png}}]]


Fire it up and it will look pretty much like a DOS box:


[[|{{https://i.imgur.com/JGDXB9V.png}}]]


Now since we don't have git on this our Windows computer (you can install it if you want, Cygwin is a good way to do that) you must download the barcoin-master.zip file from http://github.com/barcoin and extract it to the PC. For this example, we'll put it in c:\. One last thing we need to do before we compile for Windows. We need to edit the "barcoin-qt.pro" file to enable the Windows libs, includes, and correct ordering for some of the syntax:


'''barcoin/barcoin-qt.pro''':
LINES 11-22, UNCOMMENT ALL OF THESE TO ENABLE WINDOWS BUILDS:
#windows:LIBS += -lshlwapi
#LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
#LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
#windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32
#LIBS += -lboost_system-mgw46-mt-sd-1_53 -lboost_filesystem-mgw46-mt-sd-1_53 -lboost_program_options-mgw46-mt-sd-1_53 -lboost_thread-mgw46-mt-sd-1_53
#BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53
#BOOST_INCLUDE_PATH=C:/deps/boost
#BOOST_LIB_PATH=C:/deps/boost/stage/lib
#BDB_INCLUDE_PATH=c:/deps/db/build_unix
#BDB_LIB_PATH=c:/deps/db/build_unix
#OPENSSL_INCLUDE_PATH=c:/deps/ssl/include
#OPENSSL_LIB_PATH=c:/deps/ssl


IF YOU BUILT YOUR OWN dependencies, then also change the paths in the file above to suit their locations, use / instead of \, yea--its odd. Now go back to your Qt Command Shell window and build the same way we built on the other platforms:


c:\Qt-Builder> cd \barcoin-master\src
c:\barcoin-master\src> qmake "USE_UPNP=- barcoin-qt.pro
c:\barcoin-master\src> make -f Makefile.Release


Wait for a bit...and once its done, you'll find a folder called "release" under the main barcoin-master folder containing the .exe and a .cpp file:


[[|{{https://i.imgur.com/hR3PMJA.png}}]]


This isn't enough to redistribute though, to make the file run you'll need to include the QT and gcc libs along with the file. I've put them on a git repository here: https://github.com/foocoin/windows-qt-addins.git Just download the 6 files and insert them in to the "release" folder along with the .exe and .cpp:


[[|{{https://i.imgur.com/TApTWZ4.png}}]]


To redistribute, simply rename the "release" folder and zip it up! You can now run the .exe file on Windows:


[[|{{https://i.imgur.com/14ZEXqN.png}}]]


Woah, hey look at that, we already have a balance! Actually, I'd sent the 10 BAR to this computer from the one I left mining all night. If you don't have many connections to the network, you may need to add a line like so to your %appdata%\barcoin\barcoin.conf:


addnode=IP ADDRESS OF YOUR SEED NODE


If you created a seed node, it should connect but if not, simply add a node. Once a few clients begin connecting they will use IRC to connect to each other, so the addnode should only be needed for the initial wallet connections.


its wonderful!
Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 03:35:12 PM
 #112

Pop Pop fizz fizz Oh what a relief it is

Cryddit
Legendary
*
Offline Offline

Activity: 924
Merit: 1129


View Profile
December 18, 2013, 06:47:57 PM
 #113


Dude.  (slow clap).

I can read just three of those, could probably still speak only two, and only write credibly in English.  I'm damned impressed.  Those translations will be very useful to a whole lot of people around the world.  So that's a hell of a contribution you just made.
Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 07:39:05 PM
 #114

== Como Clone Scrypt Baseados Altcoins para diversão e lucro ==


Espere um segundo, por que você iria querer dar os segredos ! ? Porque não é mais um segredo e, além disso , por que nem todos os seus vizinhos e ser capaz de criar uma infinidade desses bits de matemática ainda emocionantes inúteis ? A informação contida neste artigo me levou algumas semanas para compilar e que funciona para mim não é garantido que funcione para você. Utilize este guia como um ponto de partida para aprender um pouco sobre programação C e software de compilar.


Eu não vou fazer o suporte técnico - só porque você não pode obter algo de trabalhar não lhe dá direito a me preocupar com isso. Vá ler , cavar , e ler um pouco mais. Quase tudo neste guia é publicado em alguma forma ou de outra em bitcointalk.org ' s fórum altcoin . O resto eu meticulosamente rastreou através de tentativa e erro e uma dose saudável de pesquisando . As coisas são destinadas a quebrar , você precisa descobrir o porquê e fazê-lo funcionar . Até o final deste guia você deve ter uma moeda de trabalho, p2p (IRC) de rede e clientes para Linux ( fácil ), Mac ( um pouco mais difícil ) e Windows ( ugh ) .


=== O que eu preciso ? ===


* Código fonte para um Scrypt Coin
* Conhecimento de Trabalho e acesso a linha de comando do Linux ou Mac - eu não vou mostrar Cygwin , mas a sua similar.
* 2 ou mais computadores ou máquinas virtuais - Eu vou estar usando meu laptop e um VPS com base Debian Wheezy .
* Edição de texto Software - estou usando TextWrangler para Mac, mas Netbeans , EmeraldEditor , ou nano vai funcionar bem.
* Tempo e paciência ...




Fiddling feliz!


=== Github , código fonte, e Linux ===


==== Source Code ====
As primeiras coisas primeiro . Você vai precisar de algum código fonte. Desde que eu duvido que você pode escrevê-lo a partir do zero ( eu não podia ), você deve estar feliz em saber que há um bazillion opções diferentes na família Scrypt - moeda para você clone e alterar . Minhas primeiras moedas foram baseados na mais excelente moeda de pesquisa, SmallChange , por LightenUP . Sua produção git diff : https://github.com/bfroemel/smallcha...748f76a3d58326 há informações suficientes para criar completamente sua alt - moeda e , como tal, deve ser elogiado . Sim , eu percebo o seu código é simplesmente a fonte Litecoin com cortar e colar mudanças, mas hey - é isso que estamos trabalhando aqui e acrescentou alguns excelentes comentários ao longo do código.


Para os fins deste tutorial e para preservar uma cópia "limpa" do código de SMC , eu criei foocoin : https://github.com/foocoin/foocoin Este guia irá mostrar -lhe como transformar ' foo'coin no ' bar'coin e você pode levá -lo de lá . Eu já mudou o suficiente para fazer esta moeda compilar - capaz , se você seguir este guia . Se você preferir começar com o código SmallChange original, ele está aqui : https://github.com/bfroemel/smallchange.git ou você poderia usar o Litecoin , Franko , YAC , CHN , MIN , qualquer fonte - nós vai mudar o suficiente para fazê-la funcionar .


==== Configurar uma conta Github ====


Agora seria um bom momento para chegar a um nome único para a sua brilhante nova moeda. Você pode visitar https://github.com/insertcoinnamehere e verifique se o nome de sua moeda está disponível. Se não estiver , basta adicionar - projeto ou algo espirituoso e credibilidade aumentando , talvez, sem fins lucrativos ou consórcio daria sua moeda algum entusiasmo :


[ [ | { { https://i.imgur.com/8IxPN1X.png } } ] ]


Ei, olha, barcoin não forem tomadas - TEREMOS melhor arrebatá-la em cima! Basta ir ao https://github.com e preencher os espaços em branco :


[ [ | { { https://i.imgur.com/2KLsNXL.png } } ] ]


Agora, vamos fazer um daqueles sexy código fonte URL do que todos podem git pull de . O que é git pull ? Não se preocupe, você vai pegar o jeito dele - olha, você já está aprendendo coisas novas. No canto superior direito ao lado de seu nome de usuário , clique em "Create Repository: "


[ [ | { { https://i.imgur.com/2xCXZfK.png } } ] ]


Agora preencha os espaços em branco :


[ [ | { { https://i.imgur.com/7S9Z7Bv.png } } ] ]


Clique no botão verde e pronto, você tem Github . Agora anote estas informações:


[ [ | { { https://i.imgur.com/gXyQjh2.png } } ] ]


Porque nós vamos voltar a isso. Melhor ainda , é favorito em seu navegador e abra uma nova aba.


==== Linux , Mac, Cygwin ====


Sim , você precisa de um deles. Para este tutorial , vou estar usando um MacBook com OSX 10.8.something e uma Wheezy VPS Debian. Eu suponho que você pode usar o Cygwin , mas eu prefiro o * nix do Windows em qualquer dia e você pode também aprender mais uma coisa também, certo? Atire , se você precisa de um bom LiveCD com as dependências já construídas em que está configurado para ser executado em uma sessão VMWare , tente [[ CDEbian ]] . Caso contrário, este guia usa Debian o que significa que a maioria dos clones tradicionais devem trabalhar (ou seja: Ubuntu, Xubuntu , Mint ) .


Configurando um PC ou VM com Linux ou OSX está fora do escopo deste tutorial, mas basta dizer que eu posso garantir para VMWare e sua capacidade de executar várias VMs simultaneamente e sua capacidade de virtualizar OSX 10.6.x Você terá que instalar algumas dependências em que nunca OS que você escolher para ser capaz de construir o daemon e - Qt carteira.


==== Dependências para OSX ====


A maneira mais fácil que eu encontrei para instalar dependências em OSX é usar MacPorts ou Homebrew . Pessoalmente, eu gosto MacPorts melhor do Homebrew , mas simplesmente porque sua MacPorts instala em / opt ( onde eu acho que ele deve ir ) e porque MacPorts oferece universal constrói por padrão. Se preferir Homebrew , as fórmulas são as mesmas, mas eu recomendo a construção com a opção - de 32 bits. Para o propósito deste tutorial, vamos usar MacPorts .


É preciso instalar as seguintes dependências:
* boost ( bibliotecas C + +)
* db48 ( Berkeley DB 4 .
* qt4 -mac ( Open Source QT 4.8.4 , inclui qmake )
* openssl ( bibliotecas SSL dev )
* git ( para mover fonte para trás e para o repositório)
* miniupnpc (bibliotecas UPNP dev, opcional - honestamente eu digo pular essa porcaria )


Após a instalação dos MacPorts básicas para a sua versão do OSX , isso pode ser feito com este comando:
% sudo port instalar impulso db48 qt4 -mac openssl miniupnpc git
Depois de todas as dependências são construídos e instalados, o próximo passo é para clonar a fonte do git . Neste exemplo , eu vou ser a clonagem foocoin , renomeá-lo , re- git inicialize-o e empurre a cópia inicial para Github para garantir git está funcionando:
% git clone https://github.com/foocoin/foocoin.git
clonagem para foocoin
% mv foocoin barcoin
% cd barcoin
% rm -rf . git
% git o init
inicializar repositório git em ~ / barcoin
% git add- A *
% git commit -m " primeiro commit"
% git remoto adicionar origem https://github.com/barcoin/barcoin.git
% git push- u origin master
nome de utilizador para git@github.com : barcoin
senha para barcoin@github.com : **********


Agora o que acabamos de fazer ? Nós clonado a fonte existente, excluída sua ligação com git , reiniciada a pasta para Github , acrescentou todas as pastas e arquivos existentes no repositório , comprometida nossas mudanças ( fez permanente e colocá-los no ramo " Master" , rebatizou-o em a nossa nova moeda * maior * melhor * mais rápida , configure-o de volta para vincular a Github - mas para o novo * o relato de moeda * , e empurrou uma cópia para Github Agora, se você ir e olhar para sua página deve olhar . assim:


[ [ | { { https://i.imgur.com/hQm9qn9.png } } ] ]


Oh, olhe para tudo o que o código-fonte fresco apenas aguardando para ser mexido .


==== Dependências para Linux ====


Em baseadas em Debian Linux , dependências e construir os requisitos podem ser instalados em um único comando assim:
$ sudo apt- get install sudo apt- get install build-essential libboost -all- dev libcurl4 - openssl -dev libdb5.1 -dev libdb5.1 + + -dev git qt- sdk libminiupnpc -dev
Isto irá instalar todos os pacotes necessários como apt é muito inteligente . Uma vez que é completo , os mesmos bits como acima devem ser aplicadas:
$ git clone https://github.com/foocoin/foocoin.git
clonagem para foocoin
$ mv barcoin foocoin
$ cd barcoin
$ rm -rf . git
$ git o init
inicializar repositório git em ~ / barcoin
$ git add- A *
$ git commit-m " primeiro commit"
$ git add remota origem https://github.com/barcoin/barcoin.git
$ git push- u origin master
nome de utilizador para git@github.com : barcoin
senha para barcoin@github.com : **********


==== Dependências para Windows ====


Ugh , eu sabia que você ia perguntar. Windows é tricker do que deveria ser quando se trata de construir com o conjunto de ferramentas GNU . Em primeiro lugar, você vai precisar de mingw32 instalados e dependências construídas à mão para cada um dos itens listados acima. Você também vai precisar para personalizar seu arquivo - qt.pro com a localização dessas dependências. Para simplificar, eu já compilado e montado as dependências necessárias para um bom repositório Github para você. Se qualquer baixado e extraído, como c: \ deps ou git clonado para C: \ , este pacakge : https://github.com/foocoin/deps.git vai lhe dar tudo que você precisa para construir foo ( bar) moeda usando a fonte de você já tem . Mais sobre a construção do longo caminho quando chegarmos ao bit compilação cliente Windows um pouco mais adiante no projeto.


Agora você está pronto para cortar e colar !
Pesquisar e substituir === ===


Ahh, agora nós viemos para a parte criativa . A parte em que você muda as coisas que você deseja mudar para fazer a sua a sua moeda. Como este é um * clonagem * tutorial , eu não estou indo centrar-se sobre os meandros da programação (eu não sou qualificado). Eu estou indo simplesmente para mostrar-lhe onde fazer as mudanças que você precisa fazer para obter uma moeda em funcionamento. Para esta etapa, eu realmente prefiro TextWrangler no meu Mac . Ela permite a múltiplos arquivos pesquisar e substituir o que torna esta parte do processo de ir muito rapidamente. Se você estiver indo para configurar uma máquina virtual para construir - Qt carteiras para Mac de qualquer maneira , você deve / pode simplesmente instalar as dependências acima e criar dentro OSX completamente . TextWrangler é gratuito.


Nomes ==== ====


TextWrangler permitirá que você abrir uma pasta inteira de arquivos . Basta abrir o programa e escolha Arquivo, Abrir, realce a pasta " barcoin " e clique em Abrir :


[ [ | { { https://i.imgur.com/kC106go.png } } ] ]


Ahh , agradável, todo o código em uma interface fácil de usar . Esteja ciente, que a edição destes arquivos certamente pode ser feito através de nano ou Netbeans , ou qualquer outro editor de texto, até mesmo o Bloco de Notas , suponho eu. Eu só como este, 'cuz desta próxima característica . Agora precisamos substituir todas as ocorrências de " FooCoin , foocoin e FOOCOIN " em nossa fonte com " BarCoin , barcoin e BARCOIN ". Observe as três definições de casos diferentes - mais código tem todos os três na mesma. Para alterar isso em TextWrangler , escolha Procurar e, em seguida multi Pesquisa do Arquivo e selecione o diretório " barcoin " :


[ [ | { { https://i.imgur.com/fTJKnc7.png } } ] ]


Faça isso para todos os três definições de caso, ou se você prefere o estilo eecummings , substituí-los todos sem o " Case Sensitive " caixa marcada em um falhar swoop . TextWrangler irá mostrar-lhe toda a lista de arquivos alterados e permite que você navegue nas mudanças uma vez concluídas :


[ [ | { { https://i.imgur.com/tJpf9LD.png } } ] ]


Você também vai querer substituir todas as ocorrências de "foo" por "bar ". Esta é a designação de 3 letras para sua moeda, como BTC ou PPC. Finalmente, você terá que alterar manualmente o nome do foocoin - qt.pro na pasta de origem principal. Ei ... isso está começando a se unirem , não?


==== Portos e alterações na rede ====


Ok, agora precisamos dar a nova moeda de um intervalo de porta única de usar. Você vai precisar de duas portas , uma para conexões RPC ( para os mineiros para se conectar a ) e outra para conexões P2P. Você pode encontrar uma boa lista de portas reservadas aqui: http://en.wikipedia.org/wiki/List_of...P_port_numbers Mais quaisquer portas funcionará assumindo que eles são 1 : Over porta 1024 e 2 : não utilizado por outra coisa. Eu sugiro algo nos números altos , bons exemplos incluem 56679 e 56680 ou 12365 e 12366 .


Para este exemplo , vamos usar 55883 para RPC e 55884 para P2P . Nas fontes foocoin , essas portas já estão definidos , então vá em frente e modificá-los usando o seu editor de texto de sua escolha.


Alterar a porta RPC/P2P nos seguintes arquivos :


'' ' src / bitcoinrpc.cpp ''': (PORT RPC)
LINHA 2893 : ip :: tcp :: endpoint endpoint ( BindAddress , GetArg ( " - rpcport " , 55883 ) );
LINHA 3169 : if ( d.connect ( GetArg ( " - rpcconnect ", " 127.0.0.1" ) , GetArg ( " - rpcport ", " 55883 ")) !)


'' ' src / init.cpp ''': (P2P PORT + TESTNET Porto )
LINHA 235 " - port = <port> " + _ (" Ouça conexões em <port> (padrão: 55884 ou TESTNET : 45884 ) ") + " \ n" +


Você pode definir a porta TESTNET a qualquer outra porta aleatória , mas lembre-se que você configure-o para .


'' ' src / init.cpp ''': (PORT RPC)
LINHA 271 " - rpcport = <port> " + _ (" Ouça conexões JSON -RPC sobre <port> (padrão: 55883 ) ") + " \ n" +


'' ' src / protocol.h ''': ( TESTNET Porto + P2P PORT)
LINHA 22 TESTNET retorno ? 45883 : 55884 ;


Você também pode definir um " nó semente" inicial ou sempre no sistema que as novas carteiras de moedas vêm em linha irá verificar se há endereços adicionais :


'' ' src / net.cpp ''':
LINHA 1000 {" algum nome de site ", " somewebsite.org ou ip xxxx "},


==== Moedas intervalos por Block / Bloco / Número máximo de moedas ====


Essas mudanças também são bastante simples. Altere as seguintes linhas de código nos seguintes arquivos :


'' ' src / main.cpp ''' : (Número de moedas por bloco concedido)
LINHA 831 int64 nSubsidy = 1 * COIN ;


'' ' src / main.cpp ''' : (Como * deve * ser encontrados blocos e quantas vezes dificuldade retargets )
Blocos de dois minutos : / / FooCoin ; LINHA 837 static const int64 nTargetSpacing = 120
LINHA 836 static const int64 nTargetTimespan = 1 * 24 * 60 * 60 / / FooCoin : 1 dias


Neste exemplo, queremos que a nossa moeda para produzir blocos 1 moedas a cada 2 minutos e reajustar dificuldade uma vez por dia (1 dia x 24 horas x 60 minutos x 60 segundos). Você pode ajustar isso, mas sei que uma vez que este é um clone Scrypt e não vamos mudar a dificuldade em iniciar esta taxa alvo será desviado até que os níveis de taxa de hash para fora em sua nova moeda. Isso é coisa complicada e eu não entendo muito bem tudo isso ainda.


'' ' src / main.h ''': ( Número total de moedas que nunca e # estimado de blocos por dia)
LINHA 43 static const int64 MAX_MONEY = 10000 * COIN / / número máximo de moedas
LINHA 550 retorno dPriority > COIN * 720/250 / / 720 blocos encontrado um dia.


Você precisa fazer um pouco de matemática para descobrir seus blocos por dia alvo com base em quantas moedas você quer criar sobre o período de tempo e quão distantes os blocos estão . Eu não estou fazendo todo o trabalho para você! Esta moeda é definida para dar um blocos de moedas a cada 2 minutos , tendo como alvo 720 blocos por dia através de um máximo de 10.000 moedas , o que significa se extraído duro, ele vai ficar sem moedas no tempo de uma semana .


==== Endereço Iniciando letra / número ====


O primeiro dígito ou letra de endereço da nova moeda é determinada por um código base- 58. Você pode ver uma lista de todas as opções disponíveis aqui: https://en.bitcoin.it/wiki/Base58Check_encoding Para alterar o endereço de edição da sua moeda com isto:


'' ' src/base58.h ''' :
LINHA 280 PUBKEY_ADDRESS = 38 , / / ​​Defina o primeiro bit endereço aqui


==== Icons and Splash Images ====


Você vai encontrar todas as imagens de apoio e ícones para a carteira no '' ' src / qt / res ''' pasta. Há duas pastas com ícones que você deve prestar atenção :


[ [ | { { https://i.imgur.com/uTDamJq.png } } ] ]
e
[ [ | { { https://i.imgur.com/2wJUutr.png } } ] ]


Foo e bar moedas ambos usam o imaginário Litecoin padrão. Você deve usar um programa de edição de imagem de sua escolha (eu gosto de Photoshop CS3, mas GIMP também é bom ) para editar as imagens. Se você quiser ícones / imagens arredondados , use transparente. Png . Além disso, não se esqueça de gerar um arquivo. Ico (Windows / Linux) e um . Icns (Mac) arquivo de ícone para o seu programa . Um grande site que eu gosto de usar para isso é aqui: http://iconverticons.com/
=== Merkel Hash ===


O hash Merkel é a raiz da rede da sua moeda. É o hash que todos os blocos serão medidos contra ea base para a mineração um bloco gênese. Minha metodologia é fazer com que uma moeda trabalhando no TESTNET primeiro e depois a principal rede , criando e testando em uma progressão encenado. O hash Merkel não é realmente a primeira coisa que você precisa para mudar embora.


==== ==== Epoch Tempo


Desde meia-noite UTC no dia de Ano Novo de 1970 , Unix (ou Epoch ou POSIX ) tempo tem sido usado para coordenar as diversas chamadas de sistema e funções dos sistemas Unix (e muitos outros por padrão). Uma vez que este tipo de tempo é segundos simples e não leva em conta segundo salto , o seu uma maneira fácil de calcular os valores com base no tempo exclusivo para programação. Para o efeito, a primeira coisa que se deve mudar quando a construção de uma nova moeda é o tempo base para o nascimento da moeda ou a gênese da moeda.


Isso é definido em dois lugares no código , um para a rede de teste:


'' ' src / main.cpp ''':
LINHA 2023 block.nTime = 1300000000 ;


e um para o líquido principal :


'' ' src / main.cpp ''':
LINHA 2017 block.nTime = 1300000000 / / epochtime


Você pode obter o tempo de época atual : http://www.epochconverter.com/ ou você pode gerá-lo a partir da linha da maioria dos sistemas * nix com este código de comando :


$ Date + % s
$ 1369590088


Costuma-se também alterar esta linha de código para a manchete do dia da criação da moeda , a fim de relacioná-la com o block.nTime com algum pouco legível :


'' ' src / main.cpp ''':
LINHA 2005 const char * pszTimestamp = "Tradicionalmente se coloca algo oportuna aqui coincidindo com a época" ;


Agora, observe as outras linhas perto do block.nTime , eles são chamados block.nNonce . Um " uso único " é uma unidade de medição, que é única e ocorre após o nTempo está definido . O código usa nTime + nNonce para formular e validar timestamps para blocos e transações. Esta é uma visão muito aproximada de como isso realmente funciona, mas eu espero que isso lhe dá uma idéia . Vamos voltar para o nNonce em um momento em que minerar um bloco gênese.


==== Gerar um hash Merkel ====


Felizmente , este post no fórum : https://bitcointalk.org/index.php?to...449 # msg2035449 nos dá um método para gerar a Merkel Hash via recurso de rede de teste da moeda. Agora seria um bom momento para fazer o seguinte e copiar os arquivos para seu repositório Github :


barcoin % git add -A *
barcoin % git commit-m "mudanças"
mestre origem barcoin % git push


Não se sente bom saber que você está usando o Github como um profissional ?


==== Primeiro criar ====


Agora que você tem uma nova cópia com toda a sua corte e colagem carregado para Github , estamos prontos para construir uma cópia da nossa linha de comando única versão da moeda:


barcoin % cd src /
barcoin / src % make -f USE_UPNP makefile.osx = - ( ou makefile.unix se você estiver em Linux / BSD / etc)


O código deve construir limpa se você só mudou o que você deveria e você ahve as dependências corretas instalado. Você vai acabar com um único executável chamado o nome da sua moeda com anúncio no final, se você estiver no Linux (ou seja barcoin ( OSX / windows ) barcoind (Linux) . " Decapagem " o código extra irá criar um arquivo menor se assim o desejar :


barcoin / src % tira barcoin ( adicione o d em Linux, barcoind )


Agora , queremos executar barcoin a partir da linha de comando usando a opção- TESTNET assim:


barcoin / src %. / barcoin - TESTNET ( adicione o d em Linux, . / barcoind )


Ele vai falhar imediatamente na primeira execução , jogando fora um erro assim:


Falha de declaração : ( block.hashMerkleRoot == uint256 ( " 0x" ) ), função LoadBlockIndex , arquivo main.cpp , linha 2031.
zsh : abortar / barcoin .


Agora temos um hash Merkel ... espere , mas onde? O seu está no diretório de sua moeda " Application Data " . No Linux, que está na sua pasta pessoal , então um coinname como . :
~ . / barcoin .
No OSX , que vai para a sua pasta Biblioteca :
/ Users / usuário / Library / Application Support / barcoin
Se você quiser vê-lo graficamente , segure o botão de opção e clique no menu Ir do Finder, em seguida, escolha Application Support ea pasta barcoin . No Windows, ele vai estar na pasta Application Data Roaming:
c: \ Users \ nome do usuário \ AppData \ Roaming \ barcoin


Nesta pasta você encontrará alguns arquivos - isso também é a pasta que você vai colocar o arquivo conf da sua moeda quando estivermos prontos para a mina é tão lembrar como você chegou aqui . . Agora , faça o login debug aberto e será parecido com este :


[ [ | { { https://i.imgur.com/H9l4OMl.png } } ] ]


Graças ao incrivelmente útil pós de Tyrion , podemos decifrar essa depuração fora colocar assim:


b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db1 78df5dd3b302fc bloco hash usando a Merkel inexistente , com base no pzTimestamp de Main.cpp
00000000000000000000000000000000000000000000000000 00000000000000 Genesis bloco, não é bom , porque todos os nNonces são definidos como 0 no main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e1580794 51d9c6c90e4700 Valid Merkel Hash , gerado usando o tempo de época em main.cpp


Agora, pegue a Hash Merkel válido e inseri-lo no main.cpp:


'' ' src / Main.cpp '''
LINHA 2031 assert ( block.hashMerkleRoot == uint256 ( " 0x2fc1b7ef46270c053711fbae934cf7f83378efd 4b3e158079451d9c6c90e4700 "));


=== Genesis Blocks ===


Dang , estamos cozinhando com gás agora hein? Como é que uma mina de um bloco gênese ? Felizmente, o código já está na fonte para fazer isso , então não se preocupe. Quem recebe as moedas iniciais? Bem, ninguém realmente - não há uma maneira de fazê-lo: https://bitcointalk.org/index.php?to...801 # msg2038801 mas pessoalmente eu deixá-los para o espaço cibernético como um símbolo de bom karma para o bit deuses na igreja de desenvolvimento ( FinShaggy , isso significa que você , companheiro. )


==== Bloquear TESTNET Genesis ====


Ok , agora você não precisa re -upload para o Github ainda, porque precisamos gerar blocos de gênese para a nossa rede pela primeira vez. Com o hash Merkel no lugar, esta linha:


'' ' src / Main.cpp '''
LINHA 2034 if (true && block.GetHash () ! = HashGenesisBlock )


se definido como verdadeiro (como acima) irá extrair um bloco gênese sobre a próxima vez que o programa é executado - começando com o nNonce no código (0). Vamos recompilar o código com o novo Hash Merkel :


barcoin / src $ make- f makefile.osx USE_UPNP = - ( ou unix, o que seja. )


Recompilação deve ser bastante rápido quanto a maioria dos arquivos já foram construídas . Uma vez que o seu feito , inicie-o novamente usando este comando:


barcoin / src $ . / barcoin - TESTNET


Você vai ouvir o seu disco rígido começar a produzir e vai parecer que a moeda tem congelado na janela - mas não congelado, sua mineração um bloco gênese para o TESTNET com base no seu trabalho recém- gerado Merkel Hash . Se você abrir ' debug.log ''' o '' você vai ver isso em ação :


[ [ | { { https://i.imgur.com/DiOPE23.png } } ] ]


Não é bacana ? O hash de um bloco felizmente , cada um nonce está passando . Quanto tempo isso vai demorar? Em um i7 -2600 pode demorar 5-10 minutos. Em um Core2Duo (como o meu iMac ) que pode demorar 20-30 minutos , talvez mais. Basta deixá-lo fazer a sua coisa , e ir buscar alguns runts - eventualmente, ele vai encontrar um que ele gosta . Desta vez, ele vai escrever no ' testnet3 ''' a '' pasta em pasta conf de sua moeda em um arquivo chamado '' ' debug.log ''':


Falha de declaração : ( block.GetHash () == hashGenesisBlock ), função LoadBlockIndex , arquivo main.cpp , linha 2065.
zsh : . abort / barcoin - TESTNET


[ [ | { { https://i.imgur.com/88vYRuy.png } } ] ]


Ah ha! Vê-lo lá? Há um noonce e um hash bloco gênese , maduro para a colheita !


block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1 b3bc232c9a0b7f


Agora, coloque estes para o arquivo main.cpp:


'' ' src / main.cpp ''':
LINHA 1984 hashGenesisBlock = uint256 ( " 0x5813d4cfab0eeda94a15d11c5e7d6895e667fbb e67c59ef9a1b3bc232c9a0b7f " ) ;


Sim, você precisa deixar o 0x na frente dos hashes. Você também precisa entrar no nNonce :


'' ' src / main.cpp ''':
LINHA 2024 block.nNonce = 440824 ;


Note-se que as seções do arquivo main.cpp nós apenas editados correspondem ao TESTNET e não fizemos a rede principal ainda. Isto porque , neste ponto, eu costumo ficar dois sistemas em funcionamento no TESTNET para se certificar que pode minar as moedas e , em seguida, eu passo para a rede principal. Vamos salvar nossas alterações e enviá-los para Github e depois vamos passar para a mineração no TESTNET :


barcoin % git add -A *
barcoin % git commit-m "mudanças"
mestre origem barcoin % git push


==== Mining TESTNET moedas ====


As primeiras coisas primeiro , reconstruir executável de sua moeda em seu PC local :


barcoin / src % make -f makefile.osx USE_UPNP = - ( . ou unix, o que for)


Agora vem a parte onde você precisa de dois computadores com endereços IP diferentes. Acho isso fácil de fazer com um VPS Linux e meu PC em casa, de modo que é o meu exemplo. Duas máquinas em uma LAN deve funcionar, e eu acredito que 2 ou mais máquinas virtuais deve funcionar também , contanto que você é capaz de manter-se com os endereços IP . Conecte-se a sua segunda máquina e construir arquivo da moeda , assim como fizemos antes - uma vez que você enviou o código para Github , pode também utilizar o seu novo skillz github elite :


$ Git clone https://github.com/barcoin/barcoin.git
clonagem para barcoin
$ Cd barcoin / src
barcoin / src $ make- f makefile.unix (eu estou em Linux aqui).
barcoin / src $ tira barcoind


Agora estou pronto para executá-lo - no modo TESTNET e com uma ligação para o meu "outro" computador. Isso é meio complicado , porque você precisa para começar a moeda em ambos os computadores com o '' ' -connect = xxxx ''' variáveis, cada uma com o IP do outro PC:


'' 'Home PC - iMac ''':
barcoin / src %. / barcoin - TESTNET -connect = 9.5.6.5 e


'VPS - Linux ''' '':
barcoin / src $ . / barcoin - TESTNET -connect = 66.77.32.56 &


Adicione o e ao comando lhe permitirá processar em segundo plano e permitir -lhe continuar a alimentar os comandos de moedas sem abrir uma segunda janela do console.


Na primeira execução, ele vai reclamar de não ter um arquivo conf . :
erro: Você deve definir rpcpassword = <senha> no arquivo de configuração :
/ Users / usuário / Library / Application Support / barcoin / barcoin.conf
Se o arquivo não existir , criá-lo com permissões de arquivo único proprietário de leitura - .
É recomendado que você use a senha aleatória seguinte :
rpcuser = barcoinrpc
rpcpassword = 6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptn YGwjt5
(você não precisa se lembrar esta senha )
Se o arquivo não existir , criá-lo com permissões de arquivo único proprietário de leitura - .


Crie este arquivo, em qualquer formato que você preferir, nano funciona muito bem para isso e atribuir um RPC usuário / senha. Se você quiser usar CGMiner / CPUMiner minar a solo depois, fazer algo que você vai se lembrar . Se você pretende usar apenas o cliente é construído em mineiro para a mineração solo, apenas cortar e colar o auto gerado info. Este é o mesmo arquivo que você pode querer configurar alguns dos comandos bitcoin.conf em , aqui está uma boa referência : https://en.bitcoin.it/wiki/Running_B...iguration_File


* Em OSX este arquivo é :'' ' / Users / usuário / Library / Application Support / barcoin / barcoin.conf '''
* No Linux este arquivo é '' ' ~ / .barcoin / barcoin.conf '''
* No Windows, esse arquivo é '' ' C: \ Users \ nome do usuário \ AppData \ Roaming \ barcoin \ barco in.conf '''


Nota lateral : porque eu uso um VPS para isso, eu realmente não precisa se preocupar com o encaminhamento de porta em que fim. No PC de casa, você vai querer encaminhar a porta que você escolheu para P2Pport na seção de cortar e colar para o PC que você está usando. Para este exemplo , que é porta 55884 .


Agora comece a moeda novamente :


'' 'Home PC - iMac ''':
barcoin / src %. / barcoin - TESTNET -connect = 9.5.6.5 e


'VPS - Linux ''' '':
barcoin / src $ . / barcoin - TESTNET -connect = 66.77.32.56 &


Agora é um bom momento para retocar na linha de comando chamadas API sintaxe para interagir com o cliente bitcoin desta página wiki: https://en.bitcoin.it/wiki/Original_...API_Calls_list


Primeiro você vai querer enviar:
barcoin / src %. / getinfo barcoin


Ele deve retornar algo como isto:


'' 'Home PC - iMac ''':
barcoin / src %. / getinfo barcoin
{
" versão" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000,
" equilíbrio" : 0.00000000 ,
"blocos" : 0,
"conexões" : 1,
"proxy" : "",
" dificuldade " : 0.00024414 ,
" TESTNET " : true,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"erros ": ""
}


O outro lado deve ter a mesma aparência e os números devem ser iguais. Note-se que TESTNET não verifica postos de controle, de modo que deve ligar muito facilmente ( oooh , essa é a pergunta 1BTC , mas mais sobre isso daqui a pouco ... o outro lado :


'VPS - Linux ''' ''
/ barcoin / src $ . / barcoind getinfo
{
" versão" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000,
" equilíbrio" : 0.00000000 ,
"blocos" : 0,
"conexões" : 1,
"proxy" : "",
" dificuldade " : 0.00024414 ,
" TESTNET " : true,
" keypoololdest " : 1369622277 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"erros ": ""
}


Lovely, eles se alinham e cada um tem uma única conexão. Agora podemos fazer um deles (ou ambos) começar a gerar moedas usando o seguinte comando:


barcoin / src %. / setgenerate barcoin verdade 16


O número é quantos threads do processador que você quer para se dedicar , ao insanamente baixa dificuldade que estamos começando com , isso deve ser suficiente para gerar a poucos quarteirões . Você não vai ver os resultados em tempo real, em vez você vai precisar para emitir o seguinte comando e avaliar a informação:


barcoin / src %. / getmininginfo barcoin
{
"blocos" : 0,
" currentblocksize " : 1000,
" currentblocktx " : 0,
" dificuldade " : 0.00024414 ,
"erros" : "",
" gerar " : true,
" genproclimit " : 16 ,
" hashespersec " : 1432,
" networkhashps ": -9223372036854775808 ,
" pooledtx " : 0,
" TESTNET ": true
}


Sucesso! Veja que " hashespersec '' ''' ? O mineiro Scrypt interno agora está fazendo a sua coisa e fazendo -lhe alguns blocos. Você vai ter que emitir o comando getmininginfo algumas vezes antes de começar a contar -se na contagem de bloco. Em apenas alguns minutos você deve ser capaz de ver:


barcoin / src $ . / barcoind getmininginfo
{
"blocos" : 1,
" currentblocksize " : 1000,
" currentblocktx " : 0,
" dificuldade " : 0.00024414 ,
"erros" : "",
" gerar " : true,
" genproclimit " : 16 ,
" hashespersec " : 1376,
" networkhashps ": 32,
" pooledtx " : 0,
" TESTNET ": true
}


Woah cachorrinho, temos blocos. Agora, verifique se o seu outro vê os blocos , fazendo um getinfo em 'outro ''' computador seu '':


barcoin / src %. / getinfo barcoin
{
" versão" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000,
" equilíbrio" : 0.00000000 ,
"blocos" : 1,
"conexões" : 1,
"proxy" : "",
" dificuldade " : 0.00024414 ,
" TESTNET " : true,
" keypoololdest " : 1369621665 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"erros ": ""
}


Bem, whatta sabe? Whatta ya dizer que garimpar algumas moedas MainNet ?


==== Bloco principal Genesis Net ====


Então, realmente tudo o que precisamos fazer agora é atualizar main.cpp com um novo tempo de época , na principal seção net este tempo eo meu um bloco gênese da forma semelhante à maneira que fizemos em TESTNET . Em primeiro lugar, parar o Coind de execução em ambos os computadores locais e remotos , emitindo o comando :


barcoin / src %. / barcoind parar
Barcoin está parando


Em seguida, voltar para o seu PC desenvolvimento e edição main.cpp com um novo block.nTime :


'' ' src / main.cpp ''':
LINHA 2017 block.nTime = 1369623856 / / epochtime


Agora, recompilar a moeda novamente a partir da linha de comando:


barcoin / src % make -f USE_UPNP makefile.osx = - ( . ! ou unix, qualquer que seja, ha)


Agora execute a moeda novamente , mas desta vez não incluir a opção- TESTNET :


barcoin / src %. / barcoin &


Vai novamente parece ser congelado enquanto minas do bloco gênese e seu processador provavelmente irá para a utilização de 100%. Seja paciente, isto levou Satoshi 6 dias ou algo assim , certo? Novamente, se você tem um Mac , observando- mina com o visualizador de log do sistema é muito divertido - e então o sucesso:


[ [ | { { https://i.imgur.com/Elpzv6F.png } } ] ]


Agora, basta fazer o mesmo que fizemos no TESTNET , e fazer essas alterações para main.cpp:


'' ' src / main.cpp ''':
LINHA 32 uint256 hashGenesisBlock ( " 0xbf9385c680c3a7aec778b6dcf87dbf b105369d55143fc99ebe86f469cd53ddca " ) ;
LINHA 2019 block.nNonce = 1345972 ;
LINHA 2034 se (false && block.GetHash () ! = HashGenesisBlock )


==== Checkpoints ====


Alterar linha 2034 para false irá manter os clientes de tentar botar seu próprio bloco gênese deve ser algo errado. Mais um arquivo para alterar :


'' ' src / checkpoints.cpp '''
LINHA 27 ( 0 , uint256 ( " 0xbf9385c680c3a7aec778b6dcf87dbfb105369d5 5143fc99ebe86f469cd53ddca " ) )


Este é o " truque ". Lembra que eu disse, não era um truque ? É isso. Hash 0 neste arquivo precisa ser definido para o hash bloco gênese , assim fazê-lo e se alegrar como você agora quase terminado de criar seu clone ! Se você quiser fazer a sua moeda " legítimo ", você vai querer rever esse arquivo no futuro e adicionar outros postos de controle em a ele - mas isso é um pouco que vou guardar para o final do guia. Vamos enviar as nossas mudanças para Github antes de construir :


barcoin % git add -A *
barcoin % git commit-m "mudanças"
mestre origem barcoin % git push


Ok , estamos prontos para reconstruir no primeiro pc:


barcoin % cd src /
barcoin / src % make -f USE_UPNP makefile.osx = - ( . ou unix, blá ... )
tira barcoin


Agora no segundo pc (assumindo que seu Linux aqui) :


~ $ Cd barcoin
barcoin $ git pull
atualizando git ... espere ... espere feito!
barcoin $ cd src /
barcoin / src $ make- f makefile.unix USE_UPNP = -
tira barcoind


Ooo laa laa , estamos a fazer aqui. Agora podemos nos garimpar algumas Coinz !


==== Moedas Mining principal Net ====


O processo aqui é o mesmo que o TESTNET , mas sem alterar a - TESTNET . Start'er up:


'' 'Home PC - iMac ''':
barcoin / src %. / barcoin -connect = 9.5.6.5 e


'VPS - Linux ''' '':
barcoin / src $ . / barcoin -connect = 66.77.32.56 &


Verifique com getinfo :


barcoin / src %. / barcoind getinfo
{
" versão" : 1000000 ,
" ProtocolVersion " : 60001 ,
" walletversion " : 60000,
" equilíbrio" : 0.00000000 ,
"blocos" : 0,
"conexões" : 1,
"proxy" : "",
" dificuldade " : 0.00024414 ,
" TESTNET ": false ,
" keypoololdest " : 1369627515 ,
" keypoolsize " : 101 ,
" paytxfee " : 0.00000000 ,
" mininput " : 0.00010000 ,
"erros ": ""
}


Obter um novo endereço:


barcoin getnewaddress
GeeNLCk9KfQQ35wPpf2faYdqHEU5KW4Khn


Iniciar um deles ( ou ambos mineração ) e verificar que :


barcoin / src %. / barcoind setgenerate verdade 16
barcoin / src %. / barcoind getmininginfo
{
"blocos" : 0,
" currentblocksize " : 1000,
" currentblocktx " : 0,
" dificuldade " : 0.00024414 ,
"erros" : "",
" gerar " : true,
" genproclimit " : 16 ,
" hashespersec " : 1417,
" networkhashps ": -9223372036854775808 ,
" pooledtx " : 0,
" TESTNET ": false
}


Ooooooh myyyyyy Gooooooooood , certo? Seus fazendo blocos de nosso novo Barcoin ( ? Ou é um BAR para consolidar a sua riqueza digitais Quer dizer, atirar, há apenas um semanas no pump and dump taxas de mineração direita) Logo você vai ver :'' ' "blocos" : 1 , '' ' e , em seguida, esse número vai começar a subir . Agora é a hora que você pode configurar o cliente barcoin.conf para aceitar conexões de rede local e apontar seus boxen dualie - 7970 para ele ou talvez um Minerd . Seu pronto para o rock and roll neste momento.


Coisas para lembrar :


* Você está basicamente feito aqui . A versão de linha de comando pode fazer tudo o Qt pode.
* Blocos levar 120 confirma, de forma que você precisa deixar um sistema de mineração , mesmo em apenas alguns hashses para manter sua rede indo. Eu gosto de deixar meu mineração VPS em apenas alguns Kh / s e usá-lo como o nó semente para que a rede está sempre confirmando ainda que é muito lento.
* Você está basicamente feito aqui . Mas não, você não é - vamos fazer algumas carteiras de GUI.
=== Compilando os -qt Carteiras ===


Ok, então isso vai fazer ou quebrar sua moeda , se você pretende distribuir. Antes de eu ir fundo para isso, sabe que o código-fonte para foocoin é personalizado para tornar a construção mais fácil possível no Windows ( o sistema mais difícil de construir para ) . Também é bastante fácil de construir uma versão para Mac , mas neste momento eu estou tendo problemas redistribuição das versões para Mac com o outro PC com as mesmas dependências instalado. Quanto ao Linux , surpreendentemente , é o mais fácil de construir e se você instalou todas as dependências da seção superior da guia, você vai ser capaz de batê-lo fora com dois comandos .


==== Mac OSX- Qt ====


Estou começando com um presente simples para ir em linha com dependências ordem acima . A fim de manter as coisas arrumadas no meu iMac eu criei uma máquina virtual carregado com OSX 10.6.8 , o Snow Leopard . Este foi bastante simples usando VMWare Fusion . Depois de instalar e atualizar software , eu instalei o Xcode 3.2.6 , que contém uma versão não llvm trabalho do gcc e sua livre da Apple aqui: http://connect.apple.com/cgi-bin/Web...bundleID = 20792 a instalação simples , sem frescura , certifique-se de todos os objetos são verificados para a instalação.


Em seguida, eu instalei o MacPorts esta versão : https://distfiles.macports.org/MacPo...nowLeopard.pkg e depois as dependências listadas na primeira ala seção :

xcode % sudo port instalar impulso db48 qt4 -mac openssl miniupnpc git


Depois de um pouco de tempo, todas as guloseimas estão instalados , então vamos clonar o software da moeda na forma regular :


xcode % git clone https://github.com/barcoin/barcoin.conf
xcode % cd barcoin


Agora, algo um pouco diferente desta vez , precisamos executar qmake em vez de make. Faça isso assim:


barcoin % qmake " USE_UPNP = - " barcoin - qt.pro


Sim , você precisa do " " em torno USE_UPNP = - e sim, isso pode produzir alguns resultados de aparência estranha , algo como isto:


MENSAGEM Projeto: Edifício sem suporte UPnP
Formas plurais removido como a língua-alvo tem menos formas .
Se isso soa errado, possivelmente, a língua-alvo não está definida ou reconhecida.


Agora, vamos construí-lo :


barcoin % make- f Makefile


Vai, vai, vai, não olhe para trás . Depois de um pouco você vai vê-lo terminar e um ícone deve aparecer na pasta barcoin :


[ [ | { { https://i.imgur.com/8MvDciR.png } } ] ]


Agora lançar isso e voila! A Mac barcoin carteira :


[ [ | { { https://i.imgur.com/NiE3Bnh.png } } ] ]


Assim como as carteiras de Windows e Linux , você pode querer adicionar '' ' addnode = xxxx ''' onde o xxxx é o IP do nó semente. Isso não vai ser necessária depois de alguns clientes começam a ligar à rede , eventualmente, eles vão começar a falar uns com os outros via IRC .


==== Linux - Qt ====


Esta é de longe a carteira mais fácil de compilar , mas sua prejudicado por duas coisas para a distribuição : o Linux tem participação de mercado muito pequena , embora por uma moeda pessoal ou clube, o que a direita o inferno? A maioria dos usuários de Linux e irá compilar seu próprio software de forma que você não é provável se longe distribuir um executável Linux (assim você não deveria) . Meu exemplo aqui é baseado no Debian e deve equivaler a maioria dos sabores de Debian / Ubuntu .


Agora, uma vez que já construiu um sistema instalado e as dependências no primeiro bit - espere, você não fez isso? Você fez tudo isso no Windows? Nice. Você deve escrever um guia na próxima vez! Agora , onde estávamos ... oh sim , você já tem um sistema de construção moeda de trabalho, então vamos ficar com ele. As primeiras coisas primeiro :


cd ~ / barcoin
barcoin % qmake " USE_UPNP = - "


Pensando , pensando, saída :
MENSAGEM Projeto: Edifício sem suporte UPnP
Formas plurais removido como a língua-alvo tem menos formas .
Se isso soa errado, possivelmente, a língua-alvo não está definida ou reconhecida.


Agora, construí-lo :


barcoin $ make


Sim, a sério, é isso. Apenas ' fazer '. Ha - Debian é tão bonito, não é? Ok, agora depois de um pouco de agitação e queimá-lo vai terminar .




==== Windows Qt ====


Este é o mais difícil de roer das carteiras de GUI. Vou detalhar como cheguei a este trabalho e oferecer-lhe uma maneira fácil de obter as dependências , em uma tentativa de fazer este trabalho para você também. Dito isto, não pode - e eu já disse que eu não vou fazer o suporte técnico . Então aqui está o negócio. Eu tenho esse para o trabalho e , em seguida, duplicado -lo em uma segunda máquina para garantir que não foi um acaso ! A maior parte da informação necessária para compilar o coind.exe ou GUI carteira básica é nesta discussão: https://bitcointalk.org/index.php?topic=149479.0 Infelizmente nada é tão fácil como parece , e embora o MinGW e QT instalações correu bem , eu não poderia compilá-lo sem alguns ajustes para o pro arquivo . .


'' ' Se você não quiser instalar estas dependências manualmente , clone https://github.com/foocoin/deps.git para C: \ ''' Se não, aqui está como fazê -lo manualmente:


Comece instalando mingw32 partir daqui: https://sourceforge.net/downloads/mingw Vá em frente e instalar toda a maldita coisa , se quiser, mas pelo menos o " C Compiler " , componentes " C + + Compiler " e " MSYS Sistema Básico " . Tudo o resto sair estoque , next, next, next tipo de coisa.


Em seguida, instale o ActivePerl 32 ou 64 bits a partir daqui : http://www.activestate.com/activeperl/downloads Novamente, instalação padrão , next, next, next e assim por diante .


Agora, abra o " MinGW Sistema Shell" em Iniciar - Programas e você basicamente terá um prompt do Linux :


[ [ | { { https://i.imgur.com/D97N35X.png } } ] ]


Agora faça uma pasta c / / deps para manter nossos arquivos :


$ mkdir / c / deps
$ cd / c / deps


Agora baixe os seguintes arquivos e colocá-los em C: \ Deps :
* OpenSSL : http://www.openssl.org/source/openssl-1.0.1e.tar.gz
Instale-o assim:
/ c / deps $ xvfz tar openssl - 1.0.1e.tar.gz
/ c / deps $ cd openssl - 1.0.1e
/ c / deps $ . / config
/ c / deps $ make
* Berkeley DB 4.8: http://download.oracle.com/berkeley-...8.30.NC.tar.gz
Instale-o assim:
/ c / deps $ xvfz tar db- 4.8.30.NC.tar.gz
/ c / deps $ cd db-4.8.30.NC/build_unix
/ c / deps $ .. / dist / configure - disable- replicação - enable- mingw - enable- CXX
* Boost: http://sourceforge.net/projects/boos.../boost/1.53.0/
Para este, abrir uma janela de comando regular ( CMD ) e faça o seguinte:
cd \ deps \ boost- 1.53.0 \
bootstrap.bat mingw
b2 - do tipo construir = completo - with- crono - com sistema de arquivos - with- program_options - with- sistema - com fios ferramentas = gcc fase


Para simplificar , as minhas versões são simplesmente chamado deps \ impulsionar ; deps \ ssl ; etc Se você construir o seu próprio , ou renomear as pastas em \ deps ou alterar os caminhos para atender às suas alterações no arquivo de coin- qt.pro . Lembre-se de alterar o sufixo impulso também para coincidir com a versão que você compilar com !


Neste ponto, você está pronto para construir carteiras de moedas não- Qt normais em janelas. Vá em frente e verifique a linha no início desta seção , se você gostaria de saber como. Estamos fazendo uma GUI no entanto:


Em seguida, instale o Qt - MiniGW32 4.8.4 Construir a partir daqui : http://download.qt-project.org/offic....8.4-mingw.exe Mais uma vez, todas as opções de instalação normais, próximo próximo próximo ... você sabe o que fazer . Uma vez QT é instalado , você vai encontrar um programa em Iniciar - Todos os programas - Qt por Digia - Prompt de Comando Qt :


[ [ | { { https://i.imgur.com/BKhouBL.png } } ] ]


Demita -lo e ele vai olhar muito bem como uma caixa de DOS:


[ [ | { { https://i.imgur.com/JGDXB9V.png } } ] ]


Agora, já que não temos git neste nosso computador com Windows (você pode instalá-lo , se quiser, Cygwin é uma boa maneira de fazer isso ), você deve baixar o arquivo barcoin - master.zip de http://github.com/ barcoin e extraí-lo para o PC. Para este exemplo , vamos colocá-lo em c: \. Uma última coisa que precisamos fazer antes de compilar para Windows. Precisamos editar o arquivo " barcoin - qt.pro " para activar as bibliotecas do Windows , inclui, e ordenação correta para alguns a sintaxe:


'' ' barcoin / barcoin - qt.pro ''':
LINHAS 11-22 , descomente todas estas para ativar o Windows CONSTRÓI :
# windows : LIBS + = - lshlwapi
# LIBS + = $ $ join ( BOOST_LIB_PATH , -L , ) $ $ join ( BDB_LIB_PATH , -L , ) $ $ join ( OPENSSL_LIB_PATH , -L , ) $ $ join ( QRENCODE_LIB_PATH , -L , )
# LIBS + = - LSSL - lcrypto - ldb_cxx $ $ BDB_LIB_SUFFIX
# windows : LIBS + = - lws2_32 - lole32 - loleaut32 - luuid - lgdi32
# LIBS + = - lboost_system - mgw46 - mt- sd- 1_53 - lboost_filesystem - mgw46 - mt- sd- 1_53 - lboost_program_options - mgw46 - mt- sd- 1_53 - lboost_thread - mgw46 - mt- sd- 1_53
# BOOST_LIB_SUFFIX = - mgw46 - mt- sd- 1_53
# BOOST_INCLUDE_PATH = C :/ deps / impulso
# BOOST_LIB_PATH = C :/ deps / boost / estágio / lib
# BDB_INCLUDE_PATH = c :/ deps / db / build_unix
# BDB_LIB_PATH = c :/ deps / db / build_unix
# OPENSSL_INCLUDE_PATH = c :/ deps / ssl / include
# OPENSSL_LIB_PATH = c :/ deps / ssl


SE VOCÊ Construir o teu dependências , então também mudar os caminhos no arquivo acima para atender às suas localizações , utilize / em vez de \ , sim - sua estranha. Agora volte para a janela do Qt Shell de Comando e construir da mesma forma que nós construímos em outras plataformas :


c: \ Qt -Builder > cd \ barcoin -master \ src
c: \ barcoin -master \ src > qmake " USE_UPNP = - barcoin - qt.pro
c: \ barcoin -master \ src > make -f Makefile.Release


Espere um pouco ... e uma vez o seu feito , você vai encontrar uma pasta chamada " libertação " na pasta barcoin -master principal contendo o exe e um arquivo cpp . . :


[ [ | { { https://i.imgur.com/hR3PMJA.png } } ] ]


Isso não é suficiente para redistribuir , porém, para tornar o arquivo prazo você terá que incluir o QT e libs gcc junto com o arquivo . Eu colocá-los em um repositório git aqui: https://github.com/foocoin/windows-qt-addins.git Basta baixar os 6 arquivos e inseri-los no para a pasta "release" , juntamente com o exe e . . cpp :


[ [ | { { https://i.imgur.com/TApTWZ4.png } } ] ]


Para redistribuir , simplesmente renomear a pasta "release" e fechá-lo acima ! Agora você pode executar o arquivo exe no Windows. :


[ [ | { { https://i.imgur.com/14ZEXqN.png } } ] ]


Woah, hey olhe para isso, já temos um equilíbrio! Na verdade, eu tinha enviado a 10 BAR a este computador a partir do que eu deixei de mineração a noite toda. Se você não tem muitas conexões com a rede, você pode precisar adicionar uma linha como assim para o seu % AppData % \ barcoin \ barcoin.conf :


addnode = Endereço IP do nó SEED


Se você criou um nó semente, ele deve se conectar , mas se não , basta adicionar um nó. Uma vez que alguns clientes começar a conectar eles vão usar o IRC para conectar-se uns aos outros , de modo a addnode só deve ser necessário para as conexões iniciais da carteira.

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 07:46:13 PM
 #115

== வேடிக்கை மற்றும் இலாப Scrypt வீட்டு Altcoins குளோன் எப்படி ==


இரண்டாவது காத்திருக்க, ஏன் இரகசியங்களை கொடுக்க வேண்டும்? ? ஏனெனில் அதன் ஒரு இனி தவிர , ஏன் எல்லோரும் தங்கள் அண்டை இந்த தேவையில்லாத இன்னும் பரபரப்பான கணித பிட்கள் மிகுதியாக உருவாக்க முடியும் இரகசிய ? இந்த கட்டுரையில் தகவல் தொகுக்க ஒரு சில வாரங்களில் எடுத்து , என்னை நீங்கள் வேலை உத்தரவாதம் இல்லை என்ன வேலை. C நிரலாக்க மற்றும் ஒடுக்குவதற்கான மென்பொருள் பற்றி ஒரு பிட் அறிய ஒரு தொடக்க புள்ளியாக இந்த வழிகாட்டி பயன்படுத்த தயவு செய்து .


நான் தொழில்நுட்ப ஆதரவு செய்ய முடியாது - அது பற்றி எனக்கு கவலை உங்களுக்கு உரிமை இல்லை நீங்கள் வேலை செய்ய ஏதாவது பெற முடியாது தான் . தோண்டி , படிக்க போய், இன்னும் சில படிக்க . கிட்டத்தட்ட இந்த வழிகாட்டி எல்லாம் bitcointalk.org 'ன் altcoin மன்றத்தில் சில வடிவத்தில் அல்லது இன்னொரு வேலை . அது மற்ற உன்னிப்பாக சோதனை மற்றும் பிழை ஐ ஒரு ஆரோக்கியமான டோஸ் மூலம் கீழே கண்காணிக்கப்படும். விஷயங்களை நீங்கள் ஏன் கண்டுபிடிக்க மற்றும் அது வேலை செய்ய வேண்டும் , உடைக்க வேண்டும் என்று. இந்த வழிகாட்டி இறுதியில் நீங்கள் ஒரு வேலை நாணயம் , P2P (IRC) நெட்வொர்க், மற்றும் ( எளிதாக ) லினக்ஸ், மேக் ( ஒரு பிட் கடினமாக ) , மற்றும் விண்டோஸ் ( அட) வாடிக்கையாளர்களின் வேண்டும் .


=== நான் என்ன செய்ய வேண்டும்? ===


ஒரு Scrypt நாணயம் * மூல குறியீடு
* வேலை அறிவு மற்றும் லினக்ஸ் அல்லது மேக் கட்டளை வரி அணுகல் - நல்லெண்ணத்தோடு சிக்வின் காட்ட போவதில்லை , ஆனால் அதன் ஒத்த .
* 2 அல்லது அதற்கு மேற்பட்ட கணினிகளை அல்லது மெய்நிகர் இயந்திரங்கள் - நான் என் மடிக்கணினி மற்றும் டெபியன் wheezy சார்ந்த VPS பயன்படுத்தி.
* உரை திருத்தும் மென்பொருள் - வி மேக் TextWrangler பயன்படுத்தி , ஆனால் நெட்பீன்ஸுடன் , EmeraldEditor , அல்லது நானோ நன்றாக வேலை செய்யும் .
* நேரம் மற்றும் பொறுமை ...




இனிய பாவனையாளர்கள் !


=== கிட்ஹப் , மூல குறியீடு , மற்றும் லினக்ஸ் ===


==== மூல குறியீடு ====
முதல் முதல் விஷயங்கள் . நீங்கள் சில மூல குறியீடு வேண்டும் . நான் ( நான் இல்லை என்று) புதிதாக எழுத முடியும் என்பதில் சந்தேகம் என்பதால், நீங்கள் குளோன் மற்றும் மாற்ற வேண்டும் scrypt நாணயத்தை குடும்பத்தில் ஒரு bazillion வெவ்வேறு விருப்பங்கள் உள்ளன என்று மகிழ்ச்சியாக இருக்க வேண்டும் . என் முதல் நாணயங்கள் lightenup மூலம் , மிக சிறந்த ஆராய்ச்சி நாணயம் , SmallChange அடிப்படையாக கொண்டிருந்தன. அவரது சாமி வேறுபாடு வெளியீடு : https://github.com/bfroemel/smallcha...748f76a3d58326 முற்றிலும் உங்கள் சொந்த Alt- நாணயம் உருவாக்க கிட்டத்தட்ட போதுமான தகவல் உள்ளது போன்ற பாராட்டினார் வேண்டும் . ஆமாம், நான் அவரது குறியீடு வெறுமனே வெட்டி ஒட்டும் மாற்றங்கள் Litecoin ஆதாரமாக உள்ளது உணர்கிறேன் , ஆனால், ஹே - நாம் இங்கே பணிபுரிகிறோம் என்ன மற்றும் அவர் குறியீடு முழுவதும் சில சிறந்த கருத்துக்களை கூறினார் .


இந்த வழிகாட்டி எப்படி ' ல் foo'coin ' திரும்ப நீங்கள் காண்பிக்கும் https://github.com/foocoin/foocoin : இந்த பயிற்சி மற்றும் டிப்ஸ் குறியீடு ஒரு "சுத்தமான" நகல் பாதுகாக்க நோக்கங்களுக்காக, நான் foocoin உருவாக்கிய bar'coin நீங்கள் அங்கு இருந்து எடுத்து கொள்ளலாம் . நான் ஏற்கனவே இந்த நாணயம் தொகுக்க முடியும் நீங்கள் இந்த வழிகாட்டி செய்ய போதுமான மாறிவிட்டேன் . நீங்கள் உண்மையான SmallChange குறியீடு தொடங்க விரும்புகிறேன் என்றால், அது இங்கே இருக்கிறது : https://github.com/bfroemel/smallchange.git அல்லது நீங்கள் Litecoin , Franko , YAC , CHN , மேக்ஸ் என்ன ஆதாரம் பயன்படுத்த முடியும் - நாம் ' அது வேலை செய்ய போதுமான அது மாற்ற எல்எல்.


==== ==== ஒரு கிட்ஹப் கணக்கு அமைக்கவும்


இப்போது உங்கள் புதிய நாணயம் ஒரு அற்புதமாய் தனிப்பட்ட பெயர் கொண்டு வர ஒரு நல்ல நேரம் இருக்கும் . நீங்கள் https://github.com/insertcoinnamehere சென்று உங்கள் நாணயம் பெயர் கிடைக்கும் என்றால் பார்க்கலாம் . அது இல்லை என்றால் , வெறும் சேர்க்க திட்டம் அல்லது நகைச்சுவையாகவும் மற்றும் நம்பகத்தன்மை ஒருவேளை - இலாப நோக்கமற்ற அல்லது கூட்டமைப்பு , ஏற்றம் உங்கள் நாணயம் சில ஆர்வத்துடன் கொடுக்க வேண்டும் ஏதாவது :


[ [ | {{ https://i.imgur.com/8IxPN1X.png }}]]


ஏய், barcoin எடுத்து கொள்ளவில்லை , பார்க்க - சிறந்த வலது வரை அதை பறிக்க we'd ! வெறுமனே https://github.com சென்று நிரப்ப உள்ள வெற்றிடங்களை :


[ [ | {{ https://i.imgur.com/2KLsNXL.png }}]]


இப்போது, அந்த கவர்ச்சி மூல குறியீடு URL ஐ எல்லோரும் இருந்து மிகுதி சாமி என்று ஒன்று செய்ய முடிகிறது . தியானத்தினால் மிகுதி என்ன? நீங்கள் அதை செயலிழப்பு கிடைக்கும் , கவலைப்பட வேண்டாம் - ஆனால், நீங்கள் ஏற்கனவே புதிய விஷயங்களை கற்று வருகிறோம் . அடுத்த உங்கள் பயனர் பெயர் மேல் வலது கை மூலையில் உள்ள , கிளிக் " அநேகமாக : "


[ [ | {{ https://i.imgur.com/2xCXZfK.png }}]]


இப்போது வெற்றிடங்களை நிரப்ப :


[ [ | {{ https://i.imgur.com/7S9Z7Bv.png }}]]


பச்சை பொத்தானை மற்றும் voila செய்யவும், நீங்கள் கிட்ஹப் வேண்டும் . இப்போது இந்த தகவலை கவனத்தில் எடுத்து :


[ [ | {{ https://i.imgur.com/gXyQjh2.png }}]]


நாங்கள் திரும்பி போகிறோம், ஏனெனில் . சிறந்த இன்னும், புக்மார்க் உங்கள் உலாவியில் மற்றும் ஒரு புதிய தாவலை திறக்க .


==== லினக்ஸ், மேக் , சிக்வின் ====


ஆமாம், நீங்கள் அவர்களை ஒரு தேவை . இந்த பயிற்சியில் , நான் OSX 10.8.something மற்றும் டெபியன் Wheezy VPS ஒரு மேக்புக் பயன்படுத்தி. நான் நீங்கள் சிக்வின் பயன்படுத்த முடியும் என்று நினைக்கிறேன் , ஆனால் நான் எந்த நாள் விண்டோஸ் * நிக்ஸ் விரும்புகின்றனர் நீங்கள் , அதே உரிமை கூட , இன்னும் ஒரு விஷயம் பார்க்கவில்லையா? நீங்கள் ஏற்கனவே ஒரு VMWare அமர்வு இயக்க அமைக்க கட்டப்பட்ட சார்புகள் ஒரு நல்ல LiveCD வேண்டும் என்றால் , படம், [ [ CDEbian ]] முயற்சி . இல்லையென்றால், இந்த வழிகாட்டி மிக முக்கிய உருவங்களுடன் வேலை வேண்டும் என்றால் எந்த டெபியன் பயன்படுத்துகிறது (அதாவது : உபுண்டு , Xubuntu , புதினா) .


லினக்ஸ் அல்லது OSX ஒரு பிசி அல்லது VM அமைத்தல் இந்த பயிற்சியின் நோக்கம் வெளியே, ஆனால் நான் VMWare மற்றும் ஒரே நேரத்தில் பல VM கள் இயக்க அதன் திறனை மற்றும் OSX 10.6.x. மெய்நிகராக்குதலே அதன் திறனை உறுதிப்படுத்த முடியும் என்று போதுமானதாக நீங்கள் எப்போதும் OS நீங்கள் டெமான் மற்றும் க்யூடி பணப்பை உருவாக்க முடியும் தேர்வு சில சார்புகளை நிறுவவும் வேண்டும் .


==== OSX சார்புகளை ====


நான் OSX மீது சார்புகளை நிறுவவும் கண்டுபிடித்துள்ளேன் எளிதான வழி MacPorts அல்லது homebrew பயன்பாடு ஆகும் . தனிப்பட்ட முறையில், நான் Homebrew விட MacPorts விரும்புகிறேன், ஆனால் MacPorts உலகளாவிய இயல்பாக உருவாக்குகிறார் வழங்குகிறது ஏனெனில் அதன் MacPorts ( நான் அதை போக வேண்டும் என்று நினைக்கிறேன் அங்கு ) / விலகல் நிறுவி வெறுமனே ஏனெனில் . நீங்கள் Homebrew விரும்பினால், சூத்திரங்கள் உள்ளன, ஆனால் நான் கட்டி பரிந்துரைக்கிறோம் என்று - 32 பிட் கொடி . இந்த பயிற்சியின் நோக்கம், நாம் MacPorts பயன்படுத்த போகிறோம் .


ஒரு பின்வரும் சார்புகளை நிறுவவும் வேண்டும் :
* ஊக்கத்தை ( C + + நூலகங்கள் )
* db48 ( Berkeley DB 4 .
* Qt4 மேக் ( திறந்த மூல க்யூடி 4.8.4 , qmake அடங்கும் )
* OpenSSL ( SSL dev நூலகங்கள் )
* சாமி ( முன்னும் பின்னுமாக களஞ்சியமாக மூல செல்ல )
* miniupnpc ( UPnP dev நூலகங்கள் , விருப்ப - நேர்மையாக நான் இந்த தனம் தவிர்க்க சொல்கிறேன் )


OSX உங்கள் பதிப்பு அடிப்படை MacPorts நிறுவிய பின்னர் , இந்த கட்டளையை நிறைவேற்ற முடியும் :
% சூடோ துறைமுக ஊக்கத்தை db48 Qt4 மேக் openssl miniupnpc சாமி நிறுவ
சார்புகளை அனைத்து கட்டப்பட்டது மற்றும் நிறுவப்பட்ட முறை, அடுத்த சாமி இருந்து மூல குளோன் செய்ய இருக்கிறது . இந்த எடுத்துக்காட்டாக, நான் அதை மறுபெயர் , மீண்டும் சாமி அதை துவக்க , மற்றும் தியானத்தினால் வேலை உறுதி கிட்ஹப் வெளியே ஆரம்ப பிரதியை தள்ள , foocoin குளோனிங்:
% சாமி குளோன் https://github.com/foocoin/foocoin.git
foocoin உள்ள குளோனிங்
% எம்.வி. foocoin barcoin
% குறுவட்டு barcoin
% RM -RF . சாமி
% git init
~ / barcoin உள்ள சாமி களஞ்சியமாக ஆரம்பிக்கும்
% தியானத்தினால் கூடுதல் ஒரு *
% சாமி விவகாரங் மீ " முதல் உறுதி "
% தோற்றம் சேர்க்க தொலை சாமி https://github.com/barcoin/barcoin.git
% சாமி மிகுதி -U தோற்றம் மாஸ்டர்
barcoin : git@github.com பயனர்பெயர்
barcoin@github.com கடவுச்சொல்லை : **********


இப்போது நாம் என்ன செய்வது ? நாம் , தற்போதுள்ள மூல க்ளான் தியானத்தினால் அதன் இணைப்பு நீக்கப்பட்டது , கிட்ஹப் கோப்புறையை reinitialized , களஞ்சியத்திற்கு அனைத்து இருக்கும் கோப்புறைகள் மற்றும் கோப்புகளை சேர்க்க, அவர்களுக்கு நிரந்தர மற்றும் "மாஸ்டர்" கிளை அவற்றை செய்து ( எங்கள் மாற்றங்களை உறுதி , அது பெயர் மாற்றம் ஆனால் * புதிய * நாணயம் கணக்கில் , நீங்கள் போய் உங்கள் பக்கம் பார் இப்போது அது இருக்க வேண்டும் கிட்ஹப் வெளியே ஒரு பிரதியை தள்ளி - எங்கள் புதிய * பெரிய * நல்ல * வேகமாக நாணயம் , கிட்ஹப் இணைக்க மீண்டும் அது அமைந்தது . போன்ற :


[ [ | {{ https://i.imgur.com/hQm9qn9.png }}]]


ஓ, மாற்றி அமைக்கப்படும் காத்திருக்கிறது என்று புதிய மூல குறியீடு பாருங்கள் .


==== லினக்ஸ் சார்புகளை ====


டெபியன் சார்ந்த லினக்ஸ் , சார்புகள் மற்றும் உருவாக்க தேவைகள் மிகவும் போன்ற ஒரு ஒற்றை கட்டளையை நிறுவ முடியும் :
$ sudo apt-get சூடோ நிறுவ apt-get உருவாக்க அத்தியாவசிய நிறுவ libboost அனைத்து dev libcurl4 - openssl -dev libdb5.1 -dev libdb5.1 + -dev சாமி Qt - SDK libminiupnpc -dev
பொருத்தமான மிகவும் புத்திசாலி இந்த அனைத்து தேவையான தொகுப்புகளை நிறுவ வேண்டும் . முழு ஒருமுறை, மேலே அதே பிட்கள் பயன்படுத்த வேண்டும் :
தியானத்தினால் குளோன் https://github.com/foocoin/foocoin.git
foocoin உள்ள குளோனிங்
$ எம்.வி. foocoin barcoin
$ குறுவட்டு barcoin
$ RM -RF . சாமி
தியானத்தினால் ஆரம்பம்
~ / barcoin உள்ள சாமி களஞ்சியமாக ஆரம்பிக்கும்
தியானத்தினால் சேர்க்க ஒரு *
தியானத்தினால் விவகாரங் மீ " முதல் உறுதி "
தியானத்தினால் தொலை தோற்றம் சேர்க்க https://github.com/barcoin/barcoin.git
தியானத்தினால் மிகுதி -U தோற்றம் மாஸ்டர்
barcoin : git@github.com பயனர்பெயர்
barcoin@github.com கடவுச்சொல்லை : **********


==== விண்டோஸ் சார்புகளை ====


ஹும் , நான் நீங்கள் கேட்க விரும்புகிறேன் தெரியும் . விண்டோஸ் குனு toolchain கொண்டு கட்டி வரும் போது அது இருக்க வேண்டும் விட tricker உள்ளது. முதல், நீங்கள் நிறுவப்பட்ட mingw32 மேலே பட்டியலிடப்பட்டுள்ள பொருட்களை ஒவ்வொரு கை கட்டப்பட்ட சார்புகளை வேண்டும் . நீங்கள் அந்த சார்ந்ததாகும் இடம் உங்கள் - qt.pro கோப்பு தனிப்பயனாக்க வேண்டும் . இந்த எளிமைப்படுத்த வேண்டும், நான் ஏற்கனவே தொகுக்கப்பட்ட மற்றும் நீங்கள் ஒரு நல்ல கிட்ஹப் களஞ்சியம் செய்ய தேவை சார்புகளை கூடியிருந்த. அல்லது பதிவிறக்கம் மற்றும் சி என பிரித்தெடுக்கப்படும் என்றால் : \ deps அல்லது C க்ளான் சாமி : \ , இந்த pacakge : https://github.com/foocoin/deps.git நீங்கள் ஆதாரமாக பயன்படுத்தி foo ( பார்) நாணயம் உருவாக்க வேண்டும் எல்லாம் கொடுக்கும் நீங்கள் ஏற்கனவே கிடைத்துவிட்டது . நாங்கள் திட்டத்தில் சேர்த்து மேலும் ஒரு சிறிய விண்டோஸ் வாடிக்கையாளர் தொகுப்பு பிட் கிடைக்கும் போது நீண்ட வழி கட்டிடம் பற்றி மேலும் .


இப்போது நீங்கள் வெட்டி ஒட்டு தயார்!
=== தேடல் மற்றும் பதிலாக ===


ஆ, இப்போது நாம் ஆக்கப்பூர்வமான பகுதியாக வந்தேன் . நீங்கள் உங்கள் நாணயம் உன் செய்ய மாற்ற விரும்பும் விஷயங்களை மாற்ற அங்கு பிட் . இந்த ஒரு * குளோனிங் * பயிற்சி என, நான் ( நான் தகுதி இல்லை ) நிரலாக்க சிக்கல்களை கவனம் செலுத்த போவதில்லை. நான் வெறுமனே நீங்கள் வரை இயங்கும் ஒரு நாணயத்தின் பெற செய்ய வேண்டும் மாற்றங்களை செய்ய நீங்கள் காட்ட போகிறேன் . இந்த நடவடிக்கை , நான் உண்மையில் என் மேக் TextWrangler விரும்புகிறேன் . இது பல கோப்பு தேடி செயல்முறை இந்த பகுதியை மிக விரைவாக செல்ல எதில் பதிலாக அனுமதிக்கிறது . நீங்கள் எப்படியும் மேக் பணப்பைகளையும் - க்யூடி உருவாக்க ஒரு VM அமைக்க போகிறோம் என்றால், நீங்கள் / வெறுமனே மேலே சார்புகளை நிறுவவும் மற்றும் முற்றிலும் OSX உள்ள உருவாக்க. TextWrangler இலவச ஆகிறது .


==== பெயர்கள் ====


TextWrangler நீங்கள் கோப்புகளை முழு கோப்புறை திறக்க அனுமதிக்கும் . தான் திட்டம் திறக்க மற்றும் கோப்பு , திறந்த , " barcoin " கோப்புறையை முன்னிலைப்படுத்த மற்றும் திறந்த கிளிக் செய்யவும்:


[ [ | {{ https://i.imgur.com/kC106go.png }}]]


ஆ, , நல்ல இடைமுகம் பயன்படுத்த எளிதான ஒரு குறியீடு அனைத்து . மிக நிச்சயமாக இந்த கோப்புகள் திருத்தும் நானோ அல்லது நெட்பீன்ஸுடன் , அல்லது மற்ற எந்த உரை ஆசிரியர் மூலம் செய்ய முடியும் என்று , எச்சரிக்கையாக இருக்க வேண்டும், கூட எதாவது நான் நினைக்கிறேன் . இந்த அடுத்த அம்சம் தருவீர் இந்த ஒரு , ' நான் . இப்போது நாம் நமது மூல " FooCoin , foocoin , மற்றும் FOOCOIN " அனைத்து நிகழ்வுகளையும் மாற்ற வேண்டும் " BarCoin , barcoin , மற்றும் BARCOIN . " 3 வெவ்வேறு வழக்கு அமைப்புகளை குறிப்பு - மிகவும் குறியீடு அது அனைத்து மூன்று உள்ளது. TextWrangler இந்த மாற்ற, தேடல் , பின்னர் பல கோப்பு தேடல் தேர்வு மற்றும் " barcoin " அடைவு தேர்வு :


[ [ | {{ https://i.imgur.com/fTJKnc7.png }}]]


மூன்று வழக்கு அமைப்புகள் இதை செய் , அல்லது நீங்கள் eecummings பாணி விரும்பினால் , ஒரு திடீர்த்தாக்குதல் தோல்வி உட்புகுதல் " வழக்கில் முக்கிய " பெட்டியில் இல்லாமல் அனைத்து அவர்களுக்கு பதிலாக . TextWrangler நீங்கள் மாற்றம் கோப்புகளை முழு பட்டியல் காட்டும் மற்றும் நீங்கள் ஒருமுறை நிறைவு மாற்றங்கள் உலவ அனுமதிக்க:


[ [ | {{ https://i.imgur.com/tJpf9LD.png }}]]


நீங்கள் கூட "foo" அனைத்து நிகழ்வுகளையும் மாற்ற வேண்டும் "பார் . " இந்த BTC அல்லது PPC போன்ற , உங்கள் நாணயம் 3 கடிதம் பெயர்களில் உள்ளது. இறுதியாக, நீங்கள் கைமுறையாக முக்கிய ஆதாரமாக கோப்புறையில் foocoin - qt.pro பெயர் மாற்ற வேண்டும் . ஏய் ... இந்த , ஒன்றாக வர தொடங்கி உள்ளது?


==== துறைமுகங்கள் மற்றும் நெட்வொர்க் மாற்றங்கள் ====


சரி, இப்போது நாம் புதிய நாணயம் பயன்படுத்த ஒரு தனிப்பட்ட துறைமுக வரை கொடுக்க வேண்டும் . நீங்கள் இரண்டு துறைமுகங்கள் , வேனல் இணைப்புகளை ஒரு ( சுரங்க இணைக்க ) மற்றும் P2P இணைப்புகள் ஒரு வேண்டும் . நீங்கள் இங்கே முன்பதிவு துறைமுகங்கள் ஒரு நல்ல பட்டியலை காணலாம் : http://en.wikipedia.org/wiki/List_of...P_port_numbers மிக எந்த துறைமுகங்கள் அவர்கள் 1 அனுமானித்து வேலை செய்யும் : போர்ட் 1024 மற்றும் 2 ஓவர் : வேறு ஏதாவது ப&#

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 18, 2013, 11:36:22 PM
 #116

I need someone to make me a SHA-256 coin after Christmas Can anyone here do that?

Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 19, 2013, 06:12:21 PM
 #117

Does anyone have plans for any China based coins

Neotox
Legendary
*
Offline Offline

Activity: 1120
Merit: 1000


Free & Fast Neotox Escrow http://bit.ly/1OGVykp


View Profile WWW
December 19, 2013, 06:30:30 PM
 #118

We will be launching a new coin that will have something unique then other coins in the market

if anyone want to partner up then contact me

Available
PM me to rent this space.
Bitcoin-hotep (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 253


View Profile
December 19, 2013, 09:09:37 PM
 #119

We will be launching a new coin that will have something unique then other coins in the market

if anyone want to partner up then contact me

I posted in your thread I think

andrewboy44
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250



View Profile
December 20, 2013, 12:53:11 AM
 #120

Also I go to the University of Texas and I would like to make a "UTC" if anyone is interested

It would catch on so fast here we already have a pretty solid bitcoin community and that would make it explode

haha I took some time and made this coin just for the  fun of it. The wallet says out of sync because I had no addnodes to host this coin for you. You would need to find someone else to do that for you. But I built the coin, and can change whatever you want. Just send me a pm. 
Pages: « 1 2 3 4 5 [6] 7 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!