From 06756f8b7f6eef3b1b42273af9f445c24e40a189 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 16 Jan 2024 07:27:05 -0800 Subject: [PATCH 1/4] doc: add readme --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5710f47 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# go-da + +go-da defines a generic Data Availability interface for modular blockchains. + +Note that the rollup clients _do not_ need to depend on any implementation, +they can just make sure that the DA interface is satisfied and start using the +service. This is a key feature of modular blockchains as they can switch the +implementations without having to change the interface. + + +[![build-and-test](https://github.com/rollkit/go-da/actions/workflows/ci_release.yml/badge.svg)](https://github.com/rollkit/celestia-da/actions/workflows/ci_release.yml) +[![golangci-lint](https://github.com/rollkit/go-da/actions/workflows/lint.yml/badge.svg)](https://github.com/rollkit/celestia-da/actions/workflows/lint.yml) +[![Go Report Card](https://goreportcard.com/badge/github.com/rollkit/go-da)](https://goreportcard.com/report/github.com/rollkit/celestia-da) +[![codecov](https://codecov.io/gh/rollkit/go-da/branch/main/graph/badge.svg?token=CWGA4RLDS9)](https://codecov.io/gh/rollkit/celestia-da) +[![GoDoc](https://godoc.org/github.com/rollkit/go-da?status.svg)](https://godoc.org/github.com/rollkit/celestia-da) + + +## DA Interface + +| Method | Params | Return | +| ----------- |-------------------------------| -------------| +| `MaxBlobSize` | | `uint64` | +| `Get` | `ids []ID` | `[]Blobs` | +| `GetIDs` | `height uint64` | `[]ID` | +| `Commit` | `blobs []Blob` | `[]Commitment` | +| `Validate` | `ids []Blob, proofs []Proof` | `[]bool` | + +## Implementations + +See [celestia-da](https://github.com/rollkit/celestia-da) for the Celestia +implementation. + +## Helpful commands + +```sh +# 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](https://github.com/rollkit/go-da/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). +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](https://discord.com/invite/YsnTPcSfWQ) +to ask questions, discuss your ideas, and connect with other contributors. + +## Code of Conduct + +See our Code of Conduct [here](https://docs.celestia.org/community/coc). From b574299de6f3244680f8ddec274805b0db8f7604 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 16 Jan 2024 07:31:10 -0800 Subject: [PATCH 2/4] nit: badge links --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5710f47..a00e51d 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ service. This is a key feature of modular blockchains as they can switch the implementations without having to change the interface. -[![build-and-test](https://github.com/rollkit/go-da/actions/workflows/ci_release.yml/badge.svg)](https://github.com/rollkit/celestia-da/actions/workflows/ci_release.yml) -[![golangci-lint](https://github.com/rollkit/go-da/actions/workflows/lint.yml/badge.svg)](https://github.com/rollkit/celestia-da/actions/workflows/lint.yml) -[![Go Report Card](https://goreportcard.com/badge/github.com/rollkit/go-da)](https://goreportcard.com/report/github.com/rollkit/celestia-da) -[![codecov](https://codecov.io/gh/rollkit/go-da/branch/main/graph/badge.svg?token=CWGA4RLDS9)](https://codecov.io/gh/rollkit/celestia-da) -[![GoDoc](https://godoc.org/github.com/rollkit/go-da?status.svg)](https://godoc.org/github.com/rollkit/celestia-da) +[![build-and-test](https://github.com/rollkit/go-da/actions/workflows/ci_release.yml/badge.svg)](https://github.com/rollkit/go-da/actions/workflows/ci_release.yml) +[![golangci-lint](https://github.com/rollkit/go-da/actions/workflows/lint.yml/badge.svg)](https://github.com/rollkit/go-da/actions/workflows/lint.yml) +[![Go Report Card](https://goreportcard.com/badge/github.com/rollkit/go-da)](https://goreportcard.com/report/github.com/rollkit/go-da) +[![codecov](https://codecov.io/gh/rollkit/go-da/branch/main/graph/badge.svg?token=CWGA4RLDS9)](https://codecov.io/gh/rollkit/go-da) +[![GoDoc](https://godoc.org/github.com/rollkit/go-da?status.svg)](https://godoc.org/github.com/rollkit/go-da) ## DA Interface From dfb433c59823ef5b339a46936123a1733cde0b0e Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Fri, 19 Jan 2024 09:10:45 -0800 Subject: [PATCH 3/4] doc: review --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a00e51d..7322769 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,6 @@ go-da defines a generic Data Availability interface for modular blockchains. -Note that the rollup clients _do not_ need to depend on any implementation, -they can just make sure that the DA interface is satisfied and start using the -service. This is a key feature of modular blockchains as they can switch the -implementations without having to change the interface. - [![build-and-test](https://github.com/rollkit/go-da/actions/workflows/ci_release.yml/badge.svg)](https://github.com/rollkit/go-da/actions/workflows/ci_release.yml) [![golangci-lint](https://github.com/rollkit/go-da/actions/workflows/lint.yml/badge.svg)](https://github.com/rollkit/go-da/actions/workflows/lint.yml) @@ -27,8 +22,15 @@ implementations without having to change the interface. ## Implementations -See [celestia-da](https://github.com/rollkit/celestia-da) for the Celestia -implementation. +The following implementations are available: + +* [celestia-da](https://github.com/rollkit/celestia-da) implements Celestia as DA. +* [avail-da](https://github.com/rollkit/avail-da) implements Polygon Avail as DA. + +In addition the following helper implementations are available: + +* [DummyDA](https://github.com/rollkit/go-da/blob/main/test/dummy.go) implements a Mock DA useful for testing. +* [Proxy](https://github.com/rollkit/go-da/tree/main/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 From 9e0e493687a9a47981820148cacdf5a47fda5238 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Fri, 19 Jan 2024 09:13:27 -0800 Subject: [PATCH 4/4] nit: lint --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7322769..909a4ea 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,11 @@ The following implementations are available: In addition the following helper implementations are available: -* [DummyDA](https://github.com/rollkit/go-da/blob/main/test/dummy.go) implements a Mock DA useful for testing. -* [Proxy](https://github.com/rollkit/go-da/tree/main/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. +* [DummyDA](https://github.com/rollkit/go-da/blob/main/test/dummy.go) implements +a Mock DA useful for testing. +* [Proxy](https://github.com/rollkit/go-da/tree/main/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