You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update ZKThunder network configuration to testnet environment
- Modify hardhat config to use ZKThunder testnet RPC and verification URLs
- Update local-setup README with detailed chain configuration and deployment guide
- Change default domain from zkthunder.fi to testnet.zkthunder.fi
- Update Blockscout frontend environment to point to testnet endpoints
- Adjust L1 block time and chain configuration documentation
Copy file name to clipboardExpand all lines: local-setup/README.md
+193-2
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,7 @@ Your `.env` file must configure the following roles, using addresses that are pr
185
185
186
186
The Layer 1 chain configuration is defined in `local-setup/reth_chaindata/reth_config`. This file configures the local Ethereum-compatible chain used as the L1 for the zkSync deployment.
187
187
188
-
##### Chain Parameters
188
+
##### L1 Chain Parameters
189
189
190
190
-`chainId`: 9 - Unique identifier for this development chain
191
191
-`gasLimit`: "0x1c9c380" (~30M gas) - Maximum gas per block
@@ -197,9 +197,34 @@ The Layer 1 chain configuration is defined in `local-setup/reth_chaindata/reth_c
197
197
##### Network Configuration
198
198
199
199
- All major Ethereum upgrades (Homestead, EIP150, EIP155, DAO Fork, Frontier, Byzantium, Constantinople, Petersburg, Muir Glacier, Istanbul, Berlin, London, Shanghai, Cancun) are activated from block 0
200
-
- Uses Clique PoA consensus with 0 period (instant blocks) and 30000 epoch length
200
+
- Uses Clique PoA consensus with 6s period and 30000 epoch length
201
201
- Terminal Total Difficulty is set to 0 (post-merge from start)
202
202
203
+
##### Configuring L1 Block Time
204
+
205
+
The L1 block time can be configured in the `docker-compose.yml` file through the Reth node service configuration. By default, it's set to 6 seconds (6000ms):
206
+
207
+
```yaml
208
+
reth:
209
+
command: >
210
+
node --metrics 0.0.0.0:9001
211
+
--dev
212
+
--datadir /rethdata
213
+
--http
214
+
--http.corsdomain "*"
215
+
--http.addr 0.0.0.0
216
+
--http.port 8545
217
+
--dev.block-time 6000ms
218
+
--chain /chaindata/reth_config
219
+
```
220
+
221
+
To adjust the block time:
222
+
223
+
1. Modify the `--dev.block-time` parameter in the `reth` service command
224
+
2. Values are specified in milliseconds (e.g., `6000ms` for 6 seconds)
225
+
3. Shorter block times (e.g., `1000ms`) will result in faster L1 block production but may increase resource usage
226
+
4. Longer block times (e.g., `12000ms`) will reduce resource usage but slow down L1 transaction confirmations
227
+
203
228
##### Important Notes
204
229
205
230
1. All addresses used in your environment configuration MUST be pre-funded in the reth_config `alloc` section
@@ -242,6 +267,81 @@ Example configuration (before manual replacement):
242
267
}
243
268
```
244
269
270
+
## ⛓️ Chain Configuration
271
+
272
+
### Block and Batch Structure
273
+
274
+
ZK Thunder uses a hierarchical structure to process transactions:
275
+
276
+
1. **Transactions**: Individual user operations
277
+
2. **L2 Blocks (Miniblocks)**: Collections of transactions processed together
278
+
3. **L1 Batches**: Groups of L2 blocks that are proven and committed to L1
1. Replace `${APP_DOMAIN}` with your actual domain name (e.g., if APP_DOMAIN=example.com in your .env, replace all instances with "example.com")
@@ -552,3 +652,94 @@ Options:
552
652
- `--help`: Displays help message
553
653
554
654
Preserving SSL certificates (default behavior) is useful for faster redeployment since you won't need to regenerate them.
655
+
656
+
## 🚀 Deploying Changes to Production
657
+
658
+
When you need to apply changes to the production environment, you'll need to follow a specific workflow to ensure your changes are properly built, tagged, and deployed.
659
+
660
+
### Step-by-Step Deployment Guide
661
+
662
+
1. **Make and Test Your Changes Locally**
663
+
- Develop and test your changes in a local development environment
664
+
- Ensure all tests pass and the application works as expected
665
+
666
+
2. **Create and Push a Release Tag**
667
+
- The tag format must follow the pattern: `vX.Y.Z-zkthunder`
668
+
- Example: `v1.2.3-zkthunder`
669
+
670
+
```bash
671
+
# Create the tag
672
+
git tag v1.2.3-zkthunder
673
+
674
+
# Push the tag to the remote repository
675
+
git push origin v1.2.3-zkthunder
676
+
```
677
+
678
+
3. **Wait for CI/CD Pipeline**
679
+
- The CI/CD pipeline will automatically:
680
+
- Detect the new tag
681
+
- Build the Docker image
682
+
- Push the image to DockerHub with the appropriate tag
683
+
- You can monitor the build progress in your CI/CD dashboard
# Update your docker-compose.yml to use the previous version
739
+
# Then restart the service
740
+
docker compose up -d --no-deps <service-name>
741
+
```
742
+
743
+
- **Environment Variables**: Ensure any new environment variables required by your changes are properly set in the production environment's `.env` file
744
+
745
+
By following this deployment workflow, you can ensure smooth and consistent updates to your production environment.
0 commit comments