-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge mining with Hybrid POW/POS coins as main chain [$100] #6
Comments
@ahmedbodi should be able to modify the block template for hybrid coin submission to auxpow networks. Looks to me like the transaction format is the issue. Peercoin can decode the rawtransaction it's trying to submit as auxpow on line 308 of lib/pool.js. but the auxcoin cannot. JSON.stringify(shareData) ==
[Failed to submit potential auxiliary block: {"code":-1,"message":"ReadCompactSize() : size too large"}] JSON.stringify(_this.auxes[aux].rpcData) ==
auxpow.toString('hex') ==
Peercoin can decode this ^ Auxpow coin cannot. This is the serialized auxpow found. |
If all this needs is a bigger bounty that's no issue. It will provide a huge benefit to a few different communities. Make merge mining a bit more accessible to mid sized users that run their own pools. And provide a hashrate increase across the auxpow coins, from the hash being pointed toward peercoin/clones |
auxpow.string can also be split into two parts,
is the peercoin transaction. and im guessing this is what needs some attention.
^ not quite sure which this is yet, either branchProof or headerBuffer Could it be possible the header buffer needs some attention now? since I believe the coinbase buffer was already modified? |
After making the most recent changes on the peercoin-aux branch blocks are STILL failing to submit after stripping the timestamp from the hash.
|
A regular block being submitted. that accepts. is around 12 characters shorter than the peercoin block with the timestamp stripped. So i'm still missing something. But what is it... mazacoin block
^ peercoin block with timestamp removed ^ |
@ahmedbodi let me know when you have some time in between work. I'll up the bounty on this. You probably have a better understanding than i do. |
i worked some days on this. i think it will not work. as we all know, a miner builds the coinbase transaction ( with the help of extranonce ). this coinbase is different in POS-coins ( https://wiki.novaco.in/en/Transaction/ ): after the first 4 bytes there is a 4 byte timestamp ( and there is an additional script and the end, but this should be no problem ). no NON-POS coin expects this timestamp - it can not read that coinbase and gives an error while submitting ( {"result":null,"error":{"code":-1,"message":"ReadCompactSize() : size too large: iostream error"} ). so unless the child coins care about this, there is no way to import this coinbase to another coin. one workaround would be to remove the timestamp. now the daemons can read the auxblock ( {"result":false,"error":null} ). but it is not valid as a change in the string alters its hash and so the merkle root . difficulty und blockhash are no longer valid. another idea was two create a second coinbase tx (with zero outputs? with a static extranonce..), which is valid for the child chain and sent like a normal tx to the miner. so it gets inculded in merkle tree. but two coinbases in one block is probably forbidden ( https://en.bitcoin.it/wiki/Protocol_rules#.22block.22_messages ). it is also not possible to remove it after computation - this would change merkle root again. so this mining stuff is really robust and hardened against attacks.. so we can not cheat the system.. PS: the only combination i can think of: Peercoin as master and Emercoin as child. It has POS and is merge mined. But the diff is really high, i can not test that spontaneously ( and profit is very low for that coin! ) |
Payment fixes
Currently shares from the POW/POS coins main chain when submitted to an auxpow coin as a block, it returns ReadCompactSize() : size too large. I'm guessing that block headers need to be adjusted for the hybrid coin, to be able to submit the block to the AUX network successfully.
--- There is a **[$100 open bounty](https://www.bountysource.com/issues/41537961-merge-mining-with-hybrid-pow-pos-coins-as-main-chain?utm_campaign=plugin&utm_content=tracker%2F8405108&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F8405108&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: