Bitcoin Forum
June 19, 2024, 09:02:33 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Trying to run Coinbase multisig-tool locally on Linux  (Read 474 times)
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18588


View Profile
March 18, 2023, 11:12:25 AM
 #21

-snip-
This is essentially my experience on two different machines, one running Debian and the other Ubuntu, albeit with slightly different versions.

Running the clean and compile commands that I gave earlier only deletes and then recompiles the multisig.js file. There is no reason it would make http.server start throwing errors. There is something strange in OP's set up which is messing everything up.
Lepi (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 5


View Profile
March 24, 2023, 07:01:25 PM
 #22

I did quick testing on Debian 11 and it seems to works. But i can't verify whether it works on next step since i only have 3 xpub generated from https://coinb.in/#newHDaddress. Here are the steps,

1. Check my environment.

Code:
$ node --version
v12.22.12
$ npm --version
7.5.2
$ python3 --version
Python 3.9.2
$ python2 --version
Python 2.7.18

2. Setup and run multisig-tool.

Code:
$ git clone --depth 1 https://github.com/dlajarretie/multisig-tool
Cloning into 'multisig-tool'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 29 (delta 0), reused 12 (delta 0), pack-reused 0
Receiving objects: 100% (29/29), 109.27 KiB | 34.00 KiB/s, done.
$ cd multisig-tool/
$ npm install

added 149 packages, and audited 150 packages in 1m

9 vulnerabilities (1 moderate, 4 high, 4 critical)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
$ npm install bip38 crypto-browserify --save

added 3 packages, and audited 153 packages in 19s

9 vulnerabilities (1 moderate, 4 high, 4 critical)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
$ ./node_modules/.bin/browserify -r bip38 -s Bip38 > lib/multisig/bip38.js
$ make compile
cd lib/multisig && \
../../node_modules/.bin/browserify -r ./vault -r ./views/addresses_view > ../../multisig.js
$ make run
cd lib/multisig && \
../../node_modules/.bin/browserify -r ./vault -r ./views/addresses_view > ../../multisig.js
python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
...

3. Open on Firefox by typing localhost:8000, enter 3 xpub and click continue. Here's the screenshot some time after i click continue.

https://i.ibb.co/FYcpF5G/a.png

Take note i assume it works since,
1. Firefox only show error message about favicon on it's console (F12).
2. I do not see "Failed!" message or each address turning red.

In order to check if "Failed!" message is due to my setup, opposed to the xPub keys, I tried generating it through the link you provided.
I went on "https://coinb.in/#newHDaddress" and clicked "generate", then clicked on the ">" arrow next to xPub address. Then I changed "1" to "3" in the "Index (End)" section.
I copied address 1, 2 and 3 and entered them in the step 1 of the Coinbase multisig tool.
This time when I click "continue" in step 1, it generated a different list of addresses than before when I used the xPub's on the PDF, however the "Failed!" message and text turning red still occured (so "balance" never shows).

Did I generate the xPub keys correctly? If so, then the fault here lies in my setup right?

Before I started troubleshooting in this thread, I used ChatGPT for tons of hours and did a lot of things (nano editor, re-cloning and weird commands etc.) that I don't understand. So I think at this point it's better if I completely start from scratch (formatting and installing Debian 11).

However, this time I want to do it right and not enter any commands that are unnecessary.
Could you please tell me step by step what I need to do after I install Debian 11?

The lines starting with "$" are the command prompts you used right? I tried to do the same in ubuntu but this one didn't work:
Quote
$ ./node_modules/.bin/browserify -r bip38 -s Bip38 > lib/multisig/bip38.js
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18588


View Profile
March 27, 2023, 02:58:03 PM
 #23

Have you at least managed to identify the addresses and balances you are trying to gain access to here? You mentioned to me in your PMs that you are not sure how much bitcoin is stored in this vault.

Since we are struggling to get this to work for you, if you like you could send me your three xpubs (not private keys) and I could at least look up the addresses and balance for you. The only thing you lose by doing so is privacy by account of me knowing the addresses - there is no way for me to steal your coins from only knowing your xpubs. At least then we would know if you are wasting all this time trying to recover a very small amount of money. If you like I can provide you with my PGP key so you can encrypt any communication.

And moving forward, since we can't seem to get this tool working for you, then we could instead try going down the path of manually extracting the necessary xprv from your two keys and then recreating the multi-sig wallet in Electrum.
Lepi (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 5


View Profile
February 03, 2024, 11:49:56 PM
 #24

I got very sad to learn that Leo has said his farewell to the community. He was extremely helpful to me and I did not get to say a proper goodbye to him. I was meaning to send him a message for weeks but I kept postponing it. I can't believe that he is now gone and I am beating myself up for not sending the message just 1 week earlier. I hope wherever he is, he can somehow find the strength to beat his disease. I want to thank you a lot for so much effort and help you put into helping me. So thank you.


And for the community who was following this thread earlier, I want to give some updates and ask for some insights.

Earlier in December I finally managed to message Leo the 3 xpub keys so that he can check the addresses for me. However the addresses that he generated for are the exact same ones that the DEPRECATED Coinbase multisig recovery website generates when I enter the xpub keys myself.

When I followed the instructions in this thread and used the forked version instead (with correct API) and ran it locally (as per instructions), it also generated the exact same addresses. I assumed I had done it wrongly, because when I clicked F12 on Chrome, it did show the errors I previously mentioned in this thread:
Quote
Quote
Access to XMLHttpRequest at 'https://insight.bitpay.com/api/addr/3CSa...zYGno8MTeLYGM/utxo' from origin 'http://0.0.0.0:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I am surprised that the addresses Leo generated are the exact same ones as the DEPRECATED "Coinbase Multisig Vault recovery tool" which can be found on this link: https://coinbase.github.io/multisig-tool/

Based on threads of many other users I assumed this tool is no longer working correctly and you'd need a forked version: https://github.com/dlajarretie/multisig-tool

The only difference when I used the deprecated one and the forked one is that in the latter it does not show the "Failed!" message, but both tools still generate the exact same addresess. Shouldn't they generate different addresses if it's deprecated / broken?

All addresses show 0 transactions and I am hoping that somehow there's still a way to figure this out.

Can someone here with more knowledge than me explain to me if this is correct? Does anyone have access to their own Coinbase PDF and can enter their xpub on the deprecated one and the forked one to see if it generates the same ones?

If no one can test it with a real Coinbase PDF, would it be possible to test it with the method ABCbits provided earlier on generating 3 random xpub's?
Quote from: ABCbits

I would really appreciate any help and guidance on this. The vault belongs to my love and if there is any bitcoins in there it'll help her tremendously.
ABCbits
Legendary
*
Offline Offline

Activity: 2912
Merit: 7568


Crypto Swap Exchange


View Profile
February 04, 2024, 09:52:44 AM
 #25

If no one can test it with a real Coinbase PDF, would it be possible to test it with the method ABCbits provided earlier on generating 3 random xpub's?
Quote from: ABCbits

I would really appreciate any help and guidance on this. The vault belongs to my love and if there is any bitcoins in there it'll help her tremendously.

Can you be specific which kind of help or guidance you need? I already mention my computer environment and command used to run Coinbase tool.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Lepi (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 5


View Profile
February 16, 2024, 06:17:34 PM
 #26

If no one can test it with a real Coinbase PDF, would it be possible to test it with the method ABCbits provided earlier on generating 3 random xpub's?
Quote from: ABCbits

I would really appreciate any help and guidance on this. The vault belongs to my love and if there is any bitcoins in there it'll help her tremendously.

Can you be specific which kind of help or guidance you need? I already mention my computer environment and command used to run Coinbase tool.

I would like to know if the *Coinbase Multisig Vault recovery tool* (https://coinbase.github.io/multisig-tool/) (which is supposedly no longer working correctly) would generate the EXACT same addresses as the "functional" forked version which is supposedly working correctly (https://github.com/dlajarretie/multisig-tool).

I want to know that for certain. Is there any way to find out if both (non-functional and functional) versions of this coinbase recovery tool will generate the exact same addresses in *Step 1* when you enter all 3 public keys?

Because when I enter the 3 public keys in step 1, the addresses that are generated in the list are all empty with zero transactions. Yet, the addresses that are generated are identical in both the non-functional and functional version of the tool. Can someone who has their own PDF with their own 3 public keys test this out and let me know if the 2 tools generate identical addresses for them as well?
Lepi (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 5


View Profile
June 17, 2024, 05:12:47 PM
 #27

I did quick testing on Debian 11 and it seems to works. But i can't verify whether it works on next step since i only have 3 xpub generated from https://coinb.in/#newHDaddress. Here are the steps,

1. Check my environment.

Code:
$ node --version
v12.22.12
$ npm --version
7.5.2
$ python3 --version
Python 3.9.2
$ python2 --version
Python 2.7.18

2. Setup and run multisig-tool.

Code:
$ git clone --depth 1 https://github.com/dlajarretie/multisig-tool
Cloning into 'multisig-tool'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 29 (delta 0), reused 12 (delta 0), pack-reused 0
Receiving objects: 100% (29/29), 109.27 KiB | 34.00 KiB/s, done.
$ cd multisig-tool/
$ npm install

added 149 packages, and audited 150 packages in 1m

9 vulnerabilities (1 moderate, 4 high, 4 critical)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
$ npm install bip38 crypto-browserify --save

added 3 packages, and audited 153 packages in 19s

9 vulnerabilities (1 moderate, 4 high, 4 critical)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
$ ./node_modules/.bin/browserify -r bip38 -s Bip38 > lib/multisig/bip38.js
$ make compile
cd lib/multisig && \
../../node_modules/.bin/browserify -r ./vault -r ./views/addresses_view > ../../multisig.js
$ make run
cd lib/multisig && \
../../node_modules/.bin/browserify -r ./vault -r ./views/addresses_view > ../../multisig.js
python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
...

3. Open on Firefox by typing localhost:8000, enter 3 xpub and click continue. Here's the screenshot some time after i click continue.

https://i.ibb.co/FYcpF5G/a.png

Take note i assume it works since,
1. Firefox only show error message about favicon on it's console (F12).
2. I do not see "Failed!" message or each address turning red.


I know it's a hassle for you to set up the environment again but if you could do this one last time I'd really appreciate it.

Could you please run the Coinbase tool (the forked version that's apparently the one that works): https://github.com/dlajarretie/multisig-tool

And then use the exact same 3 pub keys and use it on the online tool https://coinbase.github.io/multisig-tool/

So that I can see if both versions give you the exact same results (addresses generated)?

Please make sure that for the forked "dlajarretie" version, you use the correct computer environment and run the tool locally. And for the online website version tool, make sure you do NOT use the computer environment and do not run it locally.

If it does, then it means that either the forked "dlajarretie" version isn't working correctly, or it means that the online website version is working correctly.

If you don't mind, please also post the 3 pub keys you used here so I can check and see if I get the same results.

Thank you.
alexeyneu
Member
**
Offline Offline

Activity: 333
Merit: 31


View Profile
June 18, 2024, 02:17:04 AM
 #28

And Ubuntu makes it particularly hard to install Python 2 in recent versions of the distro, so you should start with an older Ubuntu version such as Trusty (14.04) or Precise (12.04) that have Python 2.7 bundled.

Not only Ubuntu, but most newer version of linux distro. And i'd recommend to use Debian 11 since it's newest version of Debian and still ship Python 2.7[1] rather than using EOL version of Ubuntu.

[1] https://packages.debian.org/bullseye/python2.7
wtf really

Code:
Install Python 3.8  

curl -OL https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz 

Extract the Python archive. 

tar -xf Python-3.8.12.tar.xz 
mv Python3.8.12 /opt/Python3.8.12 

Now install the dependencies required to install Python 3.8: 

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev -y 

Navigate to the directory and run the ./configure –enable-optimizations command: 

cd /opt/Python3.8.12/ 
./configure --enable-optimizations --enable-shared 

Note, The script performs several checks to make sure all of the dependencies on your system are present. The ./configure –enable-optimizations will optimize the Python binary by running multiple tests, which will make the build process slower. 

Now that you have built and configured the environment, it is time to compile it with the command make. 
 
make 
 
A handy trick is to specify the -j <number of cpu> as this can significantly increase compiling speed if you have a powerful server. For example, the LinuxCapable server has 6 CPUs, and I can use all 6 or at least use 4 to 5 to increase speed. 
 
make -j 6 

Once you have finished building, install Python binaries as follows: 

sudo make altinstall 

Note, it’s advised to use the make altinstall command NOT to overwrite the default Python 3 binary system. 

Next, after the installation, you need to configure the dynamic linker run-time bindings: 

sudo ldconfig /opt/Python3.8.12 

Note, do not skip this, or you will face issues. You will also need to replace the path with your directory name and version. 

Confirm that Python 3.8 is installed and the build version by running the following command: 

python3.8 –version 

Example output: 

Python 3.8.12

ABCbits
Legendary
*
Offline Offline

Activity: 2912
Merit: 7568


Crypto Swap Exchange


View Profile
June 18, 2024, 09:44:45 AM
 #29

--snip--
I know it's a hassle for you to set up the environment again but if you could do this one last time I'd really appreciate it.

--snip--

I need to install Debian 11 on VM and setup few things. I'll give an update (whether success or failure) in next few days.

And Ubuntu makes it particularly hard to install Python 2 in recent versions of the distro, so you should start with an older Ubuntu version such as Trusty (14.04) or Precise (12.04) that have Python 2.7 bundled.

Not only Ubuntu, but most newer version of linux distro. And i'd recommend to use Debian 11 since it's newest version of Debian and still ship Python 2.7[1] rather than using EOL version of Ubuntu.

[1] https://packages.debian.org/bullseye/python2.7
wtf really

Code:
Install Python 3.8  

curl -OL https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz 

Extract the Python archive. 

tar -xf Python-3.8.12.tar.xz 
mv Python3.8.12 /opt/Python3.8.12 

Now install the dependencies required to install Python 3.8: 

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev -y 

Navigate to the directory and run the ./configure –enable-optimizations command: 

cd /opt/Python3.8.12/ 
./configure --enable-optimizations --enable-shared 

Note, The script performs several checks to make sure all of the dependencies on your system are present. The ./configure –enable-optimizations will optimize the Python binary by running multiple tests, which will make the build process slower. 

Now that you have built and configured the environment, it is time to compile it with the command make. 
 
make 
 
A handy trick is to specify the -j <number of cpu> as this can significantly increase compiling speed if you have a powerful server. For example, the LinuxCapable server has 6 CPUs, and I can use all 6 or at least use 4 to 5 to increase speed. 
 
make -j 6 

Once you have finished building, install Python binaries as follows: 

sudo make altinstall 

Note, it’s advised to use the make altinstall command NOT to overwrite the default Python 3 binary system. 

Next, after the installation, you need to configure the dynamic linker run-time bindings: 

sudo ldconfig /opt/Python3.8.12 

Note, do not skip this, or you will face issues. You will also need to replace the path with your directory name and version. 

Confirm that Python 3.8 is installed and the build version by running the following command: 

python3.8 –version 

Example output: 

Python 3.8.12



I don't understand why you quote my old post and said "wtf really".

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
alexeyneu
Member
**
Offline Offline

Activity: 333
Merit: 31


View Profile
June 18, 2024, 10:13:00 AM
 #30

you're programmer right? but you say you do not know how to install python
ABCbits
Legendary
*
Offline Offline

Activity: 2912
Merit: 7568


Crypto Swap Exchange


View Profile
June 18, 2024, 10:54:25 AM
 #31

you're programmer right? but you say you do not know how to install python

I never say i'm programmer, although i know how to operate computer. I also never say i don't know to install Python. What i said is difficulty installing Python 2 on newer Linux distro.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
DaveF
Legendary
*
Online Online

Activity: 3514
Merit: 6351


Crypto Swap Exchange


View Profile WWW
June 18, 2024, 11:13:30 AM
 #32

you're programmer right? but you say you do not know how to install python

It's not python but an older version of python.
You can't run the 3.x for this you need 2.x which as @ABCbits said can be a PITA to install.

Same with old versions of other things too.

It's why I have a bunch of linux DVDs from 2012. Just in case I have to install some package that disappeared off the internet.

-Dave


█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!