OxaPay 博客:洞察加密支付网关

How Blockchain Transactions Work

OxaPay Deep Insights Understand Blockchain
Transaction Construction & State Change

How Blockchain Transactions Work: From Creation to State Change

A system-level explanation of how wallets construct transactions, how signatures authorize them, how nodes validate and propagate them, and how accepted execution changes blockchain state.

Blockchain Foundations Merchants + Operators + Developers 18-minute read
System map
Intent Construction Signature Broadcast Validation Inclusion State Change
01 / Direct answer

A blockchain transaction is an authorized request to change network state

A blockchain transaction is not value moving through a hidden tunnel. It is structured data that asks a network to apply a specific change. The request may transfer a native coin, call a smart contract, move a token, create an asset, or update another part of the ledger.

A wallet first constructs the transaction. Required signers then authorize it with digital signatures. The signed data is broadcast to network peers, independently checked against protocol rules, and considered for inclusion in an accepted block or ordered batch.

Only accepted execution changes the shared state. Before that point, the transaction is a proposal. It may be visible, valid, and widely propagated while still producing no canonical change to balances, ownership, or contract storage.

Bitcoin documents transactions as structures that spend previous outputs and create new outputs. Ethereum describes transactions as cryptographically signed instructions initiated by accounts. Solana packages signatures and one or more instructions into a transaction. TON records a transaction when an account processes a message and changes its state. The structures differ, but the core pattern remains consistent.

Core model Transaction = proposed state change + authorization + protocol context. Network acceptance and execution determine whether that proposal becomes part of the shared ledger state.
Blockchain transaction lifecycle from wallet construction and signing through broadcast, validation, mempool, block inclusion, and confirmations
A transaction becomes increasingly meaningful as it moves from a locally signed request to a validated and accepted state transition. Visibility alone does not change the ledger.
02 / Intent and object

The user expresses an intent, but the wallet creates the transaction object

Users usually think in simple instructions: send 0.01 BTC, transfer 50 USDT, swap one token, or interact with a contract. A blockchain cannot process that human intention directly. The wallet or application must translate it into a precise transaction format understood by the selected network.

This translation is important because the visible instruction may hide several technical decisions. A Bitcoin wallet may select spendable outputs and calculate change. An Ethereum wallet assigns a nonce and estimates gas. Solana and TON wallets prepare their own required accounts, block references, and messages.

Human intent The outcome the user wants, such as paying an address or calling an application.
Transaction object The network-specific data structure that describes the requested change.
Authorization The proof that required keys approved the exact transaction data.
Execution result The state change produced when the accepted transaction is processed.

A transaction is therefore not merely a payment instruction. It is a machine-readable claim about what should change, who authorized it, which resources it may use, and which network rules must be satisfied.

03 / Transaction anatomy

Different networks use different fields, but every transaction needs enough context to be validated

There is no universal blockchain transaction format. Even so, most transactions contain the same core ideas. They identify usable resources, the requested result, required authorization, ordering or replay protection, and the execution cost accepted by the sender.

Component目的Common examples
Source resourcesIdentify what can be spent or which account initiates the request.Bitcoin inputs; Ethereum sender; Solana account list
Requested outcomeDescribe the transfer, instruction, or contract call.Outputs, recipient and value, program instructions, message body
Ordering protectionPrevent unintended replay or establish valid sequence.Outpoints, nonce, recent blockhash, sequence number
Resource limits and feesBound computation or compensate network processing.Fee rate, gas limit, priority fee, compute budget
SignaturesProve approval by required private keys without revealing them.ECDSA, Schnorr, Ed25519, contract-level verification

Bitcoin’s transaction guide explains how inputs reference previous outputs and how new outputs define future spending conditions. Ethereum’s transaction documentation describes fields such as recipient, value, data, nonce, gas limit, and fee parameters.

04 / Authorization

A digital signature authorizes exact transaction data; it does not move funds by itself

The wallet signs a representation of the transaction with one or more private keys. Network participants can verify the signature with the corresponding public key or spending condition. They can confirm that the required key approved the signed data without learning the private key.

This provides authorization, not personal identity. A valid signature proves control of a key required by the protocol. It does not prove who the human signer is. It also cannot confirm a commercial agreement or verify that the recipient is the intended business.

The signed scope also matters. Changing a protected amount, destination, instruction, or other committed field invalidates the signature. This is why an intermediary cannot normally edit a signed transfer and preserve the sender’s authorization.

Important distinction Signing proves approval of transaction data. Validation determines whether that authorized request is currently allowed. Inclusion and execution determine whether it changes state.
05 / Ledger models

UTXO and account-based networks describe spendable state in different ways

The transaction format follows the ledger model. Bitcoin uses an unspent transaction output, or UTXO, model. A transaction consumes specific previous outputs and creates new outputs. The network does not update one global Bitcoin account balance. Wallet software calculates a usable balance by finding outputs that its keys can spend.

Ethereum uses an account-based model. An externally owned account has a balance and nonce. Transactions are applied in nonce order, and execution can update balances, contract code, and contract storage. Ethereum’s account documentation explains how the nonce prevents the same signed transaction from being repeatedly executed.

Solana transactions identify the accounts an instruction reads or writes. Programs process the instruction and update writable accounts. A recent blockhash limits how long the transaction remains usable. The official Solana transaction overview describes signatures, instructions, account keys, and the recent blockhash.

TON is message-driven. An incoming message can trigger a transaction on one account, which may change its state and create outgoing messages for other accounts. TON’s messages and transactions overview makes this relationship explicit.

UTXO model Consume discrete spendable outputs and create new ones.
Account model Apply ordered changes to account balances, nonces, and storage.
Program-account model Execute instructions that read and write declared accounts.
Message-driven model Process messages per account and emit further messages as needed.
06 / Broadcast

Broadcast distributes a candidate transaction; it does not create network agreement

After signing, a wallet sends the serialized transaction to a node or service. That peer checks enough basic conditions to decide whether to accept and relay it. Other peers repeat the process, allowing the transaction to spread through the network.

Propagation is not instantaneous or perfectly uniform. Peers have different connections, software policies, resource limits, and local views. One explorer may show a pending transaction before another service sees it. Some nodes may reject a transaction that other nodes retain.

Bitcoin’s peer-to-peer network guide describes transaction exchange among full nodes. This explains why “broadcast” means the wallet has started network distribution, not that every participant has accepted one canonical result.

Network signal A transaction hash and first network sighting show that a candidate exists. They do not prove block inclusion, successful execution, confirmation, finality, or business payment completion.
07 / Validation

Nodes evaluate both the transaction data and the state against which it would execute

Signature verification is only one validation step. A node also checks serialization, field values, referenced resources, and ordering requirements. It then tests the request against its current ledger view.

For Bitcoin, the referenced outputs must exist and remain unspent. Unlocking data must satisfy the outputs’ spending conditions. Input value must cover output value and the implied fee. A transaction that tries to spend an already consumed output is invalid against that chain state.

For Ethereum, the signature must recover the sender. The nonce must satisfy account ordering, and execution requires the next valid sequence. The sender must fund the value and maximum execution cost. The transaction must also satisfy the active transaction-type rules. Contract execution performs further checks and may still revert.

Solana checks required signatures, the recent blockhash, account locks, instruction structure, fee availability, and runtime rules. TON validates the incoming message and executes the account through protocol-defined phases.

Candidate transaction ├─ structure valid? ├─ required signatures valid? ├─ inputs or account state available? ├─ sequence / nonce / blockhash acceptable? ├─ fees and resource limits sufficient? └─ requested operation allowed by protocol? │ ├─ no → reject or do not relay └─ yes → retain as a valid candidate for inclusion

Validation is contextual. A transaction can be valid when signed but become unusable before inclusion. Another transaction may spend the same Bitcoin output, an Ethereum transaction with a lower nonce may remain missing, or a Solana blockhash may expire.

08 / Pending state

A valid pending transaction is accepted locally, not recorded canonically

Many networks maintain local pools of transactions that have passed admission checks but are not yet included. “The mempool” is convenient language, but there is usually no single global pending pool. Each node maintains its own candidate set according to its view and policies.

Block producers choose from the transactions available to them. Capacity limits, fee incentives, transaction dependencies, account ordering, and execution constraints influence selection. A valid transaction may remain pending, be replaced, expire, or disappear from some local pools.

The OxaPay article Mempool Explained provides a focused operational explanation of why pending transactions compete and why inclusion timing changes. This article keeps the mempool at the lifecycle level because fee-market design and blockspace competition require their own deeper analysis.

Blockchain mempool infographic showing transaction creation, network broadcast, node validation, pending competition, block inclusion, and confirmations
Pending transactions compete for limited processing capacity. Being valid and visible does not guarantee immediate inclusion or a permanent change to network state.
09 / Inclusion

Block inclusion establishes an execution position inside an accepted history

A miner, validator, leader, or sequencer selects transactions and proposes an ordered block or batch. Other network participants verify the proposal according to the protocol. If accepted, the block becomes part of the current canonical history or an accepted candidate that can gain stronger commitment.

Ordering matters because transactions can depend on previous state. Two transactions may spend the same resource. Contract calls may produce different outcomes when executed in a different order. Account nonces require sequence. Solana account locks affect which operations can execute in parallel.

Inclusion therefore does more than attach a timestamp. It places the transaction into a specific state-transition sequence. The transaction is evaluated after all earlier operations in that sequence and before all later operations.

Ordering effect The same signed request can have a different outcome, or no valid outcome, if the state has changed before its execution position is reached.
10 / Execution

Execution transforms pre-state into post-state according to deterministic rules

Once the transaction reaches its position, the network applies the relevant rules. Conceptually, execution can be expressed as a state transition function:

post_state = transition(pre_state, ordered_transaction, protocol_rules)

In Bitcoin, successful validation removes the consumed outputs from the UTXO set and adds the new outputs. In Ethereum, successful execution can adjust balances, increment the sender nonce, deploy contracts, modify contract storage, and emit logs. The Ethereum execution-spec test model explicitly compares a pre-execution state with the expected post-execution state.

On Solana, each instruction invokes a program with declared accounts. The runtime applies account changes atomically: the transaction succeeds as a unit or its state changes are rolled back. On TON, processing a message can modify one account and emit outgoing messages that later trigger transactions on other accounts.

A token transfer illustrates why transaction and value movement are not identical concepts. On many smart-contract networks, the native transaction calls a token contract. The contract then updates balances stored in its own state and may emit a transfer event. The token does not move as a separate object between two addresses.

Receipts, logs, events, and traces provide evidence about execution, but they are not all the same as state. Logs can help applications identify token transfers or contract activity. A system must still understand which output represents the authoritative state change it needs.

11 / Failure paths

Invalid, dropped, replaced, expired, and reverted transactions fail at different layers

“Failed transaction” is too broad for reliable analysis. A malformed or unauthorized transaction may be rejected before propagation. A valid transaction may remain pending because it is not selected. A competing transaction may replace it. A time-sensitive transaction may expire. A contract call may be included but revert during execution.

OutcomeWhat happenedState effect
RejectedThe transaction failed admission or consensus rules.No canonical state change
Pending or droppedIt remained a candidate but was not included or retained.No canonical state change
Replaced or conflictedAnother transaction consumed the resource or sequence position.Only the accepted alternative changes state
Included and successfulExecution completed under protocol rules.Requested post-state is committed
Included but revertedExecution began but the requested contract operation failed.Application changes revert; network-level costs or sequence changes may remain

This distinction is essential when reading explorers. An included Ethereum transaction can show a failed execution status and still consume gas. A Bitcoin transaction absent from the accepted chain may later reappear if it remains valid and is rebroadcast. A Solana transaction can expire when its recent blockhash is no longer usable.

Crypto transaction state infographic showing pending, detected, confirming, completed, failed, and expired transaction conditions
User interfaces often compress several technical conditions into a small set of labels. Reliable systems should preserve the difference between network observation, inclusion, execution, and operational acceptance.
12 / Identifiers

A transaction hash identifies data; it does not explain the transaction’s full meaning

A transaction identifier is normally derived from serialized transaction data. It lets nodes, explorers, wallets, and applications refer to a specific transaction without repeating the full payload. The exact hashing and identifier rules vary by network.

The OxaPay guide to a crypto transaction ID explains how merchants use TXIDs for verification and support. A 区块链浏览器 can display addresses, amounts, fees, block position, execution status, and confirmations.

However, a hash does not tell a business whether the transaction matches an order. It does not know the expected asset, correct network, invoice amount, expiration window, customer identity, or fulfillment policy. It is a network reference, not a complete commercial record.

Reference boundary Transaction identifiers answer “which network object?” Business systems must still answer “which payment, order, customer, obligation, and accounting event?”
13 / Network differences

The lifecycle is shared, but transaction semantics and guarantees are chain-specific

Every network moves from a proposed operation toward accepted state, but the machinery differs. Bitcoin transactions focus on spending outputs. Ethereum transactions can transfer ETH or invoke contracts. Solana transactions bundle instructions over explicitly listed accounts. TON uses messages and per-account transaction processing.

These differences affect fee calculation, transaction size, ordering, parallel execution, expiration, token detection, and the meaning of a successful result. They also affect how payment infrastructure reads transaction data. An ERC-20 payment is recognized through contract execution and logs. A native Bitcoin payment is identified through outputs. A TON jetton transfer may involve a trace of messages across contracts.

Asset names alone are therefore insufficient. A business must know both the asset and the network. OxaPay’s supported currencies documentation exposes currencies together with their network details. This reflects a practical truth: the same token symbol can require different transaction interpretation on different networks.

Blockchain network comparison infographic showing different transaction timing, finality styles, confirmation behavior, and merchant implications
Networks share a broad lifecycle but differ in transaction structure, block production, execution, capacity, and finality. Transaction handling must follow the actual network model.
14 / Payment context

A blockchain transaction is only one record inside a complete payment system

A payment request starts with commercial context: an order, amount, asset choice, network, destination, lifetime, and business reference. The blockchain transaction records what the payer actually submitted. A payment system compares the expected context with the observed transaction.

OxaPay 的 Payment Information endpoint illustrates this separation. A payment record can include a tracking identifier, order context, and an overall payment status. Transaction-level data may include the hash, amount, currency, network, address, status, and confirmations.

The network transaction and payment status are related but not interchangeable. OxaPay’s payment status table includes business states such as waiting, paying, paid, underpaid, refunding, refunded, and expired. A blockchain does not create these commercial meanings by itself.

Commercial request order + expected amount + asset + network + time window │ ▼ Blockchain transaction hash + inputs/accounts + instructions + signature + execution result │ ▼ Payment interpretation match + confirmation policy + exception rules + business status

This is why transaction knowledge matters to merchants even when a gateway handles the protocol details. It helps teams distinguish network evidence from payment completion and diagnose wrong networks, incorrect amounts, delayed inclusion, failed execution, and unmatched transfers.

15 / Mental model

Use a seven-step model to understand any blockchain transaction

1
IntentThe user or application defines the desired outcome.
2
ConstructionThe wallet converts that intent into a network-specific transaction object.
3
AuthorizationRequired keys sign the exact data or spending conditions.
4
PropagationPeers receive, check, and relay the candidate transaction.
5
Admission and selectionValid candidates wait under local policy, capacity, ordering, and fee constraints.
6
Inclusion and executionThe transaction receives an ordered position and is applied to pre-state.
7
Accepted stateThe resulting change becomes part of the network history and gains commitment over time.

Many users treat “sent” as equivalent to “state changed.” This model prevents that mistake. The transaction must pass construction, authorization, validation, ordering, and execution before the ledger reflects its result.

Final takeaway A blockchain transaction is best understood as a state-transition request moving through a distributed verification system. The wallet proposes and authorizes. The network validates, orders, executes, and records.
16 / Primary references

Protocol documentation used for this analysis