-
Notifications
You must be signed in to change notification settings - Fork 784
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
Update Blob Storage Structure #4104
Update Blob Storage Structure #4104
Conversation
I'm not familiar enough with how gossip / fork choice works to refactor enum AvailableBlockInner<E: EthSpec> {
Block(Arc<SignedBeaconBlock<E>>),
BlockAndBlob(
SignedBeaconBlock<E>,
SignedBlobSidecarList<E>,
),
} but when I tried to do that I got a bit lost in the changes to fork choice and gossip verification. I can keep going down this rabbit hole but perhaps @realbigsean or @divagant-martian have some ideas about this? |
This makes sense to me, but @pawanjay176 is working on something that looks a bit different in #4092 ( |
4c2f46b
to
0184c51
Compare
I've updated this PR to make it easier to merge into other PR's without conflicts |
&self, | ||
block_root: &Hash256, | ||
) -> Result<Option<SignedBeaconBlockAndBlobsSidecar<T::EthSpec>>, Error> { | ||
) -> Result<Option<Arc<BlobSidecarList<T::EthSpec>>>, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see why here it makes more sense to arc the list and not the individual blobs. Before storing them in the db we have blobs arc'd individually (since they arrive individually in gossip and rpc and need to use them in a couple of places)
(Question, not suggestion) Should we still store this as an arc'd list of un-arc'd elements?
// TODO (mark): verify this | ||
Ok(Arc::new(BlobSidecarList::empty())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't allocate so I think it's fine? Also better to differentiate between blobs not found and blobs not required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pawanjay176's pr seems to remove this entirely.. not sure why, perhaps we no longer have empty blobs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
he has a enum that has a variant Blobs::None
(if I remember correctly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer have to serve empty blobs via RPC (this was a relic of devnet 4) so we no longer need to do the ugly empty blob reconstruction logic. I would leave this as is and I can clean it up in pawan's PR once this is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if left like this we still won't serve empty blobs, this is just an empty list. What would you do differently after pawan's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that PR we're removing the fallback logic completely because it includes a db read for the block to check whether we should have blobs (and can return the correct Blobs
enum variant). So I think the method just returns None
. I don't think it was a good thing to always fallback to the block db read, at the end of the day if we don't have the blobs the data's not available. If we do want that fallback-to-block db read logic somewhere we can add it in a new method here somewhere. But I'm not sure where it's useful anymore now that we don't have to reconstruct empty blobs.
0184c51
to
149b883
Compare
149b883
to
0080df9
Compare
Issue Addressed