func createProcessService(ctx context.Context, id uint64) (process.Service, error) {
	stores := []e2wtypes.Store{scratch.New()}
	if _, err := distributed.CreateWallet(ctx, "Test", stores[0], keystorev4.New()); err != nil {
		return nil, err
	}
	peers, err := staticpeers.New(ctx,
		staticpeers.WithPeers(map[uint64]string{
			1: "signer-test01:8881",
			2: "signer-test02:8882",
			3: "signer-test03:8883",
		}),
	)
	if err != nil {
		return nil, errors.Wrap(err, "failed to create peers service")
	}
	checkerSvc, err := mockchecker.New()
	if err != nil {
		return nil, err
	}
	unlockerSvc, err := localunlocker.New(context.Background(),
		localunlocker.WithAccountPassphrases([]string{"Test account 1 passphrase"}))
	if err != nil {
		return nil, err
	}
	fetcherSvc, err := memfetcher.New(ctx,
		memfetcher.WithStores(stores),
		memfetcher.WithEncryptor(keystorev4.New()),
	)
	if err != nil {
		return nil, errors.Wrap(err, "failed to create memory fetcher")
	}
	process, err := standardprocess.New(ctx,
		standardprocess.WithChecker(checkerSvc),
		standardprocess.WithGenerationPassphrase([]byte("secret")),
		standardprocess.WithID(id),
		standardprocess.WithPeers(peers),
		standardprocess.WithSender(sendermock.New(id)),
		standardprocess.WithFetcher(fetcherSvc),
		standardprocess.WithStores(stores),
		standardprocess.WithUnlocker(unlockerSvc),
	)
	if err != nil {
		return nil, err
	}
	mock.Processes[id] = process
	return process, nil
}
Helper to create a process service.
package standard_test
import (
	context "context"
	"os"
	"strings"
	"testing"
	"time"
	"github.com/attestantio/dirk/core"
	"github.com/attestantio/dirk/services/checker"
	mockchecker "github.com/attestantio/dirk/services/checker/mock"
	"github.com/attestantio/dirk/services/fetcher"
	memfetcher "github.com/attestantio/dirk/services/fetcher/mem"
	"github.com/attestantio/dirk/services/metrics"
	"github.com/attestantio/dirk/services/metrics/prometheus"
	"github.com/attestantio/dirk/services/peers"
	staticpeers "github.com/attestantio/dirk/services/peers/static"
	"github.com/attestantio/dirk/services/process"
	standardprocess "github.com/attestantio/dirk/services/process/standard"
	"github.com/attestantio/dirk/services/sender"
	sendermock "github.com/attestantio/dirk/services/sender/mock"
	"github.com/attestantio/dirk/services/unlocker"
	localunlocker "github.com/attestantio/dirk/services/unlocker/local"
	"github.com/attestantio/dirk/testing/mock"
	"github.com/pkg/errors"
	"github.com/rs/zerolog"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	e2types "github.com/wealdtech/go-eth2-types/v2"
	distributed "github.com/wealdtech/go-eth2-wallet-distributed"
	keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4"
	scratch "github.com/wealdtech/go-eth2-wallet-store-scratch"
	e2wtypes "github.com/wealdtech/go-eth2-wallet-types/v2"
)