Commit graph

162 commits

Author SHA1 Message Date
Daniel Liu
3837d0c2cc core, cmd/XDC: fix wrong hash caused by EIP-1559 number when init genesis 2025-03-13 16:55:09 +08:00
Daniel Liu
8efa0c0a29 cmd/XDC: improve init genesis 2025-03-13 11:17:56 +08:00
Daniel Liu
2f349da4bf cmd: remove deprecated lightchaindata db (#30527) 2025-03-10 15:40:08 +08:00
Daniel Liu
66e73ad32e cmd, les: remove light client code (#28586) 2025-03-10 15:40:07 +08:00
Daniel Liu
588dcd35ce cmd, common, core, eth: optimize rollback by flag 2025-03-01 11:34:32 +08:00
Daniel Liu
92bc30bc37 cmd: remove deprecated flags --fast and --light 2025-02-21 15:35:09 +08:00
Daniel Liu
7017077508 cmd/XDC, core/rawdb: add db command inspect 2025-02-21 15:32:35 +08:00
Daniel Liu
98cff5d6c2 all: remove network rinkeby 2025-02-19 15:52:29 +08:00
Daniel Liu
54b4be1aa2 cmd, core: add flag mainet and devnet 2025-02-19 14:24:20 +08:00
Daniel Liu
1d653e57ab cmd, core: merge flags testnet and apothem 2025-02-19 14:24:20 +08:00
Daniel Liu
2fb9e99ba3 cmd: use slices.Concat instead of GroupFlags 2025-02-17 15:06:52 +08:00
Daniel Liu
bea5c95a7c cmd/utils: change default value of some flags to simplify sync 2025-02-17 09:36:14 +08:00
Daniel Liu
b50c4a29f6 cmd: deprecate flag --mine 2025-02-17 09:19:13 +08:00
Daniel Liu
d304a24edc cmd/XDC: remove genesis file dependency for XDC init command 2025-02-13 12:46:54 +08:00
Daniel Liu
d8fb27b987 all: clean up and properly abstract database accesses (#19021) 2025-02-11 18:28:50 +08:00
Daniel Liu
5b10b2441c all: use T.TempDir to create temporary test directories (#24633) 2025-01-24 16:54:08 +08:00
Daniel Liu
f74eacd2cd node: remove dependency on wallet backend packages (#23019)
* accounts: new AddBackends method in manager

* node,cmd/geth: mv accman backend init to cmd/geth

* node,cmd/geth: mv scrypt config downstreawm from node

* accounts: use static buffer size for accman sub chan

minor fix

* accounts,cmd/geth: update accman backends through its event loop

* accounts,node: add comments

* accounts: un-export newBackendEvent

* accounts: use chan instead of wg in newBlockEvent

* node: rename isKeyDirEphem

* accounts,cmd: AddBackends->AddBackend

* accounts: fix potential blocking when adding backend
2025-01-24 16:18:30 +08:00
Daniel Liu
e33909649b cmd/utils: don't enumerate usb when --usb isn't set (#22130) 2025-01-24 16:18:30 +08:00
Daniel Liu
0d1cd42dc2 accounts/keystore: fix double import race (#20915)
* accounts/keystore: fix race in Import/ImportECDSA

* accounts/keystore: added import/export tests

* cmd/geth: improved TestAccountImport test

* accounts/keystore: added import/export tests

* accounts/keystore: fixed naming

* accounts/keystore: fixed typo

* accounts/keystore: use mutex instead of rwmutex

* accounts: use errors instead of fmt
2025-01-24 16:18:29 +08:00
Daniel Liu
e90df44b43 accounts: replace passPHRASE with passWORD in any user interactions (#19932) 2025-01-24 16:18:29 +08:00
Daniel Liu
100ea1c8e0 accounts/scwallet: add a switch to specify path to sc daemon (#19439) 2025-01-24 16:18:29 +08:00
Daniel Liu
fa35614784 accounts, cmd: add note about backing up the keystore (#19432) 2025-01-24 16:18:29 +08:00
Daniel Liu
194a77505f accounts: switch Ledger derivation path to canonical one (#19438) 2025-01-24 16:18:29 +08:00
Daniel Liu
4224367396 cmd/XDC: add db commands: stats, compact, put, get, delete (#22014) 2025-01-24 15:32:08 +08:00
Daniel Liu
1ff36996c0 cmd/XDC: delete copydb command 2025-01-24 14:41:28 +08:00
Daniel Liu
97c50f97bb all: add read-only option to database 2025-01-24 14:24:39 +08:00
JukLee0ira
653b59710e core/rawdb: separate raw database access to own package (#16666 #19345) 2025-01-22 15:19:39 +08:00
Daniel Liu
6beee27886 metrics, cmd/XDC: change init-process of metrics (#30814)
This PR modifies how the metrics library handles `Enabled`: previously,
the package `init` decided whether to serve real metrics or just
dummy-types.

This has several drawbacks:
- During pkg init, we need to determine whether metrics are enabled or
not. So we first hacked in a check if certain geth-specific
commandline-flags were enabled. Then we added a similar check for
geth-env-vars. Then we almost added a very elaborate check for
toml-config-file, plus toml parsing.

- Using "real" types and dummy types interchangeably means that
everything is hidden behind interfaces. This has a performance penalty,
and also it just adds a lot of code.

This PR removes the interface stuff, uses concrete types, and allows for
the setting of Enabled to happen later. It is still assumed that
`metrics.Enable()` is invoked early on.

The somewhat 'heavy' operations, such as ticking meters and exp-decay,
now checks the enable-flag to prevent resource leak.

The change may be large, but it's mostly pretty trivial, and from the
last time I gutted the metrics, I ensured that we have fairly good test
coverage.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-12-13 14:00:14 +08:00
Daniel Liu
2220156b9a cmd, core, metrics: always report expensive metrics (#29191)
* cmd, core, metrics: always report expensive metrics

* core, metrics: report block processing metrics as resetting timer

* metrics: update reporter tests
2024-12-13 14:00:13 +08:00
Daniel Liu
35380508fc metrics, cmd/geth: informational metrics (prometheus, influxdb, opentsb) (#24877)
This chang creates a GaugeInfo metrics type for registering informational (textual) metrics, e.g. geth version number. It also improves the testing for backend-exporters, and uses a shared subpackage in 'internal' to provide sample datasets and ordered registry.

Implements #21783

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-12-13 14:00:13 +08:00
Daniel Liu
29b72dbba6 metrics/influxdb: support V2 (#23194) 2024-12-13 14:00:12 +08:00
Daniel Liu
9d082aa38c cmd/XDC: dump config for metrics (#22083) 2024-12-13 14:00:12 +08:00
Daniel Liu
c65d0cd947 cmd/XDC: enable metrics for geth import command (#20738) 2024-12-13 14:00:12 +08:00
Daniel Liu
db9487f1e8 core: split out detailed trie access metrics from insertion time (#19316) 2024-12-13 14:00:11 +08:00
Daniel Liu
3e4583e7c4 cmd/utils: allow for multiple influxdb flags (#18520) 2024-12-13 14:00:11 +08:00
Daniel Liu
92a7b64961 metrics: export to InfluxDB (#16979) 2024-12-13 14:00:11 +08:00
Daniel Liu
11b74151bd cmd/XDC: fix double metrics collect process issue 2024-12-13 13:56:09 +08:00
Daniel Liu
bedd571091 crypto/kzg4844: pull in the C and Go libs for KZG cryptography (#27155) 2024-12-09 17:49:00 +08:00
Daniel Liu
ae56946690 internal/flags: remove low-use type TextMarshalerFlag (#30707) 2024-11-25 16:39:29 +08:00
Daniel Liu
4e192a5172 cmd/XDC, internal/flags: print envvar config source and bad names (#28119) 2024-11-25 16:39:29 +08:00
Daniel Liu
197551c729 cmd/geth, internal/flags, go.mod: colorize cli help, support env vars (#28103) 2024-11-25 16:39:29 +08:00
Daniel Liu
bda88affe6 cmd/XDC: add version in --help output (#26895) 2024-11-25 16:39:29 +08:00
Daniel Liu
3e1ea87ca2 cmd/XDC: fix some cli parsing issues (#25234) 2024-11-25 16:39:29 +08:00
Daniel Liu
369d69649f all: normalize flag's name 2024-11-25 16:39:29 +08:00
Daniel Liu
dcab7e8efb cmd: migrate to urfave/cli/v2 (#24751) 2024-11-25 16:39:29 +08:00
JukLee0ira
6f9fb9d1da node, p2p/simulations: fix node.Node AccountsManager leak (#19004) 2024-11-25 16:33:26 +08:00
Daniel Liu
ec4ca1ed6a all: replace log15 with slog (#28187) 2024-11-15 10:02:42 +08:00
JukLee0ira
85ede14a92 cmd: retire whisper flags (#22421) 2024-11-13 12:38:36 +08:00
JukLee0ira
cfb72501bf cmd/geth: print warning when whisper config is present in toml (#21544) 2024-11-13 12:38:07 +08:00
JukLee0ira
749037a97c whisper: remove whisper (#21487) 2024-11-13 12:37:10 +08:00