avatarKeno Leon

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

4642

Abstract

ol">Notes:</span></pre></div><div id="2052"><pre><span class="hljs-comment">--fast --cache=512 and console are convenience options for speed and starting the interactive js environment. --fast in particular does not download the whole blockchain, but a recent state, it will still take many hours.</span></pre></div><div id="8cfd"><pre><span class="hljs-keyword">To</span> <span class="hljs-keyword">disconnect</span>: Ctrl-C.</pre></div><p id="6f8e"><i>Detailed instructions: <a href="https://github.com/ethereum/go-ethereum">https://github.com/ethereum/go-ethereum</a></i></p><p id="7cf2"><b>Initial Sync:</b></p><p id="0bee"><i>It sucks.</i></p><div id="4d7f"><pre>Note: to see your progress syncing,<span class="hljs-built_in"> check </span>the last block in the test net block chain ( ropsten revival in this case ) in the block explorer ( https://ropsten.etherscan.io/ )<span class="hljs-built_in"> or </span>your chosen blockchain.</pre></div><div id="d69a"><pre>Note <span class="hljs-literal">on</span> the note: <span class="hljs-literal">it</span> <span class="hljs-keyword">is</span> called ropsten revival because the original testnet got attacked,<span class="hljs-literal">it</span> died, this <span class="hljs-keyword">is</span> the <span class="hljs-keyword">new</span> revived one. More here...</pre></div><p id="03d0">Things I tried:</p><ul><li>Download the testnet blockchain on the ethereum wallet…My laptops punny ssd cried about space, ( the blockchain was about 30+ GB ).</li><li><b>Light Client Mode: </b>An experimental mode which downsizes the blockchain, this worked (sometimes ) in OSX, but as of this writing has issues interacting with the ethereum wallet, sigh.</li></ul><div id="e3f0"><pre>geth — <span class="hljs-keyword">syncmode </span>“light” — testnet </pre></div><ul><li><b>Parity: </b>Another ethereum client/browser for running Dapps.</li></ul><div id="1e4f"><pre><span class="hljs-symbol">Sources:</span></pre></div><div id="5113"><pre><span class="hljs-symbol">https:</span><span class="hljs-comment">//parity.io</span></pre></div><div id="dd96"><pre>https:<span class="hljs-regexp">//gi</span>thub.com<span class="hljs-regexp">/paritytech/</span>parity</pre></div><p id="2a82"><b>Usage:</b></p><div id="49b9"><pre><span class="hljs-built_in">parity</span> --chain ropsten <span class="hljs-built_in">parity</span> ui </pre></div><div id="4801"><pre>The <span class="hljs-keyword">last</span> one launches <span class="hljs-keyword">the</span> Browser UI ( which didn't work <span class="hljs-keyword">on</span> safari <span class="hljs-keyword">in</span> <span class="hljs-keyword">my</span> case )</pre></div><p id="4a7c">The good news is that syncing is a breeze on parity, the bad news is that it doesn’t come with a miner, we still need some ether for our contracts, so</p><p id="1019"><b>Mining :</b></p><div id="1f59"><pre><span class="hljs-attribute">TRY</span> <span class="hljs-number">1</span> ( <span class="hljs-literal">On</span> osx)</pre></div><div id="3e3b"><pre>Get <span class="hljs-keyword">a</span> miner <span class="hljs-keyword">and</span> install <span class="hljs-keyword">it</span>:</pre></div><div id="aa77"><pre>https:<span class="hljs-regexp">//gi</span>thub.com<span class="hljs-regexp">/ethereum-mining/</span>ethminer</pre></div><div id="b30c"><pre>restart parity <span class="hljs-keyword">with</span> <span class="hljs-keyword">the</span> author flag (so you can <span class="hljs-keyword">get</span> send <span class="hljs-keyword">some</span> ether <span class="hljs-keyword">to</span> <span class="hljs-keyword">that</span> address:</pre></div><div id="6d53"><pre><span class="hljs-comment"> parity</span> <span class="hljs-literal">--</span><span class="hljs-comment">author 0x002b17A** Your Address **46F5a</span> <span class="hljs-literal">--</span> <span class="hljs-comment">chain ropsten</span></pre></div><div id="a1ec"><pre><span class="hljs-keyword">And</span> fire up your miner:</pre></div><div id="c5cd"><pre><span class="hljs-variable"> </span>ethminer -G</pre></div><div id="c9f7"><pre>Resul<span class="hljs-symbol">ts:</span> Inconclusive ( couldn'<span class="hljs-built_in">t</span> mine, probably didn'<span class="hljs-built_in">t</span> gave it enough <span class="hljs-built_in">time</span>, DAG supposedly takes a <span class="hljs-built_in">day</span> <span class="hljs-built_in">or</span> so)</pre></div><div id="bc8b"><pre><span class="hljs-keyword">TRY</span> <span class="hljs-number">2</span> (<span class="hljs-keyword">On</span> a pc-windows <span class="hljs-keyword">with</span> a better HD overnight <span class="hljs-keywo

Options

rd">on</span> geth)</pre></div><div id="fcb4"><pre>Sync <span class="hljs-keyword">in</span> fast <span class="hljs-built_in">mode</span> </pre></div><div id="789e"><pre><span class="hljs-symbol">Mine:</span></pre></div><div id="50cb"><pre>> <span class="hljs-comment">geth</span> <span class="hljs-literal">--</span><span class="hljs-comment">testnet</span> <span class="hljs-literal">--</span><span class="hljs-comment">mine</span> <span class="hljs-literal">--</span><span class="hljs-comment">minerthreads 1</span></pre></div><div id="93d4"><pre><span class="hljs-symbol">Results:</span> No ether, turns out you can<span class="hljs-comment">'t mine my chosen testnet (ropsten) without a beefy gpu, you might have a better result.</span></pre></div><div id="f8f7"><pre><span class="hljs-keyword">TRY</span> <span class="hljs-number">3</span> (<span class="hljs-keyword">with</span> a pool) http:<span class="hljs-comment">//pool.ropsten.ethereum.org:</span></pre></div><div id="07aa"><pre>Resulst: Mined <span class="hljs-keyword">for</span> hours did not got <span class="hljs-built_in">any</span> ether.</pre></div><p id="e0ec"><b>Faucets : </b>Not having had much luck getting test ether via mining, the faucets while scant and ever changing are your friends, <a href="http://faucet.ropsten.be:3001">this one</a>: <i>( <a href="http://faucet.ropsten.be:3001">http://faucet.ropsten.be:3001</a> ) </i>gave me<b> 3 (three) </b>precious test ethers !</p><p id="e85e"><b>Switching to Kovan + Parity</b></p><p id="2857">While I did get a setup going with geth-mist, I wasn't all that great, maybe in the future, so I decided to try another stack that was recommended to me, kovan+ parity.</p><p id="445b"><a href="https://kovan-testnet.github.io/website/"><b>Kovan Site/Info</b></a>: <a href="https://kovan-testnet.github.io/website/">https://kovan-testnet.github.io/website/</a></p><p id="bb85"><a href="https://github.com/kovan-testnet/faucet"><b>Kovan Fauctes</b></a>: <a href="https://github.com/kovan-testnet/faucet">https://github.com/kovan-testnet/faucet</a></p><p id="6045">Right off the bat syncing took like 5 minutes with parity, signing up for a daily test ether faucet a couple more, while I didn't try all the combinations, I think this is the best so far although it does have some bugs ( didn't work on safari ) and the UI/UX is challenging.</p><p id="feba">you can try the other ways if you want to learn, but this was the fast simple one for me.</p><figure id="dcd0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*JrdK16CuxC1d0HS8jjivgA.jpeg"><figcaption></figcaption></figure><p id="4017"><b>Things I didn't try: </b>You can mix an match wallets/syncing ways and testnets, and more will probably be available in the future, you can also make your own private blockchain, but for getting started that seems overkill.</p><p id="8c35"><b>What’s next ?: </b>Once you are comfortable with interacting with wallets, command line tools and testnets you are mostly on your way to developing on the ethereum blockchain, mind you this took me a week and as mentioned is fast changing and we have yet to write any code, that will be the next part.</p><p id="d759"><b>PART 2</b> (web3.js) : <a href="https://readmedium.com/ethereum-tokens-smart-contracts-a263b43d4c54">https://readmedium.com/ethereum-tokens-smart-contracts-a263b43d4c54</a></p><figure id="2ada"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*mtIpI9lIZdbye5giXJKB5Q.jpeg"><figcaption></figcaption></figure><div id="461d"><pre><span class="hljs-function"><span class="hljs-title">Hey</span></span>, These notes were polished <span class="hljs-keyword">and</span> made into a book... </pre></div><div id="a315"><pre>If you are looking <span class="hljs-keyword">for</span> <span class="hljs-keyword">an</span> introduction <span class="hljs-built_in">to</span> Ethereum, Solidity <span class="hljs-keyword">and</span> Smart Contracts I just published <span class="hljs-keyword">an</span> eBook <span class="hljs-keyword">and</span> print Book <span class="hljs-keyword">on</span> <span class="hljs-title">getting</span> <span class="hljs-title">started</span>:</pre></div><div id="2ba9"><pre>https:<span class="hljs-regexp">//</span>www.amazon.com<span class="hljs-regexp">/dp/</span>B078CQ8L7V</pre></div><p id="68a6">Cheers !</p><p id="2735">Keno</p><p id="c98a"><b>About the Author :</b></p><p id="14ec"><i>Born Eugenio Noyola Leon (Keno) I am a Designer,Web Developer/programmer, Artist and Inventor, currently living in Mexico City, you can find me at <a href="http://www.k3no.com">www.k3no.com</a></i></p></article></body>

