|
3 | 3 | [](https://discord.gg/scroll) |
4 | 4 |
|
5 | 5 | > [!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. |
7 | 7 |
|
8 | 8 | ## Introduction |
9 | 9 |
|
10 | 10 | Scroll SDK allows anyone to quickly deploy an instance of the Scroll zkEVM and its rollup architecture for deploying an L2 on Ethereum. |
11 | 11 |
|
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/). |
15 | 13 |
|
16 | 14 | ## 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/). |
146 | 23 |
|
147 | | -1. Change the values in the value.yaml file: |
| 24 | +## Get Started |
148 | 25 |
|
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. |
163 | 27 |
|
164 | | -2. Change the `config.toml` file |
| 28 | +## Contributing |
165 | 29 |
|
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