| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Local DA implements the 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.
To build and run the local-da binary:
just build
./build/local-daThis will start the Local DA service with default settings, listening on localhost:7980 and with a default maximum blob size.
The output should look similar to this (the timestamp and maxBlobSize might vary):
11:07AM INF NewLocalDA: initialized LocalDA module=local-da
11:07AM INF Listening on host=localhost maxBlobSize=1974272 module=da port=7980
11:07AM INF server started listening on=localhost:7980 module=daWhich exposes the da interface over JSONRPC and can be accessed with an HTTP client like xh:
You can customize the behavior of the local-da binary using the following flags:
Example with flags:
To run local-da on port 8000, accessible from any IP, with a max blob size of 1000000 bytes:
./build/local-da -port 8000 -listen-all -max-blob-size 1000000Output:
11:07AM INF NewLocalDA: initialized LocalDA module=local-da
11:07AM INF Listening on host=0.0.0.0 maxBlobSize=1974272 module=da port=8000
11:07AM INF server started listening on=0.0.0.0:8000 module=daxh http://127.0.0.1:7980 id=1 method=da.MaxBlobSize | jqoutput:
{
"jsonrpc": "2.0",
"result": 1974272,
"id": "1"
}xh http://127.0.0.1:7980 id=1 method=da.Submit 'params[][]=SGVsbG8gd28ybGQh' 'params[]:=-2' 'params[]=AAAAAAAAAAAAAAAAAAAAAAAAAAECAwQFBgcICRA=' | jqoutput:
{
"jsonrpc": "2.0",
"result": [
"AQAAAAAAAADfgz5/IP20UeF81iRRzDBu/qC8eXr9DUyplrfXod3VOA=="
],
"id": "1"
}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"
}[1] [da][ da]
[2] xh
| Back | FazBrowse Home | New Git URL |