[go: up one dir, main page]

packaging: add baker, signer

What

This MRs adds the packages for the baker and signer.

Why

It's the second MR following !11693 (merged) where we added the node and the client.

How

the baker package installs two service, the baker for a given protocol and its accuser. These are systemd services with a minimal configuration stored in /etc/default/octez-baker-active.

The baker depends on the octez-node package.

Once installed the baker must be configured by the user. Since there are many ways to store the baker private keys, I opted to take a non-opinionated approach.

Most probably the user is going to configure a remote signer to handle its keys using a command similar to :

$octez-signer show address alice
Hash: tz1V7TgBR52wAjjqsh24w8y9CymFGdegt9qs
Public Key: edpkvGAz71r8SZomcvF7LGajXT3AnhYX9CrmK3JWgA2xk8rf8CudY8

sudo su tezos -c "octez-client -R tcp://localhost:7732 import secret key alice remote:tz1V7TgBR52wAjjqsh24w8y9CymFGdegt9qs"

to configure the baker.

The signer also is left to the user to configure. I provide a small systemd service file that the user can install in its home directory :

# create a siging key
$ octez-signer gen keys alice
# create a authentication key
$octez-client gen keys auth

$octez-signer show address auth
Hash: tz1V7TgBR52wAjjqsh24w8y9CymFGdegt9qs
Public Key: edpk123456789....
octez-signer add authorized key edpk123456789... --name auth

# install the signer service
$mkdir -p ~/.config/systemd/user/
$cp /usr/share/doc/octez-signer/octez-signer.service ~/.config/systemd/user/

$ start the service
systemctl --user start octez-signer

$ examine the logs
journalctl --user-unit octez-signer

The script above is provided as an example.

Manually testing the MR

Get the dpkg files as artifacts for your OS. If your Os is not listed, you have to create the packages yourself on your machine.

I assume the octez-node is already running and configured.

install the packages using the command

$ sudo dpkg -i octez-baker_0.0.1-1_amd64.deb octez-signer_0.0.1-1_amd64.deb

$ sudo systemctl start octez-baker-active
$ sudo systemctl status octez-baker-active


$ sudo systemctl start octez-accuser-active
$ sudo systemctl status octez-accuser-active

sudo less /var/log/tezos/baker-active.log 

The baker should be running.

Using these packages, I started baking on ghostnet : https://ghostnet.tzkt.io/tz1V7TgBR52wAjjqsh24w8y9CymFGdegt9qs

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by pietro

Merge request reports

Loading