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

Block from future is ignored #239

Closed
heifner opened this issue Jun 5, 2024 · 3 comments · Fixed by #1034
Closed

Block from future is ignored #239

heifner opened this issue Jun 5, 2024 · 3 comments · Fixed by #1034
Assignees
Labels
enhancement New feature or request 👍 lgtm OCI Work exclusive to OCI team

Comments

@heifner
Copy link
Member

heifner commented Jun 5, 2024

On the spring beta1 testnet, local node synced up:

info  2024-06-05T12:51:28.342 nodeos.be net_plugin.cpp:3902           process_signed_block ] block_validate_exception connection - 6: #4782125 4af601b35d70b371...: Block is from the future (3030007)
received a block from the future, ignoring it: 0048f82d4af601b35d70b371b28cb24dad93753400183c37f5023f70d586e68b

Sends handshake and then gets the block again and it applies it with no issue.

info  2024-06-05T12:51:33.477 nodeos.be controller.cpp:3454           log_applied          ] Received block 4af601b35d70b371... #4782125 @ 2024-06-05T12:51:35.000 signed by dumpsterfire [trxs: 0, lib: 4782120, net: 0, cpu: 1, elapsed: 341, time: 1169, latency: -1522 ms]

Seems we are a bit too aggressive about what we consider the future. Aggravated by my clock being skewed by about 3 seconds.

@heifner
Copy link
Member Author

heifner commented Nov 14, 2024

Current threshold is 7 seconds.

@bhazzard
Copy link

Scope this to just non-bp / non-finalizer. Allow unlimited blocks from the future. Leave the current limits for BP / Finalizer.

@bhazzard bhazzard added enhancement New feature or request 👍 lgtm and removed triage labels Nov 14, 2024
@bhazzard bhazzard added this to the Spring v1.1.0-rc1 milestone Nov 14, 2024
@heifner
Copy link
Member Author

heifner commented Nov 14, 2024

Speculative blocks currently use:

block_timestamp_type producer_plugin_impl::calculate_pending_block_time() const {
const chain::controller& chain = chain_plug->chain();
const fc::time_point now = fc::time_point::now();
const fc::time_point base = std::max<fc::time_point>(now, chain.head().block_time());
return block_timestamp_type(base).next();
}

Which looks at now. Need to modify that for speculative blocks to always use head_block_time.next() instead.

@heifner heifner self-assigned this Nov 14, 2024
@heifner heifner added the OCI Work exclusive to OCI team label Nov 14, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog Nov 14, 2024
@heifner heifner moved this from In Progress to Awaiting Review in Team Backlog Nov 15, 2024
heifner added a commit that referenced this issue Nov 15, 2024
Do not reject future blocks on speculative nodes
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Team Backlog Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 👍 lgtm OCI Work exclusive to OCI team
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants