Go implementation of the Ethereum protocol
Find a file
2023-10-16 14:04:29 +05:30
.circleci chg: Update README 2020-11-14 14:30:47 +05:30
.github update discord links 2023-09-21 22:12:55 +05:30
accounts all: implement milestones (#961) 2023-08-28 18:42:21 +05:30
beacon/engine dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
build Merge branch 'develop' into mardizzone/upstream-merge 2023-07-31 12:09:22 +05:30
builder/files fix : indentation 2023-10-16 14:04:29 +05:30
cmd clean : shanghai changes 2023-10-06 12:06:46 +05:30
common Added a new RPC endpoint (bor_sendRawTransactionConditional) to support EIP-4337 Bundled Transactions (#945) 2023-09-13 08:28:00 +05:30
consensus clean : shanghai changes 2023-10-06 12:06:46 +05:30
console dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
contracts/checkpointoracle dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
core clean : shanghai changes 2023-10-06 12:06:46 +05:30
crypto dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
docs Add CLI flags to config LevelDB table/total sizes (#981) 2023-09-12 12:09:26 +02:00
eth update : gen_config.go 2023-10-09 13:12:19 +05:30
ethclient all: implement milestones (#961) 2023-08-28 18:42:21 +05:30
ethdb Add CLI flags to config LevelDB table/total sizes (#981) 2023-09-12 12:09:26 +02:00
ethstats dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
event dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
graphql graphql: dev: chg: avoid greedy allocation on graphql blocks call (#958) 2023-08-11 14:37:11 +02:00
integration-tests minor chg: add new line 2022-11-25 17:50:58 +05:30
internal fix : indentation 2023-10-16 14:04:29 +05:30
les Add CLI flags to config LevelDB table/total sizes (#981) 2023-09-12 12:09:26 +02:00
light chg : shanghaiTime to shanghaiBlock 2023-08-18 17:05:13 +05:30
log dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
metrics metrics/prometheus: fix count field of metric (#965) 2023-08-16 18:24:23 +05:30
miner Merge branch 'develop' into shivam/POS-1733 2023-10-05 12:14:31 +05:30
node Add CLI flags to config LevelDB table/total sizes (#981) 2023-09-12 12:09:26 +02:00
p2p miner/worker :: add : start commit work only after connecting to peers (#977) 2023-08-31 10:58:57 +05:30
packaging version bump to v1.0.4 2023-09-20 17:30:21 +05:30
params add : agra HF mumbai block 2023-10-16 13:46:30 +05:30
rlp dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
rpc Stop execution pool in rpc handler (#1005) 2023-09-15 13:06:47 -07:00
scripts internal/cli: add support to overwrite config.toml values via cli flags (#1008) 2023-09-21 12:52:59 +05:30
signer dev: fix: most of wsl lint issues 2023-06-15 15:48:26 +02:00
swarm swarm: fix outdated link (#26501) 2023-01-16 11:00:55 +01:00
tests fix testcase 2023-10-09 14:34:00 +05:30
trie added mutex to trie.tracer (#1007) 2023-09-18 10:43:16 +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 cmd/geth: enable log rotation (#26843) 2023-04-03 05:05:36 -04:00
.gitmodules new: dev: pos-398 remove duplicate git submodule 2022-07-12 17:37:44 +02:00
.golangci.yml Merge branch 'develop' into mardizzone/upstream-merge 2023-07-24 14:19:30 +05:30
.goreleaser.yml fix : goreleaser 2023-08-03 14:55:15 +05:30
.mailmap AUTHORS: remove one more duplicate entry (#24950) 2022-05-24 21:04:21 +02:00
.snyk add ignore rule for net/http2 2022-12-12 12:26:12 +05:30
.travis.yml Merge branch 'develop' into mardizzone/upstream-merge 2023-07-24 14:19:30 +05:30
appveyor.yml ci: disable coverage reporting in appveyor and travis 2023-02-17 15:34:30 +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 travis, build: update Go to 1.20.1 (#26653) 2023-02-16 09:00:45 +02:00
Dockerfile.alltools Merge branch 'develop' into mardizzone/upstream-merge 2023-07-24 14:19:30 +05:30
Dockerfile.release Merge branch 'qa' and 'master' into develop (#663) 2023-01-13 14:47:14 +05:30
fuzzbuzz.yaml Update Bor to geth-v1.9.16 (#78) 2020-07-24 19:01:41 +05:30
go.mod build(deps): bump github.com/docker/docker from 1.6.2 to v24.0.5+incompatible (#963) 2023-08-31 06:55:04 +02:00
go.sum build(deps): bump github.com/docker/docker from 1.6.2 to v24.0.5+incompatible (#963) 2023-08-31 06:55:04 +02:00
interfaces.go all: implement milestones (#961) 2023-08-28 18:42:21 +05:30
Makefile Merge tag 'v0.5.0-beta-6' of github.com:maticnetwork/bor into arpit/merge-latest-branch 2023-08-29 17:44:54 +05:30
oss-fuzz.sh core/vm: use golang native big.Int (#26834) 2023-03-08 13:12:53 -05:00
README.md merge develop 2023-10-05 11:23:19 +05:30
RETESTBOR.md Additional reformatting and cleanup of RETESTBOR document 2023-08-13 15:21:21 -04:00
SECURITY.md dev: add: pos-944: snyk and govuln integration (#578) 2022-12-06 10:53:55 +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. Refer to the releases section to find the latest stable version of bor.

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

The network accepts mainnet or mumbai 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 uses 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 Mumbai (Testnet) unless explicitly specified. Before the stable release for mainnet, pre-releases will be available marked with beta tag for deploying on Mumbai (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 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 with keeping the flag usage similar to old-cli (located at cmd/geth) with a few notable changes. Please refer to docs section for 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 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 Discord.