-
Notifications
You must be signed in to change notification settings - Fork 71
feat: add sync committee pool & GET /eth/v1/validator/sync_committee_contribution endpoint #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
6b1b82f to
18406c1
Compare
3c96dfc to
62c4158
Compare
|
Could you please rebase this? I shall review it once you have. |
18406c1 to
3fa423f
Compare
@shariqnaiyer rebased. Thank you! |
|
Overall looks good, I wonder why sync committee pool is optional and is made none in most store initializations? Is that intentional? |
…ontributions. get /eth/v1/validator/sync_committee_contribution endpoint
3fa423f to
7b1dff7
Compare
Yes. Only some of sync committee related Beacon API endpoints need to access it. |
GossipsubMessage::SyncCommittee((sync_committee, subnet_id)) => {
info!(
"Sync Committee received over gossipsub: root: {}",
sync_committee.tree_hash_root()
);
match validate_sync_committee(&sync_committee, beacon_chain, subnet_id, cached_db)
.await
{
Ok(validation_result) => match validation_result {
ValidationResult::Accept => {
p2p_sender.send_gossip(GossipMessage {
topic: GossipTopic::from_topic_hash(&message.topic)
.expect("invalid topic hash"),
data: sync_committee.as_ssz_bytes(),
});
}
ValidationResult::Reject(reason) => {
info!("Sync committee message rejected: {reason}");
}
ValidationResult::Ignore(reason) => {
info!("Sync committee message ignored: {reason}");
}
},
Err(err) => {
error!("Could not validate sync committee message: {err}");
}
}
}We want to populate the sync committee pool. I believe we will have to add them once we see it in gossip messages. |
What was wrong?
Fixes #238
How was it fixed?
implemented GET /eth/v1/validator/sync_committee_contribution endpoint.
added sync committee pool to manage sync committee messages and contributions.
To-Do