@@ -719,6 +719,9 @@ func TestEvmSequencerCatchUpBasedSequencerE2E(t *testing.T) {
719719 seqFinalHeight := seqHeader .Number .Uint64 ()
720720 t .Logf ("Sequencer at height: %d before shutdown" , seqFinalHeight )
721721
722+ seqBlock , err := seqClient .BlockByNumber (ctx , new (big.Int ).SetUint64 (seqFinalHeight ))
723+ require .NoError (t , err , "sequencer should have block %d" , seqFinalHeight )
724+
722725 // Stop sequencer so it stops producing new blocks.
723726 err = seqProcess .Signal (syscall .SIGTERM )
724727 require .NoError (t , err , "failed to stop sequencer process" )
@@ -740,6 +743,11 @@ func TestEvmSequencerCatchUpBasedSequencerE2E(t *testing.T) {
740743 require .NoError (t , err )
741744 t .Logf ("Full node caught up to height: %d (sequencer was at %d)" , fnHeader .Number .Uint64 (), seqFinalHeight )
742745
746+ // Normal flow: last sequencer block equal last sync node block
747+ fnBlock , err := fnClient .BlockByNumber (ctx , new (big.Int ).SetUint64 (fnHeader .Number .Uint64 ()))
748+ require .NoError (t , err )
749+ require .Equal (t , seqBlock .Hash (), fnBlock .Hash ())
750+
743751 // Stop sync node process
744752 err = fnProcess .Signal (syscall .SIGTERM )
745753 require .NoError (t , err , "failed to stop full node process" )
@@ -775,6 +783,11 @@ func TestEvmSequencerCatchUpBasedSequencerE2E(t *testing.T) {
775783 require .NoError (t , err )
776784 defer basedSeqClient .Close ()
777785
786+ // Normal flow: last sequencer block equal last based sequencer block
787+ baseSeqBlock , err := basedSeqClient .BlockByNumber (ctx , new (big.Int ).SetUint64 (fnHeader .Number .Uint64 ()))
788+ require .NoError (t , err )
789+ require .Equal (t , seqBlock .Hash (), baseSeqBlock .Hash (), "based sequencer block is not equal to last sequencer block" )
790+
778791 t .Log ("Phase 5: Submit Forced Inclusion Transactions to DA" )
779792
780793 blobClient , err := blobrpc .NewClient (ctx , env .Endpoints .GetDAAddress (), "" , "" )
@@ -850,6 +863,7 @@ func TestEvmSequencerCatchUpBasedSequencerE2E(t *testing.T) {
850863 "--evnode.clear_cache" ,
851864 "--evm.engine-url" , env .Endpoints .GetFullNodeEngineURL (),
852865 "--evm.eth-url" , env .Endpoints .GetFullNodeEthURL (),
866+ "--evnode.log.level" , "error" ,
853867 )
854868 sut .AwaitNodeLive (t , env .Endpoints .GetFullNodeRPCAddress (), NodeStartupTimeout )
855869 t .Log ("Sync node restarted as normal full node" )
@@ -924,10 +938,10 @@ func TestEvmSequencerCatchUpBasedSequencerE2E(t *testing.T) {
924938 for h := uint64 (1 ); h <= basedSeqFinalHeight ; h ++ {
925939 height := new (big.Int ).SetUint64 (h )
926940
927- seqBlock , err : = seqClient .BlockByNumber (ctx , height )
941+ seqBlock , err = seqClient .BlockByNumber (ctx , height )
928942 require .NoError (t , err , "sequencer should have block %d" , h )
929943
930- fnBlock , err : = fnClient .BlockByNumber (ctx , height )
944+ fnBlock , err = fnClient .BlockByNumber (ctx , height )
931945 require .NoError (t , err , "full node should have block %d" , h )
932946
933947 seqTime := seqBlock .Time ()
@@ -951,9 +965,6 @@ func TestEvmSequencerCatchUpBasedSequencerE2E(t *testing.T) {
951965 require .Equal (t , len (seqBlock .Transactions ()), len (fnBlock .Transactions ()),
952966 "tx count mismatch at height %d: sequencer=%d fullnode=%d" ,
953967 h , len (seqBlock .Transactions ()), len (fnBlock .Transactions ()))
954-
955- t .Logf ("✅ Block %d matches: hash=%s stateRoot=%s txs=%d" ,
956- h , seqBlock .Hash ().Hex (), seqBlock .Root ().Hex (), len (seqBlock .Transactions ()))
957968 }
958969 t .Logf ("All %d blocks match between sequencer and full node" , basedSeqFinalHeight )
959970
@@ -1048,7 +1059,8 @@ func TestEvmBasedSequencerBaselineE2E(t *testing.T) {
10481059 "--evm.eth-url" , env .Endpoints .GetSequencerEthURL (),
10491060 "--evnode.log.level" , "debug" ,
10501061 )
1051- sut .AwaitNodeUp (t , env .Endpoints .GetRollkitRPCAddress (), NodeStartupTimeout )
1062+ // We cannot use AwaitNodeUp immediatly, as a base sequencer does not create blocks until getting txs from DA.
1063+ // sut.AwaitNodeUp(t, env.Endpoints.GetRollkitRPCAddress(), NodeStartupTimeout)
10521064 t .Log ("Based sequencer is up" )
10531065
10541066 // Connect to based sequencer
@@ -1094,7 +1106,6 @@ func TestEvmBasedSequencerBaselineE2E(t *testing.T) {
10941106 t .Log ("Advancing DA past epoch boundary..." )
10951107 time .Sleep (4 * time .Second )
10961108
1097- // ===== VERIFY BASED SEQUENCER INCLUDES FORCED TXS =====
10981109 t .Log ("Waiting for based sequencer to include forced inclusion txs" )
10991110
11001111 for i , txHash := range forcedTxHashes {
@@ -1108,5 +1119,6 @@ func TestEvmBasedSequencerBaselineE2E(t *testing.T) {
11081119 // Verify blocks are being produced
11091120 header , err := basedSeqClient .HeaderByNumber (ctx , nil )
11101121 require .NoError (t , err )
1122+ require .GreaterOrEqual (t , header .Number .Uint64 (), uint64 (2 ))
11111123 t .Logf ("Based sequencer height: %d" , header .Number .Uint64 ())
11121124}
0 commit comments