Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DAL baker tutorial #423

Merged
merged 37 commits into from
Aug 28, 2024
Merged

Conversation

timothymcmackin
Copy link
Collaborator

@timothymcmackin timothymcmackin commented Jul 19, 2024

  • Update to use Ghostnet
  • Allow people with pre-existing bakers to skip ahead and add a DAL node to an existing setup
  • Update to require an always-on computer instead of a Docker container
  • Put things in the right order so the user waits for the delay after starting the baker
  • Separate last part so the transition after the wait for attestation rights happens between lessons instead of in the middle of one
  • Add troubleshooting section
  • Add info on stopping baking and withdrawing rewards
  • Add info on sending the tez back
  • Many, many fixes and clarifications

Preview: https://docs-staging-git-update-dal-baker-tutorial-trili-tech.vercel.app/tutorials/join-dal-baker

TODOs:

  • Do I need to leave things running during the attestation delay, or must it only be running when the delay is up and my baker must start attesting?
  • Where to call /p2p/gossipsub/connections and what does it tell you?
  • Should this really be a tutorial? It takes 3.5 days to get rights on Ghostnet, and if your daemons are not running at this time you get deactivated and have to reactivate and wait more. Tutorials should be something that you can follow on a personal computer in a few hours, not something that requires a week and an always-on computer. -- Decision: Let's require an always-on computer and that's just what is needed for this tutorial.

@timothymcmackin timothymcmackin self-assigned this Jul 19, 2024
@timothymcmackin timothymcmackin requested a review from a team as a code owner July 19, 2024 18:17
Copy link

vercel bot commented Jul 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-staging ✅ Ready (Inspect) Visit Preview Aug 27, 2024 7:49pm

@baugr
Copy link

baugr commented Aug 13, 2024

I think tutorial.mdx also needs to be updated to weeklynet/ghostnet/nothing:

  title="Join the DAL as a Weeklynet baker"

docs/tutorials/join-dal-baker.md Show resolved Hide resolved
docs/tutorials/join-dal-baker/conclusion.md Outdated Show resolved Hide resolved
In this tutorial you have gone through all the steps needed to participate as a baker and DAL node.
The steps for participating on any other network, including Tezos Mainnet, are similar, but the attestation delay is much longer on other networks.

You could further improve the setup by defining system services so that the daemons are automatically launched when the machine starts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: In the next release, we are going to provide Debian packages that could do something like that. But this is not with docker, but systemd.

docs/tutorials/join-dal-baker.md Outdated Show resolved Hide resolved

You could further improve the setup by defining system services so that the daemons are automatically launched when the machine starts.
You could also plug a monitoring solution such as the Prometheus + Grafana combo; a Grafana dashboard template for DAL nodes is available in Grafazos.
The interactions between your baker and the chain can be observed on the Explorus block explorer which is aware of the DAL and can in particular display which DAL slots are being used at each level.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Explorus check is rather easy to do, maybe it could be interesting to put it in the tutorial?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any way in Explorus to show that a baker is doing DAL attestations. The DAL page shows if slots are attested but not what bakers are active with the DAL. So looking the baker up in Explorus doesn't seem to provide any info that confirms the baker's DAL activity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trick is to look: https://explorus.io/consensus_ops , you'll see some bakers have a 0 in the bitset field for DAL. Most of them do not have it yet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I should have hunted around more. How's this? I was unable to get a screenshot with anything other than 0 and X:

Screenshot 2024-08-13 at 1 42 14 PM

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated now that we've got better nodes running on Ghostnet:
dal-explorus-consensus-ops

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

docs/tutorials/join-dal-baker/prepare-account.md Outdated Show resolved Hide resolved
docs/tutorials/join-dal-baker/prepare-account.md Outdated Show resolved Hide resolved
docs/tutorials/join-dal-baker/run-dal-node.md Show resolved Hide resolved
docs/tutorials/join-dal-baker/run-baker.md Outdated Show resolved Hide resolved
sudo apk add curl
```

1. In the same terminal window, run this command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this in a dedicated section like: Check the DAL node is well configured that says:

  • When the bakers starts, it registers to the DAL node with the profile (we could give it earlier actually) that will tell which topics to track.
  • Check your DAL node still have some connections

I will try to ensure there is a producer but it is not the case at the moment, so we cannot guarantee there is some connections in each topics, but what is important is that the node is still connected to the bootstrap nodes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are three types of profiles:

  • Operator (if you are a rollup operator)
  • Observer (if you are a rollup observer)
  • Attester (if you are an attester)

When nothing is mentioned on the CLI, it is none of the three above, so there is no topics.

When the baker starts and a DAL node is provided, it patches the DAL node profile (via an RPC) to take into account the profile associated to the baker.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on clarifying the modes/profiles here: https://gitlab.com/tezos/tezos/-/merge_requests/14591

@francoisthire
Copy link
Contributor

I hope I have provided some elements regarding your two TODOs questions.

@francoisthire
Copy link
Contributor

LGTM.

@timothymcmackin timothymcmackin merged commit 6d44666 into staging Aug 28, 2024
4 checks passed
@timothymcmackin timothymcmackin deleted the update-dal-baker-tutorial branch August 28, 2024 17:36
@germanD
Copy link
Contributor

germanD commented Aug 29, 2024

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants