Giter Site home page Giter Site logo

go-delegator's Introduction

Metadium Proxy

License Go Report Card GoDoc

Main functions are MetaID CRUD and relaying JSON-RPC result with metadium nodes.

Contents

Features

  1. JSON-RPC relay with metadium nodes
  2. Proofs for sign and merkle tree such as Ecrecover, DeriveSha, VerifyProof

Prerequisite

  1. Go
  2. Dep
    • Install
    brew install dep
    
  3. Docker
  4. xgo
    • because of compilation for C code used in go-ethereum, we need improved cross-compiler
docker pull karalabe/xgo-latest
go get github.com/karalabe/xgo

Build

  1. Move to root directory of this repo
  2. Build on your preference
  • In case of Lambda that is cross-compile, make or make lambda

  • In case of Lambda with remote branch, make branch=master remote

  • In case of compile for local machine, make local

Test

  1. Move each module directory such as json, rpc and so on
  2. Run testunit
    go test -v
    

Usage

  1. $> proxy [KEY_JSON_PATH] -log_lev=debug -log_out=/log/proxy.log -log_fmt=json
  2. $> proxy [KEY_JSON_PATH] [KEY_JSON_PASSPHRASE] -log_lev=debug -log_out=/log/proxy.log -log_fmt=json
    • log_lev, log_out, log_fmt, log_bot_token and log_bot_chatid are optional
    • description:
      • log_lev: log level
      • log_out: log output location
      • log_fmt: log format, text or JSON
      • log_bot_token: telegram access token
      • log_bot_chatid: telegram chat ID
    • default:
      • log_lev: info
      • log_out: stdout
      • log_fmt: text

Deploy (for AWS Lambda)

  1. Set Lambda on AWS
    • Function package: compressed binary file in $GOPATH/src/{repo}/bin
    • Handler: proxy (binary file name, it is optional)
    • Runtime: Go 1.x
    • (Optional) Include DynamoDB execution role to Lambda execution role
  2. Set API Gateway as proxy on AWS
  3. Add API Gateway as Lambda trigger
  4. Add CloudWatch Logs

Reference

[1] AWS Lambda Go, https://github.com/aws/aws-lambda-go

[2] Go ethereum, https://github.com/ethereum/go-ethereum

[3] IPFS, https://ipfs.io/

[4] IPFS API, https://github.com/ipfs/go-ipfs-api

[5] Cross compiling for ethereum, https://github.com/ethereum/go-ethereum/wiki/Cross-compiling-Ethereum

[6] Xgo, https://github.com/karalabe/xgo

[7] Dep, https://github.com/golang/dep

License

MIT

go-delegator's People

Contributors

hexoul avatar blueisle avatar ywshin-cp avatar metadiumrelease avatar

Watchers

James Cloos avatar  avatar

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.