{"id":13430030,"url":"https://github.com/celo-org/celo-blockchain","last_synced_at":"2025-08-08T05:20:01.932Z","repository":{"id":37431191,"uuid":"126412552","full_name":"celo-org/celo-blockchain","owner":"celo-org","description":"Previous official repository for the golang Celo Blockchain, for current see op-geth","archived":false,"fork":false,"pushed_at":"2025-05-14T15:59:07.000Z","size":557478,"stargazers_count":592,"open_issues_count":1,"forks_count":217,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-07-29T05:47:00.568Z","etag":null,"topics":["blockchain","celo","hacktoberfest","web3"],"latest_commit_sha":null,"homepage":"https://celo.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/celo-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-23T00:51:51.000Z","updated_at":"2025-06-28T08:05:54.000Z","dependencies_parsed_at":"2023-09-25T18:11:21.485Z","dependency_job_id":"ceee0b1f-5a9b-4c82-9b01-5699f12a8feb","html_url":"https://github.com/celo-org/celo-blockchain","commit_stats":{"total_commits":11609,"total_committers":742,"mean_commits":15.6455525606469,"dds":0.7693169092945129,"last_synced_commit":"06eee2c5784b57105ae10c384d8a52a553a7aa12"},"previous_names":[],"tags_count":237,"template":false,"template_full_name":null,"purl":"pkg:github/celo-org/celo-blockchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fcelo-blockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fcelo-blockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fcelo-blockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fcelo-blockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/celo-org","download_url":"https://codeload.github.com/celo-org/celo-blockchain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fcelo-blockchain/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269367128,"owners_count":24405330,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","celo","hacktoberfest","web3"],"created_at":"2024-07-31T02:00:49.366Z","updated_at":"2025-08-08T05:20:01.912Z","avatar_url":"https://github.com/celo-org.png","language":"Go","funding_links":[],"categories":["Move-Powered Blockchains","Go","Others"],"sub_categories":[],"readme":"## Celo Blockchain\n\n\u003e [!IMPORTANT]\n\u003e celo-blockchain is in maintainance mode and will only be updated for critical issues. Do not use it for new projects and please migrate to the [op-geth](https://github.com/celo-org/op-geth/) implementation.\n\n\nOfficial golang implementation of the Celo blockchain, based off of the [official golang implementation of the Ethereum protocol](https://github.com/ethereum/go-ethereum).\n\n[![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://chat.celo.org)\n\nPrebuilt [Docker](https://en.wikipedia.org/wiki/Docker_\\(software\\)) images are available for immediate use: [us.gcr.io/celo-org/geth](https://us.gcr.io/celo-org/geth). See [docs.celo.org/getting-started](https://docs.celo.org/getting-started/choosing-a-network) for a guide to the Celo networks and how to get started.\n\nDocumentation for Celo more generally can be found at [docs.celo.org](https://docs.celo.org/)\n\nMost functionality of this client is similar to `go-ethereum`, also known as `geth`, from which it was forked. If you do not find your question answered by Celo-specific documentation, try searching the [geth wiki](https://github.com/ethereum/go-ethereum/wiki).\n\n## Building the source\n\nBuilding `geth` requires both Go (min version 1.19) and a C compiler.\nYou can install them using your favourite package manager. Once the dependencies are installed, run\n\n```shell\nmake geth\n```\n\nor, to build the full suite of utilities:\n\n```shell\nmake all\n```\n\n### Mobile Clients\n\nThere are two different commands in the `Makefile` to build the `ios` and the `android` clients.\n\n```shell\nmake ios\n```\n\nand\n\n```shell\nmake android\n```\n\nNote: The `android` command it applies a git patch (`patches/mobileLibsForBuild.patch`) required to swap some libs from the `go.mod` for the client to work, installs those libs, builds the client, and then reverts the patch.\n\n## Executables\n\nThe Celo blockchain client comes with several wrappers/executables found in the `cmd` directory.\n\n| Command    | Description |\n|:----------:|-------------|\n| **`geth`** | The main Celo Blockchain client. It is the entry point into the Celo network, capable of running as a full node (default), archive node (retaining all historical state), light node (retrieving data live), or lightest node (retrieving minimum number of block headers to verify existing validator set). It can be used by other processes as a gateway into the Celo network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [Ethereum CLI Wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) for command line options. |\n| `abigen` | Source code generator to convert Celo contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) with expanded functionality if the contract bytecode is also available. However it also accepts Solidity source files, making development much more streamlined. Please see [Ethereum's Native DApps](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) wiki page for details. |\n| `bootnode` | Stripped down version of the Celo client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. |\n| `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug run`). |\n| `gethrpctest` | Developer utility tool to support the [ethereum/rpc-test](https://github.com/ethereum/rpc-tests) test suite which validates baseline conformity to the [Ethereum JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) specs. Please see the [ethereum test suite's readme](https://github.com/ethereum/rpc-tests/blob/master/README.md) for details. |\n| `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://github.com/ethereum/wiki/wiki/RLP)) dumps (data encoding used by the Celo protocol both network as well as consensus wise) to user friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`). |\n\n## Running tests\n\nPrior to running tests you will need to run `make prepare`, this will run two sub rules.\n\nWithout first running this `make prepare`, certain tests will fail.\n\n### prepare-system-contracts\n\nThis will shallow checkout the\n[celo-monorepo](https://github.com/celo-org/celo-monorepo) under\n`../.celo-blockchain-monorepo-checkout` relative to this project's root at the\ncommit defined in the file `monorepo_commit`. Then it will compile the system\ncontracts for use in full network tests. The rule will copy the compiled\ncontracts from celo-monorepo to `compiled-system-contracts`. If you\nsubsequently edit the system contracts source or `monorepo_commit`, running the\nmake rule again will re-checkout the monorepo, re-compile the contracts and\ncopy them into place. \n\n`monorepo_commit` may contain a commit hash or a tag, branch names are\nforbidden.\n\nIn the case that you would like to change the default monorepo checkout\nlocation, or that you would like to have multiple checkouts of the monorepo (at\ndifferent versions) you can set the `MONOREPO_PATH` variable in the make\ncommand, for example:\n\n```\nmake prepare-system-contracts MONOREPO_PATH=../alt-monorepo\n\n```\nNote that `MONOREPO_PATH` should not be set to point at checkouts other than\nthose checked out by the `prepare-system-contracts` rule, and the checkouts\ncreated by the `prepare-system-contracts` rule should not be manually modified,\naside from changing the contract source.\n\n### prepare-ethersjs-project\nThis will install dependencies for the `ethersjs-api-check` typescript project.\n\n## Running Celo\n\nPlease see the [docs.celo.org/getting-started](https://docs.celo.org/getting-started/choosing-a-network) for instructions on how to run a node connected to the Celo network using the prebuilt Docker image.\n\nGoing through all the possible command line flags is out of scope here, please consult `geth --help` for more complete information.\nWe've enumerated a few common parameter combos to get you up to speed quickly on how you can run your own Celo blockchain client instance.\n\n### Full node on the main Celo network\n\nBy default, the Celo client will connect to the Mainnet.\nRunning the following command will create a full node that will sync with the Celo network and allow access to all of its functionality.\n\n```shell\n$ geth console\n```\n\nThis command will:\n * Start `geth` in full sync mode which will download and execute all historical block information.\n * Start up `geth`'s built-in interactive [JavaScript console](https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console),\n   (via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/ethereum/wiki/wiki/JavaScript-API)\n   as well as `geth`'s own [management APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs).\n   This tool is optional and if you leave it out you can always attach to an already running\n   `geth` instance with `geth attach`.\n\n### A Full node on the Alfajores test network\n\nSmart contract developers will be most interested in the Alfajores testnet.\nOn Alfajores, you can receive testnet Celo through the [Alfajores faucet](https://celo.org/developers/faucet) and deploy smart contracts in an environment very similar to Mainnet.\nMore information about the Alfajores testnet can be found on [docs.celo.org](https://docs.celo.org/getting-started/alfajores-testnet).\n\n```shell\n$ geth --alfajores console\n```\n\n*Note: Although there are some internal protective measures to prevent transactions from\ncrossing over between the main network and test network, you should make sure to always\nuse separate accounts for testnet-tokens and real-tokens. Unless you manually move\naccounts, `geth` will by default correctly separate the two networks and will not make any\naccounts available between them.*\n\n### Full node on the Baklava test network\n\nValidators and full node operators will be most interested in the Baklava testnet.\nOn Baklava, you can receive a distribution of testnet Celo Gold to become a validator on the network and test out running a validator for the first time, or try out new infrastructure.\nMore information about the Baklava testnet can be found on [docs.celo.org](https://docs.celo.org/getting-started/baklava-testnet).\nA full guide to getting started as a validator on Baklava can be found in the [Getting Started guides](https://docs.celo.org/getting-started/baklava-testnet/running-a-validator-in-baklava)\n\n```shell\n$ geth --baklava console\n```\n\n### Configuration\n\nAs an alternative to passing the numerous flags to the `Celo` binary, you can also pass a configuration file via:\n\n```shell\n$ geth --config /path/to/your_config.toml\n```\n\nTo get an idea of how the file should look like you can use the `dumpconfig` subcommand to\nexport your existing configuration:\n\n```shell\n$ geth --your-favourite-flags dumpconfig\n```\n\n### Programmatically interfacing `geth` nodes\n\nAs a developer, sooner rather than later you'll want to start interacting with `geth` and the\nCelo network via your own programs and not manually through the console. To aid\nthis, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://github.com/ethereum/wiki/wiki/JSON-RPC)\nand [`geth` specific APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)).\nThese can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based\nplatforms, and named pipes on Windows).\n\nThe IPC interface is enabled by default and exposes all the APIs supported by `geth`,\nwhereas the HTTP and WS interfaces need to manually be enabled and only expose a\nsubset of APIs due to security reasons. These can be turned on/off and configured as\nyou'd expect.\n\nHTTP based JSON-RPC API options:\n\n  * `--http` Enable the HTTP-RPC server\n  * `--http.addr` HTTP-RPC server listening interface (default: `localhost`)\n  * `--http.port` HTTP-RPC server listening port (default: `8545`)\n  * `--http.api` API's offered over the HTTP-RPC interface (default: `eth,net,web3`)\n  * `--http.corsdomain` Comma separated list of domains from which to accept cross origin requests (browser enforced)\n  * `--ws` Enable the WS-RPC server\n  * `--ws.addr` WS-RPC server listening interface (default: `localhost`)\n  * `--ws.port` WS-RPC server listening port (default: `8546`)\n  * `--ws.api` API's offered over the WS-RPC interface (default: `eth,net,web3`)\n  * `--ws.origins value` Origins from which to accept websockets requests\n  * `--graphql` Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if an HTTP server is started as well.\n  * `--graphql.corsdomain value` Comma separated list of domains from which to accept cross origin requests (browser enforced)\n  * `--graphql.vhosts value` Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: \"localhost\")\n  * `--ipcdisable` Disable the IPC-RPC server\n  * `--ipcapi` API's offered over the IPC-RPC interface (default: `admin,debug,eth,miner,net,personal,shh,txpool,web3`)\n  * `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it)\n\nYou'll need to use your own programming environments' capabilities (libraries, tools, etc) to\nconnect via HTTP, WS or IPC to a `geth` node configured with the above flags and you'll\nneed to speak [JSON-RPC](https://www.jsonrpc.org/specification) on all transports. You\ncan reuse the same connection for multiple requests!\n\n**Note: Please understand the security implications of opening up an HTTP/WS based\ntransport before doing so! Hackers on the internet are actively trying to subvert\nCelo nodes with exposed APIs! Further, all browser tabs can access locally\nrunning web servers, so malicious web pages could try to subvert locally available\nAPIs!**\n\n\n## Contribution\n\nThank you for considering to help out with the source code! We welcome contributions\nfrom anyone on the internet, and are grateful for even the smallest of fixes!\n\nIf you'd like to contribute to celo-blockchain, 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 [the official Celo forum](https://forum.celo.org/c/protocol)\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)\n   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)\n   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. \"eth, rpc: make trace configs optional\"\n\n### Submitting an issue\n\nIf you come across a bug, please open a [GitHub issue](https://github.com/celo-org/celo-blockchain/issues/new) with information about your build and what happened.\n\n### CI Testing and automerge\n\nWe run a circle CI test suite on each PR. The following tests are required to\nmerge a PR.\n  * Unit tests: `make test` or `./build/env.sh go run build/ci.go test`\n  * Lint: `make lint` (Fix go format errors with `gofmt -s`)\n  * Build: `make`\n  * End to end sync and transfer tests\n  * Check imports: `./scripts/check_imports.sh`\n\n `celo-blockchain` is based on `go-ethereum`, but the import path has been renamed from `github.com/ethereum/go-ethereum` to `github.com/celo-org/celo-blockchain`.\n Developers are encouraged to run `./scripts/setup_git_hooks.sh` to enable checking that import path has been changed to `celo-org` on `git merge` and `git commit`.\n Imports can automatically be renamed with `./scripts/rename_imports.sh`.\n\n\nIndividual package tests can be run with\n`./build/env.sh go test github.com/celo-org/celo-blockchain/$(PATH_TO_GO_PACKAGE)`\nif you don't have `GOPATH` set-up.\n\n\nOnce a PR is approved, adding on the `automerge` label will keep it up to date\nand do a squash merge once all the required tests have passed.\n\n### Benchmarking\n\nGolang has built-in support for running benchmarks with go tool\n`go test -run=ThisIsNotATestName -bench=. ./$PACKAGE_NAME` will run all benchmarks in a package.\n\nOne note around running benchmarks is that `BenchmarkHandlePreprepare` is quite takes a while to run, particularly when testing with a larger number of validators.\nSubstituting `-bench=REGEX` for `-bench=.` will specify which tests to run. Adding `-cpuprofile=cpu.out` which can be visualized with `go tool pprof -html:8080 cpu.out` if `graphviz` is installed.\n\nSee the [go testing flags](https://golang.org/cmd/go/#hdr-Testing_flags) and [go docs](https://golang.org/pkg/testing/#hdr-Benchmarks) for more information on benchmarking.\n\n\n## License\n\nThe celo-blockchain library (i.e. all code outside of the `cmd` directory) is licensed under the\n[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html), also\nincluded in our repository in the `COPYING.LESSER` file.\n\nThe celo-blockchain 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%2Fcelo-org%2Fcelo-blockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcelo-org%2Fcelo-blockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelo-org%2Fcelo-blockchain/lists"}