Categorygithub.com/rollkit/go-da
modulepackage
0.5.2
Repository: https://github.com/rollkit/go-da.git
Documentation: pkg.go.dev

# README

go-da

go-da defines a generic Data Availability interface for modular blockchains.

build-and-test golangci-lint Go Report Card codecov GoDoc

DA Interface

MethodParamsReturn
MaxBlobSizeuint64
Getids []ID, namespace Namespace[]Blobs
GetIDsheight uint64, namespace Namespace[]ID
GetProofsids []id, namespace Namespace[]Proof
Commitblobs []Blob, namespace Namespace[]Commitment
Validateids []Blob, proofs []Proof, namespace Namespace[]bool
Submitblobs []Blob, gasPrice float64, namespace Namespace[]ID

NOTE: The Namespace parameter in the interface methods is optional and used only on DA layers that support the functionality, for example Celestia namespaces and Avail AppIDs.

Implementations

The following implementations are available:

In addition the following helper implementations are available:

  • DummyDA implements a Mock DA useful for testing.
  • Proxy implements a proxy server that forwards requests to a gRPC server. The proxy client can be used directly to interact with the DA service.

Helpful commands

# Generate protobuf files. Requires docker.
make proto-gen

# Lint protobuf files. Requires docker.
make proto-lint

# Run tests.
make test

# Run linters (requires golangci-lint, markdownlint, hadolint, and yamllint)
make lint

Contributing

We welcome your contributions! Everyone is welcome to contribute, whether it's in the form of code, documentation, bug reports, feature requests, or anything else.

If you're looking for issues to work on, try looking at the good first issue list. Issues with this tag are suitable for a new external contributor and is a great way to find something you can help with!

Please join our Community Discord to ask questions, discuss your ideas, and connect with other contributors.

Code of Conduct

See our Code of Conduct here.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

DA defines very generic interface for interaction with Data Availability layers.

# Type aliases

Blob is the data submitted/received from DA interface.
Commitment should contain serialized cryptographic commitment to Blob value.
ID should contain serialized data required by the implementation to find blob in Data Availability layer.
Namespace is an optional parameter used to set the location a blob should be posted to, for DA layers supporting the functionality.
Proof should contain serialized proof of inclusion (publication) of Blob in Data Availability layer.