How it works
There is one Pearl chain until a block height we call H, the height at which upstream activates FP8. At H the chain splits in two. Upstream's side changes its mining rules. Pearl Classic's side keeps them.
One chain until H
Before H, Pearl Classic software follows the same chain as every other Pearl node and applies the same consensus rules. Blocks, balances and transactions are identical. Nothing about your coins changes by running it.
H is not ours to choose. It is whatever height upstream sets for FP8, and upstream has not set one. Earlier upstream fork heights were published between 52 minutes and 12 hours before they took effect, and twice moved late, so Classic nodes are built to be told the height when it is known and to be corrected if it moves. A node that has been given the height is called armed.
What changes at H
| Pearl (upstream) | Pearl Classic | |
|---|---|---|
| Mining | FP8: bit-exact floating-point work on listed hardware | Unchanged: integer matrix multiplication |
| Difficulty rule | Unchanged | New rule from block H (below) |
| Transaction signatures | Unchanged | Signed under a different tag from block H (below) |
| Peer-to-peer network | Unchanged | Its own network: separate network identifier and ports |
| History, balances at H−1 | Identical on both | |
| Addresses, keys, transaction format | Identical on both (prl prefix) | |
| Reward schedule, target block time | Unchanged by Pearl Classic (194 seconds per block) | |
The two sides cannot accept each other's blocks. Upstream's blocks from H carry the new FP8 proof, which Classic rules reject. Classic's block H is mined at a difficulty that the unchanged rule never produces, so it is invalid for any node still on the old rules, and the reverse holds too.
A node that upgrades to neither side stops at block H−1. Following Pearl Classic past the fork requires the Classic node, and Classic coins are moved with the Classic wallet.
Replay protection
Because both chains share history and keys, a transaction valid on one would, without protection, be valid on the other. Someone could copy a payment you made on one chain and broadcast it on the other.
Pearl Classic prevents this in both directions with one change. Every Pearl signature commits to a short fixed label, a tag. From block H, Classic signatures use the tag PearlClassic/TapSighash in place of the original TapSighash. A signature made for Classic signs a different message from the one upstream checks, so upstream rejects it. A signature made for upstream fails on Classic for the same reason. Upstream does not have to change anything for this to hold.
Nothing else in a transaction changes: the format, the transaction ID and the addresses are the same. In practice:
- Move Classic coins with the Classic wallet, and upstream coins with the upstream wallet.
- A transaction signed before the fork that is not mined by block H−1 will never confirm on Classic. Send it again from the Classic wallet.
- Close to the fork, the Classic wallet refuses to sign with the old tag if its view of the chain is more than two hours old. Let it sync first.
On the public testnet this was tested in both directions, including a coin that existed before the fork and was still unspent on the other chain: spent on Classic, the same transaction was rejected upstream on its signature.
The difficulty rule
Pearl's current difficulty rule averages over 168 hours. That is stable in normal times and far too slow for a fork. If Classic started with 1% of the pre-fork hashrate under the current rule, the first block would take about five hours on average, and difficulty would need about seven weeks to catch up. From block H, Classic replaces the rule with three small ones.
| Applies to | Rule |
|---|---|
| Block H | Starts 2× easier than the inherited difficulty and gets 2× easier again every 5 minutes until the block is found, up to 256×. The chain finds its own starting level without anyone guessing how much hashrate turned up. |
| Every block after H | ASERT, anchored on block H, with a one-hour half-life: difficulty follows the gap between the actual timestamps and the 194-second schedule. |
| Any block after H that is slow to arrive | If 20 minutes pass without a block, that one block may be 2× easier, and 2× easier again every further 5 minutes. The relief does not carry over to later blocks. |
In simulation, with Classic keeping a fraction of the pre-fork hashrate:
| Share of pre-fork hashrate | First block, mean | First block, worst | Difficulty within 10%, median |
|---|---|---|---|
| 0.5% | 26 min | 44 min | 4.4 h |
| 1% | 22 min | 41 min | 4.1 h |
| 5% | 11 min | 26 min | 3.9 h |
| 10% | 8 min | 21 min | 3.3 h |
| 30% | 4 min | 16 min | 1.7 h |
Expect uneven block times in the first hours. On the testnet, difficulty rose about sevenfold after an early burst of fast blocks and then settled toward the 194-second target.
Mining before the fork
A fork that asks miners to switch software at an unannounced moment, hours after the height is published, starts with almost no hashrate. So Classic software is meant to be run early.
Before H, a Classic node keeps connections to ordinary upstream nodes as well as to other Classic nodes. It receives upstream's blocks, and it relays the blocks its own miners find out to the upstream network. Those are ordinary Pearl blocks with ordinary Pearl rewards. At block H−1 the node closes its upstream connections and continues on Pearl Classic.
On the public testnet, 104 of the 259 blocks before the fork were mined through Classic nodes and accepted on the upstream chain, their rewards matured there, and the split at H was clean. This has been shown on a test network with CPU miners. It has not been shown on mainnet.
This only works with a node build that includes the relay, and only while the node has upstream peers. More on the mining page.
If upstream moves H
An armed node can be restarted with a new height. If it had already stored Classic blocks past the new fork point, it rolls back to the new H−1 and validates again from there. This was tested on a local network (260 to 254) and live on the public testnet (360 to 260). A node armed with a height different from its peers' is disconnected by them after 60 seconds.