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

#845: Return unknown previous block when the parent node is not final… #846

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

mvandeberg
Copy link
Member

…ized

Resolves #845

Brief description

Returns unknown_previous_block error when the parent node is not finalized. The prevents a deadlock when the parent node is trying to finalize and the child node is waiting on the parent node to finalize to create a state node.

Branch is not passing CI because it is not based on latest and therefore fails the pending_nonce integration test. This is expected. The branch is good otherwise and is running in dev.

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

@mvandeberg mvandeberg requested a review from sgerbino November 26, 2024 11:36
@@ -322,6 +322,8 @@ apply_block_result controller_impl::apply_block( const protocol::block& block, c
KOINOS_ASSERT( block_id == root->id(), unknown_previous_block_exception, "unknown previous block" );
return {}; // Block is current LIB
}
else
KOINOS_ASSERT( parent_node->is_finalized(), unknown_previous_block_exception, "unknown previous block" );
Copy link
Member

Choose a reason for hiding this comment

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

If the if uses braces we should use braces in the else

Copy link
Member

Choose a reason for hiding this comment

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

Also, it appears there's an integration failure

Copy link
Member Author

Choose a reason for hiding this comment

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

It fails the integration test because the branch was based on a commit prior to the nonce changes. I built the image manually and pushed it for testing p2p without all of the nonce code.

I can merge master in to the branch to pass integration tests, but then I cannot test it on its own with p2p.

@sgerbino sgerbino merged commit c436196 into master Dec 4, 2024
1 of 2 checks passed
@sgerbino sgerbino deleted the 845-state-node-error branch December 4, 2024 17:12
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.

[BUG]: Could not create state node
2 participants