dogecoinfoundation/gigawallet

several required packages appear to be missing from 0.1.0-beta

Closed this issue · 15 comments

main.go
commands.go
server.go

in the cmd/gigawallet directory all appear to require packages that vscode is unable to find when bringing down the 0.1.0-beta release, they seem to be available in gigawallet/pkg the ones in external repos appear to come in just fine when running "go get" but "go get" command returns that they cannot be "go gotten" for the ones in the foundation repo.

New to golang here, some assistance would be appreciated!

Hi @georgeartem !

I'm not familiar with vscode however if you take a look at the Makefile you'll see that we address the whole directory as . ie: go run ./cmd/gigawallet/. <cmd> rather than go run ./cmd/gigawallet/main.go (which will complain about missing files). I'm not sure if that is the issue you're running into?

If you just want to start up the service to try it out you should be able to run make dev. Check out the installation docs for more info: https://gigawallet.dogecoin.org/installation.html#building-from-source

And if I've totally misunderstood the problem please let me know and drop a few screenshots :)

Hello @tjstebbing!

Thanks for the pointers. For reference, I am operating Windows 10 that has a dogecoin core 1.14.4 running on it. Git bash does not appear to recognize the 'make' command and says that 'go make' is unknown. Following the 'Makefile' instructions I get:

User ~ /gigawallet/cmd/gigawallet (main)
$ go build -o ../build/gigawallet .

github.com/dogeorg/go-libdogecoin: build constraints exclude all Go files in C:\Users\Artom\go\pk
g\mod\github.com\dogeorg\go-libdogecoin@v0.0.45

github.com/pebbe/zmq4

C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\reactor.go:10:4: undefined: State
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\reactor.go:11:9: undefined: State
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\reactor.go:21:16: undefined: Socket
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\reactor.go:23:12: undefined: Poller
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\reactor.go:61:34: undefined: Socket
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\reactor.go:61:49: undefined: State
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\reactor.go:68:37: undefined: Socket
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\ctxoptions_windows.go:21:12: undefined: C
ontext
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\ctxoptions_windows.go:42:12: undefined: C
ontext
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\utils.go:17:12: undefined: Socket
C:\Users\Artom\go\pkg\mod\github.com\pebbe\zmq4@v1.2.10\utils.go:17:12: too many errors

github.com/dogecoinfoundation/gigawallet/pkg/store

....\pkg\store\sqlite.go:1012:34: undefined: sqlite3.Error
....\pkg\store\sqlite.go:1013:29: undefined: sqlite3.ErrConstraint
....\pkg\store\sqlite.go:1018:29: undefined: sqlite3.ErrBusy
....\pkg\store\sqlite.go:1018:62: undefined: sqlite3.ErrLocked

Is there a config file I should be referencing or other dependency being missed that would define these?

Ahh I don't think we've tried it on windows yet! I'll see if I can get onto a windows machine ASAP and try building it. So you're using 'git bash' and vscode? any other compatibility layer stuff?
@qlpqlp you run windows ?

qlpqlp commented

The best approach after also trying to run on windows is using the subsystem available on windows 11 and do it like this:

1 - Open the Windows PowerShell and enable the subsystem
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Install linux, in this case Ubuntu

wsl --install -d Ubuntu

Open the subsystem

wsl

2- Run updates on Ubuntu

sudo apt update
sudo apt upgrade

Install Git

sudo apt install git

Install Golang (don't use apt-get because it dosent fetch the latest Golang that works with GigaWallet)

wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

edit your profile to make permanent

sudo nano ~/.profile

add this line

export PATH=$PATH:/usr/local/go/bin

run this to reflect changes

export PATH=$PATH:/usr/local/go/bin

3- Install GigaWallet

git clone git@github.com:dogecoinfoundation/gigawallet.git
cd gigawallet
make

Hope this helps on running in Windows, indirectly :)

The instructions above work to get WSL running on Win10 and to clone the repo on Ubuntu. However returned basically the same as above after running make

Here is what Ubuntu spits out:

github.com/dogeorg/go-libdogecoin:` build constraints exclude all Go files in /home/artom/go/pkg/mod/github.com/dogeorg/go-libdogecoin@v0.0.45
# github.com/pebbe/zmq4
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/reactor.go:10:4: undefined: State
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/reactor.go:11:9: undefined: State
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/reactor.go:21:16: undefined: Socket
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/reactor.go:23:12: undefined: Poller
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/reactor.go:61:34: undefined: Socket
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/reactor.go:61:49: undefined: State
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/reactor.go:68:37: undefined: Socket
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/utils.go:17:12: undefined: Socket
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/utils.go:24:12: undefined: Socket
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/utils.go:28:12: undefined: Socket
../go/pkg/mod/github.com/pebbe/zmq4@v1.2.9/utils.go:28:12: too many errors
# github.com/dogecoinfoundation/gigawallet/pkg/store
pkg/store/sqlite.go:1012:34: undefined: sqlite3.Error
pkg/store/sqlite.go:1013:29: undefined: sqlite3.ErrConstraint
pkg/store/sqlite.go:1018:29: undefined: sqlite3.ErrBusy
pkg/store/sqlite.go:1018:62: undefined: sqlite3.ErrLocked
make: *** [Makefile:9: build/gigawallet] Error 1

It appears that there are build constraint comments added to the files in libdogecoin repository that may be blocking this as the output suggests.

https://github.com/dogeorg/go-libdogecoin/blob/main/libdogecoin.go

qlpqlp commented

Finally I have a working docker image, tested on windows and Linux Docker 😁

https://hub.docker.com/r/dogeorg/gigawallet

Will upload also the code Opensource on GitHub on Monday 😅

Something ran using the docker instructions, but returns:

ChainFollower: error retrieving block hash (will retry): json-rpc transport: Post "http://127.0.0.1:22555": dial tcp 127.0.0.1:22555: connect: connection refused

I am guessing this is probably a config issue on my end with dogecoin node and rpc settings there. . .

qlpqlp commented

Does your Dogecoin Node have your GigaWallet Server IP in the allowed? example if localhost had -rpcallowip=0.0.0.0 or -rpcallowip=* to allow on your tests all IP's

Here are my enabled configs from dogecoin.conf on dogecoin-qt 1.14.4.

maxconnections=20
server=1
rpcuser=some_user
rpcpassword=some_password
rpcallowip=127.0.0.1
rpcport=22555
rpcconnect=127.0.0.1

dogecoin-qt 1.14.4 does not allow an ip wildcard for rpcallowip as you are suggesting. I tried to see if this might be a user/pass mismatch in devconf.toml but the result was the same. Perhaps there is a minimum dogecoin-qt version requirement? I haven't been following any of the changes in the releases since 1.14.4

qlpqlp commented

Enable also txindex and zmq :)
here it is an example:

rpcuser=USERNAME
rpcpassword=PASSWORD
rpcport=22555
server=1
listen=1
rpcallowip=0.0.0.0
txindex=1
zmqpubhashtx=tcp://0.0.0.0:28332
zmqpubhashblock=tcp://0.0.0.0:28332
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28332

Are we happy to close this ticket and say windows users should run docker?

The instructions here sorted it out for running in docker https://hub.docker.com/r/dogeorg/gigawallet

:-)