Skip to content

GetBestMiningCandidate & F3 #730

@Stebalien

Description

@Stebalien

When we pick a base on which to mine, we compare:

  1. The current chain head.
  2. The last tipset we mined on.

If the last tipset we mined on is heavier, we'll stick with that. This leads to a problematic situation:

  1. We try mining on X.
  2. F3 finalizes Y at the same height, Y is lighter than X.
  3. We will keep trying to mine on X until someone else mines a block on Y.
  • One option here is to remove the lastWork field, I'm not 100% sure why we have it.
  • Another is to change ChainTipSetWeight to take checkpoints into account and set the weight to 0 for any tipset not compatible with the current checkpoint. We need to be careful here in case the tipset weight is used anywhere else, but I don't think it is?
  • The best option is probably just to ask lotus about the current checkpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions