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

Fetch Completed Snark on Bootstrap in order to fix high Snark Bid Variance and empty blocks #16221

Open
svv232 opened this issue Oct 14, 2024 · 1 comment
Labels
mina-node Issues related to all types of mina node

Comments

@svv232
Copy link
Member

svv232 commented Oct 14, 2024

Problem
There are occasionally some unusually high snark bids that make it into blocks: see https://minaexplorer.com/analytics/snarks. This happens when block producers go offline and then back online before they are selected in a subsequent slot. Since the snark order book is constructed from purely gossip this makes the bid significantly less likely to be the most optimal.

Solution
On bootstrap it makes sense to fetch completed work from connected peers. The intention should be to fetch some batch of bids via rpc and apply/broadcast these bids to our own internal state.

The following PRS are a POC:
#16212
#16216

Test Plan
Manual:

  • Run 1 node that syncs to devnet
  • Run second node with node 1 as a trusted peer
  • Dump completed work after bootstrap
  • Check if output differs from the older version

Unit Test:

  • Idk if this is possible yet, but a unit test to bootstap that ingests some preconstructed list of completed work. Tbh i am not sure how useful this will, because we mainly care about the behavior over the network.
@deepthiskumar
Copy link
Member

deepthiskumar commented Oct 14, 2024

Another motivation, important one imo, is that on startup (or restart) if a node doesn't receive snarks that is required for it's next block then it loses the block reward

@deepthiskumar deepthiskumar changed the title Fetch Completed Snark on Bootstrap in order to fix high Snark Bid Variance Fetch Completed Snark on Bootstrap in order to fix high Snark Bid Variance and empty blocks Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mina-node Issues related to all types of mina node
Projects
Status: No status
Development

No branches or pull requests

2 participants