{"id":13601656,"url":"https://github.com/AplaProject/go-apla","last_synced_at":"2025-04-11T04:31:25.872Z","repository":{"id":57482529,"uuid":"101977373","full_name":"AplaProject/go-apla","owner":"AplaProject","description":"A blockchain platform with a simplified programming language","archived":false,"fork":false,"pushed_at":"2020-01-26T12:24:30.000Z","size":139920,"stargazers_count":624,"open_issues_count":5,"forks_count":93,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-08-02T18:41:08.791Z","etag":null,"topics":["blockchain","smart-contracts"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AplaProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-31T08:21:05.000Z","updated_at":"2024-05-23T13:06:50.000Z","dependencies_parsed_at":"2022-09-16T04:41:31.325Z","dependency_job_id":null,"html_url":"https://github.com/AplaProject/go-apla","commit_stats":null,"previous_names":["genesiskernel/go-genesis"],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplaProject%2Fgo-apla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplaProject%2Fgo-apla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplaProject%2Fgo-apla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplaProject%2Fgo-apla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AplaProject","download_url":"https://codeload.github.com/AplaProject/go-apla/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223458496,"owners_count":17148475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","smart-contracts"],"created_at":"2024-08-01T18:01:05.818Z","updated_at":"2024-11-07T04:31:22.544Z","avatar_url":"https://github.com/AplaProject.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![Throughput Graph](https://graphs.waffle.io/AplaProject/go-apla/throughput.svg)](https://waffle.io/AplaProject/go-apla/metrics/throughput)\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![Go Report Card](https://goreportcard.com/badge/github.com/AplaProject/go-apla)](https://goreportcard.com/report/github.com/AplaProject/go-apla)\n[![Build Status](https://travis-ci.org/AplaProject/go-apla.svg?branch=master)](https://travis-ci.org/AplaProject/go-apla)\n[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://apla.readthedocs.io/en/latest/)\n[![](https://tokei.rs/b1/github/AplaProject/go-apla)](https://github.com/AplaProject/go-apla)\n![](https://reposs.herokuapp.com/?path=AplaProject/go-apla\u0026style=flat)\n[![API Reference](\nhttps://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667\n)](https://godoc.org/github.com/AplaProject/go-apla)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-apla?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Slack Status](https://slack.apla.io/badge.svg)](https://slack.apla.io)\n\n# About Apla\n\nApla blockchain platform is a secure, simple and compliant blockchain infrastructure for the fast-growing global collaborative economy. It was developed for building digital ecosystems. The platform includes an integrated application development environment with a multi-level system of access rights to data, interfaces and smart contracts.\n\nFor more information about Apla, visit [Apla website](https://apla.io).\n\nWe are open to new ideas and contributions and will be happy to see you among our active contributors to the source code, documentation, or whatever part you find inspiring in Apla. See our [Contribution Guide](https://github.com/AplaProject/go-apla/blob/master/CONTRIBUTING.md) for more information.\n\n# Getting started\n\nYou can get started with Apla in several ways.\n\n## Apla Testnet\n\n**Apla Testnet** is the network for testing purposes. You can explore Apla features, build apps from scratch and test your apps in the real network environment.\n\nYou can explore Apla testnet from your browser. You don't need to install anything to do so. Just visit https://testapla0.apla.io/.\n\nIf you want to install Apla frontend (Molis) on your computer:\n\n1. Download the latest [apla-front release for testnet](https://github.com/AplaProject/apla-front/releases).\n\n2. Follow the instructions in [apla-front](https://github.com/AplaProject/apla-front) repository README. \n\n\n## Apla Quickstart\n\nApla Quickstart is a compact software package that you can use to deploy the Apla blockchain network on a local computer. Quickstart installs 1 to 5 nodes alongside the platform’s client software.\n\nQuickstart is aimed at providing end users with an idea of how Apla blockchain works and includes usage examples of graphical interface elements as well as smart-contracts. \n\nQuickstart is available for computers running MacOS and Linux.\n\n[Apla Quickstart for Linux and MacOS](https://github.com/AplaProject/quick-start)\n\n\n## Deploying the Apla blockchain platform\n\nReady to deploy your own network? You can find out how to do that using our [Apla blockchain network deployment guide](https://apla.readthedocs.io/en/latest/howtos/deployment.html).\n\n\n# About the backend components\n\nApla's backend has the following components:\n\n  - go-apla service\n\n    - TCP server\n    - API server\n\n  - PostgreSQL database system\n\n  - Centrifugo notification service\n\n## PostgreSQL database system\n\nEach Apla node use PostgreSQL database system to store its current state database.\n\nTesting and production environment considerations:\n\n- *Testing environment*. You can deploy a single instance of PostgreSQL database system for all nodes. In this case, you must create PostgreSQL databases for each node. All nodes will connect to their databases located on one PostgreSQL instance.\n\n- *Production environment*. It is recommended to use a separate instance of PostgreSQL database system for each node. Each node must connect only to its own PostgreSQL database instance. It is not requred to deploy this instance on the same host with other backend components.\n\n## Centrifugo notification server\n\nCentrifugo is a notification service that receives notifications from go-apla TCP-server and sends them to the frontend (Molis client) so that users can see status of their transactions.\n\nCentrifugo is a unified notification service for all nodes in an Apla blockchain platform. When Molis client connects to a go-apla API service, it receives the IP-address of Centrifugo host and connects to it via a websocket.\n\nTesting and production environment considerations:\n\n- *Testing environment*. You can deploy centrifugo service on the same host with other backend components. It can be a single centrifugo service for all nodes, or each node may connect to its own centrifugo instance.\n\n- *Production environment*. You must have at least several dedicated centrifugo hosts.\n\n## Go-apla\n\nGo-apla is the kernel of an Apla node. It consists of two services: TCP-server and API-server.\n\n- TCP-server supports the interaction between Apla nodes.\n- API-server supports the interaction between Molis clients and Apla nodes.\n\nTesting and production environment considerations:\n\n- *Testing environment*. You can deploy go-apla service with other backend components on one host.\n\n- *Production environment*. You must deploy go-apla services on dedicated hosts.\n\n# Installation instructions\n\n\u003e For a detailed guide, see [Apla blockchain network deployment guide](https://apla.readthedocs.io/en/latest/howtos/deployment.html).\n\n## Directories\n\nIn this example, backend components are locatesd in the following directories:\n\n* `/opt/apla/go-apla` go-apla.\n* `/opt/apla/go-apla/node1` node data directory.\n* `/opt/apla/centrifugo` centrifugo.\n\n## Prerequisites and dependencies\n\n- Go versions 1.10.x and above\n- Centrifugo version 1.8\n- Postgresql versions 10 and above\n\n## Postgres database\n\n1. Change user's password postgres to Apla's default password. \n\n```bash\n    sudo -u postgres psql -c \"ALTER USER postgres WITH PASSWORD 'apla'\"\n```\n\n2. Create a node current state database.\n\n```bash\n    sudo -u postgres psql -c \"CREATE DATABASE apladb\"\n```\n\n## Centrifugo configuration\n\n1. Specify Centrifugo secret in the Centrifugo configuration file. \n\n```bash\n    echo '{\"secret\":\"CENT_SECRET\"}' \u003e config.json\n```\n\n## Installing go-apla\n\n1. Download and build the latest release:\n\n```bash\n    go get -v github.com/AplaProject/go-apla\n```\n\n2. Copy the go-apla binary from the Go workspace to the destination directory (`/opt/apla/go-apla` in this example).\n\n```bash\n    cp $HOME/go/bin/go-apla /opt/apla/go-apla\n```\n\n## Configure the node\n\n1. Create the node configuration file:\n\n```bash\n    /opt/apla/go-apla/go-apla config \\\n        --dataDir=/opt/apla/go-apla/node1 \\\n        --dbName=apladb \\\n        --centSecret=\"CENT_SECRET\" --centUrl=http://10.10.99.1:8000 \\\n        --httpHost=10.10.99.1 \\\n        --httpPort=7079 \\\n        --tcpHost=10.10.99.1 \\\n        --tcpPort=7078\n```\n\n2. Generate node keys:\n\n```bash\n    /opt/apla/go-apla/go-apla generateKeys \\\n        --config=/opt/apla/go-apla/node1/config.toml\n```\n\n3. Genereate the first block. If you are creating your own blockchain network. you must use the `--test=true` option. Otherwise you will not be able to create new accounts.\n\n```bash\n    /opt/apla/go-apla/go-apla generateFirstBlock \\\n        --config=/opt/apla/go-apla/node1/config.toml \\\n        --test=true\n```\n\n4. Initialize the database.\n\n```bash\n\n    /opt/apla/go-apla/go-apla initDatabase \\\n        --config=/opt/apla/go-apla/node1/config.toml\n```\n\n# Starting go-apla\n\nTo start the first node backend, you must start two services: centrifugo and go-apla.\n\n1. Run centrifugo:\n\n```bash\n    /opt/apla/centrifugo/centrifugo \\\n        -a 10.10.99.1 -p 8000 \\\n        --config /opt/apla/centrifugo/config.json\n```\n\n2. Run go-apla:\n\n```bash\n    /opt/apla/go-apla/go-apla start \\\n        --config=/opt/apla/go-apla/node1/config.toml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAplaProject%2Fgo-apla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAplaProject%2Fgo-apla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAplaProject%2Fgo-apla/lists"}