Coder Social home page Coder Social logo

local-da's Introduction

Local DA

Local DA implements the go-da interface over a Local Data Availability service.

It is intended to be used for testing DA layers without having to set up the actual services.

Usage

make build
./build/local-da

should output

2024/04/11 12:23:34 Listening on: localhost:7980

Which exposes the go-da interface over JSONRPC and can be accessed with an HTTP client like xh:

You can also run local-da with a -listen-all flag which will make the process listen on 0.0.0.0 so that it can be accessed from other machines.

$ ./build/local-da -listen-all
2024/04/11 12:23:34 Listening on: 0.0.0.0:7980

MaxBlobSize

xh http://127.0.0.1:7980 id=1 method=da.MaxBlobSize | jq

output:

{
  "jsonrpc": "2.0",
  "result": 1974272,
  "id": "1"
}

Submit

xh http://127.0.0.1:7980 id=1 method=da.Submit 'params[][]=SGVsbG8gd28ybGQh' 'params[]:=-2'  'params[]=AAAAAAAAAAAAAAAAAAAAAAAAAAECAwQFBgcICRA=' | jq

output:

{
    "jsonrpc": "2.0",
    "result": [
        "AQAAAAAAAADfgz5/IP20UeF81iRRzDBu/qC8eXr9DUyplrfXod3VOA=="
    ],
    "id": "1"
}

Get

xh http://127.0.0.1:7980 id=1 method=da.Get 'params[][]=AQAAAAAAAADfgz5/IP20UeF81iRRzDBu/qC8eXr9DUyplrfXod3VOA==' 'params[]=AAAAAAAAAAAAAAAAAAAAAAAAAAECAwQFBgcICRA='

output:

{
    "jsonrpc": "2.0",
    "result": [
        "SGVsbG8gd28ybGQh"
    ],
    "id": "1"
}

References

[1] go-da

[2] xh

local-da's People

Contributors

tuxcanfly avatar msevey avatar dependabot[bot] avatar gupadhyaya avatar gjermundgaraba avatar yarikbratashchuk avatar smuu avatar

Stargazers

Ganesh Prasad Kumble avatar

Watchers

 avatar sysrex avatar Tomasz Zdybał avatar Nguyen Nhu Viet avatar c-node avatar Ismail Khoffi avatar  avatar  avatar  avatar Manav Aggarwal avatar

Forkers

gjermundgaraba

local-da's Issues

[EPIC]: mock network tracking issues

Implementation ideas

Tasks

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.