With聽the change in gas prices, one solution for cheaper and faster transactions are channels. A pre-requisite for having channels on a blockchain is to have time locked contracts. If time locked contracts are not employed, then a party could decide to not co-operate in the channel and the channel will be open indefinitely, unless a centralised service administrates.
Currently for ICOs that activate after block X, users must constantly watch the block height and or rely on a third party service to ensure that their transaction is included in a closest block after block X.
Adding a new Field to the transaction structure: "BlockLockTime".
If wallets automatically set the BlockLockTime to the current block, then an attacker or faulty node will not be able to re-arrange transactions into an earlier block, if a fork occurs.
+1 from me.
Can this be used as an alternative?
Can the smart contract access that information through a call?
You can get the current height of blockchain at runtime.
@erikzhang Yep, the nodes can check the script attribute instead of a fixed transaction field.
In terms of performance, I am not sure which is faster. Nodes could either keep a cache of the blocklocktimes for each transaction that has it, or they could check upon each consensus round.
Additional characters may need to be prepended to the blocklocktime so that the node, so that it can easily know whether the Script attribute contains an address or the blocklocktime.
I think a better solution would be to add a new transaction types for the lock time transactions. Adding lock time to old transactions types would mean that the majority of transactions are going waste 8 bytes. If we assume that we will hit a stable 1000 tps at some point in the future, roughly 8x1000x60x60x24x365=252,288,000,000 bytes are going to be wasted every year if you don't count the transactions which actually use the lock time feature.
You two little devils around here, @decentralisedkev and @toghrulmaharramov. aheuaheauhuea
@erikzhang and @igormcoelho, maybe the current SC capabilities can already handled this.
I think that this issue can be closed, right?
This is already possible on Neo 2.0 using Script field, like Erik said... and just for the record, on Neo 3.0 transaction will (probably) include a special field for transaction expiration, which is very good for accounting.
Most helpful comment
You two little devils around here, @decentralisedkev and @toghrulmaharramov. aheuaheauhuea