Skip to content

Conversation

PoulavBhowmick03
Copy link
Contributor

Issue Addressed

Fixes #8054

}
InboundEvent::Msg(DelayColumnReconstruction(request)) => {
let mut reconstruction_delay = QUEUED_RECONSTRUCTION_DELAY;
let slot_duration = self.slot_clock.slot_duration().as_millis() as f64;
Copy link
Member

Choose a reason for hiding this comment

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

We avoid doing any float arithmetic due to rounding issues and general flakiness. Integer arithmetic in milliseconds would be my preference

Copy link
Member

Choose a reason for hiding this comment

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

yep, might be worth adding this preference to CLAUDE.md too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We avoid doing any float arithmetic due to rounding issues and general flakiness. Integer arithmetic in milliseconds would be my preference

got it. will make that change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We avoid doing any float arithmetic due to rounding issues and general flakiness. Integer arithmetic in milliseconds would be my preference

in that case, i was initially having RECONSTRUCTION_DEADLINE as a fraction (1/4) and then multiplying the slot_duration in millis with the numerator and denominator of the same. should i keep that approach?

let reconstruction_deadline_millis =
                    (slot_duration_millis * RECONSTRUCTION_DEADLINE.0)
                        / RECONSTRUCTION_DEADLINE.1;
                let reconstruction_deadline = Duration::from_millis(reconstruction_deadline_millis);

Copy link
Member

@eserilev eserilev Sep 21, 2025

Choose a reason for hiding this comment

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

I think the simplest is probably something like slot_duration_ms * reconstruction_deadline / 100. Or just divide by 4. Seems a bit unnecessary to multiply by one

@michaelsproul michaelsproul added the waiting-on-author The reviewer has suggested changes and awaits thier implementation. label Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants