Devcon 3 report: Day 4 – p2p tech

Other reports:

Today’s sessions covered a lot of secure messaging (Whisper / PSS), some swarm, and a couple of sessions on real world supply chain / logistics applications

Whisper: Achieving Darkness – Vlad Gluhovsky
Imagine a world where defensive technology always won. World would live in harmony. Lots of harmony and liberty for all
Want to help “achieve darkness” with whisper.

Whisper is a messaging system designed to deliver darkness at high cost.
Darkness is when no meta-information has been leaked. Plausible deniability.
Is an integral part of Ethereum. Off chain. The underlying Ethereum communication protocol takes care of delivery. It is a gossip protocol. Every message is delivered to every node.
Message is forwarded on, node can’t decrypt it, passes it on. When the message does receive a message that is for them that they decrypt, the node still passes it on so that no one knows it was the final recipient.


Spam prevention uses proof of work.
Ephemeral identities. Decentralised. Built in steganography. Darkness
Is high latency, high traffic, high processor load, high memory usage. Need to try and decrypt messages even if they aren’t addressed to you (is the only way to find out if it is to you).
The topic is 4 bytes of arbitrary data. Used for probablistic message filtering. Will be used for routing in version 6. Topic collisions are expected and required for plausible deniability. Is just there to help you get a subset. But you don’t want to reduce darkness too much.

Recipient: should forward all messages
Sender: maintaining noise by sending random data sometimes. So that metadata isn’t leaked by only sending messages when it is a real message.
One directional logical channels
Can do symmetric and asymmetric encryption.
Whisper is tech agnostic. Can use on any network.

Need to pad messages with random data to not leak metadata.
Additionally you can use steganography to hide messages in the “random” message padding



Using Whisper and IPFS to improve customer experience in a P2P marketplace – Michael Thuy, Stefaan Ponnet
Consumer facing dapp without users worrying about blockchain, EVM bytes, etc.
Will talk about creating IPFS consortiums to help ensure data is pinned and available

If you want to create a Dapp which is completely decentralised, you still need storage. Need to make sure data is retained long term on IPFS. Got people in an IPFS consortium who help out by cross pinning each other’s data to keep it retained.
Created a IPFSProxy.sol contract to handle the cross pinning.
Contract that has functions to add and remove hash and broadcasts events when hashes are added/removed.
Run a proxy listener on IPFS nodes to know what to pin/unpin.
Other contracts can call the contract to add/remove pins.
Can trigger a pin via a couple of mechanisms e.g. whisper
Individual supporters can run the proxy script at home.


Gas station
a way for users to get some gas to be able to use Dapps. Most Dapps are solving this by giving some free gas via a faucet. But difficult to restrict it from being abused.
Made a contract that holds eth/gas, can swap tokens for gas.



How to build a real world supply chain ecosystem using the Main Ethereum Network – Giuseppe Bertone

Easier for you to read his slides than me retyping it out



Building consumer facing interfaces for trust in supply chains
is from Consensys.
Give consumers on the supply chain of an item. Disclosing how you make your product and the craft that goes into it.
Based on verifiable claims. The claim and the verification are 2 separate things

Bringing verifiable claims to the supply chain.
Business claims. Could claim you are independent or family owned. Could claim this by linking to your company registration.
Organic certification requires getting a person to come out to your farm, check the process, then give you a PDF certificate. Show that PDF to other companies to prove your organic status. Gives you the rights to put the logo onto your products.
Moved the organic database into the blockchain. Can move from just a logo on a pack to something you can scan and verify.


An issue they had in the old system was that more fish were being sold than had been certified (fraudulent fish). They made an easier way for fishermen to register their catch on the blockchain, and then associate it to the fish.


For flowers, created an app so you could see the entire logisitcal history of where it has been.
Same with coconuts



Next batch of sessions I moved into the breakout stream for p2p technologies

[p2p] Breakout Session on P2P technologies: Introductory Remarks – Viktor Trón

Ethereum for the “world’s computer”
Swarm for the “world’s hard drive”
he called this a Swarm workshop. I may get ranty again.

Swarm has continued to grow in scope (feature creep) and is well beyond its initial spec of file storage.
Real time apps need communication, so want to build PSS
Need an incentive system, so are building Swap (this I agree with)
Are now creating their own payment channel system……..

there is so much scope creep!
Creating their own decentralised storage, incentive system, messaging system
Now they are creating their own payment channels?

I absolutely love and agree with the end result. But this team really needs to scale back, focus on the core value prop (Swap for node retention incentivisation) and do a lot more module reuse from other projects like uRaiden, IPFS, etc.



[p2p] – Swap, Swear and Swindle games – Viktor Trón, Aron Fischer
Framework to incentivise all distributed system.
Grew from a small micropayment system, to a more complete system.

Swap is the protocol which tracks what services are provided and consumed. Is on a per connection basis. Nodes keep track on usage of its peers.
Type swarm address bzz://somesite
Receive data from peers and compensate them if you consume more than you send back.
Can track the payments off chain. Can keep collecting cheques from a channel, only need to keep track and eventually push the last one onto the blockchain for payment.


Cheques are just a promise, not an actual locked in payment.
The system can be extended into a payment channel with stronger assurance.
Chequebook system can be extended to cover other forms of financial instruments. Bounties, bonds,

Swear is saying what services you can offer
Swindle contracts are the enforces of service promises.
The point of the swap and swindle game, is to securely list and provide services.



