Ethereum Networking Layer

tags: Ethereum source: https://ethereum.org/en/developers/docs/networking-layer/

June 14, 2023 · 1 min · Gray King

Ethereum Discovery Nodes

tags: Ethereum Networking, Ethereum Simulator Node Boot nodes Using a small set that hardcoded bootnodes to bootstrap. Protocol Kademlia a modified form of Distributed Hash Table. Steps to join the network start client –> connect to bootnode –> bond to bootnode –> find neighbours –> bond to neighbours

June 14, 2023 · 1 min · Gray King

How is a Transaction Broadcasted

tags: Ethereum Simulator Node, Ethereum Execution Layer Node Side: Receive pending transactions If we want to broadcast our transactions to the network in Ethereum, two RPC calls are involved: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction So let’s follow those two calls to track how a transaction is broadcasted. Those two corresponding implementations are defined at internal/ethapi/api.go: SendTransaction SendRawTransaction And both of them are pointing to SubmitTransaction, which calls SendTx to put transaction into the txpool by calling: func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error { return b.eth.txPool.AddLocal(signedTx) } Miner Side: Execute pending transactions Miner start here at cmd/geth/main.go, which is calling: ...

June 12, 2023 · 2 min · Gray King

Ethereum Simulator Node

tags: Ethereum Simulator Only use the data of the mainnet to simulate transaction, and DONOT commit the final transaction to the mainnet. Relay To identify our transactions that need to simulate, if it’s failed then drop that tx, otherwise commit the final transaction to the mainnet. Things need to consider: How to limit or identify transactions that need to simulate? Only execute the transactions from local txpool. Where to execute the transction previously? ...

June 12, 2023 · 1 min · Gray King

How to Write a Technical Article

tags: Essay Writing Guide List outlines Explore the resources and documentation to understand Taking notes during the exploring Use the method of How to Take Smart Notes

June 8, 2023 · 1 min · Gray King