Comments (19)
Trust me, its been a struggle getting this exchange stood up. It is especially hard if you're not experienced with docker. It really does take a decent time investment just to understand how everything works together. I understand the frustration, which is why I've been active on the microkube repo trying to help answer questions. A good place to find answers is actually the telegram channel for peatio, but even then it might take awhile for someone to respond. The community is more knowledgable on peatio 1.9 (and workbench), while very few have moved on to peatio 2.0.xx (and microkube).
It seems the community around this project likes to act very much like gatekeepers, which isn't fun for noobies like us. But this is free software after all, so we can't have any expectation of support.
That being said, I think i'm comfortable enough now where I understand most of the configuration and customization available in microkube.
Adding Bitcoind
Adding any new blockchain to peatio/microkube will require us to run a full node. There are many dockerized full nodes on dockerhub, most notably: https://hub.docker.com/r/kylemanna/bitcoind
The first thing you will have to do in microkube is add a new cryptonode service to cryptonodes.yaml.erb
version: '3.6'
services:
geth:
image: ethereum/client-go:stable
restart: always
command: |
--syncmode=full
--rinkeby
--rpc
--rpcaddr=0.0.0.0
--rpcport=8545
--port=30303
--rpcapi="db,personal,eth,net,web3"
--rpccorsdomain="*"
--rpcvhosts="*"
volumes:
- ../data/geth:/root/.ethereum/
expose:
- "8545"
- "30303"
labels:
traefik.enable: true
traefik.frontend.rule: 'Host: eth.<%= @config['app']['domain'] %>'
traefik.port: 8545
bitcoind:
image: kylemanna/bitcoind:latest
restart: always
command: |
-printtoconsole
-testnet=1
-rest
-rpcallowip=0.0.0.0/0
-rpcpassword=changeme
-rpcport=18333
-rpcuser=testuser
-server
volumes:
- ../data/bitcoin:/root/.bitcoin/
expose:
- "18333"
labels:
traefik.enable: true
traefik.frontend.rule: 'Host: btc.<%= @config['app']['domain'] %>'
traefik.port: 18333
By the way, the above is untested, just as an example. It might take some fiddling to get this right. The best way is to try getting the container running and check its logs by using the docker logs
command.
Note: I am still unsure at this point whether you use bitcoind
or bitcoin
as the service name used when referenced by peatios backend implementation. You might have to play with this.
Once you have a working bitcoind node, the next thing to do is to tell peatio about it. First shut down everything as the peatio database only gets seeded with the new configuration when you use the rake commands to render the config files. This configuration for adding new blockchains is in the seed file named blockchains.yml.erb
.
- key: eth-rinkeby
name: Ethereum Rinkeby
client: ethereum # API client name.
server: http://geth:8545 # Public Ethereum node endpoint. IMPORTANT: full syncmode.
height: 2500000 # Initial block number from which sync will be started.
min_confirmations: 6 # Minimal confirmations needed for withdraw and deposit confirmation.
explorer:
address: https://rinkeby.etherscan.io/address/#{address}
transaction: https://rinkeby.etherscan.io/tx/#{txid}
status: active
- key: eth-mainet
name: Ethereum Mainet
client: ethereum # API client name.
server: http://geth:8545 # Public Ethereum node endpoint. IMPORTANT: full syncmode.
height: 5000000 # Initial block number from which sync will be started.
min_confirmations: 6 # Minimal confirmations needed for withdraw and deposit confirmation.
explorer:
address: https://etherscan.io/address/#{address}
transaction: https://etherscan.io/tx/#{txid}
status: disabled
- key: btc-testnet
name: Bitcoin Testnet
client: bitcoin # API client name.
server: http://bitcoin:18333 # Public Ethereum node endpoint. IMPORTANT: full syncmode.
height: 1516996 # Initial block number from which sync will be started.
min_confirmations: 6 # Minimal confirmations needed for withdraw and deposit confirmation.
explorer:
address: https://live.blockcypher.com/btc-testnet/address/#{address}
transaction: https://live.blockcypher.com/btc-testnet/tx/#{txid}
status: enabled
From there you will also have to edit the currencies.yml.erb
, markets.yml.erb
, and wallets.yml.erb
to add bitcoin. Use the other existing entries as reference, and use the proper bitcoin client URI's and blockchain key's for it to work properly. When you spin everything back up of course you will have to wait for full sync. You can also verify that the currencies, blockchains, wallets, and markets have been properly added in the UI through the admin panel at www.app.local/admin. You will need to sign in as the seeded admin user to see this panel.
There are many more settings I didn't mention above but this should put you on the right path. I also believe that peatio 1.9 workbench might help you with configurations as far as the bitcoin node goes.
EDIT: by default, running rake service:all[start]
will NOT start the cryptonodes service, which is where you add new full nodes for various blockchain/coin support. You will have to also run rake service:cryptonodes[start]
. Additionally, you will also need to start the blockchain daemons rake service:daemons[start]
. This starts the service that will connect to the bitcoin node and will start processing blocks looking for deposits and withdrawals starting at the block height specified in the blockchains.yml.erb
file. This will also take time, but you can monitor the process with the docker logs
command on the blockchain daemon service,
Hope this helps!
Matt
from microkube.
With the ethereum geth node, you have to let it fully sync before you will see deposits in the user wallet on the site. You must spin up the cryptonode service with rake service:cryptonodes[start]
. The syncing could take anywhere from 2-4 days depending on your host hardware and internet connection.
from microkube.
Anyone have any luck with NEO, ADA, and IOTA?
from microkube.
You can either add coins manually from the admin panel (www.app.local/admin when running locally), or edit the templates/config/peatio/seed/currencies.yml.erb
template. You will also need to add the coins to the wallets and market files. When editing the templates you will need to re-run the rake commands to stop and start the project.
The templates are the key with microkube. When you run the rake commands, it uses the templates to regenerate the config.yml files, so you must make the changes there or else they will be overwritten.
from microkube.
Thanks, that is fine, but how can one make sure that deposits arrive in the wallets? Is there an example / howto for adding new coins to microkube/peatio?
from microkube.
Thanks very much, yes, the geth node will eventually come up
Is there some documentation how to set up bitcoind, dashd, etc. with microkube?
It would be really nice of the developers to come around and make the entrance hurdle less high than it currently is
from microkube.
Matt - thanks, very good info indeed, I am making progress a little bit. Have you managed to integrate any monero-like coins using cryptonote variants?
from microkube.
Unfortunately no, as my current project is focussed on ERC20 token variants. I'm sure the rubykube community would appreciate a pull request if you figure it out though!
from microkube.
@msembinelli is the best, others spit half bake info
from microkube.
Is there a tutorial to do the complete setup of wallets in openware version?
I would like to learn about this and make a tutorial, since in the openware documentation this is not available, and this is the main point of the process. Help me create a tutorial to make this easier.
from microkube.
Trust me, its been a struggle getting this exchange stood up. It is especially hard if you're not experienced with docker. It really does take a decent time investment just to understand how everything works together. I understand the frustration, which is why I've been active on the microkube repo trying to help answer questions. A good place to find answers is actually the telegram channel for peatio, but even then it might take awhile for someone to respond. The community is more knowledgable on peatio 1.9 (and workbench), while very few have moved on to peatio 2.0.xx (and microkube).
It seems the community around this project likes to act very much like gatekeepers, which isn't fun for noobies like us. Double that with the fact that anyone from the rubykube organization has incentive not to help devs like us, as they are trying to funnel business to their paid enterprise consulting and development services. But this is free software after all, so we can't have any expectation of support.
That being said, I think i'm comfortable enough now where I understand most of the configuration and customization available in microkube.
Adding Bitcoind
Adding any new blockchain to peatio/microkube will require us to run a full node. There are many dockerized full nodes on dockerhub, most notably: https://hub.docker.com/r/kylemanna/bitcoind
The first thing you will have to do in microkube is add a new cryptonode service to
cryptonodes.yaml.erb
version: '3.6' services: geth: image: ethereum/client-go:stable restart: always command: | --syncmode=full --rinkeby --rpc --rpcaddr=0.0.0.0 --rpcport=8545 --port=30303 --rpcapi="db,personal,eth,net,web3" --rpccorsdomain="*" --rpcvhosts="*" volumes: - ../data/geth:/root/.ethereum/ expose: - "8545" - "30303" labels: traefik.enable: true traefik.frontend.rule: 'Host: eth.<%= @config['app']['domain'] %>' traefik.port: 8545 bitcoind: image: kylemanna/bitcoind:latest restart: always command: | -printtoconsole -testnet=1 -rest -rpcallowip=0.0.0.0/0 -rpcpassword=changeme -rpcport=18333 -rpcuser=testuser -server volumes: - ../data/bitcoin:/root/.bitcoin/ expose: - "18333" labels: traefik.enable: true traefik.frontend.rule: 'Host: btc.<%= @config['app']['domain'] %>' traefik.port: 18333
By the way, the above is untested, just as an example. It might take some fiddling to get this right. The best way is to try getting the container running and check its logs by using the
docker logs
command.
Note: I am still unsure at this point whether you usebitcoind
orbitcoin
as the service name used when referenced by peatios backend implementation. You might have to play with this.Once you have a working bitcoind node, the next thing to do is to tell peatio about it. First shut down everything as the peatio database only gets seeded with the new configuration when you use the rake commands to render the config files. This configuration for adding new blockchains is in the seed file named
blockchains.yml.erb
.- key: eth-rinkeby name: Ethereum Rinkeby client: ethereum # API client name. server: http://geth:8545 # Public Ethereum node endpoint. IMPORTANT: full syncmode. height: 2500000 # Initial block number from which sync will be started. min_confirmations: 6 # Minimal confirmations needed for withdraw and deposit confirmation. explorer: address: https://rinkeby.etherscan.io/address/#{address} transaction: https://rinkeby.etherscan.io/tx/#{txid} status: active - key: eth-mainet name: Ethereum Mainet client: ethereum # API client name. server: http://geth:8545 # Public Ethereum node endpoint. IMPORTANT: full syncmode. height: 5000000 # Initial block number from which sync will be started. min_confirmations: 6 # Minimal confirmations needed for withdraw and deposit confirmation. explorer: address: https://etherscan.io/address/#{address} transaction: https://etherscan.io/tx/#{txid} status: disabled - key: btc-testnet name: Bitcoin Testnet client: bitcoin # API client name. server: http://bitcoin:18333 # Public Ethereum node endpoint. IMPORTANT: full syncmode. height: 1516996 # Initial block number from which sync will be started. min_confirmations: 6 # Minimal confirmations needed for withdraw and deposit confirmation. explorer: address: https://live.blockcypher.com/btc-testnet/address/#{address} transaction: https://live.blockcypher.com/btc-testnet/tx/#{txid} status: enabled
From there you will also have to edit the
currencies.yml.erb
,markets.yml.erb
, andwallets.yml.erb
to add bitcoin. Use the other existing entries as reference, and use the proper bitcoin client URI's and blockchain key's for it to work properly. When you spin everything back up of course you will have to wait for full sync. You can also verify that the currencies, blockchains, wallets, and markets have been properly added in the UI through the admin panel at www.app.local/admin. You will need to sign in as the seeded admin user to see this panel.There are many more settings I didn't mention above but this should put you on the right path. I also believe that peatio 1.9 workbench might help you with configurations as far as the bitcoin node goes.
EDIT: by default, running
rake service:all[start]
will NOT start the cryptonodes service, which is where you add new full nodes for various blockchain/coin support. You will have to also runrake service:cryptonodes[start]
. Additionally, you will also need to start the blockchain daemonsrake service:daemons[start]
. This starts the service that will connect to the bitcoin node and will start processing blocks looking for deposits and withdrawals starting at the block height specified in theblockchains.yml.erb
file. This will also take time, but you can monitor the process with thedocker logs
command on the blockchain daemon service,Hope this helps!
Matt
I ran the exchange successfully. Firstly i had problem with generating deposit address for users but managed to solve it.
Now the problem is when it send some funds to the generated address, it does not credit the account. I am guessing that my walletnotify flag is not working...
I am running my bitcoind in host operating system, my walletnotify flag is something like,
walletnotify=docker exec opendax_rabbitmq_1 rabbitmqadmin publish routing_key=peatio.deposit.coin payload='{"txid":"%s", "currency":"btc"}'
When i run docker exec opendax_rabbitmq_1 rabbitmqadmin publish routing_key=peatio.deposit.coin payload='{"txid":"%s", "currency":"btc"}'
manually, i get
Message published but NOT routed
.
Can anyone help me with this?
from microkube.
I am having this same issue
Now the problem is when it send some funds to the generated address, it does not credit the account. I am guessing that my walletnotify flag is not working...
from microkube.
@asadhayat1068 did you figure it out?
from microkube.
@interbiznw yes i am getting balance in my wallet now, but don't know how.
And when i send more coins, its not coming to my exchange wallet.
from microkube.
@msembinelli Matt, can you outline the process of adding ERC20 tokens to peatio? I have eth working ok
from microkube.
@champmine I am no longer working with peatio so I'm not sure. If you got eth working I'm sure you're 90% of the way there.
from microkube.
@msembinelli Matt, what are you working with now?
from microkube.
Did you guys manage to get orderflow into the system?
from microkube.
@champmine I am no longer working with peatio so I'm not sure. If you got eth working I'm sure you're 90% of the way there.
How was your experience/feedback w/ peatio? I find peatio a nice "learning" env. nonetheless not too fit for prod - what do you think, and more importantly what's more "prod ready" than this?
from microkube.
Related Issues (20)
- How to config smtp? HOT 2
- Changing front end microservice HOT 3
- Is microkube really a development environment HOT 2
- Deposits are not appearing in history HOT 4
- Microkube debugging HOT 1
- zcash coins how to add? HOT 1
- Documentation of postmaster / email capability HOT 2
- Can't logout
- Install working but URL issues HOT 1
- Not working -- 404 HOT 1
- Build Failed Using Latest Docker Image HOT 3
- Error after starting vendor HOT 1
- How to upgrade new version HOT 5
- Critical issue with Open DB port
- Performance issue peatio/lib/daemons/blockchain.rb HOT 1
- not able to verify via SMS HOT 1
- 500 errror HOT 1
- Option redirect from app.local to www.app.local for http & https
- Can not login after `rake service:all` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microkube.