[p2p] – How Truebit can leverage PoW + PoA to solve for visa-scale transactions – Zac Mitton
Has been doing research on Merkle computers, as TrueBit
Ethereum scaling strategies.
Blockchain isn’t scalable, because all full nodes need to execute all transactions.
Solution is to find a way to not require every node to execute every transaction (such as sharding, side chains)

Truebit allows for provable off chain computation.
Break up the execution of the piece of work into many many tiny sub parts, each are small enough to be executed within the Ethereum gas limit.
Run it off chain, publish result to blockchain. Others can verify and challenge if they disagree. Then a proving game starts where both parties say at which point through the execution do they disagree. A billion operation execution could happen in 30 verification transactions on chain. The dishonest person pays the penalty.



[p2p] – Web3 Goes Live – Livestreaming Video on the Peer-to-Peer Internet – Eric Tang

Live streaming today needs a lot of infrastructure to support the bandwidth requirements, processing into multiple streams, pushing to CDNs. Large costs on bandwidth.
Peer to peer video can help reduce costs on popular streams by peer sharing.


The future is to move to a decentralised live streaming model


His suggestion is to use a crypto token service. The nodes that are providing service earn tokens. People use tokens to broadcast on the service.
Nodes can be supplying bandwidth. Or they could join the network as transcoders and offer that service for tokens.
Nodes can do the transcoding, provide merkle proofs for what they do. Can be verified, so that they get their payments (can use Truebit or Oracalise for example)



[p2p] – Streamr stack for P2P data transport and off-chain analytics – Henri Pihkala
Streamr is for streaming raw data feeds. Like IoT sensors, temperature. Creates a data stream economy.
Want to create a marketplace and make it like an “app store for data streams”



[p2p] – Self-sovereign BigchainDB data injection in smart contracts through the Jolocom Identity Gateway – Dimitri De Jonghe, Eugeniu Rusu
Decentralised data gateway for Ethereum
BigchainDB is a “planet grade database”.
A lot of our personal private data is in data silos owned by corporations.
Combination of private data + public claims.
If you know where your data is being stored, you could grant/revoke access.



[p2p] – PSS – Node-to-node communication over swarm
stores chunks across many nodes. Then nodes can retrieve from nodes. Has a routing algorithm to try and be more efficient.
PSS uses the same kind of logic, but for message passing instead of files.
Node addresses are generated as a long string of bits. To randomly split up the network. Nodes think of neighbours as being “close” by how similar their bits line up. Completely ignores the concept of geographical closeness. May not be geographically efficient, but is efficient with routing.
Messages are forwarded from node to node. Compares the address to its respective peers, then forwards on to a node in the correct direction (closer number of bits).
Messages are cached on the node, so it knows if it has seen it before.
To help mask metadata of who was the intended recipient, as you get closer to the correct node, forward it on to additional nodes. Final node passes it on so you don’t know it was the last one.
Using the Whisper encryption and message envelope.
Uses the same Whisper message padding to hide metadata



[p2p] – Workplace messaging using PSS – Shane Howley, Carl Youngblood
Company name is mainframe (that will be fun to try and find any documentation online).
A fully decentralised messaging system. It is alike a decentralised Slack with privacy.
Can be used with a company and also secure cross organisation communication.
Help guard against corporate espionage. Helps protect against accidental leakage.
Mailboxing service.
Swarm node. Exposes a GraphQL API. (there is some pretty cool tech under the covers)


Add contacts via their public key. Then can start sending messages



Designing IoT Frameworks Using Ethereum – Shuang Liang, John Gerryts
, lightweight pub/sub message transport. Designed for sensors with low bandwidth channels
Wanted to combine with Etherem to get trust and global identity.
MQTT-Trusted combines them.


uDapp (miro dap)
Sounds like it is a standard Dapp? Files stored on IPFS, etc. Think the only difference is saying that the uDapp device is running on a IoT device like a car.
Use Geth client in light sync mode. Then use MQTTT for messaging (instead of Whisper)
Wrote a Nodejs library for SoC to access HSM (hardware security module)



AKASHA: Unveiling The Next Experiment
to make a decentralised social network that isn’t centralised (like Facebook, who own your data).
Collective memory and freedom of expression back into the hands of people
Uses Ethereum & IPFS


Every user needs to burn a small amount of mana to interact with the network.
You lock your AETH token for a small period of time, get mana. Burn mana to do things. Mana regens over time.


But then they read from Vitalik that most tokens are useless. They need sinks, not just flows. So now they are re-evaluating everything. Trying to figure out what “Token 2.0” is


Devcon 3 report: Day 2

Other reports:

Today’s sessions I suggest you watch are: “The future of token contracts” and “Raiden network” as you can start using µRaiden now in your apps (and there is a cool demo of them using payment channels to control a robot)

Developers, Developers, Developers – Peter Szilagyi 
Ethereum is currently a developer tool written by developers. Isn’t easy to get started.
Usually developers start doing Solidity in a browser
Then migrate to using a local dev framework work VS Code + Truffle
Then deploy to a test net (but test net has a bunch of issues with stability and spam attacks)
So spin up your own network which is “difficult” (Or you could just deploy a private testnet on Azure 😛 )
They have built Puppeth to help make private networks locally.

Step 1. Genesis file
Genesis file is difficult to hand code.
With puppeth you can run the CLI wizard to generate it for you. Answer 5 questions, network name, consensus algorithm (PoW/PoA), etc.

Step 2. Config Ethstats
Use puppeth to deploy your own Eth server, and have it set the config files

Step 3. Boot the network
Deploy a bootnode to a new server using puppeth.

Step 4. Add some miners
Again, just use Puppeth to add a new network component, miner.


Step 5. Block explorer
Currently no open source block explorer that supports Geth, but there is one that uses Parity.
Use Puppeth to add an explorer to a new server.

Step 6. Give someone a wallet
Deploy a new network component, wallet. Deploys MyEtherWallet to your network. Configures it to have the web UI default to your network.

Step 7. Faucet
Deploy a new network component, faucet. Deploy it again to the same web server.
Configure how much ETH it gives out, per X minutes. e.g. 1ETH every 15mins.

Step 8. Allow external people to access
Deploy a network component, dashboard.
Select everything you want on the dashboard (faucet, wallet, ethstats, etc.)
Select to make it public
Gives a page on how to connect a Geth or Parity node, android apps, etc.

Walleth deep dive – Marcus Ligi
He likes Android. There wasn’t a wallet that he liked. So he decided to make is own.
Spent first 5 mins explaining why he put it on Android and not iOS. Can link a Tezor hardware wallet. You can select day/night theme.

Status: Ethereum at the edges of the Network – Jarrad Hope
Status is a hybrid mobile messenger and dapp browser.
Decentralisation matters. In Catalonia during the vote, they put the storage on IPFS, but there was a main centralised HTTP website for the average user to access, which was blocked. So people needed to go download TOR to access.


Status tries to help 1st time users with nice welcome screens and walk throughs in the app.
Try to stay out of the way, don’t get users to backup their key phrase, until it actually has value in it. At which point they explain to the user what to do and why.
To help users secure it, are releasing an open source standard for a hardware wallet. Java card based. Can sign, etc.

Have a discover protocol, to help sort through their contacts. Uses stats like how much they have interacted or chatted with a contact or Dapp to help build up it’s reputation, to protect against phishing. By building webs of trust. Users Whisper for messaging transport. An issue with whisper is that both parties need to be online. If one is offline the message just goes nowhere. Have a status message box where users can select where to cache messages.


Are releasing desktop app version on MacOS & Windows.
Their next steps are to work on optimisations, security audit, identity, etc.

Evolving devp2p – Felix Lange
Devp2p provides a lightweight abstraction layer for ethereum protocols. Covers node discovery, transport, application layer.
If you have a node that wants to join the network, it connects to the DHT to do discovery. Can see other nodes that have registered on there by their enode://. Then your node tries to do a TCP connection to one of the listed nodes.
They do a protocol handshake to check shared capabilities. Then check both are using same network id & genesis block. Chatty, requires lots of round trips. Network communication upgrades are tied to hardforks.

In the new version they want to achieve 2 things
Find nodes more efficiently, know more about nodes before attempting to connect.
In the DHT replace enode:// with an Ethereum Node Record which has location and capabilities.
Once you can put capabilities into ENR, then can experiment with other transports like IPFS/libp2p.
Want to add a requirement of endpoint proofs, to reduce dead/spam nodes listed in the DHT.

EVM-C: Portable API for Ethereum Virtual Machines – Pawel Bylica
There is the EVM, but there is a EVM API over the top of that that you interact with.
ECM-C is an API written in C to interact with it.
Wrote it in C as it can be ported to many platforms.
Allow you to switch EVM implementation at run time (e.g. v1 or v1.5)
Could allow run time smarts, like having a generic EVM that does JIT for contracts that are run infrequently. And an EVM that compiles bytecode into native code for faster execution, more upfront cost, but useful for frequently used contracts.
Point is to take the API calls and implement them, to make it easy to experiment with different EVMs


The EVM: Cleaner, Meaner, and Closer to the Metal- Dr. Greg Colvin
Works on possible successors to the EVM to help with performance.
Uses some standard benchmarks to check performance, around rc5 encryption, ecmul elliptic curve multiplication, and base EVM ops like add, sub, mul, div, exp. Just to give a base level to work from for each implementation.


What is causing the interpreters from reaching the native speed of the C++ implementation?
Interpretation, 256 bit registers. Unconstrained control flow.

EVM 1.5 restricts & extends current EVM. Provides opcodes for native scalar & SIMD vector types. Restricts unconstrained jumps which are hard to predict.
EVM 2.0 provides opcodes for structured control flow. More opcodes for scalar & SIMD. Validates control flow, type safety.
EVM 1.5 & 2.0 should be compatible. Can be transpiled between the 2 of them in linear time. Transpilers could live on the blockchain.

PANEL: Evolving the EVM


Talk about 64bit, 256bit, register sizes. Do pre-compiles help.
Academic arguments, talk was disjointed.
Transpiling is good/bad. Jitting will never be useful, yes it will.

Ethereum Security – Martin Swende
Security lead for Ethereum Foundation


Were lots of DoS attacks, testnet attacks, etc.
But by analysing the attacks after the fact they can learn from it.
Have added monitoring nodes to the network which graph stats. Through that found there were some inefficiencies around TX, which they have improved by 20-30x

Have put debugging features into the EVMs, so they can dump an opcode by opcode execution from them all, to confirm they are all implemented the same. To prevent consensus issues.
Created a transaction inspector, that allows them to see the memory contents of the EVM as they are executing. Helps to repro and analyse how attacks work. Allowing them to create fixes.

Started using fuzzing to randomly generate test cases. Execute across all EVMs, confirm with the dumps that all the clients are the same.
Clients are more tested now than ever before in history. Millions of evmlab/testeth-fuzz tests, billions of libfuzzer tests

Swarm Development Update

<warning, I get ranty about Swarm, my same arguments as last year. At bottom I add links to a comparison>

Swarm is a distributed file system. Takes a file, splits into 4k chunks, distributes over the nodes.
Swap is the incentive protocol.
Have released a PoC. Shows that the basic idea works, but it is slow. Frequent issues with trying to retrieve files.

Same question I had last year. We already have IFPS which has a solid tech, lots of mindshare. Why not just use IPFS tech, get the bonus networking effects of utilising IFPS servers for more chance of a file being available. Swarm team can just focus on the SWAP incentive protocol instead.

PSS is a message passing protocol. Messages are encrypted. The recipient can decrypt.
Is very similar to Whisper. In fact it uses Whisper under the covers. I asked the teams after why the duplication of Whisper & PSS. They said Whisper is like email, PSS is like instant messaging. Different speeds and guarantees. 

Built a FUSE extension to sync a filesystem directory to the cloud and to another device
They built an encryption system on top, encrypts the data and the merkle tree.
Swarm network simulator, to test what happens when nodes come on/offline. Consume without giving, bad behaviour, etc.
Upcoming swarm features: new syncing protocol. Complete rewrite of network layer. Are all breaking changes so everything will be wiped. Light swarm node. Extensible incentive system (swap, swear, swindle)


<<rant incoming>>

“people are using Github which is centralised. We want a plugin for swarm so it can host a decentralised git”
IPFS did this years ago.

“sync a folder / FUSE module”
IPFS had this years ago?

Swarm team seems to want to just build/rebuild their own stuff instead of just utilising what is out there. What is the reason behind all this?
IPFS can even read Ethereum blocks with the libp2p extensions

<<Rant update>>

Later I was forwarded this Swarm/IPFS comparison writeup done by the author of Swarm

Was a good write up. The swarm author very was fair.
Seems there is 90% overlap. Just organisational mismatch.

I do like the proposed integration points for the future:
· Layer the swarm incentives over IPFS, or make it simpler and compatible.
· Mounting IPFS over the transport layer (RLPx) of devp2p

Having network compatibility massively increases reach 🙂 I hope that Swarm does implement some integration.

Scalable Responsive Đapps with Swarm and ENS – Daniel Nagy
Dapps. Large parts of the business logic are done on the client side.
Web based / mobile apps / IoT, front ends. With a backend of ETH node (or light client), swarm for files, whisper for node to node communication.

Consumers spend ETH or tokens. Have a high churn rate, have limited resources.
Suppliers earn credits, low churn, high availability, more resources.

Dapps are limited by Blockchain transaction speed. Need to pay to submit state changes.
Limited to how much work an individual node can do on behalf of a Dapp. Can’t have all clients talking to same node.

For storage, keep data in swarm. Put the root hash in ENS.
Transaction bottleneck could be overcome with Raiden style updates to ENS.
Broadcast bottleneck, use PSS with pub/sub

Can combine these technologies to improve the perceived responsiveness of your Dapp.
If people are in a chat room, use message broadcasting to keep them live up to date. Then use the Blockchain for the eventual consistency for people who come and load the page later.
Could use root hash of all the chats sent, which are saved on swarm. Do aggregation on the client side, rather than complicated updates.
Can roll out new versions by pushing a new version of Dapp files to Swarm/IFPS. Then update ENS with new root hash.

The Future of Token Contracts: MiniMe, Governance, LiquidPledging & ERC223 – Jordi Baylina
MiniMe contract. Is an ERC20 token. Has been used by distroc0x, giveth, swarm city.
It tracks the token distribution history on the Blockchain. Means that the token is forkable. Means you can create a new token whose distribution is the same as the cloned token. After the fork, each token is independent of each other.
Example use case means you could take an existing token, clone it, have the cloned tokens as burnable votes whose distribution is the same as the original token holders. They can now vote.
Instead of voting, they could be discount coupons.
Means that you could upgrade tokens by cloning with a new code base, and deprecating the last token contract.


Future of tokens: ERC20 is a little broken. Look towards ERC223. Only pending issue is backward compatibility.
EIP672 is a proposal to look up capabilities of a contract. Means if you had an ERC223 contract, it may not support some ERC20 functions, but if you look up the capabilities, you can see there is a proxy contract that can handle that functionality.

MiniMe+ERc223 = Yoga Token.
He wants it to be the new Standard Ethereum Token. As it has the new ERC features, plus the MiniMe features of cloning.

Liquid Pledging.
It is a combination of Liquid democracy and fund management. You can manage your tokens, and someone else’s tokens on their behalf. To handle voting.


Designing Future-proof Smart Contract Systems – Jorge Izquierdo
Aragon is a platform for Decentralised orgs. Allows extendibility via third party on-chain modules.
How to ensure that contracts are future proof. Dumb contracts are the best. EVM is expensive, optimise for gas savings. Contracts need to be upgraded eventually.
The goal is cheap, upgradable, and very simple contracts.
Upgrades need to think about governance. Not just 1 entity is in charge, let people vote on the upgrade.

Solidity libraries are one approach, but they are linked in at compile time, can’t upgrade.
Instead you can link to a proxy library that would forward onto real library. But problem was you couldn’t modify ABI to add new functionality.

