func (s *Service) Start(ctx context.Context) error {
	if err := s.recorder.Start(ctx); err != nil {
		return errors.Wrap(err, "failed to start recorder")
	}
	return s.processor.Start()
}
Start starts the service
package relayer
import (
	"context"
	"log"
	"time"
	"github.com/ethereum/go-ethereum"
	"github.com/ethereum/go-ethereum/common"
	lru "github.com/hashicorp/golang-lru"
	"github.com/pkg/errors"
	"google.golang.org/protobuf/types/known/timestamppb"
	"github.com/iotexproject/ioTube/witness-service/dispatcher"
	"github.com/iotexproject/ioTube/witness-service/grpc/services"
	"github.com/iotexproject/ioTube/witness-service/grpc/types"
	"github.com/iotexproject/ioTube/witness-service/util"
)
type (
	responseWithTimestamp struct {
		response *services.ListResponse
		ts       time.Time
	}
	Service struct {
		services.UnimplementedRelayServiceServer
		transferValidator TransferValidator
		processor         dispatcher.Runner
		recorder          *Recorder
		cache             *lru.Cache
	}
)
func NewService(tv TransferValidator, recorder *Recorder, interval time.Duration) (*Service, error) {
	cache, err := lru.New(100)
	if err != nil {
		return nil, err
	}
	s := &Service{
		transferValidator: tv,
		recorder:          recorder,
		cache:             cache,
	}
	processor, err := dispatcher.NewRunner(interval, s.process)
	if err != nil {
		return nil, errors.Wrap(err, "failed to create runner")
	}
	s.processor = processor
	return s, nil
}