Changing the board keys
Part of Board instructions. How the board changes the keys that sign sporks, online against a node or offline in a spork database.
A change lists the keys active after it and carries the approvals of the keys before it; what the chain
holds and the rules a node applies to it are on Grid sporks. A change of the
board keys is signed and co-signed by the keys it makes active, so gridspork-set board-keys and
gridspork-cosign accept a key that a pending change adds.
The chain grows one change at a time. In this example the board adds a fifth key, E, and then switches off A:
flowchart LR
R["Root<br/>built-in keys A B C D<br/>and the epoch"] --> C0["Change 0<br/>active: A B C D E<br/>approved by 3 of A B C D,<br/>and by E"]
C0 --> C1["Change 1<br/>active: B C D E<br/>approved by 3 of A B C D E"]
A change is made online against a node, or offline in a spork database file:
flowchart TD
P["util board-keys propose<br/>writes the change file"] --> A["util board-keys approve<br/>by a quorum of the keys before it,<br/>and by every key it adds"]
A -->|online| S["gridspork-set board-keys<br/>-D change file<br/>with a key the change makes active"]
S --> C["gridspork-cosign<br/>with a second such key"]
A -->|offline| AP["util board-keys apply"]
AP --> SG["util spork-db sign,<br/>by two members"]
SG --> I["util spork-db import"]
C --> N["Every node goes by the new keys"]
I --> N
Making a change online
The change file holds no secret: it lists the keys before and after and the approvals, and passes from one board member to the next.
- A member proposes the change on a machine with a copy of a spork database:
hedgehog util board-keys propose --spork-db <file> --activate <key> --deactivate <key> --output <change file>.--activateand--deactivaterepeat. Without--spork-dbthe change follows on the chain that the release ships, or on the keys built into it when it ships none, as this release does; a private network with--network-keysfollows on its own keys. A change over a spork database that holds no board keys spork follows on the built-in keys. Give--spork-dbonce the network holds a board keys spork. The command printssequence: <n>, each key before the change asbefore: <key>, each key after it asafter: <key>,quorum: <q> of the <n> keys active before it, each added key asapprove too: <key>andoutput: <file>. It refuses throughNothing was proposed: <reason>a chain that does not hold from the root of this machine, a change that changes nothing, one leaving fewer than 2 or more than 16 keys, an added key already active and a key to switch off that is not:The board keys of <file> do not hold from the root of this machine: <reason>, withthe releasein place of<file>without--spork-db,The change changes nothing; give --activate or --deactivate,A change leaves 2 to 16 keys active, not <n>,<16 hex> is already active,<16 hex> is not active. The output file must not exist:--output <file> exists and is not overwritten. - Every member who is to approve runs
hedgehog util board-keys approve <change file> --spork-db <file> -k <key>, or gives the key with--key-fileor$HEDGEHOG_BOARD_KEY. The command verifies the chain the file follows on from the root and takes the keys active before the change from that chain, not from the file, so a file that hides a key is refused:The change of the board keys is refused: the keys active before it are <keys>, not <keys> as the change file says. The key must be active before the change or added by it, orThe board key is neither active before the change nor added by it, so it does not approve it. The approval is written into the file, in place of an earlier approval by the same key, and the command printsapprovals: <n> of <q> that the keys before it needandadded keys that approved it: <a> of <b>. - A member proposes the spork with the change against a node:
hedgehog cli gridspork-set board-keys -D <change file> -k <key>. The key must be one of the keys the change makes active. Add--first-versionwhen the node holds no spork of the type. The command appends the change to the stored chain, verifies the whole chain and signs the head with the key. A change that switches off a key which signed a spork the node holds and counts is refused unless--allow-uncountedis given, since that spork would count for nothing until keys that stay sign it again:the change switches off keys that signed sporks the node holds, which would count for nothing until keys that stay sign them again: <TYPE> signed by <16 hex> and <16 hex>; ... . Renew them first with keys that stay, or give --allow-uncounted. - A second member co-signs with
hedgehog cli gridspork-cosign -k <key of B> <digest>, where the key is another key of the new active set. The node stores the spork once both signatures hold, goes by the new chain and passes the spork on to its peers.
Both read the result with gridspork-get board-keys. Every cli command that signs installs the chain of
its node before it judges a key, and refuses a node whose chain does not hold from the root of this machine
or that its own keys did not sign: The board keys that the node holds do not hold from the root of this
machine, or two of their keys did not sign them (see --network-keys).
Making a change offline
A board that does not build the spork on a node writes it into a spork database file instead:
hedgehog util board-keys apply <spork database> --change <change file> --output <new file>writes the database with the change appended. Its board keys spork is a first version that no one signed. The command printsboard keys: <n> changes, each active key asactive: <key>andoutput: <file>. It refuses a change file it cannot read withCannot read the change of the board keys <file>: <reason>, a change that does not follow on the chain withThe change of the board keys is refused: <reason>, and one that breaks the rules of the chain withNothing was applied: <reason>.- Two members run
hedgehog util spork-db signon the output, one after the other, with different keys that the change makes active, see Signing a spork database. hedgehog util spork-db import <file>installs the result on the node, which then publishes the spork to its peers. The import refuses a file whose chain does not carry on the chain of the node, see Signing a spork database.
The record of the longest chain
A command line keeps the longest chain it verified in
board-keys-<16 hex of the root>.seen in its user data directory, with board-keys-<16 hex of the
root>.seen.lock beside it. A longer chain takes the record’s place, and the command prints each change it
added:
Recorded in /home/user/.local/share/hedgehog/board-keys-7b1e04aa9d2c8f31.seen the 1 change of the board keys that the node holds; a node or a file that holds less of the chain, or another chain, is refused from now on:
change 0, made at 2026-10-24T10:00:00Z, adds 3f2a5b7c9d1e4f60, switches off none, approved by 44f21a0c9b7e6d18 7c0e35b9a1d24f68
From then on a node or a file that holds no chain is refused with The node holds no board keys, while
this machine verified <n> changes before (<file>): it is behind the board or holds changes of it back, and
nothing goes by the keys it makes active. Use one that holds the whole chain, or delete <file> only to
start over from the chain that the release ships., with The file <file> holds in place of The node
holds when a command reads a file. A chain with fewer changes is refused in the same words, beginning
The node holds 1 change of the board keys, fewer than the 2 that this machine verified before (<file>);
one that parts from the record names the change:
The node holds a chain of the board keys that parts at change <i> from the one that this machine verified before (<file>):
verified here: change <i>, made at <time>, adds <keys|none>, switches off <keys|none>, approved by <keys|none>
held there: change <i>, made at <time>, adds <keys|none>, switches off <keys|none>, approved by <keys|none>
Nothing goes by the keys of a chain that parts from the one verified here. Find out which of the two the board made, and delete <file> only to start over from the chain that the release ships.
A record that cannot be read ends the command with `The record of the board keys