Skip to content

Commit

Permalink
publish-2024-05-25T19:06:16Z
Browse files Browse the repository at this point in the history
  • Loading branch information
tez-capital committed May 25, 2024
1 parent cac9bb6 commit 940c683
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 81 deletions.
2 changes: 1 addition & 1 deletion offline-search-index.json

Large diffs are not rendered by default.

67 changes: 45 additions & 22 deletions tezbake/tutorials/how-to-bake-ghostnet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<meta itemprop="name" content="How to Bake on Ghostnet">
<meta itemprop="description" content="Using TezBake to bake on the Ghostnet Tezos perpetual testnet">

<meta itemprop="wordCount" content="984">
<meta itemprop="wordCount" content="1208">
<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="How to Bake on Ghostnet"/>
<meta name="twitter:description" content="Using TezBake to bake on the Ghostnet Tezos perpetual testnet"/>
Expand Down Expand Up @@ -316,9 +316,7 @@
<li><a href="#setup-tezos-node-signer-and-install-tezbake-dependencies">Setup Tezos node, signer and install tezbake dependencies</a></li>
<li><a href="#bootstrap-tezos-node">Bootstrap Tezos node</a></li>
<li><a href="#start-tezos-node">Start Tezos node</a></li>
<li><a href="#import-ledger-key">Import Ledger key</a></li>
<li><a href="#authorize-ledger-to-bake-for-key">Authorize Ledger to bake for key</a></li>
<li><a href="#register-ledger-key-as-baker-on-the-blockchain">Register Ledger key as baker on the blockchain</a></li>
<li><a href="#import-ledger-key-and-register-as-baker">Import Ledger key and register as baker</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -427,26 +425,51 @@ <h3 id="start-tezos-node">Start Tezos node</h3>
<pre tabindex="0"><code>tezbake start
</code></pre><p>After starting the node, run the following command over and over every few minutes and monitor the &ldquo;level&rdquo; displayed.</p>
<pre tabindex="0"><code>tezbake info
</code></pre><p>Level refers to the latest block number on mainnet. Navigate to <a href="https://tzkt.io">https://tzkt.io</a> or <a href="https://tzstats.com">https://tzstats.com</a> and observe the latest block. Once the level in your command matches the latest block on your blockchain explorer, your node is in full sync and you can keep following the steps below.</p>
<h3 id="import-ledger-key">Import Ledger key</h3>
<p>Now that your node is in full sync, you can import your Ledger key. You will need to connect your Ledger and enter your Ledger PIN. Then open the Tezos Baking app.</p>
<pre tabindex="0"><code>tezbake import-key --derivation-path=&#34;ed25519/0h/0h&#34;
# If you have a custom derivation path, you can change ed to bip as shown (--derivation-path=&#34;bip25519/3h/6h/9h&#34;)
</code></pre><p>The ledger will ask you twice to confirm this operation. Make sure the baker you see on the ledger screen matches the one you want to use. If you don&rsquo;t have this information yet, don&rsquo;t worry. To get the address of the ledger that&rsquo;s used by default simply go to <a href="https://kukai.app">https://kukai.app</a> and login with ledger, accepting the default derivation path.</p>
<p>bip is supposed to be more strong in the long term than ed25519, which is the default one. Including it in the command above as shown does not change the default behavior but it shows which path is default so it can be customized for preference and security.</p>
</code></pre><blockquote>
<p>Level refers to the latest block number on mainnet. Navigate to <a href="https://tzkt.io">https://tzkt.io</a> or <a href="https://tzstats.com">https://tzstats.com</a> and observe the latest block. Once the level in your command matches the latest block on your blockchain explorer, your node is in full sync and you can keep following the steps below.</p>
</blockquote>
<blockquote>
<p>Both <a href="https://tzkt.io">https://tzkt.io</a> or <a href="https://tzstats.com">https://tzstats.com</a> provide Ghostnet and Testnet block explorers as well. Make sure you&rsquo;re looking at the right explorer.</p>
</blockquote>
<h3 id="import-ledger-key-and-register-as-baker">Import Ledger key and register as baker</h3>
<p>Now that your node is in full sync, you can proceed with the most important part: (1) your baker parameters import into your baker node and (2) your baker registration on the blockchain.</p>
<h4 id="import-ledger-key-to-signer-locally">Import Ledger key to signer locally</h4>
<pre tabindex="0"><code>tezbake setup-ledger --platform --import-key --authorize --hwm 1

