From c0d3be09b4a907fc5e6022f4b4184fb76e71b778 Mon Sep 17 00:00:00 2001 From: MarcusWentz Date: Fri, 29 Sep 2023 15:32:42 -0400 Subject: [PATCH] proposer + prover private key format and status log command to find errors quickly --- .../pages/docs/guides/enable-a-proposer.mdx | 23 ++++++++++++++++--- .../pages/docs/guides/enable-a-prover.mdx | 21 +++++++++++++++-- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/packages/website/pages/docs/guides/enable-a-proposer.mdx b/packages/website/pages/docs/guides/enable-a-proposer.mdx index 22407398590..b7f75120086 100644 --- a/packages/website/pages/docs/guides/enable-a-proposer.mdx +++ b/packages/website/pages/docs/guides/enable-a-proposer.mdx @@ -57,6 +57,15 @@ nano .env Set the following environment variables to enable your node as a proposer: + + For `L1_PROPOSER_PRIVATE_KEY` + make sure your private key is in hexadecimal format and with the `0x` prefix removed! + Otherswise you will get this error in your proposer status logs: + ``` + simple-taiko-node-taiko_client_proposer-1 | invalid L1 proposer private key: invalid length, need 256 bits + ``` + + - Set `ENABLE_PROPOSER` to `true` - Set `L1_PROPOSER_PRIVATE_KEY` to the private key of your L1 account (with balance) who will send TaikoL1.proposeBlock transactions - Set `L2_SUGGESTED_FEE_RECIPIENT` to the address of your L2 account who will be the tx fee beneficiary of the L2 blocks that you proposed @@ -69,15 +78,23 @@ If you are not running a local prover, then you can specify a prover from the [p - `PROVER_ENDPOINTS` -### Verify proposer logs +### Check proposer status logs + +To see if your proposer is running correctly or has errors run: + +```sh +docker compose logs -f taiko_client_proposer +``` + +### See proposed blocks -Run this command to verify you have some proposer logs: +When you run: ```sh docker compose logs -f taiko_client_proposer | egrep "Propose transactions succeeded" ``` -You should see a log if you have proposed a block: `📝 Propose transactions succeeded`. +if your proposer successfully proposed a block, your logs should show: `📝 Propose transactions succeeded`. You can check all commands to see proposer logs in the [node runner manual](/docs/manuals/node-runner-manual#view-client-proposer-logs). diff --git a/packages/website/pages/docs/guides/enable-a-prover.mdx b/packages/website/pages/docs/guides/enable-a-prover.mdx index c558ff92e84..ba0553350a2 100644 --- a/packages/website/pages/docs/guides/enable-a-prover.mdx +++ b/packages/website/pages/docs/guides/enable-a-prover.mdx @@ -54,6 +54,15 @@ nano .env Open the `.env` file and set the following environment variables to enable your node as a prover: + + For `L1_PROVER_PRIVATE_KEY` + make sure your private key is in hexadecimal format and with the `0x` prefix removed! + Otherswise you will get this error in your prover status logs: + ``` + simple-taiko-node-taiko_client_proposer-1 | invalid L1 proposer private key: invalid length, need 256 bits + ``` + + - Set `ENABLE_PROVER` to `true` - Set `L1_PROVER_PRIVATE_KEY` to your L1 account private key (with balance of TTKOj on TaikoL1), we will the public key of this account in the next Steps @@ -85,15 +94,23 @@ Finally, click the **Write** button. > Note: If you were already running a prover from your address when you approved TaikoL1 as a spender, the contract may directly drain up to the approved amount of TTKOj from your wallet to use as bond for proving. This may cause `depositTaikoToken` transactions to fail. +### Check prover status logs + +To see if your prover is running correctly or has errors run: + +```sh +docker compose logs -f taiko_client_prover_relayer +``` + ### Verify prover logs -Run this command to verify you have some prover logs: +When you run: ```sh docker compose logs -f taiko_client_prover_relayer | egrep "block proof was|proof submission error|Block proven" ``` -You should see logs like this if it was successful: +if your prover has successfully proven a block, your logs should show: - `💰 Your block proof was accepted` means you successfully submitted a proof and your bond is returned. - `✅ Block proven` means a proposed block was successfully proved on TaikoL1 (by anyone).