Code Monkey home page Code Monkey logo

Comments (7)

jmprcx avatar jmprcx commented on August 17, 2024 1

Hello, I've just merged it into master so you'll just need to run:

git pull
npm update
npm install

then you can run Z-NOMP as normal with npm start.

from z-nomp.

jmprcx avatar jmprcx commented on August 17, 2024

These are the relevant checks from the Zcash codebase.

/src/chainparams.cpp

// Block height must be >0 and <=last founders reward block height
// Index variable i ranges from 0 - (vFoundersRewardAddress.size()-1)
std::string CChainParams::GetFoundersRewardAddressAtHeight(int nHeight) const {
    int maxHeight = consensus.GetLastFoundersRewardBlockHeight();
    assert(nHeight > 0 && nHeight <= maxHeight);

    size_t addressChangeInterval = (maxHeight + vFoundersRewardAddress.size()) / vFoundersRewardAddress.size();
    size_t i = nHeight / addressChangeInterval;
    return vFoundersRewardAddress[i];
}

// Block height must be >0 and <=last founders reward block height
// The founders reward address is expected to be a multisig (P2SH) address
CScript CChainParams::GetFoundersRewardScriptAtHeight(int nHeight) const {
    assert(nHeight > 0 && nHeight <= consensus.GetLastFoundersRewardBlockHeight());

    CBitcoinAddress address(GetFoundersRewardAddressAtHeight(nHeight).c_str());
    assert(address.IsValid());
    assert(address.IsScript());
    CScriptID scriptID = get<CScriptID>(address.Get()); // Get() returns a boost variant
    CScript script = CScript() << OP_HASH160 << ToByteVector(scriptID) << OP_EQUAL;
    return script;
}

/src/main.cpp

// Coinbase transaction must include an output sending 20% of
    // the block reward to a founders reward script, until the last founders
    // reward block is reached, with exception of the genesis block.
    // The last founders reward block is defined as the block just before the
    // first subsidy halving block, which occurs at halving_interval + slow_start_shift
    if ((nHeight > 0) && (nHeight <= consensusParams.GetLastFoundersRewardBlockHeight())) {
        bool found = false;

        BOOST_FOREACH(const CTxOut& output, block.vtx[0].vout) {
            if (output.scriptPubKey == Params().GetFoundersRewardScriptAtHeight(nHeight)) {
                if (output.nValue == (GetBlockSubsidy(nHeight, consensusParams) / 5)) {
                    found = true;
                    break;
                }
            }
        }

        if (!found) {
            return state.DoS(100, error("%s: founders reward missing", __func__), REJECT_INVALID, "cb-no-founders-reward");
        }
    }

from z-nomp.

jmprcx avatar jmprcx commented on August 17, 2024

The solution is ready for testing:

ce38771
z-classic/node-stratum-pool@1e83fc5

from z-nomp.

MCrypto avatar MCrypto commented on August 17, 2024

i was about to re-install z-nomp and i'm targeting zcash ... so to test i just follow the normal steps? or should do something for the above 2 mentioned files? (apologies for the noob question ... fairly new to using git updates / merges / and all of it)

from z-nomp.

coolsd avatar coolsd commented on August 17, 2024

2016-12-21 11:55:16 [Master] [PoolSpawner] Fork 6 died, spawning replacement worker...
/root/nomp4/node_modules/stratum-pool/lib/pool.js:577
result.response.miner = subsidy.miner;
^

TypeError: Cannot read property 'miner' of undefined
at /root/nomp4/node_modules/stratum-pool/lib/pool.js:577:56
at itemFinished (/root/nomp4/node_modules/stratum-pool/lib/daemon.js:155:36)
at /root/nomp4/node_modules/stratum-pool/lib/daemon.js:169:17
at parseJson (/root/nomp4/node_modules/stratum-pool/lib/daemon.js:85:17)
at IncomingMessage. (/root/nomp4/node_modules/stratum-pool/lib/daemon.js:95:17)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

from z-nomp.

coolsd avatar coolsd commented on August 17, 2024

zcash.json

{
"enabled": true,
"coin": "zcash.json",

"address": "t1NB1GVXeHVHZzKgCx6oDhFBLPi6X4KWAxE",
"_comment_address": "a transparent address to send coinbase rewards to and to transfer to zAddress.",

"zAddress": "zcZGfifF1j7ankQVJh6z3oNEgdZBZuembTbE3t6N1PZzed9yL1tt2q49hx5FX6c5NRBbvKYagkb3kCvAkUgvGapMBG9XLYn",
"_comment_zAddress": "a private address used to send coins to tAddress.",

"tAddress": "t1WmGj3XCJPoiqgaFPQyB6dMejMJYHtpoz5",
"_comment_tAddress": "transparent address used to send payments",

"walletInterval": 10,

"rewardRecipients": {
},

"paymentProcessing": {
    "enabled": false,
    "paymentInterval": 20,
    "minimumPayment": 70,
    "daemon": {
        "host": "192.168.10.32",
        "port": 8234,
        "user": "usr",
        "password": "xxxxxxxxxxxxxxx"
    }
},

"ports": {
    "13034": {
        "diff": 0.5,
        "varDiff": {
            "minDiff": 0.5,
            "maxDiff": 16,
            "targetTime": 15,
            "retargetTime": 90,
            "variancePercent": 30
        }
    },
    "13035": {
        "diff": 5,
        "varDiff": {
            "minDiff": 5,
            "maxDiff": 16,
            "targetTime": 15,
            "retargetTime": 90,
            "variancePercent": 30
        }
    }
},


"daemons": [
    {
        "host": "192.168.10.32",
        "port": 8234,
        "user": "usr",
        "password": "xxxxxxxxxxxxxxxxxxx"
    }
],

"p2p": {
    "enabled": false,
    "host": "127.0.0.1",
    "port": 19333,
    "disableTransactions": true
},

"mposMode": {
    "enabled": true,
    "host": "192.168.10.42",
    "port": 3306,
    "user": "root",
    "password": "xxxxx",
    "database": "zec",
    "checkPassword": false,
    "autoCreateWorker": true
}

}

from z-nomp.

jmprcx avatar jmprcx commented on August 17, 2024

What this is saying is that it can't read the getblocktemplate and getblocksubsidy result from the zcash daemon. Are you sure the password is correct and you have the right permissions and have the right port? 5 difficulty is very high btw.

2016-12-21 11:54:51 [Pool] [zcash] (Thread 1) getblocktemplate call failed for daemon instance 0 with error {"type":"request error","message":"read ECONNRESET"}
2016-12-21 11:54:52 [Pool] [zcash] (Thread 5) getblocktemplate call failed for daemon instance 0 with error {"type":"request error","message":"read ECONNRESET"}
2016-12-21 11:54:52 [Pool] [zcash] (Thread 4) Share accepted at diff 5/5.67942917 by coolsd.1 [::ffff:192.168.10.112]
2016-12-21 11:55:16 [Master] [PoolSpawner] Fork 6 died, spawning replacement worker...
/root/nomp4/node_modules/stratum-pool/lib/pool.js:577
result.response.miner = subsidy.miner;

from z-nomp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.