Docs · Ergon
Ergon
An ergon is a Keccak-256 search. Stake still chooses who may write the block. The search does not choose the writer. If the block includes a valid answer, the finder and the including validator are paid inside that block. If it does not, nothing new is minted. A guess is a hash. It does not sign a transaction, and it does not use a validator key.
When the rules are even on
The work rules run only when the chain id is 21520 and the genesis extra data is 32 bytes beginning with the ASCII letters kalyx-work-v1. A different chain id, or a genesis that does not carry that marker, does not pay this prize. Do not point a searcher at another network and expect these numbers.
The answer is 32 bytes
Extra data is at most 32 bytes. Empty extra data means no answer and no mint. A solution is exactly 32 bytes:
- Byte 0 is the version,
0x01. - Bytes 1 through 8 are the nonce, an unsigned 64-bit integer, big-endian.
- Bytes 9 through 28 are the 20-byte payout address.
- Bytes 29 through 31 are zero.
The preimage is 82 bytes: the ASCII letters KALYX1, then the chain id as an unsigned 64-bit integer, then the slot as an unsigned 64-bit integer, then the parent hash (32 bytes), then the payout address (20 bytes), then the nonce as an unsigned 64-bit integer. All integers are big-endian. The hash is Keccak-256 of that preimage.
The address is inside the hash, so a finder cannot hand the same answer to a different payout after the fact. The slot and the parent are inside the hash, so an answer for one block is not an answer for the next. The same proof cannot be paid twice on the same state.
The answer is valid when the hash, read as an integer, times the difficulty, is less than 2256. Difficulty is not stored in the header. It is recomputed from ancestor headers. It starts at 218, which is 262,144. The window is 80 blocks. The next difficulty is the old difficulty times the tight-block sum, divided by 80. If that sum is zero, the next difficulty is half. The result is clamped between half and double the old value, and it cannot fall below 256.
Who is paid
| Years from genesis | Slots | Finder | Including validator |
|---|---|---|---|
| 0 to 4 | 0 to 12,623,039 | 17 KALYX | 3 KALYX |
| 4 to 8 | next 12,623,040 | 8 | 2 |
| 8 to 12 | next period | 4 | 1 |
| 12 to 16 | next period | 2 | 1 |
| 16 to 20 | next period | 1 | 1 |
| After 20 | until the tail is gone | 1 | 0 |
Unpaid slots still advance the clock. The period is 4 times 3,155,760, which is 12,623,040 slots. If the remainder of the 500,000,000 tail is smaller than the prize, the finder is paid first. The validator’s share is what is left, and it may be zero. After the tail is gone, an answer does not mint.
The payment is a balance credit inside the block. It is not a signed transfer, so it does not appear in the transaction list and it does not move the finder’s nonce. The balance is where the prize shows. A block that arrives later with an answer is preferred over an earlier block at the same height that has none.
How to search
The public page is testnet.kalyx.si/mine. It uses one CPU core in the browser. It asks you to pass a person check. The action name for that check is the page’s own. The public door then limits one address to 6 hours of search per UTC day. That limit is the website, not the consensus rule. A block can still include an answer that was found another way.
The command-line program is ergon.py, served as plain text. It uses every CPU core through Keccak. Download it again when the page changes. Do not edit the file and expect the hash to match. Point it at chain 21520 and at a KAL payout address you control.
Shor’s algorithm does not break this search. The search is a hash. Grover’s algorithm can speed a hash search. It does not turn a phone into a machine with more cores, and this project does not ship a program that runs the search on a graphics card.
What the search is not
- It is not the right to write the block. Stake assigns the slot.
- It is not a signature, and it is not a private-note proof.
- It is not a second reward from the beacon. That reward factor is zero on this genesis.
- It is not a promise that a browser will find an answer against a computer that searches with every core.
The coins, once minted, sit above the 500,000,000 floor. Only that room can be burned by base fees. The fees page is the floor.