Skip to content

Conversation

@eserilev
Copy link
Member

Issue Addressed

ethereum/consensus-specs#4476

Additional Info

This change affects many critical paths in lighthouse and should not be merged until after 8.0.0

the Ethereum kurtosis package is working to support this change here: ethpandaops/ethereum-package#1168

@eserilev eserilev requested a review from jxs as a code owner August 26, 2025 21:44
@eserilev eserilev added spec_change A change related to the Eth2 spec blocked work-in-progress PR is a work-in-progress gloas labels Aug 26, 2025
@dapplion
Copy link
Collaborator

dapplion commented Oct 4, 2025

Should this change consider that the slot time will change in the future? Or that's to be handled in a future PR

@eserilev
Copy link
Member Author

eserilev commented Oct 6, 2025

Should this change consider that the slot time will change in the future? Or that's to be handled in a future PR

I think we should handle that in a future PR to keep this diff here as small as possible

@eserilev
Copy link
Member Author

Fixed the above comments

@eserilev eserilev added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Nov 26, 2025
@jimmygchen
Copy link
Member

jimmygchen commented Nov 27, 2025

Thanks for addressing the feedback! The fixes look good

@mergify
Copy link

mergify bot commented Dec 3, 2025

This pull request has merge conflicts. Could you please resolve them @eserilev? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Dec 3, 2025
@eserilev eserilev added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Dec 3, 2025

let unaggregated_attestation_due = self
.chain_spec
.get_unaggregated_attestation_due()
Copy link

Choose a reason for hiding this comment

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

shouldn't function calls like these take in current epoch? - this way the gloas versions of timing vars can fetched when needed

Copy link
Member Author

Choose a reason for hiding this comment

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

thats out of scope for this PR

@mergify
Copy link

mergify bot commented Jan 1, 2026

This pull request has merge conflicts. Could you please resolve them @eserilev? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jan 1, 2026
@eserilev eserilev added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jan 2, 2026

// Test unaggregated attestation (3333 bps = 33.33% of 12s = 4s)
let unagg_due = spec.get_unaggregated_attestation_due().unwrap();
assert_eq!(unagg_due, Duration::from_millis(3999)); // 12000 * 3333 / 10000
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentional that the attestation deadline is 1ms earlier?

Copy link
Member Author

@eserilev eserilev Jan 12, 2026

Choose a reason for hiding this comment

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

yeah these deadlines are percentages now, e.g. the spec defines the unagg attestation deadline as 33.33% into the slot which is 3.99 seconds


/// Get the duration into a slot in which an unaggregated attestation is due
pub fn get_unaggregated_attestation_due(&self) -> Result<Duration, ArithError> {
self.get_slot_component_duration(self.attestation_due_bps)
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth pre-computing these so we don't have to compute and handle error at runtime? similar to the "Networking Derived" config above

Copy link
Member Author

@eserilev eserilev Jan 12, 2026

Choose a reason for hiding this comment

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

Yeah i was a bit on the fence about this. My reasoning for not pre-computing is that when we move to 6 second slot times, we'll have to compute this at runtime. Also in epbs the attestation times change so this will also need to be computed at runtime. We'll need to add a slot as an argument to this function

#[serde(with = "serde_utils::quoted_u64")]
seconds_per_slot: u64,
#[serde(with = "serde_utils::quoted_u64")]
slot_duration_ms: u64,
Copy link
Member

Choose a reason for hiding this comment

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

Needs a default for backwards compat with BNs that don't have this field

@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gloas spec_change A change related to the Eth2 spec v8.1.0 Post-Fulu release waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants