Skip to content
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

Decrease max_future_block_time_offset #1788

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Conversation

azarovh
Copy link
Member

@azarovh azarovh commented Jun 28, 2024

No description provided.

Copy link
Contributor

@TheQuantumPhysicist TheQuantumPhysicist left a comment

Choose a reason for hiding this comment

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

Round

Comment on lines -609 to -610
let last_header = headers.last().expect("Headers shouldn't be empty");
self.wait_for_clock_diff(last_header.timestamp()).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why removing this? Please be careful with such radical changes without studying the consequences.

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved it to the line 644 where the block height is available

chainstate/src/detail/chainstateref/mod.rs Outdated Show resolved Hide resolved
let last_header = headers.last().expect("Headers shouldn't be empty");
self.wait_for_clock_diff(
last_header.timestamp(),
first_header_prev_block_index.block_height(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be the height of the last header? (which is the height of the first header plus the number of headers minus one).

P.S. perhaps we should call max_future_block_time_offset for all heights in this range and choose the bigger.

@azarovh azarovh marked this pull request as draft June 28, 2024 13:41
@azarovh azarovh force-pushed the decrease_max_future_offset branch from d98ab17 to 49e55f3 Compare June 28, 2024 14:23
@azarovh azarovh marked this pull request as ready for review June 28, 2024 14:26
common/src/chain/config/mod.rs Outdated Show resolved Hide resolved
common/src/chain/config/mod.rs Outdated Show resolved Hide resolved
@azarovh azarovh merged commit ca60170 into master Jul 2, 2024
23 checks passed
@azarovh azarovh deleted the decrease_max_future_offset branch July 2, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants