Meaning
Compliance with protocol rules determines the eligibility of a transaction for permanent inclusion in a ledger. A transaction validity check ensures that a sender has a sufficient balance, a correct signature, a valid timestamp and the proper sequence number before their instruction is executed. It governs the entry of new data into the system and stops applying if the underlying state changes in a way that makes the instruction impossible.
Syntax Check
Formatting is the first hurdle any instruction must clear to be considered for processing. The system examines the structure of the data to ensure it matches the expected schema and contains no malformed fields. This stage requires minimal resources but prevents the majority of low-level errors from reaching the more expensive parts of the system.
A failed check at this level results in immediate rejection without any change to the ledger.
Balance Verification
Ownership must be proven before any asset can be moved or traded. The system queries the current state to confirm that the account initiating the transaction holds enough value to cover the transfer and any associated fees. This check is the primary defense against double-spending and unauthorized inflation of the currency.
The cost of this verification is the time required to read from the state database for every transaction in a block.
Rejection Logic
Rules define not just what is allowed but what must be ignored. If an instruction fails any of the checks, it is treated as if it never existed, preserving the integrity of the record.