bee-js
bee-js copied to clipboard
fix `createPostageBatch` function arguments in the README & testcases
createPostageBatch
function arguments in the README & testcases need to be fixed / updated with realistic values that can be used as reference
What is realistic value as reference? I am thinking about a week for expiry, with depth=24
(44GB) could work.
According to this page: https://www.ethswarm.org/get-bzz
The current price 0.3331 BZZ for 1GB per month. So with the proposed values it would cost (44 * 0.3331 / 4) = 3.6641 BZZ, that is at today's price is about 1.47 USD, which I think is reasonable for testing.
What is realistic value as reference? I am thinking about a week for expiry, with
depth=24
(44GB) could work.
Depth 20 would be sufficient.
But the amounts in the examples ('2000' and '100') are too low for the stamp purchase to succeed irl.
The amount has to have a TTL of more than a day for a successful purchase.
So approximately any amount > 500000000
By "realisitic" - I mean a realistic minimum value that works :)
The actual minimum amount is affected by the storage price when the stamp batch is purchased. So if the price continues to go up, the amount will need to track. Therefore, it is tricky to document a "minimum" that "works" when the future is unknown.
Maybe we need a new /stamps API that provides the actual current minimums given the current swarm conditions?
True. Valid point!
The calculator widget in the bee docs calculates the minimum amount by taking the price from swarmscan api and multiplies it by 17280
(24 x 60 x 60 / 5) assuming a gnosis blocktime of 5 seconds.
- https://github.com/ethersphere/bee-docs/blob/0672e1d097198899d093f4eb6aefd62a3aa4cde5/src/components/VolumeAndDurationCalc.js#L93