Go implementation of the Ethereum protocol
Find a file
Pratik Patil c522a93628
V2.1.1 (#1582)
* added Bhilai and Prague block for mainnet (#1581)

* params: version bump to v2.1.1
2025-06-17 15:12:38 +05:30
.circleci chg: Update README 2020-11-14 14:30:47 +05:30
.github Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
accounts accounts/abi/bind/v2: skipped tests in lib_test.go and util_test.go (POS-3046) 2025-05-28 14:23:28 +05:30
audit add: milestones audit (#1200) 2024-03-26 07:15:58 +01:00
beacon Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
build Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
builder/files added Bhilai and Prague block for mainnet (#1581) 2025-06-17 15:06:54 +05:30
cmd upstream v1.15.11: fixed all compilation errors 2025-05-22 14:06:07 +05:30
common Merge tag 'v1.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +05:30
consensus Merge pull request #1550 from maticnetwork/upstream_merge_v1.15.11 2025-06-06 10:56:20 +05:30
console console: fixed unit tests failing because of nil SnapshotCache 2025-05-12 11:31:33 +05:30
core core/vm: removed kzgPointEvaluation related unit tests and fixed lints 2025-06-03 14:21:10 +05:30
crypto Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
docs update default gas limit in config files and docs 2025-05-21 14:06:12 +05:30
eth fix localEndBlock nil check 2025-06-03 15:09:00 -03:00
ethclient params: updated the TTD from 0 to math.MaxInt64 2025-06-02 21:51:45 +05:30
ethdb Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
ethstats upstream v1.15.11: fixed all compilation errors 2025-05-22 14:06:07 +05:30
event Merge tag 'v1.14.6' into upstream_merge_1.14.6 2024-08-05 16:29:10 +05:30
graphql Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
integration-tests Revert "CI changes to accommodate Anvil" 2025-03-05 16:22:52 +05:30
internal added Bhilai and Prague block for mainnet (#1581) 2025-06-17 15:06:54 +05:30
log Merge tag 'v1.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +05:30
metrics Merge tag 'v1.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +05:30
miner Merge pull request #1550 from maticnetwork/upstream_merge_v1.15.11 2025-06-06 10:56:20 +05:30
node Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
p2p Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
packaging update default gas limit in config files and docs 2025-05-21 14:06:12 +05:30
params params: version bump to v2.1.1 2025-06-17 15:07:35 +05:30
rlp Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
rpc Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +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.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +05:30
tests consensus/bor: allow early block announcements (#1545) 2025-06-02 17:20:58 +05:30
trie Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
triedb Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
version Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
.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.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +05:30
.gitmodules Merge tag 'v1.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +05:30
.golangci.yml bump golangci to v2 and fixed lints 2025-05-22 17:02:11 +05:30
.goreleaser.yml add: amoy genesis json 2024-04-04 13:46:38 +05:30
.mailmap all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
.travis.yml Merge tag 'v1.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +05:30
appveyor.yml build: simplify go mod tidy check (#31266) 2025-02-27 15:52:00 +01:00
AUTHORS all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01: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 build: upgrade -dlgo version to Go 1.24.0 (#31159) 2025-02-19 11:21:22 +01:00
Dockerfile.alltools Merge tag 'v1.15.7' into upstream_merge_v1.15.7 2025-04-28 20:52:33 +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 Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
go.sum Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
interfaces.go Merge tag 'v1.15.11' into upstream_merge_v1.15.11 2025-05-22 11:50:19 +05:30
Makefile bump golangci to v2 and fixed lints 2025-05-22 17:02:11 +05:30
oss-fuzz.sh oss-fuzz: remove deprecated targets (#31224) 2025-02-20 18:46:25 +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-10-23 15:12:56 +02: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.