2026-02-21 00:39:41 +00:00
|
|
|
// Copyright (c) 2017-2026 Lethean (https://lt.hn)
|
|
|
|
|
//
|
|
|
|
|
// Licensed under the European Union Public Licence (EUPL) version 1.2.
|
|
|
|
|
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
|
|
|
|
|
// Package consensus implements Lethean blockchain validation rules.
|
|
|
|
|
//
|
|
|
|
|
// Validation is organised in three layers:
|
|
|
|
|
//
|
|
|
|
|
// - Structural: transaction size, input/output counts, key image
|
|
|
|
|
// uniqueness. No cryptographic operations required.
|
|
|
|
|
// - Economic: block reward calculation, fee extraction, balance
|
|
|
|
|
// checks, overflow detection.
|
|
|
|
|
// - Cryptographic: PoW hash verification (RandomX via CGo),
|
|
|
|
|
// ring signature verification, proof verification.
|
|
|
|
|
//
|
2026-04-05 08:46:54 +01:00
|
|
|
// All validation functions take a hardfork schedule ([]config.HardFork)
|
|
|
|
|
// and a block height for hardfork-aware gating. The package has no
|
|
|
|
|
// dependency on chain/ or any storage layer.
|
2026-02-21 00:39:41 +00:00
|
|
|
package consensus
|