All Projects → trinity-project → trinity-eth

trinity-project / trinity-eth

Licence: MIT license
No description or website provided.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to trinity-eth

ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (+7.14%)
Mutual labels:  protocol, eth
nat-api
↔️ Fast port mapping with UPnP and NAT-PMP
Stars: ✭ 22 (+57.14%)
Mutual labels:  protocol
Rubicon
Swift parser + mock generator
Stars: ✭ 42 (+200%)
Mutual labels:  protocol
metacom
RPC communication protocol for Metarhia stack 🔌
Stars: ✭ 42 (+200%)
Mutual labels:  protocol
ErpNet.FP
ErpNet.FP is a light-weight cross-platform Http server facilitating printing to fiscal printers through simple JSON Api.
Stars: ✭ 75 (+435.71%)
Mutual labels:  protocol
wayland-explorer
Easily browse and read Wayland protocols documentation
Stars: ✭ 78 (+457.14%)
Mutual labels:  protocol
protocol-registry
This module allows you to set custom protocol handler for your nodejs app.
Stars: ✭ 45 (+221.43%)
Mutual labels:  protocol
kleros
Kleros smart contracts
Stars: ✭ 203 (+1350%)
Mutual labels:  protocol
memcacher
C++ implementation of Memcache Binary Protocol.
Stars: ✭ 16 (+14.29%)
Mutual labels:  protocol
ipfs-companion
Browser extension that simplifies access to IPFS resources on the web
Stars: ✭ 1,745 (+12364.29%)
Mutual labels:  protocol
SwiftArchitectureWithPOP
A base architecture written in swift and protocol oriented, for building new apps easily and quickly
Stars: ✭ 28 (+100%)
Mutual labels:  protocol
MarsAdmin
MarsAdmin v7 is a general interface add-on which will help staff member ingame for trinity core.
Stars: ✭ 13 (-7.14%)
Mutual labels:  trinity
MqttAndroidExample
An example Android app using MQTT protocol
Stars: ✭ 19 (+35.71%)
Mutual labels:  protocol
PSAVanCanBridge
VAN - CAN protocol bridge (V2C) for cars made by PSA Group (Peugeot, Citroen)
Stars: ✭ 67 (+378.57%)
Mutual labels:  protocol
minerProxy
以太坊矿池代理,可以自定义抽水地址和比例 ,支持热修改抽水比例。go语言编写,性能极高,唯一正版,明码标价开发费,拒绝暗抽!!!!!!
Stars: ✭ 183 (+1207.14%)
Mutual labels:  eth
LXFProtocolTool
由Swift中协议方式实现功能的实用工具库【Refreshable、EmptyDataSetable 支持 Rx 】
Stars: ✭ 101 (+621.43%)
Mutual labels:  protocol
laravel-web3
Laravel SDK wrapper for the Web3 PHP API client that interacts with the Ethereum blockchain.
Stars: ✭ 85 (+507.14%)
Mutual labels:  eth
WSD-python
Web Services for Devices (WSD) tools and utilities for cross platform support
Stars: ✭ 22 (+57.14%)
Mutual labels:  protocol
howtrader
Howtrader is a crypto currency quant framework, you can easily develop, backtest and run your own strategy in real market. It also supports tradingview or other 3rd party signals, just simply send a post request and it will help trade automatically. Now it only support binance spot, futures and inverse futures exchange. It will support okex, ftx…
Stars: ✭ 294 (+2000%)
Mutual labels:  eth
sirdez
Glorious Binary Serialization and Deserialization for TypeScript.
Stars: ✭ 20 (+42.86%)
Mutual labels:  protocol

Trinity

Trinity is a universal off-chain scaling solution, which aims to achieve real-time payments with low transaction fees, scalability and privacy protection for mainchain assets. Using state channel technology, Trinity will significantly increase the transaction throughput of underlying chains as well as the assets on smart contracts. TNC cross-chain converter facilitates the data and value flow between multiple chains. Trinity will be a fully autonomous and decentralized performance-enhancing network for the entire ecosystem and provides all-round support to Dapps on bottom layer chains in the future. https://trinity.tech

Trinity-eth

trinity-eth is the implementation of trinity protocol based on ethereum.

Trinity-ETH Network Configuration Guide

Note: Trinity node deployment process requires the configuration environment be python 3.6 and above versions. As the Trinity project continues to evolve, this file may not apply to the Trinity network released in the future; this file was tested on Ubuntu 16.04.

Trinity Runtime Environment Preparation

Description: Trinity is developed based on Python 3.6. A very useful tool with python is virtualenv, which is used to build an isolated virtual python environment for the project. It is key to maintain a clean environment during configuration. This file recommends using vitraulenv to keep you in the process of building a node. Details of virtualenv can be found at: https://virtualenv.pypa.io/ En/stable/. Another package management tool with python is Pip, which helps developer easily installed and manage the project. For more information on Pip, please refer to: https://pip.pypa.io/en/stable/

