How the validator set works#
OysBio Chain uses Clique proof of authority with two OysBio additions: fallback sealing, which keeps blocks coming when validators are offline, and the safe block, which makes blocks final once a quorum has built on them.
| Validators | Votes to add or remove one | Online for 3-second blocks | Safe quorum |
|---|---|---|---|
| 3 | 2 | 2 | 3 |
| 4 | 3 | 3 | 3 |
| 5 | 3 | 3 | 4 |
| 7 | 4 | 4 | 5 |
- A validator seals at most one block in a row of ⌊n/2⌋+1. With fewer validators online than the third column, blocks still come, more slowly (fallback mode).
- A block is safe when the safe quorum, n − ⌊(n−1)/3⌋ validators, sealed it or built on it in two rounds. Validators never seal on a chain without the blocks they confirmed, and no node reorganises below the safe block.
- Votes are cast in the next block the voting validator seals and are cleared at each checkpoint (every 30,000 blocks, about 25 hours). The explorer's Validators page shows the set, votes in progress and each validator's uptime.
The mainnet runs three OysBio validators today. Independent operators are admitted after an operator agreement and an identity check; see oys.bio/validators. Practise every step on the testnet first.
Requirements#
| Validator | |
|---|---|
| Machine | Linux amd64 server you control, 4 cores, 8 GB RAM, SSD 100 GB |
| Network | a fixed public IP, or a private network behind your sentries |
| Clock | NTP running. A validator with a wrong clock seals blocks the others refuse |
| Access | SSH with keys only, OS updates, no other public services on the machine |
| Keys | one validator key per network, created on the server, backed up offline and encrypted |
| People | someone who can act within the hour when the OysBio team asks for a halt |
1. Create the key on the server#
cp node.env.example node.env # ROLE=validator, NAT=extip:<public IP>, DISCOVERY=0
./oysbio-node.sh init --validator
This prints the validator address and the enode of the node. The key is in data/keystore/, its password in data/password.txt. Back both up offline. Never copy a key to a second machine: the same key sealing on two machines splits the chain. Never use a testnet key on the mainnet.
2. Sync as a normal node#
./oysbio-node.sh start # or the systemd service from Run a node
./oysbio-node.sh info
Until the vote passes the log shows unauthorized signer. That is expected.
3. Apply and get voted in#
Send the address and the enode (never the key or the password) to OysBio. Each current validator then runs:
./oysbio-node.sh vote add 0x<your address>
When more than half have voted, your node starts sealing by itself. ./oysbio-node.sh info then shows validator, sealing blocks, and the explorer lists you with your first block.
4. Operate#
| Task | Command |
|---|---|
| Node status, safe block, peers | ./oysbio-node.sh info |
| Validators and votes in progress | ./oysbio-node.sh votes |
| Vote a validator in or out | ./oysbio-node.sh vote add 0x… / vote remove 0x… |
| Withdraw your vote | ./oysbio-node.sh vote discard 0x… |
| Emergency halt when OysBio asks (stays halted after a restart) | ./oysbio-node.sh halt "reason" |
| While halted, rewind to the block OysBio names | ./oysbio-node.sh rollback <block> |
| End the halt | ./oysbio-node.sh resume |
Restarting a validator. Do not restart a sealing validator blindly: a validator that comes back and seals at once can race the others. Halt it first (halt "upgrade"), stop it, upgrade or restart, start it (it does not seal while the halt flag is there), check info, and resume right after a new block from another validator. Upgrade one validator at a time and only when the others are sealing; with three validators, two validators down at the same moment stop the chain.
Security checklist#
- The validator key is unlocked while the node runs, so the validator role never opens HTTP RPC. Serve APIs from a separate
rpcnode. - Put the validator behind sentry nodes: it accepts peer connections only from your sentries and the other validators, and its IP address is not published.
- Keep
DISCOVERY=0on the validator; list peers inEXTRA_PEERS. - SSH with keys only, a firewall that allows SSH from your admin addresses, automatic security updates, and a second person who can reach the server.
- Watch the node:
journalctl -u oysbio-node-mainnet, the explorer'sGET /api/health?strict=1, and your validator's row on the explorer's Validators page. - Keep an offline, encrypted backup of
data/keystore/anddata/password.txt. If the key leaks, tell OysBio at once: the validators vote the leaked address out and your new one in.
Validator staking#
Validator staking with a 1,000,000 OYS bond runs on the testnet only (OysBioValidatorStaking, see Explorer API). It is not active on the mainnet.