GithubHelp home page GithubHelp logo

zchn / eth-acl2 Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 255 KB

An ACL2 formalization of the Ethereum VM, aiming to be both executable and suitable for proving interesting properties of EVM contracts.

License: Apache License 2.0

Common Lisp 98.81% Shell 0.11% Python 1.08%
ethereum acl2 formal-methods verification proofs evm formalization

eth-acl2's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @zchn

eth-acl2's People

Contributors

pirapira avatar zchn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eth-acl2's Issues

Support BALANCE

Before doing this, we need to first figure out a interface between the ACL2 evm and the environment.

BALANCE is likely one of the instructions where the conrol flow is transfered to the "bridge".

Add all of VM Tests

There is a nice collection of VM Tests at https://github.com/ethereum/tests/wiki/VM-Tests.

I added a PoC script to convert them: ./scripts/gen_acl2_from_vmtest.py, example: ./books/evm/test/add0.lisp, but not all test cases are supported, for example, ./books/evm/test/div1.lisp is incorrectly generated because the script does not support "logs" or "out" in the json file.

Define all VM opcodes

Currently, I only defined the most frequently used opcodes and add new ones whenever I encounter them.

To define a new opcode, add a recognizer in ./books/evm/op.lisp, define its semantics in ./books/evm/op-exec.lisp according to the whitepaper, and add it to ./books/evm/exec.lisp.

Implement the proper gas mechanism

Currently, I just set an artificial bound to the execution: ./books/evm/exec.lisp#L59.

It would be great to actually implement the gas mechanism. It is stored in ./books/evm/env.lisp#L10 but unused.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.