Delegate Proxy. EIP211.
Static forwarders are another way to deploy cheap “clone contracts”.
Solidity forwarders another.
Upgradeable Proxies (from Nick Johnson’s upgradeable.sol)
They are using AragonOS. Has a tiny kernel contract, with upgradeable mini business logic contracts.

Panel: USCC – The Underhanded Solidity Coding Contest
Ran a competition to write smart contracts that look innocent but were malicious. The theme was token sales.
One entry used a feature where you can send a header without triggering contract execution? Used it to exploit the token sale contract he wrote, where the token cost was based on when
2nd entry Suicide bug. Crowd sale, the issuer gets 1ETH 1st week, 2ETH the 2nd week, 4ETh the 3rd week. So that they’ll get paid based on performance. But it is based off this.balance so if you figure out where a contract will be deployed. Send ETH there first and THEN deploy a contract, funky things can happen.
3rd entry Exploiting something in the ABI, could make the parameter one value type, then pass in a different type. Use that value in a loop for dynamic arrays. It isn’t exploitable using normal tools, needed to generate your own ABI to pass the data in.

If you see this.balance, it is a red flag. May not be what you expect it to be.
Random numbers are a point of failure.
External calls are another security edge.
Don’t build giant inheritance models, makes it more complex to reason about.
Think about miner front running.
Maybe we need analysis tools over the bytecode
Check the Consensys best practices guide

Hardening Smart Contracts with Hardware Security – Nicolas Bacca
Maybe an incorrect title. The session was about secure hardware devices, and the low level details of how they work on the device CPUs for trusted execution.

Secure hardware is an isolated environment for secrets and security sensitive operations. Proof of execution on a hardware and of its health.
Unfortunately current hardware microcontrollers have NDAs or binary blobs which aren’t auditable. No real open hardware yet. But are getting more open.
Spent time going through many slides showing how hardware security devices work. With isolated data, and on chip app domains that can only access their own secrets. Covering how ARM does it, SGX, etc. Too technical to write here.


Raiden network
Scalability solution for Ethereum. HTTP RESTful API.
Raiden is a separate process that communicates with an Ethereum node over RPC.
Currently only supports ERC20 token transfers.

Step 1 connect to a raiden network.
Tell it how many tokens it is allowed to use. It will handle the channel management automatically. But can handle manually if you need. Can then deposit more tokens, or close the channel.

Step 2 can make transfers
Just do a POST to make a transfer. Need to include your own identifier, to help both parties know what this payment was for.

Step 3 react to events happening on Raiden network
Transfer received, transfer sent, transfer failed

µRaiden (Micro Raiden)

seems µRaiden is a simpler cut down version of Raiden which you can start using now for your own use cases.

Example of a token fuelled robot.
Set up a few channels, one for each direction the robot could move (forward, back, left right).
When the payments go through, the robot would move. Robot could consume the tokens based on distance moved.
When finished closed the channel and got the payment on the blockchain.
Video of the robot from 3:57:40


Towards a Permanent ENS Registrar – Nick Johnson
168,500ETH deposited.
8,500ETH lost through unrevealed bids and mistakes (0.3%).
1.4% of the owners own 50% of the names
One account own 17,500 ENS domains
Broad adoption across the ecosystem. In Metamask, My Ether wallet, etc.
Suggestion that instead of using ENS directly, users could go through a proxy contract that will filter out a blacklist of known phishing accounts.
Will be using DNSSEC so that people who own domains can own those domains on ENS?

Devcon 3 report: Day 1 – core systems

Other reports:

The 2 talks to watch are: “Regulatory update and look ahead” (covering a security is) & Vitalik’s talk at the end of the day on scaling/sharding & Ethereum 2.0.

Format for the week will be:
Day 1 is core tech
Day 2 is research
Day 3 is Dapps
Day 4 is ?

Ethereum team introduction

Vitalik – Founder
We are working on research into what the future of Ethereum will look like, to support the future of Dapps.
Working on Casper, scalability, etc.

Martin Swende – Security Lead
Is across all the projects, to try and keep across security issues. Especially the network protocol.

Peter Szilagyi – Geth team lead
Since Shanghai Devcon 2 last year.
Released mobile library.
Made a new P2P protocol for private networks
Released a light client version
Added Proof of Authority to the plugable consensus, and it is being used by one of the testnets
Focusing a lot on performance bottlenecks.
Reduced DB size by 50%, syncing time by 60%

Zsolt – Geth, Light Client dev
Made lots of progress on light client (syncing, log searching, p2p discovery, etc)
Looking forward to the production release

Dr. Christian Reitwiessner – C++ client / Solidity team lead
Looking to get C++ client working again
Snapshot syncing. Removing race condition bugs.
Improvements to EVM, v1.5
Working on ZK-Snarks

Yoichi Hirai – Formal verification Engineer.
Writes mathematical proofs
Followed the Metropolis changes, wrote test cases against the implementations.
Helping to prove Casper. Will talk further on this later today

Alex Beregszaszi – solidity, eWasm, ethereumJS
Solidity changes so far: Function types, contract metadata, new compiler interface
Solidity futures: new language, new formal verification checker (snt checker?)
EthereumJS – support for Byzanthian fork. Important as other projects rely on it like Remix.

Yann Levreau – C++/Remix developer
Remix is a web based IDE.
Working on improving UI and backend code.

Piper Merriam – Python team lead
Established a spec for packaging smart contracts, and looking to get that implemented across the ecosystem
Responsible for a lot of the Python tooling. Working on bringing it’s quality up to par
Working on an alternative EVM called pyEVM
Looking to bring it online as a new light client

Viktor Tron – Swarm team lead
Swarm has grown beyond the intial scope of a flie store for Ethereum, now covers high bandwidth communication
Tomorrow session will be the main session on it
Developed a network simulation to check things like high node churn.
Main initial release will be around cloud storage to sync between their devices.
3rd party application uses, like live audio streaming.
Working on privacy and censorship resistance communication.

Vlad Gluhovsky – Whisper lead
Whisper is meant to deliver data. Want to make sure no data or metadata is leaked. Tomorrow will talk about this

Everton Fraga – Mist team lead
Been working on bonding some other projects into the Mist browser.
Working on making it more scalable. More info in Friday’s session.

Fabian Vogelsteller – Mist, web3.js
Will do a session later in the week on the 1.0 refactor.
Proposed a new ERC 725 – around identity.

Regulatory Update and look ahead – Jerry Britto
HIGHLY suggest you watch this session if you plan an ICO or any serious Blockchain Dapp

Coin Centre seek to educate policy makers
Year in review:

  • Uniform Law Commission – supplements the money transfer license. Helped define what “control” means, to help be clearer who needs a license. Only if the company “controls” the currency, helps with some exemptions. Defines who is an intermediary and need regulation
  • Helped deliver a bill into congress around tax – examples like using ether to pay for a smart contract execution is technically taxable
    any transaction below $600 you don’t need to track.
  • FCC – talked about securities and tokens.
  • Potential terrorist use of cryptocurrencies – put on a demo day to help educate members of congress. Conclusion at this point, it is a serious potential threat, but isn’t an issue at this moment.


Characterizing issues on the horizons:

  • Regulatory hotspots around securities regulation & AML (Anti money laundering)
  • AML law boils down to Is the token being used as a currency substitute. Is there a centralised issuer tho can also withdraw from circulation. If yes, they are an issuer. Otherwise they are an exchange (like Bitcoin/Ether)
  • Securities law boils down to: is the thing being sold as an investment. Is there a person upon who investors rely?
    No one person is relied on around gold. But a share/stock of Apple is a security, as you rely on the company.
  • Issuer vs. Network
    Money goes in, more goes oug -> Investment
    Money goes in, utility goes out -> Network



Super useful diagram of what is a security.
Coin Center is helping to suggest that FCC should focus on investments controlled by a single issuer, to help protect people, but leave the rest of the ecosystem open.

Ethereum in 25 minutes – Vitalik


In 2013 blockchains are useful for ‘stuff’. Not just money but for thigns like Asset issuance, crowdfunding, domain registration, IoT, voting, etc. More than just transferring BTC
Original Blockchains were single function.
Why not make a protocol that works like a programmable smart phone. So that a single blockchain can run multiple use cases / apps. General purpose computation.
Smart contracts that could control digital assets. When to release assets to other people.
Also to program other business logic, like voting, ENS, etc.
Every transaction specifies a TO address. The code at that address executes. Code can send ETH to other contracts, read/write storage, call other contracts
Every full node on the blockchain execute all transactions.
Halting problem was an issue (e.g. infinite loops). So gas was implemented to help constrain it. Charge a transaction fee per computational step.
Logs are an append only data, not readable by contracts. 10x cheaper than storage. Up to 4 topics for bloom searching. Intended to allow efficient light client access to event records (things happened)
You don’t write in DVM bytecode, instead you code in Solidity, Viper, LLL, Bamboo.
The ABI describes the function calls available on a contract, so that clients can call into it.
Byzantium introduced some precompiled functions to verify: Ring signatures, ZK-SNARKS, RSA
Also added new functions like assert(), revert(), require()

Future directions for core Ethreum: Casper, Sharding, EVM & protocol upgrades.
Are still other things in broader ecosystem like Plasma, state channels.

Methods for deterministic parallelizing message processing – Martin Becze
started in ewasm. Plan was to build off web assembly instruction set, to add in metering.
Issue was that you had to run transactions sequentially, not concurrently.
Is a layer that sits between VM instruction set and consensus mechanisms.
For scalability, need to apply locality.
Right now all contracts exist in the same namespace. One way to impose locality could be that each contract has subcontracts that only it can access. Means the subcontracts could all be executed in parallel as they can’t effect others directly. Problems with nested contracts. Inflexible, inefficient.
Next approach Try to build up a graph of how contracts interact, then use that to define shard boundaries. Can create a bigraph from this.
Got very very technical from here on, about different messaging strategies to try and break tings up and be more async.

Practical applications of off-chain computation in the light Client ecosystem – Zsolt Felfoldi
Do computation, do a validation process to verify it.
One application is for event filtering for history searching. If we shard or do state channels, there is going to be a hierarchy of data that needs to be searched.
Currently uses bloom filters. But in a bloom filter you’d need to filter through 4million+ blocks reading all headers (currently 2.2GB). Light servers can search and present it to light clients, but clients need a way to validate it. Bloom trie root hashes can be interactively validated on chain.
Users want to observe multiple subchains (when sharding) and get notified by new events using a complex filtering criteria. Light clients can hire a full node (light server) to validate and certify a subchain. Client specific event filtering can be done server side.
Chain filters. Deterministic operations on an input chain.
Observer chain: belongs to a single node, processes multiple observed chains. Checks the current best heads of observed chains.
Building a filter hierarchy. Observers can build on top of other observed chains. Can have base ones filtering out bulk of stuff, and then further layers refine it further.
Build up a market of services for light clients.


