{"id":13565747,"url":"https://github.com/terra-money/classic-core","last_synced_at":"2025-05-15T07:17:31.719Z","repository":{"id":37243825,"uuid":"158107419","full_name":"terra-money/classic-core","owner":"terra-money","description":"GO implementation of the Terra Protocol ","archived":false,"fork":false,"pushed_at":"2023-11-20T08:18:21.000Z","size":113590,"stargazers_count":977,"open_issues_count":4,"forks_count":285,"subscribers_count":89,"default_branch":"main","last_synced_at":"2025-04-03T23:32:53.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.terra.money","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terra-money.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-11-18T17:11:47.000Z","updated_at":"2025-03-30T06:34:32.000Z","dependencies_parsed_at":"2023-11-20T09:44:19.858Z","dependency_job_id":null,"html_url":"https://github.com/terra-money/classic-core","commit_stats":{"total_commits":716,"total_committers":41,"mean_commits":"17.463414634146343","dds":0.5432960893854748,"last_synced_commit":"1a3395dcfeb702a1d52cbf178e98cfe2bc958820"},"previous_names":["terra-project/terra"],"tags_count":107,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terra-money%2Fclassic-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terra-money%2Fclassic-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terra-money%2Fclassic-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terra-money%2Fclassic-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terra-money","download_url":"https://codeload.github.com/terra-money/classic-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292078,"owners_count":22046428,"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":[],"created_at":"2024-08-01T13:01:54.549Z","updated_at":"2025-05-15T07:17:31.691Z","avatar_url":"https://github.com/terra-money.png","language":"JavaScript","funding_links":[],"categories":["Others","JavaScript"],"sub_categories":[],"readme":"## What is Terra Classic?\n\n**[Terra](https://terra.money)** is a public, open-source blockchain protocol that provides fundamental infrastructure for a decentralized economy and enables open participation in the creation of new financial primitives to power the innovation of money.\n\n\n**Classic** is the reference implementation of the Terra protocol, written in Golang. Terra Core is built atop [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) and uses [Tendermint](https://github.com/tendermint/tendermint) BFT consensus. If you intend to work on Terra Core source, it is recommended that you familiarize yourself with the concepts in those projects.\n\nUpon the implosion of Terra, a group of rebels seized control of the blockchain.  Terra's future is uncertain, but the rebels are now firmly in control. \n\n## Installation\n\n### Binaries\n\nThe easiest way to get started is by downloading a pre-built binary for your operating system. You can find the latest binaries on the [releases](https://github.com/classic-terra/core/releases) page.\n\n### From Source\n\n**Step 1. Install Golang**\n\nGo v1.18 is required for Terra Core.\n\nIf you haven't already, install Golang by following the [official docs](https://golang.org/doc/install). Make sure that your `GOPATH` and `GOBIN` environment variables are properly set up.\n\n**Step 2: Get Terra Core source code**\n\nUse `git` to retrieve Terra Core from the [official repo](https://github.com/terra-money/core/) and checkout the `main` branch. This branch contains the latest stable release, which will install the `terrad` binary.\n\n```bash\ngit clone https://github.com/classic-terra/core/\ncd core\ngit checkout main\n```\n\n**Step 3: Build Terra core**\n\nRun the following command to install the executable `terrad` to your `GOPATH` and build Terra Core. `terrad` is the node daemon and CLI for interacting with a Terra node.\n\n```bash\n# COSMOS_BUILD_OPTIONS=rocksdb make install\nmake install\n```\n\n**Step 4: Verify your installation**\n\nVerify that you've installed terrad successfully by running the following command:\n\n```bash\nterrad version --long\n```\n\nIf terrad is installed correctly, the following information is returned:\n\n```bash\nname: terra\nserver_name: terrad\nversion: 1.0.5\ncommit: 8bb56e9919ecf5234a3239a6a351b509451f9d5d\nbuild_tags: netgo,ledger\ngo: go version go1.18.1 linux/amd64\n```\n\n## `terrad`\n\n**NOTE:** `terracli` has been deprecated and all of its functionalities have been merged into `terrad`.\n\n`terrad` is the all-in-one command for operating and interacting with a running Terra node. For comprehensive coverage on each of the available functions, see [the terrad reference information](https://docs.terra.money/docs/develop/how-to/terrad/README.html). To view various subcommands and their expected arguments, use the `$ terrad --help` command:\n\n\u003cpre\u003e\n        \u003cdiv align=\"left\"\u003e\n        \u003cb\u003e$ terrad --help\u003c/b\u003e\n\n        Stargate Terra App\n\n        Usage:\n          terrad [command]\n\n        Available Commands:\n          add-genesis-account Add a genesis account to genesis.json\n          collect-gentxs      Collect genesis txs and output a genesis.json file\n          debug               Tool for helping with debugging your application\n          export              Export state to JSON\n          gentx               Generate a genesis tx carrying a self delegation\n          help                Help about any command\n          init                Initialize private validator, p2p, genesis, and application configuration files\n          keys                Manage your application's keys\n          migrate             Migrate genesis to a specified target version\n          query               Querying subcommands\n          rosetta             spin up a rosetta server\n          start               Run the full node\n          status              Query remote node for status\n          tendermint          Tendermint subcommands\n          testnet             Initialize files for a terrad testnet\n          tx                  Transactions subcommands\n          unsafe-reset-all    Resets the blockchain database, removes address book files, and resets data/priv_validator_state.json to the genesis state\n          validate-genesis    validates the genesis file at the default location or at the location passed as an arg\n          version             Print the application binary version information\n\n        Flags:\n          -h, --help                help for terrad\n              --home string         directory for config and data (default \"/Users/$HOME/.terra\")\n              --log_format string   The logging format (json|plain) (default \"plain\")\n              --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default \"info\")\n              --trace               print out full stack trace on errors\n\n        \u003cb\u003eUse \"terrad [command] --help\" for more information about a command.\u003c/b\u003e\n        \u003c/div\u003e\n\u003c/pre\u003e\n\n## Node Setup\n\nOnce you have `terrad` installed, you will need to set up your node to be part of the network.\n\n### Join the mainnet\n\nThe following requirements are recommended for running a `columbus-5` mainnet node:\n\n- **4 or more** CPU cores\n- At least **2TB** of disk storage\n- At least **100mbps** network bandwidth\n- An Linux distribution\n\nFor configuration and migration instructions for setting up a Columbus-5 mainnet node, visit [The mainnet repo](https://github.com/terra-money/mainnet).\n\n**Terra Node Quick Start**\n```\nterrad init nodename\nwget -O ~/.terra/config/genesis.json https://cloudflare-ipfs.com/ipfs/QmZAMcdu85Qr8saFuNpL9VaxVqqLGWNAs72RVFhchL9jWs\ncurl https://network.terra.dev/addrbook.json \u003e ~/.terrad/config/addrbook.json\nterrad start\n```\n\n### Join a testnet\n\nSeveral testnets might exist simultaneously. Ensure that your version of `terrad` is compatible with the network you want to join.\n\nTo set up a node on the latest testnet, visit [the testnet repo](https://github.com/terra-money/testnet).\n\n### Run a local testnet\n\nThe easiest way to set up a local testing environment is to run [LocalTerra](https://github.com/terra-money/LocalTerra), which automatically orchestrates a complete testing environment suited for development with zero configuration.\n\n### Run a single node testnet\n\nYou can also run a local testnet using a single node. On a local testnet, you will be the sole validator signing blocks.\n\n\n**Step 1. Create network and account**\n\nFirst, initialize your genesis file to bootstrap your network. Create a name for your local testnet and provide a moniker to refer to your node:\n\n```bash\nterrad init --chain-id=\u003ctestnet_name\u003e \u003cnode_moniker\u003e\n```\n\nNext, create a Terra account by running the following command:\n\n```bash\nterrad keys add \u003caccount_name\u003e\n```\n\n**Step 2. Add account to genesis**\n\nNext, add your account to genesis and set an initial balance to start. Run the following commands to add your account and set the initial balance:\n\n```bash\nterrad add-genesis-account $(terrad keys show \u003caccount_name\u003e -a) 100000000uluna,1000usd\nterrad gentx \u003caccount_name\u003e 10000000uluna --chain-id=\u003ctestnet_name\u003e\nterrad collect-gentxs\n```\n\n**Step 3. Run Terra daemon**\n\nNow you can start your private Terra network:\n\n```bash\nterrad start\n```\n\nYour `terrad` node will be running a node on `tcp://localhost:26656`, listening for incoming transactions and signing blocks.\n\nCongratulations, you've successfully set up your local Terra network!\n\n## Set up a production environment\n\n**NOTE**: This guide only covers general settings for a production-level full node. You can find further details on considerations for operating a validator node by visiting the [Terra validator guide](https://docs.terra.money/docs/full-node/manage-a-terra-validator/README.html).\n\nThis guide has been tested against Linux distributions only. To ensure you successfully set up your production environment, consider setting it up on an Linux system.\n\n### Increase maximum open files\n\n`terrad` can't open more than 1024 files (the default maximum) concurrently.\n\nYou can increase this limit by modifying `/etc/security/limits.conf` and raising the `nofile` capability.\n\n```\n*                soft    nofile          65535\n*                hard    nofile          65535\n```\n\n### Create a dedicated user\n\nIt is recommended that you run `terrad` as a normal user. Super-user accounts are only recommended during setup to create and modify files.\n\n### Port configuration\n\n`terrad` uses several TCP ports for different purposes.\n\n- `26656`: The default port for the P2P protocol. Use this port to communicate with other nodes. While this port must be open to join a network, it does not have to be open to the public. Validator nodes should configure `persistent_peers` and close this port to the public.\n\n- `26657`: The default port for the RPC protocol. This port is used for querying / sending transactions and must be open to serve queries from `terrad`. **DO NOT** open this port to the public unless you are planning to run a public node.\n\n- `1317`: The default port for [Lite Client Daemon](https://docs.terra.money/docs/develop/how-to/start-lcd.html) (LCD), which can be enabled in `~/.terra/config/app.toml`. The LCD provides an HTTP RESTful API layer to allow applications and services to interact with your `terrad` instance through RPC. Check the [Terra REST API](https://lcd.terra.dev/swagger/#/) for usage examples. Don't open this port unless you need to use the LCD.\n\n- `26660`: The default port for interacting with the [Prometheus](https://prometheus.io) database. You can use Promethues to monitor an environment. This port is closed by default.\n\n### Run the server as a daemon\n\n**Important**:\n\nKeep `terrad` running at all times. The simplest solution is to register `terrad` as a `systemd` service so that it automatically starts after system reboots and other events.\n\n\n### Register terrad as a service\n\nFirst, create a service definition file in `/etc/systemd/system`.\n\n**Sample file: `/etc/systemd/system/terrad.service`**\n\n```\n[Unit]\nDescription=Terra Daemon\nAfter=network.target\n\n[Service]\nType=simple\nUser=terra\nExecStart=/data/terra/go/bin/terrad start\nRestart=on-abort\n\n[Install]\nWantedBy=multi-user.target\n\n[Service]\nLimitNOFILE=65535\n```\n\nModify the `Service` section from the given sample above to suit your settings.\nNote that even if you raised the number of open files for a process, you still need to include `LimitNOFILE`.\n\nAfter creating a service definition file, you should execute `systemctl daemon-reload`.\n\n### Start, stop, or restart service\n\nUse `systemctl` to control (start, stop, restart)\n\n```bash\n# Start\nsystemctl start terrad\n# Stop\nsystemctl stop terrad\n# Restart\nsystemctl restart terrad\n```\n\n### Access logs\n\n```bash\n# Entire log\njournalctl -t terrad\n# Entire log reversed\njournalctl -t terrad -r\n# Latest and continuous\njournalctl -t terrad -f\n```\n\n## Using `docker-compose`\n\n1. Install Docker\n\n\t- [Docker Install documentation](https://docs.docker.com/install/)\n\t- [Docker-Compose Install documentation](https://docs.docker.com/compose/install/)\n\n2. Create a new folder on your local machine and copy docker-compose\\docker-compose.yml\n\n3. Review the docker-compose.yml contents\n\n4. Bring up your stack by running\n\n\t```bash\n\tdocker-compose up -d\n\t```\n\n5. Add your wallet\n    ```bash\n\tdocker-compose exec node sh /keys-add.sh\n\t```\n\n6. Copy your terra wallet address and go to the terra faucet here -\u003e http://45.79.139.229:3000/ Put your address in and give yourself luna coins.\n\n7. Start the validator\n\t```bash\n\tdocker-compose exec node sh /create-validator.sh\n\t```\n\n### Cheat Sheet:\n\n#### Start\n\n```bash\ndocker-compose up -d\n```\n\n#### Stop\n\n```bash\ndocker-compose down\n```\n\n#### View Logs\n\n```bash\ndocker-compose logs -f\n```\n\n#### Run Terrad Commands Example\n\n```bash\ndocker-compose exec node terrad status\n```\n\n#### Upgrade\n\n```bash\ndocker-compose down\ndocker-compose pull\ndocker-compose up -d\n```\n\n#### Build from source\n\n```sh\nmake build-all -f contrib/terra-operator/Makefile\n```\n\n## Resources\n\n- Developer Tools\n\n  - Terra developer documentation(https://docs.terra.money)\n  - [TerraWiki.org](https://terrawiki.org) - The Terra community wiki.\n  - SDKs\n    - [Terra.js](https://www.github.com/terra-money/terra.js) for JavaScript\n    - [terra-sdk-python](https://www.github.com/terra-money/terra-sdk-python) for Python\n  - [Faucet](https://faucet.terra.money) can be used to get tokens for testnets\n  - [LocalTerra](https://www.github.com/terra-money/LocalTerra) can be used to set up a private local testnet with configurable world state\n\n- Developer Forums\n  - [Terra Developer Discord](https://discord.com/channels/464241079042965516/591812948867940362)\n  - [Terra DEveloper Telegram room](https://t.me/+gCxCPohmVBkyNDRl)\n\n\n- Block Explorers\n\n  - [Terra Finder](https://finder.terra.money) - Terra's basic block explorer.\n  - [Terrascope](https://terrascope.info/) - A community-run block explorer with extra features.\n  - [Stake ID](https://terra.stake.id) - A block explorer made by Staking Fund\n  - [Hubble](https://hubble.figment.network/terra/chains/columbus-5) - by Figment\n\n- Wallets\n\n  - [Terra Station](https://station.terra.money) - The official Terra wallet.\n  - Terra Station Mobile\n    - [iOS](https://apps.apple.com/us/app/terra-station/id1548434735)\n    - [Android](https://play.google.com/store/apps/details?id=money.terra.station\u0026hl=en_US\u0026gl=US)\n    \n  - [Falcon Wallet](https://falconwallet.app/)\n  - [Leap Wallet](https://chrome.google.com/webstore/detail/leap-wallet/aijcbedoijmgnlmjeegjaglmepbmpkpi/?utm_source=Leap\u0026utm_medium=Bio\u0026utm_campaign=Leap)\n  - [XDeFi](https://chrome.google.com/webstore/detail/xdefi-wallet/hmeobnfnfcmdkdcmlblgagmfpfboieaf)\n  - [Liquality](https://liquality.io/)\n\n- Research\n\n  - [Agora](https://agora.terra.money) - Research forum\n  - [White Paper](https://assets.website-files.com/611153e7af981472d8da199c/618b02d13e938ae1f8ad1e45_Terra_White_paper.pdf)\n\n## Community\n\n- [Offical Website](https://terra.money)\n- [Discord](https://discord.gg/e29HWwC2Mz)\n- [Telegram](https://t.me/terra_announcements)\n- [Twitter](https://twitter.com/terra_money)\n- [YouTube](https://goo.gl/3G4T1z)\n\n## Contributing\n\nIf you are interested in contributing to Terra Core source, please review our [code of conduct](./CODE_OF_CONDUCT.md).\n\n## License\n\nThis software is licensed under the Apache 2.0 license. Read more about it [here](LICENSE).\n\n© 2022 Terraform Labs, PTE LTD\n\n\u003chr/\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://terra.money/\"\u003e\u003cimg src=\"https://assets.website-files.com/611153e7af981472d8da199c/61794f2b6b1c7a1cb9444489_symbol-terra-blue.svg\" align=\"center\" width=200/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003e\u003cem\u003ePowering the innovation of money.\u003c/em\u003e\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterra-money%2Fclassic-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterra-money%2Fclassic-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterra-money%2Fclassic-core/lists"}