-
Notifications
You must be signed in to change notification settings - Fork 113
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
Blob storage module #510
Blob storage module #510
Conversation
module-system/module-implementations/sov-blob-storage/src/lib.rs
Outdated
Show resolved
Hide resolved
module-system/module-implementations/sov-blob-storage/src/lib.rs
Outdated
Show resolved
Hide resolved
module-system/module-implementations/sov-blob-storage/src/lib.rs
Outdated
Show resolved
Hide resolved
It seems like there's some potential for type confusion here - is the stored blob a serialized |
Yes, I've done via introducing |
5694bec
to
a21c70b
Compare
a21c70b
to
0622ae2
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.
Looks great, thanks for addressing the comments @citizen-stig!
Description
This PR introduces a new module "sov-blob-storage" for storing Data Access (DA) layer blobs within the Rollup state. The addition of this module serves as a prerequisite for sequencing with soft confirmations. The default state transition function (STF) will utilize this module to manage deferred blocks.
The module consists of two key methods:
The State Transition Function (STF) now has the flexibility to decide which blobs to execute and when.
Consider a situation where the STF receives a blob from the preferred sequencer in block 100. It can use the
store_blob
function to hold onto deferred blobs, and later retrieve these blobs at the next block or after several blocks.Points to Consider
This PR mainly focuses on the public API for this module. The current implementation is straightforward and does not contain much business logic.
One key consideration is the "defer period", which refers to the number of blocks for which blobs will be deferred. Currently, this value is hard-coded in the STF, but should it be stored in the state instead?
Also, how strict should this module be? Should it limit the number of blobs that can be stored or track the total size of stored blobs? Should it permit the insertion of blobs out of order?
Linked Issues
Testing
Integration tests have been added
Docs
#![deny(missing_docs)]