Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Set the payment amount based on file size instead of fix amount #42

Open
floalex opened this issue Apr 1, 2018 · 0 comments
Open

Set the payment amount based on file size instead of fix amount #42

floalex opened this issue Apr 1, 2018 · 0 comments

Comments

@floalex
Copy link
Member

floalex commented Apr 1, 2018

Currently, we use a fix amount 10 for each transaction when when the user downloads/uploads shards each time, no matter how big or small the piece of file is. For example, owner pays the same amount of lumens for a 5MB piece of data, and also pays the same for a 1KB piece of data :

https://github.com/layr-team/batnode_proto/blob/20f947dea5a25ccbf43e36114979721b61044968/batnode.js#L51

While it works in our alpha phase, in real world situation we will need to calculate the amount for each shard/file based on its size to ensure fair usage.

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

No branches or pull requests

1 participant