Bitcoin Forum
May 26, 2024, 08:09:51 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 [70] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ... 334 »
1381  Bitcoin / Bitcoin Discussion / Re: Some one paid 1.0394BTC as fee for 2 transactions. on: December 28, 2015, 02:02:32 PM
As @franky1 suggests it is most likely a mistake with creating a "raw transaction" (it seems fairly obvious that the tx creator forgot to add a "change output").

Compared to the mistake that I made in 2013 (with a fee of over 100 BTC) it really isn't so bad. Wink

https://bitcointalk.org/index.php?topic=135665

And the huge tx fee that I accidentally paid is not the highest on record (I forget exactly what the record is but it is well over 100).
1382  Other / Meta / Re: To the Mods regarding post quality here... on: December 28, 2015, 01:35:37 PM
Yes banning signature campaigns would help greatly (probably removing over 90% of the shit posts people make), though you are either kidding yourself or under great ignorance if you believe it would fix everything.

If we got rid of 90% of the useless posts the forum would be be attracting useful posters like @DannyHamilton rather than driving them away (as is occurring now).

Of course there is no perfect solution and no-one is actually asking or expecting that. Also what I think of as being of particularly "low quality" would I think be what most reasonable people would. If you have no technical expertise then clearly you should not be posting in topics that are asking for technical expertise (I don't go and complain about stuff in many of the subforums as I've blocked most of them now anyway).

Quote
Though I don't know what I'm talking about because I have a signature campaign, right guys?

This isn't a personal attack against any individual - you have admitted yourself (as have other ad sig posters) that the forum is full of rubbish posts and that those posts come from ad siggers.
1383  Other / Meta / Re: To the Mods regarding post quality here... on: December 28, 2015, 11:35:51 AM
And honestly it is only ever ad sig posters that keep making posts like the one above.

Sheesh... are you so desperately poor that you have to try and defend yourself because you are worried about losing your income if the forum actually did try and get rid of the rubbish posts?

It is also actually ironic that any attempt to create a topic regarding this just ends up full of ad siggers posting nonsense into it like they do in every single other topic in this forum (apart from some of the technical discussions or self-moderated topics).

I would recommend the OP to lock this topic also as it will just attract more and more silly ad sig posters as the other one did (maybe next time create a self-moderated topic so you can keep them out).
1384  Other / Meta / Re: To the Mods regarding post quality here... on: December 28, 2015, 03:28:18 AM
As was pointed out by myself and others in @deepceleron's topic blocking the sigs and even ignoring the posters does not prevent you seeing the topics appear in the Watchlist or Unread posts list (you only work out you've wasted your time after you click on the topic to see that the latest post is from a user on your ignore list and when your ignore list has hundreds or thousands of users on it you aren't going to remember all of those user names).

Also with new accounts appearing (nearly every few seconds it seems lately) you are simply never going to keep your ignore list up to date.

I have been working towards creating a completely decentralised forum that will have a superior ignore implementation (so your personal list of topics would not show as unread any topic that has had posts added by users you are ignoring and that by default new users can be automatically ignored).

The hardest part is of course getting people interested to join in and create the content which I'll be hoping to do in 2016.
1385  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 27, 2015, 01:58:01 PM
The script construction is as follows
Quote
OP_DUP OP_SHA256 <HASH> OP_EQUAL
OP_IF
   OP_DROP
   <PUBKEY 2>
   OP_CHECKSIG
OP_ELSE
   <CLTV>
   OP_NOP2
   OP_DROP
   <PUBKEY 1>
   OP_CHECKSIG
OP_ENDIF
I have not yet tried redeeming by using the else block, as I think it may work as well.

Anyway, I am wondering if we can just eliminate the OP_DUP and both of the OP_DROP opcodes as there is a redundant secret value to the stack while evaluating the script.

The two OP_DROPs actually do different things so if we want to have the following two ways to do the redeem they have to stay:

1) PUSH <sig> PUSH <secret> P2SH
(redeem using the secret)

2) PUSH <sig> P2SH
(redeem using the CLTV refund - in this case the OP_DUP will actually make a second copy of the <sig>)

So the first OP_DROP is because of the redundant secret copy on the stack (in the case of the "reveal secret redeem") but the second one is because of the CLTV value (as in the second case it is expected that only the sig was pushed onto the stack before the P2SH script is executed).

Hope that makes sense and nice to see that the script appears to be running as expected! Smiley
1386  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 27, 2015, 11:18:15 AM
Yup - by using OP_1 instead of OP_0 it will now always execute the OP_IF steps (and never the OP_ELSE steps) so I think the way I outlined it is the proper way it should be done (to allow for either redeem case).

Presumably it will require the refund redeem tx to push a dummy value (say OP_1) so that the initial OP_SHA256 has something to work with - or perhaps you could instead do an OP_DUP before the initial test with then an extra OP_DROP in the OP_IF steps. Let me try and illustrate the latter.

For the "secret reveal":
Code:
OP                STACK (top is the left)
--                ----------------------
PUSH <sig>        <sig>
PUSH <secret>     <secret><sig>
(start of P2SH script)
OP_DUP            <secret><secret><sig>
OP_SHA256         <shash><secret><sig>
PUSH <chash>      <chash><shash><secret><sig>
OP_EQUAL          1<secret><sig>
OP_IF             <secret><sig>
OP_DROP           <sig>
PUSH <pkey1>      <pkey1><sig>
OP_CHECKSIG       0 or 1
OP_ENDIF          0 or 1

For the "CLTV refund":
Code:
OP                STACK (top is the left)
--                ----------------------
PUSH <sig>        <sig>
(start of P2SH script)
OP_DUP            <sig><sig>
OP_SHA256         <shash><sig>
PUSH <chash>      <chash><shash><sig>
OP_EQUAL          0<sig>
OP_IF             <sig>
OP_ELSE           <sig>
PUSH <cltv>       <cltv><sig>
OP_NOP2           <sig>
OP_DROP           <sig>
PUSH <pkey2>      <pkey2><sig>
OP_CHECKSIG       0 or 1
OP_ENDIF          0 or 1

Admittedly I have not played around with Bitcoin Script enough to be certain how the stack will behave after each op but I think that should be at least close to correct.
1387  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 27, 2015, 09:45:59 AM
Again I'm pretty sure that the IF..ELSE shown in the BIP65 example is not the same as OP_IF and OP_ELSE.

The way it reads in the BIP is:

IF
 <cond1> <cond2>
ELSE
 <cond3> <cond4>
ENDIF

but in Bitcoin Script AFAICT you would need to actually do this:

<cond1>
OP_IF
<cond2> (where this will be executed if <cond1> was true)
OP_ELSE
<cond3> (where these will be executed if <cond1> was false)
<cond4>
OP_ENDIF

It is odd that you would be having troubles pushing the tx to testnet (as it is more relaxed about things like txs being standard).

I do have a testnet peer running so perhaps I could help with trying to push the raw transactions (and seeing if anything appears to be wrong with say the P2SH address or the like).
1388  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 27, 2015, 09:23:27 AM
Yes, when I read the explanation from the link you provided, OP_0 skips the first block in OP_IF. But I think that's what we want from the sample case above.

If we always skip the OP_IF block (in the script as originally shown) then you can never redeem with the "secret" - I guess you could perhaps change OP_0 to OP_1 but from what I understand once it has entered OP_IF then it will never execute the OP_ELSE branch (so if you did that then you'd never be able to redeem as a refund).

Thus OP_IF and OP_ELSE do not work perhaps as might have been expected. You have to have done a test before the OP_IF (whatever happens inside it is not considered as being "the condition").

Unfortunately it appears that the examples that are illustrated for BIP65 do not show correctly how to use OP_IF (perhaps they were not intended to be read as literal tx scripts at all but just as pseudo code which of course is reasonable).

So with the script in my previous post I am pretty sure that you could not just provide the secret because the OP_IF steps would be executed if the secret hash was matched (which then results in the signature check for the first public key and the skipping of the OP_ELSE steps).

From what I gathered OP_IF will remove the item from the stack but I think that is only in the case of it matching (if that is not the case then the refund redeem tx would have to include a dummy extra push).

If the secret hash check fails (which would be the case of course when you don't provide the secret hash which is what the refund tx would do as it would just push the signature onto the stack) then the OP_ELSE steps are executed which would verify the signature against the second public key (after doing the CLTV lock).

It think some careful testing of exactly how this conditional stuff works will be needed - for that I would recommend using "testnet".

Stack based languages like Bitcoin's Script are really not very intuitive to even most programmers. Sad
1389  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 27, 2015, 07:52:50 AM
Actually looking further into OP_IF I think we have a problem as what is between it and OP_ELSE won't be executed if what is on the top of the stack is empty (which OP_0 would certainly screw up). You can see it illustrated here: https://webbtc.com/script/2bb5d0ac0eb17f5ebe2d660ec47b4888943b4a4f5433c09bd6514b7a36859a95:0 (scroll down to the Execution Trace and you'll see it isn't even executing the OP_SHA256 or first public key signature check).

I think that the check for the "secret hash" should actually take place before the OP_IF like this:

Code:
OP_SHA256
c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646
OP_EQUAL
OP_IF
OP_DROP (to drop the secret which I am guessing is still on the stack)
03d7c6052544bc42eb2bc0d27c884016adb933f15576a1a2d21cd4dd0f2de0c37d
OP_CHECKSIG
OP_ELSE
389900
OP_NOP2
OP_DROP (drops the block number just used for the NOP2/CLTV test)
021844989a2bd7acd127dd7ed51aa2f4d55b32dbb414de6325ae37e05c1067598d
OP_CHECKSIG
OP_ENDIF

Thus assuming that the "secret hash" is matched we then check the signature for the first public key otherwise we do the CLTV test and check the signature for the second public key.

I am not 100% sure of the stack behaviour so it might be necessary to do either an OP_DUP or have an extra OP_DROP to get that correct.
1390  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 27, 2015, 06:53:52 AM
Quote
OP_0 is included only to deal with an off-by-one error in Bitcoin Core when using OP_CHECKMULTISIG.

But I am not sure if we must include the OP_0 in P2SH without multisig.

I see - in that case I would be pretty sure that we don't need the OP_0 at all - in fact looking here: https://webbtc.com/script/2bb5d0ac0eb17f5ebe2d660ec47b4888943b4a4f5433c09bd6514b7a36859a95:0 it would appear to me at having OP_0 on the stack is actually causing it to always skip the OP_IF test (another thing that will need to be carefully checked).

For OP_PUSHDATA1, I was trying to construct a redeem tx for P2SH without the mentioned opcode, and it did not succeed.

Doh! Of course - the reason is that you need to push 114 bytes (the P2SH script) onto the stack but a normal PUSH_DATA (which just the length without a specific op code) can only push up to 75 bytes (will edit my earlier post to make this clear).

So apart from setting the "sequence" back to ffffffff I am still skeptical of the way that the CLTV "block number" has been provided (as it is neither in hex nor in he same endian as nLockTime itself is).

I guess a few test txs (which would be best initially done on testnet) to verify the exact format should be played with.
1391  Alternate cryptocurrencies / Altcoin Discussion / Re: Wanted: Bitcoin merge mined clone coin that can atomically trade with Bitcoin. on: December 26, 2015, 05:24:17 PM
My main interest though is in getting this tech into bitcoin merge mined coins. You mentioned that litecoin would be possible but a little tricky to implement.

With what you have now, is it possible for ixcoin, i0, dev, or namecoin to implement this?

That is going to come down to if and when they implement the new CLTV op code (previously OP_NOP2) as per Bitcoin and now Litecoin.

To a fair extent I think this is where the Litecoin project has been very smart - by staying so up-to-date with Bitcoin they will be able to take advantage of such new kinds of scripts probably before any other alts can.
1392  Alternate cryptocurrencies / Altcoin Discussion / Re: Wanted: Bitcoin merge mined clone coin that can atomically trade with Bitcoin. on: December 26, 2015, 04:11:16 PM
An update about the status of the current research being done with ACCT via Bitcoin's P2SH and CLTV: https://bitcointalk.org/index.php?topic=1300723.msg13359842#msg13359842

We are making progress (slowly).

It also looks like Litecoin will be able to support CLTV soon.
1393  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 26, 2015, 03:58:42 PM
BTW - for those who are wondering what the value of getting this stuff right you might want to check this out: http://blog.litecoin.org/2015/12/litecoin-core-v01040.html

Basically Litecoin will soon be accepting CLTV txs as well - so if we can get this ACCT working reliably then you will be able to trade LTC and BTC with any AT supporting platform (currently Qora and Burst).

The Bitcoin/Litecoin side will unfortunately not be so neat (it will require some additional scripts and off-chain communication between the two parties) but it would be a huge step in disbanding the need for crypto-to-crypto exchanges (which is *real disruption* IMO).

Assuming we can get this working in a reliable manner CIYAM will be looking to add support for this special kind of script to its Wallet package.
1394  Other / Meta / Re: Just remove signatures already. As in delete, disable, gone. on: December 26, 2015, 03:10:26 PM
The reality is that very helpful forum posters such as @DannyHamilton are talking about leaving (with many others having already left as Danny has a lot more patience than most people) and unfortunately his sage advice will be replaced by many stupid suggestions from useless posters (that could actually cause people to lose Bitcoin) just to increase their post count for financial reward.

I pretty much now only post in the more technical areas of this forum and don't post so much at all (like Danny I am thinking to pay much less attention to following the forum in 2016).

It is disappointing to some of us more seasoned forum members that this is what has happened but "c'est la vie" I guess that soon anyone actually wanting "technical advice" about Bitcoin will steer clear of this forum and look elsewhere (that would pretty much be my advice to anyone asking me about where to find good technical information about Bitcoin now).

Like it or not the very purpose of this forum is now for people to earn micropayments through posting (no matter how poor quality the posts are).
1395  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 26, 2015, 11:42:44 AM
So with the help of that online tool and my existing knowledge of the structure of raw transactions I've come up with this complete tx decomposition:

Code:
01000000 (version)
01 (number of inputs)
dfb1ee387eef27d2de91c824a467548a3879dd57691177591474fd2594d8bb23 (previous tx id reversed)
00000000 (previous tx output index)
be (190 bytes - input script length)
------------------------------------------------ 190 bytes ------------------------------------------- Inputs
48 PUSH_DATA (72 bytes - length of signature plus sig type byte)
[
3045 (DER sequence and length)
022100c9e7acd4f39a03acfcfc89438e764c4b5e4d7ab25f155aeb1a60bb47e63e52ad (DER X)
02201daaf42c4fbe3cba3b0c89f87e7aa2dfc5060ad4b44292e8371a2b561d28d42e (DER Y)
01 SIGHASH_ALL
]
00 OP_0 (why do this ???)
4c PUSH_DATA1
72 DATA_LENGTH (114 bytes - P2SH script length)
================================================ 114 bytes =========================================== Script
63 OP_IF
a8 OP_SHA256
20 PUSH_DATA (sha256 of secret)
[
c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646
]
88 OP_EQUALVERIFY
21 PUSH_DATA (public key)
[
03d7c6052544bc42eb2bc0d27c884016adb933f15576a1a2d21cd4dd0f2de0c37d
]
ac OP_CHECKSIG
67 OP_ELSE
03 PUSH_DATA (block #389900 - or should this be converted to hex and endian encoded???)
[
389900
]
b1 OP_NOP2 (OP_CLTV)
75 OP_DROP
21 PUSH_DATA (public key)
[
021844989a2bd7acd127dd7ed51aa2f4d55b32dbb414de6325ae37e05c1067598d
]
ac OP_CHECKSIG
68 OP_ENDIF
=============================================================================================================
-------------------------------------------------------------------------------------------------------------
5cf40500  (sequence 390236) which should probably be ffffffff
------------------------------------------------- 35 bytes ------------------------------------------ Outputs
01 (number of outputs)
1027000000000000 (value 0.0001 BTC)
19 PUSH_DATA (25 bytes - output script length)
[[
76 OP_DUP
a9 OP_HASH160
14 PUSH_DATA (hash160 of public key - i.e. address)
[
20fbf78ba8f2f36feaec0efc5b82d5e07fb261a9
]
88 OP_EQUALVERIFY
ac OP_CHECKSIG
]]
-------------------------------------------------------------------------------------------------------------
5cf40500 (nLockTime 390236)

So most of it is making sense to me (although it looks as though the sequence number was incorrectly set to the CLTV block #).

Also why is the OP_0 necessary (is this to do with the P2SH that was the output being used from the previous tx)?
1396  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 26, 2015, 08:32:49 AM
Assuming it is standard then if HASH160 was to be changed to say SHA256 would it still be standard?
https://gist.github.com/gavinandresen/88be40c141bc67acb247

Yup - from reading the code in IsStandardTx I had thought that it should be fine.

The tricky part is hand-crafting raw txs (very easy to get something wrong doing that) so the person helping me out with this is using BX (previously SX).

Basically what I am trying to get worked out is an ACCT tx "template" for Bitcoin that will be compatible with the ACCT AT implementation so that one will be able to exchange QORA or BURST for BTC without an exchange or other 3rd party.
1397  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 26, 2015, 07:39:19 AM
It seems there was something wrong with that redeem script (still trying to work out exactly what) but this one seems to have done the trick:

https://webbtc.com/script/2bb5d0ac0eb17f5ebe2d660ec47b4888943b4a4f5433c09bd6514b7a36859a95:0

Smiley
1398  Alternate cryptocurrencies / Altcoin Discussion / Re: Wanted: Bitcoin merge mined clone coin that can atomically trade with Bitcoin. on: December 25, 2015, 01:16:23 AM
Can you provide any other info or links to this project?

At this stage we are just trying to see if we can get the CLTV txs to work properly (no such luck as yet).

Assuming we so work out the kinks with our initial testing I'll have more to say about it. For the AT ACCT you can read about that here: http://ciyam.org/at/at_atomic.html

The approach that will be taken with CLTV and P2SH will still follow @TierNolan's approach closely.
1399  Alternate cryptocurrencies / Altcoin Discussion / Re: Wanted: Bitcoin merge mined clone coin that can atomically trade with Bitcoin. on: December 24, 2015, 01:42:28 AM
Another forum member is actually working with me to test the use of CLTV (CHECKLOCKTIMEVERIFY) with a P2SH to achieve ACCT using Bitcoin.

If this can work then it would mean that the AT ACCT which has already been functioning on Qora and Burst for many months would allow either of those wallets to behave as P2P trading markets between themselves or Bitcoin.

My guess is that Litecoin (which generally tries to keep up with Bitcoin changes) will also be adopting CLTV sometime soon.
1400  Bitcoin / Development & Technical Discussion / Re: Is this BIP65 sample script standard? on: December 23, 2015, 01:15:26 PM
I've seen blockchain.info incorrectly mark standard transactions as non-standard in the past, so I don't think their note is dispositive. (Eg multi-sig, iirc - don't know if they've fixed that yet)

Am hoping that is the case but the tx is still unconfirmed despite being high priority and the CLTV expired 4 blocks ago (it is a refund tx for a CLTV approach to doing ACCT).
Pages: « 1 ... 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 [70] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ... 334 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!