{"id":15035210,"url":"https://github.com/palletone/go-palletone","last_synced_at":"2025-04-09T23:12:07.681Z","repository":{"id":48406814,"uuid":"139103430","full_name":"palletone/go-palletone","owner":"palletone","description":"Official Go implementation of PalletOne","archived":false,"fork":false,"pushed_at":"2023-02-25T00:34:58.000Z","size":254287,"stargazers_count":86,"open_issues_count":9,"forks_count":24,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-09T23:11:55.247Z","etag":null,"topics":["blockchain","crosschain","go","palletone"],"latest_commit_sha":null,"homepage":"https://pallet.one","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palletone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-29T05:09:54.000Z","updated_at":"2024-05-30T22:28:28.000Z","dependencies_parsed_at":"2024-06-18T18:41:47.069Z","dependency_job_id":"afda1d96-b510-4af1-b27d-a311cbded1b5","html_url":"https://github.com/palletone/go-palletone","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palletone%2Fgo-palletone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palletone%2Fgo-palletone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palletone%2Fgo-palletone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palletone%2Fgo-palletone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palletone","download_url":"https://codeload.github.com/palletone/go-palletone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125589,"owners_count":21051770,"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","crosschain","go","palletone"],"created_at":"2024-09-24T20:27:50.564Z","updated_at":"2025-04-09T23:12:07.656Z","avatar_url":"https://github.com/palletone.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Go PalletOne\n\nOfficial golang implementation of the palletone protocol.\n\n[![Build Status](https://travis-ci.org/palletone/go-palletone.svg?branch=master)](https://travis-ci.org/palletone/go-palletone)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/47ccb5f4718d4e80963f70159c16c913)](https://app.codacy.com/app/palletonedev/go-palletone?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=palletone/go-palletone\u0026utm_campaign=badger)\n[![Coverage Status](https://coveralls.io/repos/github/palletone/go-palletone/badge.svg?branch=master)](https://coveralls.io/github/palletone/go-palletone?branch=master)\n[![Build status](https://github.com/palletone/go-palletone/workflows/UT\u0026Lint/badge.svg)](https://github.com/palletone/go-palletone/actions)\n[![version](https://img.shields.io/github/tag/palletone/go-palletone.svg)](https://github.com/palletone/go-palletone/releases/latest)\n\n## Building the source\n\nFor prerequisites and detailed build instructions please read the\n[Installation Instructions](https://github.com/palletone/go-palletone/wiki/Building-palletone)\non the wiki.\n\nBuilding gptn requires both a Go (version 1.12 or later) and a C compiler.\nYou can install them using your favourite package manager.\nset GO111MODULE:\n\n```bash\nexport GO111MODULE=on\n```\n\nOnce the dependencies are installed, run\n\n```bash\nmake gptn\n```\n\nor, to build the full suite of utilities:\n\n```bash\nmake all\n```\n\nbut, to build the full suite of utilities in window,you should:\n\n```bash\ngo get ./...\ngo get -u ./...\ngo build\n```\n\n## Executables\n\nThe go-palletone project comes with several wrappers/executables found in the `cmd` directory.\n\n| Command    | Description |\n|:----------:|-------------|\n| **`gptn`** | Our main palletone CLI client. It is the entry point into the palletone network (main-, test- or private net), capable of running as a full node (default) archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the palletone network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `gptn --help` and the [CLI Wiki page](https://github.com/palletone/go-palletone/wiki/Command-Line-Options) for command line options. |\n\n## Running gptn\n\nGoing through all the possible command line flags is out of scope here (please consult our\n[CLI Wiki page](https://github.com/palletone/go-palletone/wiki/Command-Line-Options)), but we've\nenumerated a few common parameter combos to get you up to speed quickly on how you can run your\nown Gptn instance.\n\n### Full node on the main palletone network\n\nBy far the most common scenario is people wanting to simply interact with the palletone network:\ncreate accounts; transfer funds; deploy and interact with contracts. For this particular use-case\nthe user doesn't care about years-old historical data, so we can fast-sync quickly to the current\nstate of the network. To do so:\n\n```bash\n$ mkdir your_dir\n$ gptn --datadir=\"your_dir\" newgenesis path/to/your-genesis.json\n$ gptn --datadir=\"your_dir\" init path/to/your-genesis.json\n$ gptn --datadir=\"your_dir\" --configfile /path/to/your_config.toml\n```\n\nThis command will:\n\n * Start gptn in fast sync mode (default, can be changed with the `--syncmode` flag), causing it to\n   download more data in exchange for avoiding processing the entire history of the palletone network,\n   which is very CPU intensive.\n * Start up Gptn's built-in interactive [JavaScript console](https://github.com/palletone/go-palletone/wiki/JavaScript-Console),\n   (via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/palletone/wiki/wiki/JavaScript-API)\n   as well as Gptn's own [management APIs](https://github.com/palletone/go-palletone/wiki/Management-APIs).\n   This too is optional and if you leave it out you can always attach to an already running Gptn instance\n   with `gptn attach`.\n\n\n### Configuration\n\nAs an alternative to passing the numerous flags to the `gptn` binary, you can also pass a configuration file via:\n\n```bash\n$ gptn --configfile /path/to/your_config.toml\n```\n\nTo get a template configuration file you can use the `dumpconfig` subcommand to export current default configurations:\n\n```bash\n$ gptn dumpconfig /path/to/your_config.toml\n```\n\nOpen the ` /path/to/your_config.toml ` file in your favorite text editor, and set the field values what you want to change, uncommenting them if necessary.\n\n### Operating a private network\n\nMaintaining your own private network is more involved as a lot of configurations taken for granted in\nthe official networks need to be manually set up.\n\n#### Defining the private genesis state\n\nFirst, you'll need to create the genesis state of your networks, which all nodes need to be aware of and agree upon. This consists of a JSON file (e.g. call it `genesis.json`):\n\nYou can create a JSON file for the genesis state of a new chain with an existing account or a newly created account named `your-genesis.json` by running this command:\n\n```bash\n$ gptn newgenesis path/to/your-genesis.json\n```\n\n#### Defining the private mediator parameters\n\nFirst, you'll need to create the mediator parameters of your networks, which all nodes need to be aware of and agree upon. This consists of a TOML file (e.g. call it `palletone.toml`):\n\n```bash\n[MediatorPlugin]\nEnableProducing = true\nEnableStaleProduction = true\nEnableConsecutiveProduction = false\n\n[[MediatorPlugin.Mediators]]\nAddress = \"\"\nPassword = \"\"\nInitPrivKey = \"\"\nInitPubKey = \"\"\n```\n\nGet InitPrivKey and InitPubKey with the following command\n\n```bash\n$ gptn mediator initdks\n```\n\nInitPrivKey = private key, InitPubKey = public key\n\nWhen running command `gptn --datadir=\"your_dir\" newgenesis` will create Address and input your password.\n\n##### Customization of the genesis file\n\nIf you want to customize the network’s genesis state, edit the newly created your-genesis.json file. This allows you to control things such as:\n\n* The initial values of chain parameters\n* Assets and their initial distribution\n\nWith the genesis state defined in the above JSON file, you'll need to initialize **every** Gptn node with it prior to starting it up to ensure all blockchain parameters are correctly set:\n\n```bash\n$ gptn init path/to/your-genesis.json\n```\n\n## Contribution\n\nThank you for considering to help out with the source code! We welcome contributions from\nanyone on the internet, and are grateful for even the smallest of fixes!\n\nIf you'd like to contribute to go-palletone, please fork, fix, commit and send a pull request\nfor the maintainers to review and merge into the main code base. If you wish to submit more\ncomplex changes though, please check up with the core devs first on [our gitter channel](https://gitter.im/palletone/go-palletone)\nto ensure those changes are in line with the general philosophy of the project and/or get some\nearly feedback which can make both your efforts much lighter as well as our review and merge\nprocedures quick and simple.\n\nPlease make sure your contributions adhere to our coding guidelines:\n\n * Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).\n * Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.\n * Pull requests need to be based on and opened against the `master` branch.\n * Commit messages should be prefixed with the package(s) they modify.\n   * E.g. \"ptn, rpc: make trace configs optional\"\n\nPlease see the [Developers' Guide](https://github.com/palletone/go-palletone/wiki/Developers'-Guide)\nfor more details on configuring your environment, managing project dependencies and testing procedures.\n\n## License\n\nThe go-palletone binaries (i.e. all code inside of the `cmd` directory) is licensed under the\n[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also included\nin our repository in the `COPYING` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalletone%2Fgo-palletone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalletone%2Fgo-palletone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalletone%2Fgo-palletone/lists"}