-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix todo: rollkit adapter multiple blocks submission #62
Comments
Probably to implement the solution 3 is enough to accept all the blobs by the rollkit adapter ( This logic is off chain though so we can easily change it in the future if we don't like it anymore, thus seems to be a good starting point so to have a demo compliant to what rollkit expects . |
While squashing the blobs on the shim side is fine, I think it would be better placed in the adapter. Why? This operation is not an implementation detail. It seems to be actually important and we cannot sweep it under the rug. We could document that shim's |
Out of curiosity, how do the rollkit adapters for other DA layers implement this? |
It seems like there are two adapters besides the celestia one. bitcoin-da doesn't have much logic and I am not sure how exactly it implements the DA layer API. Avail targets the new API (as described in https://github.com/thrumdev/sugondat/issues/8#issuecomment-1812832555 ), as can be seen here. The new API doesn't suffer from this issue, because it returns a vector of IDs instead of a single height. To recap, an ID could be a serialized |
That's totally true, I tried to implement it just out of curiosity to understand what it should look like but I agree that it needs to be something really clear to rollkit developers! |
May be solved in #106 |
right now, rollkit adapter API can submit several blobs at the same time and expects that a single value "da layer height" is returned. It looks like it's implied that the blobs are going to be submitted all at the same time.
I am not sure why they make such an assumption, but it looks like we could:
batch_all
variety should work better, so that all blobs are either included or not included.submit_blob_batch
and then reimplementsubmit_blob
as a degenerate case ofsubmit_blob_batch
with one blob.The (2) approach seems to be (1) better on the first sight, at least because it's more efficient. Specifically, it performs a single check, instead of performing the checks for each blob. The (2) will require additional benchmarking on our side, whereas (1) won't?
Note
There is a weird thing, that if the blob validation fails, the blob will not get into the final NMT, but it will still occupy space in the block.
See https://github.com/thrumdev/sugondat/issues/74
The (3) maybe a good approach for now. It doesn't require any changes on the runtime side and should be pretty simple.
The text was updated successfully, but these errors were encountered: