Pages:
Author

Topic: FINALLY!! OP_CHECKLOCKTIMEVERIFY.. it's big.. - page 2. (Read 4755 times)

legendary
Activity: 2044
Merit: 1005
Does bitcoin core allow signing for nonstandard p2sh script? I just tried this and gmaxwell pointed out there are missing templates for these new type of p2sh scripts so you cant sign these new escrow time locked scripts, although you can use an external lib to do this.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
So I think the Bitcoin script to do an ACCT would look something like this:

Code:
IF
   OP_SHA256
   CHECKSIGVERIFY
ELSE
   CHECKLOCKTIMEVERIFY DROP
   CHECKSIGVERIFY
ENDIF
2 CHECKMULTISIG

although I'm not sure if the above is correct (perhaps someone more familiar with Bitcoin script could provide some feedback).

Admittedly I'm not very well versed with P2SH so I'm not sure exactly how you could get the script that does not contain the nor public keys to actually work (but I do think this should be possible).
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
So, it means no one can do Transaction Malleability Attack anymore, right?

It only prevents malleability once the tx has been confirmed (before it is confirmed it is still potentially malleable although that itself is becoming harder to do due to other changes that have been introduced to prevent it).

The thing is that unlike nLockTime you can have the txid safely confirmed prior to the actual time in question (which is what made trying to do ACCT using nLockTime unpractical which is why projects that had claimed they could do this were actually only working on "testnet").
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
So, it means no one can do Transaction Malleability Attack anymore, right?
Merchants who accepted 0 confirmation in past might accept 0 confirmation again Smiley

Well, i just use SPV wallet, so i don't feel any differences.
sr. member
Activity: 257
Merit: 255
After reading about CLTV (a fairly simple explanation of it can be found here: https://bitcoinmagazine.com/articles/checklocktimeverify-or-how-a-time-lock-patch-will-boost-bitcoin-s-potential-1446658530) I have worked out how to tie it to the ACCT AT implementation and the workflow is as follows (assuming that Alice and Bob have decided that they are wanting to exchange 100 ATC for 0.001 BTC respectively):

Alice creates an ACCT AT to transfer 100 ATC to Bob (locked by a "secret" and with an automatic refund after 24 hours).

Alice gives Bob a BTC public key and then Bob then creates a Bitcoin 1 of 2 multi-sig address and sends 0.001 BTC to it with a special P2SH script.

The first part of this script requires Alice's signature plus a secret and the second part only requires Bob's signature but is CLTV locked for 12 hours.

Assuming both parties are happy then Alice will send a tx that contains the secret in order to move the BTC to another address she owns and Bob will send that secret to the ACCT AT to transfer the ATC to his account on the AT supporting blockchain.

If Alice never sends the tx then after 12 hours Bob can simply create a new tx to refund his BTC to another address and of course if Bob never creates the correct Bitcoin tx then Alice will automatically have her ATC refunded after 24 hours (of course 12 and 24 hours could be made smaller if desired).

Although it is a little more tricky on the BTC side, assuming that some software is written to take care of the script and multi-sig address, then it will be entirely possible to exchange BTC for any ATC (such as BURST or QORA) without the need of any 3rd party.


Thanks a lot for the explanation!
I really hope that AT finally gets more attention, more coins implementing it and more people using it.

legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
After reading about CLTV (a fairly simple explanation of it can be found here: https://bitcoinmagazine.com/articles/checklocktimeverify-or-how-a-time-lock-patch-will-boost-bitcoin-s-potential-1446658530) I have worked out how to tie it to the ACCT AT implementation and the workflow is as follows (assuming that Alice and Bob have decided that they are wanting to exchange 100 ATC for 0.001 BTC respectively and assuming fees have been added as appropriate for each blockchain):

Alice creates an ACCT AT to transfer 100 ATC to Bob (locked by a "secret" and with an automatic refund after 24 hours).

Alice gives Bob a BTC public key and then Bob then creates a Bitcoin 2 of 2 multi-sig address and sends 0.001 BTC to it with a special P2SH script.

The first part of this script requires Alice's signature plus a secret and the second part only requires Bob's signature but is CLTV locked for 12 hours.

Assuming both parties are happy (say after 6 confirmations) then Alice will send a tx that contains the secret in order to move the BTC to another address she owns and Bob will send that secret to the ACCT AT to transfer the ATC to his account on the AT supporting blockchain.

If Alice never sends the tx then after 12 hours Bob can simply create a new tx to refund his BTC to another address and of course if Bob never creates the correct Bitcoin tx then Alice will automatically have her ATC refunded after 24 hours (of course 12 and 24 hours could be made smaller if desired).

Although it is a little more tricky on the BTC side, assuming that some software is written to take care of the script and multi-sig address, then it will be entirely possible to exchange BTC for any ATC (such as BURST or QORA) without the need of any 3rd party (although you'd still need to find somewhere to match an order).
legendary
Activity: 1260
Merit: 1116
Here's another thread. It explains some more: https://bitcointalk.org/index.php?topic=1101437.20
sr. member
Activity: 314
Merit: 250
As of the release of Core 0.11.2 OP_CHECKLOCKTIMEVERIFY is now becoming a reality.

When will it be activated? It requires a fork it seems.

The announcement says it's been activated already, but I think it needs a mountain of other changes to be fully usable. The technical details in the announcement aren't easy to understand, but I interpreted it as saying lock timed transactions can't be put into a block or the mempool until after the lock time's up. If my interpretation's right that will need changing before OP_CHECKLOCKTIMEVERIFY becomes fully usable.

https://bitcoin.org/en/release/v0.11.2

Quote
BIP65 soft fork to enforce OP_CHECKLOCKTIMEVERIFY opcode

This release includes several changes related to the BIP65 soft fork which redefines the existing OP_NOP2 opcode as OP_CHECKLOCKTIMEVERIFY (CLTV) so that a transaction output can be made unspendable until a specified point in the future.

This release will only relay and mine transactions spending a CLTV output if they comply with the BIP65 rules as provided in code.

This release will produce version 4 blocks by default. Please see the notice to miners below.

Once 951 out of a sequence of 1,001 blocks on the local node’s best block chain contain version 4 (or higher) blocks, this release will no longer accept new version 3 blocks and it will only accept version 4 blocks if they comply with the BIP65 rules for CLTV.

For more information about the soft-forking change, please see https://github.com/bitcoin/bitcoin/pull/6351
legendary
Activity: 2142
Merit: 1010
Newbie
As of the release of Core 0.11.2 OP_CHECKLOCKTIMEVERIFY is now becoming a reality.

When will it be activated? It requires a fork it seems.
legendary
Activity: 2282
Merit: 1072
https://crowetic.com | https://qortal.org
Awesome news, indeed!
legendary
Activity: 1120
Merit: 1004
I'm afraid that I didn't understand. What does it actually mean ? You could buy altcoins directly from Bitcoin Core ? How could it be organised ? It seems unrealistic for me.
legendary
Activity: 1792
Merit: 1111
I don't see this big news. Its actually bad, you never know if there are some "paused" coins spent.
This can give heads-up to some traders, and some will be unaware :/
Thats pretty sad day

I don't follow you. What do you mean ?



He meant to get paid for his ad-sig
hero member
Activity: 700
Merit: 501
This is goooood news..
As of the release of Core 0.11.2 OP_CHECKLOCKTIMEVERIFY is now becoming a reality.
This has major implications, as it means that REFUND TXNs now work. Without having to worry about TXN malleability.
...

You probably shouldn't say "refund" txs, it is more like escrow, and when the terms are not fulfilled, it is returned to you.
Refund makes it sound more like on-the-spot return.

But anyway this is great news. Many new features and companies will come from this.

I think it will take a bit of time until all those mainstream companies realize any of this. I mean the average guy who is involved in here in this forum probably doesn't know what stuff like OP_CHECKLOCKTIMEVERIFY does, let alone people outside the Bitcoin ecosystem. This is good news for us because I dont want an higher price just yet.
legendary
Activity: 3948
Merit: 3191
Leave no FUD unchallenged
November 13, 2015, 11:09:40 AM
#9
Yes - if it works with an SHA256 hash then it would be compatible with AT.


Fantastic news.  Qora and Burst are so undervalued at the moment, so the fact that they're pretty much all set to go for Atomic Cross Chain Transfers while other coins will be playing catch up is a definite buy signal for me.  Time to increase some holdings while it's cheap!
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
November 13, 2015, 10:44:52 AM
#8
Yes - if it works with an SHA256 hash then it would be compatible with AT.

EDIT: To clarify if a "Bitcoin script" is written that works by checking a secret then it would be compatible with the Atomic Cross-Chain Transfer AT although it is not clear to me how OP_CHECKLOCKTIMEVERIFY is really going to help (as it just prevents an output from being spendable for X blocks).
legendary
Activity: 1092
Merit: 1001
November 13, 2015, 10:44:04 AM
#7
This is goooood news..
As of the release of Core 0.11.2 OP_CHECKLOCKTIMEVERIFY is now becoming a reality.
This has major implications, as it means that REFUND TXNs now work. Without having to worry about TXN malleability.
...

You probably shouldn't say "refund" txs, it is more like escrow, and when the terms are not fulfilled, it is returned to you.
Refund makes it sound more like on-the-spot return.

But anyway this is great news. Many new features and companies will come from this.
hero member
Activity: 718
Merit: 545
November 13, 2015, 10:29:26 AM
#6
I don't see this big news. Its actually bad, you never know if there are some "paused" coins spent.
This can give heads-up to some traders, and some will be unaware :/
Thats pretty sad day

I don't follow you. What do you mean ?

The coins are sent to a multi-sig contract that can refund you at a future time. You can't spend the coins once you have initiated the procedure (sent them to the multi-sig contract).

The only 'issue' is if one party refuses to complete the trade (refuses to sign the multi-sig txn), in which case the coins will be refunded.
legendary
Activity: 2296
Merit: 1014
November 13, 2015, 10:20:25 AM
#5
I don't see this big news. Its actually bad, you never know if there are some "paused" coins spent.
This can give heads-up to some traders, and some will be unaware :/
Thats pretty sad day
hero member
Activity: 718
Merit: 545
November 13, 2015, 10:16:39 AM
#4
Would this be compatible with coins currently supporting AT, such as Qora and Burst?  They can already do atomic cross chain transfers directly from one blockchain to the other without an exchange, but I don't know if it's done via a different method.  I can grasp enough to understand vaguely how Automated Transactions work, but not the technical inner workings and whether it uses OP_CHECKLOCKTIMEVERIFY or not.  Would be amazing if I could trade Between BTC/Qora/Burst without relying on an intermediary.

Absolutely.

The ACCT 'trick' involves revealing the preimage of a hash value. (show you know the value that hashes to a value locked in the smart contract.)

Looking at https://ciyam.org/at/at_atomic.html that is exactly how AT does it as well.

CIYAM ?
legendary
Activity: 3948
Merit: 3191
Leave no FUD unchallenged
November 13, 2015, 09:55:10 AM
#3
This is goooood news..

As of the release of Core 0.11.2 OP_CHECKLOCKTIMEVERIFY is now becoming a reality.

This has major implications, as it means that REFUND TXNs now work. Without having to worry about TXN malleability.

So that lots and lots of clever smart contracts can be written and used, that were more like fantasy stories a mere couple of months ago..

For me, the BIG ONE, is Atomic Cross Chain Transfers.

We can now finally see the light at the end of the 'Trust-Free 100%-Secure Crypto-Exchange' tunnel. (Crypto, not FIAT, as FIAT always requires trust)

Lots of other uses too. (Lightning Network is another..)

..

Just wanted to pass that info on..  Grin

Would this be compatible with coins currently supporting AT, such as Qora and Burst?  They can already do atomic cross chain transfers directly from one blockchain to the other without an exchange, but I don't know if it's done via a different method.  I can grasp enough to understand vaguely how Automated Transactions work, but not the technical inner workings and whether it uses OP_CHECKLOCKTIMEVERIFY or not.  Would be amazing if I could trade Between BTC/Qora/Burst without relying on an intermediary.
Pages:
Jump to: