-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add eigenda steps to run #271
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,23 +181,155 @@ updates/optimizations or completely changing the DA verification logic, e.g. due | |
<details> | ||
<summary>How to configure EigenDA client?</summary> | ||
|
||
1. Add the following block to the `general.yaml`, values used are only an example: | ||
## Common changes | ||
|
||
Changes needed both for local and mainnet/testnet setup. | ||
|
||
1. Add `da_client` to `etc/env/file_based/general.yaml`: | ||
|
||
```yaml | ||
da_client: | ||
eigen: | ||
rpc_node_url: https://disperser-holesky.eigenda.xyz:443 | ||
inclusion_polling_interval_ms: 2000 | ||
disperser_rpc: <your_desired_disperser> | ||
settlement_layer_confirmation_depth: -1 | ||
eigenda_eth_rpc: <your_desired_rpc> | ||
eigenda_svc_manager_address: '0xD4A7E1Bd8015057293f0D0A557088c286942e84b' | ||
status_query_timeout: 1800000 # ms | ||
status_query_interval: 5 # ms | ||
wait_for_finalization: false | ||
authenticated: false | ||
verify_cert: true | ||
path_to_points: ./resources | ||
chain_id: <your_chain_id> | ||
``` | ||
|
||
2. Add the following block to the `secrets.yaml`: | ||
2. Also set the private key in `etc/env/file_based/secrets.yaml`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
||
```yaml | ||
da: | ||
eigen: | ||
private_key: YOUR_PRIVATE_KEY | ||
``` | ||
|
||
3. (optional) for using pubdata with 2MiB (as per specification), modify `etc/env/file_based/general.yaml`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and here |
||
|
||
```yaml | ||
max_pubdata_per_batch: 2097152 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we actually have a limit of |
||
``` | ||
|
||
## Local Setup | ||
|
||
1. Install `zkstack` | ||
|
||
```bash | ||
cargo install --path zkstack_cli/crates/zkstack --force --locked | ||
``` | ||
|
||
2. Start containers | ||
|
||
```bash | ||
zkstack containers --observability true | ||
``` | ||
|
||
3. Create `eigen_da` chain | ||
|
||
```bash | ||
zkstack chain create \ | ||
--chain-name eigen_da \ | ||
--chain-id sequential \ | ||
--prover-mode no-proofs \ | ||
--wallet-creation localhost \ | ||
--l1-batch-commit-data-generator-mode validium \ | ||
--base-token-address 0x0000000000000000000000000000000000000001 \ | ||
--base-token-price-nominator 1 \ | ||
--base-token-price-denominator 1 \ | ||
--set-as-default false | ||
``` | ||
|
||
4. Initialize created ecosystem | ||
|
||
```bash | ||
zkstack ecosystem init \ | ||
--deploy-paymaster true \ | ||
--deploy-erc20 true \ | ||
--deploy-ecosystem true \ | ||
--l1-rpc-url http://127.0.0.1:8545 \ | ||
--server-db-url=postgres://postgres:notsecurepassword@localhost:5432 \ | ||
--server-db-name=zksync_server_localhost_eigen_da \ | ||
--chain eigen_da \ | ||
--verbose | ||
``` | ||
|
||
You may enable observability here if you want to. | ||
|
||
5. Start the server | ||
|
||
```bash | ||
zkstack server --chain eigen_da | ||
``` | ||
|
||
## Mainnet/Testnet setup | ||
|
||
### Modify localhost chain id number | ||
|
||
Modify line 32 in `zk_toolbox/crates/types/src/l1_network.rs`: | ||
|
||
```rs | ||
L1Network::Localhost => 17000, | ||
``` | ||
|
||
Then recompile the zkstack: | ||
|
||
```bash | ||
cargo install --path zkstack_cli/crates/zkstack --force --locked | ||
``` | ||
|
||
### Used wallets | ||
|
||
Modify `etc/env/file_based/wallets.yaml` and `configs/wallets.yaml` with the following wallets: | ||
|
||
```yaml | ||
# Use your own holesky wallets, be sure they have enough funds | ||
``` | ||
|
||
> ⚠️ Some steps distribute ~5000ETH to some wallets, modify `AMOUNT_FOR_DISTRIBUTION_TO_WALLETS` to a lower value if | ||
> needed. | ||
|
||
### Create and initialize the ecosystem | ||
|
||
(be sure to have postgres container running on the background) | ||
|
||
```bash | ||
zkstack chain create \ | ||
--chain-name holesky_eigen_da \ | ||
--chain-id 114411 \ | ||
--prover-mode no-proofs \ | ||
--wallet-creation localhost \ | ||
--l1-batch-commit-data-generator-mode validium \ | ||
--base-token-address 0x0000000000000000000000000000000000000001 \ | ||
--base-token-price-nominator 1 \ | ||
--base-token-price-denominator 1 \ | ||
--set-as-default false | ||
|
||
zkstack ecosystem init \ | ||
--deploy-paymaster true \ | ||
--deploy-erc20 true \ | ||
--deploy-ecosystem true \ | ||
--l1-rpc-url $HOLESKY_RPC_URL \ | ||
--server-db-url=postgres://postgres:notsecurepassword@localhost:5432 \ | ||
--server-db-name=zksync_server_holesky_eigen_da \ | ||
--prover-db-url=postgres://postgres:notsecurepassword@localhost:5432 \ | ||
--prover-db-name=zksync_prover_holesky_eigen_da \ | ||
--chain holesky_eigen_da \ | ||
--verbose | ||
``` | ||
|
||
### Start the server | ||
|
||
```bash | ||
zkstack server --chain holesky_eigen_da | ||
``` | ||
|
||
</details> | ||
|
||
<details> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ celestia | |
Eigen | ||
eigen | ||
turing | ||
eigenda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about
etc/env/file_based
as those are the base for all the chains, I'd prefer we use a generic pattern to point to the specific chain config