[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10611":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":17,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":18,"lastSyncTime":35,"discoverSource":36},10611,"harmony","harmony-one\u002Fharmony","harmony-one","The core protocol of harmony","https:\u002F\u002Fharmony.one",null,"Go",1451,286,85,77,0,1,2,56.07,"GNU Lesser General Public License v3.0",false,"main",[24,25,26,27,5,28,29,30,31],"blockchain","bls","consensus","distributed-ledger-technology","harmony-protocol","pbft","proof-of-stake","sharding","2026-06-12 04:00:51","# Harmony\n\n[![Build Status](https:\u002F\u002Ftravis-ci.com\u002Fharmony-one\u002Fharmony.svg?branch=main)](https:\u002F\u002Ftravis-ci.com\u002Fharmony-one\u002Fharmony)\n![gopherbadger-tag-do-not-edit](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGo%20Coverage-45%25-brightgreen.svg?longCache=true&style=flat)\n![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F532383335348043777.svg)\n[![Github Action](https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fharmony\u002Factions\u002Fworkflows\u002Fci.yaml\u002Fbadge.svg?event=push)](https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fharmony\u002Factions\u002Fworkflows\u002Fci.yaml)\n[![Go Report Card](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Fharmony-one\u002Fharmony)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fharmony-one\u002Fharmony)\n\n## General Documentation\n\nhttps:\u002F\u002Fdocs.harmony.one\n\n## API Guide\n\nhttp:\u002F\u002Fapi.hmny.io\u002F\n\n## Requirements\n\n### **Go 1.24.2**\n### **GMP and OpenSSL**\n\nOn macOS:\n```bash\nbrew install gmp\nbrew install openssl\nsudo ln -sf \u002Fusr\u002Flocal\u002Fopt\u002Fopenssl@1.1 \u002Fusr\u002Flocal\u002Fopt\u002Fopenssl\n```\nOn Linux (Ubuntu):\n```bash\nsudo apt install libgmp-dev libssl-dev make gcc g++\n```\nOn Linux (Cent OS \u002F Amazon Linux 2):\n```bash\nsudo yum install glibc-static gmp-devel gmp-static openssl-libs openssl-static gcc-c++\n```\n\n### **Docker** (for testing)\n\nOn macOS:\n```bash\nbrew install --cask docker\nopen \u002FApplications\u002FDocker.app\n```\nOn Linux, reference official documentation [here](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002F).\n\n### **Bash 4+**\n\nFor macOS, you can reference this [guide](http:\u002F\u002Ftldrdevnotes.com\u002Fbash-upgrade-3-4-macos). For Linux, you can reference this [guide](https:\u002F\u002Ffossbytes.com\u002Finstalling-gnu-bash-4-4-linux-distros\u002F).\n\n### **Developer Tools for macOS**\n\nOn macOS, make sure you have the **Xcode Command Line Tools** installed. This includes essential tools like `git`, `make`, and other development utilities:\n```bash\nxcode-select --install\n```\n\n## Setting Up MCL & BLS Libraries on macOS\n\nThe Harmony project depends on the MCL (multi-curve library) and BLS (Boneh-Lynn-Shacham) cryptographic libraries. These need to be installed and configured before building the project.\n\n### Clone and Build MCL & BLS Repositories\nFirst, clone the MCL and BLS repositories:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fmcl.git\ngit clone https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fbls.git\n```\n\n### Update `.zshrc` for MCL and BLS Paths\n\nTo ensure the libraries are correctly located when building the project, you need to add the MCL and BLS library paths to your `.zshrc` file.\n\nAdd the following lines to your `.zshrc` (or `.bash_profile` for bash users):\n```bash\n# MCL & BLS paths for Harmony\nexport MCL_PATH=$GOPATH\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fmcl\nexport BLS_PATH=$GOPATH\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fbls\n\n# Add library paths for MCL and BLS\nexport CGO_CFLAGS=\"-I$MCL_PATH\u002Finclude -I$BLS_PATH\u002Finclude -I\u002Fopt\u002Fhomebrew\u002Fopt\u002Fopenssl@1.1\u002Finclude\"\nexport CGO_LDFLAGS=\"-L$MCL_PATH\u002Flib -L$BLS_PATH\u002Flib -L\u002Fopt\u002Fhomebrew\u002Fopt\u002Fopenssl@1.1\u002Flib\"\nexport LD_LIBRARY_PATH=$MCL_PATH\u002Flib:$BLS_PATH\u002Flib:\u002Fopt\u002Fhomebrew\u002Fopt\u002Fopenssl@1.1\u002Flib\nexport LIBRARY_PATH=$LD_LIBRARY_PATH\nexport DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH\n```\n\nThen, apply the changes by running:\n```bash\nsource ~\u002F.zshrc\n```\n\n## Dev Environment\n\n**Most repos from [harmony-one](https:\u002F\u002Fgithub.com\u002Fharmony-one) assume the GOPATH convention. More information [here](https:\u002F\u002Fgithub.com\u002Fgolang\u002Fgo\u002Fwiki\u002FGOPATH).**\n\n### First Install\nClone and set up all of the repos with the following set of commands:\n\n1. Create the appropriate directories:\n```bash\nmkdir -p $(go env GOPATH)\u002Fsrc\u002Fgithub.com\u002Fharmony-one\ncd $(go env GOPATH)\u002Fsrc\u002Fgithub.com\u002Fharmony-one\n```\n> If you get 'unknown command' or something along those lines, make sure to install [golang](https:\u002F\u002Fgolang.org\u002Fdoc\u002Finstall) first.\n\n2. Clone this repo & dependent repos.\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fmcl.git\ngit clone https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fbls.git\ngit clone https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fharmony.git\ncd harmony\n```\n\n3. Build the harmony binary & dependent libs\n```\ngo mod tidy\nmake\n```\n> Run `bash scripts\u002Finstall_build_tools.sh` to ensure build tools are of correct versions.\n> If you get 'missing go.sum entry for module providing package \u003Cpackage_name>', run `go mod tidy`.\n\n## Dev Docker Image\n\nIncluded in this repo is a Dockerfile that has a full harmony development environment and comes with emacs, vim, ag, tig, and other creature comforts. Most importantly, it already has the go environment with our C\u002FC++ based library dependencies (`libbls` and `mcl`) set up correctly for you.\n\nYou can build the docker image for yourself with the following commands:\n```bash\ncd $(go env GOPATH)\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fharmony\nmake clean\ndocker build -t harmony .\n```\n> If your build machine has an ARM-based chip, like Apple silicon (M1), the image is built for `linux\u002Farm64` by default. To build for `x86_64`, apply the `--platform` arg like so:\n> ```bash\n> docker build --platform linux\u002Famd64 -t harmony .\n> ```\n> Learn more about the `--platform` arg and multi-CPU architecture support, [here](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Freference\u002Fbuilder\u002F#automatic-platform-args-in-the-global-scope) and [here](https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002Fmulti-arch\u002F).\n\nThen you can start your docker container with the following command:\n```bash\ndocker run --rm --name harmony -it -v \"$(go env GOPATH)\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fharmony:\u002Froot\u002Fgo\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fharmony\" harmony \u002Fbin\u002Fbash\n```\n> Note that the harmony repo will be shared between your docker container and your host machine. However, everything else in the docker container will be ephemeral.\n\nIf you need to open another shell, just do:\n```bash\ndocker exec -it harmony \u002Fbin\u002Fbash\n```\n\nLearn more about docker [here](https:\u002F\u002Fdocker-curriculum.com\u002F).\n\n## Build\n\nThe `make` command should automatically build the Harmony binary & all dependent libs.\n\nHowever, if you wish to bypass the Makefile, first export the build flags:\n```bash\nexport CGO_CFLAGS=\"-I$GOPATH\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fbls\u002Finclude -I$GOPATH\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fmcl\u002Finclude -I\u002Fopt\u002Fhomebrew\u002Fopt\u002Fopenssl@1.1\u002Finclude\"\nexport CGO_LDFLAGS=\"-L$GOPATH\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fbls\u002Flib -L\u002Fopt\u002Fhomebrew\u002Fopt\u002Fopenssl@1.1\u002Flib\"\nexport LD_LIBRARY_PATH=$GOPATH\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fbls\u002Flib:$GOPATH\u002Fsrc\u002Fgithub.com\u002Fharmony-one\u002Fmcl\u002Flib:\u002Fopt\u002Fhomebrew\u002Fopt\u002Fopenssl@1.1\u002Flib\nexport LIBRARY_PATH=$LD_LIBRARY_PATH\nexport DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH\nexport GO111MODULE=on\n```\n\nThen you can build all executables with the following command:\n```bash\nbash .\u002Fscripts\u002Fgo_executable_build.sh -S\n```\n> Reference `bash .\u002Fscripts\u002Fgo_executable_build.sh -h` for more build options\n\n## Debugging\n\nOne can start a local network (a.k.a localnet) with your current code using the following command:\n```bash\nmake debug\n```\n> This localnet has 2 shards, with 11 nodes on shard 0 (+1 explorer node) and 10 nodes on shard 0 (+1 explorer node).\n>\n> The shard 0 endpoint will be on the explorer at `http:\u002F\u002Flocalhost:9599`. The shard 1 endpoint will be on the explorer at `http:\u002F\u002Flocalhost:9598`.\n>\n> You can view the localnet configuration at `\u002Ftest\u002Fconfigs\u002Flocal-resharding.txt`. The fields for the config are (space-delimited & in order) `ip`, `port`, `mode`, `bls_pub_key`, and `shard` (optional).\n\nOne can force kill the local network with the following command:\n```bash\nmake debug-kill\n```\n> You can view all make commands with `make help`\n\n## Testing\n\nTo keep things consistent, we have a docker image to run all tests. **These are the same tests ran on the pull request checks**.\n\nNote that all test Docker containers bind several ports to the host machine for your convenience. The ports are:\n* `9500` - Shard 0 RPC for a validator\n* `9501` - Shard 1 RPC for a validator\n* `9599` - Shard 0 RPC for an explorer\n* `9598` - Shard 1 RPC for an explorer\n* `9799` - Shard 0 Rosetta (for an explorer)\n* `9798` - Shard 1 Rosetta (for an explorer)\n* `9899` - Shard 0 WS for an explorer\n* `9898` - Shard 1 WS for an explorer\n> This allows you to use curl, hmy CLI, postman, rosetta-cli, etc... on your host machine to play with or probe the localnet that was used for the test.\n\n### Go tests\nTo run this test, do:\n```bash\nmake test-go\n```\nThis test runs the go tests along with go lint, go fmt, go imports, go mod, and go generate checks.\n\n### RPC tests\nTo run this test, do:\n```bash\nmake test-rpc\n```\nThis test starts a localnet (within the Docker container), **ensures it reaches a consensus**, and runs a series of tests to ensure correct RPC behavior.\nThis test also acts as a preliminary integration test (more thorough tests are done on the testnets).\n> The tests ran by this command can be found [here](https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fharmony-test\u002Ftree\u002Fmaster\u002Flocalnet).\n\nIf you wish to debug further with the localnet after the tests are done, open a new shell and run:\n```bash\nmake test-rpc-attach\n```\n> This will open a shell in the docker container that is running the Node API tests.\n>\n> Note that the docker container has the [Harmony CLI](https:\u002F\u002Fdocs.harmony.one\u002Fhome\u002Fwallets\u002Fharmony-cli) on path,\n> therefore you can use that to debug if needed. For example, one could do `hmy blockchain latest-headers` to check\n> the current block height of localnet. Reference the documentation for the CLI [here](https:\u002F\u002Fdocs.harmony.one\u002Fhome\u002Fwallets\u002Fharmony-cli)\n> for more details & commands.\n\n### Rosetta tests\nTo run this test, do:\n```bash\nmake test-rosetta\n```\nThis test starts a localnet (within the Docker container), **ensures it reaches a consensus**, and runs the Construction & Data API checks using the [rosetta-cli](https:\u002F\u002Fgithub.com\u002Fcoinbase\u002Frosetta-cli).\nThis test also acts as a preliminary integration test (more thorough tests are done on the testnets).\n> The config for this test can be found [here](https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fharmony-test\u002Fblob\u002Fmaster\u002Flocalnet\u002Fconfigs\u002Flocalnet_rosetta_test_s0.json) & [here](https:\u002F\u002Fgithub.com\u002Fharmony-one\u002Fharmony-test\u002Fblob\u002Fmaster\u002Flocalnet\u002Fconfigs\u002Flocalnet_rosetta_test_s1.json)\n\nSimilar to the RPC tests, if you wish to debug further with the localnet after the tests are done, open a new shell and run:\n```bash\nmake test-rosetta-attach\n```\n\n## License\n\nHarmony is licensed under GNU Lesser General Public License v3.0. See [`LICENSE`](LICENSE) file for the terms and conditions.\n\nHarmony includes third-party open-source code. In general, a source subtree with a `LICENSE` or `COPYRIGHT` file is from a third party, and our modifications thereto are licensed under the same third-party open source license.\n\nAlso please see [our Fiduciary License Agreement](FLA.md) if you are\ncontributing to the project. By your submission of your contribution to us, you\nand we mutually agree to the terms and conditions of the agreement.\n\n## Contributing To Harmony\n\nSee [`CONTRIBUTING`](CONTRIBUTING.md) for details.\n\n## Development Status\n\n### Finished Features\n\n- Fully sharded network with beacon chain and shard chains\n- Sharded P2P network and P2P gossiping\n- FBFT (Fast Byzantine Fault Tolerance) Consensus with BLS multi-signature\n- Consensus view-change protocol\n- Account model and support for Solidity\n- Cross-shard transaction\n- VRF (Verifiable Random Function) and VDF (Verifiable Delay Function)\n- Cross-links\n- EPoS staking mechanism\n- Kademlia routing\n\n### Planned Features\n\n- Resharding\n- Integration with WASM\n- Fast state synchronization\n- Auditable privacy asset using ZK proof\n\n","Harmony是一个核心区块链协议，旨在通过分片技术和高效的共识算法提供快速且安全的交易处理。它采用了Go语言编写，并结合了BLS签名、PBFT（实用拜占庭容错）和权益证明（Proof of Stake, PoS）等技术特点，以实现高吞吐量和低延迟的分布式账本技术。此外，Harmony还支持智能合约功能，使其成为构建去中心化应用的理想平台。适用于需要高性能区块链解决方案的场景，如金融交易、供应链管理以及任何需要透明度与安全性的数据交换领域。","2026-06-11 03:29:21","top_topic"]