-
Notifications
You must be signed in to change notification settings - Fork 304
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
store non canonical blob sidecars #7258
store non canonical blob sidecars #7258
Conversation
PS: I set the option to |
Doc change PR: Consensys/doc.teku#459 |
We can't imply this by the fact |
We thought it would be better to separate them. Users might only need one or the other depending on their needs. |
When will we ever not use 'non-canonical-block' storage but set this enabled? If there's a way in which it differs from non canonical block storage, then I kind of get it, but if its storing non canonical blobs forever like we store non canonical blocks, then I'm struggling to see the use-case |
I thought separating them because blocks and blobs have actually very different use cases (at least in theory). I don't have a super-strong opinion if there is real need of separating the options. About forever storing, I think both non canonical blocks and blobs should respect the storage mode in place. In particular:
|
As long as we're pretty sure people actually want to store sidecars and not non canonical blocks specifically... I would be happy to make them just store both initially... I just don't want to end up in a position where because someone has used this flag and not that flag that they've got useless data they cant access anyway, or we have to do weird lookups because the block isn't present... it'll just be a big time sink for little value and no current call to do this permutation. |
Can we make sure we don't follow the non canonical block storage style? I don't want another special table that has to be completely separately handled unless we really have to do that... |
I will keep the option as it is and update the description and the doc then |
I'm implementing it the same way as non canonical blocks actually: A separate column where I move blob sidecars from the blob sidecars table to the non canonical blob sidecars one (when we update the finalized data if the feature is enabled). I understand this might imply heavy db operations (I batched them: 100 blocks at a time -> Max 100 blocks * 6 blobs) but I thought this would keep things simple and separate. In this case, there will be no impact when the feature is off. The current non canonical blocks storage is not ideal because we never delete them but that could be fixed and avoided right from the start with non canonical blob sidecars (if that's what's bothering you). Otherwise we were thinking of other approaches but none of them is really convincing:
Do you think it's worth implementing one of these? Or do we keep it the same way (separate table) and make sure we do the required cleanups? |
Separate block columns get complicated and slow things down, i think we want an understanding of why we need separate columns initially... To me this seems like it's either best off being a part of non canonical storage flag, or a development flag initially at best, and we need to be super careful about the database structure if we do end up storing them. Unless there's an actual identified need for it for L2's or something, more than just something we guess they might like... |
I agree that this is more a PO question. We are doing this not for debug purpose, it is for aligning the non-canonical feature with new deneb blobs. I assume there are real use-cases, even if not very popular. But if we are unsure, let's park it for now. Thinking about the need of having a separate column for non-canonical: it is for easely accessing canonical without the need of getting canonical blocks first to filter non canonical blobs out. This mainly impacts the From API perspective, now there is teku specific |
2250640
to
f3bf37e
Compare
I removed the non canonical blob sidecars storage option (I use the existing one related to the non canonical blocks) and added the persistence logic. |
f3bf37e
to
fc03e72
Compare
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 think there is something to fix.
I played a bit with the test, while trying to understand it better: tbenr@4d5e30d
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/KvStoreDatabase.java
Outdated
Show resolved
Hide resolved
I also suspect that we will need |
2b3defb
to
995c7a8
Compare
29150ad
to
e670d31
Compare
I think it will be better to update/add the APIs in a separate PR once this one 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.
We are vwry close. A couple of things still
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/KvStoreDatabase.java
Outdated
Show resolved
Hide resolved
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/KvStoreDatabase.java
Outdated
Show resolved
Hide resolved
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/KvStoreDatabase.java
Outdated
Show resolved
Hide resolved
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.
LGTM. I'd like to have a feedback from @zilm13 on the earliestBlobSidecarSlot
in thepruneBlobSidecars
method
PR Description
Add non canonical blob sidecars storage:
--data-storage-non-canonical-blocks-enabled
optionNON_CANONICAL_BLOB_SIDECAR_BY_SLOT_AND_BLOCK_ROOT_AND_BLOB_INDEX
BlobSidecarPruner
: Same logic as blob sidecars, the non canonical ones prior to the blob sidecars availability window are deletedFixed Issue(s)
#7229
Documentation
doc-change-required
label to this PR if updates are required.Changelog