eth-protocol-fellows / cohort-one Goto Github PK
View Code? Open in Web Editor NEWRepository for the second cohort of the apprenticeship program
Repository for the second cohort of the apprenticeship program
Hey everyone,
I'm Nicolas and I am in cohort zero (you can find my dev updates here).
As part of my apprenticeship, I started building nanoeth which attempts to be a super simple, super clean, super thoroughly-documented implementation of Ethereum's execution layer (everything that has to do with validating blocks & executing transactions).
There's one month left in my apprenticeship, after which the time available to work on this project will diminish drastically. I intend to keep working on it however - I think it's nice enough that it would be a shame to abandon.
This is where you can help. If you're interested in learning about something, why not implement it in nanoeth as a learning experience? Some ideas:
To be clear, if you have the opportunity to help out a team that works on something that is currently being used in the ecosystem, you probably should do that instead. But nanoeth might be an easier environment to try a thing or two, and I'd be happy to assist you if you have any questions.
Cheers, & hoping to hear from some of you!
There is a high level goal to improve the usability of base accounts on Ethereum. Today, EOAs are very limited in what they can do. There are two main camps currently to improving this situation:
Account migration -- some process that eradicates EOAs from the protocol
Protocol-level authorization -- an EVM change that allows EOAs to delegate control to smart contracts
Some reading material:
dm me on discord or twitter for more info
Efficient proof-of-stake light client designs are possible starting with the Altair fork of the beacon chain.
A project idea would be to prototype a beacon chain light client and help bootstrap the ecosystem around them, possibly starting with the spec here: https://github.com/ethereum/consensus-specs/blob/dev/specs/altair/sync-protocol.md
This project would be a great way to get your hands dirty with building a protocol client as you will need to touch all the various parts of "building a client" but the light client protocol is fairly self-contained and lightweight (by design!). I'd expect anyone working on this to leave with a great understanding of Ethereum's proof-of-stake consensus and a better understanding of the issues and concerns involved with building and maintaining protocol software.
Anyone who is interested in this should reach out to me and I'm very happy to discuss ideas further and/or can help guide efforts during cohort-one
.
When a client to the Portal Network executes something like eth_call
or eth_estimateGas
, they will typically be doing so without the actual state data, and thus, they will need to retrieve state on demand from the network.
The simple initial implementation would pause EVM execution each time state data is accessed, retrieve that data from the network, and then proceed with execution. This approach suffers from all of the data needing to be retrieved one piece at a time. We can do better.
Given a transaction payload, some collection of known state data (which might be empty), we should be able to predict a significant amount of the accounts and storage slots that will be accessed.
Lets pretend we have such a function:
def divine_access_list(transaction, known_state) -> AccessList:
...
At the very beginning of the transaction we can "predict" that the tx.sender
and tx.to
accounts will be needed, along with the bytecode for the tx.to
account. Once these values have been retrieved, we can call the function again, but this time with known_state
containing this account information and bytecode.
Now, suppose that the bytecode was something like:
PUSH1 0x00 SLOAD ...
From this, we can perform some very simple static analysis to know that we will be needing the value at storage slot 0
.
This logic could then be run in a loop that looked something like this.
# start with zero state
known_state = []
while True:
# figure out which state we're able to determine that we need
state_data_to_retrieve = divine_access_list(tx, known_state)
# if we cannot determine any additional state needs from static
# analysis then maybe we're at a dead end and can only determine
# the remaining needs via execution
if not state_data_to_retrieve:
break
# fetch the state from wherever we're getting it from and
# merge it in with the state we may already have
new_state_data = retrieve_state(state_data_to_retrieve)
known_state.merge(new_state_data)
This could be run alongside the EVM execution, passively determining values we are going to need and retrieving them, while the other process actually performs the EVM execution.
So the project would be to write a version of this predictive engine, and then to do some experiment with real transactions on mainnet to measure how effective it can be at predicting what state will be needed during execution.
If it was possible to create an IPLD codec for SSZ then it appears that would allow us to use IPFS/Filecoin for storage/retrieval of SSZ objects. Since the beacon chain state is all SSZ, that means that we could use IPFS/Filecoin as a data provider for beacon chain light clients.
See: https://hackmd.io/@vbuterin/evm_feature_removing#The-2300-gas-stipend
Figure out what research needs to be done to move this forward.
I'm currently working on building out an implementation in Typescript of the Portal Network client that will run in the browser to expand the reach of the network and looking for collaborators.
Reference links:
Ultralight Browser Client - Simple React App that demos Portal Network client running in browser
TS Portal Network module - work in progress implementation of Portal Network protocols
DIscv5 Module - My fork of Chainsafe's Discv5 implementation that adds Websocket transport so Discv5 can be run in the browser
UDP Proxy service - Simple UDP proxy service written that connects browser based discv5 clients to the UDP based discv5 network
Here's a project proposal from Barry
One of the main reason for the "stickiness" of clients is their tracing APIs. When sophisticated users (e.g. exchanges, block explorers, infrastructure providers, etc.) need to read the data from Ethereum, not only do they need the full blocks/transactions, but they also require the entire traces for them. Different clients provide different ways to access these traces, and applications tend to be built around their client of choice's specific output.
To make it easier for users to swap clients, ideally these trace formats would be standardized. A first step towards getting there, is having a clear view of the various tracing APIs across clients, and how their output differs. At a high level, what I would suggest is:
If you would like an invite to the R&D discord, please leave an email address in a comment on this issue and we'll get one sent your way.
The beaconchain is pushing the limits of software engineering on clients which are constantly finding new optimizations in order to maintain this high participation rate. In the last few weeks as the validator set reached a quarte of a million validators, reports of missed attestations have increased. I would be good to have some study of the data on-chain about missed attestations, late-included attestations, and soon sync committee participation. In rough terms the following are medium term objectives of this project
Here are some concrete problems to tackle in the short term: understanding pools' role in late blocks or rather if clustering on mainnet is causing missed attestations. The thesis is that there are very large chunks of validator keys being run by pools on highly peered networks of their own, that produce blocks fast and they pack them with their own attestations. Those blocks are then arriving late to the single validator. If this is the case this should be checkable with on-chain data.
Other projects include analysis of sync committee participation on Altair forked networks: find correlation between sync committee particpation and attestation participation and/or slot position in epoch. Specially useful would be to have tools (inexistent currently) to visualize sync committee participation.
Eth
@zsfelfoldi is getting started with an implementation of a portal client in the go-ethereum codebase. There is room for additional collaborators/contributors to assist in this effort. Getting in touch with Felföldi is probably a good first step.
Portal Network specs here: https://github.com/ethereum/portal-network-specs
There are several projects picking up steam:
dm me on discord or twitter for more info - there are a handful of group chats I can link people up with who are interested
We've been working recently to create a canonical specification for the JSON-RPC api in execution clients. Progress has been relatively good so far, but we're reaching the limits of what's possible without more serious testing infrastructure.
A few things that I think could be done:
dm me on discord or twitter for more info
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.