Enviroment: MacOS
Assume reader has basic understanding of geth and ethereum.
Create a Ethereum Wallet
We can via myetherwallet
to create a wallet.
https://www.myetherwallet.com/#generate-wallet
Record your privakey, pubkey:
1 | private key: a406da76baa7c741ad28bfe87cef2133950d6bb6bcaaf0b1742d93c3bea56bab |
Because we are going to connect the testnet Rospen
, we should do some stuff…
- Get a ether from faucet:
For simplicity, we just ask someone to send some ether on testnet to us. Please attach your account address to get some ether.
- Check Tx from
Rospen
network
https://ropsten.etherscan.io/address/0x6508a973F080A9042a29d13925d9DB006f8c2989
In serch bar, enter your account address to see whether if the ether is sending to your account or not.
Start to build a node and synchronize the Rospen
network.
Current version : Version: 1.8.7-stable
Before sync the node , Put your keystore file in the testnet document.
When you download your keystore file.
For example, the filename will be:
UTC--2018-05-13T04-05-37.569Z--2c58e0338435fe91fd2209105ecadebe8aafcebb
Copy this file into your testnet key store:
/User/Library/Ethereum/testnet/keystore
Sync to the Rospen network
https://github.com/ethereum/ropsten
1 | geth --unlock <account> --testnet --syncmode "full" "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" |
Threre are some flags:
- –unlock
: use password to unlock the account. - –testnet: connect to the rospen network.
- –syncmode “full”: in order to get our balances, we should synchronize whole blocks.
1 | geth --testnet --fast --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" |
If we already sync the entire network, we can just use
--fast --bootnodes
to connect testnet…
Attach your geth
On MacOS (for testnet):
geth attach ipc:/Users/<username>/Library/Ethereum/testnet/geth.ipc
Then, in the console do eth.syncing
you will see those stuff:
1 | > eth.syncing |
That means you are sucessfully connecting the testnet.
After finish syncing process, you can see there is some ether in your accounts
Problem for connecting the ropsten network
https://stackoverflow.com/questions/49195614/connection-failed-to-ethereum-ropsten-testnet-network
Deploy to rospen network toturial:
https://michalzalecki.com/deploying-smart-contracts-with-truffle/