Replay protection
From the 1st Chronicles upgrade (21 June 2027), every signature is hashed with the fork value 0xffdead. What changes for holders, node operators, wallet developers, exchanges and anyone holding presigned transactions.
At the 1st Chronicles upgrade, Lotus switches on replay protection. From then on, every transaction signature must be hashed with the fork value 0xffdead, not 0. Lotus then refuses a signature made the old way, and a chain that kept the old rules refuses a Lotus signature. A payment made on one chain can no longer be copied onto the other.
Activation on mainnet: median time past 1813587000, which is 21 June 2027, 14:10:00 UTC. It is not part of Napoleon (21 December 2026). On testnet and on the Napoleon testnet it activates 21 days earlier: median time past 1811772600, 31 May 2027, 14:10:00 UTC.
What changes #
| Before | From 1st Chronicles | |
|---|---|---|
| Fork value in the signature hash | 0 | 0xffdead (16768685) |
| Signature on the wire | unchanged: the sighash byte is still 0x41 or 0x61 | unchanged |
A signature made with 0 | valid | refused: mandatory-script-verify-flag-failed |
A signature made with 0xffdead | refused | valid |
| Coins, addresses, keys, Taproot | unchanged | unchanged |
| Coinbase transactions (mining, pool payouts) | no signature | unchanged |
The fork value is the upper 24 bits of the 32-bit sighash type in the preimage (see Signature hash). It never appears in the transaction itself.
When it activates #
The switch follows the chain, not the clock. The block after the tip uses replay protection when the tip's median time past (the median of the last 11 block times) is 1813587000 or more. The median runs about 10 to 15 minutes behind the clock, so the first protected block comes shortly after 14:10 UTC.
The node reports the rule for the next block in /api/v1/chain:
curl -s http://127.0.0.1:10604/api/v1/chainconst r = await fetch('http://127.0.0.1:10604/api/v1/chain?fresh=' + Date.now());
const { median_time, replay_protection } = await r.json();
console.log(replay_protection.fork_value, replay_protection.activation_time - median_time);{
"chain": "main",
"median_time": 1794909500,
"replay_protection": {
"activation_time": 1813587000,
"active": false,
"fork_value": 0
}
}fork_value is the value a signature needs now to enter the next block: 0 before, 16768685 after. /api/v1/upgrades lists the upgrade as firstChronicles. The node wallet shows the same under replay_protection in getwalletinfo.
Holders #
If your wallet is the browser wallet or the node wallet of lotusd 12.4.11 or later, you have nothing to do. Both sign with the right value and switch on their own.
A payment you send in the last minutes before the activation may be dropped by the network if it is not mined in time. The node wallet signs it again on its own and sends it again, with the same transaction id. The browser wallet signs again if the network refuses the payment. If a payment sent around 14:10 UTC on 21 June 2027 does not show up, send it again.
Until 1st Chronicles, replay protection does not exist. From Napoleon (21 December 2026), Lotus and nodes of the givelotus 11.6 line follow different chains, but both accept signatures made with 0. A payment of coins received before Napoleon can be copied onto the other chain until 21 June 2027. To keep your coins apart, spend them together with a coin that exists only on this chain, for example a coin received after 21 December 2026. Once spent this way, the payment is invalid on the other chain.
Node operators #
Every lotusd since 12.0.0 enforces the rule at that time. Upgrade anyway: the node wallet signs correctly only from 12.4.11.
At the activation block, the node drops from its mempool every transaction signed the old way. Its own wallet signs its transactions again, with the same transaction ids, and relays them. A peer that relays a transaction signed for the other side of the switch within a day of it is not banned. On a reorganisation back across the activation block, all of this runs in reverse.
Wallet and application developers #
Sign for the next block, with the value the node reports. Never use the clock.
- Right before signing, ask
/api/v1/chain(bypass every cache) and usereplay_protection.fork_value. If the field is missing (a node older than 12.4.11), comparemedian_timewith the activation time of the network. - Put the fork value in the upper 24 bits of the sighash type you hash:
(fork_value << 8) | sighash_byte. The signature still ends with the one-byte type. - If a broadcast is refused with
mandatory-script-verify-flag-failed, ask again, and if the value changed, sign the same inputs again and broadcast once more. Do not loop. - Near the switch (median time past within about one hour of the activation), tell the user that a payment may be dropped and has to be signed again, or wait until the switch has passed. Unattended payers (bots, bridges, payout scripts) should wait.
- Read the value again after a reorganisation. Do not keep it in memory.
With xpi-ts:
const info = await (await fetch(node + '/api/v1/chain?fresh=' + Date.now())).json();
tx.setSighashForkValue(info.replay_protection.fork_value).sign(privateKey);With the node, over JSON-RPC:
| Command | Fork value |
|---|---|
sendtoaddress, sendmany, send, walletprocesspsbt, signrawtransactionwithwallet | the next block's, set by the node |
signrawtransactionwithkey hex keys prevtxs sighashtype forkid | forkid = auto (default), 0 or 0xffdead |
finalizepsbt, analyzepsbt | the next block's: a signature for the other side is reported as missing |
Offline, lotus-tx takes the fork value after the sighash type: sign=ALL|FORKID:0xffdead.
On regtest, -replayprotectionactivationtime=<time> moves the activation, so you can test both sides of the switch.
Presigned and time-locked transactions #
A transaction signed today and broadcast after the activation must be signed with 0xffdead, or it will never be valid.
- Locked to a time (
nLockTimeof 500000000 or more, at least one input with a sequence below0xffffffff): from 12.4.17, the node wallet,signrawtransactionwithkey forkid=autoand the PSBT commands sign with0xffdeadwhen the lock time is 1813586999 or later. Such a transaction can only be mined after the activation. - Locked to a height: a height cannot be converted to a median time in advance. Sign with an explicit
forkid, or sign again after the activation. - Signed and kept offline without a lock (escrow, inheritance, payment channels): anything signed with
0and not broadcast before the activation must be signed again.
Hardware and offline signers #
No Lotus hardware wallet is known to set the fork value. Sign offline with signrawtransactionwithkey … forkid 0xffdead, lotus-tx with :0xffdead, or xpi-ts setSighashForkValue(0xffdead).
Exchanges and services #
- Upgrade every node you sign with to 12.4.11 or later before 21 June 2027.
- If you sign outside the node, apply the rules for developers above, and test them on regtest with
-replayprotectionactivationtime. - After the activation, watch for refused withdrawals:
mandatory-script-verify-flag-failedmeans a signer still uses0. - Between Napoleon and 1st Chronicles, keep coins apart before you credit deposits that may also exist on the other chain (see the warning under Holders).
Testnets #
| Network | Flag | Replay protection active |
|---|---|---|
| Testnet | -testnet | median time past 1811772600 (31 May 2027, 14:10:00 UTC) |
| Napoleon testnet | -napoleontestnet | median time past 1811772600, fixed in the code (overrides are refused) |
| Regtest | -regtest | the mainnet time; -replayprotectionactivationtime overrides it |
The full schedule is in Network upgrades.
