Commit graph

498 commits

Author SHA1 Message Date
Jerry
33e646eea1 Add keystore option to cli 2022-06-15 11:30:47 -07:00
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
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
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
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
c02e2cbb93 Rename whitelist to requiredblocks 2022-05-17 17:08:41 -07:00
Jerry
8de6903eee Implement and enable 'unlock' flag 2022-05-16 14:57:26 -07:00
Jerry
110ea65c37
Merge pull request #385 from cffls/jc/prometheus
Fix prometheus path and add prometheus to bor.service
2022-05-10 11:37:17 -07:00
Jerry
8fc86ccb90 Fix prometheus path and add prometheus to bor.service 2022-05-10 10:45:29 -07:00
Jerry
ad8bede955 Add bootnode cli 2022-05-10 10:38:38 -07: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
Manav Darji
597037df30 Update default cli config (#323)
* update the default cli config

* fix: handle maxpeers flag override, added tests

* add: no-snapshot flag, handle snapshot disable

* fix: update default flags

* add: update the sealer.GasPrice default to 30 gewi

* fix: remove snapshot flag, rely on no-snapshot only
2022-05-09 17:08:03 +02:00
Shivam Sharma
388b68cd05 Minor Fixes 2022-05-09 17:08:03 +02:00
Shivam Sharma
00e51a99c0 Removed console command 2022-05-09 17:08:03 +02:00
Shivam Sharma
0736fdef52 Added console + attach refactor 2022-05-09 17:08:03 +02:00
Shivam Sharma
065556d21a Minor Fixes 2022-05-09 17:08:03 +02:00
Shivam Sharma
15304529f2 minor fixes 2022-05-09 17:08:03 +02:00
Shivam Sharma
7f5469997a Initial Work Setup 2022-05-09 17:08:03 +02:00
Shivam Sharma
55aa9af209 Removed Fio installation process 2022-05-09 17:08:03 +02:00
Shivam Sharma
be2463b958 read/write IOPS added 2022-05-09 17:08:03 +02:00
Shivam Sharma
d50341053e code refactor 2022-05-09 17:08:03 +02:00
Shivam Sharma
5039f4fc1e Added bor fingerprint 2022-05-09 17:08:03 +02:00
Shivam Sharma
4e6d323382 Added GetSnapshotProposerSequence 2022-05-09 17:08:03 +02:00
Krishna Upadhyaya
98b71173df Rename chain test case 2022-05-09 17:08:03 +02:00
Krishna Upadhyaya
d7ebe2fca1 Add test case for Import from file 2022-05-09 17:08:03 +02:00
Krishna Upadhyaya
b3984096e2 Updated file check 2022-05-09 17:08:00 +02:00
Krishna Upadhyaya
1ef2726beb Add ability to run using chain json file 2022-05-09 17:06:28 +02:00
Manav Darji
e10b10a3dd start http rpc server and eth namespace by default (#319) 2022-05-09 17:06:28 +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
Krishna Upadhyaya
b91293a474
Merge pull request #375 from maticnetwork/krishna/update-mumbai-config
Update mumbai config
2022-04-28 16:57:12 +05:30
Krishna Upadhyaya
8ea9231c5f fix: update mumbai genesis config 2022-04-22 11:57:26 +05:30
shiziwen
d561a25739
fix: modify the comment of txlookuplimit (#344) 2022-04-20 16:16:11 +05:30
Manav Darji
7b49cb0bbc
Split modules for cli (#315)
* add separate module config for http and ws

* update cli docs
2022-02-03 18:34:44 +05:30
Manav Darji
fe21391e89
Merge pull request #309 from maticnetwork/manav/dev-mode
Enable developer mode for new cli
2022-01-28 18:03:12 +05:30
Manav Darji
6ccd75c186 replace Fatalf function with fmt.Errorf 2022-01-25 16:41:05 +05:30
Manav Darji
08f9931147 add test for dev flag 2022-01-25 16:33:09 +05:30
SHIVAM SHARMA
55c34d660b
Merge pull request #303 from maticnetwork/merge-subs2
Merge subs2
2022-01-25 12:33:45 +05:30
Manav Darji
0662b70db2 enable dummy developer account for dev mode 2022-01-24 18:39:51 +05:30
Arpit Temani
560ad7dd9d merge master 2022-01-24 16:11:23 +05:30
Manav Darji
ca0f04cfca add developer enabled check for mining 2022-01-21 18:28:20 +05:30
Manav Darji
f86b79ed68 add dev mode for new cli 2022-01-21 18:09:13 +05:30