Architecture

This document describes the technical architecture of the TALER blockchain, covering consensus mechanics, economic model, network protocol, and storage internals. All details are derived from the Taler source code.

Overview

TALER is a Bitcoin Core-based blockchain that implements a hybrid Proof-of-Work / Proof-of-Stake consensus model. Both PoW and PoS blocks coexist on the same chain, each governed by independent difficulty targets and block spacing rules.

  • Genesis date: September 13, 2017
  • Codebase lineage: Bitcoin Core (UTXO model, script system, peer protocol)
  • Block types: PoW blocks and PoS blocks interleaved on one chain

Consensus Mechanism

The chain accepts both PoW-mined and PoS-minted blocks. Each block type has its own difficulty track, spacing target, and reward schedule. A block is valid if it satisfies either the PoW or PoS validation rules — the chain does not require alternation or any fixed ratio between the two types.

PropertyPoWPoS
Target block spacing60 seconds140 seconds
Difficulty adjustmentDark Gravity WaveIndependent PoS target
ActivationGenesis (block 0)Block 130,000

The chain tracks two height counters:

  • nHeight — total block count (PoW + PoS)
  • nPowHeight — PoW blocks only (used for subsidy halvings and PoW difficulty)

Proof-of-Work

Mining Algorithm

  • Blocks 0–9,999: Scrypt (original launch algorithm)
  • Blocks 10,000+: Lyra2Z — a memory-hard, ASIC-resistant hashing algorithm

Difficulty Adjustment: Dark Gravity Wave

PoW difficulty is adjusted using the Dark Gravity Wave (DGW) algorithm, which recalculates difficulty based on a rolling window of recent PoW blocks:

VersionBlock RangeWindow Size
DGW v110,000–249,99924 PoW blocks
DGW v2250,000+120 PoW blocks

Key properties:

  • Adjustment is clamped to 3x bounds — difficulty cannot more than triple or drop below one-third per recalculation
  • Post-TLRHeight (block 130,000), PoW difficulty retargets every 10 PoW blocks
  • Only PoW blocks are considered in the DGW calculation (PoS blocks are excluded)

Proof-of-Stake

PoS was activated at block 130,000 (the TLRHeight fork). Staking allows coin holders to mint new blocks without mining hardware.

Staking Weight

The probability of minting a PoS block is proportional to a coin’s staking weight:

weight = min(age_in_days, 99) × min(value_in_TLR, 9999)
  • Minimum stake age: 2 days (coins must be unspent for at least 2 days)
  • Maximum weight age: 90 days (age contribution caps at 90 days, with a hard cap at 99 days in the formula)
  • Maximum value contribution: 9,999 TLR per UTXO

Stake Modifier

The stake modifier provides randomness to PoS block selection, preventing predictable staking:

  • Computed from a 64-block pseudo-random selection of prior block hashes
  • Recalculated every 6 hours (modifier interval)
  • Mixes entropy from both PoW and PoS blocks

PoS Kernel Validation

A PoS block is valid when the kernel hash (derived from the stake modifier, coin properties, and timestamp) falls below the PoS difficulty target — conceptually similar to PoW mining, but computed from coin ownership rather than computational work.

PoS Block Requirements

A valid PoS block must contain:

  1. A coinstake transaction at transaction index 1 (index 0 is always an empty coinbase)
  2. A block signature authenticating the block producer’s ownership of the staked coins

Block Structure

Header Format

Every block uses a standard 84-byte header:

FieldSizeDescription
nVersion4 bytesBlock version and feature flags
hashPrevBlock32 bytesHash of the previous block
hashMerkleRoot32 bytesMerkle root of all transactions
nTime4 bytesBlock timestamp (Unix epoch)
nBits4 bytesCompact difficulty target
nNonce4 bytesMining nonce (PoW) or 0 (PoS)

PoS Block Flags

PoS blocks carry additional metadata flags:

  • BLOCK_PROOF_OF_STAKE — identifies the block as PoS
  • BLOCK_STAKE_ENTROPY — indicates entropy contribution to stake modifier
  • BLOCK_STAKE_MODIFIER — indicates a new stake modifier was generated

Block Signature

PoS blocks include a cryptographic signature appended after the transaction data, proving that the block producer controls the private key of the staked coins. A new format flag is used for post-fork serialization to distinguish the extended block format.

Economic Model

Supply Parameters

ParameterValue
Maximum supply23,333,333 TLR
Smallest unit1 satoshi = 0.00000001 TLR (10⁻⁸)
Genesis block premine2,333,283 TLR
Halving intervalEvery 1,050,000 PoW blocks (~2.5 years)

