Go implementation of the Ethereum protocol
Find a file
Manav Darji ac774c2695
Merge qa to master (#808)
* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Daniil <daniil.melnik@chainstack.com>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <6655321@bk.ru>
Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <jerrycgh@gmail.com>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <46797839+dkeysil@users.noreply.github.com>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <shivam691999@gmail.com>
Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>
Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Daniil <daniil.melnik@chainstack.com>
Co-authored-by: Arpit Temani <temaniarpit27@gmail.com>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>
Co-authored-by: Dmitry <46797839+dkeysil@users.noreply.github.com>
2023-04-05 16:45:49 +05:30
.circleci chg: Update README 2020-11-14 14:30:47 +05:30
.github Revert "bump : go version from 1.19 to 1.20.1 (#761)" 2023-03-06 09:08:46 -08:00
accounts Use atomic pointer in go 1.19 (#446) 2022-08-09 22:11:09 +03:00
build Revert "bump : go version from 1.19 to 1.20.1 (#761)" 2023-03-06 09:08:46 -08:00
builder/files Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
cmd Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
common Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
consensus v0.3.6 fix (#787) 2023-03-23 08:29:36 +01:00
console V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
contracts/checkpointoracle accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
core core: improve locks in txpool (#807) 2023-04-05 00:47:11 +05:30
crypto V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
docs Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
eth Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
ethclient fix linters caused by previous merge (#526) 2022-09-23 08:30:31 +05:30
ethdb add : mock database in eth/filters 2022-07-19 17:21:11 +05:30
ethstats Added arbitray data Ethstats 2022-01-25 12:52:25 +00:00
event event: add ResubscribeErr (#22191) 2021-01-21 13:47:38 +01:00
graphql V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
integration-tests fix: incorrect condition 2022-11-18 18:58:52 +05:30
internal Merge qa to master (#808) 2023-04-05 16:45:49 +05:30
les Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
light RFC35/Common Ancestor: Modifying the forkchoice rule (#425) 2022-07-15 10:37:35 +05:30
log v0.3.6 fix (#787) 2023-03-23 08:29:36 +01:00
metrics metrics: handle nil telemetry config (#601) 2022-11-26 01:54:50 +05:30
miner v0.3.6 fix (#787) 2023-03-23 08:29:36 +01:00
mobile V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
node Merge qa to master (#750) 2023-02-20 18:37:21 +05:30
p2p fix lints from develop (few lints decided to appear from code that was untouched, weird) 2023-03-06 09:33:05 -08:00
packaging core: improve locks in txpool (#807) 2023-04-05 00:47:11 +05:30
params core: improve locks in txpool (#807) 2023-04-05 00:47:11 +05:30
rlp V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
rpc Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
scripts Add support for new flags in new config.toml, which were present in old config.toml (#612) 2022-12-05 19:21:33 +05:30
signer V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
swarm swarm: code cleanup, move to ethersphere/swarm (#19661) 2019-06-04 16:35:36 +03:00
tests v0.3.6 fix (#787) 2023-03-23 08:29:36 +01:00
trie Prepare Bor package for testing (#416) 2022-06-08 16:39:30 +03: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 develop 2022-11-13 19:05:26 +05:30
.gitmodules new: dev: pos-398 remove duplicate git submodule 2022-07-12 17:37:44 +02:00
.golangci.yml Revert "bump : go version from 1.19 to 1.20.1 (#761)" 2023-03-06 09:08:46 -08:00
.goreleaser.yml Merge branch 'qa' of https://github.com/maticnetwork/bor into djpolygon/v0.3.0packaging 2022-11-24 00:03:41 +05:30
.mailmap all: update license information (#16089) 2018-02-14 13:49:11 +01:00
.travis.yml Revert "bump : go version from 1.19 to 1.20.1 (#761)" 2023-03-06 09:08:46 -08:00
appveyor.yml V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
AUTHORS Update Bor to geth-v1.9.16 (#78) 2020-07-24 19:01:41 +05:30
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 rollback bor user and use root 2022-11-23 14:16:36 -07:00
Dockerfile.alltools Revert "bump : go version from 1.19 to 1.20.1 (#761)" 2023-03-06 09:08:46 -08:00
Dockerfile.release rollback bor user and use root 2022-11-23 14:16:36 -07:00
fuzzbuzz.yaml Update Bor to geth-v1.9.16 (#78) 2020-07-24 19:01:41 +05:30
go.mod Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
go.sum Merge qa to master (#808) 2023-04-05 16:45:49 +05:30
interfaces.go handle future chain import and skip peer drop (#650) 2023-01-07 11:58:03 +05:30
Makefile Hotfixes and deps bump (#776) 2023-03-14 12:40:23 +01:00
oss-fuzz.sh V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00
README.md typo: README (#463) 2022-07-22 11:36:41 +05:30
RETESTBOR.md new: dev: pos-398 update retesteth readme 2022-07-07 12:14:55 +02:00
SECURITY.md V0.2.16 candidate (#373) 2022-05-06 12:31:48 +02:00

Bor Overview

Bor is the Official Golang implementation of the Matic protocol. It is a fork of Go Ethereum - https://github.com/ethereum/go-ethereum and EVM compatible.

Forks Stars Languages Issues PRs MIT License contributors size lines Discord Twitter Follow

How to contribute

Contribution Guidelines

We believe one of the things that makes Polygon special is its coherent design and we seek to retain this defining characteristic. 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
  • 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 (eg support for a particular brand of database), we may ask you to accept responsibility for maintaining this feature

Submit an issue

  • Create a new issue
  • Comment on the issue (if you'd like to be assigned to it) - that way our team can assign the issue to you.
  • If you do not have a specific contribution in mind, you can also browse the issues labelled as help wanted
  • Issues that additionally have the good first issue label are considered ideal for first-timers

Fork the repository (repo)

  • If you're not sure, here's how to fork the repo

  • If this is your first time forking our repo, this is all you need to do for this step:

    $ git clone git@github.com:[your_github_handle]/bor
    
  • If you've already forked the repo, you'll want to ensure your fork is configured and that it's up to date. This will save you the headache of potential merge conflicts.

  • To configure your fork:

    $ git remote add upstream https://github.com/maticnetwork/bor
    
  • To sync your fork with the latest changes:

    $ git checkout master
    $ git fetch upstream
    $ git merge upstream/master
    

Building the source

  • Building bor requires both a Go (version 1.14 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run

    $ make bor
    

Make awesome changes!

  1. Create new branch for your changes

    $ git checkout -b new_branch_name
    
  2. Commit and prepare for pull request (PR). In your PR commit message, reference the issue it resolves (see how to link a commit message to an issue using a keyword.

    Checkout our Git-Rules

    $ git commit -m "brief description of changes [Fixes #1234]"
    
  3. Push to your GitHub account

    $ git push
    

Submit your PR

  • After your changes are commited to your GitHub fork, submit a pull request (PR) to the master branch of the maticnetwork/bor repo
  • In your PR description, reference the issue it resolves (see linking a pull request to an issue using a keyword)
    • ex. Updates out of date content [Fixes #1234]
  • Why not say hi and draw attention to your PR in our discord server?

Wait for review

  • The team reviews every PR
  • Acceptable PRs will be approved & merged into the master branch

Release


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) is 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.