Skip to main content

Step 3: Run an Octez DAL node

The DAL node is responsible for temporarily storing data and providing it to bakers and Smart Rollups.

  1. Ensure that the port that the DAL node runs on is accessible from outside its system. You may need to adapt your firewall rules or set up network address translation (NAT) to direct external traffic to the DAL node. For more information, see Running a DAL attester node in the Octez documentation.

  2. Start the DAL node by running this command:

    octez-dal-node run >> "$HOME/octez-dal-node.log" 2>&1

    This, too, may take some time to launch the first time because it needs to generate a new identity file, this time for the DAL network.

    To set the address and port that the node listens on, pass the --net-addr argument. By default, it listens on port 11732 on all available network interfaces, equivalent to --net-addr 0.0.0.0:11732.

  3. Verify that the DAL node is connected to the DAL network by running this command:

    curl http://localhost:10732/p2p/gossipsub/connections

    The response lists the network connections that the DAL node has. It may take a few minutes for the node to connect to the DAL network.

    You can also verify that the DAL node is connected by viewing its log. When the node is bootstrapped it logs messages that look like this:

    Aug 12 17:44:19.985: started tracking layer 1's node
    Aug 12 17:44:24.418: layer 1 node's block at level 7538687, round 0 is final
    Aug 12 17:44:29.328: layer 1 node's block at level 7538688, round 0 is final

    The DAL node waits for blocks to be finalized, so this log lags 2 blocks behind the layer 1 node's log.

    Now the DAL node is connected to the DAL network but it is not yet receiving data.

  4. 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 on opentezos.com.

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

    [Unit]
    Description=Octez DAL node
    Wants = network-online.target
    After = network-online.target
    Requires = octez-node.service

    [Install]
    WantedBy=multi-user.target
    RequiredBy = octez-baker.service

    [Service]
    Type=simple
    User=mybaker
    ExecStart=/usr/bin/octez-dal-node run --data-dir /opt/dal
    WorkingDirectory=/opt/dal
    Restart=on-failure
    RestartSec=5
    StandardOutput=append:/opt/dal/octez-dal-node.log
    StandardError=append:/opt/dal/octez-dal-node.log
    SyslogIdentifier=%n

Now that you have a DAL node running, you can start a baking daemon that uses that DAL node. Continue to Step 4: Run an Octez baking daemon.