v5 completely unusable (worse than before)
See original GitHub issueI’m really astounded I have to create this issue. v5 is completely unusable.
Firstly, you didn’t publish any of the distribution files to npm!
After upgrading bitgo
imports were failing:
![Screen Shot 2019-04-10 at 9 36 56 am](https://user-images.githubusercontent.com/1754873/55842275-14846400-5b76-11e9-867b-16f43a608869.png)
So I had a look on unpkg:
![Screen Shot 2019-04-10 at 9 39 17 am](https://user-images.githubusercontent.com/1754873/55842271-10f0dd00-5b76-11e9-9546-059792d90e04.png)
![Screen Shot 2019-04-10 at 9 41 13 am](https://user-images.githubusercontent.com/1754873/55842330-5dd4b380-5b76-11e9-97b0-f00434ca5ed7.png)
First thing that jumps out, is the amount of complete rubbish like source files, webpack config, tests, etc. that shouldn’t be published - it’s junking up node_modules
.
Even worse, is the install size. It’s so messed up Package Phobia breaks:
https://packagephobia.now.sh/result?p=bitgo
So I did npm install bitgo
in a blank project to see, and the impact is 136M!!!
![Screen Shot 2019-04-10 at 9 45 44 am](https://user-images.githubusercontent.com/1754873/55842474-126ed500-5b77-11e9-9751-1751a0763084.png)
People need to be able to use the Bitgo API in AWS Lamda environments, etc. were install size matters. Think of the surface area for vulnerabilities with that many dependencies. People need efficient installs for CI, etc.
And on that topic, how much confidence does this amount of console warning on npm install inspire:
Expand
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
> ed25519@0.0.4 install /Users/jaydenseric/Desktop/bitgo-test/node_modules/ed25519
> node-gyp rebuild
CC(target) Release/obj.target/ed25519/src/ed25519/keypair.o
CC(target) Release/obj.target/ed25519/src/ed25519/sign.o
CC(target) Release/obj.target/ed25519/src/ed25519/open.o
CC(target) Release/obj.target/ed25519/src/ed25519/crypto_verify_32.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_double_scalarmult.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_frombytes.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_scalarmult_base.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_precomp_0.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p2_0.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p2_dbl.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_0.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_dbl.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_to_p2.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_to_cached.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_tobytes.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_madd.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_add.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_msub.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_sub.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p1p1_to_p3.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_p1p1_to_p2.o
CC(target) Release/obj.target/ed25519/src/ed25519/ge_tobytes.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_0.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_1.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_cmov.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_copy.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_neg.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_add.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_sub.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_mul.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_sq.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_sq2.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_invert.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_tobytes.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_isnegative.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_isnonzero.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_frombytes.o
CC(target) Release/obj.target/ed25519/src/ed25519/fe_pow22523.o
CC(target) Release/obj.target/ed25519/src/ed25519/sc_reduce.o
CC(target) Release/obj.target/ed25519/src/ed25519/sc_muladd.o
CXX(target) Release/obj.target/ed25519/src/ed25519.o
../src/ed25519.cc:19:89: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
if ((info.Length() < 1) || (!Buffer::HasInstance(info[0])) || (Buffer::Length(info[0]->ToObject(...
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:22:68: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
const unsigned char* seed = (unsigned char*)Buffer::Data(info[0]->ToObject());
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:53:60: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
if ((info.Length() < 2) || (!Buffer::HasInstance(info[0]->ToObject()))) {
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:56:65: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
if ((Buffer::HasInstance(info[1])) && (Buffer::Length(info[1]->ToObject()) == 32)) {
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:57:63: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
unsigned char* seed = (unsigned char*)Buffer::Data(info[1]->ToObject());
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:65:72: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
} else if ((Buffer::HasInstance(info[1])) && (Buffer::Length(info[1]->ToObject()) == 64)) {
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:66:54: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
privateKey = (unsigned char*)Buffer::Data(info[1]->ToObject());
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:68:44: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Local<Value> privateKeyBuffer = info[1]->ToObject()->Get(Nan::New<String>("privateKey")....
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:68:110: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
...privateKeyBuffer = info[1]->ToObject()->Get(Nan::New<String>("privateKey").ToLocalChecked())->ToObject();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:76:36: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Handle<Object> message = info[0]->ToObject();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:101:60: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
if ((info.Length() < 3) || (!Buffer::HasInstance(info[0]->ToObject())) ||
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:102:34: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
(!Buffer::HasInstance(info[1]->ToObject())) || (!Buffer::HasInstance(info[2]->ToObject()))) {
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:102:81: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
(!Buffer::HasInstance(info[1]->ToObject())) || (!Buffer::HasInstance(info[2]->ToObject()))) {
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:105:36: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Handle<Object> message = info[0]->ToObject();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:106:38: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Handle<Object> signature = info[1]->ToObject();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ed25519.cc:107:38: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Handle<Object> publicKey = info[2]->ToObject();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
16 warnings generated.
SOLINK_MODULE(target) Release/ed25519.node
> keccak@1.4.0 install /Users/jaydenseric/Desktop/bitgo-test/node_modules/keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."
> keccak@1.4.0 rebuild /Users/jaydenseric/Desktop/bitgo-test/node_modules/keccak
> node-gyp rebuild
CXX(target) Release/obj.target/keccak/src/addon.o
../src/addon.cc:37:34: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
unsigned int rate = info[0]->IntegerValue();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/addon.cc:38:38: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
unsigned int capacity = info[1]->IntegerValue();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/addon.cc:56:35: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
unsigned char bits = info[0]->IntegerValue();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/addon.cc:64:30: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
size_t length = info[0]->IntegerValue();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/addon.cc:75:73: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
KeccakWrapper* to = Nan::ObjectWrap::Unwrap<KeccakWrapper>(info[0]->ToObject());
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
5 warnings generated.
CC(target) Release/obj.target/keccak/src/libkeccak/KeccakSponge.o
CC(target) Release/obj.target/keccak/src/libkeccak/KeccakP-1600-reference.o
../src/libkeccak/KeccakP-1600-reference.c:231:13: warning: unused function 'fromBytesToWords'
[-Wunused-function]
static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state)
^
../src/libkeccak/KeccakP-1600-reference.c:242:13: warning: unused function 'fromWordsToBytes'
[-Wunused-function]
static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWords)
^
2 warnings generated.
SOLINK_MODULE(target) Release/keccak.node
> secp256k1@3.5.2 install /Users/jaydenseric/Desktop/bitgo-test/node_modules/prova-lib/node_modules/secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."
> secp256k1@3.5.2 rebuild /Users/jaydenseric/Desktop/bitgo-test/node_modules/prova-lib/node_modules/secp256k1
> node-gyp rebuild
CXX(target) Release/obj.target/secp256k1/src/addon.o
CXX(target) Release/obj.target/secp256k1/src/privatekey.o
../src/privatekey.cc:73:3: warning: ignoring return value of function declared with 'warn_unused_result'
attribute [-Wunused-result]
secp256k1_ec_privkey_negate(secp256k1ctx, &private_key[0]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:10:
In file included from ../src/secp256k1-src/src/group.h:11:
../src/secp256k1-src/src/field.h:36:13: warning: unused function 'secp256k1_fe_normalize' [-Wunused-function]
static void secp256k1_fe_normalize(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:39:13: warning: unused function 'secp256k1_fe_normalize_weak'
[-Wunused-function]
static void secp256k1_fe_normalize_weak(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:42:13: warning: unused function 'secp256k1_fe_normalize_var'
[-Wunused-function]
static void secp256k1_fe_normalize_var(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:46:12: warning: unused function 'secp256k1_fe_normalizes_to_zero'
[-Wunused-function]
static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:50:12: warning: unused function 'secp256k1_fe_normalizes_to_zero_var'
[-Wunused-function]
static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:53:13: warning: unused function 'secp256k1_fe_set_int' [-Wunused-function]
static void secp256k1_fe_set_int(secp256k1_fe *r, int a);
^
../src/secp256k1-src/src/field.h:56:13: warning: unused function 'secp256k1_fe_clear' [-Wunused-function]
static void secp256k1_fe_clear(secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:59:12: warning: unused function 'secp256k1_fe_is_zero' [-Wunused-function]
static int secp256k1_fe_is_zero(const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:62:12: warning: unused function 'secp256k1_fe_is_odd' [-Wunused-function]
static int secp256k1_fe_is_odd(const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:65:12: warning: unused function 'secp256k1_fe_equal' [-Wunused-function]
static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b);
^
../src/secp256k1-src/src/field.h:68:12: warning: unused function 'secp256k1_fe_equal_var' [-Wunused-function]
static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b);
^
../src/secp256k1-src/src/field.h:71:12: warning: unused function 'secp256k1_fe_cmp_var' [-Wunused-function]
static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b);
^
../src/secp256k1-src/src/field.h:74:12: warning: unused function 'secp256k1_fe_set_b32' [-Wunused-function]
static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a);
^
../src/secp256k1-src/src/field.h:77:13: warning: unused function 'secp256k1_fe_get_b32' [-Wunused-function]
static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:81:13: warning: unused function 'secp256k1_fe_negate' [-Wunused-function]
static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m);
^
../src/secp256k1-src/src/field.h:85:13: warning: unused function 'secp256k1_fe_mul_int' [-Wunused-function]
static void secp256k1_fe_mul_int(secp256k1_fe *r, int a);
^
../src/secp256k1-src/src/field.h:88:13: warning: unused function 'secp256k1_fe_add' [-Wunused-function]
static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:92:13: warning: unused function 'secp256k1_fe_mul' [-Wunused-function]
static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b);
^
../src/secp256k1-src/src/field.h:96:13: warning: unused function 'secp256k1_fe_sqr' [-Wunused-function]
static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:103:12: warning: unused function 'secp256k1_fe_sqrt' [-Wunused-function]
static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:106:12: warning: unused function 'secp256k1_fe_is_quad_var' [-Wunused-function]
static int secp256k1_fe_is_quad_var(const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:110:13: warning: unused function 'secp256k1_fe_inv' [-Wunused-function]
static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:113:13: warning: unused function 'secp256k1_fe_inv_var' [-Wunused-function]
static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:118:13: warning: unused function 'secp256k1_fe_inv_all_var' [-Wunused-function]
static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len);
^
../src/secp256k1-src/src/field.h:121:13: warning: unused function 'secp256k1_fe_to_storage' [-Wunused-function]
static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:124:13: warning: unused function 'secp256k1_fe_from_storage'
[-Wunused-function]
static void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a);
^
../src/secp256k1-src/src/field.h:127:13: warning: unused function 'secp256k1_fe_storage_cmov'
[-Wunused-function]
static void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag);
^
../src/secp256k1-src/src/field.h:130:13: warning: unused function 'secp256k1_fe_cmov' [-Wunused-function]
static void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag);
^
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:10:
../src/secp256k1-src/src/group.h:44:13: warning: unused function 'secp256k1_ge_set_xy' [-Wunused-function]
static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y);
^
../src/secp256k1-src/src/group.h:50:12: warning: unused function 'secp256k1_ge_set_xquad' [-Wunused-function]
static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x);
^
../src/secp256k1-src/src/group.h:54:12: warning: unused function 'secp256k1_ge_set_xo_var' [-Wunused-function]
static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd);
^
../src/secp256k1-src/src/group.h:57:12: warning: unused function 'secp256k1_ge_is_infinity' [-Wunused-function]
static int secp256k1_ge_is_infinity(const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:60:12: warning: unused function 'secp256k1_ge_is_valid_var' [-Wunused-function]
static int secp256k1_ge_is_valid_var(const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:62:13: warning: unused function 'secp256k1_ge_neg' [-Wunused-function]
static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:65:13: warning: unused function 'secp256k1_ge_set_gej' [-Wunused-function]
static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:68:13: warning: unused function 'secp256k1_ge_set_all_gej_var'
[-Wunused-function]
static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len, const secp...
^
../src/secp256k1-src/src/group.h:73:13: warning: unused function 'secp256k1_ge_set_table_gej_var'
[-Wunused-function]
static void secp256k1_ge_set_table_gej_var(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *...
^
../src/secp256k1-src/src/group.h:80:13: warning: unused function 'secp256k1_ge_globalz_set_table_gej'
[-Wunused-function]
static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp256k1_fe *globalz, cons...
^
../src/secp256k1-src/src/group.h:83:13: warning: unused function 'secp256k1_gej_set_infinity'
[-Wunused-function]
static void secp256k1_gej_set_infinity(secp256k1_gej *r);
^
../src/secp256k1-src/src/group.h:86:13: warning: unused function 'secp256k1_gej_set_ge' [-Wunused-function]
static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:89:12: warning: unused function 'secp256k1_gej_eq_x_var' [-Wunused-function]
static int secp256k1_gej_eq_x_var(const secp256k1_fe *x, const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:92:13: warning: unused function 'secp256k1_gej_neg' [-Wunused-function]
static void secp256k1_gej_neg(secp256k1_gej *r, const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:95:12: warning: unused function 'secp256k1_gej_is_infinity' [-Wunused-function]
static int secp256k1_gej_is_infinity(const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:98:12: warning: unused function 'secp256k1_gej_has_quad_y_var'
[-Wunused-function]
static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:102:13: warning: unused function 'secp256k1_gej_double_nonzero'
[-Wunused-function]
static void secp256k1_gej_double_nonzero(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr);
^
../src/secp256k1-src/src/group.h:105:13: warning: unused function 'secp256k1_gej_double_var' [-Wunused-function]
static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr);
^
../src/secp256k1-src/src/group.h:108:13: warning: unused function 'secp256k1_gej_add_var' [-Wunused-function]
static void secp256k1_gej_add_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_gej *b, secp...
^
../src/secp256k1-src/src/group.h:111:13: warning: unused function 'secp256k1_gej_add_ge' [-Wunused-function]
static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b);
^
../src/secp256k1-src/src/group.h:116:13: warning: unused function 'secp256k1_gej_add_ge_var' [-Wunused-function]
static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, se...
^
../src/secp256k1-src/src/group.h:119:13: warning: unused function 'secp256k1_gej_add_zinv_var'
[-Wunused-function]
static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, ...
^
../src/secp256k1-src/src/group.h:127:13: warning: unused function 'secp256k1_gej_clear' [-Wunused-function]
static void secp256k1_gej_clear(secp256k1_gej *r);
^
../src/secp256k1-src/src/group.h:130:13: warning: unused function 'secp256k1_ge_clear' [-Wunused-function]
static void secp256k1_ge_clear(secp256k1_ge *r);
^
../src/secp256k1-src/src/group.h:133:13: warning: unused function 'secp256k1_ge_to_storage' [-Wunused-function]
static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:136:13: warning: unused function 'secp256k1_ge_from_storage'
[-Wunused-function]
static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a);
^
../src/secp256k1-src/src/group.h:139:13: warning: unused function 'secp256k1_ge_storage_cmov'
[-Wunused-function]
static void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag);
^
../src/secp256k1-src/src/group.h:142:13: warning: unused function 'secp256k1_gej_rescale' [-Wunused-function]
static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *b);
^
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:20:
../src/secp256k1-src/src/scalar_4x64_impl.h:83:12: warning: unused function 'secp256k1_scalar_add'
[-Wunused-function]
static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
^
../src/secp256k1-src/src/scalar_4x64_impl.h:897:12: warning: unused function 'secp256k1_scalar_shr_int'
[-Wunused-function]
static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) {
^
In file included from ../src/privatekey.cc:4:
../src/secp256k1-src/src/scalar_impl.h:225:13: warning: unused function 'secp256k1_scalar_inverse_var'
[-Wunused-function]
static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) {
^
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:20:
../src/secp256k1-src/src/scalar_4x64_impl.h:140:13: warning: unused function 'secp256k1_scalar_negate'
[-Wunused-function]
static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) {
^
../src/secp256k1-src/src/scalar_4x64_impl.h:156:12: warning: unused function 'secp256k1_scalar_is_high'
[-Wunused-function]
static int secp256k1_scalar_is_high(const secp256k1_scalar *a) {
^
../src/secp256k1-src/src/scalar_4x64_impl.h:168:12: warning: unused function 'secp256k1_scalar_cond_negate'
[-Wunused-function]
static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
^
63 warnings generated.
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
../src/ecdsa.cc:132:3: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
CHECK_NUMBER_IN_INTERVAL(recid_object, -1, 4, RECOVERY_ID_VALUE_INVALID);
^
../src/util.h:82:15: note: expanded from macro 'CHECK_NUMBER_IN_INTERVAL'
if (number->IntegerValue() <= x || number->IntegerValue() >= y) { \
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ecdsa.cc:132:3: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
CHECK_NUMBER_IN_INTERVAL(recid_object, -1, 4, RECOVERY_ID_VALUE_INVALID);
^
../src/util.h:82:46: note: expanded from macro 'CHECK_NUMBER_IN_INTERVAL'
if (number->IntegerValue() <= x || number->IntegerValue() >= y) { \
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/ecdsa.cc:133:35: warning: 'IntegerValue' is deprecated [-Wdeprecated-declarations]
int recid = (int) recid_object->IntegerValue();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2476:3: note: 'IntegerValue' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
3 warnings generated.
CXX(target) Release/obj.target/secp256k1/src/ecdh.o
In file included from ../src/ecdh.cc:5:
In file included from ../src/secp256k1-src/src/field_impl.h:19:
../src/secp256k1-src/src/field_5x52_impl.h:267:12: warning: unused function 'secp256k1_fe_cmp_var'
[-Wunused-function]
static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b) {
^
In file included from ../src/ecdh.cc:7:
../src/secp256k1-src/src/group_impl.h:287:12: warning: unused function 'secp256k1_ge_is_valid_var'
[-Wunused-function]
static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) {
^
../src/secp256k1-src/src/group_impl.h:246:12: warning: unused function 'secp256k1_gej_eq_x_var'
[-Wunused-function]
static int secp256k1_gej_eq_x_var(const secp256k1_fe *x, const secp256k1_gej *a) {
^
../src/secp256k1-src/src/group_impl.h:686:12: warning: unused function 'secp256k1_gej_has_quad_y_var'
[-Wunused-function]
static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) {
^
In file included from ../src/ecdh.cc:6:
../src/secp256k1-src/src/scalar_impl.h:225:13: warning: unused function 'secp256k1_scalar_inverse_var'
[-Wunused-function]
static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) {
^
In file included from ../src/ecdh.cc:7:
../src/secp256k1-src/src/group_impl.h:113:13: warning: unused function 'secp256k1_ge_set_gej_var'
[-Wunused-function]
static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a) {
^
../src/secp256k1-src/src/group_impl.h:267:12: warning: unused function 'secp256k1_gej_is_valid_var'
[-Wunused-function]
static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) {
^
In file included from ../src/ecdh.cc:8:
In file included from ../src/secp256k1-src/src/ecmult_const_impl.h:13:
../src/secp256k1-src/src/ecmult_impl.h:164:13: warning: unused function 'secp256k1_ecmult_context_build'
[-Wunused-function]
static void secp256k1_ecmult_context_build(secp256k1_ecmult_context *ctx, const secp256k1_callback *cb) {
^
../src/secp256k1-src/src/ecmult_impl.h:196:13: warning: unused function 'secp256k1_ecmult_context_clone'
[-Wunused-function]
static void secp256k1_ecmult_context_clone(secp256k1_ecmult_context *dst,
^
../src/secp256k1-src/src/ecmult_impl.h:220:13: warning: unused function 'secp256k1_ecmult_context_clear'
[-Wunused-function]
static void secp256k1_ecmult_context_clear(secp256k1_ecmult_context *ctx) {
^
../src/secp256k1-src/src/ecmult_impl.h:216:12: warning: unused function 'secp256k1_ecmult_context_is_built'
[-Wunused-function]
static int secp256k1_ecmult_context_is_built(const secp256k1_ecmult_context *ctx) {
^
../src/secp256k1-src/src/ecmult_impl.h:286:13: warning: unused function 'secp256k1_ecmult' [-Wunused-function]
static void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej ...
^
In file included from ../src/ecdh.cc:9:
../src/secp256k1-src/src/ecmult_gen_impl.h:17:13: warning: unused function 'secp256k1_ecmult_gen_context_init'
[-Wunused-function]
static void secp256k1_ecmult_gen_context_init(secp256k1_ecmult_gen_context *ctx) {
^
../src/secp256k1-src/src/ecmult_gen_impl.h:21:13: warning: unused function 'secp256k1_ecmult_gen_context_build'
[-Wunused-function]
static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context *ctx, const secp256k1_callba...
^
../src/secp256k1-src/src/ecmult_gen_impl.h:98:13: warning: unused function 'secp256k1_ecmult_gen_context_clone'
[-Wunused-function]
static void secp256k1_ecmult_gen_context_clone(secp256k1_ecmult_gen_context *dst,
^
../src/secp256k1-src/src/ecmult_gen_impl.h:115:13: warning: unused function 'secp256k1_ecmult_gen_context_clear'
[-Wunused-function]
static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context *ctx) {
^
../src/secp256k1-src/src/ecmult_gen_impl.h:94:12: warning: unused function
'secp256k1_ecmult_gen_context_is_built' [-Wunused-function]
static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx) {
^
../src/ecdh.cc:30:33: warning: unused variable 'default_illegal_callback' [-Wunused-const-variable]
static const secp256k1_callback default_illegal_callback = {
^
../src/ecdh.cc:41:33: warning: unused variable 'default_error_callback' [-Wunused-const-variable]
static const secp256k1_callback default_error_callback = {
^
19 warnings generated.
CC(target) Release/obj.target/secp256k1/src/secp256k1-src/src/secp256k1.o
In file included from ../src/secp256k1-src/src/secp256k1.c:13:
../src/secp256k1-src/src/group_impl.h:686:12: warning: unused function 'secp256k1_gej_has_quad_y_var'
[-Wunused-function]
static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) {
^
../src/secp256k1-src/src/group_impl.h:267:12: warning: unused function 'secp256k1_gej_is_valid_var'
[-Wunused-function]
static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) {
^
In file included from ../src/secp256k1-src/src/secp256k1.c:15:
../src/secp256k1-src/src/ecmult_const_impl.h:122:13: warning: unused function 'secp256k1_ecmult_const'
[-Wunused-function]
static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *scalar) {
^
3 warnings generated.
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/secp256k1.node
> secp256k1@3.6.1 install /Users/jaydenseric/Desktop/bitgo-test/node_modules/secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."
> secp256k1@3.6.1 rebuild /Users/jaydenseric/Desktop/bitgo-test/node_modules/secp256k1
> node-gyp rebuild
CXX(target) Release/obj.target/secp256k1/src/addon.o
CXX(target) Release/obj.target/secp256k1/src/privatekey.o
../src/privatekey.cc:73:3: warning: ignoring return value of function declared with 'warn_unused_result'
attribute [-Wunused-result]
secp256k1_ec_privkey_negate(secp256k1ctx, &private_key[0]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:10:
In file included from ../src/secp256k1-src/src/group.h:11:
../src/secp256k1-src/src/field.h:36:13: warning: unused function 'secp256k1_fe_normalize' [-Wunused-function]
static void secp256k1_fe_normalize(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:39:13: warning: unused function 'secp256k1_fe_normalize_weak'
[-Wunused-function]
static void secp256k1_fe_normalize_weak(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:42:13: warning: unused function 'secp256k1_fe_normalize_var'
[-Wunused-function]
static void secp256k1_fe_normalize_var(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:46:12: warning: unused function 'secp256k1_fe_normalizes_to_zero'
[-Wunused-function]
static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:50:12: warning: unused function 'secp256k1_fe_normalizes_to_zero_var'
[-Wunused-function]
static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r);
^
../src/secp256k1-src/src/field.h:53:13: warning: unused function 'secp256k1_fe_set_int' [-Wunused-function]
static void secp256k1_fe_set_int(secp256k1_fe *r, int a);
^
../src/secp256k1-src/src/field.h:56:13: warning: unused function 'secp256k1_fe_clear' [-Wunused-function]
static void secp256k1_fe_clear(secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:59:12: warning: unused function 'secp256k1_fe_is_zero' [-Wunused-function]
static int secp256k1_fe_is_zero(const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:62:12: warning: unused function 'secp256k1_fe_is_odd' [-Wunused-function]
static int secp256k1_fe_is_odd(const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:65:12: warning: unused function 'secp256k1_fe_equal' [-Wunused-function]
static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b);
^
../src/secp256k1-src/src/field.h:68:12: warning: unused function 'secp256k1_fe_equal_var' [-Wunused-function]
static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b);
^
../src/secp256k1-src/src/field.h:71:12: warning: unused function 'secp256k1_fe_cmp_var' [-Wunused-function]
static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b);
^
../src/secp256k1-src/src/field.h:74:12: warning: unused function 'secp256k1_fe_set_b32' [-Wunused-function]
static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a);
^
../src/secp256k1-src/src/field.h:77:13: warning: unused function 'secp256k1_fe_get_b32' [-Wunused-function]
static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:81:13: warning: unused function 'secp256k1_fe_negate' [-Wunused-function]
static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m);
^
../src/secp256k1-src/src/field.h:85:13: warning: unused function 'secp256k1_fe_mul_int' [-Wunused-function]
static void secp256k1_fe_mul_int(secp256k1_fe *r, int a);
^
../src/secp256k1-src/src/field.h:88:13: warning: unused function 'secp256k1_fe_add' [-Wunused-function]
static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:92:13: warning: unused function 'secp256k1_fe_mul' [-Wunused-function]
static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b);
^
../src/secp256k1-src/src/field.h:96:13: warning: unused function 'secp256k1_fe_sqr' [-Wunused-function]
static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:103:12: warning: unused function 'secp256k1_fe_sqrt' [-Wunused-function]
static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:106:12: warning: unused function 'secp256k1_fe_is_quad_var' [-Wunused-function]
static int secp256k1_fe_is_quad_var(const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:110:13: warning: unused function 'secp256k1_fe_inv' [-Wunused-function]
static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:113:13: warning: unused function 'secp256k1_fe_inv_var' [-Wunused-function]
static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:118:13: warning: unused function 'secp256k1_fe_inv_all_var' [-Wunused-function]
static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len);
^
../src/secp256k1-src/src/field.h:121:13: warning: unused function 'secp256k1_fe_to_storage' [-Wunused-function]
static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a);
^
../src/secp256k1-src/src/field.h:124:13: warning: unused function 'secp256k1_fe_from_storage'
[-Wunused-function]
static void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a);
^
../src/secp256k1-src/src/field.h:127:13: warning: unused function 'secp256k1_fe_storage_cmov'
[-Wunused-function]
static void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag);
^
../src/secp256k1-src/src/field.h:130:13: warning: unused function 'secp256k1_fe_cmov' [-Wunused-function]
static void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag);
^
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:10:
../src/secp256k1-src/src/group.h:44:13: warning: unused function 'secp256k1_ge_set_xy' [-Wunused-function]
static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y);
^
../src/secp256k1-src/src/group.h:50:12: warning: unused function 'secp256k1_ge_set_xquad' [-Wunused-function]
static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x);
^
../src/secp256k1-src/src/group.h:54:12: warning: unused function 'secp256k1_ge_set_xo_var' [-Wunused-function]
static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd);
^
../src/secp256k1-src/src/group.h:57:12: warning: unused function 'secp256k1_ge_is_infinity' [-Wunused-function]
static int secp256k1_ge_is_infinity(const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:60:12: warning: unused function 'secp256k1_ge_is_valid_var' [-Wunused-function]
static int secp256k1_ge_is_valid_var(const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:62:13: warning: unused function 'secp256k1_ge_neg' [-Wunused-function]
static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:65:13: warning: unused function 'secp256k1_ge_set_gej' [-Wunused-function]
static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:68:13: warning: unused function 'secp256k1_ge_set_all_gej_var'
[-Wunused-function]
static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len);
^
../src/secp256k1-src/src/group.h:75:13: warning: unused function 'secp256k1_ge_globalz_set_table_gej'
[-Wunused-function]
static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp256k1_fe *globalz, cons...
^
../src/secp256k1-src/src/group.h:78:13: warning: unused function 'secp256k1_ge_set_infinity' [-Wunused-function]
static void secp256k1_ge_set_infinity(secp256k1_ge *r);
^
../src/secp256k1-src/src/group.h:81:13: warning: unused function 'secp256k1_gej_set_infinity'
[-Wunused-function]
static void secp256k1_gej_set_infinity(secp256k1_gej *r);
^
../src/secp256k1-src/src/group.h:84:13: warning: unused function 'secp256k1_gej_set_ge' [-Wunused-function]
static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:87:12: warning: unused function 'secp256k1_gej_eq_x_var' [-Wunused-function]
static int secp256k1_gej_eq_x_var(const secp256k1_fe *x, const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:90:13: warning: unused function 'secp256k1_gej_neg' [-Wunused-function]
static void secp256k1_gej_neg(secp256k1_gej *r, const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:93:12: warning: unused function 'secp256k1_gej_is_infinity' [-Wunused-function]
static int secp256k1_gej_is_infinity(const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:96:12: warning: unused function 'secp256k1_gej_has_quad_y_var'
[-Wunused-function]
static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a);
^
../src/secp256k1-src/src/group.h:100:13: warning: unused function 'secp256k1_gej_double_nonzero'
[-Wunused-function]
static void secp256k1_gej_double_nonzero(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr);
^
../src/secp256k1-src/src/group.h:103:13: warning: unused function 'secp256k1_gej_double_var' [-Wunused-function]
static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr);
^
../src/secp256k1-src/src/group.h:106:13: warning: unused function 'secp256k1_gej_add_var' [-Wunused-function]
static void secp256k1_gej_add_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_gej *b, secp...
^
../src/secp256k1-src/src/group.h:109:13: warning: unused function 'secp256k1_gej_add_ge' [-Wunused-function]
static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b);
^
../src/secp256k1-src/src/group.h:114:13: warning: unused function 'secp256k1_gej_add_ge_var' [-Wunused-function]
static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, se...
^
../src/secp256k1-src/src/group.h:117:13: warning: unused function 'secp256k1_gej_add_zinv_var'
[-Wunused-function]
static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, ...
^
../src/secp256k1-src/src/group.h:125:13: warning: unused function 'secp256k1_gej_clear' [-Wunused-function]
static void secp256k1_gej_clear(secp256k1_gej *r);
^
../src/secp256k1-src/src/group.h:128:13: warning: unused function 'secp256k1_ge_clear' [-Wunused-function]
static void secp256k1_ge_clear(secp256k1_ge *r);
^
../src/secp256k1-src/src/group.h:131:13: warning: unused function 'secp256k1_ge_to_storage' [-Wunused-function]
static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a);
^
../src/secp256k1-src/src/group.h:134:13: warning: unused function 'secp256k1_ge_from_storage'
[-Wunused-function]
static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a);
^
../src/secp256k1-src/src/group.h:137:13: warning: unused function 'secp256k1_ge_storage_cmov'
[-Wunused-function]
static void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag);
^
../src/secp256k1-src/src/group.h:140:13: warning: unused function 'secp256k1_gej_rescale' [-Wunused-function]
static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *b);
^
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:20:
../src/secp256k1-src/src/scalar_4x64_impl.h:83:12: warning: unused function 'secp256k1_scalar_add'
[-Wunused-function]
static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
^
../src/secp256k1-src/src/scalar_4x64_impl.h:897:12: warning: unused function 'secp256k1_scalar_shr_int'
[-Wunused-function]
static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) {
^
In file included from ../src/privatekey.cc:4:
../src/secp256k1-src/src/scalar_impl.h:225:13: warning: unused function 'secp256k1_scalar_inverse_var'
[-Wunused-function]
static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) {
^
In file included from ../src/privatekey.cc:4:
In file included from ../src/secp256k1-src/src/scalar_impl.h:20:
../src/secp256k1-src/src/scalar_4x64_impl.h:140:13: warning: unused function 'secp256k1_scalar_negate'
[-Wunused-function]
static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) {
^
../src/secp256k1-src/src/scalar_4x64_impl.h:156:12: warning: unused function 'secp256k1_scalar_is_high'
[-Wunused-function]
static int secp256k1_scalar_is_high(const secp256k1_scalar *a) {
^
../src/secp256k1-src/src/scalar_4x64_impl.h:168:12: warning: unused function 'secp256k1_scalar_cond_negate'
[-Wunused-function]
static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
^
63 warnings generated.
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
In file included from ../src/secp256k1-src/src/secp256k1.c:11:
../src/secp256k1-src/src/field_impl.h:263:13: warning: unused function 'secp256k1_fe_inv_all_var'
[-Wunused-function]
static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len) {
^
In file included from ../src/secp256k1-src/src/secp256k1.c:13:
../src/secp256k1-src/src/group_impl.h:200:13: warning: unused function 'secp256k1_ge_set_infinity'
[-Wunused-function]
static void secp256k1_ge_set_infinity(secp256k1_ge *r) {
^
../src/secp256k1-src/src/group_impl.h:689:12: warning: unused function 'secp256k1_gej_has_quad_y_var'
[-Wunused-function]
static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) {
^
../src/secp256k1-src/src/group_impl.h:270:12: warning: unused function 'secp256k1_gej_is_valid_var'
[-Wunused-function]
static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) {
^
In file included from ../src/secp256k1-src/src/secp256k1.c:14:
../src/secp256k1-src/src/ecmult_impl.h:1087:12: warning: unused function 'secp256k1_ecmult_multi_var'
[-Wunused-function]
static int secp256k1_ecmult_multi_var(const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, s...
^
../src/secp256k1-src/src/ecmult_impl.h:668:12: warning: unused function 'secp256k1_ecmult_strauss_batch_single'
[-Wunused-function]
static int secp256k1_ecmult_strauss_batch_single(const secp256k1_ecmult_context *actx, secp256k1_scratc...
^
../src/secp256k1-src/src/ecmult_impl.h:1041:12: warning: unused function
'secp256k1_ecmult_pippenger_batch_single' [-Wunused-function]
static int secp256k1_ecmult_pippenger_batch_single(const secp256k1_ecmult_context *actx, secp256k1_scrat...
^
7 warnings generated.
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/secp256k1.node
> sha3@1.2.2 install /Users/jaydenseric/Desktop/bitgo-test/node_modules/sha3
> node-gyp rebuild
CXX(target) Release/obj.target/sha3/src/addon.o
../src/addon.cpp:36:53: warning: 'Int32Value' is deprecated [-Wdeprecated-declarations]
hashlen = info[0]->IsUndefined() ? 512 : info[0]->Int32Value();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2478:3: note: 'Int32Value' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/addon.cpp:97:40: warning: 'ToObject' is deprecated [-Wdeprecated-declarations]
Local<Object> buffer_obj = info[0]->ToObject();
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8.h:2455:10: note: 'ToObject' has been explicitly marked
deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/jaydenseric/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
2 warnings generated.
CXX(target) Release/obj.target/sha3/src/displayIntermediateValues.o
CXX(target) Release/obj.target/sha3/src/KeccakF-1600-reference.o
CXX(target) Release/obj.target/sha3/src/KeccakNISTInterface.o
CXX(target) Release/obj.target/sha3/src/KeccakSponge.o
SOLINK_MODULE(target) Release/sha3.node
> @bitgo/unspents@0.5.1 postinstall /Users/jaydenseric/Desktop/bitgo-test/node_modules/@bitgo/unspents
> npm run build
> @bitgo/unspents@0.5.1 build /Users/jaydenseric/Desktop/bitgo-test/node_modules/@bitgo/unspents
> tsc --project tsconfig.build.json
All the dependencies are still pinned, creating a whole host of problems I’ve explained before in Bitgo issues:
https://github.com/BitGo/BitGoJS/blob/5.0.0/package.json#L46
If this were a typical open source project, I would be more motivated to jump in and fix all this up with PRs. But Bitgo is a business that does billions of dollars of volume, and in a way I am a customer. I have built my infrastructure around Bitgo wallets, and Bitgo will be taking a slice every transaction we process.
I have had to downgrade bitgo
twice in a row now for it to be usable. Have I made a mistake choosing to do business with Bitgo?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
@jaydenseric
Thanks for communicating promptly; your willingness to improve goes a long way 😃
Thanks for cleaning up the published files a bit! Like you said, there is still room to improve.
Regarding pinning dependencies…
I know all about the
event-stream
attack; I discovered it (BTW the story developed further, but I haven’t updated the article yet).Firstly, when you pin dependencies, it doesn’t recursively pin dependencies of dependencies. You are only “securing” the small ring of depencies around your package, the tip of the iceberg:
Typically,
event-stream
style compromises happen at the edges of the graph. It is less likely anexpress
maintainer will publish an attack in a semver patch than one of their dependencies’ dependencies.Packages however fix security concerns in semver patches all the time, and pinning dependencies disempowers your consumers as they have to wait for patches to be intermittently drip fed by your manual release process.
Secondly, what’s the point in manually pinning dependencies if you are not auditing every line of code and configuration in each version?
event-stream
went undetected for months - for all you know, you have pinned 40 compromised dependencies.Unless you are manually auditing every new dependency version (attacks are extremely difficult to detect, are you forensic experts?), clicking merge every few days/weeks via GreenKeeper PR’s is just slowing down something that could have happened automatically in real time.
If pinning dependencies was a silver bullet providing security and stability, every package would do it. But it’s not, and they don’t. The npm ecosystem would devolve into a quagmire.
Let your consumers
npm install
, get all the latest patches, have npm runaudit
on them all, and if everything is fine, they can lock their dependencies graph the proper way; viapackage-lock.json
. If an attack comes along and npm doesn’t fix it fast for some reason, they have the ability to either not update, or time travel install at a safe point in time. If you pin your dependency at a bad version, consumers have less options.Regarding the crypto related install errors and warnings, note that
event-stream
attack was only discovered because we investigated deprecation warnings no one else was bothered to fix. I would be surprised if there was not a newer version of the problematic packages compatible with current Node.js versions; I recall that was the case when I did a quick investigation a few weeks ago, although I could be wrong. From memory people were moving to native JS implementations. I doubt a small crypto performance difference when sending intermittent requests to a REST API will be noticed.