Proof-of-Stake
信標鏈上區塊的具體內容是什麼?
我正試圖圍繞 POS 乙太坊將如何工作並且有很多問題。
第一個基本上是關於信標鏈的。信標鏈中的區塊究竟包含什麼?
我讀到驗證者將提議並證明將添加到乙太坊權益證明版本中的區塊,但區塊的內容究竟是什麼?它會是你在目前乙太坊 pow 塊中的日常餘額交易嗎?或者是其他東西?
我的感覺是,如果驗證者正在取代礦工,並且礦工添加包含交易的區塊,那麼驗證者可能也會添加的區塊將是交易(假設他們正在取代礦工) - 但從我所閱讀的內容來看,我覺得這不是正確的。問題是我也找不到驗證者將提出的塊內容的確切解釋。
任何人都對此有所了解,可以提供幫助嗎?
是的,合併後的信標塊(當股權證明取代工作證明時)將包含交易。
根據https://eth2book.info/altair/annotated-spec#beaconblockbody,Beacon塊(包括 Altair)具有以下內容
class BeaconBlockBody(Container): randao_reveal: BLSSignature eth1_data: Eth1Data # Eth1 data vote graffiti: Bytes32 # Arbitrary data # Operations proposer_slashings: List[ProposerSlashing, MAX_PROPOSER_SLASHINGS] attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS] attestations: List[Attestation, MAX_ATTESTATIONS] deposits: List[Deposit, MAX_DEPOSITS] voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS] sync_aggregate: SyncAggregate # [New in Altair]
通過合併,
ExecutionPayload
將根據https://github.com/ethereum/annotated-spec/blob/master/merge/beacon-chain.md#beaconblockbody添加class BeaconBlockBody(Container): randao_reveal: BLSSignature eth1_data: Eth1Data # Eth1 data vote graffiti: Bytes32 # Arbitrary data # Operations proposer_slashings: List[ProposerSlashing, MAX_PROPOSER_SLASHINGS] attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS] attestations: List[Attestation, MAX_ATTESTATIONS] deposits: List[Deposit, MAX_DEPOSITS] voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS] sync_aggregate: SyncAggregate # Execution execution_payload: ExecutionPayload # [New in Merge]
是的,合併後的信標塊將包含交易。每個
ExecutionPayload
https://github.com/ethereum/annotated-spec/blob/master/merge/beacon-chain.md#executionpayload具有:class ExecutionPayload(Container): # Execution block header fields parent_hash: Hash32 coinbase: ExecutionAddress # 'beneficiary' in the yellow paper state_root: Bytes32 receipt_root: Bytes32 # 'receipts root' in the yellow paper logs_bloom: ByteVector[BYTES_PER_LOGS_BLOOM] random: Bytes32 # 'difficulty' in the yellow paper block_number: uint64 # 'number' in the yellow paper gas_limit: uint64 gas_used: uint64 timestamp: uint64 extra_data: ByteList[MAX_EXTRA_DATA_BYTES] base_fee_per_gas: Bytes32 # base fee introduced in EIP-1559, little-endian serialized # Extra payload fields block_hash: Hash32 # Hash of execution block transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
其他有用的參考資料:
- <https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer>
- <https://github.com/ethereum/pm>
第一個參考包含對合併之前和之後塊的外觀的概述: