All Projects → aresprotocols → ares

aresprotocols / ares

Licence: Unlicense license
Completely decentralized oracle protocol

Programming Languages

rust
11053 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ares

trustbase
Smart Contract parachain interoperate with Polkadot and Ethereum
Stars: ✭ 22 (-56.86%)
Mutual labels:  substrate, polkadot
tools
Various cli tools for Polkadot and Substrate chains, including basic node monitoring, making API queries via a cli app and other command-line tools
Stars: ✭ 173 (+239.22%)
Mutual labels:  substrate, polkadot
subsocial-offchain
Off-chain storage for Subsocial blockchain. This app builds user feeds and notifications by subscribing to Substrate events.
Stars: ✭ 24 (-52.94%)
Mutual labels:  substrate, polkadot
crunch
Crunch is a command-line interface (CLI) and Matrix Bot to claim staking rewards every Era for Substrate-based chains
Stars: ✭ 34 (-33.33%)
Mutual labels:  substrate, polkadot
polkadot-wiki-old
The Polkadot wiki.
Stars: ✭ 56 (+9.8%)
Mutual labels:  substrate, polkadot
Astar
The dApp hub for blockchains of the future
Stars: ✭ 533 (+945.1%)
Mutual labels:  substrate, polkadot
polkascan-pre-harvester
Polkascan PRE Harvester
Stars: ✭ 23 (-54.9%)
Mutual labels:  substrate, polkadot
rmrk-substrate
Nested, conditional & Multi-resourced NFTs.
Stars: ✭ 44 (-13.73%)
Mutual labels:  substrate, polkadot
Substrate
Substrate: The platform for blockchain innovators
Stars: ✭ 6,275 (+12203.92%)
Mutual labels:  substrate, polkadot
interbtc
interBTC: Trustless Bitcoin on Polkadot | kBTC: Trustless Bitcoin on Kusama
Stars: ✭ 136 (+166.67%)
Mutual labels:  substrate, polkadot
bittensor
Internet-scale Neural Networks
Stars: ✭ 97 (+90.2%)
Mutual labels:  substrate, polkadot
subwasm
Subwasm is a cli utility to help you know more about WASM Runtimes. It help downloading, inspecting and comparing Substrate based chains such as Polkadot or Kusama.
Stars: ✭ 53 (+3.92%)
Mutual labels:  substrate, polkadot
jupiter
Wasm smart contract networks powered by Substrate FRAME Contracts pallet in Polkadot ecosystem.
Stars: ✭ 49 (-3.92%)
Mutual labels:  substrate, polkadot
datdot-node-rust
datdot blockchain node in rust
Stars: ✭ 43 (-15.69%)
Mutual labels:  substrate, polkadot
nft-gallery
NFT Explorer 🗺 🧭 running on Kusama and Polkadot
Stars: ✭ 281 (+450.98%)
Mutual labels:  substrate, polkadot
ts
Misc. TypeScript definitions that are not yet available on DefinitelyTyped but required by other projects in this repo. Should be merged with upstream projects or the DT project.
Stars: ✭ 13 (-74.51%)
Mutual labels:  substrate, polkadot
polkawallet-flutter
Replace to: https://github.com/polkawallet-io/app
Stars: ✭ 107 (+109.8%)
Mutual labels:  substrate, polkadot
polkaswap-web
Polkaswap is a non-custodial, cross-chain AMM DEX protocol for swapping tokens based on Polkadot and Kusama relay chains, Polkadot and Kusama parachains, and blockchains directly connected via bridges. Polkaswap removes trusted intermediaries and provides the opportunity for faster trading.
Stars: ✭ 43 (-15.69%)
Mutual labels:  substrate, polkadot
py-substrate-interface
Python Substrate Interface
Stars: ✭ 125 (+145.1%)
Mutual labels:  substrate, polkadot
mangata-node
Mangata ❤️ Substrate & Polkadot
Stars: ✭ 52 (+1.96%)
Mutual labels:  substrate, polkadot

Ares Node Code

Official Rust implementation of the Ares Protocol.

GitHub license GitLab Status PRs Welcome Discord

How To Join Gladios Testnet

1. Download Node

wget -c https://github.com/aresprotocols/ares/releases/download/v1.0.6/gladios-node

2. Check Execution Permission

ls -al gladios-node

Output

-rwxrwxrwx  1 root  staff  89189840 11 23 21:44 gladios-node-linux-amd64-1.0.6-e4504d2

If not have x, Execute the following command

chmod +777 gladios-node

3. Start Node

./gladios-node --base-path data   --name Ares_xxx   --chain gladios --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0'

This command explain:

  • --base-path flag specify data storage directory as the data folder under the current directory.
  • --name flag specify node name as Ares_xxx.
  • --chain flag specify the current chain as the gladios testnet.
  • telemetry-url flag specify the link to monitor node status as wss://telemetry.polkadot.io/submit/ 0,You can visit telemetry to view.

Start with --dev

./target/release/gladios-node --ws-port 9945 --tmp --dev --warehouse http://YourOracle:Port

