Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix createPostageBatch function arguments in the README & testcases #917

Open
rampall opened this issue May 7, 2024 · 5 comments
Open

Comments

@rampall
Copy link

rampall commented May 7, 2024

createPostageBatch function arguments in the README & testcases need to be fixed / updated with realistic values that can be used as reference

image

image

@bee-runner bee-runner bot added the type:issue label May 7, 2024
@agazso
Copy link
Member

agazso commented May 7, 2024

What is realistic value as reference? I am thinking about a week for expiry, with depth=24 (44GB) could work.

@agazso
Copy link
Member

agazso commented May 8, 2024

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.

@rampall
Copy link
Author

rampall commented May 8, 2024

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 :)

@ldeffenb
Copy link
Contributor

ldeffenb commented May 8, 2024

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.
image
image

Maybe we need a new /stamps API that provides the actual current minimums given the current swarm conditions?

@rampall
Copy link
Author

rampall commented May 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants