Bitcoin Forum
May 24, 2024, 07:54:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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 »
521  Alternate cryptocurrencies / Altcoin Discussion / Re: MasterCoin: New Protocol Layer Starting From “The Exodus Address” on: October 25, 2013, 11:47:09 AM
Basically it gives us an other way to encode Mastercoin data into the blockchain.

J.R.'s original approach was hiding the data in an Bitcoin address. The big downside to this method is that these addresses can never be spend since no private key exists. When using this method you are basically polluting the blockchain with data that can never be removed. (We call these transactions Class A)

The next solution we came up with was using multi-sig transactions. By supplying an public key that can be used when you want to spend the output we can now make sure every output we create is spendable. This stops the pollution problem. (We call these transactions Class B)

What I understand from OP_RETURN is that you can basically add 80bytes of arbitrary data to each transaction. This would give us a perfect way to encode our data in the most harmless way since these outputs are 'Provably Prune-able' and can safely be ignored when parsing the blockchain. (These transactions will most likely be Class C transactions)

I hope this explains it. If anybody spots an error let me know.
522  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 25, 2013, 11:38:55 AM
Hey Tachikoma,

Regarding our discussions over the last couple of days about making the output amounts the same a solid requirement (ie not just a convenience) in Class A transactions...

• All outputs that contain Mastercoin data for Class A transaction should have the same output amount, but it doesn't matter how much this amount is.

I will make some time today to see if this change would affect any existing transactions but I highly doubt it. 

Quote from: The-Amendment
• Has all output values equal & above the 'dust' threshold (currently 0.00005430 BTC)

Would you mind double checking my sanity checks on this?  There is a single fail; a transaction with 4 outputs all the same.  We both already consider that transaction valid by the other rules (eg sequence numbers) so that's a non-issue.

My conclusion is that we can require all the outputs except change to be the same in a Class A transaction without affecting any transactions already done, which is good news Smiley

Code:
Performing summary...
139 transactions PASS with [3 outputs exist with the same value and a 4th output exists with a different value (change)]
90 transactions PASS with [3 outputs exist with the same value and no change detected]
1 transactions FAIL with [more than 3 outputs exist with the same value]
18 transactions SKIP with [tranasction detected as deprecated multisig]

Raw data here https://masterchest.info/files/sameoutputs_duedill.txt

Also of interest may be that almost 40% of simple sends done to date didn't have a change output (that surprised the hell out of me to be honest!)

Awesome news; I'm glad you found some time to do this. Since it makes it much easier to move forward enforcing this rule and thus increasing the flexibility of our transaction parsing. I think that in one of the earliest communication on creating Mastercoin transactions J.R. told them to fund the exact amount to the Mastercoin address that was needed for the transaction. This could explain it.

Tachikoma:

It seems that in 2 of the multisig tx I have sent (this time with obfuscation using the sender address), you mis-parse the receiving address:
http://mastercoin-explorer.com/transactions/a67a07f54e80cd77b45e128d6404c6979c84eb39c3026fa707c20c9dbcca1e95
http://mastercoin-explorer.com/transactions/2b488371c4488ee42e35868df29de97023be9624111dfad79a52584cef3469bc

My parsing looks this way:
http://masterchain.info/Transaction.html?tx=a67a07f54e80cd77b45e128d6404c6979c84eb39c3026fa707c20c9dbcca1e95&currency=MSC
http://masterchain.info/Transaction.html?tx=2b488371c4488ee42e35868df29de97023be9624111dfad79a52584cef3469bc&currency=MSC

Can you please check your parsing?

Just a note:
On the first one the public key for the change address in the BIP11 is uncompressed.
On the second one the public key for the change address in the BIP11 is compressed.

Thanks for spotting that, the code I was using to define the receiving address was not updated for the new situation. I'm rolling out a fix now which I think should fix the problem.

Did we discuss how to determine the receiving address when there is a change address present? Basically did we formalise that the outputs for Exodus and Receiving address should be the same for Class B transactions?

Quote
I would give a simpler instruction for tx constructing:
Make sure that the address in the BIP11 is the same as the sender's address.
This means that you should use the same format of public key as used at the sender.

I'm taking a different approach which I think should give the correct result regardless of the what type of key is being used for the spending public key. I'm looking at the inputs for this transaction and then getting the previous output and I generate that address. That way the key format does not matter anymore. That's my theory at least Smiley

523  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 07:31:14 PM
It looks like I accidentally deleted or overwrote my post about OP return. Here's what I think I wrote:

