ark-network / ark

Ark is a layer-two protocol designed to scale Bitcoin transactions
https://arkdev.info
MIT License
73 stars 18 forks source link

Add vtxo.CreatedAt #295

Open altafan opened 2 months ago

altafan commented 2 months ago

The vtxo contains info about when it expires but not about when it was created.

ATM can determine the creation timestamp for a vtxo with vtxo.ExpiresAt - asp.RoundLifetime but with the assumption that the ASP never changes the round lifetime. Impossible to calculate the timestamp for a pending vtxo instead.

tiero commented 2 months ago

I would concur that also having a way to carry the data related to the shared output could be useful. You could infer the "genesis" from the block time, but having both is useful

altafan commented 2 months ago

atm the vtxo struct includes a field for the round txid. Don't you think this is enough? storing the same data for many vtxos doesn't seem to me a good idea

tiero commented 2 months ago

Yea not talking about storage, not on the interface would be handy to join together all info that are helpful. Txid is perfect indeed