My Devcon IV

The Quick & Not So Nasty Summary

It’s going to happen. Ethereum is going to scale, PoS is going to come, UI/UX is going to improve and more people will use DApps. Amazing minds are working on all these things. The researchers are super inspiring. The community is strong, dedicated and buidling away. The ship is being steered in the right direction. The combination of all these things feels a bit special and it might just be the start of a new future.

I need to contribute.

My Personal Highlights

ENS & Universal Logins — Nick Johnson, Alex Van De Sande

These kind of things are really going to drive adoption. Both Nick Johnson and Alex Van De Sandé were quality speakers.

I should look at using ENS in a DApp to gain some experience and the technical details are interesting to look into more, might be something I could contribute to?

Universal Logins, meta transactions, etc are just cool and the demo is awesome. I wonder what work is being done on the next stage? i.e. what’s the Universal Login equivalent for setting up your own wallet properly, or installing MetaMask?

Material world — Vinay Gupta

This was interesting because Mattereum seems to have solved the problem of how Ethereum tech can legally control real world assets. It still looks bloody complex but worth following for sure.

Making Sense Of Layer 2 — Josh Stark, L4

Explained state channels, plasma and other layer 2 technologies in a really good way.

One feeling I got from the conference was that some of these technologies, i.e. state channels seem usable already but don’t seem to be widely adopted to solve so called scaling issues. Is it because they’re hard to implement or is there some other reason?

Philip Daian — Smart Contract Security

Ended up at this one by accident and it was really interesting. Philip is a researcher and presented lots of interesting data. He was refreshingly original, realistic and non-biased. I’d like to watch his talk again and will definitely follow more.

CryptoEconomics at Scale — Karl Floersch

This guy was great. Energetic, enthusiastic, funny and explained things well. Very inspiring and encouraged everyone to get involved because there’s loads to do.

Andy Milenius — MakerDao, A new hope for financial reform

Did not expect much from this but it was excellent, really inspiring. These guys have a grand vision and they seem to be very clear and focused .Don’t know if I’ve ever fully appreciated the real power of stable coins but this definitely made me more aware.

Turbo geth — Alexey Akhunov

This guy was awesome! Possibly the best I saw. I only caught the end of the talk as didn’t plan to go but glad I randomly ended up there. He was so knowledgeable a fantastic presenter and it was super inspiring.

Contributing To Ethereum & OpenSource — Danny Ryan

One of the reasons I wanted to go to Devcon was because I know I want to be involved in the Ethereum ecosystem, I’ve been dabbling in the tech but I haven’t really found the best way for me to move forward so this presentation was perfect. Danny presented loads of ways to get involved and he believes it’s there are great opportunities for everyone. Some things to consider:

  • Follow conversations on https://ethresear.ch/
  • Build interfaces for research projects
  • Build prototypes for researchers
  • Get involved in meta transaction work
  • or ENS
  • Hack away and build my own applications, gain experience, skills and see if I identify any specific pain points.

So, what to do, what to do 🤔

The Experience In General

I really, really enjoyed it! It was fun, inspiring, exciting and super interesting.

Prague is awesome. A beautiful city that offers a lot of fun. We even got the weather! The Congress Centre was kind of spectacular and the food was amazing.

Prague Congress Centre

You can have a lot of fun in Prague, partying on the 24th floor of the Corinthian was FUN and Halloween is celebrated in style!

Plenty of Fun

Although there was so much good work going on at the conference there’s still this kind of out-there, wacky, punky vibe too. The keynote sing song was amusing and surprisingly The chill out zone was cool and useful to rest the head after a late one the night before!

The amount of swag was crazy, I can’t say no to a free t-shirt!

Hand Luggage Struggles

There’s so many smart, enthusiastic and decent people working on this. I kind of knew about the smart and enthusiastic side but I was pleasantly surprised at how decent the people I met were — friendly, approachable, cooperative and mostly non-egotistical. Really different from attitudes I’ve experienced elsewhere.

I need to dive in even more and start contributing.

Also-prepare for Devcon V!

Ethereum — Vyper Development Using Truffle

Why Vyper?

Vyper is a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM)

Vyper is a relatively new language that has been written with a focus on security, simplicity and audibility. It’s written in a Pythonic way which appeals to me and as a more secure alternative to Solidity I think it has a lot of potential. I plan on writing more about working with Vyper in the future.

Truffle — Too Much Of A Sweet Tooth?

I’ve recently finished working on a hackathon project and completed the 2018 ConsenSys Academy and during that time, for better or worse, I’ve become pretty accustomed to using the Truffle development environment for writing code, testing and deploying— it just makes life easier.

So, in an ideal world I’d like to use Truffle for working with Vyper. After a bit of investigation I found this ERC721 Vyper implementation by Maurelian who did the work to make it Truffle compatible. I thought it might be useful to document the build process for use in other projects.

How To — Vyper Development Using Truffle

Install Vyper

The first step is to make sure Vyper is installed locally. If this has been done before you can skip — you can check by running the $ vyper -h command. There are various ways to install, including using PIP, the docs are here. I’m using a Mac and did the following:

Set up virtual environment:

$ virtualenv -p python3.6 --no-site-packages ~/vyper-venv

Remeber to activate the environmet:

$ source ~/vyper-venv/bin/activate

Then in my working dir:

$ git clone https://github.com/ethereum/vyper.git
$ cd vyper
$ make
$ make test

Install Truper

Next I installed Truper, a tool written by Maurelian to compile Vyper contracts to Truffle compatible artifacts. It uses Vyper which is why we installed it previously. (See the next section for details of what it’s doing). To install run:

$ npm i -g truper

Compiling, Testing, Deploying

From your project dir (you can clone the ERC-721 project for a quick test).

Run ganache test network:

$ ganache-cli

Compile any Solidity contracts as usual using:

$ truffle compile

Compile Vyper contracts using the command:

$ truper
* this must be called from the project dir and you must have the virtual environment you built Vyper in running.

Truffle tests can be written and run the usual way, i.e.:

Use artifacts in test files:
const NFToken = artifacts.require('NFToken.vyper');
Run tests using:
$ truffle test

Truffle migrations also work the usual way. For example I used the following migration file to deploy to ganache:

2_deploy_contracts.js
const NFToken = artifacts.require('NFToken.vyper');
const TokenReceiverMockVyper = artifacts.require('NFTokenReceiverTestMock.vyper');
module.exports = function(deployer) {
  deployer.deploy(NFToken, [], []);
  deployer.deploy(TokenReceiverMockVyper);
};
$ truffle migrate

What’s Going On

Truper uses Vyper which is why we installed it in the first step. If we look at https://github.com/maurelian/truper/blob/master/index.js we can see Truper is creating Truffle artifact files for each Vyper contract and writing them to the ./build/contracts folder of the project.

Truffle Artifact Files

These *.json files contain descriptions of their respective smart contracts. The description includes:

  • Contract name
  • Contract ABI (Application Binary Interface — a list of all the functions in the smart contracts along with their parameters and return values). Created by Truper using: $ vyper -f json file.vy
  • Contract bytecode (compiled contract data). Created by Truper using: $ vyper -f bytecode file.vy
  • Contract deployed bytecode (the latest version of the bytecode which was deployed to the blockchain). Created by Truper using: $ vyper -f bytecode_runtime file.vy
  • The compiler version with which the contract was last compiled. (Doesn’t appear to get added until deployed.)
  • A list of networks onto which the contract has been deployed and the address of the contract on each of those networks. (Doesn’t appear to get added until deployed.)

Maurelian describes it as a hacky stop-gap but it works so thank you!