You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In core/src/execution/state.rs there's a race condition when a latest or a finalized block gets pushed into blocks tree.
Each push of a block triggers a check for a need to backfill missed blocks (see push_block() method). There's no intention in helios to backfill blocks at startup, so it starts checking for a need to backfill only when it has at least 2 blocks in state.
However, in case when finalized block is pushed into blocks tree first, and latest block is second, there can be a large gap between these 2 blocks in blocks tree, which is then filled by sending RPC calls.
The text was updated successfully, but these errors were encountered:
Modified the push_block and push_finalized_block methods to prevent unnecessary backfilling when there's a large gap between finalized and latest blocks. Added a new max_backfill parameter to limit the number of blocks to backfill.
Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.
Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.
In
core/src/execution/state.rs
there's a race condition when a latest or a finalized block gets pushed intoblocks
tree.Each push of a block triggers a check for a need to backfill missed blocks (see
push_block()
method). There's no intention in helios to backfill blocks at startup, so it starts checking for a need to backfill only when it has at least 2 blocks in state.However, in case when finalized block is pushed into
blocks
tree first, and latest block is second, there can be a large gap between these 2 blocks inblocks
tree, which is then filled by sending RPC calls.The text was updated successfully, but these errors were encountered: