Skip to content

Commit

Permalink
Merge branch 'main' into hive_full_snap_upgrade_
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored Sep 14, 2024
2 parents e22e9c8 + f877568 commit cc824d9
Show file tree
Hide file tree
Showing 14 changed files with 6,360 additions and 1,188 deletions.
1 change: 1 addition & 0 deletions .github/workflows/taiko-client--hive_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'option.hive-test')
name: hive tests
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Cancel Previous Runs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/taiko-client--test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
if: github.event.pull_request.draft == false
name: Integration tests
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Cancel Previous Runs
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"packages/snaefell-ui": "1.1.0",
"packages/supplementary-contracts": "1.0.0",
"packages/taiko-client": "0.36.0",
"packages/taikoon-ui": "1.2.0",
"packages/taikoon-ui": "1.3.0",
"packages/ui-lib": "1.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,21 @@ This guide outlines how to achieve this with separate EOAs running prover and pr

1. **Clone the Taiko monorepo**

The [Taiko monorepo](https://github.com/taikoxyz/taiko-mono) contains the scripts for deploying your `ProverSet`.
The [Taiko monorepo](https://github.com/taikoxyz/taiko-mono) contains the scripts for deploying your `ProverSet`. Checkout the latest stable release. (Use `protocol-v1.9.0` for Hekla!)

<Tabs>
<TabItem label="Mac/Linux">
```bash
git clone https://github.com/taikoxyz/taiko-mono.git
cd taiko-mono/packages/protocol
git checkout tags/{release-tag}
```
</TabItem>
<TabItem label="Windows">
```sh
git clone https://github.com/taikoxyz/taiko-mono.git
cd taiko-mono/packages/protocol && git config core.autocrlf false
git checkout tags/{release-tag}
```
</TabItem>
</Tabs>
Expand All @@ -54,6 +56,10 @@ This guide outlines how to achieve this with separate EOAs running prover and pr
ROLLUP_ADDRESS_MANAGER={ADDRESS} PROVER_SET_ADMIN={ADDRESS} forge script --chain-id {CHAIN_ID} --rpc-url {YOUR_RPC_URL} --private-key {PRIVATE_KEY} --broadcast script/DeployProverSet.s.sol:DeployProverSet
```
<Aside>
For `protocol-v1.9.0`, the path is script/layer1/DeployProverSet.s.sol:DeployProverSet
</Aside>
The script should print your implementation and proxy address with the log:
```
Expand Down Expand Up @@ -91,7 +97,7 @@ This guide outlines how to achieve this with separate EOAs running prover and pr

6. **Deposit your tokens and run your proposer + prover as usual!**

If you've followed the instructions, send your TAIKO/TTKOh to the ProverSet proxy and begin running your prover and proposer as usual. Do not send it to the contract directly! Use the `depositBond` function.
If you've followed the instructions, send your TAIKO/TTKOh to the ProverSet proxy and begin running your prover and proposer as usual. Send the tokens to your ProverSet contract, and start proving. If you've set up your allowance properly, there should be no need to use the `depositBond` function, as it deposits TTKOh from the ProverSet to TaikoL1.

<Aside>
Make sure to set your `$PROVER_SET` in your `simple-taiko-node` .env file as the proxy address.
Expand All @@ -115,23 +121,41 @@ If you've already deployed a ProverSet but would like to upgrade it through the

This will be necessary for the following step.

2. **Navigate to the taiko monorepo**
2. **Navigate to the taiko monorepo and checkout the release version of ProverSet you want to deploy.**

```bash
cd taiko-mono/packages/protocol
git checkout tags/{PROTOCOL_RELEASE_TAG}
```

3. **Run the UpgradeProverSet.s.sol script**
3. **Deploy the ProverSet contract from your prover EOA and call upgradeTo with the new implementation address on your original Proxy**

Execute the following command, filling in the values in the curly braces appropriately.

```bash
PROXY_ADDRESS={YOUR_PROXY_ADDRESS} PRIVATE_KEY={YOUR_PRIVATE_KEY} forge script --chain-id 17000 --rpc-url {YOUR_RPC_URL} --broadcast script/upgrade/UpgradeProverSet.s.sol:UpgradeProverSet
forge create --private-key {YOUR_PRIVATE_KEY} --chain-id 17000 --rpc-url {YOUR_RPC_URL} contracts/layer1/provers/ProverSet.sol:ProverSet
```

<Aside>
If you are getting EvmErrors, your private key may be formatted incorrectly; try prefixing it with `0x` and rerunning the script.

Depending on the protocol release you use, the path to the ProverSet contract may also be different; change as necessary!
</Aside>

You should see logs like these:

```
Deployer: 0x3e5c...
Deployed to: 0x9186...
Transaction hash: 0xf0ebb...
```

Then, proceed to your original Proxy contract; access the `Write to Proxy` tab and scroll to the `upgradeTo()` function.
Connect your EOA that you originally deployed the ProverSet from and call the function with your new `Deployed to:` address.
Once the transaction succeeds, you have successfully upgraded your ProverSet.
</Steps>
## FAQ
Expand All @@ -142,11 +166,6 @@ If you've already deployed a ProverSet but would like to upgrade it through the
It's not missing, it's just been deposited as bond in the TaikoL1 contract; you can withdraw it from the ProverSet contract with [withdrawBond()](https://github.com/taikoxyz/taiko-mono/blob/dd09223de53669b84241672eeb4b8574e5c7f821/packages/protocol/contracts/team/proving/ProverSet.sol#L110) manually.
<Card title="Troubleshooting" icon="error">
If you run into any problems, please visit the [node troubleshooting page](/guides/node-operators/node-troubleshooting) for help.
If you run into an error that isn't yet listed, please reach out in our [Discord](https://discord.com/invite/taikoxyz)!
</Card>
### How do I verify my ProverSet contract?
Once you've deployed the contract, you should be able to find the contract address. You can do this on Etherscan manually or with forge!
Expand All @@ -155,7 +174,12 @@ If you've already deployed a ProverSet but would like to upgrade it through the
Then, navigate to the `protocol` package in `taiko-mono` and execute the following command substituting values in curly braces as necessary.
```bash
forge verify-contract --chain-id 17000 --etherscan-api-key {GET-API-KEY-FROM-ETHERSCAN-FIRST} {PUT-CONTRCT-ADDRESS-HERE} contracts/team/proving/ProverSet.sol:ProverSet
forge verify-contract --chain-id 17000 --etherscan-api-key {GET-API-KEY-FROM-ETHERSCAN-FIRST} {PUT-CONTRACT-ADDRESS-HERE} contracts/team/proving/ProverSet.sol:ProverSet
```
You should get a success message and your contract should now show up as verified on Etherscan!
<Card title="Troubleshooting" icon="error">
If you run into any problems, please visit the [node troubleshooting page](/guides/node-operators/node-troubleshooting) for help.
If you run into an error that isn't yet listed, please reach out in our [Discord](https://discord.com/invite/taikoxyz)!
</Card>
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ First, retrieve the block number that you were assigned from your logs.

Pause your prover with `docker compose down` (do NOT use `-v` as this will delete your volumes and cause you to resync from genesis).

Set `STARTING_BLOCK_ID={YOUR_ASSIGNED_BLOCKID}` in your `.env` File.
Set `PROVER_STARTING_BLOCK_ID={YOUR_ASSIGNED_BLOCKID}` in your `.env` File.

Continue your prover with `docker compose up` (`-d` is optional). You should see logs from `taiko-client-prover-relayer` start up again at your assigned blockID.
You can search with the following command: `docker compose logs taiko_client_prover_relayer | grep "{YOUR_ASSIGNED_BLOCKID}"`, and then check your Raiko instance for logs pertaining to proof generation!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ MR_SIGNER=$MR_SIGNER \
QEID_PATH=$QEID_PATH \
TCB_INFO_PATH=$TCB_INFO_PATH \
V3_QUOTE_BYTES=$V3_QUOTE_BYTES \
forge script script/SetDcapParams.s.sol:SetDcapParams \
forge script script/layer1/SetDcapParams.s.sol:SetDcapParams \
--fork-url $FORK_URL \
--broadcast \
--evm-version cancun \
Expand Down
Loading

0 comments on commit cc824d9

Please sign in to comment.