ava-labs / avalanchego

Go implementation of an Avalanche node.
https://avax.network
BSD 3-Clause "New" or "Revised" License
2.12k stars 669 forks source link

Simplify dependency registration #3139

Closed StephenButtolph closed 3 months ago

StephenButtolph commented 3 months ago

Why this should be merged

This PR removes complex handling to try to track whether a block was issued into consensus to determine if we can register a dependency on the block or not. To replace this handling, we simply look to see if the block was either requested or is pending to determine if the block can be a dependency.

How this works

Dependencies are resolved when:

  1. There was a request over the network for the dependency and that either succeeded or failed
  2. There was an issuer job with this dependency that was itself blocking on a different dependency.

How this was tested