Gavin has had us on his mind lately - at the top of his recent blog post about 0.9 bitcoin software, he talks about explicitly supporting projects like ours with OP_RETURN: https://bitcoinfoundation.org/blog/?p=290

It's looking like we'll have a "class C" transaction type soon. OP_RETURN works very well for our current model of sending transactions from a PC and viewing balances on websites which have the entire transaction history.

Once 0.9 is out and miners are widely supporting OP_RETURN, I think we should start using it.

Seconded. I will need to look into OP_RETURN though, the fact that he mentioned 80 bytes though sounds promising.
524  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 06:56:28 PM
I've just updated mastercoin-explorer to support the new key encoding. However it seems that the obfuscation bit is very tricky and even a small difference in interpretation of the spec can cause very different results.

Could somebody please verify this transaction on mastercoin-explorer?


Your tx appears also on http://masterchain.info/index.html?currency=TMSC
The transaction is:
http://masterchain.info/Transaction.html?tx=7a02df33eddfb9dbcc7988f980630297089454f13a8bd059ada4b7842e2d1615&currency=TMSC
or in json:
http://masterchain.info/tx/7a02df33eddfb9dbcc7988f980630297089454f13a8bd059ada4b7842e2d1615.json

Awesome, good to know Smiley
525  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 06:56:01 PM
I've added up an intermediate tool. Updating my wallet software all the time is pretty time intensive so I made something that is easier up-to-dateable until we finalise everything.

You can now create a simple send transaction online and sign and broadcast it via Bitcoin-qt.

To do this do the following:
  • Get the public key for your Mastercoin address. You can do this by using the validateaddress <youraddress> function in the Bitcoin-qt console.
  • Navigate to this page on mastercoin-explorer. and fill in your details.
  • Copy the hex string you get.
  • Make sure the transaction is what you would want it to be by using decoderawtransaction <HASH FROM SITE> from the Bitcoin-qt console. Never trust that the software did everything 100%. The site might have been hacked, or I have become evil. Don't skip this step.
  • If you are happy with the result sign it with signrawtransaction <HASH FROM SITE> followed by sendrawtransaction <HASH FROM SITE>

You require an unspend output big enough to fund the whole transaction.    

The pre of this method is that you don't have to trust a third party tool/application with your private keys.

I would really appreciate it if somebody could test this functionality, it will be hardcode to test until somebody can verify it works Smiley
526  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 04:26:40 PM

(Will check if the capital letter affect sha256)


They do, check out the discussion me and Zathras had today Wink
527  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 03:44:44 PM
I've just updated mastercoin-explorer to support the new key encoding. However it seems that the obfuscation bit is very tricky and even a small difference in interpretation of the spec can cause very different results.

Could somebody please verify this transaction on mastercoin-explorer?
528  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 03:42:28 PM
Hi Grazcoin

You are the first to post to the the blockchain using the new multi sig.  Nice work!   ( I was able to parse your transaction  =)   

Data to Parse: 021bf733f7aab3932560cd8e8a3ec11b45ee47f0694a0b61c86ab48e63bba57cd4
OBFUSCATED MASTERCOIN PACKET: 1bf733f7aab3932560cd8e8a3ec11b45ee47f0694a0b61c86ab48e63bba57c
SHA256 HASH: 1af733f7aab3932561cd8e8a3ec1a724a047f0694a0b61c86ab48e63bba57cd0
REFERENCE ADDRESS: 17RVTF3vJzsuaGh7a94DFkg4msJ7FcBYgX
CLEARTEXT MASTERCOIN PACKET: 0100000000000000010000000000bc614e0000000000000000000000000000

01: 1 (01)
Trans Type: 0 (00000000)
Currency ID: 1 (00000001)
Amount for Sale: 12345678 (0000000000bc614e)


Good parsing.
For my parsing, you could check:
https://github.com/grazcoin/mastercoin-tools/blob/master/msc_parse.py

Note: The tx has no "Amount for Sale", but "Amount sent".

This transaction is no longer valid if you consider we use the sending address for all transactions now.
529  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 10:56:53 AM
Yeah, why not. As long as people understand this limitation. Smiley
530  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 10:23:38 AM
In the future new currencies could be created that could be sent using a Class A transaction. So I think in the future the currency id should be one of the created currency ids, for now 01 or 02 should suffice.
531  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 10:00:30 AM
I did some googling and I think using upcase is more dominant. Unless somebody has a reason not to upcase I suggest we use this for now.
532  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 09:53:23 AM
Yeah that was what I meant.

I think currency_id and transaction_type are the most important to check. The change of those two being valid values in a random address are very slim.
533  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 09:49:52 AM
hahahahaahaha, duh. Is one way better then the other, or the default?
534  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 09:47:11 AM
I've updated the amendment to include the changes we've discussed.  If viewing in browser you may need to refresh.

