Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New package.json dependencies (slpjs & grpc-bchrpc-node versions deprecated, & bitbox-sdk, bitcore-lib-cash, etc updates) #91

Open
TinosNitso opened this issue Aug 13, 2022 · 1 comment

Comments

@TinosNitso
Copy link

TinosNitso commented Aug 13, 2022

Please update the package.json! After a lot of trial & error I've deduced a package.json (package.json - improved version below) which successfully updates many dependencies (as many as possible, as much as easily possible). I've never opened a pull request before - I might try. NB: overall package version isn't really 1.0.0. 😉

I've tested (& am using) a fresh install of the package & it works but we must force the update, because some dependencies' dependencies clash & cause npm warnings.
npm install --force

Line 30 assumes nodejs v16. Lines 29 & 50 work well with mongod v6.

Is an update worth the effort? 24 hrs continuous testing is needed to be confident there won't be any timeouts, etc, but after at least a few hours it's looking faster than just a nodejs update. The following lines are worthy of note:

"bitbox-sdk": "8.10.1", from 8.2.1
"bitcore-lib-cash": "8.25.36", from 8.22.2
"grpc-bchrpc-node": "^0.15.2", from ^0.10.2 (deprecated)
"mingo": "6.1.0", from ^2.5.3
"node-jq": "2.3.3", from 1.6.0
"slpjs": "^0.27.11", from ^0.27.8 (deprecated)
"ts-node": "10.9.1", from ^7.0.1

It seems like any one of these lines could impact the speed of the mono-threaded slpdb app. Even a 2% total speed increase could mean a whole day's work, to sync a new instance.

I went through each & every dependency the best I could, except for migrate-mongo & devDependencies. For them I didn't dare break the carrot ^ because that would require way more testing.

The exact numbers I've chosen are as follows. Each one is like a long story. I've introduced bigi & bip39 for bitbox-sdk to work. However v8.11 wouldn't work so I went with v8.10.1. I'd guess the most important to get right are mongodb, @types/mongodb, slpjs & maybe grpc-bchrpc-node - the latter two for speed.

  "dependencies": {
    "@types/bigi": "1.4.2",
    "@types/bip39": "^2.4.2",
    "@types/ip": "^1.1.0",
    "@types/js-yaml": "^3.12.5",
    "@types/mongodb": "^3.6.20",
    "@types/node": "16.11.7",
    "@types/p-queue": "3.1.0",
    "@types/zeromq": "5.2.1",
    "bcash": "^1.1.1",
    "bigi": "1.4.2",
    "bignumber.js": "~9.0.0",
    "bip39": "^2.6.0",
    "bitbox-sdk": "~8.10.1",
    "bitcoin-rpc-promise-retry": "^1.3.0",
    "bitcore-lib-cash": "^8.25.36",
    "bufio": "^1.0.7",
    "cashaddrjs-slp": "^0.2.12",
    "dotenv": "16.0.1",
    "fountainhead-core": "^0.0.12",
    "grpc-bchrpc-node": "^0.15.2",
    "iconv-lite": "^0.6.3",
    "ip": "^1.1.8",
    "js-yaml": "4.1.0",
    "level": "^7.0.1",
    "migrate-mongo": "^5.0.1",
    "mingo": "6.1.0",
    "mongodb": "^3.7.3",
    "node-jq": "2.3.3",
    "os-utils": "0.0.14",
    "p-limit": "4.0.0",
    "p-queue": "3.1.0",
    "slpjs": "^0.27.11",
    "synchronized-promise": "0.3.1",
    "traverse": "^0.6.6",
    "ts-node": "10.9.1",
    "typescript": "^3.9.10",
    "zeromq": "^5.2.8"
  },
  "devDependencies": {
    "@types/mocha": "^5.2.7",
    "eslint": "^5.16.0",
    "mocha": "^7.2.0",
    "mocha-steps": "^1.3.0",
    "source-map-support": "^0.5.21"
  }

I've added a few (optional) carrots here compared to the attachment.

@TinosNitso TinosNitso changed the title New package.json dependencies (working updates for slpjs, grpc-bchrpc-node, bitbox-sdk, bitcore-lib-cash, etc) New package.json dependencies (slpjs & grpc-bchrpc-node both deprecated, & bitbox-sdk, bitcore-lib-cash, etc have compatible updates) Aug 13, 2022
@TinosNitso TinosNitso changed the title New package.json dependencies (slpjs & grpc-bchrpc-node both deprecated, & bitbox-sdk, bitcore-lib-cash, etc have compatible updates) New package.json dependencies (slpjs & grpc-bchrpc-node versions deprecated, & bitbox-sdk, bitcore-lib-cash, etc updates) Aug 13, 2022
@TinosNitso
Copy link
Author

TinosNitso commented Aug 14, 2022

Here is the correct package.json with extra ^, ~ &
"typescript": "^3.9.10",
instead of 3.9.9. I got that one wrong & GitHub won't let me replace the file in my original comment. I realized after I went back to check to see if I could bump typescript to v4 instead of v3 since that could enable or coincide with other updates, but only v3 really works. mongodb v4 does require typescript v4, but that conflicts with db.ts, etc. Installing bson may also help, but is optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant