bee
bee copied to clipboard
fix: stamped putter support for streamed chunk endpoint
Checklist
- [x] I have read the coding guide.
- [ ] My change requires a documentation update, and I have done it.
- [ ] I have added tests to cover my changes.
- [x] I have filled out the description and linked the related issues.
Description
This PR adds support for the WebSocket based chunk put endpoint to accept pre-signed (stamped) chunks.
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
The WebSocket based chunk put endpoint exists as a performance optimization so that chunks can be uploaded with smaller overhead than on the HTTP chunk endpoint. However currently the WebSocket based endpoint does not support pre-signed chunks. The proposed change adds 113 extra bytes to the chunk, which is the size of the serialized postage stamp structure (see postage.stampSize).
At the moment the PR is not ready for merging, because although technically it is working it is quite slow, most likely because it creates a new PutterSession with a pre-signed stamper for each chunk to be uploaded.