Go implementation of the Ethereum protocol
Find a file
2025-04-30 14:58:51 -04:00
.circleci chg: Update README 2020-11-14 14:30:47 +05:30
.github install solc-select on e2e ci tests 2025-03-18 16:00:16 +01:00
accounts accounts/abi/bind/backends: replace deprecated math lib common functions 2025-03-26 02:04:20 +05:30
audit add: milestones audit (#1200) 2024-03-26 07:15:58 +01:00
beacon Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
build build, ethclient, params: fix imports for build, skip ethclient test 2025-03-26 11:54:51 +05:30
builder/files cli,p2p: enable discv5 by default 2025-03-21 15:22:27 +05:30
cmd (fix): check for bor config when enabling prague requests 2025-03-28 11:42:27 +05:30
common common/math: add BigIntToUint256Int method back 2025-03-25 23:51:56 +05:30
consensus Merge branch 'develop' into manav/upstream_merge_v1.14.13 2025-03-27 00:46:31 +05:30
console Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
core core: check for bor config when enabling prague requests 2025-04-30 14:58:51 -04:00
crypto Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
docs Merge branch 'develop' into manav/upstream_merge_v1.14.13 2025-03-27 00:46:31 +05:30
eth eth/tracers: revert block hash to original 2025-03-27 14:28:37 +05:30
ethclient build, ethclient, params: fix imports for build, skip ethclient test 2025-03-26 11:54:51 +05:30
ethdb Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
ethstats ethstats: chain event fixes 2025-03-26 11:12:13 +05:30
event Merge tag 'v1.14.6' into upstream_merge_1.14.6 2024-08-05 16:29:10 +05:30
graphql graphql: use shanghai block instead of timestamp 2025-03-26 11:12:52 +05:30
integration-tests Revert "CI changes to accommodate Anvil" 2025-03-05 16:22:52 +05:30
internal Merge branch 'develop' into manav/upstream_merge_v1.14.13 2025-03-28 15:37:26 +05:30
log Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
metrics fix linters 2025-03-26 19:33:36 +05:30
miner (fix): check for bor config when enabling prague requests 2025-03-28 11:42:27 +05:30
node node, internal/cli: add pruner options back, fix db creation in tests 2025-03-26 11:13:43 +05:30
p2p Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
packaging Merge pull request #1502 from maticnetwork/manav/change-file-perms 2025-03-26 18:31:38 +05:30
params params: handle base fee denom for non bor consensus chains 2025-03-26 23:40:40 +05:30
rlp Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
rpc rpc: fix call to NewServer in tests 2025-03-26 01:56:41 +05:30
scripts Merge pull request #1502 from maticnetwork/manav/change-file-perms 2025-03-26 18:31:38 +05:30
signer Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
tests Merge branch 'develop' into manav/upstream_merge_v1.14.13 2025-03-27 00:46:31 +05:30
trie trie: revert back lock before reset 2025-03-27 18:05:41 +05:30
triedb Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
version version: release go-ethereum v1.14.13 stable 2025-01-30 14:12:40 +01:00
.dockerignore cmd, internal/build, docker: advertise commit date in unstable build versions (#19522) 2019-05-08 16:44:28 +03:00
.gitattributes .gitattributes: enable solidity highlighting on github (#16425) 2018-04-03 15:21:24 +02:00
.gitignore Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
.gitmodules new: dev: pos-398 remove duplicate git submodule 2022-07-12 17:37:44 +02:00
.golangci.yml Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
.goreleaser.yml add: amoy genesis json 2024-04-04 13:46:38 +05:30
.mailmap .mailmap: remove invalid email address (#29163) 2024-03-04 21:58:25 +01:00
.travis.yml Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
appveyor.yml appveyor, build, internal: ci.go cleanups, add package dep checker (#30696) 2024-11-19 14:50:11 +01:00
AUTHORS AUTHORS: remove one more duplicate entry (#24950) 2022-05-24 21:04:21 +02:00
circle.yml use go-ethereum for better forked-bor release 2020-11-13 09:21:48 +05:30
COPYING use go-ethereum for better forked-bor release 2020-11-13 09:21:48 +05:30
COPYING.LESSER all: update license information 2015-07-07 14:12:44 +02:00
Dockerfile Dockerfile: revert golang version update 2025-02-19 12:05:00 +05:30
Dockerfile.alltools Merge tag 'v1.14.11' into manav/upstream_merge_v1.14.11 2025-02-18 18:55:48 +05:30
Dockerfile.release add: amoy genesis json 2024-04-04 13:46:38 +05:30
fuzzbuzz.yaml Update Bor to geth-v1.9.16 (#78) 2020-07-24 19:01:41 +05:30
go.mod (fix): point heimdall dependency to specific commit not using math dependency 2025-03-26 11:02:10 +05:30
go.sum (fix): point heimdall dependency to specific commit not using math dependency 2025-03-26 11:02:10 +05:30
interfaces.go Merge branch 'release/1.13' into upstream_merge_1.13 2024-07-10 11:19:34 +05:30
Makefile fix mocks generation and remove reflection 2025-03-26 15:18:43 +01:00
oss-fuzz.sh all: remove kilic dependency from bls12381 fuzzers (#30296) 2024-11-19 14:50:11 +01:00
README.md Remove mumbai from README 2025-03-05 13:58:44 +05:30
RETESTBOR.md Additional reformatting and cleanup of RETESTBOR document 2023-08-13 15:21:21 -04:00
SECURITY.md docs: update security policy (#30606) 2024-11-19 14:50:11 +01:00
sonar-project.properties sonarqube integration (#658) 2023-01-11 17:33:53 +01:00

Bor Overview

Bor is the official Golang implementation of the Polygon PoS blockchain. It is a fork of geth and is EVM compatible (upto London fork).

API Reference Go Report Card MIT License Discord Twitter Follow

Installing bor using packaging

The easiest way to get started with bor is to install the packages using the command below. Please take a look at the releases section to find the latest stable version of bor.

curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- v2.0.0 <network> <node_type>

The network accepts mainnet, or amoy and the node type accepts validator or sentry or archive. The installation script does the following things:

  • Create a new user named bor.
  • Install the bor binary at /usr/bin/bor.
  • Dump the suitable config file (based on the network and node type provided) at /var/lib/bor and use it as the home dir.
  • Create a systemd service named bor at /lib/systemd/system/bor.service which starts bor using the config file as bor user.

The releases supports both the networks i.e. Polygon Mainnet, and Amoy (Testnet) unless explicitly specified. Before the stable release for mainnet, pre-releases will be available marked with beta tag for deploying on Amoy (testnet). On sufficient testing, stable release for mainnet will be announced with a forum post.

Building from source

  • Install Go (version 1.19 or later) and a C compiler.
  • Clone the repository and build the binary using the following commands:
    make bor
    
  • Start bor using the ideal config files for the validator and sentry provided in the packaging folder.
    ./build/bin/bor server --config ./packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml
    
  • To build full set of utilities, run:
    make all
    
  • Run unit and integration tests
    make test && make test-integration
    

Using the new cli

Post v0.3.0 release, bor uses a new command line interface (cli). The new-cli (located at internal/cli) has been built while keeping the flag usage similar to old-cli (located at cmd/geth) with a few notable changes. Please refer to docs section for the flag usage guide and example.

Documentation

  • The official documentation for the Polygon PoS chain can be found here. It contains all the conceptual and architectural details of the chain along with an operational guide for users running the nodes.
  • New release announcements and discussions can be found on our forum page.
  • Polygon improvement proposals can be found here

Contribution guidelines

Thank you for considering helping out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes! If you'd like to contribute to bor, please fork, fix, commit, and send a pull request for the maintainers to review and merge into the main code base.

From the outset, we defined some guidelines to ensure new contributions only ever enhance the project:

  • Quality: Code in the Polygon project should meet the style guidelines, with sufficient test-cases, descriptive commit messages, evidence that the contribution does not break any compatibility commitments or cause adverse feature interactions, and evidence of high-quality peer-review. Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Testing: Please ensure that the updated code passes all the tests locally before submitting a pull request. In order to run unit tests, run make test and to run integration tests, run make test-integration.
  • Size: The Polygon projects culture is one of small pull-requests, regularly submitted. The larger a pull-request, the more likely it is that you will be asked to resubmit as a series of self-contained and individually reviewable smaller PRs.
  • Maintainability: If the feature will require ongoing maintenance (e.g. support for a particular brand of database), we may ask you to accept responsibility for maintaining this feature
  • Pull requests need to be based on and opened against the develop branch.
  • PR title should be prefixed with package(s) they modify.
    • E.g. "eth, rpc: make trace configs optional"

License

The go-ethereum library (i.e. all code outside of the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the COPYING.LESSER file.

The go-ethereum binaries (i.e. all code inside of the cmd directory) are licensed under the GNU General Public License v3.0, also included in our repository in the COPYING file.

Join our Discord server

Join Polygon community share your ideas or just say hi over on Polygon Community Discord or on Polygon R&D Discord.