Bitcoin has a block time of 600 seconds (10 minutes).
Halving Interval
The internals of Bitcoin uses the concept of blocks, not calendar years or timestamps.
The halving interval of Bitcoin is actually defined as every 210,000 blocks.
210,000 blocks of 600 seconds gives us exactly 126,000,000 seconds per halving.
The number of seconds in a year is 60*60*24*365=31,536,000. Multiplying by four gives 126,144,000 seconds
in four years, ignoring leap years and leap seconds.
Bitcoin Halving is 3.9954 yrs
Dividing 126,144,000 by 31,536,000 seconds gives us the exact value of the Bitcoin halving
interval, which is 3.9954 years! That is about 1.6 days shorter than 4 years, so you don't have
to wait as long for the next one 😃
Leap Years
Leap years add an extra 86400 seconds, making the deviation larger, not smaller.
Leap Seconds
Leap seconds can add or subtract a second, which is manually decided upon by international scientists. This is why blockchains use blocks and not wall clock time. Global synchronized time is an illusion. A useful illusion.
# Bitcoin Halving Is Not Every Four Years!
It's close, but not exactly! Let's discover why.
## Block Time
Bitcoin has a block time of 600 seconds (10 minutes).
## Halving Interval
The internals of Bitcoin uses the concept of blocks, not calendar years or timestamps.
The halving interval of Bitcoin is actually defined as every 210,000 blocks.
210,000 blocks of 600 seconds gives us exactly 126,000,000 seconds per halving.
This is called `nSubsidyHalvingInterval` on line 66 of [src/chainparams.cpp](https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L66)
```
consensus.nSubsidyHalvingInterval = 210000;
```
## Seconds in a year
The number of seconds in a year is `60*60*24*365=31,536,000`. Multiplying by four gives `126,144,000` seconds
in four years, ignoring leap years and leap seconds.
## Bitcoin Halving is 3.9954 yrs
Dividing `126,144,000` by `31,536,000` seconds gives us the exact value of the Bitcoin halving
interval, which is *3.9954* years! That is about 1.6 days shorter than 4 years, so you don't have
to wait as long for the next one :smiley:
## Leap Years
Leap years add an extra 86400 seconds, making the deviation larger, not smaller.
## Leap Seconds
Leap seconds can add or subtract a second, which is manually decided upon by international scientists. This is why blockchains use blocks and not wall clock time. Global synchronized time is an illusion. A useful illusion.
Bitcoin Halving Is Not Every Four Years!
It's close, but not exactly! Let's discover why.
Block Time
Bitcoin has a block time of 600 seconds (10 minutes).
Halving Interval
The internals of Bitcoin uses the concept of blocks, not calendar years or timestamps.
The halving interval of Bitcoin is actually defined as every 210,000 blocks.
210,000 blocks of 600 seconds gives us exactly 126,000,000 seconds per halving.
This is called
nSubsidyHalvingInterval
on line 66 of src/chainparams.cppSeconds in a year
The number of seconds in a year is
60*60*24*365=31,536,000
. Multiplying by four gives126,144,000
secondsin four years, ignoring leap years and leap seconds.
Bitcoin Halving is 3.9954 yrs
Dividing
126,144,000
by31,536,000
seconds gives us the exact value of the Bitcoin halvinginterval, which is 3.9954 years! That is about 1.6 days shorter than 4 years, so you don't have
to wait as long for the next one 😃
Leap Years
Leap years add an extra 86400 seconds, making the deviation larger, not smaller.
Leap Seconds
Leap seconds can add or subtract a second, which is manually decided upon by international scientists. This is why blockchains use blocks and not wall clock time. Global synchronized time is an illusion. A useful illusion.