dashhive / crowdnode-cli

Earn ~6% Interest on Dash via CrowdNode - CLI for Mac, Linux, and Windows
https://github.com/dashhive/crowdnode-cli
MIT License
4 stars 1 forks source link

CRITICAL: Node v18 drops RIPEMD160 #18

Closed coolaj86 closed 2 years ago

coolaj86 commented 2 years ago

This is going to be very short-lived unless we update (or replace 😈) dashcore-lib due to Node v18+ adopting libssl3 and dropping many deprecated algos, including RIPEMD160, which is used for P2PKH (payment addresses).

Obviously we can't fix DashCore, but we can get a pure JS implementation of RIPEMD160 - though we should probably propose an adoption strategy for secure payment addresses so that we can one day deprecate the current version.

coolaj86 commented 2 years ago

dashcore-lib hasn't been updated to use package.json.browser, but instead relies on crypto-browserify.

dashcore-lib
    => crypto-browserify
        => create-hash
            => ripemd160

We just need to go find in the code where rmd160 is used and call those functions directly. Likewise, we could do that for the other algos we need (using package.json.browser so that we keep things lightweight and use native implementations).

coolaj86 commented 2 years ago

Bumped priority because even the average joe (or jojobyte) would run into this problem: https://github.com/dashhive/crowdnode-cli/issues/16#issuecomment-1176941222

coolaj86 commented 2 years ago

Fixed via d68470b5c56660bb66ce02356ccba4467e0aa52d in v1.0.7