Git Product home page Git Product logo

node-cryptoforknote-util's People

Contributors

bomb-on avatar campurro avatar clintar avatar doy-lee avatar fancoder avatar ghost-ai-cpu avatar ilie1988 avatar lucasjones avatar moneroocean avatar tubedev2000 avatar wallet42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-cryptoforknote-util's Issues

Unable to install with NodeJS 13

I tried to install this with NodeJS 13 on Ubuntu 18 but it looks like it's failing on build step, complete log as follows:


> [email protected] install /home/pool/test/node_modules/cryptoforknote-util
> node-gyp rebuild

make: Entering directory '/home/pool/test/node_modules/cryptoforknote-util/build'
  CXX(target) Release/obj.target/cryptoforknote/src/main.o
../src/main.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE construct_block_blob(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:225:69: error: no matching function for call to ‘v8::Array::Get(int&)’
         for (int i = 0; i < 32; i++ ) b.cycle.data[i] = cycle->Get(i)->NumberValue(isolate->GetCurrentContext()).ToChecked();
                                                                     ^
In file included from /home/pool/.cache/node-gyp/13.13.0/include/node/node.h:67:0,
                 from ../src/main.cc:2:
/home/pool/.cache/node-gyp/13.13.0/include/node/v8.h:3594:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pool/.cache/node-gyp/13.13.0/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/pool/.cache/node-gyp/13.13.0/include/node/v8.h:3597:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pool/.cache/node-gyp/13.13.0/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
cryptoforknote.target.mk:127: recipe for target 'Release/obj.target/cryptoforknote/src/main.o' failed
make: *** [Release/obj.target/cryptoforknote/src/main.o] Error 1
make: Leaving directory '/home/pool/test/node_modules/cryptoforknote-util/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/pool/.nvm/versions/node/v13.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.15.0-96-generic
gyp ERR! command "/home/pool/.nvm/versions/node/v13.13.0/bin/node" "/home/pool/.nvm/versions/node/v13.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pool/test/node_modules/cryptoforknote-util
gyp ERR! node -v v13.13.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pool/.npm/_logs/2020-04-24T13_11_48_845Z-debug.log

and also:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/pool/.nvm/versions/node/v13.13.0/bin/node',
1 verbose cli   '/home/pool/.nvm/versions/node/v13.13.0/bin/npm',
1 verbose cli   'install',
1 verbose cli   'https://github.com/MoneroOcean/node-cryptoforknote-util.git'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 206f8f8976b8a88c
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 info lifecycle [email protected]~prepack: [email protected]
8 info lifecycle [email protected]~postpack: [email protected]
9 silly pacote git manifest for undefined@git+https://github.com/MoneroOcean/node-cryptoforknote-util.git fetched in 2263ms
10 timing stage:loadCurrentTree Completed in 2310ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
16 silly install loadAllDepsIntoIdealTree
17 silly resolveWithNewModule [email protected] checking installable status
18 http fetch GET 200 https://registry.npmjs.org/bindings 206ms
19 http fetch GET 200 https://registry.npmjs.org/nan 205ms
20 http fetch GET 200 https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz 100ms
21 http fetch GET 200 https://registry.npmjs.org/nan/-/nan-2.14.1.tgz 106ms
22 silly pacote range manifest for bindings@* fetched in 334ms
23 silly resolveWithNewModule [email protected] checking installable status
24 silly pacote range manifest for nan@^2.0.0 fetched in 326ms
25 silly resolveWithNewModule [email protected] checking installable status
26 http fetch GET 200 https://registry.npmjs.org/file-uri-to-path 53ms
27 http fetch GET 200 https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz 56ms
28 silly pacote version manifest for [email protected] fetched in 115ms
29 silly resolveWithNewModule [email protected] checking installable status
30 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 462ms
31 timing stage:loadIdealTree Completed in 467ms
32 silly currentTree [email protected]
33 silly idealTree [email protected]
33 silly idealTree ├── [email protected]
33 silly idealTree ├── [email protected]
33 silly idealTree ├── [email protected]
33 silly idealTree └── [email protected]
34 silly install generateActionsToTake
35 timing stage:generateActionsToTake Completed in 5ms
36 silly diffTrees action count 4
37 silly diffTrees add [email protected]
38 silly diffTrees add [email protected]
39 silly diffTrees add [email protected]
40 silly diffTrees add [email protected]
41 silly decomposeActions action count 32
42 silly decomposeActions fetch [email protected]
43 silly decomposeActions extract [email protected]
44 silly decomposeActions preinstall [email protected]
45 silly decomposeActions build [email protected]
46 silly decomposeActions install [email protected]
47 silly decomposeActions postinstall [email protected]
48 silly decomposeActions finalize [email protected]
49 silly decomposeActions refresh-package-json [email protected]
50 silly decomposeActions fetch [email protected]
51 silly decomposeActions extract [email protected]
52 silly decomposeActions preinstall [email protected]
53 silly decomposeActions build [email protected]
54 silly decomposeActions install [email protected]
55 silly decomposeActions postinstall [email protected]
56 silly decomposeActions finalize [email protected]
57 silly decomposeActions refresh-package-json [email protected]
58 silly decomposeActions fetch [email protected]
59 silly decomposeActions extract [email protected]
60 silly decomposeActions preinstall [email protected]
61 silly decomposeActions build [email protected]
62 silly decomposeActions install [email protected]
63 silly decomposeActions postinstall [email protected]
64 silly decomposeActions finalize [email protected]
65 silly decomposeActions refresh-package-json [email protected]
66 silly decomposeActions fetch [email protected]
67 silly decomposeActions extract [email protected]
68 silly decomposeActions preinstall [email protected]
69 silly decomposeActions build [email protected]
70 silly decomposeActions install [email protected]
71 silly decomposeActions postinstall [email protected]
72 silly decomposeActions finalize [email protected]
73 silly decomposeActions refresh-package-json [email protected]
74 silly install executeActions
75 silly doSerial global-install 32
76 verbose correctMkdir /home/pool/.npm/_locks correctMkdir not in flight; initializing
77 verbose lock using /home/pool/.npm/_locks/staging-95837436bdbb9418.lock for /home/pool/test/node_modules/.staging
78 silly doParallel extract 4
79 silly extract [email protected]
80 silly extract [email protected]
81 silly extract [email protected]
82 silly extract [email protected]
83 silly tarball trying [email protected] by hash: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
84 silly tarball trying bindings@* by hash: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
85 silly tarball trying nan@^2.0.0 by hash: sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
86 silly tarball no local data for git+https://github.com/MoneroOcean/node-cryptoforknote-util.git. Extracting by manifest.
87 silly extract bindings@* extracted to /home/pool/test/node_modules/.staging/bindings-53bcacc4 (77ms)
88 silly extract [email protected] extracted to /home/pool/test/node_modules/.staging/file-uri-to-path-3cf46cd9 (81ms)
89 silly extract nan@^2.0.0 extracted to /home/pool/test/node_modules/.staging/nan-bb63e09a (89ms)
90 timing audit submit Completed in 283ms
91 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 283ms
92 timing audit body Completed in 1ms
93 info lifecycle [email protected]~prepack: [email protected]
94 info lifecycle [email protected]~postpack: [email protected]
95 silly extract git+https://github.com/MoneroOcean/node-cryptoforknote-util.git extracted to /home/pool/test/node_modules/.staging/cryptoforknote-util-b429f1e8 (1672ms)
96 timing action:extract Completed in 1683ms
97 silly doReverseSerial unbuild 32
98 silly doSerial remove 32
99 silly doSerial move 32
100 silly doSerial finalize 32
101 silly finalize /home/pool/test/node_modules/file-uri-to-path
102 silly finalize /home/pool/test/node_modules/bindings
103 silly finalize /home/pool/test/node_modules/nan
104 silly finalize /home/pool/test/node_modules/cryptoforknote-util
105 timing action:finalize Completed in 12ms
106 silly doParallel refresh-package-json 4
107 silly refresh-package-json /home/pool/test/node_modules/file-uri-to-path
108 silly refresh-package-json /home/pool/test/node_modules/bindings
109 silly refresh-package-json /home/pool/test/node_modules/nan
110 silly refresh-package-json /home/pool/test/node_modules/cryptoforknote-util
111 timing action:refresh-package-json Completed in 17ms
112 silly doParallel preinstall 4
113 silly preinstall [email protected]
114 info lifecycle [email protected]~preinstall: [email protected]
115 silly preinstall [email protected]
116 info lifecycle [email protected]~preinstall: [email protected]
117 silly preinstall [email protected]
118 info lifecycle [email protected]~preinstall: [email protected]
119 silly preinstall [email protected]
120 info lifecycle [email protected]~preinstall: [email protected]
121 timing action:preinstall Completed in 0ms
122 silly doSerial build 32
123 silly build [email protected]
124 info linkStuff [email protected]
125 silly linkStuff [email protected] has /home/pool/test/node_modules as its parent node_modules
126 silly build [email protected]
127 info linkStuff [email protected]
128 silly linkStuff [email protected] has /home/pool/test/node_modules as its parent node_modules
129 silly build [email protected]
130 info linkStuff [email protected]
131 silly linkStuff [email protected] has /home/pool/test/node_modules as its parent node_modules
132 silly build [email protected]
133 info linkStuff [email protected]
134 silly linkStuff [email protected] has /home/pool/test/node_modules as its parent node_modules
135 timing action:build Completed in 2ms
136 silly doSerial global-link 32
137 silly doParallel update-linked 0
138 silly doSerial install 32
139 silly install [email protected]
140 info lifecycle [email protected]~install: [email protected]
141 silly install [email protected]
142 info lifecycle [email protected]~install: [email protected]
143 silly install [email protected]
144 info lifecycle [email protected]~install: [email protected]
145 silly install [email protected]
146 info lifecycle [email protected]~install: [email protected]
147 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
148 verbose lifecycle [email protected]~install: PATH: /home/pool/.nvm/versions/node/v13.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pool/test/node_modules/cryptoforknote-util/node_modules/.bin:/home/pool/test/node_modules/.bin:/home/pool/.nvm/versions/node/v13.13.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
149 verbose lifecycle [email protected]~install: CWD: /home/pool/test/node_modules/cryptoforknote-util
150 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild' ]
151 silly lifecycle [email protected]~install: Returned: code: 1  signal: null
152 info lifecycle [email protected]~install: Failed to exec install script
153 timing action:install Completed in 7404ms
154 verbose unlock done using /home/pool/.npm/_locks/staging-95837436bdbb9418.lock for /home/pool/test/node_modules/.staging
155 timing stage:rollbackFailedOptional Completed in 24ms
156 timing stage:runTopLevelLifecycles Completed in 11969ms
157 silly saveTree [email protected]
157 silly saveTree └─┬ [email protected]
157 silly saveTree   ├─┬ [email protected]
157 silly saveTree   │ └── [email protected]
157 silly saveTree   └── [email protected]
158 warn [email protected] No description
159 warn [email protected] No repository field.
160 verbose stack Error: [email protected] install: `node-gyp rebuild`
160 verbose stack Exit status 1
160 verbose stack     at EventEmitter.<anonymous> (/home/pool/.nvm/versions/node/v13.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
160 verbose stack     at EventEmitter.emit (events.js:315:20)
160 verbose stack     at ChildProcess.<anonymous> (/home/pool/.nvm/versions/node/v13.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
160 verbose stack     at ChildProcess.emit (events.js:315:20)
160 verbose stack     at maybeClose (internal/child_process.js:1026:16)
160 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
161 verbose pkgid [email protected]
162 verbose cwd /home/pool/test
163 verbose Linux 4.15.0-96-generic
164 verbose argv "/home/pool/.nvm/versions/node/v13.13.0/bin/node" "/home/pool/.nvm/versions/node/v13.13.0/bin/npm" "install" "https://github.com/MoneroOcean/node-cryptoforknote-util.git"
165 verbose node v13.13.0
166 verbose npm  v6.14.4
167 error code ELIFECYCLE
168 error errno 1
169 error [email protected] install: `node-gyp rebuild`
169 error Exit status 1
170 error Failed at the [email protected] install script.
170 error This is probably not a problem with npm. There is likely additional logging output above.
171 verbose exit [ 1, true ]

Due to my limited knowledge with C/C++, I wonder if anyone could help out with solving this issue?
Thanks in advance!

Windows Compilation

Hi,

Curious if this will compile on windows. if it does what do i need to do.

I installed openssl that fixed some issues.

currently getting these errors.

node_modules\cryptoforknote-util\src\crypto\crypto.cpp(5): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory

node_modules\cryptoforknote-util\src\common\int-util.h(11): fatal error C1083: Cannot open include file: 'sys/param.h': No such file or directory

node_modules\cryptoforknote-util\src\cryptonote_core\cryptonote_basic.h(7): fatal error C1083: Cannot open include file: 'boost/variant.hpp': No such
file or directory

node_modules\cryptoforknote-util\src\contrib\epee\include\misc_log_ex.h(42): fatal error C1083: Cannot open include file: 'boost/cstdint.hpp': No such
file or directory

I'll try installing boost too.

Monero v15 compatibility: "Failed to parse block" in convert_blob() after hardfork.

I've been doing some tests on a private testnet to ensure everything will work after the v15 fork.

As soon as the hardfork takes place, convert_blob() will break with the error message "Failed to parse block".

There's no PoW change this time, but it is my understanding that the block template is changing (I guess in part to include the new feature "view tags") and this might be breaking things.

In my current setup I've been using v4.0.2 since RandomX was implemented. I can build up to v7.0.2, but any version after that will fail to build (I believe it's due to the old nodejs version I'm running: v0.12.18). Despite that, I don't think there's been any change relevant to this issue in recent versions of this repo. Sorry if I'm mistaken.

If you get to fix this issue I would be grateful if you could backport the changes to v7.0.2 to make it compatible with nodejs v0.12.18. If it's trivial I guess I could try to backport it myself, but sadly I'm not proficient in C.

convert_blob fails with bytecoin

running the following development branch with a fully sync'd bytecoin daemon.

https://github.com/dvandal/cryptonote-nodejs-pool/tree/development

the following config should work.

https://github.com/dvandal/cryptonote-nodejs-pool/blob/development/config_examples/bbscoin.json

I also forked node-cryptoforknote-util and added a bunch of debugging outputs. Appears a proof is failing to serialize

https://github.com/muscleman/node-cryptoforknote-util/blob/master/src/serialization/vector.h#L60

How to use this

Hi,

Not an issue, but a question on how to use this on an existing single coin pool, based on Snipa22 repo. I have no idea what changes are required on the pool side, to enable merged mining.

Any advice would be appreciated for my very small pools :)

hivecoin HVQ (HVN)

Good evening. Tell me, is it possible to add an additional construction of the kawpow blocktemplate?
The kawpow of HVQ is slightly different. I tried to find the changes, but I don't understand well. Perhaps a link to the pool in their git will help. I tried to run with this kawpow but the reward is 0. HiveProject2021/kawpow-pool@224d574

let cliHost = '';
if (portalConfig.cliHost) {
cliHost = portalConfig.cliHost;
} else {
cliHost = '127.0.0.1';
}
var cliPort = portalConfig.cliPort;
var listener = new CliListener(cliHost, cliPort);
listener.on('log', function (text) {
logger.debug('Master', 'CLI', text);
}).on('command', function (command, params, options, reply) {
switch (command) {
case 'blocknotify':
Object.keys(cluster.workers).forEach(function (id) {
cluster.workers[id].send({type: 'blocknotify', coin: params[0], hash: params[1]});
});
reply('Pool workers notified');
break;
case 'coinswitch':
processCoinSwitchCommand(params, options, reply);
break;
case 'reloadpool':
Object.keys(cluster.workers).forEach(function (id) {
cluster.workers[id].send({type: 'reloadpool', coin: params[0]});
});
reply('reloaded pool ' + params[0]);
break;
default:
reply('unrecognized command "' + command + '"');
break;
}
}).start();

Compilation errors to install cryptoforknote-util

When trying to install cryptoforknote-util using normal means, nodejs/node-gyp#2638 occurs:

 % npm install cryptoforknote-util
npm WARN skipping integrity check for git dependency ssh://[email protected]/MoneroOcean/bitcoinjs-lib.git
npm ERR! code 1
npm ERR! path /home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util
npm ERR! command failed
npm ERR! command sh /tmp/install-fecd0894.sh
npm ERR! make: Entering directory '/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util/build'
npm ERR!   CXX(target) Release/obj.target/cryptoforknote/src/main.o
npm ERR! make: Leaving directory '/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.5 found at "/usr/lib/python-exec/python3.10/python3"
npm ERR! gyp info spawn /usr/lib/python-exec/python3.10/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/minilaroqrl/.cache/node-gyp/16.17.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/minilaroqrl/.cache/node-gyp/16.17.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/v8.h:30,
npm ERR!                  from /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/node.h:73,
npm ERR!                  from ../src/main.cc:2:
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                      ^~~~~~~~~~~
npm ERR!       |                                      remove_cv
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                      ^~~~~~~~~~~
npm ERR!       |                                      remove_cv
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                                  ^
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                                               ^~~~~~~
npm ERR! In file included from ../src/cryptonote_core/cryptonote_basic.h:16,
npm ERR!                  from ../src/main.cc:8:
npm ERR! ../src/serialization/binary_archive.h: In constructor ‘binary_archive<false>::binary_archive(binary_archive_base<std::basic_istream<char>, false>::stream_type&)’:
npm ERR! ../src/serialization/binary_archive.h:51:28: warning: ‘std::ios_base::streampos’ is deprecated: use 'std::streampos' instead [-Wdeprecated-declarations]
npm ERR!    51 |     stream_type::streampos pos = stream_.tellg();
npm ERR!       |                            ^~~
npm ERR! In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/streambuf:41,
npm ERR!                  from /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/bits/streambuf_iterator.h:35,
npm ERR!                  from /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/iterator:66,
npm ERR!                  from /usr/include/boost/container_hash/hash.hpp:21,
npm ERR!                  from /usr/include/boost/functional/hash/hash.hpp:6,
npm ERR!                  from ../src/cryptonote_core/cryptonote_basic.h:8,
npm ERR!                  from ../src/main.cc:8:
npm ERR! /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/bits/ios_base.h:499:28: note: declared here
npm ERR!   499 |     typedef std::streampos streampos
npm ERR!       |                            ^~~~~~~~~
npm ERR! In file included from ../src/serialization/crypto.h:10,
npm ERR!                  from ../src/cryptonote_core/cryptonote_basic.h:17,
npm ERR!                  from ../src/main.cc:8:
npm ERR! ../src/crypto/chacha8.h: In function ‘void crypto::generate_chacha8_key(std::string, crypto::chacha8_key&)’:
npm ERR! ../src/crypto/chacha8.h:51:11: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘struct crypto::chacha8_key’; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
npm ERR!    51 |     memcpy(&key, pwd_hash, sizeof(key));
npm ERR!       |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/crypto/chacha8.h:26:10: note: ‘struct crypto::chacha8_key’ declared here
npm ERR!    26 |   struct chacha8_key {
npm ERR!       |          ^~~~~~~~~~~
npm ERR! In file included from ../src/main.cc:2:
npm ERR! ../src/main.cc: At global scope:
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/node.h:859:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR!   859 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/node.h:893:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR!   893 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR!       |   ^~~~~~~~~~~~~
npm ERR! ../src/main.cc:392:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR!   392 | NODE_MODULE(cryptoforknote, init)
npm ERR!       | ^~~~~~~~~~~
npm ERR! make: *** [cryptoforknote.target.mk:132: Release/obj.target/cryptoforknote/src/main.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.19.3-gentoo
npm ERR! gyp ERR! command "/home/minilaroqrl/.nvm/versions/node/v16.17.0/bin/node" "/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/minilaroqrl/.npm/_logs/2022-09-18T21_05_50_071Z-debug-0.log

When trying to install it using the suggested workaround of CXXFLAGS="-std=c++17", a different compilation error occurs:

 % CXXFLAGS="-std=c++17" npm install cryptoforknote-util
npm WARN skipping integrity check for git dependency ssh://[email protected]/MoneroOcean/bitcoinjs-lib.git
npm ERR! code 1
npm ERR! path /home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util
npm ERR! command failed
npm ERR! command sh /tmp/install-14e3a5df.sh
npm ERR! make: Entering directory '/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util/build'
npm ERR!   CXX(target) Release/obj.target/cryptoforknote/src/main.o
npm ERR! make: Leaving directory '/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.5 found at "/usr/lib/python-exec/python3.10/python3"
npm ERR! gyp info spawn /usr/lib/python-exec/python3.10/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/minilaroqrl/.cache/node-gyp/16.17.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/minilaroqrl/.cache/node-gyp/16.17.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/cryptonote_core/cryptonote_basic.h:16,
npm ERR!                  from ../src/main.cc:8:
npm ERR! ../src/serialization/binary_archive.h: In constructor ‘binary_archive<false>::binary_archive(binary_archive_base<std::basic_istream<char>, false>::stream_type&)’:
npm ERR! ../src/serialization/binary_archive.h:51:18: error: ‘streampos’ is not a member of ‘binary_archive_base<std::basic_istream<char>, false>::stream_type’ {aka ‘std::basic_istream<char>’}
npm ERR!    51 |     stream_type::streampos pos = stream_.tellg();
npm ERR!       |                  ^~~~~~~~~
npm ERR! ../src/serialization/binary_archive.h:54:19: error: ‘pos’ was not declared in this scope; did you mean ‘pow’?
npm ERR!    54 |     stream_.seekg(pos);
npm ERR!       |                   ^~~
npm ERR!       |                   pow
npm ERR! In file included from ../src/serialization/crypto.h:10,
npm ERR!                  from ../src/cryptonote_core/cryptonote_basic.h:17,
npm ERR!                  from ../src/main.cc:8:
npm ERR! ../src/crypto/chacha8.h: In function ‘void crypto::generate_chacha8_key(std::string, crypto::chacha8_key&)’:
npm ERR! ../src/crypto/chacha8.h:51:11: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘struct crypto::chacha8_key’; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
npm ERR!    51 |     memcpy(&key, pwd_hash, sizeof(key));
npm ERR!       |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/crypto/chacha8.h:26:10: note: ‘struct crypto::chacha8_key’ declared here
npm ERR!    26 |   struct chacha8_key {
npm ERR!       |          ^~~~~~~~~~~
npm ERR! In file included from ../src/main.cc:2:
npm ERR! ../src/main.cc: At global scope:
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/node.h:859:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR!   859 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/minilaroqrl/.cache/node-gyp/16.17.0/include/node/node.h:893:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR!   893 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR!       |   ^~~~~~~~~~~~~
npm ERR! ../src/main.cc:392:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR!   392 | NODE_MODULE(cryptoforknote, init)
npm ERR!       | ^~~~~~~~~~~
npm ERR! make: *** [cryptoforknote.target.mk:138: Release/obj.target/cryptoforknote/src/main.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.19.3-gentoo
npm ERR! gyp ERR! command "/home/minilaroqrl/.nvm/versions/node/v16.17.0/bin/node" "/home/minilaroqrl/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/minilaroqrl/cryptonote-nodejs-pool_16/node_modules/cryptoforknote-util
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/minilaroqrl/.npm/_logs/2022-09-18T21_07_12_792Z-debug-0.log

Seperate algo types for every coins

It seems some coins don’t follow the rule (version = 7). Moreover, Graft use v7 now. I think we should put sepearte type for each coin (there are not many coins). Default is Monero.

Installing Issue

When installing I receive the error below:

83 verbose stack Error: [email protected] install: node-gyp rebuild
83 verbose stack Exit status 1
83 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
83 verbose stack at EventEmitter.emit (events.js:315:20)
83 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
83 verbose stack at ChildProcess.emit (events.js:315:20)
83 verbose stack at maybeClose (internal/child_process.js:1021:16)
83 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
84 verbose pkgid [email protected]
85 verbose cwd /home/pool/pool/node_modules
86 verbose Linux 4.15.0-66-generic
87 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/MoneroOcean/node-cryptoforknote-util"
88 verbose node v12.18.2
89 verbose npm v6.14.6
90 error code ELIFECYCLE
91 error errno 1
92 error [email protected] install: node-gyp rebuild
92 error Exit status 1
93 error Failed at the [email protected] install script.
93 error This is probably not a problem with npm. There is likely additional logging output above.
94 verbose exit [ 1, true ]

Can anyone help on this?

Ubuntu 18.04

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.