Ethereum, tokens & smart contracts.

Notes on getting started Part 1. Setting Up.

Read till the end if you want to save a week in developing time !

Before starting:

A basic understanding of cryptocurrencies, programming languages and development practices (github, npm, terminal etc) seems to be a prerequisite, but if you’ve done any software or tech development you know that learning on the job is the norm, else just research on your own whenever you see a strange or new concept or term.

Also note, this space is fast changing, this guide might not be up to date in a few month but hopefully will be an indication of what to look for and where.

Where to start:

Setting up:

( One way of doing it, you could of course go in a different path )

In order to make a development environment you need a few things.

1.Command line tools: https://ethereum.org/cli, there are a few to choose from.

I went with geth for iOS, seems to be the popular entry level one.
Install instructions:
https://ethereum.gitbooks.io/frontier-guide/content/installing_mac.html
Don't forget to set up your etherbase ( Account ) with
$ geth account new 
Alternatively you can do it via the wallet:

2. Ethereum wallet: The official ethereum wallet, it also has tools for launching contracts and tokens ( our goal here ), while you can do everything with the command line tools, it has an UI for balances, accounts etc,etc, which makes thing easier and nicer to work with.

Note on terminology/stack: Mist is the browser for decentralized web apps, and the ethereum wallet is a Decentralized Application ( DApp ), it is also called Meteor DApp Wallet. More here...

3. Testnets:

The first catch is that of test nets , in a nutshell rather than deploy your contracts in the real Ethereum network ( which costs money ) it is preferable to do it on a testnet which recreates the ethereum blockchain and allows you to test how your contracts and code perform against it for free. They come in 2 flavors:

  • Public : Online, a few to choose from: Ropsten, Rinkeby, Kovan for now.
  • Private : On your own computer.

Connecting to a testnet ( default is Ropsten):

$ geth --testnet --fast --cache=512 console 
Notes:
--fast --cache=512 and console are convenience options for speed and starting the interactive js environment. --fast in particular does not download the whole blockchain, but a recent state, it will still take many hours.
To disconnect: Ctrl-C.

Detailed instructions: https://github.com/ethereum/go-ethereum

Initial Sync:

It sucks.

Note: to see your progress syncing, check the last block in the test net block chain ( ropsten revival in this case ) in the block explorer ( https://ropsten.etherscan.io/ ) or your chosen blockchain.
Note on the note: it is called ropsten revival because the original testnet got attacked,it died, this is the new revived one. More here...

Things I tried:

  • Download the testnet blockchain on the ethereum wallet…My laptops punny ssd cried about space, ( the blockchain was about 30+ GB ).
  • Light Client Mode: An experimental mode which downsizes the blockchain, this worked (sometimes ) in OSX, but as of this writing has issues interacting with the ethereum wallet, sigh.
geth — syncmode “light” — testnet 
  • Parity: Another ethereum client/browser for running Dapps.
Sources:
https://parity.io
https://github.com/paritytech/parity

Usage:

parity --chain ropsten
parity ui 
The last one launches the Browser UI ( which didn't work on safari in my case )

The good news is that syncing is a breeze on parity, the bad news is that it doesn’t come with a miner, we still need some ether for our contracts, so

Mining :

TRY 1 ( On osx)
Get a miner and install it:
https://github.com/ethereum-mining/ethminer
restart parity with the author flag (so you can get send some ether to that address:
$ parity --author 0x002b17A** Your Address **46F5a -- chain ropsten
And fire up your miner:
$ ethminer -G
Results: Inconclusive ( couldn't mine, probably didn't gave it enough time, DAG supposedly takes a day or so)
TRY 2 (On a pc-windows with a better HD overnight on geth)
Sync in fast mode 
Mine:
> geth --testnet --mine --minerthreads 1
Results: No ether,  turns out you can't mine my chosen testnet (ropsten) without a beefy gpu, you might have a better result.
TRY 3 (with a pool) http://pool.ropsten.ethereum.org:
Resulst: Mined for hours did not got any ether.

Faucets : Not having had much luck getting test ether via mining, the faucets while scant and ever changing are your friends, this one: ( http://faucet.ropsten.be:3001 ) gave me 3 (three) precious test ethers !

Switching to Kovan + Parity

While I did get a setup going with geth-mist, I wasn't all that great, maybe in the future, so I decided to try another stack that was recommended to me, kovan+ parity.

Kovan Site/Info: https://kovan-testnet.github.io/website/

Kovan Fauctes: https://github.com/kovan-testnet/faucet

Right off the bat syncing took like 5 minutes with parity, signing up for a daily test ether faucet a couple more, while I didn't try all the combinations, I think this is the best so far although it does have some bugs ( didn't work on safari ) and the UI/UX is challenging.

you can try the other ways if you want to learn, but this was the fast simple one for me.

Things I didn't try: You can mix an match wallets/syncing ways and testnets, and more will probably be available in the future, you can also make your own private blockchain, but for getting started that seems overkill.

What’s next ?: Once you are comfortable with interacting with wallets, command line tools and testnets you are mostly on your way to developing on the ethereum blockchain, mind you this took me a week and as mentioned is fast changing and we have yet to write any code, that will be the next part.

PART 2 (web3.js) : https://readmedium.com/ethereum-tokens-smart-contracts-a263b43d4c54

Hey, These notes were polished and made into a book... 
If you are looking for an introduction to Ethereum, Solidity and Smart Contracts I just published an eBook and print Book on getting started:
https://www.amazon.com/dp/B078CQ8L7V

Cheers !

Keno

About the Author :

Born Eugenio Noyola Leon (Keno) I am a Designer,Web Developer/programmer, Artist and Inventor, currently living in Mexico City, you can find me at www.k3no.com

Ethereum
Cryptocurrency
Blockchain
Software Development
ICO
Recommended from ReadMedium