You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 0chain advocates minimum unit of data to be 64KB per file we need to correct price calculation for data stored in an allocation.
If S is size of data in writemarker and W is the write price then price calculation in storage smart contract should be:
Price(p) = Ceil_of(S / 64KB) * 64KB * W
However client can be clever to upload multiple files say, 1KB each and commit them with single writemarker. In this case if client had uploaded 64 such files then total size in writemarker is 64KB in which case above price calculation is not enough. Blobber however can decide whether to accept such writemarkers or not. In the above case, blobber should expect to get total size in writemarker to be 64 *64KB and if not then it should reject the writemarker.
Since 0chain advocates minimum unit of data to be 64KB per file we need to correct price calculation for data stored in an allocation.
If
S
is size of data in writemarker andW
is the write price then price calculation in storage smart contract should be:Price(p) = Ceil_of(S / 64KB) * 64KB * W
However client can be clever to upload multiple files say, 1KB each and commit them with single writemarker. In this case if client had uploaded 64 such files then total size in writemarker is 64KB in which case above price calculation is not enough. Blobber however can decide whether to accept such writemarkers or not. In the above case, blobber should expect to get total size in writemarker to be 64 *64KB and if not then it should reject the writemarker.
This issue is an alias of 0chain/gosdk#451
The text was updated successfully, but these errors were encountered: