lavaio / lava

Lava is a Proof-of-Capacity backed global digital infrastructure where people can create, trade and manage real-world assets.
https://www.lavatech.org/
MIT License
23 stars 12 forks source link

More detailed documentation about firestone consumption. #44

Open NStal opened 4 years ago

NStal commented 4 years ago
  1. Can miner buy firestone for another address?
  2. Can we specify which firestone to spend first?
  3. If we can't specify the firestone order, what's the current order of firestone spending?
  4. Can we get firestone purchase/revoke information from raw transaction?
kbroflovski21 commented 4 years ago

I'm trying to answer some of your questions, 1) You can do that by specifying a receiving address when you are buying a firestone. Just take notice that if the firestone you buy for any another address which is not under your control, you are risking yourself not getting refunded if the firestone expires. 2)&3) There is a FIFO rule of the firestone consumption. 4) I'm not that sure about what you exactly need for the infomation. If you are talking about raw TXs data, the firestone is done with something like scripts in TXs. If you are a miner and you have a mining address, you can always check how much firestone you have and their status (immature, usable and overdue).

NStal commented 4 years ago

Since we scan each block of new transactions to watch relevant transactions anyway, if we could have an easy way to inspect firestone with the raw transaction, things gonna be much more performant. Or we have to do the full firestone sync with the database at each height.

But considered the sane firestone count would be under 2048, I'll stick to the full sync solution.

Thank you.