Ontology

Dec 3, 2021 | Blockchain

Version 2.5.8 (Bin) 1.17.0 (Lib)

Welcome to the official Go implementation of the Ontology blockchain! Ontology is a high-performance public blockchain project and distributed trust collaboration platform. It is highly customizable and suitable for all kinds of business requirements. The Ontology MainNet was launched on June 30th, 2018.

As a public blockchain project, Ontology is currently maintained by both the Ontology core tech team and community members who can all support you in development. There are many available tools for use for development – SDKs, the SmartX IDE, Ontology blockchain explorer, and more.

New features are still being rapidly developed, therefore the master branch may be unstable. Stable versions can be found in the releases section.

Features

  • Scalable lightweight universal smart contracts
  • Scalable WASM contract support
  • Cross-chain interactive protocol
  • Multiple encryption algorithms supported
  • Highly optimized transaction processing speed
  • P2P link layer encryption (optional module)
  • Multiple consensus algorithms supported (VBFT, DBFT, RBFT, SBFT, PoW)
  • Quick block generation time (1-30 seconds)

How to Install Ontology from Binaries

You can download a stable compiled version of the Ontology node software by:

Building From Source

Prerequisites

  • Golang version 1.17 or later

Build Instructions

Note that the code in the master branch may not be stable.

$ git clone https://github.com/ontio/ontology.git
$ cd ontology
$ make all

After building the source code successfully, you should see two executable programs:

  • ontology: The primary Ontology node application and CLI.
  • tools sigsvr: The Ontology Signature Server, sigsvr – an RPC server for signing transactions. Detailed documentation can be found here.

Running Ontology

The Ontology CLI can run nodes for the MainNet, TestNet, and local PrivateNet. Check out the Ontology CLI user guide for a full list of commands.

MainNet Sync Node

You can run an Ontology MainNet node built from the source code with:

shell.ontology                          # Linux
ontology-darwin-amd64             # MacOS
start ontology-windows-amd64.exe    # Windows

TestNet Sync Node

You can run an Ontology TestNet node built from the source code with:

shell.ontology --networkid 2                     # Linux
ontology-darwin-amd64 --networkid 2              # MacOS
start ontology-windows-amd64.exe --networkid 2   # Windows

Local PrivateNet

The Ontology CLI allows you to run a local PrivateNet on your computer. Before you can run the PrivateNet you will need to create a wallet file. A wallet file named wallet.dat can be generated by running:

shell.ontology account add -d

To start the PrivateNet built from the source code with:

shell.ontology --testmode                      # Linux
ontology-darwin-amd64 --testmode          # MacOS
start ontology-windows-amd64.exe --testmode # Windows

Here’s an example of the directory structure:

shell$ tree ontology
ontology
wallet.dat

Run with Docker

You can run the Ontology node software with Docker:

  1. Setup Docker-compose on your computer – You will need the latest version of Docker Compose.
  2. Make a Docker image – In the root directory of the source code, run make docker to make an Ontology image.
  3. Run the Ontology image:
    • Run the command docker run ontio/ontology to start Ontology.
    • Run the command docker run -ti ontio/ontology to start Ontology and allow interactive keyboard input.
    • If you need to keep the data generated by the image, refer to Docker’s data persistence function.
    • You can add arguments to the Ontology command, such as with docker run ontio/ontology --networkid 2.

Examples

ONT Transfer Sample

Here’s how to transfer ONT:

shell.ontology asset transfer  --from=ARVVxBPGySL56CvSSWfjRVVyZYpNZ7zp48 --to=AaCe8nVkMRABnp5YgEjYZ9E5KYCxks2uce --amount=10

If the asset transfer is successful, the result will display as follows:

Transfer ONT 
 From: ARVVxBPGySL56CvSSWfjRVVyZYpNZ7zp48  
 To: AaCe8nVkMRABnp5YgEjYZ9E5KYCxks2uce  
 Amount: 10  
 TxHash: 437bff5dee9a1894ad421d55b8c70a2b7f34c574de0225046531e32faa1f94ce

TxHash is the transfer transaction hash, and we can query a transfer result by the TxHash. Note that ONT is an integer and has no decimals, whereas ONG has 9 decimals. For detailed info please read Everything you need to know about ONG.

Troubleshooting

If you encounter issues during the setup, here are some troubleshooting steps:

  • Ensure that you have installed the correct version of Golang.
  • Check network connectivity for syncing with the MainNet.
  • Verify that the commands are executed in the correct directory.
  • If you have issues getting setup, consider opening an issue on GitHub.
  • Engage with our community on Discord for further support.

For more insights, updates, or to collaborate on AI development projects, stay connected with [fxis.ai](https://fxis.ai).

Conclusion

At [fxis.ai](https://fxis.ai), we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox