s-nomp / s-nomp

Mining pool software for all equihash coins.
GNU General Public License v2.0
175 stars 224 forks source link

TypeError: tx.setOverwinter is not a function #58

Closed Jerry170617 closed 5 years ago

Jerry170617 commented 5 years ago
2018-09-07 10:59:56 [Master]    [PoolSpawner] Fork 2 died, spawning replacement worker...
2018-09-07 10:59:56 [Switching] [Setup] (Thread 4) Loading last proxy state from redis
2018-09-07 10:59:56 [Pool]      [zcash] (Thread 4) Share processing setup with redis (127.0.0.1:6379)
2018-09-07 10:59:56 [Switching] [Setup] (Thread 4) Switching "switch1" listening for equihash on port 3333 into zcash
/home/pool/s-nomp/node_modules/stratum-pool/lib/transactions.js:27
        tx.setOverwinter()
           ^

TypeError: tx.setOverwinter is not a function
    at Object.exports.createGeneration (/home/pool/s-nomp/node_modules/stratum-pool/lib/transactions.js:27:12)
    at new BlockTemplate (/home/pool/s-nomp/node_modules/stratum-pool/lib/blockTemplate.js:59:35)
    at JobManager.processTemplate (/home/pool/s-nomp/node_modules/stratum-pool/lib/jobManager.js:155:32)
    at /home/pool/s-nomp/node_modules/stratum-pool/lib/pool.js:601:66
    at itemFinished (/home/pool/s-nomp/node_modules/stratum-pool/lib/daemon.js:166:36)
    at /home/pool/s-nomp/node_modules/stratum-pool/lib/daemon.js:180:17
    at parseJson (/home/pool/s-nomp/node_modules/stratum-pool/lib/daemon.js:92:17)
    at IncomingMessage.<anonymous> (/home/pool/s-nomp/node_modules/stratum-pool/lib/daemon.js:103:17)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
2018-09-07 10:59:56 [Master]    [PoolSpawner] Fork 3 died, spawning replacement worker...
egyptianbman commented 5 years ago

Check your installation to ensure it has the bitcoinjs-lib from this org installed.

https://github.com/s-nomp/bitcoinjs-lib/blob/82d0131e0de211534ad16424b0757ba527487027/src/transaction.js#L33-L38

Jerry170617 commented 5 years ago

sudo npm install bitcoinjs-lib-zcash?

egyptianbman commented 5 years ago

no, you can compare node_modules/bitcoinjs-lib-zcash/src/transaction.js with the link I posted above. They should be identical.

Jerry170617 commented 5 years ago

Error: Cannot find module 'bitcoinjs-lib-zcash' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/home/pool/snomp/node_modules/stratum-pool/lib/transactions.js:1:79) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3)

egyptianbman commented 5 years ago

Are you using the base s-nomp code or is this a custom version of z-nomp?

Jerry170617 commented 5 years ago

base s-nomp code

egyptianbman commented 5 years ago

It sounds like you need to re-run npm install. That package is requested via dependencies: https://github.com/s-nomp/s-nomp/blob/master/package-lock.json#L198

Jerry170617 commented 5 years ago

https://github.com/s-nomp/bitcoinjs-lib/blob/zcash/src/transaction.js not found setOverwinter

egyptianbman commented 5 years ago

https://github.com/s-nomp/bitcoinjs-lib/blob/zcash/src/transaction.js#L33

Jerry170617 commented 5 years ago

2018-09-07 14:09:17 [Pool] [zcash_testnet] (Thread 1) Submitted Block using submitblock successfully to daemon instance(s) 2018-09-07 14:09:17 [Pool] [zcash_testnet] (Thread 1) We thought a block was found but it was rejected by the daemon, share data: {"job":"cccd","ip":"::ffff:113.224.184.59","port":3036,"worker":"tmBwYF8DTzKzKoqmiUjTAgkKJiejATZZzo1.3667","height":286860,"difficulty":0.05,"shareDiff":"0.39151923","blockDiff":0.229991933,"blockDiffActual":0.229991933,"blockHash":"00146ee7bba6d803ac8a4acdf71e77590cead3b31c3f51373e36eb7bacbdfc6d","error":{"unknown":"check coin daemon logs"}

egyptianbman commented 5 years ago

Closing this issue since there isn't a problem with the code. Please hop on Discord to request assistance with your setup. https://discord.gg/4mVaTsH