-
Notifications
You must be signed in to change notification settings - Fork 167
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 storage DOS attack in block proposals #2199
Comments
## Motivation Now that we have blobs, there are several follow ups we can do. ## Proposal This PR replaces Bytecode with Blobs. This will clean up a lot of code and also make our blocks smaller when publishing Bytecodes. Fixes #2149 #2199 ## Test Plan CI Some tests had to be altered since we don't have to subscribe to get bytecodes anymore, and also the `ApplicationId` format has changed with this.
I don't think this is 100% completed yet: We add to We need a rule for the pending blobs in the chain manager that guarantees liveness without allowing clients to add an arbitrary number of pending blobs. The only rule I can think of is:
All other pending blobs should go into a limited LRU cache. |
Currently a lot of invalid block proposals with new blobs can fill up validators' value caches. Maybe there should be a separate per-chain cache for the blobs that haven't been confirmed yet. |
Should be done after #2704 is done |
Actually, we probably need to finish #2186 also |
We still need to add a limit on the total size of a block proposal (including blobs). Talked with @afck, we were thinking maybe 13 MB? Ideally once we can stream from the client to the server (after gRPC Web adds support to it), we'll be able to just stream the blobs in the proposal over and hopefully the blob limits would be enough. |
We should not persist any certificate value (or blob) in storage before a block is confirmed.
Staged execution should behave silently differently from real execution by accepting to read certain certificate value (soon to be blobs) from a local in-memory map instead of storage.
Incidentally, we should tag the content of such map as used and verify that all of them are used after the fact, instead of making a pass where system operations are introspected. (This won't work for user blobs)
Also, when handing a block proposal, we shouldn't put the blobs into storage yet. And when handling a confirmed block certificate, we should only put them into storage after the execution.
The text was updated successfully, but these errors were encountered: