-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RPC for chunked send of DAS batches
This adds support for the batch poster in AnyTrust configuration to send batches to the DA committee in chunks of a configurable maximum HTTP POST body size. It adds new RPC methods to the daserver executable's RPC server, das_startChunkedStore, das_sendChunk, das_commitChunkedStore, which the clients created by the batch poster will automatically use if they are detected to be available on the committee server, otherwise it will fall back to the legacy das_store method. This allows an easy roll out of either the client or server first. The payloads of the new RPC methods are all signed by the batch poster. As basic DoS prevention, at most 10 uncommitted stores can be outstanding, uncommitted stores expire after a minute, and a das_startChunkedStore with the same arguments is not replayable after a minute. The batch poster should only be trying to store one batch at a time, so this should be sufficient. The new option --node.data-availability.rpc-aggregator.max-store-chunk-body-size is expressed in terms of the HTTP POST body size that the operator wants the chunk requests to stay under. 512B of padding is also added to whatever the user operator specifies here, since some proxies or endpoints may additionally count headers. This is orthogonal to settings like --node.batch-poster.max-size which control the maximum uncompressed batch size assembled by the batch poster. This should allow the batch poster to create very large batches which are broken up into small chunks to be sent to the committee servers. Once the client has received confirmation to its das_startChunkedStore request, it sends chunks in parallel using das_sendChunk, then once all chunks are sent uses das_commitChunkedStore to cause the data to be stored in the server and to retrieve the signed response to aggregate into the Data Availability Certificate. Server-side metrics are kept largely the same between chunked and non-chunked stores to minimize dashboard/alerting changes. In the context of chunked transfers, the metrics mean as follows: arb_das_rpc_store_requests - Count of initiated chunked transfers arb_das_rpc_store_success - Successful commits of chunked transfers arb_das_rpc_store_failure - Failure at any stage of the chunked transfer arb_das_rpc_store_bytes - Bytes committed arb_das_rpc_store_duration - Total duration of chunked transfer (ns) Additionally two new metrics have been added to count individual das_sendChunk requests: arb_das_rpc_sendchunk_success arb_das_rpc_sendchunk_failure
- Loading branch information
1 parent
57f583b
commit 96885e0
Showing
9 changed files
with
302 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.