Blockchain · Retrospective
Scheduling the last block reward: a hard fork at height 1,212,121

In March, the Trivechain 3.0 plan said the current chain would continue as Trivechain Legacy with a block reward of zero. At the very end of the month, as April turned into May, I wrote that into the node software and published it as Trivechain Core v3.0.0.0, with builds for Linux and Windows. In the release notes I wrote that it would most probably be the last release of Trivechain Core, because the chain is becoming legacy and TRVC is moving to Binance Smart Chain. The change that matters fits in a few lines.
The change itself
The commit Upgrade to T3 making trivechain-core legacy adds one consensus parameter, the T3 height, and two checks against it:
- the block subsidy function returns zero once the chain is past that height;
- the masternode payment function returns zero past it as well.
In our code the governance budget is carved out of the block subsidy, so the first check ends the miner's share and the treasury's share together, and the second makes the masternode side explicit. A second commit, Allow the fork to happen at 1212121 for mainnet, sets the mainnet value.
One detail deserves a slow read. The subsidy function is given the height of the previous block, not the block being made. A comment in the code we inherited points this out, because it differs from Bitcoin's convention. When an announcement names a height, the sentence has to be checked against the comparison in the code, not against the convention the reader is used to.
Why a height and not a date
A reward cut could, in principle, be tied to a time. A height is safer because every node computes it the same way. Block 1,212,121 is block 1,212,121 on every machine that follows the chain. A block's timestamp is set by its miner, within limits the protocol allows, so a time-based switch invites arguments about which block was first past the line.
The number is a small piece of design too. Pools, masternode operators, exchanges and explorers all have to act on the same figure, and a height that is easy to read aloud and hard to mistype helps when that many groups need to agree on it.
Who has to act
A hard fork changes what counts as a valid block, so it only works if the people producing and checking blocks run the new rules. The release also raises the protocol version to 70300 and makes that the minimum for peers, so upgraded nodes disconnect from older ones rather than quietly disagreeing with them.
For each group, that means something different:
- Mining pools must run the release. A pool on old software would keep paying itself a reward that upgraded nodes reject, and it would end up mining alone.
- Masternode operators must upgrade to stay connected, knowing the payment ends at the fork.
- Exchanges must upgrade the nodes they credit deposits from, so that the deposits they see are on the chain everyone else follows.
- Explorers and services that read the chain need the release too, or they will show a chain nobody else is on.
A second consensus change
On 18 April I also added two more outputs to a short list that has been part of the consensus rules since the 2.0 fork. Any transaction that tries to spend an output on that list is rejected as invalid. It is a stronger kind of burn than sending coins to an address nobody controls: the output stays visible in the chain's history, and the rule that it can never be spent is enforced by every node running the release.
What "legacy" means for a node
"Legacy" in the commit title is not a shutdown. After the fork, nodes still validate transactions, miners can still produce blocks, and the full history stays readable. What changes is that no new TRVC are created, so whoever keeps mining is paid only in transaction fees.
That has a security consequence I take seriously. With no subsidy there is less reason to point hashpower at the chain, and a chain with less hashpower is cheaper to reorganise. Anything that reads the legacy chain to make decisions, including the migration the 3.0 plan describes, has to allow for that: deeper confirmations before trusting a payment, and care about which history a node treats as settled.
The other half of the plan, TRVC's token contract on Binance Smart Chain, is still ahead of us. The release and the height are this month's share of the work.