Commit graph

13529 commits

Author SHA1 Message Date
Evgeny Danilenko
342bf3089e
Merge develop branch into v0.3.0-dev (#430)
* 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

* initial implementation for common ancestor approach

* extract whitelist interface

* fix types

* fix tests and format

* add unit tests for IsValidChain function

* more tests

* wip

* test ErrCheckpointMismatch

* minor fixes

* fix test

* dont panic

* fmt

* 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

* fix: return value for no remote block

* handle all errors

* modularise fake chain validator in downloader

* add more tests

* fix tests

* Modifying miner.recommit flag and its adjustment function. (#370)

* changed min/max/current recommit values

* Remove Hardcoded min/max

* Code Sanitization

* Skipping tests for constant recommit interval

* Adding default miner.recommit value

* Minor Change

* Increased default value of rpc.txfeecap to 5

* add debug rpc endpoints for checkpoint whitelist service

* minor fixes and enhancements

* avoid capping warnings for gas set by internal system transactions

* use typed mocks

* fix

* fix

* fix

* fix close

* fix

* Create stale.yml

* Fix bor consensus checkpoint bug

Co-authored-by: Arpit Temani <temaniarpit27@gmail.com>
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>
Co-authored-by: Ferran <ferranbt@protonmail.com>
Co-authored-by: Krishna Upadhyaya <krishnau1604@gmail.com>
Co-authored-by: Karlo <karlonovak@gmail.com>
Co-authored-by: Sandeep Sreenath <ssandeep@users.noreply.github.com>
Co-authored-by: Jerry <jerrycgh@gmail.com>
2022-06-15 09:02:01 +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
8808c231df
Merge pull request #419 from cffls/v0.3.0-dev-flags
CLI improvements
2022-06-06 20:00:31 -07:00
Manav Darji
0d2b1d0630
internal/cli: add block tracing (#397)
* bad block tracing

* Add debug env framework

* add implementation of custom block tracing

* add few comments

* use tar name fn

* wip: add unit tests for block tracing

* complete test for block tracer

* fix: close grpc server

* refactor cli tests

* fix: change condition for parsing args

* Fix port binding for test server

* add helper for creating and closing mock server for tests

* consume mock server in tests

* fixes due to geth merge

* fix: handle port selection for http server

* update help and markdown for debug command

* update docs

* update debug synopsis

* fix: use chunked encoder to handle large data over grpc

* fix prints

* lint

* rm unused function, rename fn to TraceBorBlock

Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com>
2022-06-06 14:54:05 +05:30
Jerry
4ffdbfe60d
Merge pull request #417 from cffls/v0.3.0-dev-lint
Fix default Dockerfile for new CLI
2022-06-02 08:47:58 -07:00
Jerry
96ac8d16d4 Overwrite default config with CLI input even when the input value is considered as empty
This change will fix two issues:
1. When CLI sets a flag to an empty value in Go, e.g. 0 as to Uint64, the flag will be skipped and never set correctly. This problem could be solved by using option "WithOverwriteWithEmptyValue" when merge two configs.
2. The default non-empty value in server config will be overwritten to an empty value after flag initialization. This problem is solved by explicitly providing default value to all flags that have a default value option.
2022-05-31 20:30:40 -07:00
Jerry
4cec5f01c3 Add ability to parse legacy genesis file 2022-05-31 20:30:40 -07:00
Jerry
3ae87c0d46 Read static-nodes and trusted-nodes from default files if not specified in CLI 2022-05-31 20:30:40 -07:00
Jerry
5092006b27 Fix default Dockerfile for new CLI 2022-05-27 14:40:04 -07:00
Jerry
96228cc2dd
Merge pull request #410 from cffls/v0.3.0-dev-lint
Lint consensus/bor and internal/cli
2022-05-26 12:28:40 -07:00
Jerry
2e2557a2d0 Enable prealloc check and improve address comparison 2022-05-26 11:55:44 -07:00
Jerry
45a72bc49e Lint internal/cli 2022-05-26 11:55:44 -07: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
Jerry
63bedf374d
Merge pull request #405 from cffls/whitelist
Rename whitelist to requiredblocks
2022-05-23 09:18:48 -07:00
Manav Darji
2323f2c96e
fix: modify build eth fn definition for account unlock handling (#412) 2022-05-23 15:27:35 +05:30
Manav Darji
1b53044055
internal/cli/server, eth: add option to disable personal wallet endpoints (#394)
* initial disable-bor-wallet implementation

* fixes and enhancements

* update docs using clidoc

* fixes in clique auth
2022-05-23 14:06:51 +05:30
Jerry
cd1a8990ae
Merge pull request #403 from cffls/v0.3.0-dev
Implement and enable 'unlock' flag
2022-05-18 09:43:51 -07:00
Jerry
c02e2cbb93 Rename whitelist to requiredblocks 2022-05-17 17:08:41 -07:00
Evgeny Danienko
2930d04428 misspell 2022-05-17 19:28:08 +03:00
Evgeny Danienko
3aaf6bc13e cherry-pick from Jerry's Chen branch 2022-05-17 19:25:59 +03:00
Jerry
8de6903eee Implement and enable 'unlock' flag 2022-05-16 14:57:26 -07:00
Evgeny Danienko
91559f3955 run on forked branches 2022-05-16 10:47:33 +03:00
Evgeny Danienko
30dd11a183 run on forked branches 2022-05-16 10:35:57 +03:00
Evgeny Danienko
52647fcd88 run on forked branches 2022-05-16 10:12:09 +03:00
Evgeny Danienko
e787097874 restore codecov 2022-05-13 18:41:27 +03:00
Evgeny Danienko
95bfcdc5f4 macos tests 2022-05-13 10:06:11 +03:00
Evgeny Danienko
5a3eb08a57 where to run3 2022-05-13 09:38:43 +03:00
Evgeny Danienko
a8a9229c34 where to run2 2022-05-13 09:37:23 +03:00
Evgeny Danienko
276e82b16c where to run1 2022-05-13 09:36:40 +03:00
Evgeny Danienko
3268c143cd where to run 2022-05-13 09:36:02 +03:00
Evgeny Danienko
485762a28d where to run 2022-05-13 09:35:31 +03:00
Evgeny Danienko
81ede2f6d2 where to run 2022-05-13 09:25:37 +03:00
Evgeny Danienko
39d943d22e stable tests 2022-05-13 09:11:17 +03:00
Jerry
30641c06b1
Merge pull request #396 from cffls/v0.3.0-dev
Set default user to ubuntu in bor.service
2022-05-12 11:54:02 -07:00
Evgeny Danilenko
b05c336a83
fmt 2022-05-12 18:52:40 +03:00
Evgeny Danienko
a57d21166a leaks 2022-05-12 18:27:03 +03:00
Evgeny Danienko
594c9ab23f vs master 2022-05-12 18:04:04 +03:00
Evgeny Danienko
f0f113c0fc run versus origin/master 2022-05-12 15:25:59 +03:00
Jerry
9838fefd3a Set default user to ubuntu in bor.service 2022-05-11 14:02:13 -07: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
7c6357ecf6 group concurrency 2022-05-11 16:18:56 +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
6a598b4e93 revert 2022-05-11 15:27:18 +03:00
Evgeny Danienko
cd4b40fffd test without linters 2022-05-11 15:26:55 +03:00
Evgeny Danienko
834c7741b4 only new issues 2022-05-11 15:21:21 +03:00