diff --git a/ibft/storage/store_test.go b/ibft/storage/store_test.go index 4397505b46..783a2c4ac5 100644 --- a/ibft/storage/store_test.go +++ b/ibft/storage/store_test.go @@ -22,7 +22,7 @@ import ( func TestCleanInstances(t *testing.T) { ks := testingutils.Testing4SharesSet() logger := logging.TestLogger(t) - msgID := spectypes.NewMsgID(networkconfig.TestNetwork.Domain, []byte("pk"), spectypes.RoleCommittee) + msgID := spectypes.NewMsgID(networkconfig.TestNetwork.DomainType(), []byte("pk"), spectypes.RoleCommittee) storage, err := newTestIbftStorage(logger, "test") require.NoError(t, err) @@ -57,7 +57,7 @@ func TestCleanInstances(t *testing.T) { require.NoError(t, storage.SaveHighestInstance(generateInstance(msgID, specqbft.Height(msgsCount)))) // add different msgID - differMsgID := spectypes.NewMsgID(networkconfig.TestNetwork.Domain, []byte("differ_pk"), spectypes.RoleCommittee) + differMsgID := spectypes.NewMsgID(networkconfig.TestNetwork.DomainType(), []byte("differ_pk"), spectypes.RoleCommittee) require.NoError(t, storage.SaveInstance(generateInstance(differMsgID, specqbft.Height(1)))) require.NoError(t, storage.SaveHighestInstance(generateInstance(differMsgID, specqbft.Height(msgsCount)))) require.NoError(t, storage.SaveHighestAndHistoricalInstance(generateInstance(differMsgID, specqbft.Height(1)))) @@ -92,7 +92,7 @@ func TestCleanInstances(t *testing.T) { } func TestSaveAndFetchLastState(t *testing.T) { - identifier := spectypes.NewMsgID(networkconfig.TestNetwork.Domain, []byte("pk"), spectypes.RoleCommittee) + identifier := spectypes.NewMsgID(networkconfig.TestNetwork.DomainType(), []byte("pk"), spectypes.RoleCommittee) instance := &qbftstorage.StoredInstance{ State: &specqbft.State{ @@ -130,7 +130,7 @@ func TestSaveAndFetchLastState(t *testing.T) { } func TestSaveAndFetchState(t *testing.T) { - identifier := spectypes.NewMsgID(networkconfig.TestNetwork.Domain, []byte("pk"), spectypes.RoleCommittee) + identifier := spectypes.NewMsgID(networkconfig.TestNetwork.DomainType(), []byte("pk"), spectypes.RoleCommittee) instance := &qbftstorage.StoredInstance{ State: &specqbft.State{ diff --git a/ibft/storage/stores_test.go b/ibft/storage/stores_test.go index a754db196a..46e93d1dfa 100644 --- a/ibft/storage/stores_test.go +++ b/ibft/storage/stores_test.go @@ -4,7 +4,7 @@ import ( "testing" specqbft "github.com/ssvlabs/ssv-spec/qbft" - spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/exporter/convert" "github.com/ssvlabs/ssv/logging" qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" "github.com/ssvlabs/ssv/storage/basedb" @@ -19,28 +19,28 @@ func TestQBFTStores(t *testing.T) { store, err := newTestIbftStorage(logger, "") require.NoError(t, err) - qbftMap.Add(spectypes.RoleCommittee, store) - qbftMap.Add(spectypes.RoleCommittee, store) + qbftMap.Add(convert.RoleCommittee, store) + qbftMap.Add(convert.RoleCommittee, store) - require.NotNil(t, qbftMap.Get(spectypes.RoleCommittee)) - require.NotNil(t, qbftMap.Get(spectypes.RoleCommittee)) + require.NotNil(t, qbftMap.Get(convert.RoleCommittee)) + require.NotNil(t, qbftMap.Get(convert.RoleCommittee)) db, err := kv.NewInMemory(logger.Named(logging.NameBadgerDBLog), basedb.Options{ Reporting: true, }) require.NoError(t, err) - qbftMap = NewStoresFromRoles(db, spectypes.RoleCommittee, spectypes.RoleProposer) + qbftMap = NewStoresFromRoles(db, convert.RoleCommittee, convert.RoleProposer) - require.NotNil(t, qbftMap.Get(spectypes.RoleCommittee)) - require.NotNil(t, qbftMap.Get(spectypes.RoleCommittee)) + require.NotNil(t, qbftMap.Get(convert.RoleCommittee)) + require.NotNil(t, qbftMap.Get(convert.RoleCommittee)) id := []byte{1, 2, 3} - qbftMap.Each(func(role spectypes.RunnerRole, store qbftstorage.QBFTStore) error { + qbftMap.Each(func(role convert.RunnerRole, store qbftstorage.QBFTStore) error { return store.SaveInstance(&qbftstorage.StoredInstance{State: &specqbft.State{Height: 1, ID: id}}) }) - instance, err := qbftMap.Get(spectypes.RoleCommittee).GetInstance(id, 1) + instance, err := qbftMap.Get(convert.RoleCommittee).GetInstance(id, 1) require.NoError(t, err) require.NotNil(t, instance) require.Equal(t, specqbft.Height(1), instance.State.Height) diff --git a/protocol/v2/qbft/controller/controller.go b/protocol/v2/qbft/controller/controller.go index 4c16156e4e..3936203095 100644 --- a/protocol/v2/qbft/controller/controller.go +++ b/protocol/v2/qbft/controller/controller.go @@ -5,6 +5,7 @@ import ( "crypto/sha256" "encoding/json" "fmt" + qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" "github.com/pkg/errors" diff --git a/protocol/v2/qbft/spectest/controller_type.go b/protocol/v2/qbft/spectest/controller_type.go index 9d9bf733e3..94a956146e 100644 --- a/protocol/v2/qbft/spectest/controller_type.go +++ b/protocol/v2/qbft/spectest/controller_type.go @@ -5,7 +5,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/ssvlabs/ssv/exporter/convert" "os" "path/filepath" "reflect" @@ -59,7 +58,7 @@ func RunControllerSpecTest(t *testing.T, test *spectests.ControllerSpecTest) { func generateController(logger *zap.Logger) *controller.Controller { identifier := []byte{1, 2, 3, 4} - config := qbfttesting.TestingConfig(logger, spectestingutils.Testing4SharesSet(), convert.RoleCommittee) + config := qbfttesting.TestingConfig(logger, spectestingutils.Testing4SharesSet(), spectypes.RoleCommittee) return qbfttesting.NewTestingQBFTController( identifier[:], spectestingutils.TestingCommitteeMember(spectestingutils.Testing4SharesSet()), diff --git a/protocol/v2/qbft/testing/storage.go b/protocol/v2/qbft/testing/storage.go index 87e14d62ae..db6321df80 100644 --- a/protocol/v2/qbft/testing/storage.go +++ b/protocol/v2/qbft/testing/storage.go @@ -2,9 +2,9 @@ package testing import ( "context" - "github.com/ssvlabs/ssv/exporter/convert" "sync" + "github.com/ssvlabs/ssv/exporter/convert" qbftstorage "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" @@ -28,12 +28,14 @@ func getDB(logger *zap.Logger) basedb.Database { } var allRoles = []convert.RunnerRole{ - convert.RoleCommittee, - convert.RoleProposer, + convert.RoleAttester, convert.RoleAggregator, + convert.RoleProposer, convert.RoleSyncCommitteeContribution, + convert.RoleSyncCommittee, convert.RoleValidatorRegistration, convert.RoleVoluntaryExit, + convert.RoleCommittee, } func TestingStores(logger *zap.Logger) *qbftstorage.QBFTStores { diff --git a/protocol/v2/qbft/testing/utils.go b/protocol/v2/qbft/testing/utils.go index e886b4f5a3..f9dcaa016e 100644 --- a/protocol/v2/qbft/testing/utils.go +++ b/protocol/v2/qbft/testing/utils.go @@ -2,6 +2,7 @@ package testing import ( "bytes" + "github.com/pkg/errors" "github.com/ssvlabs/ssv/exporter/convert" "github.com/ssvlabs/ssv/protocol/v2/qbft/roundtimer" @@ -14,7 +15,7 @@ import ( "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" ) -var TestingConfig = func(logger *zap.Logger, keySet *testingutils.TestKeySet, role convert.RunnerRole) *qbft.Config { +var TestingConfig = func(logger *zap.Logger, keySet *testingutils.TestKeySet, role types.RunnerRole) *qbft.Config { return &qbft.Config{ BeaconSigner: testingutils.NewTestingKeyManager(), OperatorSigner: testingutils.NewTestingOperatorSigner(keySet, 1), @@ -34,7 +35,7 @@ var TestingConfig = func(logger *zap.Logger, keySet *testingutils.TestKeySet, ro ProposerF: func(state *specqbft.State, round specqbft.Round) types.OperatorID { return 1 }, - Storage: TestingStores(logger).Get(role), + Storage: TestingStores(logger).Get(convert.RunnerRole(role)), Network: testingutils.NewTestingNetwork(1, keySet.OperatorKeys[1]), Timer: roundtimer.NewTestingTimer(), SignatureVerification: true, diff --git a/protocol/v2/ssv/runner/committee.go b/protocol/v2/ssv/runner/committee.go index 1a7d887fb1..528d2bd5a6 100644 --- a/protocol/v2/ssv/runner/committee.go +++ b/protocol/v2/ssv/runner/committee.go @@ -6,6 +6,8 @@ import ( "encoding/json" "time" + "github.com/ssvlabs/ssv/protocol/v2/ssv/runner/metrics" + "github.com/attestantio/go-eth2-client/spec/altair" "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" @@ -20,7 +22,6 @@ import ( "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" - "github.com/ssvlabs/ssv/protocol/v2/ssv/runner/metrics" ) //type Broadcaster interface { @@ -387,8 +388,8 @@ func (cr *CommitteeRunner) ProcessPostConsensus(logger *zap.Logger, signedMsg *t } specSig := phase0.BLSSignature{} copy(specSig[:], sig) - vlogger.Debug("🧩 reconstructed partial signatures", - zap.Uint64s("signers", getPostConsensusSigners(cr.BaseRunner.State, root))) + vlogger.Debug("🧩 reconstructed partial signatures committee", + zap.Uint64s("signers", getPostConsensusCommitteeSigners(cr.BaseRunner.State, root))) // Get the beacon object related to root if _, exists := beaconObjects[validator]; !exists { anyErr = errors.Wrap(err, "could not find beacon object for validator") diff --git a/protocol/v2/ssv/runner/proposer.go b/protocol/v2/ssv/runner/proposer.go index 517eb72a61..96b4d56297 100644 --- a/protocol/v2/ssv/runner/proposer.go +++ b/protocol/v2/ssv/runner/proposer.go @@ -234,8 +234,8 @@ func (r *ProposerRunner) ProcessPostConsensus(logger *zap.Logger, signedMsg *spe specSig := phase0.BLSSignature{} copy(specSig[:], sig) r.metrics.EndPostConsensus() - logger.Debug("🧩 reconstructed partial post consensus signatures", - zap.Uint64s("signers", getPostConsensusSigners(r.GetState(), root)), + logger.Debug("🧩 reconstructed partial post consensus signatures proposer", + zap.Uint64s("signers", getPostConsensusProposerSigners(r.GetState(), root)), fields.PostConsensusTime(r.metrics.GetPostConsensusTime())) endSubmission := r.metrics.StartBeaconSubmission() diff --git a/protocol/v2/ssv/runner/runner_state_helpers.go b/protocol/v2/ssv/runner/runner_state_helpers.go index e4e5c60392..496e2760f4 100644 --- a/protocol/v2/ssv/runner/runner_state_helpers.go +++ b/protocol/v2/ssv/runner/runner_state_helpers.go @@ -15,11 +15,35 @@ func getPreConsensusSigners(state *State, root [32]byte) []spectypes.OperatorID return signers } -func getPostConsensusSigners(state *State, root [32]byte) []spectypes.OperatorID { - sigs := state.PostConsensusContainer.Signatures[state.StartingDuty.(*spectypes.BeaconDuty).ValidatorIndex][hex.EncodeToString(root[:])] +func getPostConsensusCommitteeSigners(state *State, root [32]byte) []spectypes.OperatorID { var signers []spectypes.OperatorID + + for _, bd := range state.StartingDuty.(*spectypes.CommitteeDuty).BeaconDuties { + sigs := state.PostConsensusContainer.Signatures[bd.ValidatorIndex][hex.EncodeToString(root[:])] + for op := range sigs { + signers = append(signers, op) + } + } + + have := make(map[spectypes.OperatorID]struct{}) + var signersUnique []spectypes.OperatorID + for _, opId := range signers { + if _, ok := have[opId]; !ok { + have[opId] = struct{}{} + signersUnique = append(signersUnique, opId) + } + } + + return signersUnique +} + +func getPostConsensusProposerSigners(state *State, root [32]byte) []spectypes.OperatorID { + var signers []spectypes.OperatorID + valIdx := state.StartingDuty.(*spectypes.BeaconDuty).ValidatorIndex + sigs := state.PostConsensusContainer.Signatures[valIdx][hex.EncodeToString(root[:])] for op := range sigs { signers = append(signers, op) } + return signers } diff --git a/protocol/v2/ssv/spectest/msg_processing_type.go b/protocol/v2/ssv/spectest/msg_processing_type.go index eb5c1c6f85..288c52d4c3 100644 --- a/protocol/v2/ssv/spectest/msg_processing_type.go +++ b/protocol/v2/ssv/spectest/msg_processing_type.go @@ -240,7 +240,7 @@ var baseCommitteeWithRunnerSample = func( shareMap[valIdx] = spectestingutils.TestingShare(ks, valIdx) } - createRunnerF := func(_ phase0.Slot, shareMap map[phase0.ValidatorIndex]*spectypes.Share) *runner.CommitteeRunner { + createRunnerF := func(_ phase0.Slot, shareMap map[phase0.ValidatorIndex]*spectypes.Share, slashableValidators []spectypes.ShareValidatorPK) *runner.CommitteeRunner { return runner.NewCommitteeRunner( networkconfig.TestNetwork, shareMap, diff --git a/protocol/v2/ssv/spectest/ssv_mapping_test.go b/protocol/v2/ssv/spectest/ssv_mapping_test.go index b271034629..a46d06e419 100644 --- a/protocol/v2/ssv/spectest/ssv_mapping_test.go +++ b/protocol/v2/ssv/spectest/ssv_mapping_test.go @@ -21,10 +21,10 @@ import ( "github.com/ssvlabs/ssv-spec/types/spectest/tests/partialsigmessage" "github.com/ssvlabs/ssv-spec/types/testingutils" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/networkconfig" "github.com/stretchr/testify/require" "go.uber.org/zap" - "github.com/ssvlabs/ssv/exporter/convert" tests2 "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" @@ -386,11 +386,15 @@ func fixRunnerForRun(t *testing.T, runnerMap map[string]interface{}, ks *spectes } } + if ret.GetBaseRunner().DomainTypeProvider == nil { + ret.GetBaseRunner().DomainTypeProvider = networkconfig.TestNetwork + } + return ret } func fixControllerForRun(t *testing.T, logger *zap.Logger, runner runner.Runner, contr *controller.Controller, ks *spectestingutils.TestKeySet) *controller.Controller { - config := qbfttesting.TestingConfig(logger, ks, convert.RoleCommittee) + config := qbfttesting.TestingConfig(logger, ks, spectypes.RoleCommittee) config.ValueCheckF = runner.GetValCheckF() newContr := controller.NewController( contr.Identifier, @@ -551,7 +555,7 @@ func fixCommitteeForRun(t *testing.T, ctx context.Context, logger *zap.Logger, c tests2.NewTestingBeaconNodeWrapped().GetBeaconNetwork(), &specCommittee.CommitteeMember, testingutils.NewTestingVerifier(), - func(slot phase0.Slot, shareMap map[phase0.ValidatorIndex]*spectypes.Share) *runner.CommitteeRunner { + func(slot phase0.Slot, shareMap map[phase0.ValidatorIndex]*spectypes.Share, slashableValidators []spectypes.ShareValidatorPK) *runner.CommitteeRunner { return ssvtesting.CommitteeRunnerWithShareMap(logger, shareMap).(*runner.CommitteeRunner) }, ) diff --git a/protocol/v2/ssv/testing/runner.go b/protocol/v2/ssv/testing/runner.go index 7639d1aece..72a078f1d9 100644 --- a/protocol/v2/ssv/testing/runner.go +++ b/protocol/v2/ssv/testing/runner.go @@ -6,7 +6,6 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/networkconfig" - "github.com/ssvlabs/ssv/operator/validator" "github.com/ssvlabs/ssv/protocol/v2/qbft/testing" "github.com/ssvlabs/ssv/protocol/v2/ssv/runner" "go.uber.org/zap" @@ -22,13 +21,13 @@ var TestingHighestDecidedSlot = phase0.Slot(0) var CommitteeRunner = func(logger *zap.Logger, keySet *spectestingutils.TestKeySet) runner.Runner { // TODO fixme ? - return baseRunner(logger, spectypes.RoleCommittee, validator.TempBeaconVoteValueCheckF(spectestingutils.NewTestingKeyManager(), spectestingutils.TestingDutySlot, nil, spectestingutils.TestingDutyEpoch), keySet) + return baseRunner(logger, spectypes.RoleCommittee, specssv.BeaconVoteValueCheckF(spectestingutils.NewTestingKeyManager(), spectestingutils.TestingDutySlot, nil, spectestingutils.TestingDutyEpoch), keySet) //return baseRunner(logger, spectypes.RoleCommittee, specssv.BeaconVoteValueCheckF(spectestingutils.NewTestingKeyManager(), spectestingutils.TestingDutySlot, nil, spectestingutils.TestingDutyEpoch), keySet) } var CommitteeRunnerWithShareMap = func(logger *zap.Logger, shareMap map[phase0.ValidatorIndex]*spectypes.Share) runner.Runner { // TODO fixme ? - return baseRunnerWithShareMap(logger, spectypes.RoleCommittee, validator.TempBeaconVoteValueCheckF(spectestingutils.NewTestingKeyManager(), spectestingutils.TestingDutySlot, nil, spectestingutils.TestingDutyEpoch), shareMap) + return baseRunnerWithShareMap(logger, spectypes.RoleCommittee, specssv.BeaconVoteValueCheckF(spectestingutils.NewTestingKeyManager(), spectestingutils.TestingDutySlot, nil, spectestingutils.TestingDutyEpoch), shareMap) //return baseRunnerWithShareMap(logger, spectypes.RoleCommittee, specssv.BeaconVoteValueCheckF(spectestingutils.NewTestingKeyManager(), spectestingutils.TestingDutySlot, nil, spectestingutils.TestingDutyEpoch), shareMap) } @@ -118,6 +117,7 @@ var baseRunner = func( ).(runner.Runner) case spectypes.RoleAggregator: return runner.NewAggregatorRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -130,6 +130,7 @@ var baseRunner = func( ).(runner.Runner) case spectypes.RoleProposer: return runner.NewProposerRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -142,6 +143,7 @@ var baseRunner = func( ).(runner.Runner) case spectypes.RoleSyncCommitteeContribution: return runner.NewSyncCommitteeAggregatorRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -154,6 +156,7 @@ var baseRunner = func( ).(runner.Runner) case spectypes.RoleValidatorRegistration: return runner.NewValidatorRegistrationRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -164,6 +167,7 @@ var baseRunner = func( ).(runner.Runner) case spectypes.RoleVoluntaryExit: return runner.NewVoluntaryExitRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, tests.NewTestingBeaconNodeWrapped(), @@ -318,6 +322,7 @@ var baseRunnerWithShareMap = func( ) case spectypes.RoleAggregator: return runner.NewAggregatorRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -330,6 +335,7 @@ var baseRunnerWithShareMap = func( ) case spectypes.RoleProposer: return runner.NewProposerRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -342,6 +348,7 @@ var baseRunnerWithShareMap = func( ) case spectypes.RoleSyncCommitteeContribution: return runner.NewSyncCommitteeAggregatorRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -354,6 +361,7 @@ var baseRunnerWithShareMap = func( ) case spectypes.RoleValidatorRegistration: return runner.NewValidatorRegistrationRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, contr, @@ -364,6 +372,7 @@ var baseRunnerWithShareMap = func( ) case spectypes.RoleVoluntaryExit: return runner.NewVoluntaryExitRunner( + networkconfig.TestNetwork, spectypes.BeaconTestNetwork, shareMap, tests.NewTestingBeaconNodeWrapped(), diff --git a/protocol/v2/ssv/validator/committee.go b/protocol/v2/ssv/validator/committee.go index 4aef1ebde5..a0675d482a 100644 --- a/protocol/v2/ssv/validator/committee.go +++ b/protocol/v2/ssv/validator/committee.go @@ -101,6 +101,7 @@ func (c *Committee) StartDuty(logger *zap.Logger, duty *spectypes.CommitteeDuty) } slashableValidators := make([]spectypes.ShareValidatorPK, 0, len(duty.BeaconDuties)) + validatorShares := make(map[phase0.ValidatorIndex]*spectypes.Share, len(duty.BeaconDuties)) toRemove := make([]int, 0) // Remove beacon duties that don't have a share @@ -115,21 +116,31 @@ func (c *Committee) StartDuty(logger *zap.Logger, duty *spectypes.CommitteeDuty) } validatorShares[bd.ValidatorIndex] = share } - // Remove beacon duties that don't have a share - if len(toRemove) > 0 { - newDuties, err := removeIndices(duty.BeaconDuties, toRemove) - if err != nil { - logger.Warn("could not remove beacon duties", zap.Error(err), zap.Ints("indices", toRemove)) - } else { - duty.BeaconDuties = newDuties - } - } - if len(duty.BeaconDuties) == 0 { - return errors.New("CommitteeDuty has no valid beacon duties") + // TODO bring this back when https://github.com/ssvlabs/ssv-spec/pull/467 is merged and spec is aligned + //// Remove beacon duties that don't have a share + //if len(toRemove) > 0 { + // newDuties, err := removeIndices(duty.BeaconDuties, toRemove) + // if err != nil { + // logger.Warn("could not remove beacon duties", zap.Error(err), zap.Ints("indices", toRemove)) + // } else { + // duty.BeaconDuties = newDuties + // } + //} + // + //if len(duty.BeaconDuties) == 0 { + // return errors.New("CommitteeDuty has no valid beacon duties") + //} + + // TODO REMOVE this after https://github.com/ssvlabs/ssv-spec/pull/467 is merged and we are aligned to the spec + // and pas validatorShares instead of sharesCopy the runner + // --> + var sharesCopy = make(map[phase0.ValidatorIndex]*spectypes.Share, len(c.Shares)) + for k, v := range c.Shares { + sharesCopy[k] = v } - - r := c.CreateRunnerFn(duty.Slot, validatorShares, slashableValidators) + // <-- + r := c.CreateRunnerFn(duty.Slot, sharesCopy, slashableValidators) // Set timeout function. r.GetBaseRunner().TimeoutF = c.onTimeout c.Runners[duty.Slot] = r