Ethereum Asked by AlwaysQuestioning on December 11, 2021
Say I am a miner, and my genesis block on the mainnet has configuration X. A transaction comes in for me to mine. How does my Ethereum client confirm that transaction adheres to all the standards set in my genesis block?
It’s my understanding that the genesis block of the transaction sender and that of the miner have to be identical for the transaction to be validated. How can I tell just from the transaction what the genesis block of the sender is? A technical explanation of this entire protocol would be excellent.
The genesis blocks of sender and miner do not need to be identical per se, as long as the transaction is valid, the address has enough ether, the nonce is one more than the last outgoing transaction, the chainId matches, and there is enough gas allocated for execution.
Unless the transaction fits the rules of one genesis block and not the other, it will work. The transaction itself does not reference the genesis block. The reason for the chainId and nonce is expressly to discourage these kinds of situations from being used maliciously in replay attacks. However, if you are able to coordinate getting all of these variables to match in the first place, you are not an attacker and have nothing to gain.
Also, note that if the sender and miner had different genesis blocks, they would be on different blockchains entirely. The miner would check if the sender has enough balance based off its known state, not off the sender's known state. Such transactions will be valid if they just so happen to match.
Answered by Expectator on December 11, 2021
first you do not mine transaction but blocks that are block of transactions.
I believe from your question that there is confusion about three distinct concepts:
The Genesis Block defines rules for initializing the network itself. For example looking at
https://github.com/ethereum/go-ethereum/wiki/Private-network
we see parameters like the following:
and here is how the geth client parses and knows about those parameters: https://github.com/ethereum/go-ethereum/blob/master/params/config.go
Answered by salanfe on December 11, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP