func InitialValidators(num int, keystore validator.Keystore, c *config.Config) ([]primitives.InitialValidatorEntry, error) {
	var validators []primitives.InitialValidatorEntry
	for i := 0; i <= num; i++ {
		key := keystore.GetKeyForValidator(uint32(i))
		pub := key.DerivePublicKey()
		hashPub, err := ssz.HashTreeRoot(pub.Serialize())
		if err != nil {
			return nil, err
		}
		proofOfPossession, err := bls.Sign(key, hashPub[:], bls.DomainDeposit)
		if err != nil {
			return nil, err
		}
		validators = append(validators, primitives.InitialValidatorEntry{
			PubKey:                pub.Serialize(),
			ProofOfPossession:     proofOfPossession.Serialize(),
			WithdrawalShard:       1,
			WithdrawalCredentials: chainhash.Hash{},
			DepositSize:           c.MaxDeposit,
		})
	}
	return validators, nil
}
InitialValidators gets the initial validators for tests.
package util
import (
	"encoding/binary"
	"fmt"
	"time"
	"github.com/prysmaticlabs/go-ssz"
	"github.com/phoreproject/synapse/validator"
	"github.com/phoreproject/synapse/beacon"
	"github.com/phoreproject/synapse/beacon/config"
	"github.com/phoreproject/synapse/beacon/db"
	"github.com/phoreproject/synapse/bls"
	"github.com/phoreproject/synapse/chainhash"
	"github.com/phoreproject/synapse/primitives"
)
func SetupBlockchain(initialValidators int, c *config.Config) (*beacon.Blockchain, validator.Keystore, error) {
	return SetupBlockchainWithTime(initialValidators, c, time.Now())
}