@@ -294,10 +294,6 @@ func (p *ChunkProposer) proposeChunk() error {
294294 return p .updateDBChunkInfo (& chunk , codecVersion , metrics )
295295 }
296296
297- if proposed , err := p .tryProposeEuclidTransitionChunk (blocks ); proposed || err != nil {
298- return err
299- }
300-
301297 var chunk encoding.Chunk
302298 chunk .Blocks = make ([]* encoding.Block , 0 , len (blocks ))
303299 for i , block := range blocks {
@@ -391,32 +387,3 @@ func (p *ChunkProposer) recordTimerChunkMetrics(metrics *utils.ChunkMetrics) {
391387 p .chunkEstimateCalldataSizeTime .Set (float64 (metrics .EstimateCalldataSizeTime ))
392388 p .chunkEstimateBlobSizeTime .Set (float64 (metrics .EstimateBlobSizeTime ))
393389}
394-
395- func (p * ChunkProposer ) tryProposeEuclidTransitionChunk (blocks []* encoding.Block ) (bool , error ) {
396- if ! p .chainCfg .IsEuclid (blocks [0 ].Header .Time ) {
397- return false , nil
398- }
399-
400- prevBlocks , err := p .l2BlockOrm .GetL2BlocksGEHeight (p .ctx , blocks [0 ].Header .Number .Uint64 ()- 1 , 1 )
401- if err != nil || len (prevBlocks ) == 0 || prevBlocks [0 ].Header .Hash () != blocks [0 ].Header .ParentHash {
402- return false , fmt .Errorf ("failed to get parent block: %w" , err )
403- }
404-
405- if p .chainCfg .IsEuclid (prevBlocks [0 ].Header .Time ) {
406- // Parent is still Euclid, transition happened already
407- return false , nil
408- }
409-
410- // blocks[0] is Euclid, but parent is not, propose a chunk with only blocks[0]
411- chunk := encoding.Chunk {Blocks : blocks [:1 ]}
412- codecVersion := encoding .CodecV5
413- metrics , calcErr := utils .CalculateChunkMetrics (& chunk , codecVersion )
414- if calcErr != nil {
415- return false , fmt .Errorf ("failed to calculate chunk metrics: %w" , calcErr )
416- }
417- p .recordTimerChunkMetrics (metrics )
418- if err := p .updateDBChunkInfo (& chunk , codecVersion , metrics ); err != nil {
419- return false , err
420- }
421- return true , nil
422- }
0 commit comments