From 6e846edff0855cf38af0e0417d32fc12fefb9906 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Mon, 13 Nov 2023 05:48:09 +0000 Subject: [PATCH 1/2] Revamp README --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a42bd4263..462f25808 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,40 @@ ## Overview -EigenDA is a secure, high-throughput, and decentralized data availability (DA) service built on top of Ethereum using the EigenLayer restaking ecosystem. To understand how EigenDA works and how it fits into the modern landscape of DA for blockchain applications, see the [DA Landscape](https://docs.eigenda.xyz/data-availability/) and [How EigenDA Works](https://docs.eigenda.xyz/how-it-works/) sections of our [docs](https://docs.eigenda.xyz/) (Accessing these pages will require you to log in using your github account). +EigenDA is a secure, high-throughput, and decentralized data availability (DA) service built on top of Ethereum using the [EigenLayer](https://github.com/Layr-Labs/eigenlayer-contracts) restaking primitives. +EigenDA is the [first actively validated service (AVS)](https://www.blog.eigenlayer.xyz/twelve-early-projects-building-on-eigenlayer/) built on EigenLayer. The EigenLayer restakers delegate stake to node operators performing validation for EigenDA for service payments, and rollups post data to EigenDA to access low cost, high throughput data availability service with security derived from Ethereum. + +- Aligning with Ethereum ecosystem and building toward the Ethereum scaling [endgame](https://vitalik.ca/general/2021/12/06/endgame.html) +- A standard for high throughput and low cost data availability to enable growth of new on-chain use cases +- Horizontally scaling both security and throughput with the amount of restake and operators in the network, and meanwhile protecting decentralization (less work needed from each operator as network scaling) +- Innovative features such as Dual Quorum (two sperate quorums can be required to attest to the availability of data, for example ETH quorum and rollup's native token), customizable safety and liveness. + +To understand more how EigenDA works and how it transforms the modern landscape of data availability, continue reading [EigenDA introduction](https://www.blog.eigenlayer.xyz/intro-to-eigenda-hyperscale-data-availability-for-rollups/). + +To dive deep into the technical details, continue reading [EigenDA protocol spec](https://github.com/Layr-Labs/eigenda/blob/master/docs/spec/overview.md). + +If you're interested in integrating your rollup with EigenDA, please fill out the [EigenDA questionnaire](https://docs.google.com/forms/d/e/1FAIpQLSez6PG-BL6C6Mc4QY1M--vbV219OGL_0Euv2zhJ1HmcUiU7cw/viewform). + +## API Documentation + +The EigenDA public API is documented [here](https://github.com/Layr-Labs/eigenda/tree/master/api/docs). + +## Operating EigenDA Node + +If you want to be an EigenDA operator and run a node, please clone [Operator Setup Guide](https://github.com/Layr-Labs/eigenda-operator-setup) GitHub repo and follow the instructions there. + +## Contributing +We welcome all contributions! There are many ways to contribute to the project, including but not limited to: + +- Opening a PR +- [Submitting feature requests or bugs](https://github.com/Layr-Labs/eigenda/issues/new/choose) +- Improving our product or contribution documentation +- Voting on [open issues](https://github.com/Layr-Labs/eigenda/issues) or + contributing use cases to a feature request + +## Contact + +- [Open an Issue](https://github.com/Layr-Labs/eigenda/issues/new/choose) +- [EigenLayer/EigenDA forum](https://forum.eigenlayer.xyz/c/eigenda/9) +- [Email](mailto:eigenda-support@eigenlabs.org) From 8578cddd43ee043194b4ac34eabf19b16d6439e7 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Mon, 13 Nov 2023 06:13:56 +0000 Subject: [PATCH 2/2] Add back coverage.sh --- .github/actions/test-coverage/coverage.sh | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 .github/actions/test-coverage/coverage.sh diff --git a/.github/actions/test-coverage/coverage.sh b/.github/actions/test-coverage/coverage.sh new file mode 100755 index 000000000..8599f42a4 --- /dev/null +++ b/.github/actions/test-coverage/coverage.sh @@ -0,0 +1,101 @@ +# This code is sourced from the go-coverage-report Repository by ncruces. +# Original code: https://github.com/ncruces/go-coverage-report +# +# MIT License +# +# Copyright (c) 2023 Nuno Cruces +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +#!/usr/bin/env bash +set -euo pipefail + +# This is a simple script to generate an HTML coverage report, +# and SVG badge for your Go project. +# +# It's meant to be used manually or as a pre-commit hook. +# +# Place it some where in your code tree and execute it. +# If your tests pass, next to the script you'll find +# the coverage.html report and coverage.svg badge. +# +# You can add the badge to your README.md as such: +# [![Go Coverage](PATH_TO/coverage.svg)](https://raw.githack.com/URL/coverage.html) +# +# Visit https://raw.githack.com/ to find the correct URL. +# +# To have the script run as a pre-commmit hook, +# symlink the script to .git/hooks/pre-commit: +# +# ln -s PATH_TO/coverage.sh .git/hooks/pre-commit +# +# Or, if you have other pre-commit hooks, +# call it from your main hook. + +# Get the script's directory after resolving a possible symlink. +SCRIPT_DIR="$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")" + +OUT_DIR="${1-$SCRIPT_DIR}" +OUT_FILE="$(mktemp)" + +# Get coverage for all packages in the current directory; store next to script. +go test -short ./... -coverprofile "$OUT_FILE" + +if [[ "${INPUT_REPORT-true}" == "true" ]]; then + # Create an HTML report; store next to script. + go tool cover -html="$OUT_FILE" -o "$OUT_DIR/coverage.html" +fi + +# Extract total coverage: the decimal number from the last line of the function report. +COVERAGE=$(go tool cover -func="$OUT_FILE" | tail -1 | grep -Eo '[0-9]+\.[0-9]') + +echo "coverage: $COVERAGE% of statements" + +date "+%s,$COVERAGE" >> "$OUT_DIR/coverage.log" +sort -u -o "$OUT_DIR/coverage.log" "$OUT_DIR/coverage.log" + +# Pick a color for the badge. +if awk "BEGIN {exit !($COVERAGE >= 90)}"; then + COLOR=brightgreen +elif awk "BEGIN {exit !($COVERAGE >= 80)}"; then + COLOR=green +elif awk "BEGIN {exit !($COVERAGE >= 70)}"; then + COLOR=yellowgreen +elif awk "BEGIN {exit !($COVERAGE >= 60)}"; then + COLOR=yellow +elif awk "BEGIN {exit !($COVERAGE >= 50)}"; then + COLOR=orange +else + COLOR=red +fi + +# Download the badge; store next to script. +curl -s "https://img.shields.io/badge/coverage-$COVERAGE%25-$COLOR" > "$OUT_DIR/coverage.svg" + +if [[ "${INPUT_CHART-false}" == "true" ]]; then + # Download the chart; store next to script. + curl -s -H "Content-Type: text/plain" --data-binary "@$OUT_DIR/coverage.log" \ + https://go-coverage-report.nunocruces.workers.dev/chart/ > \ + "$OUT_DIR/coverage-chart.svg" +fi + +# When running as a pre-commit hook, add the report and badge to the commit. +if [[ -n "${GIT_INDEX_FILE-}" ]]; then + git add "$OUT_DIR/coverage.html" "$OUT_DIR/coverage.svg" +fi