Block Rewards

PeriodPoW RewardPoS RewardNotes
Pre-PoS (blocks 0–129,999)10 TLRPoW only, original reward
Post-PoS activation7 TLR3 TLRPoW reduced to 70%, PoS gets 30%
After 1st halving3.5 TLR1.5 TLR
After 2nd halving1.75 TLR0.75 TLR
After 3rd halving0.875 TLR0.375 TLR
After 4th halving (current)0.4375 TLR0.1875 TLRAs of March 2026
After 5th halving0.21875 TLR0.09375 TLRExpected December 2027

The PoS subsidy is always calculated as: PoS_reward = PoW_reward × 30 / 70

Current State (March 2026)

  • Halvings completed: 4
  • Current PoW subsidy: 0.4375 TLR
  • Current PoS subsidy: 0.1875 TLR
  • Circulating supply: ~19,491,107 TLR

Transaction Model

TALER uses the UTXO (Unspent Transaction Output) model inherited from Bitcoin:

  • SegWit support: Activated at height 32,256 (BIP141/143/144)
  • Max block weight: 4,000,000 weight units
  • Coinbase maturity: 20 blocks (newly mined coins cannot be spent for 20 blocks)
  • Transaction format: Standard Bitcoin transaction structure with witness data

Address Types

TypeFormatIdentifier
P2PKHBase58CheckPrefix byte 65 (addresses start with T)
P2SHBase58CheckPrefix byte 50
P2WPKH / P2WSHBech32HRP: tlr (e.g., tlr1q...)
Extended public keysBase58 (BIP32)Standard HD key derivation

Network Protocol

ParameterValue
Protocol version70020
Default P2P port23153
Message start bytes0x64 0xb1 0x73 0xd8
DNS seed nodes6

Service Flags

Nodes advertise capabilities via service flags:

  • NODE_NETWORK — full block history available
  • NODE_WITNESS — SegWit support
  • NODE_BLOOM — bloom filter support (BIP37)

Compact Block Relay

TALER supports BIP152 compact block relay for efficient block propagation, reducing bandwidth by transmitting short transaction IDs instead of full transaction data.

Fork History

HeightForkChange
0GenesisScrypt PoW, 50 TLR block reward
10,000Fork 1Lyra2Z algorithm, Dark Gravity Wave v1 (24-block window)
32,256BIP65, BIP66, CSV, SegWit activation
130,000Fork 2 (TLRHeight)PoS activation, PoW reward reduced to 7 TLR, 60s target blocks
250,000Fork 3DGW v2 (120-block window), independent PoW/PoS difficulty tracking

Storage Layer

TALER uses LevelDB for persistent storage:

DatabasePurpose
Block indexMaps block hashes to on-disk locations
Chainstate (UTXO set)Current set of unspent transaction outputs
Address index (optional)Maps addresses to transactions (for explorer functionality)

Block Data Files

  • blk?????.dat — raw block data, up to 128 MB per file
  • rev?????.dat — undo/revert data for block disconnection during reorgs

BIP Support

TALER implements the following Bitcoin Improvement Proposals:

BIPDescription
BIP34Block height in coinbase
BIP65OP_CHECKLOCKTIMEVERIFY
BIP66Strict DER signature encoding
BIP68Relative lock-time using sequence numbers
BIP112OP_CHECKSEQUENCEVERIFY
BIP113Median time-past for lock-time calculations
BIP141Segregated Witness (consensus layer)
BIP143Transaction signature verification for SegWit
BIP144Segregated Witness (peer services)
BIP147Dealing with dummy stack element malleability
BIP152Compact block relay
BIP173Bech32 address encoding

Coin Specifications Quick Reference

SpecificationValue
NameTALER (TLR)
TypeHybrid PoW/PoS
AlgorithmLyra2Z (memory-hard)
Genesis dateSeptember 13, 2017
Max supply23,333,333 TLR
Genesis premine2,333,283 TLR
Current PoW reward0.4375 TLR
Current PoS reward0.1875 TLR
PoW block target60 seconds
PoS block target140 seconds
Halving interval1,050,000 PoW blocks
Coinbase maturity20 blocks
Min stake age2 days
Max block weight4,000,000
Default port23153
Address prefixT (Base58), tlr (Bech32)
SegWitActive (since height 32,256)

Need More Help?

Can't find what you're looking for? Check our FAQ section or reach out to the community for help.