== 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.gitclonage 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.gitclonage 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.gitclonage 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_listD'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.confXcode % 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.gzInstallez-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.gzInstallez-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 .