odin-core

module
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: GPL-3.0

README

 

OdinChain - Decentralized Data Delivery Network

Documentation »

Whitepaper · Technical Specifications · Developer Documentation · Client Library


What is OdinChain?

OdinChain is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts. It is designed to be compatible with most smart contract and blockchain development frameworks. It does the heavy lifting jobs of pulling data from external sources, aggregating them, and packaging them into the format that’s easy to use and verified efficiently across multiple blockchains.

Odin's flexible oracle design allows developers to query any data including real-world events, sports, weather, random numbers and more. Developers can create custom-made oracles using WebAssembly to connect smart contracts with traditional web APIs within minutes.

Installation

Building from source

We recommend the following for running a OdinChain Validator:

  • 2 or more CPU cores
  • 8 GB of RAM (16 GB in case on participate in mainnet upgrade)
  • At least 100GB of disk storage

Step 1. Install Golang

Go v1.20+ or higher is required for OdinChain.

If you haven't already, install Golang by following the official docs. Make sure that your GOPATH and GOBIN environment variables are properly set up.

Step 2. Get OdinChain source code

Use git to retrieve OdinChain from the official repo, and checkout the master branch, which contains the latest stable release. That should install the odind binary.

git clone https://github.com/odinprotocol/chain
cd chain && git checkout v2.3.0
make install

Step 3. Verify your installation

Using odind version command to verify that your odind has been build successfully.

odind version --long
name: odinchain
server_name: odind
version: 2.3.0
commit: 4fe19638b33043eed4dec9861cda40962fb5b2a7
build_tags: ledger
go: go version go1.20.6 darwin/amd64
build_deps:
...

Setting Up Yoda — The Oracle Daemon

OdinChain validators are also responsible for responding to oracle data requests. Whenever someone submits a request message to OdinChain, the chain will autonomously choose a subset of active oracle validators to perform the data query.

The validators are chosen submit a report message to OdinChain within a given timeframe as specified by a chain parameter (100 blocks in mainnet). We provide a program called yoda to do this task for you. For more information on the data request process, please see here.

Yoda uses an external executor to resolve requests to data sources. Currently, it supports AWS Lambda and Google Cloud Function (through the REST interface). In future releases, yoda will support more executors and allow you to specify multiple executors to add redundancy.

You also need to set up yoda and activate oracle status. Here’s the documentation to get started.

That’s it! You can verify that your validator is now an oracle provider via cli by using odind query oracle validator <your validator address>. Your yoda process must be responding to oracle requests assigned to your node. If the process misses a request, your oracle provider status will automatically get deactivated and you must send MsgActivate to activate again after a 10-minute waiting period and make sure that yoda is up.

Resources

Community

License & Contributing

OdinChain is licensed under the terms of the GPL 3.0 License unless otherwise specified in the LICENSE file at module's root.

We highly encourage participation from the community to help with D3N development. If you are interested in developing with D3N or have suggestion for protocol improvements, please open an issue, submit a pull request, or drop as a line.

Directories

Path Synopsis
app
params
Package params defines the simulation parameters in the odin.
Package params defines the simulation parameters in the odin.
client
grpc/node
Package node is a reverse proxy.
Package node is a reverse proxy.
grpc/oracle/proof
Package proof is a reverse proxy.
Package proof is a reverse proxy.
cmd
pkg
obi
0.47 TODO: consider importing directly from ibc instead of forking
0.47 TODO: consider importing directly from ibc instead of forking
x
mint/testutil
Package mock_types is a generated GoMock package.
Package mock_types is a generated GoMock package.
mint/types
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
onft/types
Package types is a reverse proxy.
Package types is a reverse proxy.
oracle/types
NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov controlled execution of MsgUpdateParams messages.
NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov controlled execution of MsgUpdateParams messages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL