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

fix(miner): ignore lastWork when selecting the best mining candidate + tests #12659

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Oct 30, 2024

  1. fix(miner): ignore lastWork when selecting the best mining candidate

    Previously, we only took the new head if it's heavier than the last
    head. Unfortunately, this meant that F3 finalization wasn't properly
    propagated to the miner.
    
    In terms of impact:
    
    1. It seems likely that this check was simply defensive as, prior to F3,
    the new head should never have a lower weight (unless you're talking to
    multiple lotus nodes, I guess...).
    2. The `lastWork` field is mostly used to track null blocks. Worst-case
    scenario, if we switch heads, we'll attempt to re-mine previous heights.
    However, that should be relatively fast and, due to the slash filter, we
    won't attempt to re-broadcast any of those blocks.
    Stebalien committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    e1a0572 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. Configuration menu
    Copy the full SHA
    c80f32d View commit details
    Browse the repository at this point in the history
  2. [WIP] test: checkpoint to a fork

    This test still doesn't pass and I'm not sure why:
    
    1. Sync is a bit broken because it can't figure out that we already have
    all the data locally.
    2. But with 2 nodes, it should work. Except that, if I add some logging,
    I see that sync works until the libp2p nodes just flat-out disconnect
    from eachother.
    Stebalien committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    4404614 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. fix(miner): check the slash filter with the correct parent height

    We also perform this check inside `SyncSubmitBlock` so we did have an
    effective filter, but this was still wrong.
    Stebalien committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    065df6a View commit details
    Browse the repository at this point in the history
  2. fix(exchange): avoid adding ourselves as an exchange peer

    We have some cases where we submit a tipset to ourselves, from
    ourselves and end up calling `AddPeer` with our own ID. Ignore this case.
    Stebalien committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    d5a45ba View commit details
    Browse the repository at this point in the history
  3. fix(hello): submit new blocks from peers even if we're at genesis

    A side-effect of InformNewHead is to record the peer for future
    chain-sync sessions. If we don't pass blocks to InformNewHead here, we
    can have some difficulty bootstrapping networks.
    Stebalien committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    475eda5 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2024

  1. make gen

    masih committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    8d4a555 View commit details
    Browse the repository at this point in the history