Git Product home page Git Product logo

codewitness's Introduction

Code Analysis

This repo started out as a set of analyses for various approaches to code merklization. This repo is being morphed into an EVM byte code analysis tool set.

Directories:

  • bytecodedump: Used for printing out the bytecode of a contract.
  • combinedanalysis: Uses the output of the initial chunking analysis to determine witness sizes for blocks.
  • common: Simple and AuxData anlysis plus some common files.
  • data: Contains test contracts and associated data and scripts to generate test data. This is not used directly by any of the other modules.
  • deploymentAddress: Create a file that maps deployment address to contract id (where contract id is the offset into the contract data file).
  • evm: Opcode processing.
  • functionid: Split the code based on the function selector in a transaction.
  • gradle: build system related.
  • main: Runner for strict, fixed, jumpdest, and function id analyses.
  • tracereader: Reads blocks of transactions from trace files.
  • traces: Direcrtory containing trace files.
  • visualisation: Creates a visual representation of the where functions are in contracts.

How to create witness data

  • Get the contract data set and name it contract_data.json and put it in this directory.
  • Run WitnessCodeAnalysis.java (in the main module), ensuring the code has all of the types of analyses on (booleans set to true) and the analyseAll function is uncommented in the code. This will take some hours to run.
  • Run DeploymentAddress.java in the deploymentAddress module.
  • Copy traces you want to analyse to the ./traces directory.
  • Run CombinedAnalysis.java in the combinedanalysis module.

codewitness's People

Contributors

drinkcoffee avatar hmijail avatar raghavendra80 avatar wcgcyx avatar

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.