<?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 Chris Cassano on Medium]]></title>
        <description><![CDATA[Stories by Chris Cassano on Medium]]></description>
        <link>https://medium.com/@cvcassano?source=rss-f589dfad158e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vdLwQbkzu2Cqf5Ca.</url>
            <title>Stories by Chris Cassano on Medium</title>
            <link>https://medium.com/@cvcassano?source=rss-f589dfad158e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 10:39:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cvcassano/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[Hot to make Elastic Beanstalk log Sidekiq or anything else on Amazon Linux 2 to CloudWatch Logs]]></title>
            <link>https://medium.com/@cvcassano/hot-to-make-elastic-beanstalk-log-sidekiq-or-anything-else-on-amazon-linux-2-to-cloudwatch-logs-b98137b33d33?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b98137b33d33</guid>
            <category><![CDATA[cloudwatch]]></category>
            <category><![CDATA[elastic-beanstalk]]></category>
            <category><![CDATA[sidekiq]]></category>
            <category><![CDATA[rails]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Wed, 15 Jul 2020 21:48:45 GMT</pubDate>
            <atom:updated>2020-07-15T21:48:45.722Z</atom:updated>
            <content:encoded><![CDATA[<p>At <a href="https://expand.app">expand.app</a> we’re using Elastic Beanstalk for our Sidekiq workers. Which is great, except that if you turn on CloudWatch logs you’ll notice that the Sidekiq log is absent. Here’s how to turn it on.</p><p>Note that these instructions assume you’re using a Procfile for Sidekiq with the Sidekiq process named “worker”.</p><p>Create a platform hook in the root of your project at .platform/hooks/postdeploy/0001_redirect_sidekiq_logs.sh</p><p>Make it executable with chmod +x .platform/hooks/postdeploy/0001_redirect_sidekiq_logs.sh</p><p>Put this inside the file:</p><pre>#!/bin/bash<br>cp /var/app/current/devops/worker.conf /etc/rsyslog.d/worker.conf</pre><pre>systemctl restart rsyslog</pre><p>Then in your project, add a folder called “devops” and add a file inside it called “worker.conf” with the following contents:</p><pre># This rsyslog file redirects Elastic Beanstalk platform logs.<br># Logs are initially sent to syslog, but we also want to divide<br># stdout and stderr into separate log files.</pre><pre>if $programname  == &#39;worker&#39; then /var/log/web.stdout.log</pre><p>Your Sidekiq logs will be redirected to your web logs, which do show up in the CloudWatch logs by default. You also have to turn on CloudWatch log streaming in the Elastic Beanstalk console.</p><p>Finally, deploy your app to execute 0001_redirect_sidekiq_logs.sh.</p><p>Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b98137b33d33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up a full Ethereum node with RPC and debug support (geth)]]></title>
            <link>https://medium.com/@cvcassano/setting-up-a-full-ethereum-node-with-rpc-and-debug-support-geth-316517a1fdc?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/316517a1fdc</guid>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[geth]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 22:28:00 GMT</pubDate>
            <atom:updated>2019-03-26T22:37:47.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*etkTHMlmDrQ_Jco7OGdNdg.png" /></figure><p>Getting geth running isn’t that tricky, but making sure it’s a full node with debug support takes a specific set of arguments that aren’t commonly used when most people set up a node.</p><p>A full node will be an entire copy of the blockchain and state trie and will take a long time to sync (a week or more) but provides you with the ability to debug any transaction using truffle or remix. This debug api is not available on Infura, so I had to set up my own node.</p><p>Start with a fresh Ubuntu 18.04 instance. Run the commands below:</p><pre>sudo apt-get update</pre><pre>sudo add-apt-repository -y ppa:ethereum/ethereum</pre><pre>sudo apt-get update</pre><pre>sudo apt-get install ethereum</pre><p>Next, open /lib/systemd/system/geth.service in a text editor and paste in the below. Make sure to change the WorkingDirectory line to point to your home directory, and change the User line to be your main username. On AWS your username might be “ubuntu” but on GCP it is my personal username (“chris”).</p><p>You may also add the flag “ — testnet” to the geth command on the ExecStart line if you wish to start a Ropsten testnet node. If you wish to start a mainnet node, omit this flag.</p><pre>[Unit]</pre><pre>Description=Geth Node</pre><pre>After=network-online.target</pre><pre>Wants=network-online.target</pre><pre>[Service]</pre><pre>WorkingDirectory=/home/chris</pre><pre>User=chris</pre><pre>ExecStart=/usr/bin/geth --gcmode archive --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,web3,debug</pre><pre>Restart=always</pre><pre>RestartSec=5s</pre><pre>[Install]</pre><pre>WantedBy=multi-user.target</pre><p>Next, make sure that port 30303 is open for your instance so that geth can receive incoming connections. You should also open port 8545 for RPC calls.</p><p>Then, run the commands below to start your node.</p><pre>sudo systemctl enable geth<br>sudo systemctl start geth</pre><p>To monitor the logs for geth, use the command below:</p><pre>sudo journalctl -f -u geth</pre><p>If you want to try and speed up the sync by connecting to peers that are known to be good, visit this <a href="https://gist.github.com/rfikki">gist page</a> and find the gist for the network you’re using (for mainnet it would be mainnet-peers-latest.txt). Then run “geth attach” to open the geth console, and paste in the admin.addPeer() commands from the gist.</p><p>Syncing a full node will take like, a really long time. I began my mainnet node sync on 2018–12–17 21:28 UTC on a GCP instance with 2 cores and 8gb of ram and a 2048GB SSD. I will update this article when the syncing completes with how long it took.</p><p>Good luck!</p><p>Update 1: GCP warned me that the geth instance was utilizing all it’s memory and asked me to upgrade it. I upgraded it to 16gb of ram. We’ll see if this is now enough RAM.</p><p>Update 2: GCP warned me again to upgrade the system. Now it has 8 vCPUs and 23gb of ram. Additionally, the ropsten node I was syncing finished. This means a full ropsten node takes about 4 days to sync as of 2018–12–20.</p><p>Update 3: The node took about 3 months to sync, and was ready around March 15th, 2019.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=316517a1fdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ETH vs EOS: San Francisco Hackathons]]></title>
            <link>https://medium.com/@cvcassano/eth-vs-eos-san-francisco-hackathons-75b25310e538?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/75b25310e538</guid>
            <category><![CDATA[eth-hackathon]]></category>
            <category><![CDATA[eos-hackathon]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[eos]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Wed, 12 Dec 2018 22:28:55 GMT</pubDate>
            <atom:updated>2018-12-18T22:32:51.864Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently attended the official EOS hackathon in San Francisco. Since I also attended (and became a finalist at) the official ETH hackathon here last month, I thought I’d share my notes on how the two events compared.</p><p>Both hackathons reflected the stereotypical culture of each project, respectively. The EOS hackathon was incredibly business focused, compared to the ETH hackathon which seemed much more focused on the tech.</p><h3>The Challenge</h3><p>The EOS hackathon had a secret “challenge” that wasn’t released until the day of the hackathon. All participants are advised to create something that addresses that challenge. For comparison, the ETH hackathon did not have a specific challenge like this. The challenge was:</p><blockquote>Build an EOSIO application that fosters a fundamental competitive advantage by implementing a business model that aligns interests among stakeholders and/or drives more value back to users</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lgFjFlobvkjqSuh8Q4qHEw.jpeg" /></figure><p>As you can see, that challenge is pretty much as “business-y” as you can get. For me, a hackathon is about following the path of maximal interestingness and building something that seems really cool, not about building a business. That seemed to be the spirit of the ETH hackathon as well, where none of the winners mentioned a business model, and some winners were purely technical ideas like an EVM sharding implementation, for example.</p><h3>The Prizes</h3><p>The EOS hackathon had 3 prizes for 1st, 2nd, and 3rd place. 1st place gets $100k, 2nd gets $25k, and 3rd gets $10k. They also had 3 “superlative” winners for 3 specific prizes worth $3k each: Greatest social impact, best user experience, and best social media post. They had no sponsor prizes. That means 6 teams won a total of $144k. There were 74 total teams, so about 8% of teams won a prize.</p><p>The ETH hackathon gave out 2 ETH (roughly $400 at the time) to finalists, of which there were 10. There was also over $150k in sponsor prizes from more than 15 sponsors. All in all, 44 teams won a total of $183k. There were 120 total teams, so about 36% of teams won a prize.</p><h3>Rules</h3><p>The EOS hackathon had a ton of very strict rules, compared to the ETH hackathon which was much more lax.</p><p>The EOS hackathon required that you use an EOS smart contract in your entry. So for example, if you wrote a mobile dApp browser for EOS (which doesn’t require an EOS smart contract) in the hackathon, you’ve broken the rules, and are not eligible for any awards.</p><p>There was no such restriction in the ETH hackathon, as is evident by the fact that some of the ETH finalists did not use ETH smart contracts at all.</p><p>The EOS hackathon required that your team consisted of 2–5 people. That means you absolutely cannot work alone, which really bothered me. I like the option to work alone at hackathons for various reasons, like when I already have an idea in mind and don’t want to have to convince anyone of it’s value. This forced me to try and find a teammate, and I did. This event was his first experience with anything blockchain related, so I spent a good bit of time explaining the basics of cryptocurrency to him. He eventually understood what I was building, and had some good ideas around the subject, which I did not utilize. It was a fun conversation, but not very good for hackathon productivity.</p><p>In comparison, the ETH hackathon had no such restriction on working alone, and allowed teams of up to 4 members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hIug-ZJfVswpjiR4gg9rng.png" /><figcaption>EOS Rules</figcaption></figure><p>The EOS hackathon seemed to be very worried about cheating and plagiarism. They clearly specified that you are not able to re-use any previous work. You may use open source libraries, unless you are the author of the library.</p><p>The ETH hackathon was much more lax. You could re-use something, but you would only be judged on the work done during the hackathon itself, and you must disclose what was not done during the hackathon. This is evident in the finalist project that provided a new sharding implementation, which built upon work done at the ETHBerlin hackathon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9bl3x8R8fEh3DzGswi2yvA.jpeg" /><figcaption>ETH Rules</figcaption></figure><h3>Length and timing</h3><p>The EOS hackathon required that all entrants be present by 9:30am on a Saturday, and hacking went from Saturday at 11am through Sunday at 1pm, which provides 26 hours of coding. Entrants were told that if they did not arrive by 9:30am, their spot would be given to someone on a waiting list.</p><p>The ETH hackathon check-in started at 4pm on a Friday, but there was no check-in deadline that I was aware of. I showed up at about 7pm. Hacking went from Friday at 10pm through Sunday at 9:30am which provides 35.5 hours of coding.</p><h3>Presenting your idea / hack</h3><p>The EOS hackathon provided teams with 5 minutes total to present their ideas — 3 minutes of pitching and 2 minutes of questions.</p><p>The ETH hackathon provided teams with 7 minutes total to present their ideas — 5 minutes of pitching and 2 minutes of questions.</p><p>The EOS hackathon required teams to create a pitch deck, a 30 second elevator pitch, and a 2–3 min fundraising pitch as can be seen by the slides below. The pitch deck recommendations were quite extensive, recommending a dozen slides about all kinds of business questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*acsU3pI8bcSU1ZHsFWsfAA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFvWDPc_1YHunWzodtZRHA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Rk9KcjeB4emlApvJ1QN4g.jpeg" /></figure><p>None of these things were required for the ETH hackathon. I just demoed my project for the judges and answered their questions with no supporting material. Nobody asked me how my project would make money or about my revenue model.</p><h3>Swag</h3><p>The EOS hackathon gave out very nice swag. A $100 Incase backpack, a branded Patagonia sweater, a branded water bottle, and a 10,000 mAh rechargeable power bank</p><p>The ETH hackathon gave out branded Nalgene water bottles, shirts, and stickers. I also won a cool ETH poster for being a finalist.</p><h3>Winning teams and projects</h3><p>Comparing the winning teams is also fun. Winners of the ETH hackathon included various ideas like a new sharding implementation, a cryptocurrency rolodex browser extension, a way to send NFTs like cryptokitties over SMS, and the implementation of a new ad-buying model. You can see them all here: <a href="https://ethsanfrancisco.devpost.com/submissions">https://ethsanfrancisco.devpost.com/submissions</a></p><p>The EOS hackathon winners included a git issue incentivization scheme, a “uber for packages” app, and a social networking platform. You can see them all here: <a href="https://block.one/news/eos-hackathon-san-francisco-winners/">https://block.one/news/eos-hackathon-san-francisco-winners/</a></p><p>The ETH hackathon winners I spoke with were very open and excited to talk about their projects, how their projects worked, and where to find the source code.</p><p>The EOS hackathon winner that I spoke with was the grand prize winner, NouGit. When I tried to dig further into what exactly the NouGit platform is and how it works, I was met with resistance, which shocked me. I asked for a link to the source code 3 times and the question was dodged or ignored. I literally asked “what is it and how does it work?” and was told “We’ll have answers to that soon” which felt super weird and shady. I just wanted to know how the hackathon entry worked and what it actually, you know, does.</p><p>The source code is public, somewhere (as is required per hackathon rules) but yet it’s location wasn’t being revealed. I was excited to learn about how combining EOS and Git could yield new collaborative possibilities in how programmers commit code and work. But once I dug further, I found that NouGit actually provides the same functionality as Gitcoin or Bounties.network but on EOS instead of ETH. Which isn’t technically new or particularly interesting, except for someone who is looking to clone existing projects onto EOS. This attitude of secrecy and hyper-competitiveness is not something that is prevalent in the ETH world, where founders are excited to tell you what they’re working on and why. These founders know that creating a winning business is all about execution, not secret ideas.</p><h3>Conclusion</h3><p>Comparing the two hackathons is fascinating because it provides insight into how each organization works internally. EOS is very top-down, business / profit driven, and strict. ETH is very collaborative, technically driven, and relaxed.</p><p>Personally, I enjoyed both hackathons and illustrating the differences. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75b25310e538" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding a file to IPFS remotely via the API with rails and rest-client]]></title>
            <link>https://medium.com/@cvcassano/adding-a-file-to-ipfs-remotely-via-the-api-with-rails-and-rest-client-79f6b9ac11c0?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/79f6b9ac11c0</guid>
            <category><![CDATA[ipfs]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[rest-client]]></category>
            <category><![CDATA[rails]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Tue, 20 Nov 2018 22:34:51 GMT</pubDate>
            <atom:updated>2018-11-20T22:34:51.251Z</atom:updated>
            <content:encoded><![CDATA[<p>I have a remote IPFS node running that is protected with HTTP basic auth that I set up by following my own tutorial available here: <a href="https://medium.com/@cvcassano/protecting-an-ipfs-node-with-nginx-reverse-proxy-on-ubuntu-18-04-e56685a10bcc">https://medium.com/@cvcassano/protecting-an-ipfs-node-with-nginx-reverse-proxy-on-ubuntu-18-04-e56685a10bcc</a></p><p>Now I need to add a file to IPFS from a rails backend. Luckily, the IPFS HTTP API is really great, and I can just use the rest-client gem to add the file to IPFS.</p><p>Below is how I did it. Note that I’m using HTTP basic auth, which is why the user and password keys are set in the request. You may omit these if your IPFS api is not protected with HTTP basic auth.</p><pre>    response = RestClient::Request.execute(<br>      method: :post,<br>      url: &#39;<a href="https://ipfs.deco.network/api/v0/add&#39;">https://ipfs.deco.network/api/v0/add&#39;</a>,<br>      user: &#39;ipfsuser&#39;,<br>      password: ENV[&#39;DECONET_IPFS_API_PASSWORD&#39;],<br>      timeout: 600, # Optional<br>      payload: {<br>        multipart: true,<br>        file: File.new(&quot;/path/to/image.jpg&quot;, &#39;rb&#39;)<br>      }<br>    )<br>    parsed = JSON.parse(response.body)<br>    ipfs_hash = parsed[&#39;Hash&#39;]</pre><p>After this code is run, the ipfs_hash variable will contain the ipfs hash of the object you uploaded.</p><p>Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79f6b9ac11c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Protecting an IPFS node with nginx reverse proxy on Ubuntu 18.04]]></title>
            <link>https://medium.com/@cvcassano/protecting-an-ipfs-node-with-nginx-reverse-proxy-on-ubuntu-18-04-e56685a10bcc?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e56685a10bcc</guid>
            <category><![CDATA[http-basic-auth]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[secure-ipfs]]></category>
            <category><![CDATA[ipfs]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Tue, 20 Nov 2018 22:24:26 GMT</pubDate>
            <atom:updated>2019-01-09T01:06:23.124Z</atom:updated>
            <content:encoded><![CDATA[<h3>Protecting an IPFS node with nginx reverse proxy and http basic auth on Ubuntu 18.04</h3><p>I needed to set up an IPFS node, and I’d like to share how I secured it, because I couldn’t find a great guide to this.</p><p>First, setup and install IPFS using the instructions here: <a href="https://docs.ipfs.io/introduction/install/">https://docs.ipfs.io/introduction/install/</a></p><p>I used the prebuilt binary for Ubuntu, and moved it to /usr/local/bin. After you’ve moved it, run this: ipfs init; ipfs config profile apply server</p><p>Install Nginx, and then install Certbot for it using the instructions here: <a href="https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx.html">https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx.html</a></p><p>I created a systemd init script for ipfs to make sure it stays running and starts on reboot, but this is optional. If you’d like the init script, put the text below into /lib/systemd/system/ipfs.service</p><pre>[Unit]<br>Description=IPFS Daemon</pre><pre>[Service]<br>Type=simple<br>User=ubuntu<br>Environment=HOME=/home/ubuntu<br>Restart=always<br>ExecStart=/usr/local/bin/ipfs daemon</pre><pre>[Install]<br>WantedBy=multi-user.target</pre><p>If you’d like to start the service, you can do so with sudo systemctl start ipfs and if you’d like to make sure it runs automatically on startup, you should run sudo systemctl enable ipfs</p><p>Next, you’ll want to set up the nginx reverse proxy. To do this, I ran sudo certbot --nginx and put in my domain name when prompted. This set up my nginx config file at /etc/nginx/sites-enabled/default There was already another server{} entry at the top of the file, so I deleted it and just left the one created by certbot. I also had certbot create an entry to redirect http to https. I added a location{} entry to pass incoming requests to the IPFS api exposed on localhost:5001.</p><p>I also added authentication using HTTP basic auth, which can be done by follwing these instructions: <a href="https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/">https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/</a> but I used /etc/nginx/.htpasswd for my .htpasswd path because /etc/apache2 does not exist on my machine because I only have nginx.</p><p>I also want to only expose the /api/v0/add endpoint because that’s all I need right now. So in the nginx config file, traffic to that endpoint is allowed, and all other traffic is denied.</p><p>The end result is this nginx config file at /etc/nginx/sites-enabled/default</p><pre>server {<br>    server_name ipfs.deco.network; # managed by Certbot</pre><pre>    location /api/v0/add {<br>        proxy_pass <a href="http://localhost:5001">http://localhost:5001</a>;<br>        proxy_set_header Host $host;<br>        proxy_cache_bypass $http_upgrade;<br>        allow all;<br>    }</pre><pre>    location / {<br>        proxy_pass <a href="http://localhost:5001">http://localhost:5001</a>;<br>        proxy_set_header Host $host;<br>        proxy_cache_bypass $http_upgrade;<br>        deny all;<br>    }</pre><pre>    auth_basic           &quot;Authentication Required&quot;;<br>    auth_basic_user_file /etc/nginx/.htpasswd;</pre><pre>    listen 443 ssl; # managed by Certbot<br>    ssl_certificate /etc/letsencrypt/live/ipfs.deco.network/fullchain.pem; # managed by Certbot<br>    ssl_certificate_key /etc/letsencrypt/live/ipfs.deco.network/privkey.pem; # managed by Certbot<br>    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot<br>    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot</pre><pre>}</pre><pre>server {<br>    if ($host = ipfs.deco.network) {<br>        return 301 <a href="https://$host$request_uri">https://$host$request_uri</a>;<br>    } # managed by Certbot</pre><pre>    listen 80 ;<br>    server_name ipfs.deco.network;<br>    return 404; # managed by Certbot<br>}</pre><p>Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e56685a10bcc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I hacked Gitcoin’s tipping mechanism]]></title>
            <link>https://medium.com/deconet/how-i-hacked-gitcoins-tipping-mechanism-9f40908bc73b?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f40908bc73b</guid>
            <category><![CDATA[deconet]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[gitcoin]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Tue, 04 Sep 2018 14:01:01 GMT</pubDate>
            <atom:updated>2018-09-04T22:51:14.025Z</atom:updated>
            <content:encoded><![CDATA[<p>Gitcoin offers a really neat way to send ethereum to any user on GitHub with just their username. I broke this mechanism and dumped the private keys that hold the tips before they’re claimed. This exploit has since been fixed, but here’s how I did it.</p><p>As the tech lead at <a href="https://deco.network">Deco.Network</a>, I am constantly researching new ways for coders to get paid. Therefore, Gitcoin’s tipping mechanism piqued my interest. I was curious as to how exactly it worked, so on July 26th 2018 I started to dig into the code.</p><p>The simplest implementation of this kind of tipping mechanism would be to have Gitcoin hold the tips until they’re claimed. So, the sender sends the money to Gitcoin, and then Gitcoin lets a GitHub user claim it by using “Login with GitHub” on the Gitcoin site. This is not how Gitcoin does it, though.</p><p>Gitcoin understandably wants to avoid being the custodian of those tips until they’re claimed. So instead, they used a somewhat convoluted process involving Shamir’s Secret Sharing Scheme and IPFS. If the mixture of those two things already sounds a bit fishy to you, then congratulations, you probably figured out how I performed this exploit.</p><h3>Sending a tip used to work like this:</h3><ol><li>The sender picks a GitHub username and amount of ETH to send, and hits “send”</li><li>Javascript running in the browser generates a brand new Ethereum private key.</li><li>That private key is split into 3 parts using Shamir’s secret sharing scheme with a threshold of 2 parts. That means you can combine any of the 2 parts to get the original private key back.</li><li>2 of the parts are uploaded to IPFS</li><li>The IPFS hashes of those 2 parts that were uploaded to IPFS are uploaded to the Gitcoin DB.</li><li>The 3rd part is also uploaded to the Gitcoin DB.</li><li>The tip funds are sent to the address that corresponds with the newly created private key.</li></ol><p>To claim a tip, a GitHub user does a “Login with GitHub” on the Gitcoin website. This causes Gitcoin to release the share of the private key it’s storing, and also the IPFS hash for another share. The user’s browser retrieves the share from IPFS, and combines it with the share that was stored in the Gitcoin DB. At this point, the user’s browser has the private key containing the tip money, and then presumably the user can sweep this into their own wallet (I didn’t actually check the code for this part, so this is just a guess)</p><h3>So how did I break this mechanism and dump all the private keys?</h3><p>I connected to the Gitcoin IPFS node, and asked it to list the hashes of all it’s stored items. I then retrieved all these items from IPFS and stored them in an array. I used a nested loop to try combining every item with every other item via Shamir’s Secret Sharing Scheme, and stored the result in another array. Then, I filtered the array of combined items, only keeping the ones that are the same length as an Ethereum private key</p><p>The result was an array with dozens of private keys, as you can kind of see in the screenshot below. The keys are censored, just in case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnaVyyKP3cBsgkd-OaU2RA.png" /></figure><p>Once I had an array of private keys, I looped over it to derive the corresponding Ethereum addresses. Then I checked all of them for a nonzero balance, which some keys did indeed have.</p><p>At this point, I contacted Kevin Owocki from Gitcoin, who promptly fixed the issue and rewarded me for finding this bug. I have to commend Kevin for the quick fix and generous reward.</p><h3>Gitcoin is awesome!</h3><p>Gitcoin is an amazing tool that is making serious progress in pushing open source forward. You should check it out if you haven’t already. I my opinion, it’s a model application for what you can do with Ethereum smart contracts.</p><p>You can view Gitcoin’s post on this issue <a href="https://medium.com/@owocki/e0916f1143b1">here</a> where they explain how they fixed it. Check it out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f40908bc73b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deconet/how-i-hacked-gitcoins-tipping-mechanism-9f40908bc73b">How I hacked Gitcoin’s tipping mechanism</a> was originally published in <a href="https://medium.com/deconet">Deconet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is the Deconet Asset Marketplace today?]]></title>
            <link>https://medium.com/deconet/what-is-the-deconet-asset-marketplace-65d7ea97dd92?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/65d7ea97dd92</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[software-license]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[deconet]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Fri, 17 Aug 2018 19:31:08 GMT</pubDate>
            <atom:updated>2018-08-31T23:48:41.555Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wdbtc9QfF8d8_pj8H9EHCw.png" /></figure><p>The <a href="https://app.deco.network">Deconet Asset Marketplace</a> is live on the Ethereum mainnet, but what actually is it?</p><p>It’s a place where you can buy and sell software licenses and API calls on chain. So, if you’ve written software and want to sell it, you could list it on Deconet. You could do the same if you have an API you want to sell. On the other hand, you can also buy software and API calls that people have listed.</p><p>Buying and selling software licenses on chain has many benefits including an immutable record of the sale that is always easily referenceable via the ethereum transaction that represents the sale itself. This also makes it super easy to sell your code, since all you have to do is upload it and set a price for a license.</p><p>Deconet also makes it very easy to sell API calls, since all you have to do to sell an API is enter the base url of the API, a documentation URL, and set a price per API call. Buying APIs is very convenient too, and you can deposit ETH to be used as API credits that are paid out as you utilize APIs listed on Deconet.</p><p><strong>Heads Up!</strong> This application assumes that you have an understanding of how the ethereum network works and are capable of using MetaMask to send and receive ethereum transactions. You can learn more about MetaMask here: <a href="https://metamask.io/">https://metamask.io/</a>.</p><p>Note that when you perform an on-chain operation, you may have to wait for the transaction to be confirmed in MetaMask to see your changes fully reflected on the website. In some cases, you may wish to refresh the website after your transaction has been mined to see your changes reflected.</p><p><strong>Create an account</strong> at <a href="https://app.deco.network">https://app.deco.network</a> and then visit our help page where you can learn more: <a href="https://app.deco.network/help">https://app.deco.network/help</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65d7ea97dd92" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deconet/what-is-the-deconet-asset-marketplace-65d7ea97dd92">What is the Deconet Asset Marketplace today?</a> was originally published in <a href="https://medium.com/deconet">Deconet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrading OpenSSH on Ubuntu on AWS from source]]></title>
            <link>https://medium.com/@cvcassano/upgrading-openssh-on-ubuntu-on-aws-from-source-8c9aed3191a7?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c9aed3191a7</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[openssh]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Mon, 16 Jul 2018 20:51:20 GMT</pubDate>
            <atom:updated>2018-07-16T20:51:20.614Z</atom:updated>
            <content:encoded><![CDATA[<p>I wanted to upgrade my OpenSSH version on a Ubuntu 16.04 server on AWS. I discovered that if you do this with the wrong config options, you might break your SSH installation.</p><p>Therefore, I’m providing the procedure that worked for me without breaking anything:</p><pre>sudo -s<br>apt update &amp;&amp; apt install -y build-essential libssl-dev zlib1g-dev libpam0g libpam0g-dev<br>cd /usr/local/src<br>wget <a href="https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.7p1.tar.gz">https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.7p1.tar.gz</a><br>tar -xvf openssh-7.7p1.tar.gz<br>cd openssh-7.7p1<br>make clean &amp;&amp; make distclean<br>./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam<br>make<br>make install</pre><p>Feel free to substitute the OpenSSH version with a newer one, if it exists.</p><p>Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c9aed3191a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing The Deco.Network Bug Bounty Program]]></title>
            <link>https://medium.com/deconet/announcing-the-deco-network-bug-bounty-program-9c718848a106?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c718848a106</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 01:58:42 GMT</pubDate>
            <atom:updated>2018-06-14T01:58:42.082Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IE3RvRkckCTFdIFkMOKp2A.jpeg" /></figure><p>Every good project has a bug bounty program. It’s how the community can ethically disclose vulnerabilities that are discovered in software. And now, Deconet has one too.</p><p>We modeled our own bug bounty program off the very successful Ethereum bug bounty program which has paid out over $100k in bounties so far.</p><p>You can find out the rules and details of our own program by visiting our bug bounty website located below:</p><p><a href="https://deco.network/bugbounty.html">https://deco.network/bugbounty.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c718848a106" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deconet/announcing-the-deco-network-bug-bounty-program-9c718848a106">Announcing The Deco.Network Bug Bounty Program</a> was originally published in <a href="https://medium.com/deconet">Deconet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Printing watertight objects in Simplify3d]]></title>
            <link>https://medium.com/@cvcassano/printing-watertight-objects-in-simplify3d-63cf903fc88d?source=rss-f589dfad158e------2</link>
            <guid isPermaLink="false">https://medium.com/p/63cf903fc88d</guid>
            <category><![CDATA[3d-printing]]></category>
            <dc:creator><![CDATA[Chris Cassano]]></dc:creator>
            <pubDate>Thu, 26 Apr 2018 19:21:44 GMT</pubDate>
            <atom:updated>2018-04-26T19:21:44.824Z</atom:updated>
            <content:encoded><![CDATA[<p>The other day I ran across this really interesting instructable about how to print watertight objects with a standard FFF 3d printer: <a href="http://www.instructables.com/id/3D-Printing-Make-Water-Tight-and-Air-Tight-Contain/">http://www.instructables.com/id/3D-Printing-Make-Water-Tight-and-Air-Tight-Contain/</a></p><p>The instructable provides settings for “Mattercontrol Slicer” but I use Simplify3d. So I want to provide the settings I used to get a water tight print on my Ultimaker 2+ printer.</p><p>In addition to the settings below, make sure that the bottom of your 3d model is thick enough to be at least 4 layers when printed. I printed one that was a single layer and it leaked.</p><p>On the Extruder tab:</p><ul><li>Crank up the extrusion multiplier to 150%</li><li>Set extrusion width to auto. Mine was set to Manual at 0.4mm which is my nozzle diameter. Not sure if this actually needs to be done TBH.</li></ul><p>On the Layer tab:</p><ul><li>Set first layer height to 160%</li><li>Set top solid layers and bottom solid layers to 9</li><li>Set layer height to .2mm. Mine was at .15mm by default. Not sure if this actually makes a difference on water tightness of the final print but I was okay using a bigger layer height anyway because it prints faster.</li></ul><p>On the Infill tab:</p><ul><li>Set internal fill pattern and external fill pattern to Rectilinear</li><li>Set infill to 100%</li><li>Set outline overlap to 40%</li></ul><p>That’s it, good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63cf903fc88d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>