Commit graph

53 commits

Author SHA1 Message Date
Pratik Patil
5c5c992440 Changed default value of maxpeers from 200 to 50, update docs (#555)
* changed default of maxpeers from 200 to 50

* docs: update additional notes for new-cli

* docs: update additional notes for new-cli

* small bug fix in the script to fix shopt issue

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
2022-10-20 20:35:03 -07:00
Manav Darji
a977a76f97 metrics: handle values from config file (#565)
* metrics: handle metrics flag from config in metrics.init()

* internal/cli/server: log for metrics enabling and misconfiguration
2022-10-20 15:33:00 -07:00
Jerry
cb12a6e4d6 Force load default tracers 2022-10-20 10:04:00 -07:00
Manav Darji
083c3fead1 internal/cli: add support for bor.logs flag in new-cli (#541)
* add support for bor.logs flag in new-cli

* handle bor.withoutheimdall flag commenting in conversion script
2022-10-05 14:51:12 -07:00
Pratik Patil
43e5d3aa09
PR#518 and PR#529 -> qa (#532)
* Added script to generate config.toml fromstart.sh (#518)

* added go and bash script to get config out of start.sh and updated flagset.go

* changed 'requiredblocks' flag back to 'eth.requiredblocks'

* updated script

* changed 'requiredblocks' flag back to 'eth.requiredblocks'

* updated tests, and removed requiredblocks from json and hcl

* addressed comments

* internal/cli/server: fix flag behaviour (#529)

* remove setting maxpeers to 0 for nodiscover flag

* set default prometheus and open-collector endpoint

* skip building grpc address from pprof address and port

* fix: linters

* fix and improve tests

* use loopback address for prometheus and open-collector endpoint

* add logs for prometheus and open-collector setup

* updated the script to handle prometheus-addr

* updated builder/files/config.toml

Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
2022-09-29 14:25:27 +05:30
Pratik Patil
7c6f0a67e6 updated tests, and removed requiredblocks from json and hcl 2022-09-07 16:23:44 +04:00
Pratik Patil
d2eb2df62e changed 'requiredblocks' flag back to 'eth.requiredblocks' 2022-09-07 13:53:36 +04:00
Manav Darji
7bb7bacd50
Merge pull request #503 from maticnetwork/shivam/sealer-gasPrice (#506)
internal/cli/server: update default cli values

Co-authored-by: SHIVAM SHARMA <shivam691999@gmail.com>
2022-09-01 11:07:49 +05:30
Pratik Patil
8c97faaa8c internal/cli, cmd/geth: replaced package naoina/toml with BurntSushi/toml and updated config name-tags (#486)
* removed package naoina/toml from dumpconfig and added BurntSushi/toml

* updated cmd/gethconfig.go
2022-08-22 23:43:17 -07:00
Manav Darji
2aacbde097 eth, cli: prevent snap sync mode migration - v0.3.x (#494)
* handle snap sync mode switches

* fix linters
2022-08-22 23:43:17 -07:00
Manav Darji
10c1ff2a74 internal/cli: add support for removedb (#478)
* internal/cli: add support for removedb

* update docs

* internal/cli: use constant path, handle err
2022-08-22 23:43:17 -07:00
Manav Darji
ba18491841 fix: tests 2022-08-04 09:36:09 -07:00
Manav Darji
18fafc01c6 disable bor wallet by default 2022-08-04 09:36:09 -07:00
Pratik Patil
694dc02a01 fixed the bug caused by fillBigInt and FillTime.Duration functions (#474) 2022-07-29 17:13:00 -07:00
Pratik Patil
e62beee1b2 internal/cli: use config file for flags in new-cli, builder/files: update defaults (#457)
* updated simple.json and simple.hcl

* added annotations for developer and grpc block

* added toml tags and simple.toml file

* added support for toml config files

* updated simple files toml, hcl, json

* added config.toml in builder/files and updated bor.service

* add dumpconfig command in cli for exporting configs

* update docs

* updated .goreleaser.yml (POS-651)

* changed --config to -config

* added test config for tests and fixed lint errors

* made fields of type big.int and time.Duration private, removed merge from dumpconfig, setting up default values to the Raw fields in dumpconfig, and fixed one lint error

* fixed lint errors (strange)

* lint fix

* private no-more, using '-' in name tags to ignore

* updated name tags, made c.configFile as a stringFlag (only one config file supported) and updated the merge logic in command.go -> Run()

* fix: set method for big.Int flags, added a TODO

* handeled bigInt and timeDuration type, bug fix in config_legacy, lint fix

* updated flags, consistent across flags.go and config.go

* fixed config test and updated test hcl, json config files

* updated config legacy test

* added test to check values of cmd flags, restructured Run in command.go, linter fix

* fix linters

* lint again

* changed 2 flags and assert -> require

* changed the 2 flags back

* updated correct congig.toml path and made mainnet default

* updated config.toml with new flags

* added sample config (toml) file

* removed sample-config.toml and added it in docs/config.md

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
2022-07-29 17:12:30 -07:00
Pratik Patil
f53981809e Change diverged flags back to Geth's convention (POS-602) (#451)
* changed name -> identity

* changed no-snapshot -> snapchot=true/false

* changed jsonrpc.corsdomain -> http.corsdomain

* changed jsonrpc.vhosts -> http.vhosts

* changed http/ws.modules to http/ws.api

* updated readme

* updated config_test

* make docs

* handelling string array flag, overwrite insted of append

* added 'Default' to SliceStringFlag

* added separate flags for corsdomain and vhosts for http, ws, graphql

* modified tests
2022-07-29 16:56:58 -07:00
Jerry
f90faf0687 Match default parameters to mainnet 2022-06-30 10:36:44 -07:00
Jerry
33e646eea1 Add keystore option to cli 2022-06-15 11:30:47 -07: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
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
8fc86ccb90 Fix prometheus path and add prometheus to bor.service 2022-05-10 10:45:29 -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
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
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
Manav Darji
0662b70db2 enable dummy developer account for dev mode 2022-01-24 18:39:51 +05:30
Manav Darji
ca0f04cfca add developer enabled check for mining 2022-01-21 18:28:20 +05:30