Suppress error on duplicate blobs, track slashable blobs in blob gossip cache #4995
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
We were getting these errors in the builder flow on devnet 12. The proposals were successful, however. This was due to relays propagating blocks before returning them via the builder API (which is expected behavior). I've made the update to treat duplicate blobs as we do blocks, suppressing the duplicate error code.
In doing this, I realized we were not considering slashable blobs in the beacon API when fulfilling
broadcast_validation = consensus_and_equivocation
. So I've included changes to the blob sidecar gossip cache to also track block roots.Related: #4725
Additional Info
The gossip caches are starting to seem overly complicated to me. I think they could be made simpler if we separate out our slashability tracking into its own cache, and used this for blob and block gossip. We'd end up with 3 caches total. The gossip caches aren't really meant to be tracking slashability generally, the spec sort of makes us track it in a silo'd way, and this isn't really what we want for understanding "slashable blocks" elsewhere.
Related discussion: ethereum/consensus-specs#3561