@@ -1297,7 +1297,6 @@ impl Node {
12971297 let epoch_config = EpochConfig :: default ( ) ;
12981298
12991299 // Block configuration from genesis
1300- let beneficiary = self . beneficiary ;
13011300 let gas_limit = self . gas_limit ;
13021301
13031302 // Run the main event loop with graceful shutdown support
@@ -1315,7 +1314,6 @@ impl Node {
13151314 rpc_executor,
13161315 epoch_config,
13171316 self . epoch_block_reward ,
1318- beneficiary,
13191317 gas_limit,
13201318 )
13211319 . await ;
@@ -1366,7 +1364,6 @@ impl Node {
13661364 rpc_executor : Option < Arc < cipherbft_rpc:: EvmExecutionApi < InMemoryProvider > > > ,
13671365 epoch_config : EpochConfig ,
13681366 epoch_block_reward : U256 ,
1369- beneficiary : [ u8 ; 20 ] ,
13701367 gas_limit : u64 ,
13711368 ) -> Result < ( ) > {
13721369 loop {
@@ -1479,6 +1476,13 @@ impl Node {
14791476 // Execute Cut if execution layer is enabled
14801477 // Then store the block to MDBX for RPC queries
14811478 if let Some ( ref bridge) = execution_bridge {
1479+ // Extract beneficiary from Cut BEFORE execute_cut consumes it
1480+ // The proposer_address is the Ethereum address of the validator who built this Cut
1481+ let block_beneficiary: [ u8 ; 20 ] = cut
1482+ . proposer_address
1483+ . map( |addr| addr. into_array( ) )
1484+ . unwrap_or( [ 0u8 ; 20 ] ) ;
1485+
14821486 match bridge. execute_cut( cut) . await {
14831487 Ok ( block_result) => {
14841488 info!(
@@ -1495,7 +1499,7 @@ impl Node {
14951499 // to prevent orphaned records referencing non-existent blocks.
14961500 if let Some ( ref storage) = rpc_storage {
14971501 // Create and store the block FIRST
1498- let block = Self :: execution_result_to_block( height. 0 , & block_result, beneficiary , gas_limit) ;
1502+ let block = Self :: execution_result_to_block( height. 0 , & block_result, block_beneficiary , gas_limit) ;
14991503 if let Err ( e) = storage. block_store( ) . put_block( & block) . await {
15001504 error!( "Failed to store block {} (hash: {}) to MDBX: {}" , height. 0 , block_result. block_hash, e) ;
15011505 // Skip all related storage operations - don't create orphaned receipts/txs/logs
0 commit comments