Skip to content

Conversation

@Kayden-ML
Copy link
Contributor

I added a few beacon functions, get_seed, get_committee_count_per_slot and get_beacon_proposer_index and I'm currently working on implementing even more

Comment on lines +163 to +166
(self.get_active_validator_indices(epoch).len() as u64
/ SLOTS_PER_EPOCH
/ TARGET_COMMITTEE_SIZE)
.clamp(1, MAX_COMMITTEES_PER_SLOT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(self.get_active_validator_indices(epoch).len() as u64
/ SLOTS_PER_EPOCH
/ TARGET_COMMITTEE_SIZE)
.clamp(1, MAX_COMMITTEES_PER_SLOT)
max(1, min(MAX_COMMITTEES_PER_SLOT,
(self.get_active_validator_indices(epoch).len() as u64
/ SLOTS_PER_EPOCH
/ TARGET_COMMITTEE_SIZE)
))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo told me to us clamp instead

Copy link
Contributor

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@KolbyML KolbyML added this pull request to the merge queue Jan 12, 2025
Merged via the queue into ReamLabs:master with commit 82c9320 Jan 12, 2025
5 checks passed
@Kayden-ML Kayden-ML changed the title feat: added beacon functions feat: Implement beacon functions get_seed, get_committee_count_per_slot, compute_proposer_index and get_beacon_proposer_index Mar 28, 2025
@Kayden-ML Kayden-ML self-assigned this Mar 28, 2025
@Kayden-ML Kayden-ML moved this to Done in Ream Client Mar 28, 2025
@Kayden-ML Kayden-ML added this to the v0.1.0 milestone Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants