Bitcoin Forum
September 16, 2019, 03:25:38 PM *
News: If you like a topic and you see an orange "bump" link, click it. More info.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Confirm TX at given block height  (Read 169 times)
matsi90
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 03, 2019, 11:03:32 PM
 #1

Wish to make a TX that is published now, but confirmed at a given block height.

Current block: 579,117
Wish to confirm at: 585,500

How?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568647538
Hero Member
*
Offline Offline

Posts: 1568647538

View Profile Personal Message (Offline)

Ignore
1568647538
Reply with quote  #2

1568647538
Report to moderator
1568647538
Hero Member
*
Offline Offline

Posts: 1568647538

View Profile Personal Message (Offline)

Ignore
1568647538
Reply with quote  #2

1568647538
Report to moderator
TryNinja
Legendary
*
Online Online

Activity: 1134
Merit: 1466


CS <3


View Profile
June 03, 2019, 11:09:06 PM
 #2

You could make the tx with a extremely high fee (to be one one of the highest tx fees) right before this specific block (so, 584,499). Other than that, I don’t see what you could do.

matsi90
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 03, 2019, 11:14:54 PM
 #3

No. The TX must be published now at current block height (579,116) and confirmed at 585,500.

Edit: The goal is that neither sender or receiver can spend the coins between block 579,116 and 585,500.
Thirdspace
Hero Member
*****
Offline Offline

Activity: 1106
Merit: 717


Mixing reinvented for your privacy | chipmixer.com


View Profile
June 03, 2019, 11:49:24 PM
Merited by OgNasty (1), LoyceV (1), o_e_l_e_o (1)
 #4

No. The TX must be published now at current block height (579,116) and confirmed at 585,500.

Edit: The goal is that neither sender or receiver can spend the coins between block 579,116 and 585,500.
I think you can use nLocktime (time-locked transaction) for that,
but senders/signers can create a new non-locktime tx with earlier confirmation to invalidate that transaction
another option is using a time-locked address, confirmed now but cannot be spend before specified time

khaled0111
Hero Member
*****
Offline Offline

Activity: 826
Merit: 550



View Profile
June 03, 2019, 11:51:48 PM
Merited by LoyceV (2), OgNasty (1), o_e_l_e_o (1)
 #5

You can create a time-locked transaction.
You can lock the transaction until a given time or a block height is reached.

From: https://coinb.in/#newTransaction
Click Advanced Options then set Lock Time as it suits you.

If the number you entered is smaller than 500.000.000 it will be interpreted as block height. If it is greater, it will be interpreted as Unix time.

          ███████
      ██   ▀███▀   ██
  ▄█▄  ▄▄█████████▄▄  ▄█▄
 ▄███▄██▀▀       ▀▀██▄███▄
 ██▀███    ▄▄█▄█    ███▀██
    ██      █▀▀██    ██
██  ██     █████▀    ██  ██
    ██   ▄▄█▄▄▄██    ██
 ██▄███    █▀█▀▀    ███▄██
 ▀███▀██▄▄       ▄▄██▀███▀
  ▀██  ▀▀█████████▀▀  ██▀
      ██   ▄███▄   ██
          ███████
bspin   ███████████████████████
███████████████████████████
███████████████████████████
███████▀█▀    ▀▀▀██▀███████
███████            ▄███████
███████ ▄██▄▄▄▄▄▀ ▄████████
███ ▀  ▀  ██▀▀   ▄▀  ▀  ███
███▄▄█▀  █▀     █▄▄█▀  ████
█████   █▀       ██   █████
████▄▄▄▄█▄▄▄▄▄▄▄▄█▄▄▄▄█████
███████████████████████████
███████████████████████████
  ███████████████████████
       ▄▄█████████▄▄
    ▄█████████████████▄
  ▄█████████████████████▄
 ▄█████████  █  █████████▄
▄████████        █████████▄
███████████  ██  ██████████
███████████       █████████
███████████  ███  █████████
▀████████        ▄████████▀
 ▀█████████  █  █████████▀
  ▀█████████████████████▀
    ▀█████████████████▀
       ▀▀█████████▀▀
..PLAY NOW..
pooya87
Legendary
*
Offline Offline

Activity: 1764
Merit: 1874


Remember tonight for it's the beginning of forever


View Profile
June 04, 2019, 02:30:26 AM
Merited by LoyceV (1)
 #6

remember that you can not "publish" or broadcast such a transaction to the network now because nodes will not keep these transactions in their mempool since based on your mentioned block heights you are choosing a block that is 6,383 far and it will take about 44 days to get there.
the only thing you can do is to sign and store the transaction locally and only broadcast it when the time comes and the transaction (based on the locktimes) becomes valid/mineable.

jackg
Copper Member
Legendary
*
Online Online

Activity: 1498
Merit: 1299


https://bit.ly/2FR9nyn - free python tutorials


View Profile
June 04, 2019, 01:55:47 PM
 #7

You could probably do with looking into atomic swaps if you want to make sure that neither party can move the funds for the 6000+ blocks.

If you use a time-locked transaction, unless the holder of the private key is trustworthy or you are deleting the private keys and are trusted in doing that by the other party then you can do the time locked transaction, but as pooya states, you can't have the transaction accepted by nodes until that block so you'll have to broadcast it once that block has passed.

The block time should probably be 1 block before the target too (afaik).

ETFbitcoin
Legendary
*
Offline Offline

Activity: 1764
Merit: 2023

Use SegWit and enjoy lower fees.


View Profile WWW
June 04, 2019, 06:06:05 PM
 #8

Don't forget the probability 2 blocks are mined quickly (less than 10s) where usually the 2nd is empty/near empty block which makes your transaction might not able confirmed exactly at block height #585,500

You could probably do with looking into atomic swaps if you want to make sure that neither party can move the funds for the 6000+ blocks.

I don't see why atomic swap is needed in this case, i think multi-signature (either n-of-n or n-of-m) address is more appropriate

HCP
Legendary
*
Offline Offline

Activity: 1092
Merit: 1787

<insert witty quote here>


View Profile
June 04, 2019, 10:11:43 PM
 #9

As stated prior, nLockTime can only guarantee that the receiver cannot access the funds until a certain block... but it doesn't stop the sender from simply creating a new transaction to spend them, invalidating the original nLockTime transaction. So, I would agree that 2-of-3 MultiSig seems to be the solution here... using a trusted 3rd party to hold the 3rd private key.

Funds could be put into the multi-sig address now, effectively "locking" them, and when block# 585,500 arrives, the trusted 3rd party can co-sign a transaction to move the funds or release the 3rd key to the appropriate party, so that they can move the funds themselves.

Either that... or just send the funds to an escrow with instructions to not release until block# 585,500

Taras
Legendary
*
Offline Offline

Activity: 1372
Merit: 1034


Please do not PM me loan requests!


View Profile WWW
June 05, 2019, 12:08:42 AM
Merited by bones261 (2), HCP (2), ETFbitcoin (1), LoyceV (1)
 #10

You can use OP_CHECKLOCKTIMEVERIFY to get a transaction into the blockchain now (and confirmed), but unspendable until a certain block in the future. The payment will not be reversible after it is confirmed, and the money becomes unusable until the block in the future, when only the recipient is allowed to spend it. Coinbin has a tool to generate an address that uses OP_CHECKLOCKTIMEVERIFY, but it only supports using one public key. This is different from just creating a transaction and adding a time lock to it. This transaction will be published and confirmed in the blockchain before it can be spent, not after.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!