Bitcoin Forum
May 21, 2024, 08:04:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Making a transaction whose output is spendable only after n blocks are found?  (Read 1163 times)
voileipa (OP)
Member
**
Offline Offline

Activity: 116
Merit: 10


View Profile
July 27, 2014, 11:53:47 AM
 #1

Making a transaction whose output is spendable only after n blocks are found?
Is that possible?`
kolinko
Full Member
***
Offline Offline

Activity: 518
Merit: 101



View Profile
July 27, 2014, 12:17:35 PM
 #2

Bitcoin has a nLockTime mechanism within the protocol, but there are various issues with it: http://bitcoin.stackexchange.com/questions/5783/transactions-with-a-wait-time-using-nlocktime

You can achieve a similar feat using M of N oracles:
https://github.com/orisi/orisi
https://www.youtube.com/watch?v=boPW1FwNu4c
yakuza699
Hero Member
*****
Offline Offline

Activity: 935
Merit: 1002


View Profile
July 27, 2014, 12:20:33 PM
 #3

I may be wrong but nLockTime isn't correctly implemented. nLockTime only works if the sequence number is lower than 4294967295 but transactions which sequence number is lower than 4294967295 are considered non standard if you set the sequence number to 4294967295 miners will ignore the nLockTime and will mine your transaction before nLock expires so no there is no such thing implemented. Correct me if i am wrong.

▄▄▄▄▄▄▄▄
▄▄▄▄▄▄
▄▄▄▄
BTC BitDice.me 
.
yakuza699
Hero Member
*****
Offline Offline

Activity: 935
Merit: 1002


View Profile
July 27, 2014, 01:00:54 PM
 #4

Bitcoin has a nLockTime mechanism within the protocol, but there are various issues with it: http://bitcoin.stackexchange.com/questions/5783/transactions-with-a-wait-time-using-nlocktime

You can achieve a similar feat using M of N oracles:
https://github.com/orisi/orisi
https://www.youtube.com/watch?v=boPW1FwNu4c

If i am not mistaken (sorry didn't had enough time to read everything) your client invades multi sig transactions but what if user wants to create transaction like this : A sends money directly to B(not involving multi sig) transaction appears on block explorers such as blockchain.info as unconfirmed and will not be confirmed till block x and B (even though you can spend unconfirmed transaction now) will not be able to spend those btc until the transaction is confirmed. Can i do this kind of thing with orisi?

▄▄▄▄▄▄▄▄
▄▄▄▄▄▄
▄▄▄▄
BTC BitDice.me 
.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 27, 2014, 04:33:16 PM
 #5

I may be wrong but nLockTime isn't correctly implemented. nLockTime only works if the sequence number is lower than 4294967295 but transactions which sequence number is lower than 4294967295 are considered non standard if you set the sequence number to 4294967295 miners will ignore the nLockTime and will mine your transaction before nLock expires so no there is no such thing implemented. Correct me if i am wrong.

That is how it works but it is implemented correctly.  nlocktime transactions which are not standard until the lock time is reached.  This is intentional because if it wasn't true one could spam the network at no cost by generating millions or billions of nlocktime transactions.   However this doesn't prevent you from giving the nlocktime transaction directly to the recipient out of band.
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
July 28, 2014, 08:07:05 AM
 #6

I may be wrong but nLockTime isn't correctly implemented. nLockTime only works if the sequence number is lower than 4294967295 but transactions which sequence number is lower than 4294967295 are considered non standard if you set the sequence number to 4294967295 miners will ignore the nLockTime and will mine your transaction before nLock expires so no there is no such thing implemented. Correct me if i am wrong.

That is how it works but it is implemented correctly.  nlocktime transactions which are not standard until the lock time is reached.  This is intentional because if it wasn't true one could spam the network at no cost by generating millions or billions of nlocktime transactions.   However this doesn't prevent you from giving the nlocktime transaction directly to the recipient out of band.

Here's my attempt to make above clearer (yakuza699 lack of punctation was a little confusing):
- nLockTime only works if the sequence number is lower than 4294967295
- transactions with sequence number lower than 4294967295 are considered non standard
- This is intentional because if it wasn't true one could spam the network at no cost by generating millions or billions of nlocktime transactions
- You can give the nlocktime transaction directly to the recipient out of band, and when the lock time is reached, the transaction becomes standard and the recipient can broadcast it
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4186
Merit: 8421



View Profile WWW
July 28, 2014, 03:04:24 PM
 #7

- nLockTime only works if the sequence number is lower than 4294967295
- transactions with sequence number lower than 4294967295 are considered non standard
If and only if their locktime hasn't passed, I realize you know this, but your message was a bit confusing. Smiley
kolinko
Full Member
***
Offline Offline

Activity: 518
Merit: 101



View Profile
July 30, 2014, 03:23:26 PM
 #8

If i am not mistaken (sorry didn't had enough time to read everything) your client invadesolves multi sig transactions but what if user wants to create transaction like this : A sends money directly to B(not involving multi sig) transaction appears on block explorers such as blockchain.info as unconfirmed and will not be confirmed till block x and B (even though you can spend unconfirmed transaction now) will not be able to spend those btc until the transaction is confirmed. Can i do this kind of thing with orisi?

For that, you'd need nLockTime, as others said Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!