Skip to content

Commit

Permalink
Remove duplicated section on README
Browse files Browse the repository at this point in the history
  • Loading branch information
xqft authored Oct 3, 2024
1 parent 2c601a0 commit b9e7b53
Showing 1 changed file with 0 additions and 114 deletions.
114 changes: 0 additions & 114 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,120 +353,6 @@ In the Mina Bridge repo, setup the `.env` file. A template is available in `.env
### Bridge a Mina account
1. In the root folder, deploy the Bridge's contracts with:

```sh
make deploy_contract
```

In the `.env` file, set `STATE_SETTLEMENT_ETH_ADDR` and `ACCOUNT_VALIDATION_ETH_ADDR` to the corresponding deployed contract addresses.

1. Submit a Mina state proof to verify (**NOTE:** Because of the Aligned minimum batch size, you may need to submit two proofs to make Aligned Devnet verify them):

- Run `make submit_devnet_state` if you are using Mina Devnet or `make submit_mainnet_state` if you are using Mina Mainnet.

1. Submit an account to verify (**NOTE:** Because of the Aligned minimum batch size, you may need to submit two proofs to make Aligned Devnet verify them):

```sh
make submit_account PUBLIC_KEY=<string> STATE_HASH=<string>
```

Where:
- `PUBLIC_KEY` is the public key of the Mina account you want to verify
- `STATE_HASH` is the hash of a Mina state that was verified in Ethereum

1. Open a new terminal and register the operator:

```sh
eigenlayer operator register config-files/holesky/config.yaml
```

1. Whitelist the registered operator:

```sh
make operator_whitelist OPERATOR_ADDRESS=<operator_account_address>
```

1. Deposit Strategy tokens for the operator. Follow [this section from the AlignedLayer docs](https://docs.alignedlayer.com/operators/0_running_an_operator#step-4-deposit-strategy-tokens).

1. Start operator:

```sh
make operator_start CONFIG_FILE=config-files/holesky/config.yaml
```

1. Set `contracts/script/deploy/config/holesky/batcher-payment-service.holesky.config.json` to:

```json
{
"address": {
"batcherWallet": "<batcher_account_address>",
"alignedLayerServiceManager": "<aligned_service_manager_address>"
},
"amounts": {
"gasForAggregator": "300000",
"gasPerProof": "21000"
},
"permissions": {
"owner": "<operator_account_address>"
},
"eip712": {
"noncedVerificationDataTypeHash": "41817b5c5b0c3dcda70ccb43ba175fdcd7e586f9e0484422a2c6bba678fdf4a3"
}
}
```

1. Deploy Batcher payment contract:

```sh
make deploy_batcher_payment_service
```

The file `contracts/script/output/holesky/alignedlayer_deployment_output.json` will have two new fields: `addresses.batcherPaymentService` and `addresses.batcherPaymentServiceImplementation`.

1. Pay the batcher:

```sh
cast send <batcher_payment_service_address> --rpc-url <eth_rpc_url> --private-key <bridge_account_private_key> --value 1ether
```

1. Deposit to batcher in the Aligned Service Manager Contract:

```sh
cast send <aligned_service_manager_address> --rpc-url <eth_rpc_url> --private-key <bridge_account_private_key> --value 1ether "depositToBatcher(address)" <batcher_payment_service_address>
```

1. Setup local storage for the batcher:

```sh
make run_storage
```

1. Start the batcher:

```sh
cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/holesky/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env.dev
```

#### Bridge environment setup

In the Mina Bridge repo, setup the `.env` file. A template is available in `.env.template`.

1. Set `ETH_CHAIN` to `holesky`.
1. Set `MINA_RPC_URL` to the URL of the Mina node GraphQL API (See [Mina node section](#mina-node)).
1. Set the rest of the env vars to:

```sh
BATCHER_ADDR="ws://localhost:8080"
BATCHER_ETH_ADDR=<batcher_payment_service_address>
ETH_RPC_URL=<url>
PROOF_GENERATOR_ADDR=0x66f9664f97F2b50F62D13eA064982f936dE76657
PRIVATE_KEY=<bridge_account_private_key>
ALIGNED_SM_HOLESKY_ETH_ADDR=<aligned_service_manager_address>
```

### Bridge a Mina account

1. In the root folder, deploy the Bridge's contracts with:

```sh
Expand Down

0 comments on commit b9e7b53

Please sign in to comment.