-
Notifications
You must be signed in to change notification settings - Fork 227
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
dynamic sync committee subscriptions #3308
Conversation
beacon_chain/nimbus_beacon_node.nim
Outdated
epochToSyncPeriod = nearSyncCommitteePeriod(epoch) | ||
|
||
if epochToSyncPeriod.isNone or | ||
forkVersionAtEpoch(node.dag.cfg, epoch + 1) == |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the check here use epoch + epochToSyncPeriod.get
? Otherwise, if we are in the epochs just before the Altair branch and epochToSyncPeriod
was set to 3 for example, we would still not not subscribe (because epoch + 1
is still not an Altair epoch).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beacon_chain/consensus_object_pools/sync_committee_msg_pool.nim
Outdated
Show resolved
Hide resolved
beacon_chain/nimbus_beacon_node.nim
Outdated
node.network.subscribe(getSyncCommitteeTopic( | ||
forkDigests[gossipFork], subcommitteeIdx), basicParams) | ||
|
||
node.network.updateSyncnetsMetadata(nextSyncCommitteeSubnets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't necessarily connect to all of the nextSyncCommitteeSubnets
here though, so this update seems incorrect (due to the randomness in isEpochLeadTime
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…come Co-authored-by: zah <[email protected]>
… lookahead; enforce exception/effect tracking
This code needs to be restructured and moved to
this is a blocker, or we break 3rd-party vc:s |
It handles VCs fine: nimbus-eth2/beacon_chain/rpc/rest_validator_api.nim Lines 597 to 598 in 8de9457
nimbus-eth2/beacon_chain/nimbus_beacon_node.nim Lines 711 to 715 in 8de9457
|
… nearSyncCommitteePeriod
hm, is |
This sets enabling Having subscribe-or-not all As long as one treats not specifying the options at all the same as explicitly specifying their default options, then the only other vaguely reasonable approach here (sync/attnets options override all-subnet options) means that one'd have to specify both sync/attnet and subnet to get anything. These options/switches exist in software, and could be documented, but present complexity up front without increasing expressiveness. Furthermore, this version allows for backwards compatibility -- anyone already specifying So, this seems like the least worst version. Alternatively, one could just not allow separately setting sync/attnets, but there are use cases where they're differently appropriate; e.g., a boot node should specify both, while someone mostly looking to boost attestation-based profit slightly might only be interested in the attnets one. Some software uses a syntax closer to |
beacon_chain/nimbus_beacon_node.nim
Outdated
proc trackSyncCommitteeTopics*(node: BeaconNode) = | ||
# TODO | ||
discard | ||
proc trackCurrentSyncCommitteeTopics(node: BeaconNode, slot: Slot) {.async.} = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beacon_chain/nimbus_beacon_node.nim
Outdated
|
||
node.network.updateSyncnetsMetadata(currentSyncCommitteeSubnets) | ||
|
||
proc trackNextSyncCommitteeTopics(node: BeaconNode, slot: Slot) {.async.} = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.