Trinity uses mongodb as local data base. Mongodb is a well-known open source no-sql database. It has high performance, easy to deploy and use for data storage. For more information about mongodb, please refer to: https ://www.mongodb.com/

The Trinity node needs to specify a public IP that can be reached in the external communication and the ports you use in the next configuration. Please make sure that the firewall does not block the ports. If you use a cloud server, please refer to your service provider document. If you use a local server, please contact your network service provider for more details.

This file uses Screen as terminals. For more info on Screen, please visit: http://man7.org/linux/man-pages/man1/screen.1.html

Install the Dependency Tools

Install system libraries and system tools

sudo apt-get install screen git libleveldb-dev libssl-dev g++

Install mongodb and launch the service

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sourcves.list.d/mongodb-org-3.6.list

sudo apt-get update

sudo apt-get install mongodb-org

sudo service mongod start

Ref: Mongodb configuration details, please visit https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Install python3.6

sudo apt-get install software-properties-common

sudo add-apt-repository ppa:jonathonf/python-3.6

sudo apt-get update

sudo apt-get install python3.6 python3.6-dev

Install pip 3.6

sudo wget https://bootstrap.pypa.io/get-pip.py

sudo python3.6 get-pip.py

Install virtualenv

sudo pip3.6 install virtualenv

Get Trinity Source Code

git clone https://github.com/trinity-project/trinity-eth.git <your dictionary> ##get wallet code
git clone https://github.com/trinity-project/trinity-gateway.git <your dictionary> ##get gateway code

Enter the trinity-eth directory

cd <your dictionary>/trinity-eth

Create and activate a virtual environment

virtualenv -p /usr/bin/python3.6 venv

source venv/bin/activate

Install the trinity node dependency package

pip install -r requirements

Enter the wallet directory

cd <your dictionary>/trinity-eth

Create and activate a virtual environment

virtualenv -p /usr/bin/python3.6 venv

source venv/bin/activate

Install the trinity node dependency package

pip install -r requirements

Install Trinity Routing Node Gateway

Open gateway configuration file

vi gateway/config.py

Find cg_public_ip_port = "localhost:8189" in the localhost and set it as user’s public ip address. Eg: cg_public_ip_port = "8.8.8.8:8189"

Create a new session window

screen -S TrinityGateway #TrinityGateway: users can change this name

Enter virtual environment

source venv/bin/activate

Run the Gateway service

python start.py

The message below on the console indicates the Gateway successfully started.

###### Trinity Gateway Start Successfully! ######

Use ctrl+a+d to detach the current TrinityGateway session window.

Note: Call the function below to reopen the existing TrinityGateway session window

screen -r TrinityGateway

Install Trinity Routing Node Wallet

Modify configuration file

cd <your dictionary>/trinity-eth/wallet

The default configuration file applies to the testnet. Both configure_testnet.py and configure_mainnet.py exist in the wallet directory. When deploying on the mainnet, users can simply copy configure_mainnet.py into configure.py. Please refer to notes for configuration details.

Create a new session window

screen -S TrinityWallet #TrinityWallet: users can change this name

Activate python3.6 virtualenv (find it in venv directory)

source venv/bin/activate

Run the Wallet Services (find it in trinity/wallet directory)

  • Mainnet Wallet
python3.6 prompt.py -m #mainnet wallet

  • Testnet Wallet
python3.6 prompt.py #testnet wallet

To detach or resume the wallet session, please refer to the section of running gateways.

Channel Nodes Interworking

After the running of Trinity CLI wallet, the subsequent wallet and channel operations can be performed on the console. Input ‘help’ to the wallet console to view all trinity CLI wallet commands. Here are a few channel-related commands:

  1. Use create wallet command to set up an address before using the channel.
trinity> create wallet <your wallet file name> 
  1. Open the existing wallet.

Note: The wallet to be opened should have state-channel functions, otherwise the function will be limited.

trinity> open wallet <your wallet file name>

Note: after creating or re-opening a wallet, the wallet will automatically connect to the gateway and enable channel function. If channel function was not enabled within 30s, please call channel function to open it manually.

  1. Use channel enable command to enable channel function before operating on state channels.
trinity> channel enable 
  1. View the wallet uir through channel show uri command
trinity> channel show uri
  1. Create channel
trinity> channel create [email protected]:xxxx TNC 80000 # create parameters:peer node uri(PublicKey@ip_address:port), asset_type, deposit
  1. Call channel tx to execute off-chain transactions. Use paymentlink code, or uri + asset + value as tx parameters.
trinity> channel tx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # payment link 

Or

trinity> channel tx [email protected]:xxxx TNC 10
  1. Call channel payment to generate payment code
trinity> channel payment TNC 10 "mytest" # payment parameters: asset type, value,comments, comments can be empty
  1. Call channel close to complete settlement and close the channel
trinity> channel close xxxxxxxxxxxxxxx #close parameters: channel name
  1. Call channel peer to check peer nodes in the current channel
trinity> channel peer
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].