We need better primitives to support automatic batching in synapse, improve add pieces UX and cost.
Synapse-core should have a support for upload/pull addpieces batching, with configurable wait time and batch size. Wait time should default to 1 event loop and be configurable in milliseconds and batch size should default to "auto" based on message size limit and be configurable in number of pieces.
High level usege in sdk should have settings to configure batch and disable batching.
Notes:
overhead (message encoding, addresses, msg signature, setid, listener, buffer as well) + 5 slots per piece + [nonce, keys, values, signature] < 64 kib
// overhead should be a constant, piece cids 5*32b, extra data should be abi encode hex > buffer.length
We need better primitives to support automatic batching in synapse, improve add pieces UX and cost.
Synapse-core should have a support for upload/pull addpieces batching, with configurable wait time and batch size. Wait time should default to 1 event loop and be configurable in milliseconds and batch size should default to "auto" based on message size limit and be configurable in number of pieces.
High level usege in sdk should have settings to configure batch and disable batching.
Notes: