Skip to content

Commit

Permalink
move some steps in run-node and do other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicNomadic committed Dec 17, 2024
1 parent cf269e7 commit ceb2ac9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 36 deletions.
27 changes: 1 addition & 26 deletions docs/tutorials/join-dal-baker/prepare-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,6 @@ last_update:
The baker needs a user account that stakes tez.
In this section, you use the Octez client to create an account, register it as a delegate, and stake tez with it.

1. Connect the Octez client to your node by running this command:

```bash
octez-client -E http://localhost:8732 config update
```

If you see an error that says "Failed to acquire the protocol version from the node," ensure that your node is running and verify that the host name and port in the `config update` command are correct.

1. Make sure that the installation of the Octez client is using your node by running this command:

```bash
octez-client bootstrapped
```

The client waits until it is connected and the node is running at the current level.
When it is connected and the node is updated, the command prints the message `Node is bootstrapped`.
The time it takes depends on how many blocks the node must retrieve to catch up from the snapshot to the current head block.

1. Optional: Hide the Octez client's network warning message by running this command:

```bash
export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=y
```

This command suppresses the message that your instance of the Octez client is not using Mainnet.

1. Create or import an account in the Octez client.
The simplest way to get an account is to use the Octez client to randomly generate an account.
This command creates an account and associates it with the `my_baker` alias:
Expand All @@ -60,6 +34,7 @@ This command creates an account and associates it with the `my_baker` alias:
To get tez, use the Ghostnet faucet linked from https://teztnets.com/ghostnet-about to send tez to the baker account.

Running a baker requires staking at least 6,000 tez, but the more tez it stakes, the more rights it gets and the less time it has to wait to produce blocks and make attestations.
However, be aware that, for protecting abuses of the faucet, getting such amounts of tez from the faucet may take a long time (e.g. more than one hour). Consequently, some individual requests may occasionally time out or fail and need to be relaunched.

1. Verify that the faucet sent the tez to the account with the same `get balance` command:

Expand Down
8 changes: 3 additions & 5 deletions docs/tutorials/join-dal-baker/run-baker.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,17 @@ For example, if the delay is 307,200 seconds, that time is about 3.5 days.

The exact time depends on what time in the current cycle the account staked its tez.

1. Wait for the attestation delay to be over and then proceed to [Step 5: Verify attestation rights](/tutorials/join-dal-baker/verify-rights).

:::note

The amount of tez that the account stakes determines how often it is called on to make attestations, not how quickly it receives rights.
Therefore, staking more tez brings more rewards but does not reduce the attestation delay.

:::

## Checking for (pre-)attestations

After the delay computed above has passed, **the baker log** (not the Octez node log, neither the DAL node log) should contain lines about:
1. After the delay computed above has passed, **the baker log** (not the Octez node log, neither the DAL node log) should contain lines about:

- Consensus pre-attestations: `injected preattestation ...`
- Consensus attestations: `injected attestation ...`
- Attach DAL attestations: `ready to attach DAL attestation ...`

Whether these messages appear or not after the attestation delay, proceed to [Step 5: Verifications](/tutorials/join-dal-baker/verify-rights).
2 changes: 1 addition & 1 deletion docs/tutorials/join-dal-baker/run-dal-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ For example, this command initializes the DAL node with the address of a local `

1. Ensure that the DAL node runs persistently.
Look up how to run programs persistently in the documentation for your operating system.
You can also refer to [Run a persistent baking node](https://opentezos.com/node-baking/baking/persistent-baker/) on opentezos.com.
You can also refer to [Setting up Octez Services](https://tezos.gitlab.io/introduction/services.html) in the Octez documentation.

For example, if your operating system uses the `systemd` software suite, your service file might look like this example:

Expand Down
29 changes: 27 additions & 2 deletions docs/tutorials/join-dal-baker/run-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,36 @@ For example, the command to download a Ghostnet snapshot from the European serve
At first launch, the node generates a fresh identity file used to identify itself on the network.
Then it bootstraps the chain, which takes a variable amount of time depending on how many blocks need to be loaded.
You don't need to wait for the node to bootstrap now.
1. Make sure the Octez client uses your node by running this command:
```bash
octez-client -E http://localhost:8732 config update
```

If you see an error that says "Failed to acquire the protocol version from the node," ensure that your node is running and verify that the host name and port in the `config update` command are correct.

1. Wait for your node to bootstrap by running this command:

```bash
octez-client bootstrapped
```

The client waits until it is connected and the node is running at the current level.
When it is connected and the node is updated, the command prints the message `Node is bootstrapped`.
The time it takes depends on how many blocks the node must retrieve to catch up from the snapshot to the current head block.

1. Optional: Hide the Octez client's network warning message by running this command:

```bash
export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=y
```

This command suppresses the message that your instance of the Octez client is not using Mainnet.

1. Ensure that the node runs persistently.
Look up how to run programs persistently in the documentation for your operating system.
You can also refer to [Setting up Octez Services](https://tezos.gitlab.io/introduction/services.html) in the Octez documentation.
You can also refer to [Run a persistent baking node](https://opentezos.com/node-baking/baking/persistent-baker/) on opentezos.com or [Setting up Octez Services](https://tezos.gitlab.io/introduction/services.html) in the Octez documentation.

1. Optional: When the node has bootstrapped and caught up with the current head block, you can delete the snapshot file to save space.

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/join-dal-baker/verify-rights.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Step 5: Troubleshooting"
title: "Step 5: Verifications"
authors: Tezos core developers, Tim McMackin
last_update:
date: 2 December 2024
---

If after the delay that you calculated in [Step 4: Run an Octez baking daemon](/tutorials/join-dal-baker/run-baker), the baker does not start inserting consensus (pre-)attestations and DAL attestations, follow these instructions to diagnose and fix the issue.
After the delay that you calculated in [Step 4: Run an Octez baking daemon](/tutorials/join-dal-baker/run-baker), follow these instructions to verify the activity or diagnose and fix issues.

1. Record the address of your baker account in an environment variable so you can use it for commands that cannot get addresses by their Octez client aliases:

Expand Down

0 comments on commit ceb2ac9

Please sign in to comment.