Code Monkey home page Code Monkey logo

multy-back's Introduction

Build Status Docker images: https://hub.docker.com/r/multyio/multy-back/tags/

Multy-back

Back end server for Multy application

Usage Instructions

In all cases you would like to set configuration parameters in multy.config file with addresses, passwords, tokend and other settings. Note, that configuration file must be located in the same directory as the binary file.

From source

For building Multy-back, in Multy-back directory run:

make all-with-deps

After that in cmd directory binary file with name multy should appear.

To run a server:

make run

Notice, that program uses NSQ, MongoDB and BTC RPC API. You should install and run it by yourself.

From docker-compose

In docker-compose file (multy-back service) set volumes: multy.config and rpc.cert (for btc node).

If you want to use btc node from docker container, uncomment btcd-testnet part o fdocker-compose file and set its address in BTCNodeAddress field in cmd/multy.config.

To run a server:

docker-compose up

API

For API documentation, see https://godoc.org/github.com/Multy-io/Multy-back

multy-back's People

Contributors

abitrolly avatar altvnv avatar enmk avatar jekabolt avatar kristinaetc avatar nickpro avatar vadimicus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multy-back's Issues

Fix for multy: line 1: /multy/multy-back: not found

This image is built and deployed successfully, but fail to run:

Multy-back/Dockerfile

Lines 24 to 27 in 822857b

FROM base as multy-back
WORKDIR /multy
COPY --from=builder /go/src/github.com/Multy-io/Multy-back/cmd/multy-back/multy-back /multy/multy-back
ENTRYPOINT /multy/multy-back

$ docker run multyio/multy-back
/bin/sh: /multy/multy-back: not found

Because:

https://stackoverflow.com/questions/34729748/installed-go-binary-not-found-in-path-on-alpine-linux-docker

CC @Enmk

Show error in logs when DB connection failed

Right now if there is no connection to database, backend just dumps configuration and hangs with no activity. If there is no connection, it should at least give a first warning.

multy-back        | aaaaaaaaaaa
multy-back        | 2018-11-20/08:19:32.427 [ERROR] main: --------------------------------new multy back server session 
multy-back        | 2018-11-20/08:19:32.428 [INFO] main: CONFIGURATION={Name:Multy-Stage 
Database:{Address:mongodb:27000 DBUsers:userDB ... IOS:{Hard:0 Soft:0}}} 
multy-back        | 2018-11-20/08:19:32.428 [INFO] main: branch: dev 
multy-back        | 2018-11-20/08:19:32.428 [INFO] main: commit: 9e7cf01 
multy-back        | 2018-11-20/08:19:32.428 [INFO] main: build time: 2018-11-18T08:31:52+0000 
multy-back        | 2018-11-20/08:19:32.428 [INFO] main: tag:  

Protobuf refactor proposal

Move third-parties dependencies to the Appscrunch github.

All third-party dependencies should be located either within this repository (as submodules, subtrees, anything else) or hosted on Appscrunch's github. In rare case when moving a dependency to our github is too complicated or takes too much time, leave it at original location, but under no condition you should not refer to developer's private repository.

https://github.com/Appscrunch/Multy-back/blob/d11d67f6b099529f9ce76bf9695493e6fb1c3cf3/multy-back.go#L10

getWalletVerbose: errors are not handled

Errors are not handled (particularly in Ether case):

EventGetAdressNonce errors are simply ignored (if EventGetAdressBalance has nil error):

Multy-back/client/rest.go

Lines 1404 to 1409 in 527bb21

case currencies.ETHTest:
nonce, err = restClient.ETH.CliTest.EventGetAdressNonce(context.Background(), &adr)
amount, err = restClient.ETH.CliTest.EventGetAdressBalance(context.Background(), &adr)
case currencies.ETHMain:
nonce, err = restClient.ETH.CliMain.EventGetAdressNonce(context.Background(), &adr)
amount, err = restClient.ETH.CliMain.EventGetAdressBalance(context.Background(), &adr)

GetAllWalletEthTransactions simply not handled

err = restClient.userStore.GetAllWalletEthTransactions(user.UserID, currencyId, networkId, &userTxs)

Passwords are exposed in logs at startup

Multy on startup dumps config with some password data. This is no good. Password can reveal two first symbols for identification purposes and be at least 12 symbols.

TableMempoolRatesETHTest: TableTxsDataETHTest:TableTxsDataETHTest 
DBRestoreState:RestoreState TableState:LastState Username:multy Password:17*********} 
SocketioAddr:0.0.0.0:6780 RestAddress:0.0.0.0:6778 Firebase:{Type: ProjectID: PrivateKeyID: 
PrivateKey: ClientEmail: ClientID: AuthURI: TokenURI: AuthProviderX509CertURL: 
ClientX509CertURL:} NSQAddress:0.0.0.0:1150 BTCNodeAddress:localhost:18334 
DonationAddresses:[{FeatureCode:10000 
DonationAddress:1FPv9f8EGRDNod7mSvJnUFonUioA3Pw5ng}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.