# If you have a custom derivation path, you can specify it as shown: (`--import-key=&#34;ed25519/0h/0h&#34;`; change ed to bip as needed for your individual needs; the default is ed25519/0h/0h which works just fine)
# `--hwm 1` works great if you&#39;re setting up for the first time. If you&#39;re setting up a device that&#39;s been used to bake before, you want to change this (`1`) to the current block height on the blockchain for your safety.
# If you&#39;re importing for the second time after already trying again but failing, you can use `--force` to force the import.
</code></pre><blockquote>
<p>The ledger will ask you twice to confirm this operation. Make sure the baker you see on the ledger screen matches the one you want to use. If you don&rsquo;t have this information yet, don&rsquo;t worry. To get the address of the ledger that&rsquo;s used by default simply go to <a href="https://kukai.app">https://kukai.app</a> and login with ledger, accepting the default derivation path.</p>
</blockquote>
<blockquote>
<p>bip is supposed to be more strong and flexible in the long term than ed25519, which is the default one.</p>
</blockquote>
<blockquote>
<p>Putting the baker on a non-default derivation path provides an additional layer of security for your baker at the cost of extra complexity for you. Make sure your setup is clearly documented for your own records.</p>
<h3 id="authorize-ledger-to-bake-for-key">Authorize Ledger to bake for key</h3>
<p>Having imported your Ledger key to your signer, it&rsquo;s time to authorize your Ledger to bake for this key.</p>
<pre tabindex="0"><code>tezbake setup-ledger --main-hwm 1
# Pay careful attention to the value of --main-hwm
</code></pre><p>If your device was used to bake before it might have a &ldquo;high watermark&rdquo; aka HWM. If you try to use this device on a testnet, it will not work because the block height on test networks usually starts with 1 while mainnet is up to over a couple of million blocks at the time of writing.
If you used to bake on mainnet with the same ledger as you&rsquo;re trying to use now but it&rsquo;s been a while, it&rsquo;s highly recommended to change the 1 above to the current Tezos block, which can be found at.</p>
<p>The watermark is simply a record of the lack block number your ledger helped to bake or endorse. If you&rsquo;re setting up a brand new device that&rsquo;s not been used for baking before, there is no need to alter the default command above.</p>
<p>Always make sure you&rsquo;re not accidentally going to double bake by using your production ledger and/or setup to bake on a testnet. It&rsquo;s really easy to make this mistake and the only thing preventing it are your personal standard operating procedures.</p>
<h3 id="register-ledger-key-as-baker-on-the-blockchain">Register Ledger key as baker on the blockchain</h3>
<p>For this step your node level must be synced with the latest block on the blockchain explorer. You must also temporarily open your Ledger Tezos Wallet app to register your key as a baker. For all other operations, you must use the Tezos Baking app.</p>
</blockquote>
<blockquote>
<p>If your device was used to bake before it might have a &ldquo;high watermark&rdquo; aka HWM. If you try to use this device on a testnet, it will not work because the block height on test networks usually starts with 1 while mainnet is up to over a couple of million blocks at the time of writing.
If you used to bake on mainnet with the same ledger as you&rsquo;re trying to use now but it&rsquo;s been a while, it&rsquo;s highly recommended to change the 1 above to the current block on the network that will be used for the device going forward.</p>
</blockquote>
<blockquote>
<p>The watermark is simply a record of the lack block number your ledger helped to bake or attest. If you&rsquo;re setting up a brand new device that&rsquo;s not been used for baking before, there is no need to alter the default command above.</p>
</blockquote>
<blockquote>
<p>Always make sure you&rsquo;re not accidentally going to double bake by using your production ledger and/or setup to bake on a testnet. It&rsquo;s really easy to make this mistake and the only thing preventing it are your personal standard operating procedures, the documentation you keep, and the care you take when setting up your baker.</p>
</blockquote>
<blockquote>
<p>To double bake or attest due to baker setup error means having 2 different bakers with the same key on the same network. This is a serious offense and can lead to loss of bond and other penalties. Always double-check your setup and make sure you&rsquo;re not accidentally double baking or attesting.</p>
</blockquote>
<h4 id="register-ledger-key-as-baker-on-the-blockchain">Register Ledger key as baker on the blockchain</h4>
<p>For this step your node level must be synced with the latest block on the blockchain explorer. You must also temporarily open your Ledger Tezos Wallet app to register your key as a baker (<strong>note</strong>: as well as when voting). For all other baker operations, you must use the Tezos Baking app.</p>
<pre tabindex="0"><code>tezbake register-key
</code></pre><p>Registering is not necessary if this is already an active baker ledger which is being setup on some kind of failover machine or in a situation where it has not been over 2 weeks of actively baking.</p>
</code></pre><blockquote>
<p>Registering is not necessary if this is already an active baker ledger which is being setup on some kind of failover machine or in a situation where it has not been over 2 weeks of baking inactivity.</p>
</blockquote>
<blockquote>
<p>Registering applies to new bakers and to inactive bakers. If you&rsquo;re setting up a new baker, you must register it. If you&rsquo;re setting up a baker that&rsquo;s been inactive for over 2 weeks, you must register it. If you&rsquo;re setting up a baker that&rsquo;s been inactive for less than 2 weeks, you don&rsquo;t need to register it. The best way to find out if you need to register your baker again is to look into your baking rights schedule and see if they stopped coming in. If they did, you need to register your baker again.</p>
</blockquote>
<hr>
<p>Any questions/comments/concerns? Please contact the Tez Capital team on
<a href="https://discord.gg/cVGMA4MaNM">Discord</a> or <a href="https://t.me/tezcapital">Telegram</a></p>
Expand Down
Loading

0 comments on commit 940c683

Please sign in to comment.