Anything we're missing, anything unclear?

Thanks! Smiley

Should we perhaps specify the rules what 'peek and decode' means? Other than that it looks good Smiley
535  Alternate cryptocurrencies / Altcoin Discussion / Re: MasterCoin: New Protocol Layer Starting From “The Exodus Address” on: October 24, 2013, 09:14:19 AM
Hi,
Yesterday I made a transaction of 16.5 MSC.

The transaction shows that the mastercoin explorer : http://mastercoin-explorer.com/transactions/9e44d015f0aec437e0ad4e5c4d3dd474918f6dac01fe64edf339d71c09c0d398
But it doesnt show on the mastercoin chest : https://masterchest.info/lookupadd.aspx?address=19b5BiXWZERFoCNhVKiYDf9i829P1W1wiE

What could be the problem? I have been waiting for a day but it still not changed.


Thanks-
Jeroen

Please read Zathras reply above.
536  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 08:09:00 AM
Some notes. When I SHA the reference I only take the first 62 bytes since this is the exact amount we need for the obfuscation. This will change the the SHA of the next iteration of hashes that follow so I'm open to discuss this.
Wasn't quite sure what you meant by this so I thought I'd just note that there is no need to drop or add bytes to/from the inputs of our SHA256 hashing if that's what you mean?  SHA256 hashing will always produce a 256 bit (32 byte) hash regardless of input length.  To clarify my take on things:

With each packet:
   * For sequence number 1 we SHA256 the entire length of the address (which could be anywhere from 27 to 34 bytes), result = 32 byte hash.  
   * For sequence numbers 2 onwards, we take the previous 32 byte hash and SHA256 it again (and again), result = 32 byte hash.  
   * We then take the resulting 32 byte hash, grab the first 31 bytes and XOR with the cleartext Mastercoin packet.
Rinse & repeat.

Perhaps that's what you meant, sorry if I'm getting confused or repeating stuff - there's been so much thought & discussion on this stuff it's all kind of a blur! Smiley

So for your address of 1J2svn2GxYx9LPrpCLFikmzn9kkrXBrk8B, the first 5 packets should have hashes of (in between { } is what you would XOR with):

Code:
SEQNUM=1   {D42C390E52F1110412078A9DB148E7A306924666FB10AAAA9BFFCC2E2ECDE3}44
SEQNUM=2   {000EC2C68806819E67A030E82A6AF98376DAC1065D7FE533DAF251D43AA836}3B
SEQNUM=3   {999722F745CC7EA5559D871285A697513D6D1F69294A472AB71499C280CFDA}72
SEQNUM=4   {23C4AC723733621964260EC4639D9DF3469E983E677B083457F325C6F56FA5}D0
SEQNUM=5   {A2989BBA3E4BF3B2995A8573E19450381C94CDE10F95A157756148217B0E37}1B

Thoughts?

You were right about using the bytes, I coded that up wrong. It was late last night (and it's early now.. Wink

I'm still not getting the same sequence as you are however. I think we might be doing this differently.

Code:
d42c390e52f1110412078a9db148e7a306924666fb10aaaa9bffcc2e2ecde344
370ee8c285babbf857761796c0ab5c652db7da17fdd2fea8657809ca8428bd2f
e3ab016c159270d4649ab732d41c7895ad3e05f5b94d611f7a5e19780c6502d2
...etc...

Just so I know we are doing the same thing.

Code:
sequence1 = Digest::SHA256.hexdigest("1J2svn2GxYx9LPrpCLFikmzn9kkrXBrk8B")
sequence2 = Digest::SHA256.hexdigest(sequence1)
sequence3 = Digest::SHA256.hexdigest(sequence2)
..etc..


Quote
We haven't discussed what we will use to XOR data for a 'Selling MasterCoins for Bitcoins' package. I want to propose using the sending address whenever a Mastercoin message does not contain a recipient address.
Agreed.  Though I actually think we should make it the sender address for everything because as you note, not all transactions will have a reference address.  We may as well stick with an address we know will always be there.  Unless you guys know of a reason for not using the sender address let's lock that in as our initial source for the SHA256 hashing & I'll update the amendment accordingly.

Agreed, let's just use the sending address for all packages. This should go into the spec. Smiley
537  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 24, 2013, 07:44:55 AM
Sorry guys have to be quick - back to back meetings today.

Long story short according to the current rules that transaction is not valid due to ambiguous sequence numbers, this is why masterchest.info throws the transaction out.

19b5BiXWZERFoCNhVKiYDf9i829P1W1wiE has a sequence number of 94
19UjqqjXmQxyyn4xStA7mWXVkzXwVDgu7Z has a sequence number of 93
19feAR37pguLwDyEMc8oiW2WT4esrgR5z6 has a sequence number of 95

Quote
If there is a broken sequence (i.e. 3,4,8), then the odd-man-out is the change address (8 in this example)
If there is an ambiguous sequence (i.e. 3,4,4), then the transaction is invalid!
If there is a perfect sequence (i.e. 3,4,5), then the transaction is invalid!

You have a perfect sequence (93, 94, 95) so there is no clear way to identify recipient vs change.  

Tachikoma, we (or just I?) removed the requirement for the outputs to be the same and only used sequence numbers for address identification instead.  This was discussed a while back when you were designing your original multisig and had to use a different amount for the multisig output due to the higher dust threshold with a bigger size of the output (multisig).  I raised the issue of outputs amounts no longer being the same as required by the spec and suggested an amendment that multisig output amounts were specified as exodus output amount*2, but that never got included as it was stated that outputs actually did not need to be the same, it was just a convenience:

Having all the outputs be the same amount is merely a convenience for identifying the change address. I'm fine with a less strict implementation as long as it is still possible to identify the change address.

So I removed the requirement for outputs to be the same amount to allow for multisig outputs no longer meeting said requirement.  So as it stands now I no longer evaluate what the value is of each vout, only the sequence numbers matter.

I think we need some further discussion on backwards compatibility for these Class A transactions.  Perhaps we need to re-introduce the 'same output amount' rule as a requirement just for Class A transactions as we can then use the amounts to help identify change as per the original spec - at the moment there seems to be some ambiguity around Class A transaction validity between our implementations and we need to clear this up.  You can probably understand now why I'm putting so much effort into having these rules explicitly defined and documented Smiley  I do concur that random chance of sequence number collisions should not be a factor in transaction validity.

None of this is an issue in multisig as we require change to be from the sender as a method of removing address ambiguity.

This is why I am not a fan of flagging a transaction invalid based sequence. This guy was just trying to create a transaction and he had no way that random chance could make it invalid.

As long as we can safely identify the data address then a perfect sequence number is not a problem. I say we simply peak into each address and see if it contains a known Mastercoin message. Currently only SimpleSends are supported so we can just peak into an address, decode it and see if the transaction type is 0 and the and currency_id is within limits and if the sequence number makes sense. If we can say with a certain certainty that this is most likely a simple send then we have our data address and know which sequence the target address should be. This will work for a broken sequence as well. The only problem is the ambiguous sequence. In this case there is simply no way of finding out the correct address and the transaction should be made invalid. Since the random factor can't be solved here we might need to solve it differently and go back a step.

How about we do the following.

  • Only allow Simple Sends to be encoded as addresses. All new messages should use pulic keys.
  • All outputs that contain Mastercoin data for Class A transaction should have the same output amount, but it doesn't matter how much this amount is.
  • Probe each address to see if it's a Mastercoin encoded address using the checks outlined above.

Checks to see if it's a Mastercoin encoded address
  • Transaction type is 0
  • Currency ID is an existing Currency ID, for now only 1 and 2 are created but this might chance in the future

If we follow these rules then there should always be three outputs. One you can rule out based on the fact that it's Exodus. One of those is the data package and one the target address. In most cases you can probably know which is which even without the sequence number.

I will make some time today to see if this change would affect any existing transactions but I highly doubt it. 
538  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: MasterCoin Buyer/Seller Thread on: October 23, 2013, 09:53:25 PM
It just copies the advisor script that J.R. builds.

I removed it since then since I don't want to promote sending parasitic transactions.
539  Alternate cryptocurrencies / Altcoin Discussion / Re: MasterCoin: New Protocol Layer Starting From “The Exodus Address” on: October 23, 2013, 09:51:22 PM
I've checked it out and fixed it, your transaction shows up on mastercoin-explorer now.

It will probably show up on Masterchest as well since I can't find anything wrong with it.

Please understand that we are currently working hard on a new encoding standard which requires us to reparse the data a lot, during these times our sites might not miss some transactions or perhaps not display them correctly. This is all very cutting edge software so things might go wonky from time to time.
540  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: October 23, 2013, 08:43:26 PM
Cool, glad we are getting up-to-date! I still need to rewrite mastercoin-explorer with the new obfuscation code. So much to do, so little time Smiley

I will take a few minutes to verify your key.

Edit: Confirmed, looks good!
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!