Skip to content

Commit bf2c9c1

Browse files
committed
review technical-stack docs, pt 1
1 parent 5012a40 commit bf2c9c1

File tree

3 files changed

+202
-59
lines changed

3 files changed

+202
-59
lines changed

src/content/docs/en/sdk/technical-stack/configuration.mdx

Lines changed: 92 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Aside from "../../../../../components/Aside.astro"
1111

1212
Initial change configuration is made by modifying `config.toml`. All other config files are auto-generated from this file. For automating changes to your configuration for production deployments, see the [scroll-sdk-cli](/en/sdk/technical-stack/scroll-sdk-cli) tool.
1313

14-
For new production deployments, we recommend using the [example template](https://github.com/scroll-tech/scroll-sdk/blob/develop/examples/config.toml.example).
14+
For new production deployments, we recommend using the [example template](https://github.com/scroll-tech/scroll-sdk/blob/develop/examples/config.toml.example), which the `scroll-sdk-cli` tool is designed to work with. You can reference the default devnet configuration [here](https://github.com/scroll-tech/scroll-sdk/blob/develop/charts/scroll-sdk/config.toml).
1515

1616
<Aside type="note">
1717
Although most values don't need modified between subsequent deployments, you may want change the contracts section's `DEPLOYMENT_SALT` in order to have newly initialized contracts on your basechain.
@@ -22,6 +22,8 @@ Local Devnet defaults shown.
2222

2323
### General
2424

25+
Contained in the `[general]` section.
26+
2527
| Config Variable | Description | Default Value |
2628
|-----------------|-------------|---------------|
2729
| L1_RPC_ENDPOINT | Specifies the HTTP endpoint for the L1 RPC server. | `http://l1-devnet:8545` |
@@ -35,6 +37,10 @@ Local Devnet defaults shown.
3537

3638
### Accounts
3739

40+
Contained in the `[accounts]` section.
41+
42+
{/* TODO: Add link to where these roles are documented. */}
43+
3844
| Config Variable | Description | Default Value |
3945
|-----------------|-------------|---------------|
4046
| DEPLOYER_PRIVATE_KEY | Private key for the deployer account. | `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` |
@@ -43,14 +49,16 @@ Local Devnet defaults shown.
4349
| L1_GAS_ORACLE_SENDER_PRIVATE_KEY | Private key for the L1 gas oracle sender account. | `0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6` |
4450
| L2_GAS_ORACLE_SENDER_PRIVATE_KEY | Private key for the L2 gas oracle sender account. | `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` |
4551
| DEPLOYER_ADDR | Address of the deployer account. | `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` |
46-
| OWNER_ADDR | Address of the owner account. | `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` |
52+
| OWNER_ADDR | Address of the owner account. Should be a multi-sig wallet. | `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` |
4753
| L1_COMMIT_SENDER_ADDR | Address of the L1 commit sender account. | `0x70997970C51812dc3A010C7d01b50e0d17dc79C8` |
4854
| L1_FINALIZE_SENDER_ADDR | Address of the L1 finalize sender account. | `0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC` |
4955
| L1_GAS_ORACLE_SENDER_ADDR | Address of the L1 gas oracle sender account. | `0x90F79bf6EB2c4f870365E785982E1f101E93b906` |
5056
| L2_GAS_ORACLE_SENDER_ADDR | Address of the L2 gas oracle sender account. | `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` |
5157

5258
### Database
5359

60+
Contained in the `[db]` section.
61+
5462
| Config Variable | Description | Default Value |
5563
|-----------------|-------------|---------------|
5664
| ADMIN_SYSTEM_DB_CONNECTION_STRING | Connection string for the Admin System database. | `""` |
@@ -63,8 +71,58 @@ Local Devnet defaults shown.
6371
| ROLLUP_NODE_DB_CONNECTION_STRING | Connection string for the Rollup Node database. | `postgres://postgres:qwerty12345@postgresql:5432/scroll?sslmode=disable` |
6472
| ROLLUP_EXPLORER_DB_CONNECTION_STRING | Connection string for the Rollup Explorer database. | `""` |
6573

74+
### Gas Token
75+
76+
Contained in the `[gas-token]` section.
77+
78+
{/* TODO: Add link to where these modes are documented. */}
79+
80+
| Config Variable | Description | Default Value |
81+
|-----------------|-------------|---------------|
82+
| ALTERNATIVE_GAS_TOKEN_ENABLED | Enables using an alternative gas token instead of ETH. | false |
83+
| EXAMPLE_GAS_TOKEN_DECIMAL | Decimal places for the example gas token. | 6 |
84+
| L1_GAS_TOKEN | Address of the L1 ERC20 gas token contract. | `0x68a041e7c20Afa4784b5d9C63246c89545Ac0E66` |
85+
| GAS_ORACLE_INCORPORATE_TOKEN_EXCHANGE_RATE_ENANBLED | Enables incorporating token exchange rates in gas oracle. | false |
86+
| EXCHANGE_RATE_UPDATE_MODE | Mode for updating exchange rates. | `Fixed` |
87+
| FIXED_EXCHANGE_RATE | Fixed exchange rate value when using Fixed mode. | `0.01` |
88+
| TOKEN_SYMBOL_PAIR | Symbol pair for the token exchange. | `UNIETH` |
89+
90+
### Sequencer
91+
92+
Contained in the `[sequencer]` section.
93+
94+
| Config Variable | Description | Default Value |
95+
|-----------------|-------------|---------------|
96+
| L2_GETH_STATIC_PEERS | Static peers for L2 Geth nodes, as an array of sequencer enode URLs. | `[""]` |
97+
| L2GETH_SIGNER_ADDRESS | Address of the primary sequencer's L2 Geth signer account. | `""` |
98+
| L2GETH_KEYSTORE | Keystore file for the primary sequencer's L2 Geth signer account. | `""` |
99+
| L2GETH_PASSWORD | Password for the primary sequencer's L2 Geth keystore. | `""` |
100+
| L2GETH_NODEKEY | Node key for the primary sequencer's L2 Geth node. | `""` |
101+
102+
### Additional Sequencer Instances
103+
104+
Contained in the `[sequencer.sequencer-1]` section and incrementing for each additional sequencer instance.
105+
106+
| Config Variable | Description | Default Value |
107+
|-----------------|-------------|---------------|
108+
| L2GETH_SIGNER_ADDRESS | Address of the L2 Geth signer account for this sequencer instance. | `0xE8fFE623460e54e546E54B1a0C93A968aF6295bb` |
109+
| L2GETH_KEYSTORE | Keystore file for this sequencer instance's signer account. | `{"address":"e8ffe623460e54e546e54b1a0c93a968af6295bb","id":"deef9b4a-a085-4f02-af36-afaa19da4132",...}` |
110+
| L2GETH_PASSWORD | Password for this sequencer instance's keystore. | `second` |
111+
| L2GETH_NODEKEY | Node key for this sequencer instance. | `bd347890c9d308957207379679e8ed548d015ef05588c228d13f92ea0288a35b` |
112+
113+
### Bootnode Instances
114+
115+
Contained in the `[bootnode.bootnode-0]` section and incrementing for each additional bootnode instance.
116+
117+
| Config Variable | Description | Default Value |
118+
|-----------------|-------------|---------------|
119+
| L2GETH_NODEKEY | Node key for this bootnode instance. | `""` |
120+
121+
66122
### Rollup
67123

124+
Contained in the `[rollup]` section.
125+
68126
| Config Variable | Description | Default Value |
69127
|-----------------|-------------|---------------|
70128
| MAX_TX_IN_CHUNK | Sets the maximum number of transactions in a chunk. | 100 |
@@ -75,15 +133,34 @@ Local Devnet defaults shown.
75133
| TEST_ENV_MOCK_FINALIZE_ENABLED | Enables mock finalization for testing environments. | true |
76134
| TEST_ENV_MOCK_FINALIZE_TIMEOUT_SEC | Sets the timeout for mock finalization in seconds. | 300 |
77135

136+
### Frontend
137+
138+
Contained in the `[frontend]` section.
139+
140+
| Config Variable | Description | Default Value |
141+
|-----------------|-------------|---------------|
142+
| EXTERNAL_RPC_URI_L1 | External RPC URI for L1. | `http://l1-devnet.scrollsdk` |
143+
| EXTERNAL_RPC_URI_L2 | External RPC URI for L2. | `http://l2-rpc.scrollsdk` |
144+
| BRIDGE_API_URI | URI for the Bridge API. | `http://bridge-history-api.scrollsdk/api` |
145+
| ROLLUPSCAN_API_URI | URI for the Rollupscan API. | `http://rollup-explorer-backend.scrollsdk/api` |
146+
| EXTERNAL_EXPLORER_URI_L1 | External Explorer URI for L1. | `http://l1-explorer.scrollsdk` |
147+
| EXTERNAL_EXPLORER_URI_L2 | External Explorer URI for L2. | `http://blockscout.scrollsdk` |
148+
| ADMIN_SYSTEM_DASHBOARD_URI | URI for the Admin System Dashboard. | `http://admin-system-dashboard.scrollsdk` |
149+
| GRAFANA_URI | URI for Grafana. | `http://grafana.scrollsdk` |
150+
78151
### Genesis
79152

153+
Contained in the `[genesis]` section.
154+
80155
| Config Variable | Description | Default Value |
81156
|-----------------|-------------|---------------|
82157
| L2_MAX_ETH_SUPPLY | Sets the maximum ETH supply for the L2 network. | `226156424291633194186662080095093570025917938800079226639565593765455331328` |
83158
| L2_DEPLOYER_INITIAL_BALANCE | Sets the initial balance for the L2 deployer account. | 1000000000000000000 |
84159

85160
### Contracts
86161

162+
Contained in the `[contracts]` section.
163+
87164
| Config Variable | Description | Default Value |
88165
|-----------------|-------------|---------------|
89166
| DEPLOYMENT_SALT | Salt used for contract deployment. | `salt-000` |
@@ -92,6 +169,8 @@ Local Devnet defaults shown.
92169

93170
### Contracts Overrides
94171

172+
Contained in the `[contracts.overrides]` section.
173+
95174
| Config Variable | Description | Default Value |
96175
|-----------------|-------------|---------------|
97176
| L2_MESSAGE_QUEUE | Override address for the L2 message queue contract. | `0x5300000000000000000000000000000000000000` |
@@ -102,28 +181,22 @@ Local Devnet defaults shown.
102181

103182
### Coordinator
104183

184+
Contained in the `[coordinator]` section.
185+
105186
| Config Variable | Description | Default Value |
106187
|-----------------|-------------|---------------|
107188
| CHUNK_COLLECTION_TIME_SEC | Time in seconds for chunk collection. | 3600 |
108189
| BATCH_COLLECTION_TIME_SEC | Time in seconds for batch collection. | 1800 |
109190
| BUNDLE_COLLECTION_TIME_SEC | Time in seconds for bundle collection. | 600 |
110191
| COORDINATOR_JWT_SECRET_KEY | Secret key used for JWT authentication in the coordinator. | `e788b62d39254928a821ac1c76b274a8c835aa1e20ecfb6f50eb10e87847de44` |
111192

112-
### Frontend
113-
114-
| Config Variable | Description | Default Value |
115-
|-----------------|-------------|---------------|
116-
| EXTERNAL_RPC_URI_L1 | External RPC URI for L1. | `http://l1-devnet.scrollsdk` |
117-
| EXTERNAL_RPC_URI_L2 | External RPC URI for L2. | `http://l2-rpc.scrollsdk` |
118-
| BRIDGE_API_URI | URI for the Bridge API. | `http://bridge-history-api.scrollsdk/api` |
119-
| ROLLUPSCAN_API_URI | URI for the Rollupscan API. | `http://rollup-explorer-backend.scrollsdk/api` |
120-
| EXTERNAL_EXPLORER_URI_L1 | External Explorer URI for L1. | `http://l1-explorer.scrollsdk` |
121-
| EXTERNAL_EXPLORER_URI_L2 | External Explorer URI for L2. | `http://blockscout.scrollsdk` |
122-
| ADMIN_SYSTEM_DASHBOARD_URI | URI for the Admin System Dashboard. | `http://admin-system-dashboard.scrollsdk` |
123-
| GRAFANA_URI | URI for Grafana. | `http://grafana.scrollsdk` |
124193

125194
### Ingress
126195

196+
Contained in the `[ingress]` section.
197+
198+
Ingress values are not used by the configuration generation scripts, but used by the `scroll-sdk-cli` to configure hosts and TLS settings in the values files for each chart.
199+
127200
| Config Variable | Description | Default Value |
128201
|-----------------|-------------|---------------|
129202
| FRONTEND_HOST | Host for the frontend. | `frontends.scrollsdk` |
@@ -132,9 +205,13 @@ Local Devnet defaults shown.
132205
| COORDINATOR_API_HOST | Host for the Coordinator API. | `coordinator-api.scrollsdk` |
133206
| RPC_GATEWAY_HOST | Host for the RPC Gateway. | `l2-rpc.scrollsdk` |
134207
| BLOCKSCOUT_HOST | Host for Blockscout. | `blockscout.scrollsdk` |
208+
| BLOCKSCOUT_BACKEND_HOST | Host for Blockscout Backend. | `blockscout-backend.scrollsdk` |
135209
| ADMIN_SYSTEM_DASHBOARD_HOST | Host for the Admin System Dashboard. | `admin-system-dashboard.scrollsdk` |
136210
| L1_DEVNET_HOST | Host for the L1 Devnet. | `l1-devnet.scrollsdk` |
137211
| L1_EXPLORER_HOST | Host for the L1 Explorer. | `l1-explorer.scrollsdk` |
212+
| GRAFANA_HOST | Host for the Grafana frontend. | `grafana.scrollsdk` |
213+
214+
{/* TODO: Check Blockscout backend host after PR is merged. */}
138215

139216
## Sepolia Deployment
140217

@@ -144,7 +221,7 @@ The `scroll-sdk-cli` tool has a command for generating new accounts setting the
144221

145222
### Generating Accounts
146223

147-
To generate new test accounts quickly, run the following command on a machine with Foundry installed.
224+
To generate new test accounts quickly without using the `scroll-sdk-cli`, run the following command on a machine with Foundry installed.
148225

149226
```bash
150227
cast wallet new --number 6 --json

src/content/docs/en/sdk/technical-stack/index.mdx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,43 @@ The articles in this section will be focus on the various parts a Scroll SDK cha
1919

2020
### Scroll SDK Repo & Charts
2121

22-
Scroll SDK can be found [on GitHub](https://github.com/scroll-tech/scroll-sdk). The SDK built around Kubernetes and is designed to be easy to launch and maintain for anyone familiar with Kubernetes and Helm.
22+
Scroll SDK can be found [on GitHub](https://github.com/scroll-tech/scroll-sdk). The SDK built is leveraging Kubernetes and is designed to be easy to launch and maintain for anyone familiar with Kubernetes and Helm.
2323

2424
The repo consists of these major components:
2525
1. Example config files for preparing your network *(see [Configuration](/en/sdk/technical-stack/configuration))*
2626
1. Helm charts for deploying the necessary services and contracts *(see [Services](/en/sdk/technical-stack/services))*
27-
1. A docker image for building the correct configuration files for these services *(see [Smart Contracts](/en/sdk/technical-stack/contracts))*
28-
1. An Ansible playbook for setting up a zk prover *(see [Proof Generation](/en/sdk/technical-stack/proof-generation))*
27+
1. A docker image for building the correct configuration files for these services and gathering smart contract addresses before deployment *(see [Smart Contracts](/en/sdk/technical-stack/contracts))*
28+
1. An Ansible playbook for setting up a zk prover if not using a third party proof generation service *(see [Proof Generation](/en/sdk/technical-stack/proof-generation))*
2929

3030
<Aside type="tip">
31-
Although Scroll SDK is somewhat opinionated towards Kubernetes, it is designed to be easy to modify and extend, and every chart also lists the underlying Docker image and container commands.
31+
Although Scroll SDK is somewhat opinionated towards Kubernetes, it is designed to be easy to modify and extend. Every chart lists the underlying Docker image and container commands.
3232
</Aside>
3333

3434
### Scroll SDK CLI
3535

36-
Additionally, a [scroll-sdk-cli](https://github.com/scroll-tech/scroll-sdk-cli) tool is available to help with common automations and testing tasks.
36+
Additionally, the [scroll-sdk-cli](https://github.com/scroll-tech/scroll-sdk-cli) tool is available to help with common automations and testing tasks. It greatly simplifies the process of creating a new Scroll SDK chain and includes a number of helpful commands for interacting with your chain.
3737

3838
It also supports custom plugins using the [oclif framework](https://oclif.com/docs/plugins).
3939

40+
## Scroll Proving SDK
41+
42+
The Scroll Proving SDK is a Rust crate for integrating Scroll SDK support into your prover services. The proof generation providers should use this SDK to build their own Helm charts, allowing SDK operators to out-source proof generation.
43+
44+
For an example service built using `scroll-proving-sdk`, see the `cloud.rs` example in the[Scroll Proving SDK](https://github.com/scroll-tech/scroll-proving-sdk/blob/haoyu/sindri_tokio/examples/cloud.rs) repo.
45+
46+
{/* TODO: check if this branch has been merged into main */}
47+
4048
## Deployment Process
4149

4250
Scroll SDK has two deployment options: a local devnet and a production deployment.
4351

44-
When deploying a local Devnet, all services are deployed by a single "chart". Configuration is minimal, and the deployment includes additional services like a hosting a database in the cluster. We assume users are working inside the `devnet` directory of a `scroll-sdk` clone.
52+
When deploying a local Devnet, all services are deployed by a single "chart". Configuration is minimal, and the deployment includes additional services like a hosting a database in the cluster. We assume users are working inside the `devnet` directory of a `scroll-sdk` cloned repo.
4553

46-
In production deployments, each service is an independent chart. This is often more natural for tight control over upgrades and configuration. Production deployments assume that services like a database or monitoring stacks will be provided by the chain operator. Because of the additional modularity and flexibility, additional configuration is needed and some knowledge of Kubernetes may be required. We also assume users will create a new repo for storing their production workflow and configuration files.
54+
In production deployments, each service is deployed as an independent chart. This is often more natural for tight control over upgrades and configuration. Production deployments assume that services like a database or monitoring stacks will be provided by the chain operator. Because of the additional modularity and flexibility, additional configuration is needed and some knowledge of Kubernetes is required. We also assume users will create a new repo for storing their production workflow and configuration files.
4755

4856
### Devnet
4957

50-
For a full devnet walkthrough, see the [Devnet Deployment](/en/sdk/guides/devnet-deployment) guide.
58+
For a full devnet deployment walkthrough, see the [Devnet Deployment](/en/sdk/guides/devnet-deployment) guide.
5159

5260
#### PreReqs
5361

@@ -118,4 +126,4 @@ In addition, you'll want to prepare the following items:
118126
- A Kubernetes Ingress Controller (i.e. Nginx)
119127
- A Secret Store for storing sensitive information (i.e. AWS Secrets, Hashicorp Vault) and a way to access it from Kubernetes using [External Secrets](https://external-secrets.io/latest/)
120128

121-
More information on choosing and setting up these services for various cloud providers will be provided in the [Guides](/en/sdk/guides) section.
129+
More information on choosing and setting up these services for various cloud providers is provided in the [Guides](/en/sdk/guides) section.

0 commit comments

Comments
 (0)