Preview Pool with a USB armory
Este contenido aún no está disponible en español.
Preview Pool with Bursa and a USB armory
Section titled “Preview Pool with Bursa and a USB armory”This guide takes a Preview stake pool from nothing to forging blocks. Bursa builds and submits the transactions. A USB armory Mk II with an NXP SE050 secure element holds the pool’s cold key and owner key. Dingo runs the block producer as a local install, a Docker container, or a Kubernetes workload.
It needs Bursa v0.29.0 or later. Use Preview and test funds only: What is not built yet lists what is still open.
How the pieces fit
Section titled “How the pieces fit”Three places hold keys, and each holds only what it needs.
Photos and the board layout are on the USB armory Mk II wiki.
| Place | Holds | Signs |
|---|---|---|
| Hardware wallet (pledge) | Payment key for the pledge funds | Spending the pledge funds |
| USB armory (SE050) | Pool cold key, owner stake key, device identity key | Pool registration, retirement, owner stake certificates, SPO votes, operational certificates |
| Block producer (Dingo) | KES key, VRF key, operational certificate | Block headers |
Any wallet can pay fees and deposits. A pool certificate needs witnesses from the cold key and the owners; it does not need the payer to be the pool. The armory never holds funds and never signs a spend.
The armory checks every request against a policy before it signs:
- A pool registration must name this pool’s cold key as operator, exactly the device owner key as owner, and the reward account pinned when the device was provisioned.
- A retirement or SPO vote must be for this pool.
- Owner certificates may only register the owner stake key and delegate it to this pool.
- An operational certificate gets the next counter after the one on chain (see Rotating the KES key).
Every signature comes back with a second signature, from the same key, over the complete request. Bursa checks it, so an untrusted host between Bursa and the device cannot replay a response or swap the profile.
- Profile: one pool on one network, for example
mypool@preview. It names the cold key, the owner key, the pinned reward account and the opcert floor. Every signing request names a profile. - Slot: where a profile is stored on the device, 0 to 31. Each slot holds one profile and its owner key for good.
- Cold key object: the SE050 object holding a cold key,
0x20e50010to0x20e5001for0x20e50600to0x20e5060f. - Identity key: a device key that signs the key inventory, so the host can tell it is talking to the right device.
- Opcert counter: the issue number in an operational certificate. The chain keeps the last one it saw for each pool.
- Floor: the highest on-chain counter the device has been told. It refuses requests that report a lower one.
Before you start
Section titled “Before you start”- A USB armory Mk II with an SE050, and a host with a free USB port
- Bursa v0.29.0 or later:
go install github.com/blinklabs-io/bursa/cmd/[email protected](Go 1.26.11 or later) armory-pool,opcert-checkandsignlog-verify, the tools that talk to the armory, on both the offline machine and the host. Thearmorydirectory is its own Go module:git clone --branch v0.29.0 https://github.com/blinklabs-io/bursa.git && cd bursa/armory && go build -o . ./cmd/armory-pool ./cmd/opcert-check ./cmd/signlog-verifyarmory-boot-usb, to load the firmware:go install github.com/usbarmory/armory-boot/cmd/armory-boot-usb@latest. Without a udev rule for the board, run it withsudo.jqandcurlon both machines,xxdandb2sumon the offline machine for the registration pins, andopensslfor the signer’s certificates- A synced Preview node whose socket Bursa can reach, for Steps 4 and 5. Start it as a relay early (Step 3 shows the three setups) and set
SOCKETto its socket path.bursa query pooluses theGetPoolStatequery, which cardano-node answers and Dingo answers from v0.90.0. - A payer wallet Bursa can sign with.
bursa wallet create --output payerwritespayer/payment.skeyand the addresspayer/payment.addr. Fund that address from the Cardano testnet faucet: a new pool needs at least the 500 ada pool deposit, two 2 ada stake key deposits and fees. - A hardware wallet for the pledge funds
- Paper, or a metal backup, for two mnemonics
Commands run in three places:
- Offline machine: the pool mnemonic, key derivation, and every provisioning and wipe request, signed with its own host key (Steps 1 and 2, and later changes). Plug the armory in here to provision or wipe it.
- Host: online, with the node socket and the payer wallet. It generates the VRF and KES keys, builds, signs with the armory and submits (Steps 4 and 5). Plug the armory in here to sign.
- Block producer: the node,
vrf.skey,kes.skeyandnode.cert(Step 3).
Only verification keys, host key registration requests, transaction files, witnesses and certificates cross between the offline machine and the host: pool-cold.vkey and reward.vkey go to the host, and vrf.vkey and the host’s host-key.json go to the offline machine. The cold, owner, reward and provisioning host keys never leave the offline machine, and the VRF, KES and signing host keys never touch it.
Set the network once for Bursa:
export CARDANO_NETWORK=previewBursa defaults to mainnet when CARDANO_NETWORK is unset.
Step 1: Two mnemonics
Section titled “Step 1: Two mnemonics”Use two separate recovery phrases.
- Pledge mnemonic, on the hardware wallet. It holds the payment key for the pledge funds. It never touches the armory or the block producer.
- Pool mnemonic, written down offline. It derives the pool cold key and the owner key. Both are imported into the armory, and the paper copy is the recovery path.
The VRF and KES keys for the block producer come from neither: they are generated fresh (see VRF and KES keys).
The pool slip restores the cold, owner and reward keys:
| Key | Path | Command | Goes to |
|---|---|---|---|
| Pool cold key | m/1853'/1815'/0'/0' (CIP-1853) | bursa key pool-cold | Armory |
| Owner key | m/1852'/1815'/0'/2/0 (CIP-1852) | bursa key pool-owner (bursa#1111) | Armory |
| Reward key | m/1852'/1815'/1'/2/0 | bursa key stake | Offline |
The words come from bursa wallet create, a 24-word BIP-39 mnemonic. Bursa turns the words into a root key as CIP-3 describes (Icarus), then derives each key along its path.
Losing the cold key loses the pool: a pool ID is the hash of its cold key. The pool mnemonic restores the cold key on a replacement device through bursa key pool-cold. Bursa uses the derived key as a plain Ed25519 seed, so another CIP-1853 wallet may derive a different pool ID from the same words.
The owner can also be replaced without the old owner’s signature. A pool registration needs witnesses from the cold key and from the owners named in that certificate, not from the owners already on chain. So the cold key and a new owner can re-register the pool without the old owner. Three things follow:
- The armory accepts only its own owner key as owner, so the new owner comes from a new profile on a device holding the cold key.
- Pledge counts only stake on the owners’ stake keys. Move the pledge to an address with the new owner’s stake key; the hardware wallet’s payment key still controls the funds.
- The old owner’s 2 ada stake deposit stays locked, because deregistering that key needs its signature.
Create the pool mnemonic on an offline machine:
bursa wallet create --output ./poolThis writes seed.txt (24 words) and a full wallet of derived keys, the extended cold key among them. Write the words down and delete everything in pool/ except seed.txt.
Derive the cold key as a plain Ed25519 key the SE050 can import:
bursa key pool-cold --mnemonic-file pool/seed.txt \ --signing-key-file pool-cold.skey \ --verification-key-file pool-cold.vkeyPass file paths. With - Bursa prints the extended pool_xsk key instead, which the SE050 cannot import.
The pool ID is the blake2b-224 hash of the raw 32-byte verification key: the cborHex field of pool-cold.vkey without its leading 5820 CBOR header, not the bytes of the JSON file.
Check the paper copy before you rely on it. Type the words from the paper into a new file, derive the cold key into a separate directory and compare:
mkdir check# type the 24 words from the paper into check/seed.txtbursa key pool-cold --mnemonic-file check/seed.txt \ --signing-key-file check/pool-cold.skey --verification-key-file check/pool-cold.vkeycmp pool-cold.vkey check/pool-cold.vkey && echo matchrm -rf checkThe armory cannot export the cold key, so the paper is its only backup.
Derive the owner key the same way, from the stake key path of the pool mnemonic:
bursa key pool-owner --mnemonic-file pool/seed.txt \ --signing-key-file owner.skey \ --verification-key-file owner.vkeyThis is a plain Ed25519 key. Its key hash and reward address differ from those of bursa key stake for the same path, so a wallet restored from the pool mnemonic does not show them. The device imports only plain keys: it refuses the extended key bursa key stake writes, so an owner made that way cannot be restored onto a device.
VRF and KES keys
Section titled “VRF and KES keys”Run this on the host, not the offline machine. The VRF and KES signing keys are hot: the producer needs vrf.skey and kes.skey online to forge, so they live on online machines and never touch the offline machine. Never derive them from the pool mnemonic, which re-derives the cold key.
bursa key vrf and bursa key kes derive keys from a mnemonic, so derive them from a throwaway one and delete it. It is not a backup:
tmp=$(mktemp -d)bursa wallet create --output "$tmp"bursa key vrf --mnemonic-file "$tmp/seed.txt" \ --signing-key-file vrf.skey --verification-key-file vrf.vkeybursa key kes --mnemonic-file "$tmp/seed.txt" \ --signing-key-file kes.skey --verification-key-file kes.vkeyrm -rf "$tmp"| File | Goes to | Used for |
|---|---|---|
vrf.skey | Producer | Forging: the leader check in every slot. The registration names its key, so it lasts as long as the registration. |
kes.skey | Producer | Forging: signs block headers. Replaced at every rotation. |
vrf.vkey | Host, and a copy on the offline machine | The pins (Pin the pool registration) and the registration (Step 4) |
kes.vkey | Host | The opcert request (Step 5) |
node.cert | Producer, after Step 5 | Forging, with the kes.skey it certifies |
Copy vrf.skey and kes.skey to the producer over an encrypted channel such as scp, set their permissions as Step 3 shows, and delete them from the host. Losing one does not lose the pool:
vrf.skey: generate a new VRF key and register the pool again with it, after new pins if the pins fix the VRF key hash. To avoid that, keep one encrypted copy off the producer. Anyone holdingvrf.skeycan compute which slots the pool leads, so treat the copy like the producer’s own key.kes.skey: rotate early, with a new KES key and opcert. Keep no copy.
In Kubernetes Auto mode the operator generates each new KES key itself; vrf.skey still comes from here and goes into the keys Secret.
Reward account key
Section titled “Reward account key”The reward account can be any stake key. This example derives it from the pool mnemonic, on account 1:
bursa key stake --mnemonic-file pool/seed.txt --account-index 1 \ --signing-key-file reward.skey --verification-key-file reward.vkeyarmory-pool address -stake-vkey reward.vkey -network preview -type rewardarmory-pool reward-hex "$(armory-pool address -stake-vkey reward.vkey -network preview -type reward)"address prints the reward address (stake_test1...), and reward-hex prints it in the hex form the device profile needs. The pool registration names the reward address, and the device pins the hex. reward.skey signs the reward account’s registration in Step 4 and later withdrawals; it is not on the armory.
Copy pool-cold.vkey and reward.vkey to the host for Step 4.
Step 2: Prepare the armory
Section titled “Step 2: Prepare the armory”Build the firmware
Section titled “Build the firmware”The firmware is a TamaGo image. It needs TamaGo Go 1.27.3.
The device runs one of three images:
- Provisioning image (
armory-provision.imx): creates the identity key, imports keys, creates profiles, and changes the reward account or the opcert floor. It never signs transactions or opcerts. - Signing image (
armory.imx): reads the key inventory and signs. It serves no provisioning endpoint, so nothing on the host can change a profile, the floor or the key objects while the device signs. - Wipe image (
armory-wipe.imx): deletes a profile and its keys, a cold key no profile names, every key and profile, or the signing log head. It neither signs nor provisions. See Removing a profile or wiping the device.
git clone --branch v0.29.0 https://github.com/blinklabs-io/bursa.gitcd bursa/armory/firmwaresource ~/tamago/env.shmake imxmake imx PROVISION=1make imx WIPE=1Never build with TESTNET=1 for keys that matter: it adds bring-up key tests and an unfiltered signing endpoint. Neither the provisioning nor the wipe image can be built with TESTNET=1.
These commands build the default NETWORK=testnet images, which serve every testnet. NETWORK=mainnet CHAIN=cardano or CHAIN=prime builds images for one mainnet chain, named armory-cardano-mainnet.imx and so on, and NETWORK=multi builds armory-multi.imx and its provisioning and wipe images, which serve testnets and both mainnet chains (see More than one pool).
Build the firmware and the host tools from the same Bursa commit, and load the new signing image before you use the new armory-pool. armory-pool witness asks the device for a signing summary (protocol version 2), and firmware built before that change refuses it. If the signing image is on the eMMC, write the new one there too.
Never load an image older than the one a device has run. Older images do not know the host key staging object (bursa#1257), the second block of cold key objects or the record of which scope owns each one: their device wipe leaves those on the chip, and their provisioning image can import into an object another scope owns. To go back to older firmware, wipe the device with the current wipe image first.
A board with nothing on its eMMC and no microSD card boots into USB recovery mode. Load an image into RAM with armory-boot, the provisioning image first:
armory-boot-usb -i armory-provision.imxcurl http://10.0.0.1/ shows which image is running: after the Bluetooth line, the report has a line starting with provisioning build, signing build or wipe build.
The image runs until the board loses power, so load it again after every unplug. Keys and profiles live in the SE050 and survive the power cycle. After provisioning, you can write the signing image to the eMMC so the board boots it by itself: see Flash the signing image to eMMC.
Connect
Section titled “Connect”The armory is an Ethernet device over USB. The device is 10.0.0.1, the host is 10.0.0.2, and the service listens on port 80. Find the new USB network interface with ip link, give it the host address, then check the device answers:
sudo ip addr add 10.0.0.2/24 dev <usb interface>sudo ip link set <usb interface> upcurl http://10.0.0.1/The device answers with its bring-up report in plain text: the board model, the SE050 applet version, and the checks it ran at boot.
Every POST below sends Content-Type: application/json and goes to 10.0.0.1 by address. The firmware refuses a POST without that content type (bursa#1165), and any request whose Host is not 10.0.0.1, so that a web page open on the host cannot reach the device.
The setup steps below go out unsigned, which a device accepts only until its first host key is registered (Register host keys). After that, provisioning and wipe requests must be signed with a host key (bursa#1172), and armory-pool sends them. Requests that carry a private key, the cold key import and the profile, always go through armory-pool: it encrypts them to the device’s identity key, and the device refuses them in plaintext (bursa#1243).
Create the identity key
Section titled “Create the identity key”The identity key signs the device’s key inventory, so Bursa can pin which device it talks to.
curl -s -X POST -H 'Content-Type: application/json' http://10.0.0.1/provision/identity -d '{}' | jq -r .public_key | base64 -d | od -An -tx1 -v | tr -d ' \n'; echoThe device returns public_key in base64; the pipe prints it as hex. Record the hex: armory-pool -identity, the signer’s identity_public_key and the wipe requests all take it in that form. Keep it in a variable for the key imports below:
IDENTITY=<identity public key>Import the cold key
Section titled “Import the cold key”Cold keys live in 32 SE050 objects: 551878672 to 551878687 (0x20e50010 to 0x20e5001f) and 551880192 to 551880207 (0x20e50600 to 0x20e5060f). Pick a free one:
jq -n --argjson id 551878672 --slurpfile key pool-cold.skey \ '{cold_key_id: $id, signing_key: $key[0].cborHex}' | armory-pool -identity "$IDENTITY" provision coldjq reads the key from the file and armory-pool reads the request from standard input, so the key never appears in a command line, where other processes and the shell history could see it. Before it sends anything, armory-pool has the device prove it holds the identity key, then encrypts the request to it, so the key reaches only that device. Once a host key is registered, as when you add a pool later, add -host-key provision.skey before provision.
The device returns public_key and pool_id in hex. Compare the key with pool-cold.vkey: its cborHex is 5820 followed by the same hex. The device never overwrites a key: importing the same key again is confirmed, and a different key in the same object is refused. Only the wipe image deletes a key (see Removing a profile or wiping the device).
Delete pool-cold.skey from the offline machine afterwards. The mnemonic is the backup.
The device never creates a cold key itself. A key made inside the SE050 could not be exported or backed up, so a lost or broken device would lose the pool for good.
Create the profile
Section titled “Create the profile”A profile ties the cold key to one network, one owner key and one reward account.
jq -n --slurpfile owner owner.skey '{ name: "mypool@preview", network_id: 0, slot: 0, cold_key_id: 551878672, reward_account: "<armory-pool reward-hex output>", owner_signing_key: $owner[0].cborHex}' | armory-pool -identity "$IDENTITY" provision profile | tee profile.jsonnetwork_idis 0 for every testnet.cold_key_idis the object the import above used.slotis a free profile slot, 0 to 31.reward_accountis the hex fromarmory-pool reward-hex. The device refuses pool registrations that name a different one. Change it later only through/provision/reward, with the provisioning image and the provisioning host key:armory-pool -host-key provision.skey provision reward.owner_signing_keyis thecborHexofowner.skey, read from the file as for the cold key. Like the cold key, it is never overwritten: a retry with the same key is confirmed and a different key is refused. Without it the device generates the owner key, which no backup can restore.- Leave out
chain_counterfor a new pool. For a pool that has already forged, set it to the on-chain counter (see Migrating an existing pool).
The response, saved in profile.json, holds the owner key: owner_public_key (base64) and owner_key_hash. Check the key against owner.vkey, then delete owner.skey from the offline machine:
[ "$(jq -r .owner_public_key profile.json | base64 -d | od -An -tx1 -v | tr -d ' \n')" = \ "$(jq -r .cborHex owner.vkey | cut -c5-)" ] && echo matchRegister host keys
Section titled “Register host keys”Without a host key, the device signs for any host on its USB link. Once one is registered, it refuses every signing request not signed by a registered host key. A mainnet build refuses to sign until one is registered.
Register two keys: provision.skey on the offline machine, which signs every later provisioning and wipe request, and host.skey on the host, which signs transactions and opcerts. The device holds up to four, one per machine: the offline machine, a laptop, a Bursa signer service. armory-pool host-key writes a key mode 600 and prints the registration request for its public key; armory-pool refuses a key file with any group or other permission.
On the offline machine, create the provisioning key and register it while the device still accepts unsigned requests:
armory-pool host-key -out provision.skey > provision-key.jsoncurl -s -X POST -H 'Content-Type: application/json' http://10.0.0.1/provision/host-key --data-binary @provision-key.jsonOn the host, create the signing key:
armory-pool host-key -out host.skey > host-key.jsonCopy host-key.json, which holds only the public key, to the offline machine and register it there, signed with the provisioning key:
armory-pool -host-key provision.skey provision host-key < host-key.jsonThe response lists the registered keys in host_keys.
On the host, pass -host-key host.skey to armory-pool with -identity and -profile. The Bursa signer service takes the same file as host_key_file in its armory backend configuration.
From now on the provisioning and wipe images refuse unsigned requests too, /reset included (bursa#1352). Only the bring-up report, the challenge, the identity proof that key imports are encrypted with, /wipe/device and /wipe/objects stay unsigned; the firmware README lists every route. armory-pool fetches a challenge, signs the request read from standard input with the host key and sends it. provision takes profile, floor, reward, pins, cold, identity, host-key or host-key/revoke; wipe takes objects, device, profile, cold or signlog; reset takes no request. Send them from the offline machine with -host-key provision.skey, and add -identity for cold and profile.
To revoke a key, send its registration request from the provisioning image, signed with a registered host key. Revoking a key never touches the pool keys. The device refuses to revoke its last host key (bursa#1241): only a device wipe removes it.
armory-pool -host-key provision.skey provision host-key/revoke < host-key.jsonPin the pool registration
Section titled “Pin the pool registration”Without pins, the device checks only that a pool registration names the profile’s cold key, owner and reward account. A host that can request signatures could then register another VRF key, other relays or another metadata URL, or set pledge, cost and margin freely. Pins fix them to values you choose now (bursa#1169). They need the provisioning image and the provisioning host key, so send them from the offline machine, with a copy of vrf.vkey from the host.
If the pool publishes metadata, write pool.json now (CIP-6: name, description, ticker, homepage) and upload it unchanged to the URL you will register: the pins fix its hash. Without metadata, leave out the -metadata-* flags here and in Step 4.
Choose the values the pool registers in Step 4, then print the request with armory-pool pins-request and send it:
armory-pool pins-request -profile mypool@preview \ -vrf-key-hash "$(jq -r .cborHex vrf.vkey | cut -c5- | xxd -r -p | b2sum -l 256 | cut -d' ' -f1)" \ -pledge-min 100000000 -pledge-max 100000000 \ -cost-max 170000000 -margin-max 2/100 \ -relay relay.example.com:3001 \ -metadata-url https://example.com/pool.json \ -metadata-hash "$(bursa hash metadata pool.json)" > pins.jsonarmory-pool -host-key provision.skey provision pins < pins.json-vrf-key-hashis the Blake2b-256 hash of the VRF verification key; the pipeline above computes it fromvrf.vkey. The registration’s VRF key must match it exactly.-pledge-minand-pledge-maxbound the pledge, in lovelace, both inclusive. Set both to the same value to fix it.-cost-maxis the highest fixed cost in lovelace, and-margin-maxthe highest margin as a fractionN/D.- Give one
-relayper relay, in registration order:HOST:PORT,IPV4:PORT,[IPV6]:PORT,IPV4,[IPV6]:PORTorsrv:NAME.armory-pooldigests them with the metadata URL, and the device refuses a registration that adds, removes, reorders or changes a relay, or changes the URL. -metadata-hashmust match exactly. Without-metadata-urland-metadata-hash, the pins require a registration with no metadata.
From the next start, the report shows registration pins set for the profile, and the signing image refuses any pool registration outside them; see Troubleshooting. A second request replaces the pins. To change a pinned value later, load the provisioning image, send new pins, then re-register. A profile without pins keeps the checks above, and the pins apply to pool registrations only. /wipe/profile and /wipe/device delete them.
To keep relays and metadata changeable without the provisioning image, for example when a relay moves, pass -unpinned-relays instead of -relay and the -metadata-* flags. The report then shows registration pins set, relays and metadata not pinned from the next start. A host that can request signatures can then point the registration at other relays or other metadata, but still cannot change the VRF key, pledge, cost or margin.
Switch to the signing image
Section titled “Switch to the signing image”Provisioning is done. Reset the board into USB recovery mode, insert the signing log card (see The signing log card), then load the signing image:
armory-pool -host-key provision.skey reset# insert the log card nowarmory-boot-usb -i armory.imxUSB recovery mode needs the slot empty when the board starts, but once the board waits in recovery mode a card can go in, and the signing image reads it when it starts. Without the card it cannot open the signing log and refuses to sign.
The signing image has no reset endpoint. To provision again later, unplug the board and load the provisioning image. If the signing image is on the eMMC, set the boot switch toward microSD and take the card out first, as below.
Flash the signing image to eMMC
Section titled “Flash the signing image to eMMC”Optional. A signing image loaded over USB is gone after every unplug. Written to the eMMC, it boots by itself.
armory-ums exposes the eMMC to the host as a USB disk. Put the board in USB recovery mode (armory-pool -host-key provision.skey reset from the provisioning image) and load it:
curl -LO https://github.com/usbarmory/armory-ums/releases/download/v20231018/armory-ums.imxarmory-boot-usb -i armory-ums.imxThe eMMC appears as a disk named after the board’s serial number:
ls -l /dev/disk/by-id/ | grep USB_armoryCheck with lsblk that it is about 15.7 GB (14.6 GiB) and not mounted. Write the signing image 1 KiB into the disk, through the by-id path so the write cannot reach another disk:
sudo dd if=armory.imx of=/dev/disk/by-id/usb-F-Secure_USB_armory_Mk_II_<serial>-0:0 \ bs=512 seek=2 conv=fsyncRead it back and compare. The two hashes must match:
sha256sum armory.imxsudo dd if=/dev/disk/by-id/usb-F-Secure_USB_armory_Mk_II_<serial>-0:0 bs=512 skip=2 \ count=$(( $(stat -c %s armory.imx) / 512 )) iflag=direct status=none | sha256sumUnplug the board, slide the switch toward eMMC, insert the log card (see The signing log card) and plug it in again. The USB network interface appears without armory-boot-usb, the report shows signing build, and ends with signing log: open and RESULT: PASS.
The board boots from the eMMC only when its boot switch points toward eMMC. With an image on the eMMC, it no longer falls back to USB recovery mode. To load the provisioning image again, slide the switch toward microSD with no card inserted; the board then goes to USB recovery mode (boot modes). A blank card is not the same as no card: with a card in that holds no image, the board shows nothing on USB, whichever way the switch points, unless the eMMC has an image and the switch points toward eMMC.
| Switch | eMMC | Slot | Result |
|---|---|---|---|
| eMMC | image | anything | Boots the eMMC image |
| eMMC | empty | provisioning card | Boots the card |
| eMMC | empty | blank card | Nothing on USB |
| eMMC | empty | empty | USB recovery mode |
| microSD | either | empty | USB recovery mode |
| microSD | either | provisioning card | Boots the card |
| microSD | either | blank card | Nothing on USB |
The switch is on the underside of the board, beside the eMMC chip, under a small orange film. In the official enclosure it shows through a window in the bottom half: slide it with a pin or paper clip, without opening the case. The film can stay on. The usbarmory wiki has a photo of the switch.
The signing log card
Section titled “The signing log card”The signing image appends every signature to a log on the microSD card before the signature leaves the device, and refuses to sign unless a card holding its log is in the slot at boot. Each entry is chained to the one before and signed by the device identity key, and the SE050 keeps the number and hash of the latest entry, so a swapped, edited or truncated card is refused. A card holds 32768 entries; a full card stays full.
On its first start with an unset head, the signing image formats a card written with zeros. A new card usually carries a partition table, which is refused, so write zeros over the log area first: a header block and 32768 four-block entries, just over 64 MiB. Check which device is the card with lsblk, since dd overwrites whatever it is given:
sudo dd if=/dev/zero of=/dev/sdX bs=1M count=65 conv=fsyncZeroing the whole card works too, but takes minutes per gigabyte.
A zeroed card is a blank card in the table above, so the signing image has to boot from the eMMC with the switch toward eMMC.
Read the log back and verify it with the signing image running:
armory-pool -identity <identity public key> -host-key host.skey signlogThe device attests the current head for a fresh nonce, and armory-pool checks every entry and the chain under the pinned identity key. Add -head-seq N -head-hash HEX to also pin the latest entry you expect. A card taken out of the device is checked with signlog-verify -identity <identity public key> -image <card image>.
The signing image formats a card with log format version 2, whose opcert-next entries also carry the cold key hash (the pool ID). A card formatted by earlier firmware (version 1) is still read, verified and appended to in its own format; its entries carry no cold key hash, so an opcert entry there applies to every cold key of its profile. signlog-verify reads both versions.
If the card is pulled while the signing image runs, the device refuses to sign. Putting it back is not enough: the card is not initialised again until the device restarts (bursa#1147). Unplug the armory and plug it in again; it reopens the log at the same entry.
The signing and provisioning images never reset the head, so a lost, failed or full card leaves the device refusing to sign. A device wipe deletes the head with the identity key. To keep the keys, load the wipe image and delete only the head:
echo '{"identity_public_key": "<identity public key>"}' | armory-pool -host-key provision.skey wipe signlogThe signing image then formats a zeroed card and numbers entries from 1 again under the same identity. Keep the old card, or zero it before reuse: the device refuses a card with an old log once the head is reset.
Provision from a microSD card
Section titled “Provision from a microSD card”Optional. Instead of USB recovery mode, the board can boot the provisioning image from a microSD card, with no armory-boot-usb step. Write the image to the card the same way as to the eMMC:
sudo dd if=armory-provision.imx of=/dev/disk/by-id/<card> bs=512 seek=2 conv=fsyncInsert the card, slide the switch toward microSD and plug the board in. The report from curl http://10.0.0.1/ shows provisioning build.
While the card is in and the switch points toward microSD, the board boots the provisioning image at every power-up, and the host can change profiles, the reward account and the floor. When provisioning is done, slide the switch back toward eMMC and take the card out. With an image on the eMMC and the switch toward eMMC the card is ignored, but a board with an empty eMMC boots the card in either position. The board boots whatever image is on the card, so store the card offline with the pool mnemonic. The provisioning card and the signing log card share the one slot: put the log card back before the signing image starts, or it refuses to sign.
Read the device keys
Section titled “Read the device keys”On the host, with the signing image running (the provisioning image does not serve the key list), armory-pool checks the device’s key list against the identity key you recorded, then writes the keys as files Bursa can use:
armory-pool -identity <identity public key> -profile mypool@preview keys -out-dir deviceIt writes device/pool-cold.vkey and device/owner.vkey, and prints the pool ID in hex and bech32 (pool1...), the owner key hash, the owner key in bech32, and the owner’s reward address. device/pool-cold.vkey must match the pool-cold.vkey you derived. witness and opcert take the same -identity and -profile flags before the subcommand; address, reward-hex and host-key need neither. Signing requests also need -host-key once a host key is registered; reading the keys does not.
Step 3: Run the node
Section titled “Step 3: Run the node”Start the node now without the block-producer settings, so it syncs and Bursa has a socket for Steps 4 and 5. Add the block-producer settings below after Step 5 writes node.cert.
The block producer needs vrf.skey, kes.skey and node.cert. Dingo refuses a VRF or KES key file readable by group or others. The opcert is not secret, but keep it with them:
chmod 400 vrf.skey kes.skey node.certLocal install
Section titled “Local install”Follow Dingo node setup to install Dingo, write /etc/dingo/dingo.yaml with network: "preview", and run it under systemd. SOCKET is the socketPath from dingo.yaml. Copy the key files to /var/lib/dingo/keys/, owned by the user Dingo runs as. Set up the relay and producer topology with Topology setup. Preview runs Genesis chain selection, so keep the network’s ledger peer slot on the producer too: a producer whose only peers are its relays can fail to leave Genesis selection after a restart that leaves it behind the tip (dingo#5831).
Add the block-producer settings to dingo.yaml:
blockProducer: trueshelleyVrfKey: "/var/lib/dingo/keys/vrf.skey"shelleyKesKey: "/var/lib/dingo/keys/kes.skey"shelleyOperationalCertificate: "/var/lib/dingo/keys/node.cert"The same settings are available as flags (--block-producer, --shelley-vrf-key, --shelley-kes-key, --shelley-opcert) and environment variables (CARDANO_BLOCK_PRODUCER, CARDANO_SHELLEY_VRF_KEY, CARDANO_SHELLEY_KES_KEY, CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE).
Docker
Section titled “Docker”Start from Dingo with Docker, then mount the keys read-only and set the block-producer variables. The image runs as UID 1000.
mkdir -p ipcsudo chown 1000:1000 ipc keys/*docker run -d --name dingo-bp \ -p 3001:3001 \ -v dingo-preview-data:/data/db \ -v "$PWD/ipc":/ipc \ -v "$PWD/keys":/keys:ro \ -e CARDANO_NETWORK=preview \ -e CARDANO_BLOCK_PRODUCER=true \ -e CARDANO_SHELLEY_VRF_KEY=/keys/vrf.skey \ -e CARDANO_SHELLEY_KES_KEY=/keys/kes.skey \ -e CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=/keys/node.cert \ ghcr.io/blinklabs-io/dingo:0.94.2The node socket is ipc/dingo.socket in the current directory: SOCKET=$PWD/ipc/dingo.socket. Create ipc before the first run: if it does not exist, a rootful Docker daemon creates it owned by root, and Dingo, running as UID 1000, cannot create its socket there.
Until node.cert exists, leave out the CARDANO_BLOCK_PRODUCER and key variables. After Step 5, replace that container with the producer: the name dingo-bp is still taken, so remove the old container first. The chain data stays in the dingo-preview-data volume.
docker rm -f dingo-bpThen run the command above again with every variable set.
Kubernetes
Section titled “Kubernetes”Install the operator, which also installs the DingoNode CRD. Grant it read access to Secrets in the namespace that holds the producer:
helm install dingo-operator oci://ghcr.io/blinklabs-io/helm-charts/charts/dingo-operator \ --namespace dingo-operator-system --create-namespace \ --set 'rbac.keySecretsNamespaces={cardano}' \ --version 0.11.0Chart 0.11.0 deploys dingo-operator v0.7.0 and needs Kubernetes 1.30 or later.
Bursa needs a node socket on the host, which a pod does not give it. Run a local or Docker relay for Bursa, or run Bursa in a pod that mounts the producer’s socket.
After Step 5, store the producer keys in a Secret:
kubectl create namespace cardanokubectl create secret generic producer-pool-keys -n cardano \ --from-file=vrf.skey --from-file=kes.skey --from-file=opcert.cert=node.certCreate a relay for the producer to peer with. topology.relayRefs names relay DingoNodes in the producer’s namespace; a local or Docker relay outside the cluster does not count:
apiVersion: dingo.blinklabs.io/v1alpha1kind: DingoNodemetadata: name: relay namespace: cardanospec: role: relay network: preview storageMode: core persistence: size: 120Gi mithril: enabled: trueCreate the producer:
apiVersion: dingo.blinklabs.io/v1alpha1kind: DingoNodemetadata: name: producer namespace: cardanospec: role: blockProducer network: preview storageMode: core persistence: size: 120Gi mithril: enabled: true topology: relayRefs: [relay] blockProducer: poolId: pool1... keys: secretRef: producer-pool-keys rotation: mode: Assisted renewBeforePeriods: 8The operator checks every key bundle before it rolls it out: the opcert signature, pool and KES key binding, counter and KES period. Rotation modes:
MonitorOnly(default) reports KES and opcert status and never changes keys.Assistedrolls the pod when you replace the Secret’s contents with a new KES key and opcert.Autogenerates the KES key, asks a cold signer for the opcert, updates the Secret and rolls the pod. With the Bursa signer, each new KES key waits until you grant it. See Auto rotation with the armory.
Auto mode cannot issue the first opcert of a new pool. See A new pool.
The operator lets only one block producer forge per pool on a network (dingo-operator#133, chart 0.5.2; dingo-operator#137, chart 0.6.0). When two DingoNodes name the same pool on the same network, in any namespace, or the same keys Secret, on any network, the older one keeps the keys. The newer one gets Ready=False with reason DuplicateForger, its StatefulSet is scaled to zero, and it resumes only after the older DingoNode is gone and its pods have finished. Deleting a DingoNode does not stop its pod at once. To move a producer, create the new DingoNode and delete the old one; the new one waits until the old pod is gone. Across namespaces, the newer node is halted only when the older node’s keys Secret holds the KES key its opcert certifies. If the older node only names the pool, the newer one is refused but not scaled to zero. A refused producer whose keys Secret is switched to another pool’s keys is scaled to zero too, since a restart of its pod would stage them. A KES rotation for the same pool does not halt it. The network is the one the node’s environment gives Dingo, spec.environment overrides included. The operator reads pods for these checks, which the chart grants from 0.5.1. The full rules are in the operator’s README.
Auto rotation with the armory
Section titled “Auto rotation with the armory”In Auto mode the operator generates a new KES key and asks the Bursa signer service for its opcert, and the signer asks the armory. The operator sends the pool’s on-chain counter; the armory issues that counter plus one and refuses a counter below its floor. The operator then writes the new kes.skey and opcert into the keys Secret and rolls the pod onto them.
The signer issues an opcert only for a KES verification key its caller configuration grants by name (bursa#1349, Bursa v0.26.0). The operator cannot add that grant itself, so each rotation waits for you to add the new key; see Grant each new KES key.
Auto with the Bursa signer needs dingo-operator v0.7.0 (chart 0.11.0) or later. Earlier operators generate a new KES key on every attempt, so no grant can ever match. Grant the operator write access to the keys Secret:
helm upgrade --install dingo-operator oci://ghcr.io/blinklabs-io/helm-charts/charts/dingo-operator \ --namespace dingo-operator-system --create-namespace \ --set 'rbac.keySecretsNamespaces={cardano}' \ --set rbac.keySecretsUpdate=true \ --set 'rbac.keySecretNames={producer-pool-keys}' \ --set 'rbac.readSecretNames={bursa-signer-mtls}' \ --version 0.11.0rbac.readSecretNames (chart 0.5.0) limits read access to the named Secrets plus keySecretNames, instead of every Secret in the namespace. List every Secret the operator reads: each producer’s keys.secretRef and the signer client certificate in mtlsSecretRef. Leave it out to keep read access to every Secret there.
Run the signer on the host the armory is plugged into, with an armory backend and a host key registered on the device (see Register host keys). The operator connects with a TLS client certificate, so the signer needs a server certificate and the CA that issued the client certificate. Use a CA that issues only this client certificate: the signer accepts any certificate from client_ca_cert whose subject matches a caller, so a shared cluster issuer lets any workload that can get a dingo-operator certificate request opcerts. Listen only on the address the operator reaches, not 0.0.0.0. Allow the pool’s cold key only opcert requests, and only for that client, and grant that client the KES key of the opcert you issued in Step 5:
signer: listen_address: "<host address the operator reaches>" listen_port: 8090 tls_cert_file: "/etc/bursa/signer/tls/server.crt" tls_key_file: "/etc/bursa/signer/tls/server.key" client_ca_cert: "/etc/bursa/signer/tls/client-ca.crt" require_client_cert: true watermark: type: "file" path: "/var/lib/bursa/signer/watermark.sqlite" mode: "enforce" backends: - name: "armory" type: "armory" address: "http://10.0.0.1" profile: "mypool@preview" identity_public_key: "<identity public key>" host_key_file: "/etc/bursa/armory-host.skey" protocol: "2" keys: - hash: "<pool id hex>" backend: "armory" allowed_requests: ["opcert"] callers: - subject: "dingo-operator" keys: ["<pool id hex>"] opcerts: - key: "<pool id hex>" kes_vkeys: - "<kes.vkey cborHex without the leading 5820>"opcerts lists, for each cold key, the KES verification keys the caller may get an opcert for, as 64 hex characters: jq -r .cborHex kes.vkey | cut -c5-. Without a matching entry the signer refuses the opcert with HTTP 403 caller is not authorized for this opcert, even when the caller holds the cold key in keys. See the opcert signer policy.
Create the watermark’s directory first, owned by the user the signer runs as; the signer does not create it: sudo install -d -m 700 -o <signer user> /var/lib/bursa/signer. Then start it with bursa signer --config signer.yaml. It also serves metrics on 127.0.0.1:8081 by default. The caller subject is the client certificate’s first URI SAN, else its first DNS SAN, else its common name. protocol: "2" makes the signer ask the device for its signing summary when it signs a transaction body, and refuse firmware that cannot give one; the default, "1", does not ask for it. It does not change opcert requests, so with only opcert allowed, as here, it has no effect yet. Bursa’s signer documentation covers the other settings.
Before pointing the operator at it, request an opcert with the operator’s client certificate, for the kes.vkey granted above. chain_counter is the pool’s on-chain counter, 0 for a pool that has never forged. The signature must match the node.cert the armory issued for the same KES key, counter and period:
jq -n --arg key "<pool id hex>" --arg kes "$(jq -r .cborHex kes.vkey | cut -c5-)" \ '{type: "opcert", key: $key, kes_vkey: $kes, chain_counter: 0, kes_period: <current_kes_period>}' | curl -s --cacert signer-ca.crt --cert client.crt --key client.key \ -H 'Content-Type: application/json' --data-binary @- https://<listen address>:8090/v1/signA client certificate whose subject is not a caller gets HTTP 403, and so does a KES key the caller is not granted. /readyz also needs a client certificate.
The watermark keeps the signer’s own counter records for each cold key, besides the device’s: the chain counter the operator last reported, as a floor, and the last issue number it signed. In enforce mode it refuses with HTTP 409 a chain counter below its floor or above the last issued counter, and an issue number below the last issued counter. After signing it writes both records in one transaction. warn mode logs such a request and signs it; see the watermark section of the signer runbook. The signer also answers a request the armory refuses for its floor, its last issued counter or a backdated reissue with HTTP 409, whatever the mode.
Store the client certificate, its key and the signer’s CA for the operator:
kubectl create secret generic bursa-signer-mtls -n cardano \ --from-file=tls.crt=client.crt --from-file=tls.key=client.key --from-file=ca.crt=signer-ca.crtThen set the producer’s rotation to Auto:
blockProducer: poolId: pool1... keys: secretRef: producer-pool-keys nodeToClient: enabled: true rotation: mode: Auto renewBeforePeriods: 8 coldSigner: type: bursa endpoint: https://signer.example.com:8090 mtlsSecretRef: bursa-signer-mtls coldKeyHash: <pool id hex>nodeToClient.enabledlets the operator read the on-chain counter from the node. The NetworkPolicy the operator renders admits the node-to-client port only from pods labelleddingo.blinklabs.io/node-to-client=allowed, and from another namespace only when that namespace carries the label too. The operator also reads the node’s KES period from its metrics port, which the same policy admits from another namespace only when the pod and its namespace carrydingo.blinklabs.io/metrics=allowed. The chart labels the operator pod with both; label its namespace yourself:kubectl label namespace dingo-operator-system dingo.blinklabs.io/node-to-client=allowed dingo.blinklabs.io/metrics=allowed.endpointmust be anhttpsURL.coldKeyHashis the pool ID in hex, asarmory-pool keysprints it. The operator refuses any other value.renewBeforePeriodsis how many KES periods before expiry the operator rotates.profile(chart 0.5.2) names the signer profile that holds the cold key, for examplemypool@preview. It is needed only when the signer holds the key in several profiles; see More than one pool.
The operator reports each attempt in the OpCertIssued condition and as an event. When it cannot get an opcert, for example because the signer is unreachable, the condition is False with a reason such as IssueFailed, the keys Secret and the running opcert stay as they are, and the operator tries again after 10 minutes. See Troubleshooting.
Grant each new KES key
Section titled “Grant each new KES key”When a rotation is due, the operator generates a KES key and asks the signer, which refuses it until the key is granted. The operator keeps that key as kes.pending.skey in the keys Secret, which triggers no rollout, sets OpCertIssued to False with reason IssueFailed, and names the key in the message: sign opcert for KES verification key <hex>: .... Every retry offers the same key (dingo-operator#199).
kubectl get dingonode producer -n cardano \ -o jsonpath='{.status.conditions[?(@.type=="OpCertIssued")].message}'Add the hex to the caller’s kes_vkeys for the pool and restart the signer, which reads its configuration only at start. The operator’s next retry, within 10 minutes, gets the opcert, promotes the pending key to kes.skey and rolls the pod. Keep renewBeforePeriods large enough to leave time for this.
To rotate without editing the signer for every key, run the KES key in a Bursa KES agent and pin that agent under the cold key’s opcerts[].kes_agents; the signer runbook describes it. That setup is not covered here.
Step 4: Register the pool
Section titled “Step 4: Register the pool”Register the reward account
Section titled “Register the reward account”The reward account must be registered before the pool registration names it, in a transaction of its own: the armory refuses to sign a body that carries a certificate for any stake key other than its owner key.
bursa cert stake-registration --stake-vkey reward.vkey --deposit 2000000 -o reward-reg.certbursa tx build --socket-path "$SOCKET" --network preview \ --change-address "$(cat payer/payment.addr)" --certificate-file reward-reg.cert --out-file reward-reg.txbursa tx witness --tx-file reward-reg.tx --signing-key-file payer/payment.skey --out-file payer.witbursa tx witness --tx-file reward-reg.tx --signing-key-file reward.skey --out-file reward.witbursa tx assemble --tx-file reward-reg.tx --witness-file payer.wit --witness-file reward.wit \ --out-file reward-reg.signedbursa tx submit --socket-path "$SOCKET" --network preview --tx-file reward-reg.signedbursa tx witness needs no network: make reward.wit on the offline machine from a copy of reward-reg.tx, and carry the witness back. bursa query stake-address --socket-path "$SOCKET" --network preview --address stake_test1... shows "registered": true once it is on chain.
One transaction for the pool
Section titled “One transaction for the pool”Registration takes one transaction: register the owner stake key, register the pool, and delegate the owner to the pool. The paying wallet covers the 500 ada pool deposit, the 2 ada stake deposit and the fee.
The pledge address
Section titled “The pledge address”Pledge counts the stake controlled by the pool’s owners. Keep the pledge funds at a base address whose payment key is on the hardware wallet and whose stake key is the armory owner key:
armory-pool address -payment-vkey payment.vkey -stake-vkey device/owner.vkey -network previewpayment.vkey is the hardware wallet’s payment verification key, as a PaymentVerificationKeyShelley_ed25519 envelope. An extended (_bip32) key is refused: convert it to the plain key first.
The payment key never leaves the hardware wallet, and the owner key only signs certificates. bursa tx build spends only from its change address, so send the pledge to this address from the hardware wallet.
The payment key can belong to someone else. Their funds then count toward the pledge while the pool keeps one owner, so the armory still re-registers the pool alone. Before relying on that:
- They can spend the funds at any time, with no signature from the pool. If the owner’s stake falls below the declared pledge at the snapshot, the pool earns no rewards for that epoch. Check it with
bursa query stake-addressfor the owner’s reward address. - Owners earn no delegator rewards, so their funds earn nothing on chain. Their delegation and voting weight follow the owner key.
- Wallets find funds by their own stake key, so theirs may not show this balance. They can query the address directly with
bursa query utxo --address. - The pledge shown on chain no longer measures the operator’s own funds. Say so in the pool’s public information.
Certificates
Section titled “Certificates”device/owner.vkey from armory-pool keys is the owner’s stake verification key:
bursa cert stake-registration --stake-vkey device/owner.vkey --deposit 2000000 -o owner-reg.certbursa cert pool-registration \ --cold-vkey pool-cold.vkey --vrf-vkey vrf.vkey \ --pledge 100000000 --cost 170000000 --margin 0.02 \ --reward-account stake_test1... \ --owner-stake-vkey device/owner.vkey \ --relay-host relay.example.com:3001 \ --metadata-url https://example.com/pool.json \ --metadata-hash "$(bursa hash metadata pool.json)" \ -o pool-reg.certbursa cert stake-delegation --stake-vkey device/owner.vkey --pool-id pool1... -o owner-deleg.cert--reward-account is the stake_test1... address from Step 1, and --pool-id is the pool1... ID from armory-pool keys. Metadata URLs and relay DNS names must be 128 bytes or less.
Build, sign, submit
Section titled “Build, sign, submit”bursa tx build --socket-path "$SOCKET" --network preview \ --change-address "$(cat payer/payment.addr)" \ --certificate-file owner-reg.cert \ --certificate-file pool-reg.cert \ --certificate-file owner-deleg.cert \ --out-file pool-reg.txtx build prints each required witness to stderr with its role and key hash: payment for the paying wallet’s inputs, stake for the owner (the owner key also signs its stake certificates, so it appears once), and pool cold.
The paying wallet signs, the armory signs once per role, and Bursa assembles and submits:
bursa tx witness --tx-file pool-reg.tx --signing-key-file payer/payment.skey --out-file payer.witarmory-pool -identity <identity public key> -profile mypool@preview -host-key host.skey \ witness -role pool -tx-file pool-reg.tx -out pool.witarmory-pool -identity <identity public key> -profile mypool@preview -host-key host.skey \ witness -role stake -tx-file pool-reg.tx -out owner.witbursa tx assemble --tx-file pool-reg.tx \ --witness-file payer.wit --witness-file pool.wit --witness-file owner.wit \ --out-file pool-reg.signedbursa tx submit --socket-path "$SOCKET" --network preview --tx-file pool-reg.signedarmory-pool witness sends the exact body bytes to the device and checks the answer before it writes anything. The signature must verify over the body hash, and the binding signature must cover the request. It then prints what the device approved, covered by the same binding signature. Check it against what you meant to submit:
device signed: fee=181209 ttl=<slot> stake-reg pool-reg pledge=100000000 cost=170000000 margin=1/50 relays=1 leios=false vrf=<8 hex digits> meta=<8 hex digits> stake-delegttl is the slot after which the transaction is invalid, followed by valid-from when the body sets a start. vrf and meta are the first four bytes of the VRF key hash and the metadata hash, or meta=none for a registration without metadata.
The summary needs firmware from the same Bursa commit as armory-pool; see Build the firmware.
If the policy refuses, it prints the device’s reason and writes no witness:
armory-pool: device refused: policy: certificate 0: pool registration reward account is not the profile's reward accountCheck the result:
bursa query pool --socket-path "$SOCKET" --network preview --pool-id pool1...registered is true once the transaction is on chain, and params shows the pledge, cost, margin, owners and reward account.
Step 5: The first operational certificate
Section titled “Step 5: The first operational certificate”An operational certificate (opcert) lets the KES key sign blocks for the pool. It holds the KES public key, a counter, and the KES period it starts from, and the cold key signs it.
The armory chooses the counter, not the host. The host sends the KES public key, the on-chain counter and the start period. The device returns the signature and issue_counter.
bursa query pool --socket-path "$SOCKET" --network preview --pool-id pool1...The opcert field holds on_chain_counter, and kes holds current_kes_period. Pass them to armory-pool opcert. The device has no clock and takes the KES period from the host, so take it from the query, not from memory. It does refuse a reissue of its last counter at a KES period below the one its signing log holds for that counter (see Rotating the KES key). Use none when the counter is null:
armory-pool -identity <identity public key> -profile mypool@preview -host-key host.skey \ opcert -kes-vkey kes.vkey -kes-period <current_kes_period> -chain-counter <on_chain_counter|none> \ -out node.certThe device signs kes_vkey || issue || period with the cold key and returns the issue number it chose. armory-pool prints issue counter N, checks the signature and binding, and writes node.cert in the same format as bursa cert op-cert.
To check a certificate against the device later, opcert-check has the device reproduce its signature. It is an opcert request: the device signs, logs it and raises its floor to the chain counter it reports. Check only the current node.cert: checking an older one at the same counter and KES period issues an opcert for that certificate’s KES key again. Once a host key is registered, pass it with -host-key (bursa#1136); without it the device refuses the check:
opcert-check -vkey "$(jq -r .cborHex pool-cold.vkey)" -cert "$(jq -r .cborHex node.cert)" \ -pool <pool id hex> -profile mypool@preview -signer http://10.0.0.1 -source 10.0.0.2 \ -host-key host.skeyThe block producer validates the certificate when it starts. A good start logs:
block producer credentials validated pool_id=pool1... opcert_kes_period=976 opcert_counter=1block producer pool registration verified on chainblock forger started in production mode with leader electionA new pool
Section titled “A new pool”A pool that has never forged has no counter on chain, so on_chain_counter is null.
- With no recorded counter, the ledger uses 0 as the baseline and accepts counter 0 or 1 for the pool’s first block.
- The host sends
none, which the armory treats as chain counter 0, so it issues counter 1. That is valid. bursa query poolshowsnext_counter: 0for such a pool, the cardano-cli convention. Both numbers work; the armory always uses the chain counter plus one.- Kubernetes
Automode refuses to rotate a pool with no on-chain counter. Issue the first opcert with the armory, store it in the keys Secret, and run inAssistedmode until the pool forges its first block. Then switch toAuto.
Expect to wait. A new pool gets stake two epochs after its delegation, and on Preview a small pool may go several epochs without a slot.
Rotating the KES key
Section titled “Rotating the KES key”A KES key is valid for a fixed number of KES periods (62 periods of 129600 slots on Preview). Rotate before it expires.
You do not need to track whether the pool forged with the current opcert. The node records, for every pool, the opcert counter of the last block from that pool adopted on chain. bursa query pool shows it as opcert.on_chain_counter. A block header’s counter must be equal to that value or one more.
| On-chain counter vs current opcert | Meaning | Next opcert |
|---|---|---|
| Equal | A block with the current opcert is on chain | Current + 1 |
| One lower | The pool has not forged with the current opcert | The same counter again |
null | The pool has never forged | See A new pool |
The armory always issues the on-chain counter plus one, so the host only reports the chain. Reissuing the same counter burns nothing, and the counter on chain never skips. The device remembers the highest counter the host has reported (its floor) and refuses a request that reports a lower one. Once it has issued an opcert, it also refuses a chain counter above the last one it issued, since the chain only holds counters the device issued (bursa#1160). A reissue of the latest counter in the signing log, for the same profile and cold key, may not take a KES period below the logged one: both opcerts stay valid until one forges, so an earlier period would only extend an older KES key’s window.
To rotate:
- On the host, generate a new KES key from a new throwaway mnemonic, as in VRF and KES keys. Keep
kes.vkeyfor the opcert. - Query the pool for
on_chain_counterandcurrent_kes_period. - Get the opcert from the armory with
armory-pool opcert, as in Step 5. - Move the new
kes.skeyandnode.certto the producer, deletekes.skeyfrom the host, and restart the producer. On Kubernetes inAssistedmode, replace the Secret’s contents and the operator rolls the pod. InAutomode the operator does all of this through the cold signer, once you grant the new KES key (Grant each new KES key).
Rollbacks
Section titled “Rollbacks”The on-chain counter is read at the node’s tip. The last k blocks can still be rolled back.
If you rotate just after the pool forged a block, and that block is later rolled back:
- The chain’s counter drops back by one.
- The new opcert’s counter is now two above the chain, which the ledger rejects. Blocks forged with it are invalid.
- The armory’s floor still holds the higher value, so it refuses the lower counter the host now reports.
To recover:
-
Confirm the real counter with
bursa query pool. -
Unplug the board, plug it into the offline machine, load the provisioning image (with the signing image on the eMMC: switch toward microSD, card out), and reset the device floor to it:
Terminal window armory-boot-usb -i armory-provision.imxecho '{"profile": "mypool@preview", "chain_counter": <on-chain counter>}' |armory-pool -host-key provision.skey provision floor -
Start the signing image again: switch toward eMMC with the log card in, then plug the board in. Issue a new opcert and install it.
In Auto mode the reset clears only the device’s records. The signer’s watermark still holds the higher chain counter as its floor and refuses the lower one with HTTP 409, which the operator reports as IssueFailed. Reset the watermark to the same counter on the signer host with counter-reset, naming the armory backend’s profile:
bursa signer counter-reset --config signer.yaml --profile mypool@preview \ --key <pool id hex> --chain-counter <on-chain counter> --yesWithout --yes it prints the change, writes nothing and exits non-zero. It can run while the signer runs: the signer’s next request reads the new records. It sets the floor to the counter you give and clears the last issued counter, so once the signing image is back (step 3) the operator’s next retry issues and installs the opcert itself.
Rotate several KES periods before expiry, as the operator’s renewBeforePeriods: 8 does. A rotation then rarely lands right after a fresh block, and a mistake leaves time to recover.
Day-to-day operations
Section titled “Day-to-day operations”All of these use the same flow: build with bursa tx build, sign the body with the armory, add the payer’s witness, assemble and submit.
- Change pool parameters. Build a new
pool-registrationcertificate. No deposit is charged for a pool that is already registered. The armory still requires the pinned reward account and the device owner. - Vote as an SPO.
bursa tx build --vote-pool-id pool1... --vote-gov-action <txid>#<index> --vote yes|no|abstain. The armory signs with the cold key, and only for its own pool. - Retire. See Retire the pool.
Retire the pool
Section titled “Retire the pool”The retirement epoch must be after the current one and at most the poolRetireMaxEpoch protocol parameter ahead. Only the cold key signs a retirement, so the armory gives one witness:
bursa cert pool-retirement --cold-vkey pool-cold.vkey --epoch <epoch> -o pool-ret.certbursa tx build --socket-path "$SOCKET" --network preview \ --change-address "$(cat payer/payment.addr)" --certificate-file pool-ret.cert --out-file pool-ret.txbursa tx witness --tx-file pool-ret.tx --signing-key-file payer/payment.skey --out-file payer.witarmory-pool -identity <identity public key> -profile mypool@preview -host-key host.skey \ witness -role pool -tx-file pool-ret.tx -out pool.witbursa tx assemble --tx-file pool-ret.tx --witness-file payer.wit --witness-file pool.wit \ --out-file pool-ret.signedbursa tx submit --socket-path "$SOCKET" --network preview --tx-file pool-ret.signedThe device summary reads pool-retire epoch=<epoch>, and bursa query pool shows retiring_epoch once the transaction is on chain. A new registration certificate before that epoch cancels the retirement.
At the retirement epoch the 500 ada deposit goes to the reward account. The armory refuses to sign withdrawals, and bursa tx build cannot build one, so withdraw it with another tool, signed with reward.skey and a payment key. On Preview and mainnet a reward account must delegate its vote to a DRep before it can withdraw.
More than one pool
Section titled “More than one pool”One armory can hold up to 32 pools: 32 cold key objects (0x20e50010 to 0x20e5001f and 0x20e50600 to 0x20e5060f) and 32 profile slots (0 to 31). Each pool gets its own profile with its own cold key, owner key, reward account, opcert floor and registration pins.
Which networks share a device depends on the image. The testnet image this guide builds serves every testnet. A NETWORK=mainnet CHAIN=cardano or CHAIN=prime image serves that one chain. A NETWORK=multi image (bursa#1187) serves three scopes on one device: every testnet, cardano-mainnet and prime-mainnet, with profile names ending @cardano-mainnet or @prime-mainnet. Each scope needs its own host key: a testnet key never signs or provisions for a mainnet profile, nor a Cardano key for a Prime one. A device provisioned with the testnet image, as in this guide, keeps its profiles and testnet host key on a multi image, but that key cannot add a mainnet scope and the device’s last host key cannot be revoked. Adding mainnet pools to it takes a device wipe and provisioning again, mainnet host key first. The firmware README describes the multi image.
To add a pool, load the provisioning image and repeat Import the cold key with a free object, Create the profile with a free slot, and Pin the pool registration. The device signs nothing while the provisioning image runs, so every pool on it waits until the signing image is back.
The signer takes one armory backend per profile. They share the device address and identity key, and each pool’s cold key gets its own keys entry. Backends in one scope share its host key; on a multi image, backends of different scopes each name their scope’s key in host_key_file:
backends: - name: "armory-pool-a" type: "armory" address: "http://10.0.0.1" profile: "pool-a@preview" identity_public_key: "<identity public key>" host_key_file: "/etc/bursa/armory-host.skey" protocol: "2" - name: "armory-pool-b" type: "armory" address: "http://10.0.0.1" profile: "pool-b@preview" identity_public_key: "<identity public key>" host_key_file: "/etc/bursa/armory-host.skey" protocol: "2" keys: - hash: "<pool A id hex>" backend: "armory-pool-a" allowed_requests: ["opcert"] - hash: "<pool B id hex>" backend: "armory-pool-b" allowed_requests: ["opcert"] callers: - subject: "dingo-operator" keys: ["<pool A id hex>", "<pool B id hex>"] opcerts: - key: "<pool A id hex>" kes_vkeys: ["<pool A KES vkey hex>"] - key: "<pool B id hex>" kes_vkeys: ["<pool B KES vkey hex>"]At startup the signer reads each profile’s keys from the device. A profile that is removed from the device keeps the signer from starting, so remove its backend first. In Kubernetes, each producer sets its own coldKeyHash and uses the same endpoint and mtlsSecretRef, and rbac.keySecretNames lists every producer’s keys Secret: a pool whose Secret is missing fails rotation with SecretUpdateFailed.
One pool can run on several networks with the same cold key, one profile per network on the device (for example mypool@preview and mypool@preprod). The signer then takes one backend per profile listing the same key. It refuses to start if two backends with the same profile, or a backend without a profile, list a key that another backend also lists (bursa#1249):
- Leave the key’s
backendfield empty: when set, the signer refuses any request whose profile selects a different backend. - A request for such a key must name its profile. Without one the signer refuses it with HTTP 400, and a profile none of the backends has with HTTP 404. In Kubernetes, set the producer’s
coldSigner.profileto that profile. Chart 0.5.2 refuses the newer of two producers of one pool on different networks withDuplicateForger; use 0.6.0 or later. - The signer keeps the watermark records of such a key for each profile. Records a signer before v0.22.0 wrote carry no profile and are ignored once a second backend lists the key. Before adding the second profile, stop the signer and migrate them as the profile routing section of the signer runbook describes.
Before putting several pools on one device:
- One device failure, theft, lost log card or bad firmware image stops every pool on it. Each cold key needs its own mnemonic backup.
- A registered host key can sign for every pool of its scope on the device, which on a single-scope image is every pool, and the signing log on the card records all of them. Keep pools of different owners on separate devices.
- A second device holding the same pools can only be a spare that you switch to by hand: each device keeps its own opcert floor, so two active devices could issue the same counter.
On Preview, two pools on one armory got their opcerts through one signer at the same time (2026-11-04), each byte-identical to the pool’s running certificate.
Migrating an existing pool
Section titled “Migrating an existing pool”A pool that already forges can move its cold key onto the armory.
-
Import the existing cold key, as in Import the cold key.
-
Create the profile with
chain_counterset to one less than the issue number of the pool’s currentnode.cert. This sets the device floor. -
Boot the signing image, and check the device reproduces the pool’s current opcert:
Terminal window opcert-check -vkey <cold vkey cborHex> -cert <node.cert cborHex> \-pool <pool id hex> -profile mypool@preview -signer http://10.0.0.1 -source 10.0.0.2 \-host-key host.skeyopcert-checkasks for the cert’s issue number minus one as the chain counter, so it is refused below the floor: that is why step 2 sets the floor there, even whenon_chain_counteralready equals the issue number. The first real rotation then reports the on-chain counter and raises the floor to it. A cert with issue number 0 cannot be checked this way. -
Re-register the pool with the device owner key as owner, and move the pledge to an address with that stake key.
Troubleshooting
Section titled “Troubleshooting”armory-pool prints the device’s reason when it refuses. The common ones:
| Message | Cause | Fix |
|---|---|---|
pool registration reward account is not the profile's reward account | The certificate’s --reward-account differs from the pinned one | Use the pinned account, or change it with armory-pool -host-key provision.skey provision reward on the provisioning image |
a second pool registration in one body | The body carries two pool registration certificates; the second would replace the first’s parameters on chain | Put one pool-registration certificate in the transaction |
pool owners must be exactly the device owner | The certificate lists another owner, or more than one | Pass only device/owner.vkey as --owner-stake-vkey |
pool registration for another operator | --cold-vkey is not this profile’s cold key | Use pool-cold.vkey for this profile |
delegation other than owner to this pool or stake registration of another credential | The body carries a certificate for another stake key | Register and delegate other stake keys in their own transaction |
policy: body key N not allowed | The body has a field outside pool operations, such as a withdrawal or mint | Build pool operations in a transaction of their own |
policy: network id does not match profile or output N is on another network | A mainnet address in a Preview transaction, or the reverse | Check CARDANO_NETWORK and the change address |
key hash does not match the profile key for this role | The wrong -role for this witness | pool for the cold key, stake for the owner key |
unknown profile | The -profile name is not on the device | Use the exact name given to /provision/profile, on the device that holds it |
malformed request | A request field is misspelled or unknown, or the JSON has trailing data | Check the field names against the examples in this guide; the device never ignores an unknown field |
nonce replayed | A request was sent twice | Run the command again; each run uses a new nonce |
cold key object already exists with a different key | The object already holds another key | Use a free object; keys are never overwritten |
owner key object already exists with a different key | The slot already holds another owner key | Use a free slot |
profile name in use, slot in use or cold key already belongs to a profile | /provision/profile names a profile, slot or cold key object another profile already has | Pick a new name, a free slot, or the cold key’s own profile |
response version "bursa-attested-signer/1", want "bursa-attested-signer/2" | The signing image predates the signing summary that armory-pool witness asks for | Build the firmware from the same Bursa commit as armory-pool and load it, as in Build the firmware |
a profile record is unreadable or inconsistent; wipe the device instead | From /wipe/profile: a stored profile record cannot be read, is in the wrong slot, or shares its name with another | Wipe the whole device with /wipe/device, as in Removing a profile or wiping the device |
pool registration VRF key hash is not the pinned one | The registration names another VRF key than the pins | Register with the pinned vrf.vkey, or send new pins as in Pin the pool registration |
pool registration pledge N outside the pinned bounds, cost N above the pinned maximum or margin above the pinned maximum | The certificate’s pledge, cost or margin is outside the pins | Fix the certificate, or send new pins from the provisioning image |
pool registration relays or metadata URL are not the pinned ones, metadata hash is not the pinned one, carries metadata, none is pinned or has no metadata, a metadata hash is pinned | A relay, the metadata URL or the metadata hash differs from the pins, or the relays are in another order | Register the pinned relays in the pinned order, or send new pins (or -unpinned-relays) from the provisioning image |
A 404 from a /provision/ endpoint means the signing image is running; a 404 from armory-pool means the provisioning image is. See Build the firmware.
An opcert request below the floor is refused with chain counter below the recorded on-chain counter. If a rollback lowered the chain counter, or a host reported a wrong, higher counter, reset the floor with the provisioning image as in Rollbacks.
An opcert request that reports a chain counter above the last counter the device issued is refused with chain counter above the last counter the device issued. Check the counter with bursa query pool. If the pool forged with an opcert from another device, such as a spare, set the floor to the real on-chain counter with the provisioning image; that also clears the device’s record of its last issued counter.
A reissue of the device’s last counter at a KES period below the logged one is refused with KES period below the logged opcert at this counter. Take the period from bursa query pool. opcert-check sends the certificate’s own KES period, so after a reissue of the same counter at a later period, the older certificate cannot be checked this way.
Some hosts reset the disk at its first read: the kernel logs device descriptor read/64, error -110 and the board stops answering. Unplug it and flash from another host.
If the signing image shows up on USB but answers nothing, not even a ping, with a card in the slot, the firmware predates bursa#1145: it runs out of DMA memory while it checks the card. Nothing is written to the card. Take the card out to confirm the device starts and its report says signing log: NOT OPEN, then flash an image with the fix and put the card back.
On Kubernetes in Auto mode, read the OpCertIssued condition and the events with kubectl describe dingonode producer -n cardano. The reason names what failed:
| Reason | Cause | Fix |
|---|---|---|
IssueFailed | The signer did not return an opcert: the new KES key is not granted (HTTP 403, caller is not authorized for this opcert), the signer is unreachable or refused the client certificate, its watermark refused the counter (HTTP 409), or the armory refused | For an ungranted key, add the key the message names, as in Grant each new KES key. Otherwise check the signer’s log and that the armory answers on the signer host. The operator retries after 10 minutes. After a rollback, see Rollbacks |
ColdSignerUnavailable | The operator cannot read the client certificate Secret, or it lacks tls.crt or tls.key | Create the Secret named in mtlsSecretRef in the producer’s namespace |
OnChainCounterUnknown | The operator has no fresh on-chain counter for the pool | Check nodeToClient.enabled and the OnChainCounterAvailable condition. A pool that has never forged has none; see A new pool |
SecretUpdateFailed | The operator cannot write the keys Secret | Install the chart with rbac.keySecretsUpdate=true and the Secret’s name in rbac.keySecretNames |
KESPeriodUnknown | The operator has not yet read the node’s KES period from its metrics | Wait for the node to start and serve metrics, then check the kes status |
RenewWindowTooLong | renewBeforePeriods is not below the KES key’s lifetime in periods, so every opcert would be due at once | Set renewBeforePeriods well below 62 on Preview; the default is 8 |
KeysSecretUnavailable | The operator cannot read the keys Secret | Check the Secret named in keys.secretRef exists and the chart grants read access to it |
KeysSecretInvalid | The keys Secret holds no opcert, or one that does not parse | Store the current node.cert as opcert.cert; for a new pool see A new pool |
IssuedBundleRejected | The new KES key and opcert failed the operator’s checks, so the Secret was not updated | Check the opcert’s pool and counter in the message; the running keys stay as they are |
From chart 0.4.1, a node whose tip stops moving shows the TipNotAdvancing reason on the LedgerPipelineHealthy condition (dingo-operator#115).
Keys to keep and delete
Section titled “Keys to keep and delete”| File | Where | Keep? |
|---|---|---|
| Pool mnemonic words | Paper, checked | Keep. The only backup of the cold and owner keys. |
pool/seed.txt | Offline machine | Delete once the armory is provisioned and the paper is checked. |
pool-cold.skey, owner.skey, other files in pool/ | Offline machine | Delete after import. |
vrf.skey | Block producer | Keep while the registration names its key. One encrypted copy off the producer is optional and spares a re-registration if the producer is lost. Delete the host copy. |
kes.skey | Block producer | Only the current one, only on the producer. Delete the host copy. |
node.cert (the opcert) | Block producer | Keep the current one with its kes.skey. Not secret, but with that kes.skey and vrf.skey it forges blocks, so after a rotation delete the old node.cert and kes.skey together. |
kes.vkey | Host | Needed only to issue its opcert. Delete it with its kes.skey at the next rotation. |
reward.skey | Offline | Keep offline, or re-derive from the mnemonic (account 1) when you withdraw rewards. |
payer/ | Host | A hot wallet for fees and deposits. Keep only what the next transactions need. |
pool-cold.vkey, device/*.vkey, vrf.vkey, reward.vkey | Host | Keep. Public, and needed for every re-registration, vote and retirement. |
*.cert other than node.cert (pool registration, owner registration and delegation, reward account registration) | Host | Public and single-use. Delete once the transaction is on chain, or keep as a record. Build new ones for later changes. |
*.tx, *.wit, *.signed | Host | Public. A .signed file can be submitted by anyone who holds it until it is on chain or its inputs are spent. Delete them after submission. |
pool.json | Web server | Keep it at the metadata URL, unchanged: the registration pins its hash. Re-register to change it. |
| Identity public key | Anywhere | Keep. Every armory-pool call pins it. |
Never paste the mnemonic into a shell command, and keep seed.txt out of synced folders.
Removing a profile or wiping the device
Section titled “Removing a profile or wiping the device”Neither the signing nor the provisioning image deletes a key. The wipe image, built with make imx WIPE=1, removes one profile with its keys, one cold key that no profile names, or every key and profile on the device. Load it like the provisioning image: card out, switch toward microSD, then armory-boot-usb -i armory-wipe.imx. The report from curl http://10.0.0.1/ shows wipe build.
List what is on the device first:
curl -s -X POST -H 'Content-Type: application/json' http://10.0.0.1/wipe/objects -d '{}'Remove one profile: its owner key, its cold key, its registration pins and its record. A cold key that another profile still names stays. The slot and the freed cold key object can be provisioned again.
echo '{"identity_public_key": "<identity public key>", "profile": "mypool@preview"}' | armory-pool -host-key provision.skey wipe profileRemove a cold key that no profile names, for example one imported for a profile you never created (bursa#1187). cold_key_id is the object’s number in decimal. A key that a profile names is refused: remove the profile instead.
echo '{"identity_public_key": "<identity public key>", "cold_key_id": 551878672}' | armory-pool -host-key provision.skey wipe coldDelete only the signing log head, to start a new log on a zeroed card: see The signing log card.
Wipe the device: every key and profile, host keys and the identity key included.
curl -s -X POST -H 'Content-Type: application/json' http://10.0.0.1/wipe/device -d '{"identity_public_key": "<identity public key>"}'These requests name the device by its identity public key in hex, the value you pin with -identity; any other value deletes nothing. A device with no identity key takes an empty value. If a request stops part way, send it again. armory-pool -host-key provision.skey reset then returns the board to USB recovery mode. After a device wipe no host key is left, so leave out -host-key.
Removing a profile is refused while any stored profile record is unreadable, in the wrong slot, or shares its name with another, because the device cannot then tell which keys belong to the profile. /wipe/device still works and clears the device.
Deleted keys cannot be recovered from the device. Before removing a profile, check the pool mnemonic restores its cold key and owner key; an owner key the device generated has no backup.
Recovery
Section titled “Recovery”| Lost | Effect | Recovery |
|---|---|---|
| Armory | No new signatures | Restore the cold key and owner key from the pool mnemonic on a new device, with the same reward account. The pool, owner and pledge address stay the same. |
| Pool mnemonic | No backup of the cold key | The armory keeps signing, but the SE050 cannot export the key. If the armory is lost too, the pool is gone and a new pool needs a new cold key. |
| Pledge hardware wallet | Pledge funds | Restore from the pledge mnemonic. |
| Block producer | No blocks | Restore vrf.skey from its encrypted copy, or generate a new VRF key, update the pins if they fix it, and register the pool again. Generate a new KES key on the host and issue a new opcert. |
Testing on Preview
Section titled “Testing on Preview”Without hardware, armory-sim in the Bursa repository (bursa#1186) runs the device service with a simulated secure element and log card on the host; armory/e2e/sim-signer-opcert.sh drives it through provisioning, the signer and an opcert. Point armory-pool at it with -signer and -source.
armory/e2e/preview-pool-registration.sh in the Bursa repository runs this guide against Preview and checks each step against the chain:
- cold and owner key derivation from the mnemonic, their import, and the profile;
- reward account registration;
- owner and pool registration signed by the armory;
- a refused registration that names another reward account;
- the first opcert, cross-checked with
opcert-checkwhenOPCERT_CHECKnames it (withHOST_KEYset, every signing request is host-authenticated); - retirement, when
RETIRE=1is set.
Start the device on the provisioning image. With SIGNING_IMX set to the signing image, the script resets the board and loads it after provisioning; without it, the script stops and asks you to load it. With SIGNING_IMX set, the script waits after the reset for you to insert the signing log card, then loads the signing image; it needs a terminal for that, and checks for one before it resets the board (bursa#1148). Before the first signature it checks that the signing image’s report says signing log: open, and stops with the report’s reason otherwise. The header lists the other environment variables. Set WORK to keep the work directory: rerunning it on the same WORK skips the steps already done and re-registers the existing pool, so repeated runs use no new device keys. Without WORK each run starts in a new temporary directory and creates a new pool.
What is not built yet
Section titled “What is not built yet”- Secure boot (bursa#1112). Until the board’s fuses are burnt, its boot ROM runs any image from the eMMC, a card or USB recovery mode, and that image can use the keys in the SE050, so keep the armory where nobody else can reach it. Every image can be signed with a high assurance boot (HAB) key (bursa#1171), and the report prints the boot ROM’s HAB status (bursa#1174): on an unfused board a signed image reports
hab: status success, config open, state non-secure, no events, and an unsigned one lists the failed checks. Burning the fuses cannot be undone and is not covered here.