Start with network

Make ares key files

  • Create a set of files to store private keys, such as ares_key_files_**.txt
  • The content of the file is as follows, a
aura:${Your_Mnemonic}
gran:${Your_Mnemonic}
  • Aura uses sr25519, Gran uses ed25519.
  • At least you need two sets of files. ares_key_file_01.txt, ares_key_file_02.txt are used in the example

Start bootnodes validator

./target/release/gladios-node purge-chain --base-path /tmp/aura/one --chain gladios -y
./target/release/gladios-node \
  --base-path /tmp/aura/one \
  --name ocw_one \
  --execution Native \
  --port 30333 \
  --ws-port 9945 \
  --rpc-port 9933 \
  --ws-external \
  --rpc-external \
  --rpc-cors=all \
  --rpc-methods=Unsafe \
  --node-key 0000000000000000000000000000000000000000000000000000000000000001 \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
  --warehouse http://YourOracle:Port \
  --ares-keys ./ares_key_file_01.txt \
  --validator
  

Start connection validator

  • Assume that the bootnode network is ws://127.0.0.1:9945
./target/release/gladios-node purge-chain --base-path /tmp/aura/two --chain gladios -y
./target/release/gladios-node \
  --base-path /tmp/aura/two \
  --name ocw_two \
  --execution Native \
  --port 30334 \
  --ws-port 9946 \
  --rpc-port 9934 \
  --ws-external \
  --rpc-external \
  --rpc-cors=all \
  --rpc-methods=Unsafe \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
  --warehouse http://YourOracle:Port \
  --ares-keys ./ares_key_file_02.txt \
  --validator \
  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp

Ares-Gladios Builder Docker Image

Build Image

docker build -t ares-chain -f docker/builder.Dockerfile  .

Push Image to your repository

docker tag ares-chain:latest your-repository/image-name:tag
docker push your-repository/image-name:tag

Run Image

docker run -d --name ares_gladios -p 9944:9944/tcp -v your-host-path:/data aresprotocollab/ares_gladios:beta gladios-node \
  --name your-name --chain gladios --ws-external --rpc-external \
  --rpc-cors=all --rpc-methods=Unsafe  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0'

Note! your-host-path must exist

RPC Tools

Get the parameter setting value of the node warehouse.

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "ares_getWarehouse"}' http://localhost:9933
  • Response data
{
	"jsonrpc": "2.0",
	"result": "http://api.aresprotocol.io",
	"id": 1
}

Set the warehouse parameter of the current node.

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "ares_setWarehouse", "params": ["https://api.aresprotocol.io"]}' http://localhost:9933
  • Receiving null means successful setup
{"jsonrpc":"2.0","result":null,"id":1}

Get the current local XRay parameter value.

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "ares_getXray"}' http://localhost:9933
  • Response data
{
	"jsonrpc": "2.0",
	"result": "0xFFFFXXX",
	"id": 1
}

Try to return off-chain data through the http service.

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "ares_tryRequest"}' http://localhost:9933
  • Response data of failed
{
	"jsonrpc": "2.0",
	"error": {
		"code": 5002,
		"message": "Attempt to request a `Token` through `warehouse` request failed"
	},
	"id": 1
}
  • Response data of success
{
	"jsonrpc": "2.0",
	"result": {
		"request_body": "{\"code\":0,\"message\":\"OK\",\"data\":{\"btcusdt\":{\"price\":38526.121667,\"timestamp\":1650875616,\"infos\":[{\"price\":38529.57,\"weight\":1,\"exchangeName\":\"binance\"},{\"price\":38526.63,\"weight\":1,\"exchangeName\":\"bitstamp\"},{\"price\":38525.8,\"weight\":1,\"exchangeName\":\"kucoin\"},{\"price\":38524.91,\"weight\":3,\"exchangeName\":\"coinbase\"}]},\"ethusdt\":{\"price\":2810.5175,\"timestamp\":1650875642,\"infos\":[{\"price\":2811,\"weight\":1,\"exchangeName\":\"bitfinex\"},{\"price\":2810.57,\"weight\":1,\"exchangeName\":\"huobi\"},{\"price\":2810.53,\"weight\":1,\"exchangeName\":\"binance\"},{\"price\":2809.97,\"weight\":1,\"exchangeName\":\"coinbase\"}]}}}",
		"request_scheme": "https",
		"request_status": "200 OK",
		"url_path": "/api/getBulkCurrencyPrices",
		"url_query": "currency=usdt&symbol=btc_eth"
	},
	"id": 1
}

Integrated scan

  • Returns the complete debugging information of the node, including the role of the node, the status returned by the request and JSON format, etc.
  • In most cases, run this command to understand the node situation.
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "ares_getInfos"}' http://localhost:9933
{
	"jsonrpc": "2.0",
	"result": {
		"node_role": "Authority",
		"request_body_checked": "Ok",
		"request_scheme_checked": "Ok",
		"request_status_checked": "Ok",
		"warehouse": "https://api.aresprotocol.io",
		"xray": null
	},
	"id": 1
}
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].