openware / opendax

Open-Source Cloud-Native Digital Asset & Cryptocurrency Exchange Platform
https://www.openware.com/products/opendax
Apache License 2.0
614 stars 534 forks source link

Generating deposit address error #175

Open shinji12307084 opened 4 years ago

shinji12307084 commented 4 years ago

I have set the stack (2-4-stable) up with rake service:all with only changing the domain and subdomain in config/app.yml according to the instructions.

But it seems to me like up to this point, the setup is not complete.

I managed to login with the seeded users: Email: admin@barong.io, password: 0lDHd9ufs9t@

Once I go to the wallet interface, the UI just shows me the message "Generating deposit address" forever. Sometimes "Failed to decode cookies" for version 2.3 of Baseapp.

Screen Shot 2020-07-03 at 7 18 33 PM

I have tried configuring a blockchain node in the Tower according to the instructions in this article

https://medium.com/openware/how-to-configure-blockchain-node-in-the-tower-opendax-5e75e3264e18

but I am getting the same error as addressed by one of the responses of the article

curl: (6) Could not resolve host: parity

Then I check the blockchain logs of the Opendax deployment using the command

docker-compose logs -f blockchain

blockchain_1               | {"level":"WARN","time":"2020-07-03 11:09:27","message":"Error: Failed to open TCP connection to parity:8545 (getaddrinfo: Name or service not known). Sleeping for 10 seconds"}
blockchain_1               | {"level":"ERROR","time":"2020-07-03 11:09:42","message":"#<Peatio::Blockchain::ClientError: Failed to open TCP connection to parity:8545 (getaddrinfo: Name or service not known)>"}
blockchain_1               | {"level":"ERROR","time":"2020-07-03 11:09:42","message":"/home/app/lib/peatio/ethereum/blockchain.rb:60:in `rescue in latest_block_number'\n/home/app/lib/peatio/ethereum/blockchain.r
b:57:in `latest_block_number'\n/home/app/app/services/blockchain_service.rb:16:in `latest_block_number'\n/home/app/app/workers/daemons/blockchain.rb:22:in `process'\n/home/app/app/workers/daemons/blockchain.rb:9
:in `block (3 levels) in run'"}

I have tried restarting the blockchain daemon with the command

docker-compose up -Vd blockchain

And recheck the logs, same error.

I also tried to bring up the optional cryptonodes component with the command

rake service:cryptonodes[start]

Restarted the blochain daemon, check the logs, same error.


Apparently the person from the Openware team demonstrating the set up has the same error

https://medium.com/openware/deploy-your-own-crypto-trading-platform-opendax-on-digital-ocean-in-15-minutes-24ca0308fbb3

https://www.youtube.com/watch?v=mhIwkxGZYKk

See around 19:40 of the Youtube video.

So I'm thinking that this must be a default behavior and I might not have done anything wrong, just the setup instruction is not complete.

If this is the case, probably a more comprehensive setup instructions would be useful.

If anyone could point out what I have done wrong, or guide me to completing the whole setup, I can help document it and make a pull request, for anyone in the future that might have the same issue setting up the stack.

freakcoderz commented 4 years ago

rake service:cryptonodes[start] will start the parity node locally and begin syncing. If you don't have it setup somewhere and the exchange pointing to it, you won't get an address.

Galaxy-Traveler commented 4 years ago

So Parity must be installed

Galaxy-Traveler commented 4 years ago

sudo snap install parity sudo snap install parity-ui

Galaxy-Traveler commented 4 years ago

Parity must be installed sudo snap install parity sudo snap install parity-ui cryptonodes.yaml volumes:

alinetskyi commented 3 years ago

Parity must be installed sudo snap install parity sudo snap install parity-ui cryptonodes.yaml volumes:

  • ../data/parity:/home/parity/.local/share/io.parity.ethereum to ../data/parity:/home/app/snap/parity/16707/.local/share/io.parity.ethereum

Apart from setting up parity, you also need to configure blockchain in the admin panel as well as the deposit wallet for that currency

lucagrossi commented 3 years ago

Hi all, I'm having the exact same issue. I changed everything according to the above, but it didn't solve anything. Anyone has some more info?

freakcoderz commented 3 years ago

Nope, gave up on this.

Galaxy-Traveler commented 3 years ago

Let's try it again: sudo snap install parity/////////////////////////// nano opendax/temples/compose services: parity: image: parity/parity:v2.7.2-stable restart: always command: | --chain=kovan --mode=active --interface=all --warp=true --snapshot-peers=10 --min-peers=5 --max-peers=10 --jsonrpc-interface=0.0.0.0 --jsonrpc-cors=all --jsonrpc-hosts=all --jsonrpc-apis=all --db-compaction=ssd --no-persistent-txqueue volumes:

Galaxy-Traveler commented 3 years ago

For testnet is ok For mainnet you will need a ssd min 500GB-2TB

Blockchain mainnet min-450GB

lucagrossi commented 3 years ago

OK this works indeed..thanks for all your support! My general question for this is: why isn't this somewhere in a manual or is it so obvious for everyone (and only not to me ;))?

Galaxy-Traveler commented 3 years ago

There are questions that sometimes can't be answered????? The community will always help you. It's for testing and improvement

lucagrossi commented 3 years ago

Alright thanks again. It seems to working now, although I can't see that my deposits are processed. Furthermore I see that the CPU skyrockets and ultimately (after a minute or so) makes my system unstable after starting the cryptonodes. At Digital Ocean I'm not able to have more than 2 VCPU's and 4GB RAM at this moment for some reason. Do I need the cryptonodes to work before I can see my balance? or can I do this in a different way?

Galaxy-Traveler commented 3 years ago

What OS you use? Ubuntu: free -m sudo swapoff -a sudo fallocate -l 12G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile free -h

sudo sysctl vm.swappiness=10 sudo sysctl vm.vfs_cache_pressure=50 sudo nano /etc/sysctl.conf

vm.swappiness=10 vm.vfs_cache_pressure=50

save and reboot rake service:frontend

lucagrossi commented 3 years ago

That helped as well. Thanks! I tried to speed up the block fetching with this command: parity --mode active --tracing off --pruning fast --db-compaction ssd --cache-size 4096

However the chain started again at 0 (it is faster), but every time I restarts the cryptonodes now, it start back again at 0. Anyway to solve this?