How Ethereum transaction goes through

김민겸·2024년 9월 2일

A user initiates a transaction in their wallet (e.g., sending ETH, interacting with a smart contract).
The wallet software creates the transaction data and signs it with the user's private key.
Broadcasting to the Network:

The signed transaction is broadcast to the Ethereum network through the execution layer's peer-to-peer (P2P) network.
This uses the DevP2P stack, which sits on top of TCP and enables nodes to exchange information.
Transaction Gossip:

Execution clients (formerly known as Ethereum clients) gossip transactions over the execution-layer P2P network.
This involves encrypted communication between authenticated peers.
When a node receives a new transaction, it verifies the transaction and then propagates it to its peers.
Transaction Pool:

Valid transactions are added to the node's local transaction pool (also known as the mempool).
Transactions in the pool are candidates for inclusion in future blocks.
Block Proposal:

When a validator is selected to propose a block (in the Proof-of-Stake system):
Transactions from the node's local transaction pool are passed to the consensus client via a local RPC connection.
The consensus client packages these transactions into Beacon blocks.
Block Gossip:

Consensus clients then gossip Beacon blocks across their own P2P network.
This is separate from the execution layer's P2P network and is specifically for block propagation.
Block Validation and Addition:

Other nodes in the network receive the proposed block.
They validate the block and its transactions.
If the block is valid, nodes add it to their local copy of the blockchain.
Consensus:

Through the consensus mechanism (Proof-of-Stake for Ethereum's current mainnet), the network agrees on the canonical chain.
Once a block gains enough attestations and is finalized, the transactions within it are considered confirmed on the blockchain.

profile
pokermaster

1개의 댓글

comment-user-thumbnail
2024년 9월 6일

영어로 쓰면 뭐 되는줄아냐 한국어로해라.

답글 달기