@@ -18,6 +18,7 @@ import (
18
18
"github.com/OffchainLabs/prysm/v6/crypto/hash"
19
19
"github.com/OffchainLabs/prysm/v6/encoding/bytesutil"
20
20
"github.com/OffchainLabs/prysm/v6/math"
21
+ "github.com/OffchainLabs/prysm/v6/monitoring/tracing/trace"
21
22
ethpb "github.com/OffchainLabs/prysm/v6/proto/prysm/v1alpha1"
22
23
"github.com/OffchainLabs/prysm/v6/runtime/version"
23
24
"github.com/OffchainLabs/prysm/v6/time/slots"
@@ -297,6 +298,9 @@ func verifyAssignmentEpoch(epoch primitives.Epoch, state state.BeaconState) erro
297
298
// It verifies the validity of the epoch, then iterates through each slot in the epoch to determine the
298
299
// proposer for that slot and assigns them accordingly.
299
300
func ProposerAssignments (ctx context.Context , state state.BeaconState , epoch primitives.Epoch ) (map [primitives.ValidatorIndex ][]primitives.Slot , error ) {
301
+ ctx , span := trace .StartSpan (ctx , "helpers.ProposerAssignments" )
302
+ defer span .End ()
303
+
300
304
// Verify if the epoch is valid for assignment based on the provided state.
301
305
if err := verifyAssignmentEpoch (epoch , state ); err != nil {
302
306
return nil , err
@@ -345,6 +349,9 @@ func ProposerAssignments(ctx context.Context, state state.BeaconState, epoch pri
345
349
// It retrieves active validator indices, determines the number of committees per slot, and computes
346
350
// assignments for each validator based on their presence in the provided validators slice.
347
351
func CommitteeAssignments (ctx context.Context , state state.BeaconState , epoch primitives.Epoch , validators []primitives.ValidatorIndex ) (map [primitives.ValidatorIndex ]* CommitteeAssignment , error ) {
352
+ ctx , span := trace .StartSpan (ctx , "helpers.CommitteeAssignments" )
353
+ defer span .End ()
354
+
348
355
// Verify if the epoch is valid for assignment based on the provided state.
349
356
if err := verifyAssignmentEpoch (epoch , state ); err != nil {
350
357
return nil , err
0 commit comments