-
Notifications
You must be signed in to change notification settings - Fork 34
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
Transaction fee calculation #126
Comments
Hey @Retamogordo 👋 |
Hi, thanks. |
At first glance (I forked the repo today): while post transaction code uses another formula to check if balance is sufficient: So my tx fails due to insufficient balance, despite I airdrop winston according to price query. } |
I see @Retamogordo |
Ouch.. |
Sure !, A PR has been raised on #127. I'll be sure to notify you when npm gets updated with this change. |
Hi, it's me again, |
Hey @Retamogordo , what @fuadop did here is to set the fee at the default from mainnet. Which will give the same fee calculation for 0 bytes. On mainnet, after a couple of bytes, the fees are completely dynamic, based on many factors that we cannot recreate on arlocal since there's no competition while mining, limits of txs per blocks, etc. Hope this helps answer why it's different. The fee should be calculated from the arlocal endpoint |
Cool, thank you. |
Hi,
I noticed that on 18 Nov 2021 src/routes/transaction.ts was refactored in such a way that transaction fee is calculated
roughly by (data.data_size * 1965132).
My app airdrops winston relying on arweave.transaction.getPrice(...) which yields a value more than ten times smaller than calculated by arlocal, so my transaction fails with status 410.
There is also online arweave fee calculator that yields yet another value.
So I'm confused of what is going on.
Is there a source of truth or a paper I could consult regarding this question ?
The text was updated successfully, but these errors were encountered: