Title: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: tacotime on November 19, 2012, 11:15:20 PM PPC: util.h
Code: #include <openssl/sha.h> Bitcoin: util.h Code: #include <openssl/sha.h> output of diff: no differences PPC: script.cpp Code: // Serialize and hash Bitcoin: script.cpp (old version (https://github.com/sipa/bitcoin/blob/8980a509240107730eae8b517d80b444d1e31ccd/src/script.cpp)) Code: // Serialize and hash output of diff: no differences Am I missing something here? It sure looks merge minable to me. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: smoothie on November 19, 2012, 11:28:40 PM It can be merge mined if majority of the nodes download an updated client. Otherwise it won't happen.
From what I got from DoubleC, you have to set a checkpoint to start from and have users update their clients. Ultimately it is up to the PPC network to decide based on updating their client after it would be updated. As of right NOW you can't merge mine PPC. :D :D :D Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: tacotime on November 19, 2012, 11:29:45 PM Well, regardless of merge mining, the first person to get a couple of ASICs can 51% the entire currency. ::)
Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: smoothie on November 19, 2012, 11:30:27 PM Well, regardless of merge mining, the first person to get a couple of ASICs can 51% the entire currency. ::) Oh really? How would they 51% the stake blocks? :D I guess the real question to Sunny King is if you can invalidate stake blocks. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: tacotime on November 19, 2012, 11:33:15 PM Quote Oh really? How would they 51% the stake blocks? Mine tons of PPC and hold them as stake?Wait, Quote "Merged mining works like this, you have two totally separate block chains, they are not related in any way nor does either contain any data from the other. When you mine you generate hashes that may be the solution to the current block, this is very very improbable per hash, its like a lottery where everyone generates tickets until someone finds the winning one. Normally you make tickets and check them against the Bitcoin block chain to see if they are the solution. With merged mining you create a ticket and check it against both the Bitcoin block chain and the Namecoin block chain, Bitcoin and Namecoin know nothing about each other, they are two totally different lotteries with different winning numbers, you just sent a copy of your ticket to both. Since you are sending the same ticket to two lotteries you increase your chances of winning one or the other. No Bitcoin data goes into Namecoin no Namecoin data into Bitcoin they remain totally separate, you simply run both the Namecoin and Bitcoin clients on the same machine and submit hashes to both networks, if your hash is the solution to the Namecoin block you get Namecoins if you hash is the solution to the Bitcoin block you get Bitcoins, its exactly like if you where mining on just one network, except you submit the same work twice." I don't understand how the checkpoints prevent merge mining if you just submit the share against both chains...? Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: smoothie on November 19, 2012, 11:34:55 PM Quote Oh really? How would they 51% the stake blocks? Mine tons of PPC and hold them as stake?Wait, Quote "Merged mining works like this, you have two totally separate block chains, they are not related in any way nor does either contain any data from the other. When you mine you generate hashes that may be the solution to the current block, this is very very improbable per hash, its like a lottery where everyone generates tickets until someone finds the winning one. Normally you make tickets and check them against the Bitcoin block chain to see if they are the solution. With merged mining you create a ticket and check it against both the Bitcoin block chain and the Namecoin block chain, Bitcoin and Namecoin know nothing about each other, they are two totally different lotteries with different winning numbers, you just sent a copy of your ticket to both. Since you are sending the same ticket to two lotteries you increase your chances of winning one or the other. No Bitcoin data goes into Namecoin no Namecoin data into Bitcoin they remain totally separate, you simply run both the Namecoin and Bitcoin clients on the same machine and submit hashes to both networks, if your hash is the solution to the Namecoin block you get Namecoins if you hash is the solution to the Bitcoin block you get Bitcoins, its exactly like if you where mining on just one network, except you submit the same work twice." I don't understand how the checkpoints prevent merge mining if you just submit the share against both chains...? From what I understand the blocks that we are looking for hashes to are different in each chain. So you can't just submit them into another chain because you are looking for a hash for a different block. Well i guess if someone held 51% of all PPC then perhaps I see your point? lol Perhaps DOUBLEC can clarify. I already asked this question in PM before I got involved in PPC. I did my research he he he. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: tacotime on November 19, 2012, 11:36:44 PM Namecoin has a different genesis block and chain and is still able to be merge mined with bitcoin.
Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: smoothie on November 19, 2012, 11:37:36 PM Namecoin has a different genesis block and chain and is still able to be merge mined with bitcoin. Namecoin was set to mergemine at block XXXXX and everyone downloaded the new client to MM. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: tacotime on November 19, 2012, 11:40:03 PM Quote namecoind http://dot-bit.org/Merged_Mining#namecoindFor namecoind grab the latest version from vinceds repo and follow the instructions found in the doc directory for your platform or just use the latest version from dot-bit main page. The current implementation starts merged mining on block 19200 on production blockchain and on block 0 if you have configured testnet blockchain. Ah, okay... Does that mean someone with a large proof of stake can now enable merge mining on the chain and then attack it using someone's BTC pool? So the chain is pretty much able to be held hostage by anyone with a large proof of stake? Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: smoothie on November 19, 2012, 11:41:17 PM So unless the same happens, which I doubt, MM will not happen.
Stake blocks keep the difficulty from falling. So that is interesting. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: Sunny King on November 20, 2012, 01:23:55 AM That's correct, ppcoin uses the same hash algorithm as bitcoin.
Those who argue for merge-mining often miss some important points: 1) Merge-mining does not necessarily make 51% attack harder, CLC was so easily attacked exactly because it was merge-minable from the start. Also ppcoin uses different mechanisms to discourage 51% attack so merge-mining does not offer much additional value regarding security. 2) Implementing merge-mining violates implicit contract between the designer and the users regarding the value and the foundation of the currency, that is, it's a significant change of the monetary design. For this reason alone merge-mining would not be introduced for ppcoin as it may undermine trust in the currency. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: Jutarul on November 20, 2012, 01:37:57 AM That's correct, ppcoin uses the same hash algorithm as bitcoin. Those who argue for merge-mining often miss some important points: 1) Merge-mining does not necessarily make 51% attack harder, CLC was so easily attacked exactly because it was merge-minable from the start. Also ppcoin uses different mechanisms to discourage 51% attack so merge-mining does not offer much additional value regarding security. 2) Implementing merge-mining violates implicit contract between the designer and the users regarding the value and the foundation of the currency, that is, it's a significant change of the monetary design. For this reason alone merge-mining would not be introduced for ppcoin as it may undermine trust in the currency. Merge mining also makes a few implicit assumptions, e.g. that the parent chain always has a higher difficulty than the siblings. Also, from what I understand, a reorg in the mainchain invalidates some blocks in the siblings and forces it to recalculate, which means that the network security of the two blockchains are not independent... Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: Sunny King on November 20, 2012, 04:57:14 AM Merge mining also makes a few implicit assumptions, e.g. that the parent chain always has a higher difficulty than the siblings. Also, from what I understand, a reorg in the mainchain invalidates some blocks in the siblings and forces it to recalculate, which means that the network security of the two blockchains are not independent... Hmm haven't realized about this. If that's true it would be a serious flaw of merge-mining. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: doublec on November 20, 2012, 08:31:56 AM Also, from what I understand, a reorg in the mainchain invalidates some blocks in the siblings and forces it to recalculate, which means that the network security of the two blockchains are not independent... A reorg in the mainchain does not affect the auxiliary chains. They are entirely separate.Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: Jutarul on November 20, 2012, 08:48:25 AM Also, from what I understand, a reorg in the mainchain invalidates some blocks in the siblings and forces it to recalculate, which means that the network security of the two blockchains are not independent... A reorg in the mainchain does not affect the auxiliary chains. They are entirely separate.In particular I'd like to verify the following statement: Quote If a miner solves the hash at the Namecoin difficulty level, the Namecoin block is assembled. It includes the Namecoin transaction set, the Namecoin block header, the Bitcoin block header, and the hash of the rest of the transactions in the Bitcoin block. That implies that if the bitcoin block header becomes invalid, due to a chain reorg, any namecoin blocks, which incorporate the bitcoin block header in question, become stale. Title: Re: PPC uses the same SHA256 hash algorithm as bitcoin? Post by: doublec on November 20, 2012, 09:12:45 AM Do you have a good reference to read up on the issue/implementation? Information on the exact workings of merged mining is sparse. There is some explanation, e.g. http://bitcoin.stackexchange.com/questions/273/how-does-merged-mining-work Only the source, sorry.Quote If a miner solves the hash at the Namecoin difficulty level, the Namecoin block is assembled. It includes the Namecoin transaction set, the Namecoin block header, the Bitcoin block header, and the hash of the rest of the transactions in the Bitcoin block. That implies that if the bitcoin block header becomes invalid, due to a chain reorg, any namecoin blocks, which incorporate the bitcoin block header in question, become stale. Another reason a 'reorg' won't affect namecoin is that the the hash that solved the namecoin block is still a valid namecoin hash. The fact that someone built on a different bitcoin block in the primary chain, and invalidating the original block, does not stop the fact that the namecoin block had a valid namecoin hash and that miners are building on that namecoin block. Merge miners can start working on the new re-orged bitcoin main chain, but continue building on the existing valid namecoin block that was solved previously. It is possible that a merge miner could cause a reorg on both chains though. That miner could be mining a bitcoin chain that becomes the main chain and they could be mining a namecoin chain that becomes a new chain too. It's possible that the same reason they created a fork on bitcoin causes a fork on namecoin. For example a large miner mining offline for a short period. |