<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Paulius on Medium]]></title>
        <description><![CDATA[Stories by Paulius on Medium]]></description>
        <link>https://medium.com/@pauliax?source=rss-21b74a17e900------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UCS0Ntl464qvyCX2kn9TEQ.jpeg</url>
            <title>Stories by Paulius on Medium</title>
            <link>https://medium.com/@pauliax?source=rss-21b74a17e900------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 05:31:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pauliax/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Run Ethereum 2.0 validator in a cloud (Medalla|Prysm|DAppNode)]]></title>
            <link>https://medium.com/@pauliax/run-eth2-validator-in-cloud-medalla-prysm-dappnode-f34c445366ea?source=rss-21b74a17e900------2</link>
            <guid isPermaLink="false">https://medium.com/p/f34c445366ea</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[dappnode]]></category>
            <category><![CDATA[medalla]]></category>
            <category><![CDATA[prysm]]></category>
            <category><![CDATA[eth]]></category>
            <dc:creator><![CDATA[Paulius]]></dc:creator>
            <pubDate>Fri, 21 Aug 2020 10:29:10 GMT</pubDate>
            <atom:updated>2020-08-30T05:56:56.427Z</atom:updated>
            <content:encoded><![CDATA[<p>Run Ethereum 2.0 validator in a cloud (Medalla|Prysm|DAppNode)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VvATi5l_tvv2hzGXXDciqA.png" /><figcaption>Leslie the Rhino — eth2 mascot</figcaption></figure><p>Ethereum 2.0 is around the corner (phase 0 is expected to launch in 2020). It is the best time to try the new tech if you are like me and don’t have the courage to test in production as you will need to burn your ETH.</p><p>In this practical guide, we will try to run a validator on the Ethereum 2.0 testnet. What we will be using:</p><ul><li><a href="https://m.do.co/c/ade22dfa54d2"><strong>DigitalOcean</strong></a><strong> </strong>droplet (the cheapest one at $5/month will do)</li><li><a href="https://dappnode.io/"><strong>DAppNode</strong></a> (it offers infrastructure as a service to run various services and control it from the web app, very useful)</li><li><strong>Medalla testnet</strong> (the latest ETH 2.0 test network that <a href="https://www.reddit.com/r/ethereum/comments/ia5wa2/whats_happening_with_the_medalla_testnet/">already served its purpose</a>)</li><li><a href="https://github.com/prysmaticlabs/prysm"><strong>Prysm client</strong></a> (it is one of the ETH 2.0 clients that DappNode supports)</li><li><strong>32 GöETH</strong> (32 Ethers of <a href="https://goerli.net/">Görli Testnet</a> that you need to deposit to become a validator)</li></ul><p>I know that running a validator in the cloud is not the best option but this tutorial is just for the sake of learning and testing in an isolated environment. And you don’t have to keep your PC online 24/7. In the future, you may want to run it on a physical machine, it’s all up to you.</p><p>Let’s get started:</p><ol><li><strong>Create a Docker droplet on DigitalOcean</strong></li></ol><p>I recommend using a Docker image as it allows running an application in a preconfigured isolated environment.</p><p>While the requirements of running an ETH 2.0 validator are a bit higher, I still managed to run it on the cheapest DigitalOcean droplet without any problems (tbh, the load on CPU is quite high but it still works). Of course, the resources are very minimal so I may decide to upgrade in the future. <strong><em>EDIT:</em></strong><em> I have upgraded my droplet to a $10/month plan, as apparently the cheapest one is not enough to catch up with the chain.</em></p><p>You can leave other settings as default or customize according to your needs. For instance, you might choose SSH keys authentication as it is a more secure way of authentication. If you have not generated your SSH keys before, you can follow the instructions by DigitalOcean.</p><p><strong>2. Connect to your droplet</strong></p><p>Copy your droplet IP address (you can see it in your dashboard). Open a terminal and enter the command:</p><p><em>ssh root@&lt;YOUR_DROPLET_IP_ADDRESS&gt;</em></p><p><strong>3. Install DappNode</strong></p><p>Follow the <a href="https://github.com/dappnode/DAppNode/wiki/DAppNode-Installation-Guide#installation-via-installer-script">DappNode installation guide</a>. Once the installation is complete, download the <em>.ovpn</em> file on your physical machine (either from the given link or QR code that you will see printed to the console).</p><p><strong>4. Install OpenVPN</strong></p><p>Follow the <a href="https://github.com/dappnode/DAppNode/wiki/OpenVPN-Client-Guide">OpenVPN installation guide</a> (do it on your physical machine, see specific instructions for your OS). Once installed you can import your <em>.ovpn</em> file and open the connection.</p><p><strong>5. DAppNode’s dashboard</strong></p><p>Now you should be able to open a DAppNode dashboard in your browser: <a href="http://my.dappnode/">http://my.dappnode/</a>. Here you can manage and control your node.</p><p><strong>6. Install Medalla Validator</strong></p><p>In your dashboard, select DAppStore, search, and install Medalla Validator. Select to use Prysm client (if you want, you can try other supported clients, I think it won’t make much difference). If you go to packages you will see that it also installed the Medalla beacon chain. You can click on it, select logs and see that it already started syncing.</p><p><strong>7. Get GöETH</strong></p><p>32 is the minimum stake amount to become a validator. Probably the easiest way to get it is to request it from the <a href="https://faucet.goerli.mudit.blog/">faucet</a>. Use your Eth1 address (from Metamask or whatever you use) to request some ethers. Alternatively, you can visit Prysmatic Labs discord and they will gladly send you some test eth.</p><p><strong>8. Setup a validator</strong></p><p>Visit <a href="https://medalla.launchpad.ethereum.org/">Eth2 Launch Pad for Medalla testnet</a> and follow the instructions to generate validator keystores and deposit your stake. Once finished, go to your DAppNode’s <a href="http://medalla-validator.dappnode/">Medalla validator dashboard</a> and import your validators.</p><p>After depositing you have to wait for it to be approved. Once the validator is approved it is expected to stay online and attest for the validity of incoming blocks or create a new block. If the validator is offline when required, it will be penalized. Being penalized is not so bad compared to what waits for those who try to misuse the network with malicious purposes (they get slashed!). There are several sites where you can view statistics of your validator or the whole network, for example, <a href="https://beaconscan.com/">BeaconScan</a> or <a href="https://eth2stats.io/medalla-testnet">eth2stats</a>.</p><p><strong>Bonus: get a unique POAP badge </strong>(valid if you propose a block between genesis and block 300&#39;000)</p><p>You can get a badge (ERC721 token) that proves your participation in a multiclient testnet. All the instructions are provided <a href="https://beaconcha.in/poap">here</a> but basically you just input your Eth1 address, get a unique flag, and add it to your validator message. You can set that in a DAppNode, Medalla validator package config (alias field).</p><p>That’s it. Wish you a good experience and journey with Eth2, exciting times are ahead!</p><p><strong><em>EDIT</em></strong><em>: I have not noticed that my beacon chain did not start syncing (msg=“Waiting for enough suitable peers before syncing”) and upon further investigation, </em><a href="https://docs.prylabs.network/docs/prysm-usage/p2p-host-ip/"><em>I’ve found that you need to change the port numbers</em></a><em>. If you are also experiencing this issue, go to your “Prysm Medalla Beacon Chain” package and set host port 12000 for the first TCP connection and 13000 for the second one.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f34c445366ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Truffle contracts to all networks without running your own nodes]]></title>
            <link>https://medium.com/@pauliax/deploying-truffle-contracts-to-all-networks-without-running-your-own-nodes-9e619ad9f4da?source=rss-21b74a17e900------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e619ad9f4da</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[truffle]]></category>
            <dc:creator><![CDATA[Paulius]]></dc:creator>
            <pubDate>Mon, 23 Jul 2018 06:38:02 GMT</pubDate>
            <atom:updated>2018-07-23T06:49:25.665Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*BEBRHdWgI5_IxkxdVrayPw.png" /><figcaption>Truffle logo</figcaption></figure><p><a href="https://truffleframework.com">Truffle</a> is by far the most popular framework for developing DApps on the Ethereum blockchain. This article is intended to provide you with a comprehensive overview on how to configure your project so you can deploy your contracts to the main network, test networks (Ropsten, Rinkeby, Kovan) or private network faster and effortlessly without the need to run your own Ethereum node. I assume that you already have Truffle installed on your machine and know the basic commands (<em>init</em>, <em>compile</em>, <em>migrate</em>, etc). Without further ado let’s jump into the article.</p><p><strong>Obtaining Infura API keys</strong></p><p><a href="https://infura.io">Infura </a>provides an access to the Ethereum network, so you don’t have to run your own node. Signup on Infura (enter your name, email and password) and you will receive an email message with your API keys. We will use them later.</p><p><strong>Downloading Ganache</strong></p><p><a href="https://truffleframework.com/ganache">Ganache</a> is a simulation of a private Ethereum blockchain. It is very useful to for testing your DApp at the early stage, as you can have instant transactions (no need to wait for the confirmations). Make sure to download it and get familiar with its interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHVmX6lqvdIwuysTtLSTvw.png" /><figcaption>Ganache user interface</figcaption></figure><p><strong>Setting up Truffle project</strong></p><p>If currently you don’t have your Truffle project, you can follow me and start with a fresh <a href="https://truffleframework.com/boxes/pet-shopproject">Pet Shop</a> project.</p><p>Open a terminal and navigate to the directory where you want this project to be located. Then, run this command to initiate a new project with some boilerplate code:</p><pre>truffle unbox pet-shop</pre><p>Run the server:</p><pre>npm run dev</pre><p>You should be able to see your project running on localhost (if not, make sure that Ganache is running).</p><p>But what if you want to test your DApp on a more realistic simulation or even on the main Ethereum network? I hope you have heard about test networks like Ropsten, Rinkeby or Kovan. These are the simulations of the real Ethereum network, where you can test your smart contracts in a realistic environment without spending real Ether.</p><p><strong>Adding different networks to the configuration</strong></p><p>First, you will need a <a href="https://github.com/trufflesuite/truffle-hdwallet-provider">HD Wallet-enabled Web3 provider</a>. Run the installation command:</p><pre>npm install truffle-hdwallet-provider</pre><p>Open <em>truffle.js</em> file on your favorite text editor. I am using (and highly recommending) <a href="https://www.sublimetext.com/3">Sublime Text</a> (+ <a href="https://packagecontrol.io/packages/Ethereum">Solidity highlighting plugin</a> for developing smart contracts).</p><p>First, include the required module:</p><pre>var HDWalletProvider = require(“truffle-hdwallet-provider”);</pre><p>Then, you need to declare your mnemonic phrases. You can use default Ganache phrases, but I would not recommend that, as everyone has access to these accounts and you can not use it for Ethereum mainnet (for obvious <a href="https://www.reddit.com/r/ethereum/comments/7z4n6a/people_are_using_the_hardcoded_ganache_seedphrase/">reason</a>). What I would recommend is to add a <a href="https://metamask.io/">Metamask </a>extension to your browser and create an account there. Please make sure to backup your phrases somewhere safe and then add it to the configuration file:</p><pre>var mnemonic = &quot;candy maple cake sugar pudding cream honey rich smooth crumble sweet treat&quot;; // replace with your own phrases</pre><p><strong>Note:</strong> it is not recommended to leave it as a plain text in the final production version, but we will cover that later.</p><p>Next, add a configuration for different networks. Add a comma in <em>module.exports</em> after the development network and declare a configuration for other networks (do not forget to replace <em>your-api-key</em> with the actual API keys from Infura):</p><pre>ropsten: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://ropsten.infura.io/vzg96XXRDWTLy5O4GtSE">https://ropsten.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 3<br>    },<br>    rinkeby: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://rinkeby.infura.io/vzg96XXRDWTLy5O4GtSE">https://rinkeby.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 4<br>    },<br>    kovan: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://kovan.infura.io/vzg96XXRDWTLy5O4GtSE">https://kovan.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 42<br>    },<br>    main: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://mainnet.infura.io/vzg96XXRDWTLy5O4GtSE">https://mainnet.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 1<br>    }</pre><p>Also, for each network I like to explicitly declare gas limit and price (put it after <em>network_id</em>):</p><pre>gasPrice: 20000000000, // 20 GWEI<br>gas: 3716887 // gas limit, set any number you want</pre><p>This is optional, but it is very useful when you are deploying to the main network, as it makes sure you are not overpaying and the transaction will be provided with a reasonable amount of gas. To test how much gas the deployment costs, I use <a href="https://remix.ethereum.org/">Remix IDE</a>.</p><p>Here is the final <em>truffle.js</em> file:</p><pre>var HDWalletProvider = require(&quot;truffle-hdwallet-provider&quot;);</pre><pre>var mnemonic = &quot;candy maple cake sugar pudding cream honey rich smooth crumble sweet treat&quot;;</pre><pre>module.exports = {<br>  // See &lt;<a href="http://truffleframework.com/docs/advanced/configuration">http://truffleframework.com/docs/advanced/configuration</a>&gt;<br>  // for more about customizing your Truffle configuration!<br>  networks: {<br>    development: {<br>      host: &quot;127.0.0.1&quot;,<br>      port: 7545,<br>      network_id: &quot;*&quot; // Match any network id<br>    },<br> ropsten: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://ropsten.infura.io/vzg96XXRDWTLy5O4GtSE">https://ropsten.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 3,<br>      gasPrice: 20000000000,<br>      gas: 3716887<br>    },<br>    rinkeby: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://rinkeby.infura.io/vzg96XXRDWTLy5O4GtSE">https://rinkeby.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 4,<br>      gasPrice: 20000000000,<br>      gas: 3716887<br>    },<br>    kovan: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://kovan.infura.io/vzg96XXRDWTLy5O4GtSE">https://kovan.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 42,<br>      gasPrice: 20000000000,<br>      gas: 3716887<br>    },<br>    main: {<br>      provider: function() {<br>        return new HDWalletProvider(mnemonic, &quot;<a href="https://mainnet.infura.io/vzg96XXRDWTLy5O4GtSE">https://mainnet.infura.io/</a><em>your-api-key</em>&quot;);<br>      },<br>      network_id: 1,<br>      gasPrice: 20000000000, // 20 GWEI<br>      gas: 3716887    // gas limit, set any number you want<br>    }<br>  }<br>};</pre><p>Now you are ready to deploy your DApp to any of these networks!</p><p><strong>Deploying to different networks</strong></p><p>To deploy your contracts on Ropsten, run:</p><pre>truffle migrate --network ropsten</pre><p>Rinkeby:</p><pre>truffle migrate --network rinkeby</pre><p>Kovan:</p><pre>truffle migrate --network kovan</pre><p>Main network:</p><pre>truffle migrate --network main</pre><p>Make sure you have some Ether on every network. If you get “<em>Network up to date</em>” message, add <em>reset </em>flag, for example:</p><pre>truffle migrate --reset --network ropsten</pre><p>If you get “<em>exceeds block gas limit</em>” message, try to adjust the gas limit (as I mentioned earlier, you can use Remix to see how much gas is needed for deployment).</p><p>If you do not specify a network, the default one is <em>development. </em>You can track your transactions on <a href="https://etherscan.io">Etherscan</a>.</p><p><strong>Bonus: storing mnemonic in a separate place</strong></p><p>Maybe you are working with a team using <em>git </em>and have your project uploaded online or at some point you are planning to open source it. Storing your mnemonic online is not the safest option, as if someone knows it, they have access to all your funds on these accounts.</p><p>A simple solution is to add mnemonic as an environment variable and replace hard-coded values:</p><pre>var mnemonic = process.env.MNEMONIC;</pre><p>Find a way to add environment variable to your OS (it may differ in Windows, Linux and Mac) and enjoy the safer way to access your mnemonic phrases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*pz9PdaEcG9l0Au-OOzPMSA.png" /><figcaption>Adding new environment variable in Windows 10</figcaption></figure><p>That’s all! Hope you enjoyed this article (you can express your support by giving it a 👏) and if you have any questions, let me know in the 💬 section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e619ad9f4da" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>