Author

Topic: Correct steps for a delayed transaction? (Read 1519 times)

member
Activity: 116
Merit: 10
November 02, 2014, 01:43:28 PM
#6
Hhhm.. the nLockTime is not working.

I created a transaction with locktime = 630000 but it is still included in the blockchain

https://blockchain.info/tx/18b598bd76110151d6bea797d3c10bcfdc44454303da6d74fbd3f15c5e851d0a



If all TxIn inputs have final (0xffffffff) sequence numbers then locktime is ignored.

Thanks for the response. I set the sequence number to 0 and after that my bitcoind didn't broadcast the transaction until the given block height was reached:

Code:
>./bitcoin-cli sendrawtransaction $SIGNED_RAW_TX                  
error: {"code":-26,"message":"64: non-final"}

After the block height was reached I finally got the transaction in the block chain as expected:
https://blockchain.info/tx/d61839fb690395ba638ba804c5af4bf0111ff269ca1e0b251cff737ca6189557


I hope all nodes will relay (now and in future) transactions with custom nLockTimes and sequences!
legendary
Activity: 1652
Merit: 1015
November 02, 2014, 10:55:23 AM
#5
Hhhm.. the nLockTime is not working.

I created a transaction with locktime = 630000 but it is still included in the blockchain

https://blockchain.info/tx/18b598bd76110151d6bea797d3c10bcfdc44454303da6d74fbd3f15c5e851d0a



If all TxIn inputs have final (0xffffffff) sequence numbers then locktime is ignored.
member
Activity: 116
Merit: 10
November 02, 2014, 10:20:08 AM
#4
Hhhm.. the nLockTime is not working.

I created a transaction with locktime = 630000 but it is still included in the blockchain

https://blockchain.info/tx/18b598bd76110151d6bea797d3c10bcfdc44454303da6d74fbd3f15c5e851d0a

legendary
Activity: 1652
Merit: 1015
September 10, 2014, 03:15:35 AM
#3
I should do some attempts on the testnet before trying out for real. Just in case something goes wrong.
legendary
Activity: 3416
Merit: 4658
September 09, 2014, 09:50:40 AM
#2
I'm trying to create create a delayed transaction for myself. I'm using nLockTime and the following steps. The situation what I'm trying to reach is that there are 1 BTC that is not reachable until 10 000 blocks are found.

Are the following steps correct?

1. I create a new key-address pair. (KEY1 1Address1)
2. I send 1BTC to address 1Adddress1
3. I create new key-address pair. (KEY2 1Address2)
4. I create a transaction with nLockTime (currentblockheight + 10000). The input is 1Address1 and output 1Address2. I sign it with KEY1. HOWEVER, I do not broadcast the transaction.
5. I destroy KEY1.
6. Now I have a transaction, which is now valid until 10 000 blocks are found and I store it. After 10 000 blocks are found I broadcast the transaction and unlock the bitcoins with KEY2.

Does this work

Yes.

or can I just replace the nLockTime in the transaction with 0, so the transaction becomes instantly valid?

No.  If you replace nLockTime, then the signature is no longer valid.
member
Activity: 116
Merit: 10
September 09, 2014, 08:59:09 AM
#1
I'm trying to create create a delayed transaction for myself. I'm using nLockTime and the following steps. The situation what I'm trying to reach is that there are 1 BTC that is not reachable until 10 000 blocks are found.

Are the following steps correct?

1. I create a new key-address pair. (KEY1 1Address1)
2. I send 1BTC to address 1Adddress1
3. I create new key-address pair. (KEY2 1Address2)
4. I create a transaction with nLockTime (currentblockheight + 10000). The input is 1Address1 and output 1Address2. I sign it with KEY1. HOWEVER, I do not broadcast the transaction.
5. I destroy KEY1.
6. Now I have a transaction, which is now valid until 10 000 blocks are found and I store it. After 10 000 blocks are found I broadcast the transaction and unlock the bitcoins with KEY2.

Does this work or can I just replace the nLockTime in the transaction with 0, so the transaction becomes instantly valid?
Jump to: