Skip to content

Commit f978b33

Browse files
authored
Update READMEs for refactor (#151)
* new readmes and fix weth in config example * link to npmjs.org * link to do guide
1 parent b0ffe4e commit f978b33

File tree

3 files changed

+22
-155
lines changed

3 files changed

+22
-155
lines changed

examples/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Scroll SDK Helper Scripts
22

3-
This directory contains helper scripts for managing and interacting with your Scroll SDK deployment.
3+
This directory contains helper files examples and scripts for managing and interacting with your Scroll SDK deployment.
4+
5+
For additional, more robust helper scripts, checkout the [scroll-sdk-cli](https://github.com/scroll-tech/scroll-sdk-cli).
6+
7+
## Example Files
8+
1. `Makefile.example`: A basic makefile for quickly installing and deleting the charts necessary for the Scroll SDK.
9+
2. `config.toml.example`: A template config.toml file for new deployments. A good starting point for filling out chain-specific details or using the Scroll SDK CLI tool.
410

511
## Scripts
612

examples/config.toml.example

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ COORDINATOR_DB_CONNECTION_STRING = ""
3838
L1_EXPLORER_DB_CONNECTION_STRING = ""
3939
ROLLUP_NODE_DB_CONNECTION_STRING = ""
4040
ROLLUP_EXPLORER_DB_CONNECTION_STRING = ""
41-
SCROLL_BRIDGE_HISTORY_REDIS_PASSWORD = ""
4241

4342
[gas-token]
4443

@@ -88,14 +87,12 @@ L1_PLONK_VERIFIER_ADDR = "0x0000000000000000000000000000000000000001"
8887

8988
[contracts.overrides]
9089

91-
# L1_WETH = ""
92-
9390
L2_MESSAGE_QUEUE = "0x5300000000000000000000000000000000000000"
9491
L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002"
9592
L2_WHITELIST = "0x5300000000000000000000000000000000000003"
9693
L2_WETH = "0x5300000000000000000000000000000000000004"
9794
L2_TX_FEE_VAULT = "0x5300000000000000000000000000000000000005"
98-
L1_WETH = "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"
95+
# L1_WETH = "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"
9996

10097

10198
[coordinator]

readme.md

Lines changed: 14 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -3,164 +3,28 @@
33
[![Discord](https://img.shields.io/discord/984015101017346058?color=%235865F2&label=Discord&logo=discord&logoColor=%23fff)](https://discord.gg/scroll)
44

55
> [!WARNING]
6-
> Scroll SDK is a working name is currently available as an Early Access Preview for collaborators. It is experimental software and not yet configured for production usage.
6+
> Scroll SDK is experimental software and although ready for testnets, is not yet fully configured for production usage.
77
88
## Introduction
99

1010
Scroll SDK allows anyone to quickly deploy an instance of the Scroll zkEVM and its rollup architecture for deploying an L2 on Ethereum.
1111

12-
In the medium term, it will allow for robust customization of an L2, including customizing its DA layer, base/settlement layer, native gas token, bridge logic, and more. Our goal is to build a robust stack focused on sovereignty and adaptability, with simple upgradability and flexible proof generation, all without locking new chains into shared governance, common asset pools, or business-source licensing.
13-
14-
For more information, please see this [Early Access](https://scrollzkp.notion.site/Scroll-SDK-Early-Access-Feedback-Request-74272ce6a0ae4c1d8f5c1d836df1f410?pvs=4) document. To provide feedback, reach out or use [this form](https://tally.so/r/3xQdNr).
12+
For more information, please see this [Early Access Preview Documentation](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/).
1513

1614
## Repo
17-
This repo hosts a Helm chart for deploying a Scroll SDK chain.
18-
It also provides a database and a monitoring stack based on Prometheus, Loki and Grafana.
19-
20-
The current configuration supports running a devnet but is not yet optimized for production.
21-
22-
## Prerequisites
23-
24-
> [!Note]
25-
> Looking to run a local testnet on an amd64 mac? Please follow [this guide](https://scrollzkp.notion.site/Guide-Running-Scroll-SDK-on-an-ARM64-Mac-36bdf4f3ee2345bf9d1ea6e62f9fcf08#e40ae30777ec4dd083e71d37ead1a185)!
26-
27-
Before getting started, be sure to install the following:
28-
- [Docker Engine](https://docs.docker.com/engine/install/) (or Docker Desktop)
29-
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
30-
- [minikube](https://minikube.sigs.k8s.io/docs/start/) (for local dev cluster)
31-
- [Helm](https://helm.sh/docs/intro/install/)
32-
- `make` command
33-
34-
## Bootstrap
35-
Run the following command to bootstrap helm and the config files:
36-
```bash
37-
make bootstrap
38-
```
39-
40-
## Launch Scroll SDK
41-
Run this from the `charts/scroll-sdk` folder:
42-
```bash
43-
helm install scroll-sdk .
44-
```
45-
46-
Run `kubectl get pods` to confirm the status of running services.
47-
48-
## Web UIs, Monitoring and Exposed Services
49-
50-
Accessing services and UIs from your machine will depend on your configuration. 3 possible configurations are described below.
51-
52-
If using the default DNS names, the following services will be available locally after configuring and launching your Scroll SDK chain:
53-
54-
- Block Explorers (Blockscout)
55-
- [L2 Explorer](http://blockscout.scrollsdk/)
56-
- [L1 Explorer](http://l1-devnet-explorer.scrollsdk/) *(this is scanning Anvil and can be a bit buggy)*
57-
- [Bridge](http://frontends.scrollsdk/bridge)
58-
- [Rollup Explorer](http://frontends.scrollsdk/rollupscan?page=1&per_page=10)
59-
- Shows committed batches and finalized batches
60-
- ***API NOT CURRENTLY WORKING AS OF June 17, 2024***
61-
- [Granfana Dashboards](http://grafana.scrollsdk/)
62-
- Login
63-
- User: `admin`
64-
- Pass: `scroll-sdk`
65-
- See “Scroll” dashboards on [this page](http://grafana.scrollsdk/dashboards).
66-
67-
### Access on macOS using minikube and `ingress-dns`
68-
69-
Our [guide for mac](https://scrollzkp.notion.site/Guide-Running-Scroll-SDK-on-an-ARM64-Mac-36bdf4f3ee2345bf9d1ea6e62f9fcf08#e40ae30777ec4dd083e71d37ead1a185) includes how to use minikube with `ingress-dns`. We have not tested this configuration for Linux desktops.
70-
71-
The key steps include installing [docker-mac-net-connect](https://github.com/chipmk/docker-mac-net-connect) and running the following:
72-
73-
```bash
74-
minikube ssh "sudo apt-get update && sudo apt-get -y install qemu-user-static"
75-
minikube addons enable ingress
76-
minikube addons enable ingress-dns
77-
sudo brew services start chipmk/tap/docker-mac-net-connect
78-
```
79-
80-
Then, configure `/etc/resolver/minikube-scrollsdk`
81-
82-
```text
83-
domain scrollsdk
84-
nameserver <minikube_ip>
85-
search_order 1
86-
timeout 5
87-
```
88-
89-
Lastly, flush your DNS and test:
90-
91-
```bash
92-
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
93-
nslookup frontends.scrollsdk $(minikube ip)
94-
```
95-
96-
### Access using /etc/hosts
97-
98-
If you have enabled ingress on your cluster and are not using `ingress-dns`, add the following entries, replacing `1.2.3.4` with the IP of your cluster.
99-
100-
```txt
101-
1.2.3.4 l1-devnet.scrollsdk
102-
1.2.3.4 bridge-history.scrollsdk
103-
1.2.3.4 frontends.scrollsdk
104-
1.2.3.4 grafana.scrollsdk
105-
1.2.3.4 l1-devnet-explorer.scrollsdk
106-
1.2.3.4 l2-rpc.scrollsdk
107-
1.2.3.4 blockscout.scrollsdk
108-
1.2.3.4 bridge-history-api.scrollsdk
109-
```
110-
111-
### Access using port-forward
112-
113-
If you want to quickly expose a single source, you can use `port-forward` to expose a service in your cluster.
114-
115-
For example, to access the Grafana dashboards, open a new terminal session and run
116-
117-
```bash
118-
kubectl port-forward svc/grafana 8081:80
119-
```
120-
121-
Then go to your browser and check `http://localhost:8081/`. You'll need to leave your terminal session running to maintain access.
122-
123-
For other services, replace `svc/grafana` with the appropriate service name and `8081:80` to the correct ports. The first port should be the port number you want to request on your local machine. The second can be found in the `charts/[service]/values.yaml` file in the `service -> main -> ports -> http -> port` field.
124-
125-
```yaml
126-
service:
127-
main:
128-
enabled: true
129-
ports:
130-
http:
131-
enabled: true
132-
port: 3000
133-
```
134-
135-
Other examples:
136-
- `kubectl port-forward svc/frontends 8082:80`
137-
- `kubectl port-forward svc/blockscout 8080:3000`
138-
- `kubectl port-forward svc/l2-rpc 8083:8545`
139-
140-
> [!WARNING]
141-
> This method will not work for the `frontends` service and bridge UIs out-of-the box. You'll need to re-configure the values so that RPC and API calls from the browser are sent to accessible URIs (ie other localhost ports).
142-
143-
## Changing the database endpoint
144-
145-
If you don't want to use the Postgres database provided in this chart, you configure your own database.
15+
This repo contains:
16+
- `charts/`: Helm charts for creating a Scroll SDK based chain using Kubernetes
17+
- `ansible/playbooks`: Code for deploying provers on new machines(experimental)
18+
- `custom-images/`: Docker images used for devnet and as base images
19+
- `devnet/`: A basic configuration for setting up a local devnet
20+
- `examples/`: Template files for use in your SDK project and helper scripts
21+
22+
Additional SDK tooling is available in our [scroll-sdk-cli](https://www.npmjs.com/package/scroll-sdk-cli) repo. This can also be installed locally by running `npm i -g scroll-sdk-cli` with node >= 18. More documentation for its usage is [here](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/).
14623

147-
1. Change the values in the value.yaml file:
24+
## Get Started
14825

149-
```txt
150-
db:
151-
pg_host: "postgresql"
152-
pg_user: "postgres"
153-
pg_password: "qwerty12345"
154-
pg_port: "5432"
155-
bridge_history_password: "test1234"
156-
chain_monitor_password: "test1234"
157-
event_watcher_password: "test1234"
158-
gas_oracle_password: "test1234"
159-
rollup_node_password: "test1234"
160-
rpc_gateway_password: "test1234"
161-
```
162-
_Note: the user for each service will be created but is not used yet by the service. Every service uses the admin account._
26+
To get started using the repo, checkout our guides on running [a local devnet deployment](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/guides/devnet-deployment/), [an alt-gas token testnet on Digital Ocean](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/guides/digital-ocean-alt-gas-token/), or see our [production deployment](https://scroll-sdk-init.docs.scroll.xyz/en/sdk/guides/production-deployment/) page.
16327

164-
2. Change the `config.toml` file
28+
## Contributing
16529

166-
Provide the correct db string on the DB section.
30+
The SDK is currently under heavy development, so if you wish to contribute, we recommend reaching out and coordinating closely with the Scroll team.

0 commit comments

Comments
 (0)