Skip to content

Various fixes from testnet#140

Merged
daltoncoder merged 5 commits intomainfrom
d/testnet-fixes
Mar 11, 2026
Merged

Various fixes from testnet#140
daltoncoder merged 5 commits intomainfrom
d/testnet-fixes

Conversation

@daltoncoder
Copy link
Copy Markdown
Collaborator

Some fixes discovered from testnet

  • When loading from database properly call advance_epoch on epocher. Currently its set to 0 and never incremented if we replace initial state with a loaded DB
  • Increased the resolver retry timer from 100ms to 1 second. When we call fetch() on the commonware resolver we try to fetch every pending item we need from each peer in sequence. When a node was starting up 100ms retry timer was much too low and causing a snowball effect before we could even connect to peers
  • Removed the eager call to try_repair_gaps when starting syncer. This was kickstarting the snowball mentioned above. We wouldnt even be connected to our peers yet but the resolver does not remove pending items on failures. The node will still retry to repair gaps when it is connected to its peers and starts to receive blocks. commonware::Marshshall has this eager call to try_repair_gaps so this is a diff there. But this does not appear or do any good for us at the moment.
  • Added stop_at to MockEngineClient to have it stop building blocks at a certain height. Now that we have tests that compare state root they are a bit flaky because we would target to stop at block X but by the time we checked state root some of the nodes had executed an additional block changing its state root. This now prevents that with an optional parameter if you need to ensure they all stopped on the same block

@daltoncoder daltoncoder merged commit f39be7e into main Mar 11, 2026
4 checks passed
@daltoncoder daltoncoder deleted the d/testnet-fixes branch March 11, 2026 18:41
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.

1 participant