diff --git a/docs/wiki/EL/el-architecture.md b/docs/wiki/EL/el-architecture.md index 4e927403..9caec06a 100644 --- a/docs/wiki/EL/el-architecture.md +++ b/docs/wiki/EL/el-architecture.md @@ -158,12 +158,12 @@ TODO ### Internal Consensus engines -The execution layer has its own consensus engine to work with its own copy of the beacon chain. The execution layer consensus engine is known as eth1 and has about half the functionality of the full fledged consensus engine of the consensus layer. +The execution layer has its own consensus engine to work with its own copy of the beacon chain. The execution layer consensus engine is known as ethone and has about half the functionality of the full fledged consensus engine of the consensus layer. | Function | Beacon (Proof-of-stake) | Clique (Proof-of-authority) | Ethash (Proof-of-work) | | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -| **Author**: Eth address of the block minter | If the header is classified as a Proof of Stake (PoS) header, with a header difficulty set to 0, we will retrieve the header's coinbase. Otherwise, we will forward the header to the beacon's eth1 engine (either clique or ethash) for further processing. | Obtains the account address that created the block. The process of recovering the public key from the header's extraData is performed by ecrerecover. | | -| **Verify Header(s)**: Processes a batch of headers and validates them according to the rules of the current consensus engine. : | Split the headers based on [Terminal Total difficulty](https://eips.ethereum.org/EIPS/eip-3675#definitions) into pre and post TTD batches . Verify the pre batches with the eth1 engine and the post by beacon's verify header. | | | +| **Author**: Eth address of the block minter | If the header is classified as a Proof of Stake (PoS) header, with a header difficulty set to 0, we will retrieve the header's coinbase. Otherwise, we will forward the header to the beacon's ethone engine (either clique or ethash) for further processing. | Obtains the account address that created the block. The process of recovering the public key from the header's extraData is performed by ecrerecover. | | +| **Verify Header(s)**: Processes a batch of headers and validates them according to the rules of the current consensus engine. : | Split the headers based on [Terminal Total difficulty](https://eips.ethereum.org/EIPS/eip-3675#definitions) into pre and post TTD batches . Verify the pre batches with the ethone engine and the post by beacon's verify header. | | | | | Here we perform block header verification similar to the one in the [execution layer Specs](wiki/EL/el-specs?id=block-header-validation) wiki page and covered below in the client code table. | We verify the time of the header is not greater than system time. | | | | | If it is a checkpoint block (1'st slot of an epoch), then ensure it has no beneficiary. | | | | | The header nonce can take on two values: 0x00..0, which indicates a vote to add a signer, or 0xff..f, which indicates a vote to drop a signer. However, at checkpoints, we can only vote to drop a signer. | | @@ -172,14 +172,14 @@ The execution layer has its own consensus engine to work with its own copy of th | | | Retrieve the snapshot | | | | | On checkpoint blocks verify the signers in the snapshot against the extraData | | | | | Invoke the verify Seal function to determine whether all the criteria for the signature included in the header have been satisfied. The recovery process involves extracting information from the header and the list of recent signers in the Clique object. We then verify whether the signer is included in the snapshot. | | | -| **Verify Uncles** | If the Header is a Proof-of-stake header, check that the length of uncles is 0. If the header is not Proof-of-stake, the process of verifying uncles is done via the eth1 engine. | In Clique no uncles should be present | | -| **Prepare**: Initializes the consensus fields of a block's header. | If TTD is reached we set the header's difficulty to beacon's difficulty of 0, else we call eth1's prepare | Create the voting snapshot by supplying the parent hash and number.During the reverse iteration process, we start from the block number and proceed backwards. We stop the iteration if we reach the genesis block, if we are using a light client that doesn't store parent blocks, if we reach an epoch by traversing backwards, or if the headers traversed exceed the soft Finality value (indicating that the segment is considered immutable). At the checkpoint where we stop the iteration, we create a snapshot. | | +| **Verify Uncles** | If the Header is a Proof-of-stake header, check that the length of uncles is 0. If the header is not Proof-of-stake, the process of verifying uncles is done via the ethone engine. | In Clique no uncles should be present | | +| **Prepare**: Initializes the consensus fields of a block's header. | If TTD is reached we set the header's difficulty to beacon's difficulty of 0, else we call ethone's prepare | Create the voting snapshot by supplying the parent hash and number.During the reverse iteration process, we start from the block number and proceed backwards. We stop the iteration if we reach the genesis block, if we are using a light client that doesn't store parent blocks, if we reach an epoch by traversing backwards, or if the headers traversed exceed the soft Finality value (indicating that the segment is considered immutable). At the checkpoint where we stop the iteration, we create a snapshot. | | | | | If we are at the end of an epoch, we will go through the addresses in the proposals field of the snap object and choose one randomly as the coinbase. If the proposal is authorized, we will cast an auth-vote; otherwise, we will cast a drop vote. | | | | | Set the header difficulty based on the signer's turn (2 if the signer is in turn and 1 if not) | | | | | Verify that the extraData contains all the necessary elements, including extraVanity and a list of signers if the block occurs at the end of the epoch. This is added to the Header's extraData field. | | -| **Finalize**: After making changes to the state, the state database may be updated, but this action does not involve the assembly of the block. | If the header is not a Proof-of-stake header, we execute the finalize function of eth1. Otherwise, we loop through the withdrawals in the block, converting their amounts from wei to gwei. We then modify the state by adding the converted amount to the address associated with the current withdrawal. | Clique has no post-transaction consensus rules, no block rewards in proof of authority | | -| **FinalizeAndAssemble**: Finalizes and assemble the final block | If the header is not a Proof-of-stake header, we invoke eth1's FinalizeAndAssemble. If there are no withdrawals and the block is after the Shanghai fork, we include an empty withdrawals object. Next, we invoke the finalize function to calculate the state root. We then assign this value to the root property of the header object. Finally, we construct a new block by combining the header, transactions, uncles, receipts, and withdrawals. | Verify that there are no withdrawals, invoke the finalize function, calculate the state root of our stateDB, and assign it to the the Header . Construct a new block using the header, transactions, and receipts. | | -| **Seal**: Generates a sealing request for a block and pushes the request into the given channel | If the header is not a Proof-of-stake header, we invoke eth1's seal. Otherwise, we take no action and return nil. The verification of the seal is performed by the consensus layer. | Make sure that the block is not the initial block, obtain the snapshot, and confirm that we have the authority to sign and are not included in the list of recent signers. Coordinate the timing of our respective turns, apply the sign function to  sign, and transmit the securely sealed block through the designated channel. | | +| **Finalize**: After making changes to the state, the state database may be updated, but this action does not involve the assembly of the block. | If the header is not a Proof-of-stake header, we execute the finalize function of ethone. Otherwise, we loop through the withdrawals in the block, converting their amounts from wei to gwei. We then modify the state by adding the converted amount to the address associated with the current withdrawal. | Clique has no post-transaction consensus rules, no block rewards in proof of authority | | +| **FinalizeAndAssemble**: Finalizes and assemble the final block | If the header is not a Proof-of-stake header, we invoke ethone's FinalizeAndAssemble. If there are no withdrawals and the block is after the Shanghai fork, we include an empty withdrawals object. Next, we invoke the finalize function to calculate the state root. We then assign this value to the root property of the header object. Finally, we construct a new block by combining the header, transactions, uncles, receipts, and withdrawals. | Verify that there are no withdrawals, invoke the finalize function, calculate the state root of our stateDB, and assign it to the the Header . Construct a new block using the header, transactions, and receipts. | | +| **Seal**: Generates a sealing request for a block and pushes the request into the given channel | If the header is not a Proof-of-stake header, we invoke ethone's seal. Otherwise, we take no action and return nil. The verification of the seal is performed by the consensus layer. | Make sure that the block is not the initial block, obtain the snapshot, and confirm that we have the authority to sign and are not included in the list of recent signers. Coordinate the timing of our respective turns, apply the sign function to  sign, and transmit the securely sealed block through the designated channel. | | | **SealHash**: Hash of the block prior to sealing | | | | | **CalcDifficulty**: Difficulty adjustment algorithm, returns the difficulty of the new block | | | | diff --git a/wordlist.txt b/wordlist.txt index 8147fef7..e4592471 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -209,14 +209,14 @@ ERCs Erigon estimateGas eth -eth1 -eth1's ethash Ethash ETHCC Ethereum Ethereum's ethers +ethone +ethone's ethresear ethresearch ethroadmap