Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: Roadmap and Acknowledgments #565

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions projects/evm-memory-repricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,70 @@

## Motivation

Efficiency gains from hardware advancements, and client code optimizations warrants periodic repricing of gas costs.
Memory is a critical resource that enables complex computations within the Ethereum Virtual Machine (EVM). The cost of using memory, designed to prevent its abuse, has not been revised since the inception of Ethereum. However, efficiency gains from hardware advancements and client code optimizations warrants periodic repricing of this cost. By revising the pricing structure, it may be possible to reduce the costs associated with memory-intensive operations in the EVM, thereby making previously prohibitively expensive applications feasible.

## Project description

The EVM's memory is a **word-addressed byte array** that stores its **volatile state**. Accessing memory, like any instruction in the EVM, incurs fees in a unit called **gas**.

Gas does not measure the direct cost of execution, but rather the _computational effort_ required by a node's hardware to execute EVM instructions. Transactors pay for per unit of gas at market value which ultimately determines the execution cost.

This project focuses on analyzing the gas costs associated with EVM memory opcodes `MSTORE`, `MSTORE8`, and `MLOAD`.

## Specification
TBD.
This project focuses on analyzing the gas costs associated with accessing EVM Memory.

## Roadmap
TBD.

```mermaid
gantt
title Roadmap - EVM Memory Repricing Research
dateFormat YYYY-MM-DD
section Literature Review

Pricing mechanism :t1, 2024-07-04, 17d
Review price changing EIP : t2, 2024-07-08, 12d
Review economic implications: t3, 2024-07-11, 15d
JVM memory segmentation: t4, 2024-10-09, 5d

section Benchmarking
Review benchmarking mechanisms: 2024-07-25, 16d
Memory under the hood: 2024-08-08, 7d
Cost of memory expansion: 2024-08-15, 7d
Benchmark geth: 2024-08-22, 7d
Benchmark other clients: 2024-08-26, 7d

section Analysis
Tooling for memory Analysis: 2024-09-03, 15d
Analysis of EVM Memory trends : 2024-09-14, 22d
Analysis report : 2024-10-02, 15d

section Conclusion
Benefits of cheap Memory: 2024-10-11, 17d
Gather feedback: 2024-10-28, 7d
```

## Possible challenges

Gas metering is an open problem in Ethereum given the spectrum of underlying hardware and software. It will be challenging to come up with a reliable analysis.

Moreover, Ethereum has several software implementations and runs on a spectrum of hardware ranging from server to consumer grade. To reliably price a resource for the network as a whole remains an open problem. It must also be noted that under pricing of resources opens up potential denial-of-service attack vectors.

## Goal of the project

The goal of the project is provide data points to support repricing of memory usage in the EVM.

## Collaborators

### Fellows
### Fellows

- @raxhvl

### Mentors

- @axic
- @chfast

## Acknowledgments

Thanks to [Mário Havel](https://github.com/taxmeifyoucan/) for providing access to the archive node for analysis, [Jacek Glen](https://github.com/JacekGlen) for his review of the benchmarks, [Daniel](https://github.com/ekpyron) for his inputs on paged memory, and [Vitalik](https://github.com/vbuterin) for his feedback.

## Resources

- 📄 Gavin W., [Ethereum Yellow Paper](https://ethereum.github.io/yellowpaper/paper.pdf)
Expand Down