diff --git a/packages/relayer/.l1indexer.example.env b/packages/relayer/.l1indexer.example.env index fa3d5e8b0a0..4f6fe42409a 100644 --- a/packages/relayer/.l1indexer.example.env +++ b/packages/relayer/.l1indexer.example.env @@ -11,7 +11,7 @@ QUEUE_USER=guest QUEUE_PASSWORD=guest QUEUE_HOST=localhost QUEUE_PORT=5672 -SRC_BRIDGE_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE +SRC_BRIDGE_ADDRESS=0x3Aa5ebB10DC797CAC828524e59A333d0A371443c DEST_BRIDGE_ADDRESS=0x1000777700000000000000000000000000000004 SRC_TAIKO_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 SRC_RPC_URL=wss://l1ws.internal.taiko.xyz diff --git a/packages/relayer/processor/process_message.go b/packages/relayer/processor/process_message.go index 4663bafb9e3..8939e6d4f97 100644 --- a/packages/relayer/processor/process_message.go +++ b/packages/relayer/processor/process_message.go @@ -108,12 +108,23 @@ func (p *Processor) processMessage( // todo: instead of latest, need way to find out which block num on the hop chain // the previous blockHash was synced in, and then wait for that header to be synced // on the next hop chain. - latestBlock, err := hop.ethClient.BlockByNumber(ctx, nil) + snippet, err := hop.headerSyncer.GetSyncedSnippet(&bind.CallOpts{ + Context: ctx, + }, + hop.blockNum, + ) + + slog.Info("hop synced snippet", + "syncedInBlock", snippet.SyncedInBlock, + "blockNum", hop.blockNum, + "blockHash", common.Bytes2Hex(snippet.BlockHash[:]), + ) + if err != nil { - return errors.Wrap(err, "hop.ethClient.BlockByNumber(ctx, nil)") + return errors.Wrap(err, "hop.headerSyncer.GetSyncedSnippet") } - blockNum = latestBlock.NumberU64() + blockNum = snippet.SyncedInBlock hopEthClient = hop.ethClient }