Commit graph

46 commits

Author SHA1 Message Date
SHIVAM SHARMA
a671c9eddd
internal/cli/server : fix : added triesInMemory in config (#677) 2023-01-18 21:41:52 +05:30
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
Krishna Upadhyaya
ad69ccd0ba
Added flags to run heimdall as a child process (#597)
* Added flags to run heimdall as a child process

* Fix: Lint

* Fix btcd package dependency for CI

* Update btcd package version

* Try removing ambigious importts

* dev: fix: lint fix for parallel tests

* remove delete for ambigious import

* Remove unwanted space

* go mod tidy

* try replace

* try replace

* use vendor

* rename vendor

* tidy

* vendor btcec

* clean up

* remove submodule

* remove submodule

* remove submodule

* remove submodule

* remove vendor & added replacer in test

* go mod tidy

* added replacer

* Update replacer

* Update replacer

* Merge branch 'develop' into run-heimdall-flags

* Skip TestGolangBindings

* Typo fix

* Remove unwanted changes

Co-authored-by: marcello33 <marcelloardizzone@hotmail.it>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>
2022-12-23 23:15:46 +05:30
Shivam Sharma
7b52c93c1b chg : logging strings 2022-12-20 11:39:11 +05:30
Shivam Sharma
513127cd8f chg : use standard logging 2022-12-20 10:54:03 +05:30
Shivam Sharma
828801f9d8 lint : fix linters 2022-12-19 18:36:10 +05:30
Shivam Sharma
43cafc0415 add : multiple keystore tolerance 2022-12-19 18:08:18 +05:30
Shivam Sharma
9cba79edee init : remove exit on keystore err 2022-12-19 13:57:18 +05:30
Pratik Patil
1ab225c0e4
Removed vhosts for ws and replaced cors with origins (#574)
* removed vhosts for ws and added replaced cors with origins

* updated script
2022-11-03 12:54:57 -07:00
SHIVAM SHARMA
3fdb45e5e9
Merge pull request #552 from maticnetwork/shivam/POS-784
Make TriesInMemory configurable through CLI and toml config
2022-10-25 12:22:13 +05:30
Pratik Patil
e17ee36ebe
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-21 08:54:38 +05:30
Shivam Sharma
225a826e0e add : TriesInMemory flag 2022-10-17 18:00:30 +05:30
Manav Darji
54f97b8598
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 23:38:19 +05:30
Manav Darji
457314783f
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>
2022-09-27 13:36:42 +05:30
Pratik Patil
77db80cc91
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
2022-09-23 13:37:04 +05:30
Manav Darji
eb16a3d313 update defaults in new-cli 2022-08-26 11:24:51 +05:30
Shivam Sharma
632c1646a8 chg : default sealer.gasPrice from 1wei to 1Gwei 2022-08-25 12:47:54 +05:30
Shivam Sharma
8186e4d2a1 chg : sealer.gasPrice to 1 from 30Gwei 2022-08-24 14:58:38 +05:30
Shivam Sharma
324187776a chg : txpool.pricelimit to 1 2022-08-23 18:35:24 +05:30
Manav Darji
9f1feac053
eth, cli: prevent snap sync mode migration - v0.3.x (#494)
* handle snap sync mode switches

* fix linters
2022-08-17 15:18:16 +05:30
Manav Darji
ac559bcd16
internal/cli: add support for removedb (#478)
* internal/cli: add support for removedb

* update docs

* internal/cli: use constant path, handle err
2022-08-09 09:16:42 +05:30
Pratik Patil
16408ba324
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-05 14:56:41 +05:30
Krishna Upadhyaya
75bb3bdeb1 Merge branch 'develop' into POS-648 2022-07-27 19:09:04 +05:30
Pratik Patil
71980bf5b1
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-27 12:28:26 +05:30
Krishna Upadhyaya
8de8a6815c Integrated heimdall gRPC server flow 2022-07-26 18:08:25 +05:30
Krishna Upadhyaya
385aff85f0 Implemented heimdall gRPC client 2022-07-26 02:18:37 +05:30
Pratik Patil
3df1d6f017
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-14 22:36:18 +05:30
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
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
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
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
Krishna Upadhyaya
b3984096e2 Updated file check 2022-05-09 17:08:00 +02:00
Manav Darji
e10b10a3dd start http rpc server and eth namespace by default (#319) 2022-05-09 17:06:28 +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
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
6ccd75c186 replace Fatalf function with fmt.Errorf 2022-01-25 16:41:05 +05:30
Manav Darji
0662b70db2 enable dummy developer account for dev mode 2022-01-24 18:39:51 +05:30
Manav Darji
f86b79ed68 add dev mode for new cli 2022-01-21 18:09:13 +05:30
Manav Darji
f3d6620ecc
migrate cli to internal package (#301) 2022-01-19 12:10:20 +01:00
Renamed from command/server/config.go (Browse further)