pbca26 / komodo-omni-explorer

Komodo Omni Explorer
17 stars 15 forks source link

Error: Invalid checksum #46

Closed atomlab closed 3 years ago

atomlab commented 4 years ago

Hi. I try run komodo-omni-explorer with docker and get fail. How to fix it?

git clone https://github.com/pbca26/komodo-omni-explorer
cd komodo-omni-explorer
docker run --rm -it -w /opt/app/ -v ${PWD}:/opt/app node:14 /bin/sh -c "npm install && npm start"

output

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> keccak@2.1.0 install /opt/app/node_modules/keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."

> keccak@2.1.0 rebuild /opt/app/node_modules/keccak
> node-gyp rebuild

make: Entering directory '/opt/app/node_modules/keccak/build'
  CXX(target) Release/obj.target/keccak/src/addon.o
  CC(target) Release/obj.target/keccak/src/libkeccak-64/KeccakSpongeWidth1600.o
  CC(target) Release/obj.target/keccak/src/libkeccak-64/KeccakP-1600-opt64.o
  SOLINK_MODULE(target) Release/obj.target/keccak.node
  COPY Release/keccak.node
make: Leaving directory '/opt/app/node_modules/keccak/build'

> secp256k1@3.8.0 install /opt/app/node_modules/secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."

> secp256k1@3.8.0 rebuild /opt/app/node_modules/secp256k1
> node-gyp rebuild

make: Entering directory '/opt/app/node_modules/secp256k1/build'
  CXX(target) Release/obj.target/secp256k1/src/addon.o
  CXX(target) Release/obj.target/secp256k1/src/privatekey.o
../src/privatekey.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE privateKeyNegate(Nan::NAN_METHOD_ARGS_TYPE)':
../src/privatekey.cc:73:61: warning: ignoring return value of 'int secp256k1_ec_privkey_negate(const secp256k1_context*, unsigned char*)', declared with attribute warn_unused_result [-Wunused-result]
   secp256k1_ec_privkey_negate(secp256k1ctx, &private_key[0]);
                                                             ^
  CXX(target) Release/obj.target/secp256k1/src/publickey.o
  CXX(target) Release/obj.target/secp256k1/src/signature.o
  CXX(target) Release/obj.target/secp256k1/src/ecdsa.o
  CXX(target) Release/obj.target/secp256k1/src/ecdh.o
  CC(target) Release/obj.target/secp256k1/src/secp256k1-src/src/secp256k1.o
  CC(target) Release/obj.target/secp256k1/src/secp256k1-src/contrib/lax_der_parsing.o
  CC(target) Release/obj.target/secp256k1/src/secp256k1-src/contrib/lax_der_privatekey_parsing.o
  SOLINK_MODULE(target) Release/obj.target/secp256k1.node
  COPY Release/secp256k1.node
make: Leaving directory '/opt/app/node_modules/secp256k1/build'

> tiny-secp256k1@1.1.5 install /opt/app/node_modules/tiny-secp256k1
> npm run build || echo "secp256k1 bindings compilation fail. Pure JS implementation will be used."

> tiny-secp256k1@1.1.5 build /opt/app/node_modules/tiny-secp256k1
> node-gyp rebuild

make: Entering directory '/opt/app/node_modules/tiny-secp256k1/build'
  CXX(target) Release/obj.target/secp256k1/native/addon.o
../native/addon.cpp: In instantiation of 'unsigned int {anonymous}::assumeCompression(const I&, const A&) [with long unsigned int index = 2ul; I = Nan::FunctionCallbackInfo<v8::Value>; A = v8::Local<v8::Object>]':
../native/addon.cpp:151:50:   required from here
../native/addon.cpp:80:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (info.Length() <= index || info[index]->IsUndefined()) {

../native/addon.cpp: In instantiation of 'unsigned int {anonymous}::assumeCompression(const I&, const A&) [with long unsigned int index = 1ul; I = Nan::FunctionCallbackInfo<v8::Value>; A = v8::Local<v8::Object>]':
../native/addon.cpp:183:49:   required from here
../native/addon.cpp:80:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../native/addon.cpp: In instantiation of 'unsigned int {anonymous}::assumeCompression(const I&) [with long unsigned int index = 1ul; I = Nan::FunctionCallbackInfo<v8::Value>]':
../native/addon.cpp:198:46:   required from here
../native/addon.cpp:92:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (info.Length() <= index) return SECP256K1_EC_COMPRESSED;

../native/addon.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE eccPrivateSub(Nan::NAN_METHOD_ARGS_TYPE)':
../native/addon.cpp:249:53: warning: ignoring return value of 'int secp256k1_ec_privkey_negate(const secp256k1_context*, unsigned char*)', declared with attribute warn_unused_result [-Wunused-result]
  secp256k1_ec_privkey_negate(context, tweak_negated); // returns 1 always
                                                     ^
  CC(target) Release/obj.target/secp256k1/native/secp256k1/src/secp256k1.o
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_pubkey_parse':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubkey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:154:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubkey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'input' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:156:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(input != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_pubkey_serialize':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'output' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:175:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(output != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'outputlen' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:171:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(outputlen != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubkey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:177:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubkey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ecdsa_signature_parse_der':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'sig' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:216:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(sig != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'input' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:217:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(input != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ecdsa_signature_parse_compact':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'sig' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:234:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(sig != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'input64' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:235:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(input64 != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ecdsa_signature_serialize_der':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'output' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:253:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(output != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'outputlen' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:254:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(outputlen != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'sig' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:255:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(sig != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ecdsa_signature_serialize_compact':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'output64' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:265:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(output64 != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'sig' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:266:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(sig != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ecdsa_signature_normalize':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'sigin' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:279:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(sigin != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ecdsa_verify':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'sig' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:300:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(sig != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'msg32' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:299:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(msg32 != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubkey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:301:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubkey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ecdsa_sign':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'signature' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:353:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(signature != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'msg32' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:352:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(msg32 != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'seckey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:354:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(seckey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_seckey_verify':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'seckey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:396:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(seckey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_pubkey_create':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubkey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:411:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubkey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'seckey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:414:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(seckey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_privkey_negate':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'seckey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:430:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(seckey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_pubkey_negate':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubkey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:443:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubkey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_privkey_tweak_add':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'seckey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:460:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(seckey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'tweak' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:461:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(tweak != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_pubkey_tweak_add':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubkey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:484:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubkey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'tweak' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:485:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(tweak != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_privkey_tweak_mul':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'seckey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:507:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(seckey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'tweak' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:508:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(tweak != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_pubkey_tweak_mul':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubkey' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:530:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubkey != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'tweak' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:531:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(tweak != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c: In function 'secp256k1_ec_pubkey_combine':
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubnonce' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:559:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubnonce != NULL);
     ^~~~~~~~~
../native/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument 'pubnonces' compared to NULL [-Wnonnull-compare]
     if (EXPECT(!(cond), 0)) { \
        ^
../native/secp256k1/src/secp256k1.c:562:5: note: in expansion of macro 'ARG_CHECK'
     ARG_CHECK(pubnonces != NULL);
     ^~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/secp256k1.node
  COPY Release/secp256k1.node
make: Leaving directory '/opt/app/node_modules/tiny-secp256k1/build'
npm notice created a lockfile as package-lock.json. You should commit this file.
added 699 packages from 1037 contributors and audited 699 packages in 63.872s

3 packages are looking for funding
  run `npm fund` for details

found 11 vulnerabilities (7 low, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details

> atomic-explorer@0.2.0 start /opt/app
> node main.js

total orderbook pairs 126
cmc bundle size 100, rounds 20
cg rounds 87
Komodo Atomic Explorer Server is running at localhost:8115
/opt/app/node_modules/bs58check/base.js:41
    if (!payload) throw new Error('Invalid checksum')
                  ^

Error: Invalid checksum
    at Object.decode (/opt/app/node_modules/bs58check/base.js:41:25)
    at Object.decode (/opt/app/node_modules/wif/index.js:43:30)
    at Function.ECPair.fromWIF (/opt/app/node_modules/bitcoinjs-lib/src/ecpair.js:61:21)
    at Function.api.kvLoop (/opt/app/routes/kv.js:340:36)
    at Function.api.start (/opt/app/routes/api.js:58:9)
    at Object.<anonymous> (/opt/app/main.js:80:5)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! atomic-explorer@0.2.0 start: `node main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the atomic-explorer@0.2.0 start 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!     /root/.npm/_logs/2020-07-06T18_13_21_422Z-debug.log
pbca26 commented 4 years ago

set kv: false in https://github.com/pbca26/komodo-omni-explorer/blob/master/config.js#L20 or you can just add your own WIF key here https://github.com/pbca26/komodo-omni-explorer/blob/master/config.js#L180 in case you want to keep KV feature on