Skip to content

irajgill/EVM-FROM-SCRATCH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EVM-FROM-SCRATCH

EVM-FROM-SCRATCH is an implementation of the Ethereum Virtual Machine (EVM) in Go. It follows the Ethereum Yellow Paper, with clear, idiomatic Go code for accessibility and extensibility.

Features

  • Core EVM Interpreter: Executes EVM bytecode, modeling stack, memory, storage, and flow control as per Ethereum specification.
  • Educational Structure: Minimal dependencies, focused on readability and hackability.
  • Testing & Linting Automation: Full developer tooling for Go best practices and continuous integration.

Getting Started

Requirements

  • Go 1.19 or higher
  • Tools: golangci-lint, shadow (for full linting support)

Installation

Clone this repository and install dependencies:

git clone https://github.com/irajgill/EVM-FROM-SCRATCH.git

cd EVM-FROM-SCRATCH

go mod tidy

Usage

The main EVM implementation is in the go-evm/evm directory. You can import this as a package or run the included test suite to explore its behavior. Modify or extend the code for your use case or to better understand EVM semantics.

Developer Workflow

All common tasks are automated via Makefile targets.

Common Commands

  • Help: make help
  • Lint and Format: make lint

Runs go mod tidy, go vet, golangci-lint, and variable shadow checks.

Automatically formats the code using make fmt.

  • Testing: make test

  • Runs all EVM package tests with coverage reporting: make coverage

Opens an interactive HTML coverage report in your browser.

About

An implementation of the Ethereum Virtual Machine, from scratch in Go.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published