Parity: A Light client for heavy chains – Robert Habermeier

Ethereum clients currently can be defined broadly as:
Full nodes – they check and verify everything. But storage and computation requirements are heavy.
Light client – verify block headers, but not checking transactions. So checking that mining consensus is working.
Thin client – isn’t checking consensus, relies on others to do it for them.

Light clients check validity of headers. Does not check validity of state transitions. Might lead to some targeted attacks, attacks wouldn’t work on full network which is validated, but targeted to a single client.
Protocol goals: minimize roundtrips and bandwidth required. Full nodes are serving data to light clients, need to think how to present denial of service
Put multiple requests into the same request package (I need block X and account Y).
Can use state proofs to get a subset of a state tree.
Metering system, using request credits. Each node can come up with their own pricing. Different requests have different costs.
The average person won’t run a full node, but we need them to support the network of light clients. Needs an incentive system.
Pub/Sub for events. Reduces polling and excess work.
Warp sync: Users usually don’t care about really ancient data. Can just jump to more recent blocks. Ancient block download can happen later (e.g. when on wifi).
RPC pitfalls: on light clients some RPC calls don’t work.
Eth_getLogs can be very expensive if you are checking all history of everything. If just watching the head for events, is much cheaper.
Eth_get*ByHash the hash of the block has no info about the actual block number. So will need to search through the history and maybe forks or uncles. Lots of work to search
Eth_estimateGas need to check state proofs of multiple executions. Lots of computation to guess.
Lightclient+whisper+ecosystem. Light clients are viable for mobile devices (on wifi) whisper makes a powerful tool for messaging and medium latency state channels. Projects like status are already using this and showing how this can be done.
Looking at compiling light client into Web Assembly. Could embed into a web page.


Verifying Casper – Yoichi Hirai
Casper is the planned Ethereum Proof of Stake protocol.
There will be a capser contract on each (divergent) fork. Validators deposit ETH, when they do the right thing they get rewards, bad they lose ETH. Validators can vote for a block. Can’t double vote or they lose.
To avoid losing deposits, just need to be careful about what you sign. Will only really lose if you are doing bad things.
When a block has 2/3 votes from validators, then they are justified and later finalised.
Next 10 minutes is lots of mathematics diagrams. Track the ancestor blocks and votes and punish bad people who vote for divergent forks.

Sikorka: Proof of presence for Blockchain applications – Lefteris Karapetsas

Network of detectors that provide proof of presence. Different types of detecots exist. Contracts choose detectors depending on security requirements.
Users interact via a phone app.
Proving presence for bureaucratic reasons. AR games. Objects directly interacting with smart contracts (smart locks?)
Different detector types that the system can use, contracts select types based on security requirements.
One detector is the “Revealo temporal BLE tracker”. Provides accurate location, uses temporal keys to preserve privacy.
A super cheap detector could be a screen somewhere that generates a new QR code every 10 seconds that you can scan to show you were there.
There is a central Sikorka smart contract controller that indexes all the contracts. And a contract interface you can use to hook into the system.
Basic usage could just use your phones GPS (but can be spoofed).
More secure uses a detector. You interact with the contract to show you are near the detector.

Julia: IR (Intermediate Representation) for Ethereum Contracts – Alex Beregszasci
Why do we need an IR?
Complexity of auditing solidity contracts. Helpers & optimisations of Solidity. Porting Solidity to other VMs.
Auditing that the compiler did convert solidity into the correct bytecode is difficult. EVM bytecode is very cryptic to read.
Compiler pipelines usually go in 3 stages: parse/analyse, optimise, create bytecode.
But the solidity compiler only really does the 1st and 3rd. Smooshes it all together. Julia will sit in the middle to help support other functions.
Benefits are that more of the compiler can be moved out of C++ and written in Julia, for simpler reading.
Also means it is simpler to optimise code before generating bytecode.
Julia currently supports: typed variables, functions, switch statements, if, loops.
Will support output to EVM, EVM 1.5, ewasm, others (like outputting into JS or C for integrating into UI side)
Could get your own DSL to compile into Julia, which could then output into EVM bytecode.

Package management for smart contracts – piper merriam

Last year they got togther and proposed ERC190 smart contracg package spec
ERC190 deterministically create a package that is immutable.
Packages can include: sull source code, compiled assets, compiler info, ABI, address of deployed contracts, link reference info
Useful for public chains, but also for private chains.
Example of the simple inheritable contract.
The .json file of the package defines metadata, and a location of the .sol source on IPFS.
Your contract can have its own package definition, that has a dependency on another pacakge.
Package could not just store the .sol, could embedd the compiled bytecode, or just the deployed address so you can link to it.
Could use it in a wallet, import the package and it will give you the ABI that you can interact with.
Could combine it with ENS and have package indexes that list source of truth for contracts.

Programable incentives: An intro to cryptoeconomics – Karl Floersch
Blockchains have open access. Anyone can deploy a contract or send a transaction.
Trusted execution. All smart contracts and transactions will execute as defined.
Now we have programmable money.
Designing incentives. You can’t talk about blockchain consensus security without reasoning about economics.
So you can combine cryptography (hashing, signatures, etc) + economics (tokens, voting rights).
Want to use cryptoeconomics to enable good outcomes like trusted execution, and protect against censorship.


