Post
Topic
Board Altcoin Discussion
Re: [ANN][YAC][POOL]p2pool for yacoin!!
by
ntkrnl
on 13/05/2013, 10:46:09 UTC
UPDATE:
mmh, there is still something wrong with the payment system
In other words, ppcoin novacoin yacoin basiclly don't support paid-by-worker mode( -u username as address). You can only run p2pool minerd yacoind on your own machine and pay to yourselft.

So if I've been running this P2Pool on my server overnight, connected miners in the usual P2Pool way (address as username, any password), and found a couple of blocks, where would the payouts have gone to?

Also, for a complete noob like me, how do I go about changing my setup for now, so that all work goes towards the single wallet address on my server?

Thanks for your help.. will definitely be giving you a solid tip once the teething problems are fixed. Smiley

In fact, if you choose the address-as-name mode, you got nothing, the block was not successfully submitted with an error "Sign failed" in /.yacoin/debug.log  Sad
Here is some technical details:

1.Compared with bitcoin litecoin, there is a quite different feature in ppcoin novacoin yacoin . If a block is found, the p2pool will call a  jsonprc method called "submitblock", here is the "submitblock" funtion in yacoin
's source:

Code:
// ppcoin: sign block
bool CBlock::SignBlock(const CKeyStore& keystore)
{
    vector vSolutions;
    txnouttype whichType;

    if(!IsProofOfStake())
    {
        for(unsigned int i = 0; i < vtx[0].vout.size(); i++)
        {
            const CTxOut& txout = vtx[0].vout[i];

            if (!Solver(txout.scriptPubKey, whichType, vSolutions))
                continue;

            if (whichType == TX_PUBKEY)
            {
                // Sign
                valtype& vchPubKey = vSolutions[0];
                CKey key;

                if (!keystore.GetKey(Hash160(vchPubKey), key))
                    continue;
                if (key.GetPubKey() != vchPubKey)
                    continue;
                if(!key.Sign(GetHash(), vchBlockSig))
                    continue;

                return true;
            }
        }
    }
    else
    {
        const CTxOut& txout = vtx[1].vout[1];

        if (!Solver(txout.scriptPubKey, whichType, vSolutions))
            return false;

        if (whichType == TX_PUBKEY)
        {
            // Sign
            valtype& vchPubKey = vSolutions[0];
            CKey key;

            if (!keystore.GetKey(Hash160(vchPubKey), key))
                return false;
            if (key.GetPubKey() != vchPubKey)
                return false;

            return key.Sign(GetHash(), vchBlockSig);
        }
    }

[color=red]    printf("Sign failed\n");[/color]
    return false;
}

The variable "keystore" is the keys(pubkey pubkey_hash privatekey etc.) of your wallet. That means if you submit a block, you should sign it up with the pubkeys from your wallet,  but  username-as-address mode just only sends p2pool your pubkey_hash.  you can easily get a pubkey_hash with an address, but never get pubkey, just like you want to get the text password from md5.

I've already found a tricky way to fix this problem, just wait for the next version  Wink