| ... | ... | @@ -13,13 +13,9 @@ mdp Ubuntu : romain |
|
|
|
Ajout des dépôts d’ethereum
|
|
|
|
|
|
|
|
`sudo apt-get update`
|
|
|
|
|
|
|
|
`sudo apt-get install -y software-properties-common`
|
|
|
|
|
|
|
|
`sudo add-apt-repository -y ppa:ethereum/ethereum`
|
|
|
|
|
|
|
|
`sudo add-apt-repository -y ppa:ethereum/ethereum-dev`
|
|
|
|
|
|
|
|
`sudo apt-get update`
|
|
|
|
|
|
|
|
Mot de passe : romain
|
| ... | ... | @@ -36,38 +32,22 @@ Il faut créer un fichier sous l’extention « .json », dans notre cas ce sera |
|
|
|
|
|
|
|
Nous entrons les configurations suivantes :
|
|
|
|
|
|
|
|
`{
|
|
|
|
|
|
|
|
"nonce": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
|
|
|
|
|
|
"difficulty": "0x1000",
|
|
|
|
|
|
|
|
"alloc": {},
|
|
|
|
|
|
|
|
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
|
|
|
|
|
|
"timestamp": "0x00",
|
|
|
|
|
|
|
|
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
|
|
|
|
|
|
"extraData": "0x00",
|
|
|
|
|
|
|
|
"gasLimit": "0x1000000000",
|
|
|
|
|
|
|
|
"config": {
|
|
|
|
|
|
|
|
"chainId": 100,
|
|
|
|
|
|
|
|
"homesteadBlock": 0,
|
|
|
|
|
|
|
|
"eip155Block": 0,
|
|
|
|
|
|
|
|
"eip158Block": 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
`
|
|
|
|
`{`
|
|
|
|
`"nonce": "0x0000000000000000000000000000000000000000000000000000000000000000",`
|
|
|
|
`"difficulty": "0x1000",`
|
|
|
|
`"alloc": {},`
|
|
|
|
`"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",`
|
|
|
|
`"timestamp": "0x00",`
|
|
|
|
`"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",`
|
|
|
|
`"extraData": "0x00",`
|
|
|
|
`"gasLimit": "0x1000000000",`
|
|
|
|
`"config": {`
|
|
|
|
` "chainId": 100,`
|
|
|
|
` "homesteadBlock": 0,`
|
|
|
|
` "eip155Block": 0,`
|
|
|
|
` "eip158Block": 0`
|
|
|
|
`}`
|
|
|
|
`}`
|
|
|
|
|
|
|
|
Plusieurs paramètres sont à renseigner :
|
|
|
|
|
| ... | ... | @@ -91,7 +71,6 @@ Plusieurs paramètres sont à renseigner : |
|
|
|
Nous entrons la commande suivante :
|
|
|
|
|
|
|
|
`geth --datadir BlockChain/NodeA/ init BlockChain/NodeA/genesis.json`
|
|
|
|
|
|
|
|
`geth --datadir ./NodeA --networkid "100" init genesis.json`
|
|
|
|
|
|
|
|
**Génération du block Genesis pour le NodeB**
|
| ... | ... | @@ -99,7 +78,6 @@ Nous entrons la commande suivante : |
|
|
|
Nous entrons la commande suivante :
|
|
|
|
|
|
|
|
`geth --datadir Private/NodeB/ init Private/NodeB/genesis.json`
|
|
|
|
|
|
|
|
`geth --datadir ./NodeB --networkid "100" init genesis.json`
|
|
|
|
|
|
|
|
**Création du compte pour le NodeA**
|
| ... | ... | @@ -163,7 +141,6 @@ Entrer la commande suivante : |
|
|
|
Sur le NodeB on entre la commande suivante :
|
|
|
|
|
|
|
|
`admin.addPeer({enode du nœud sur lequel se connecter})`
|
|
|
|
|
|
|
|
`admin.peers`
|
|
|
|
|
|
|
|
**Transaction de A vers B**
|
| ... | ... | @@ -171,5 +148,4 @@ Sur le NodeB on entre la commande suivante : |
|
|
|
Sur le NodeA on entre les commandes suivantes :
|
|
|
|
|
|
|
|
`personal.unlockAccount(eth.accounts[0],"romain",60)`
|
|
|
|
|
|
|
|
`eth.sendTransaction({from:eth.accounts[0],to:"88e9ee3093089e23ac4fac6924bf87ee82c3c8e1",value: web3.toWei(1,"ether")})` |