From 9983585bddc44af3c05b0e9ecb5deac330c15c83 Mon Sep 17 00:00:00 2001 From: Haichen Shen Date: Mon, 4 Sep 2023 13:56:43 +0800 Subject: [PATCH] docs: Update readme (#919) --- .../{contracts.yaml => contracts.yml} | 0 .github/workflows/{docker.yaml => docker.yml} | 0 .../{integration.yaml => integration.yml} | 0 .gitignore | 17 ++++++++-- README.md | 31 +++++++++++++++++-- prover-stats-api/Makefile | 4 +++ prover-stats-api/README.md | 31 ++++++++----------- scripts/download_params.sh | 10 ------ scripts/init_repo.sh | 5 --- 9 files changed, 61 insertions(+), 37 deletions(-) rename .github/workflows/{contracts.yaml => contracts.yml} (100%) rename .github/workflows/{docker.yaml => docker.yml} (100%) rename .github/workflows/{integration.yaml => integration.yml} (100%) delete mode 100755 scripts/download_params.sh delete mode 100755 scripts/init_repo.sh diff --git a/.github/workflows/contracts.yaml b/.github/workflows/contracts.yml similarity index 100% rename from .github/workflows/contracts.yaml rename to .github/workflows/contracts.yml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yml similarity index 100% rename from .github/workflows/docker.yaml rename to .github/workflows/docker.yml diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yml similarity index 100% rename from .github/workflows/integration.yaml rename to .github/workflows/integration.yml diff --git a/.gitignore b/.gitignore index 32a97028f..7d5fa00fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,22 @@ -.idea +# Asset files assets/params* assets/seed -coverage.txt + +# Built binaries build/bin + +coverage.txt *.integration.txt +# Visual Studio Code +.vscode + +# IntelliJ +.idea + +# MacOS +.DS_Store + # misc sftp-config.json +*~ diff --git a/README.md b/README.md index 5385b3bb1..d28ed4b72 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,30 @@ # Scroll Monorepo +[![rollup](https://github.com/scroll-tech/scroll/actions/workflows/rollup.yml/badge.svg)](https://github.com/scroll-tech/scroll/actions/workflows/rollup.yml) +[![contracts](https://github.com/scroll-tech/scroll/actions/workflows/contracts.yml/badge.svg)](https://github.com/scroll-tech/scroll/actions/workflows/contracts.yml) +[![bridge-history](https://github.com/scroll-tech/scroll/actions/workflows/bridge_history_api.yml/badge.svg)](https://github.com/scroll-tech/scroll/actions/workflows/bridge_history_api.yml) +[![coordinator](https://github.com/scroll-tech/scroll/actions/workflows/coordinator.yml/badge.svg)](https://github.com/scroll-tech/scroll/actions/workflows/coordinator.yml) +[![prover](https://github.com/scroll-tech/scroll/actions/workflows/prover.yml/badge.svg)](https://github.com/scroll-tech/scroll/actions/workflows/prover.yml) +[![integration](https://github.com/scroll-tech/scroll/actions/workflows/integration.yml/badge.svg)](https://github.com/scroll-tech/scroll/actions/workflows/integration.yml) [![codecov](https://codecov.io/gh/scroll-tech/scroll/branch/develop/graph/badge.svg?token=VJVHNQWGGW)](https://codecov.io/gh/scroll-tech/scroll) +Scroll is a zkRollup Layer 2 dedicated to enhance Ethereum scalability through a bytecode-equivalent [zkEVM](https://github.com/scroll-tech/zkevm-circuits) circuit. This monorepo encompasses essential infrastructure components of the Scroll protocol. It contains the L1 and L2 contracts, the rollup node, the prover client, and the prover coordinator. + +## Directory Structure + +
+├── bridge-history-api: Bridge history service that collects deposit and withdraw events from both L1 and L2 chain and generates withdrawal proofs
+├── common: Common libraries and types
+├── coordinator: Prover coorindator service that dispatches proving tasks to provers
+├── database: Database client and schema definition
+├── l2geth: Scroll execution node
+├── prover: Prover client that runs proof generation for zkEVM circuit and aggregation circuit
+├── prover-stats-api: Collect and show prover statistics
+├── rollup: Rollup-related services
+├── rpc-gateway: RPC gateway external repo
+└── tests: Integration tests
+
+ ## Prerequisites + Go 1.19 + Rust (for version, see [rust-toolchain](./common/libzkp/impl/rust-toolchain)) @@ -63,6 +86,10 @@ go test -v -race -covermode=atomic scroll-tech/common/... ## Testing Contracts -You can find the unit tests in [`/contracts/src/test/`](/contracts/src/test/), and integration tests in [`/contracts/integration-test/`](/contracts/integration-test/). +You can find the unit tests in [`contracts/src/test/`](/contracts/src/test/), and integration tests in [`contracts/integration-test/`](/contracts/integration-test/). -For more details on contracts, see [`/contracts`](/contracts). +See [`contracts`](/contracts) for more details on the contracts. + +## License + +Scroll Monorepo is licensed under the [MIT](./LICENSE) license. diff --git a/prover-stats-api/Makefile b/prover-stats-api/Makefile index 9441220c9..458e7154b 100644 --- a/prover-stats-api/Makefile +++ b/prover-stats-api/Makefile @@ -4,6 +4,8 @@ IMAGE_NAME=prover-stats-api IMAGE_VERSION=latest REPO_ROOT_DIR=./.. +all: build + build: GOBIN=$(PWD)/build/bin go build -o $(PWD)/build/bin/prover-stats-api ./cmd @@ -21,3 +23,5 @@ lint: ## Lint the files - used for CI docker: DOCKER_BUILDKIT=1 docker build -t scrolltech/${IMAGE_NAME}:${IMAGE_VERSION} ${REPO_ROOT_DIR}/ -f ${REPO_ROOT_DIR}/build/dockerfiles/prover-stats-api.Dockerfile + +.PHONY: all diff --git a/prover-stats-api/README.md b/prover-stats-api/README.md index cd7fbc2ea..185dd2fe5 100644 --- a/prover-stats-api/README.md +++ b/prover-stats-api/README.md @@ -1,28 +1,23 @@ # prover-stats-api -## how to get the prover-stats-api docs +This directory contains the `prover-stats-api` service that provides REST APIs to query the status of proving tasks assigned to the prover. -### 1. start the prover-stats-api server +## Instructions -``` -cd ./prover-stats-api -make build -./prover-stats --config=./conf/config.json -``` +1. Build and start the `prover-stats-api` service. -you will get server run log -``` -Listening and serving HTTP on :8990 -``` + ``` + cd ./prover-stats-api + make build + ./build/bin/prover-stats --config=./conf/config.json + ``` -### 2. browse the documents +2. Open this URL in your browser to view the API documents. + ``` + http://localhost:8990/swagger/index.html + ``` -open this documents in your browser -``` -http://localhost:8990/swagger/index.html -``` - -## how to update the prover-stats-api docs +## How to update the prover-stats-api docs ``` cd ./prover-stats-api diff --git a/scripts/download_params.sh b/scripts/download_params.sh deleted file mode 100755 index c234123b3..000000000 --- a/scripts/download_params.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -uex - -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" -PROJ_DIR=$DIR"/.." - -mkdir -p $PROJ_DIR/assets/params -wget https://circuit-release.s3.us-west-2.amazonaws.com/circuit-release/release-1220/test_seed -O $PROJ_DIR/assets/seed -wget https://circuit-release.s3.us-west-2.amazonaws.com/circuit-release/params-0320/params20 -O $PROJ_DIR/assets/params/params20 -wget https://circuit-release.s3.us-west-2.amazonaws.com/circuit-release/params-0320/params26 -O $PROJ_DIR/assets/params/params26 diff --git a/scripts/init_repo.sh b/scripts/init_repo.sh deleted file mode 100755 index 2f565374f..000000000 --- a/scripts/init_repo.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -uex - -git submodule update --init --recursive -# if [ -z ${CI+x} ]; then git pull --recurse-submodules; fi