Commit graph

114 commits

Author SHA1 Message Date
Manav Darji
ffe810e55a
Update lintci and fix lints (#1217) 2024-04-12 18:52:17 +05:30
marcello33
fd4d8920f2
Bump dependencies (#1183)
* chg: update deps / fix root folder for docker integration tests

* chg: bump bor version

* chg: bump deps

* chg: bump deps and adapt geth cmd verkle

* chg: update go version in GH CIs

* chg: update go version in makefile, travis and dockerfile

* chg: fix tests
2024-03-12 13:29:40 +01:00
Shivam Sharma
cb4a8557fd chg : go version in CI from 1.20.x to 1.21.x 2024-01-16 17:01:46 +05:30
Shivam Sharma
a9fa325b7e Merge tag 'v1.13.5' of https://github.com/ethereum/go-ethereum into shivam/upstream-geth-1.13.5 2023-12-15 13:55:57 +05:30
Arpit Temani
589f7420e3 merge develop 2023-10-16 23:37:44 +05:30
SHIVAM SHARMA
db1562bbe2
Fix Codecov and add integration tests coverage (#1020)
* add : gocovmerge support

* fix : minor fix

* add : dependancy for codecov

* fix : dependancy

* fix : codecov upload/download artifact

* fix : fix unable to find cover.out file

* fix : rename integration_cover.out

* chg : codecov-action from v1 to v3
2023-10-13 12:31:17 +05:30
Manav Darji
7a4f491ba6 use ethdb package to generate mocks 2023-09-22 15:18:09 +05:30
Arpit Temani
3626e5f7e4 fix testcase syntax 2023-09-20 15:57:37 +05:30
Arpit Temani
f10517918e 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
Péter Szilágyi
52219ced8b
travis: get rid of old useless GO111MODULE directives (#27991) 2023-08-23 18:54:30 +03:00
Jerry
3fa0fec5cf
Disable shuffling in unit test (#954) 2023-08-17 10:54:09 +05:30
Shivam Sharma
b7efe4d3c2 fix : goreleaser 2023-08-03 14:55:15 +05:30
Shivam Sharma
811c90f549 Merge branch 'develop' into mardizzone/upstream-merge 2023-07-24 14:19:30 +05:30
Raneet Debnath
ddce55e2fb
consensus/bor,eth/filters,miner,params,tests: fix mocks 2023-07-12 15:17:58 +08:00
marcello33
a043ec6d62 dev: add: merge upstream 2023-06-09 14:34:30 +02:00
Manav Darji
61d35d4980
Makefile, params: fix git commit in bor version cmd (#835) 2023-04-26 15:00:21 +05:30
SHIVAM SHARMA
ec14a06dc2
Add : commit details to bor version (#730)
* add : commit details to bor version

* fix : MAKEFILE

* undo : rm test-txpool-race

* rm : params/build_date

* rm : params/gitbranch and params/gitdate
2023-02-14 16:06:39 +05:30
Péter Szilágyi
d9699c8238
accounts, build, mobile: remove Andriod and iOS support 2023-02-03 12:29:07 +02:00
SHIVAM SHARMA
9aeaf03f05
Merge branch 'qa' and 'master' into develop (#663)
* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5342.

* Bump version to stable

* Revert "Merge pull request #435 from maticnetwork/POS-553"

This reverts commit 657d262def, reversing
changes made to 88dbfa1c13.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

Co-authored-by: Daniel Jones <djones@polygon.technology>
Co-authored-by: Will Button <wbutton@polygon.technology>
Co-authored-by: Will Button <will@willbutton.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Daniel Jones <105369507+djpolygon@users.noreply.github.com>
Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>
Co-authored-by: Arpit Temani <temaniarpit27@gmail.com>
Co-authored-by: Jerry <jerrycgh@gmail.com>
2023-01-13 14:47:14 +05:30
SHIVAM SHARMA
b1d86bd6ea
Shivam/txpool tracing (#604)
* lock, unlock to rlock, runlock

* add : tracing Pending() and Locals()

* Log time spent in committing a tx during mining

* Remove data from logging

* Move log into case where a tx completes without error

* profile fillTransactions

* fix conflict

* bug fixes

* add logs

* txpool: add tracing in Pending()

* rearrange tracing

* add attributes

* fix

* fix

* log error in profiling

* update file mode and file path for profiling

* full profiling

* fix log

* fix log

* less wait

* fix

* fix

* logs

* worker: use block number for prof files

* initial

* txList add

* fix gas calculation

* fix

* green tests

* linters

* prettify

* allocate less

* no locks between pending and reorg

* no locks

* no locks on locals

* more tests

* linters

* less allocs

* comment

* optimize errors

* linters

* fix

* fix

* Linters

* linters

* linters

* simplify errors

* atomics for transactions

* fix

* optimize workers

* fix copy

* linters

* txpool tracing

* linters

* fix tracing

* duration in mcs

* locks

* metrics

* fix

* cache hit/miss

* less locks on evict

* remove once

* remove once

* switch off pprof

* fix data race

* fix data race

* add : sealed total/empty blocks metric gauge

* add : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack for all go-routines

* linters

* add data race test on txpool

* fix concurrency

* noleak

* increase batch size

* prettify

* tests

* baseFee mutex

* panic fix

* linters

* fix gas fee data race

* linters

* more transactions

* debug

* debug

* fix ticker

* fix test

* add cacheMu

* more tests

* fix test panic

* linters

* add statistics

* add statistics

* txitems data race

* fix tx list Has

* fix : lint

Co-authored-by: Arpit Temani <temaniarpit27@gmail.com>
Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>
2022-12-12 12:34:02 +05:30
Raneet Debnath
0218f17bc0 new: add more cases 2022-10-07 16:00:34 +05:30
Evgeny Danilenko
e699254142
Use atomic pointer in go 1.19 (#446)
* use atomic pointer

* golang version

* golang version

* go1.19

* linters

* Bump golangci-lint

* linters

* linters

* linters after merge

* generic logger

* generic logger

* logger

* logger

* linters

* bump toml

* linters1

* linters

* linters

* linter

* linter

* linters

* linters

* linters
2022-08-09 22:11:09 +03:00
Manav Darji
8f08503a5a
Makefile: copy bor binary to go bin (#469) 2022-07-27 22:27:26 +05:30
Shivam Sharma
43b18b7038 chg : moved TestBorFilters to tests/bor 2022-07-18 13:43:36 +05:30
Manav Darji
c44693706a
RFC35/Common Ancestor: Modifying the forkchoice rule (#425)
* initial

* update

* fix: add validator to NewBlockchain function calls

* handle past chain reorg

* fix: only check with last checkpoint

* rm logs

* add: handle future chain import case

* fix: handle single block case

* add unit tests for past and future chain

* modularise forker tests

* minor fixes

* add: overlapping chain test case, minor fixes

* minor fixes

* add: isolated unit test for IsValidChain

* add more test case for IsValidChain

* fix: use index for header time

* add: fetch last N checkpoints in first run

* fix: change checkpoint count to int64

* fix: handle edge case

* fix: handle no checkpoint case separately

* fix: consider offset for future chain calculation

* re-write test case for split chain

* fix: typo

* add: split chain properties test

* separate reorg checks, validate chain before inserting

* fix: handle err incase of invalid chain

* fix: use error from whitelist service

* split chain property tests

* remove duplicate test cases

* cleanup

* clean up

* fix linters

* fix: fetch checkpoint count bug, add tests

* fix more linters

* fix: handle nil chain validator in downloader

* fix: mock bor tests

Co-authored-by: Evgeny Danienko <6655321@bk.ru>
2022-07-15 10:37:35 +05:30
Evgeny Danilenko
04e90e2426
internal/cli: update grpc/protobuf dependency (#449)
* update grpc_conn

* fix

* remove more deps from deprecated library

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
2022-07-11 19:09:49 +03:00
Evgeny Danilenko
9c8bf51f57
Prepare Bor package for testing (#416)
* Limit state sync by gas

* Added logging for state-sync total gas usage

* Added number of event-records in log

* Minor Changes

* Minor Fix

* Adding individual gasUsed

* Minor Fix

* it works

* fix tests

* log wiggle and delay with block number

* log delays as numbers

* linters

* fix tests

* restore linters for the project

* fix linters

* fix

* fix

* fix

* linters

* generation

* fix tests

* remove heimdall wrapper response

* linters

* remove possible collisions

* remove possible collisions

* remove possible collisions

* tests for unique address generation

* generalize set

* bor miner tests got restored

* fixes after CR

* final step and mining test

* fix

* fix e2e

* more tests for Heimdall requests

* fix linters

Co-authored-by: Ferran <ferranbt@protonmail.com>
Co-authored-by: Shivam Sharma <shivam691999@gmail.com>
2022-06-08 16:39:30 +03:00
Jerry
12ab0f0240 Lint consensus/bor module
Cleanup, lint, and enable linters for consenssus/bor module.

Disabled linter "gomnd" and "tagliatelle" because they are not
easy to fix and the return on the time investment is very low.
Disabled linter "prealloc" because it is not easy to guess and pre-allocate the
slice accurately in many cases.
2022-05-23 19:46:59 -07:00
Evgeny Danilenko
87a2e5224f
Merge pull request #395 from maticnetwork/testing-flags
Restores linters and separate kinds of tests
2022-05-23 19:42:18 +03:00
Evgeny Danienko
39d943d22e stable tests 2022-05-13 09:11:17 +03:00
Evgeny Danienko
f0f113c0fc run versus origin/master 2022-05-12 15:25:59 +03:00
Evgeny Danienko
ca19e0182d fix 2022-05-11 17:11:59 +03:00
Evgeny Danienko
2bac6ce45f remove shuffle for e2e 2022-05-11 17:09:36 +03:00
Evgeny Danienko
e36a54d600 goleak 2022-05-11 16:43:43 +03:00
Evgeny Danienko
b2b327eaf4 ignore cmd tests 2022-05-11 15:47:18 +03:00
Evgeny Danienko
5458ac01cd fix 2022-05-11 15:41:02 +03:00
Evgeny Danienko
348f91e9f4 more time for tests for data races 2022-05-11 15:31:10 +03:00
Evgeny Danienko
15900477fb linters 2022-05-11 14:05:02 +03:00
Evgeny Danienko
eb76df22af better ci 2022-05-11 10:00:31 +03:00
Jerry
a131e427f6 Automatically generate markdown pages from bor CLI
Adding a script that can automatically generate markdown pages from bor
CLI, so we can avoid copy-pasting helper strings whenever a flag is created,
deleted, or modified.

CLI docs could be generated with command `make docs`.
2022-05-09 17:10:36 +02:00
Victor Castell
66fc055a7b Build and run the new CLI (#318)
* Build and run the new CLI
2022-05-09 17:06:26 +02:00
Victor Castell
b416577a8e Protobuf tooling fix and upgrade (#313)
* Protobuf tooling fix and upgrade

* Paths for protobuf files has changed, reflect that in Makefile
* Fix the tooling to make it work in macos
* Update protoc version and regenarate files.

* Regen proto
2022-05-09 17:05:29 +02:00
Arpit Temani
2321e64ed7
V0.2.16 candidate (#373)
* merge geth v1.10.15

* fix: Removed FastSync from cli server

* fix: TestHeadersRLPStorage

* Added t.skip(ETH2 in bor)

* fix: flow in create consensus engine

* bumped version

* Fix typo

* increase block time

* remove file

* bumped version

* merge gethv1.10.17

* bumped version

* fix failing tests

* Bump Go version to v1.18 (#368)

* Bump Go version to v1.18.1

* Build using netgo tag

This will create a static build using Go native networking stack.

Checked and it works stable for all archs and distros.

* Fix meta

* Bump version

* Meta as stable

Co-authored-by: Shivam Sharma <shivam691999@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Sandeep Sreenath <sandeep.sreenath@gmail.com>
Co-authored-by: Victor Castell <victor@victorcastell.com>
2022-05-06 12:31:48 +02:00
s7v7nislands
7ab15490e9
all: use 'embed' instead of go-bindata (#24744) 2022-04-25 11:15:14 +02:00
Shivam Sharma
3c051f074c Added codecov 2022-03-16 13:47:45 +05:30
SHIVAM SHARMA
2d84249492
fix for TestReorgSideEvent (#304)
* fix for TestReorgSideEvent

* Fix make test

* Disable specific tests and enable bor burn contract

* Fix more stuff

* More checks

Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com>
2022-01-20 14:24:15 +01:00
Ferran Borreguero
336b89eeba
Enable test again (#280)
* Enable london fork in allEnabledConfig

* Move up the make-all in Makefile

* Add Makefile entry to download tests

* Fix rawdb tests

* Fix core tests

* Remove old testdata

* Enable full test

* Fix makefile

* Remove duplicate test for ci

* Fix small format issue

* Filter a couple of folders

* Fix go test
2022-01-14 12:13:47 +01:00
Arpit Temani
7115b84b7a london fork (#260)
* london fork changes

* Update version.go

* burn contract address
2022-01-11 12:22:03 +01:00
William Morriss
521b3a7833
bor the default target (#281) 2022-01-04 14:05:46 +01:00
Victor Castell
7b6bab4986 Release multi-platform with goreleaser
Packages, docker images CI automated
2021-11-11 17:24:42 +01:00