Example project: Market maker. A simple automated market maker contract.

  1. Design a mechanism
  2. Analyze incentives
  3. Make a website
  4. Observe behaviour
  5. iterate

Deploy a market maker contract with an initial deposit of ETH and tokens. Is an automated exchange to trade ETH for tokens. It will dynamically calculate token prices based on what is left in the contract. The contract owner will get some fees back.
Owner gets a passive fee income. But they have their capital locked up.
Token buyers are happy because they get small transaction fees, it is a trustless exchange.
Can come up with ideas, just deploy it out into production and see how it goes. Make sure you verify your source on Etherscan.
Allows anyone to just come up with ideas and get it out there.
Make sure you share your findings, so the ecosystem learns.

Casper the Friendly GHOST: A correct-by-construction blockchain – Vlad Zamfir

All the Ethereum proof of stake research projects are with the goal around finality safety.
Traditional consensus protocols decide on one block of transactions at a time.
Point of PoS is to incentive nodes to do the right thing. Need to prove that it is fault tolerant, and when there are faults, that it can recover (and penalise the bad actors).
Vlad just talks too fast and clicks back and forth through slides too fast to keep track of notes sorry.


Introducing the TrueBit Virtual Machine – Jason Teutsch

Is now deployed to testnet
Smart contracts can only handle limited computation execution time.
Truebit is a scaling solution for computation. Do the heavy work off chain. Uses interactive verification for large transactions. Help to bypass the gas limit.
Is an ethereum smart contract + a new off chain architecture.
Solver proposes the solution, submits it. Anyone can challenge it and put up a deposit. They play the verification game to see who was correct, loser loses deposit.
Computation runs in a TrueBit Virtual machine. Tasks must compile and run across all machines. The TVM breaks it down so that the smallest piece of execution can run on chain. For when there is a disagreement, the one step where people got a different result can be run on chain to determine the correct result.


Scaling Ethereum Smart Contracts – Joseph Poon

Many blockchains on a blockchain. Can bond your private chain to the public network.
Deploy a plasma smart contract to the main blockchain. Can now run your own child plasma chain. Periodically commit block hashes to the main chain contract.
Big changes can happen on the plasma chain, but just a tiny block hash is submitted onto main chain.
People can submit a merkalised proof if someone tries to commit an incorrect hash to the main chain.
If someone is withholding block data and isn’t letting it continue, then you can exit the child chain, have eth roll back up to the main chain, and then create a new child plasma chain
Could credibly securely spin out these plasma chains to scale computation for specific use cases. Like a Reddit comment chain, ebay chain.
The point is to encompass all worldside computation. Computation can be done on child chains, with final state committed to the main root chain.

ZoKrates: A Toolbox for zkSNARKs on Ethereum – Jacob Eberhardt
On chain processing is submitted as a transaction. Is executed + validated on chain.
Off chain processing, the transaction is executed off chain. Just the validation happens on chain.
Means that private information can be used without revealing it.
Truebit is one way of doing this. Another is using zkSNARKS
zkSNARKS, verification cost is independent of computational complexity. Short & non-interactive proofs.
Define computation as mathematical circuits. But is very complex to create these yourself.
I like thinking of this as: Hashes lets you verify large pieces of data as a small hash value. zkSNARKS allows you to represent a large complex execution as a tiny proof.

ZoKrates wants to provide tooling to make it easy to support zkSNARKS from end to end. And to integrate easily into Ethereum. It has a DSL to specify your computation, has a compiler into provable constraint systems, support for the phases (setup, witness, etc), and a contract to verify the computation on chain.
On chain verification currently costs about 1.6m gas.


Designing Maximally Verifying Light Clients and Sharding- Vitalik Buterin


Watch this session.

Subtitled as “a modest proposal for Ethereum 2.0 over the next 4 years”
Ethereum works. Many applications. High adoption >460k tx/day. Which is about 7tx/sec
Ethereum nodes worldwide. US has 30%, Canada 5%, Australia 2.8%
The Byzantium fork added in privacy preserving features, that will enable zkSNARKS, ring signatures.
Scalability is still a current challenge. Right now every node runs every transaction. And transactions are not parallelisable.
Sharding is a way to split up the blockchain state. Only allow async calls between shards. Each node only processes transactions for a shard, so a small portion of all network transactions.
Governance & protocol evolution has been a challenge. Hard forks making deep changes are hard. Long time to code, test, and a high risk of consensus bugs.
But we want to make some big changes to enable Ethereum 2.0 (EVM upgrades, more precompiles, etc.). How do we handle the trade off.

1 blockchain 2 systems:


Have a Validator Manager Contract. Runs a PoS system. Would keep track of validators, to join and leave as a validator. Each validator can gets assigned to shards randomly, can make blocks. Block making protected by rewards and slashing.
Connecting the shards go through the contract via messages.
Gives a way to experiment with this as a contract, with less risk on the main chain, and doesn’t require a hard fork.
Can evolve shards quickly, will letting main chain be more conservative.

Sharding roadmap


Having shards will allow experimentation with backwards incompatible upgrades:
EVM upgrades like EVM1.5 & ewasm.
Stateless clients

For stateless clients, consensus nodes would not need to hold state, only state root.
Would only need to submit merkle branches to submit state changes.
Means you don’t need to store and read state from disk any more. Makes it easy to shuffle validators around as they don’t need to sync down entire state, just accept merkle branches for changes.