Top Related Projects
Go implementation of the Ethereum protocol
Solidity, the Smart Contract Programming Language
The Ethereum Improvement Proposal repository
Ethereum Proof-of-Stake Consensus Specifications
Emerging smart contract language for the Ethereum blockchain.
A Python implementation of the Ethereum Virtual Machine
Quick Overview
The ethereum/research repository is a collection of research papers, proposals, and discussions related to Ethereum's development and future improvements. It serves as a hub for the Ethereum research community to collaborate on various topics, including scalability, security, and protocol upgrades.
Pros
- Provides a centralized location for Ethereum-related research and discussions
- Encourages open collaboration and peer review among researchers and developers
- Covers a wide range of topics relevant to Ethereum's development and improvement
- Offers insights into potential future upgrades and features for the Ethereum network
Cons
- Can be overwhelming for newcomers due to the technical nature of the content
- Some proposals may be outdated or superseded by newer research
- Lacks a structured organization, making it difficult to navigate specific topics
- May contain speculative ideas that may not be implemented in the final Ethereum protocol
Note: As this is not a code library, the code example and quick start sections have been omitted.
Competitor Comparisons
Go implementation of the Ethereum protocol
Pros of go-ethereum
- Production-ready implementation of Ethereum protocol
- Actively maintained with frequent updates and bug fixes
- Comprehensive documentation and extensive community support
Cons of go-ethereum
- Larger codebase, potentially more complex for newcomers
- Focused on implementation rather than experimental research
- Less flexibility for testing new ideas and concepts
Code Comparison
research:
def compute_quadratic_residues(p):
return [x for x in range(p) if pow(x, (p-1)//2, p) == 1]
go-ethereum:
func (s *Secp256k1) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int) {
return s.curve.ScalarMult(Bx, By, k)
}
Key Differences
- research: Focuses on theoretical concepts and experimental ideas
- go-ethereum: Implements the Ethereum protocol for practical use
- research: Written primarily in Python for ease of experimentation
- go-ethereum: Implemented in Go for performance and concurrency
- research: Smaller codebase, easier to navigate for research purposes
- go-ethereum: Larger, more complex codebase with production-ready features
Use Cases
- research: Ideal for exploring new concepts and testing theoretical improvements
- go-ethereum: Suitable for running Ethereum nodes and developing production applications
Solidity, the Smart Contract Programming Language
Pros of Solidity
- More focused and production-ready, specifically for smart contract development
- Larger community and more extensive documentation for developers
- Regular updates and maintenance, ensuring compatibility with the latest Ethereum improvements
Cons of Solidity
- Limited scope compared to Research, focusing primarily on the Solidity language
- Less experimental and forward-looking than Research, which explores broader Ethereum concepts
- May not cover cutting-edge research topics that could influence future Ethereum development
Code Comparison
Solidity (smart contract example):
pragma solidity ^0.8.0;
contract SimpleStorage {
uint256 private storedData;
function set(uint256 x) public {
storedData = x;
}
function get() public view returns (uint256) {
return storedData;
}
}
Research (Python implementation example):
def compute_casper_FFG_finality(validators, votes):
total_deposits = sum(v.deposit for v in validators)
vote_deposits = sum(v.deposit for v in validators if v in votes)
return vote_deposits * 3 >= total_deposits * 2
The Solidity example showcases a basic smart contract, while the Research example demonstrates a theoretical implementation of a consensus algorithm, highlighting the different focus areas of the two repositories.
The Ethereum Improvement Proposal repository
Pros of EIPs
- Structured process for proposing and documenting Ethereum improvements
- Clear categorization of proposals (Core, Networking, Interface, etc.)
- Serves as an official reference for implemented standards
Cons of EIPs
- More formal and less flexible for exploratory research
- May have slower iteration cycles due to the proposal process
- Limited to finalized ideas, not suitable for early-stage concepts
Code Comparison
EIPs (example of an EIP header):
---
eip: 1
title: EIP Purpose and Guidelines
status: Living
type: Meta
author: Martin Becze <mb@ethereum.org>, Hudson Jameson <hudson@ethereum.org>
created: 2015-10-27
---
Research (example of a research notebook):
import numpy as np
import matplotlib.pyplot as plt
def simulate_sharding(num_shards, transactions_per_shard):
# Simulation code here
pass
simulate_sharding(64, 1000)
Summary
EIPs is focused on standardization and documentation of Ethereum improvements, while Research is more oriented towards exploratory work and early-stage ideas. EIPs provides a structured approach to proposing changes, while Research allows for more flexible and experimental investigations into Ethereum's future developments.
Ethereum Proof-of-Stake Consensus Specifications
Pros of consensus-specs
- More focused on specific Ethereum consensus layer specifications
- Better organized with clear documentation structure
- Regularly updated with the latest consensus protocol changes
Cons of consensus-specs
- Limited scope compared to broader research topics
- Less experimental and exploratory content
- Potentially more technical and less accessible for newcomers
Code comparison
research:
def compute_shuffled_index(index, index_count, seed):
current_index = index
for current_round in range(SHUFFLE_ROUND_COUNT):
pivot = bytes_to_int(hash(seed + int_to_bytes1(current_round))[0:8]) % index_count
flip = (pivot - current_index) % index_count
position = max(current_index, flip)
source = hash(seed + int_to_bytes1(current_round) + int_to_bytes4(position // 256))
byte = source[(position % 256) // 8]
bit = (byte >> (position % 8)) % 2
current_index = flip if bit else current_index
return current_index
consensus-specs:
def compute_shuffled_index(index: uint64, index_count: uint64, seed: Bytes32) -> uint64:
if index >= index_count:
raise ValueError(f"index {index} must be less than index_count {index_count}")
for current_round in range(SHUFFLE_ROUND_COUNT):
pivot = bytes_to_int(hash(seed + uint_to_bytes(uint8(current_round)))[0:8]) % index_count
flip = (pivot + index_count - index) % index_count
position = max(index, flip)
source = hash(seed + uint_to_bytes(uint8(current_round)) + uint_to_bytes(uint32(position // 256)))
byte = source[(position % 256) // 8]
bit = (byte >> (position % 8)) % 2
index = flip if bit else index
return index
Emerging smart contract language for the Ethereum blockchain.
Pros of Fe
- More focused on practical language implementation for Ethereum
- Actively developed with regular updates and releases
- Provides a more user-friendly syntax for smart contract development
Cons of Fe
- Narrower scope compared to the broader research topics in Research
- Less established and mature compared to Solidity
- Limited ecosystem and tooling support at present
Code Comparison
Fe code example:
contract Counter {
count: u256
pub fn increment(mut self) {
self.count += 1
}
pub fn get(self) -> u256 {
return self.count
}
}
Research typically doesn't have direct code implementations, but may include pseudocode or theoretical concepts:
def casper_ffg(validators, deposits, votes):
# Simplified representation of Casper FFG algorithm
total_deposits = sum(deposits)
for vote in votes:
if vote.source.justified and vote.target.height > vote.source.height:
# Process vote and update finalization
Summary
Fe is a practical language implementation project for Ethereum smart contracts, offering a more user-friendly syntax. Research, on the other hand, is a broader repository covering various Ethereum research topics. While Fe provides concrete tools for developers, Research explores theoretical concepts and potential improvements to the Ethereum ecosystem. Fe is more focused but less mature, while Research offers a wider scope but less immediate practical application.
A Python implementation of the Ethereum Virtual Machine
Pros of py-evm
- Focused implementation of Ethereum Virtual Machine in Python
- More practical for developers building Ethereum-based applications
- Includes testing tools and utilities for EVM development
Cons of py-evm
- Narrower scope compared to the broader research topics in research
- Less theoretical exploration of Ethereum improvements
- May not cover cutting-edge Ethereum research concepts
Code Comparison
research (Vyper example):
@public
def get_balance(addr: address) -> uint256:
return self.balances[addr]
py-evm (EVM implementation):
def apply_message(self, message: Message) -> Tuple[BaseComputation, BaseState]:
snapshot = self.state.snapshot()
computation = self.get_computation(message)
self.state.add_balance(message.sender, message.value)
self.state.subtract_balance(message.storage_address, message.value)
return computation, self.state
Summary
research is a repository for Ethereum research papers, proposals, and theoretical concepts, while py-evm is a practical implementation of the Ethereum Virtual Machine in Python. research covers a broader range of topics and is more focused on advancing Ethereum technology, while py-evm provides developers with tools and implementations for building Ethereum-based applications.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Research
This repository is used mainly for code related to specific research questions, mostly written by @vbuterin. It is not meant as a general research repository for academic papers.
An exception to this is the papers
folder, which contains the LaTeX files for various academic papers.
Contribute
While contributions are welcome, maintaining this repository is not an active priority. The code in this repository is offered as is, without active support.
If you find spelling errors or have suggestions or comments, please feel free to open an issue.
License
MIT © 2015-2023 Vitalik Buterin et al
Top Related Projects
Go implementation of the Ethereum protocol
Solidity, the Smart Contract Programming Language
The Ethereum Improvement Proposal repository
Ethereum Proof-of-Stake Consensus Specifications
Emerging smart contract language for the Ethereum blockchain.
A Python implementation of the Ethereum Virtual Machine
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot