Commit graph

1895 commits

Author SHA1 Message Date
wanwiset25
44ac46f676 add local xdpos function
add readme

changes to support xdpos2 protocol from block 0
2025-01-01 22:06:09 -05:00
Daniel Liu
ebc036682e common/compiler, cmd/abigen: remove solc/vyper compiler integration (#24936) 2024-12-28 09:06:30 +08:00
Daniel Liu
057a7dd780 cmd/abigen: refactor command line interface (#19797) 2024-12-28 09:06:30 +08:00
Daniel Liu
993bc6963e accounts/abi/bind: link dependent libs in deploy (#19718) 2024-12-28 09:06:30 +08:00
Daniel Liu
7455b91800 accounts/abi/bind: accept function ptr parameter (#19755) 2024-12-28 09:06:30 +08:00
Daniel Liu
b711dc811d cmd/abigen: allow using abigen --pkg flag with standard input (#19207) 2024-12-28 09:06:30 +08:00
Daniel Liu
66921899e9 cmd/abigen: support Vyper (#19120) 2024-12-28 09:06:30 +08:00
Daniel Liu
f19422e1c7 cmd/utils: relinquish GC cache to read cache in archive mode (#18991) 2024-12-28 09:06:30 +08:00
Daniel Liu
c0f547ca78 cmd/utils: fix bug when checking for flag value conflicts (#17803) 2024-12-28 09:06:30 +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
ad5e7d6db3 crypto: add SignatureLength constant and use it everywhere (#19996) 2024-12-09 17:48:59 +08:00
Daniel Liu
02a59e8d84 all: replace strings.Replace with string.ReplaceAll (#24835) 2024-12-08 11:51:14 +08:00
Daniel Liu
d55dca04b5 all: use http package to replace http method names (26535) 2024-12-05 10:59:42 +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
bd916d100a cmd/evm, internal/debug: use global functions when cli v1 2024-11-21 17:40:51 +08:00
JukLee0ira
cba5782884 accounts, build, mobile: remove Android and iOS support (#26599) 2024-11-15 15:46:25 +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
Daniel Liu
b1d6bec3bd cmd, node: dump empty value config (#21296) 2024-11-13 09:35:41 +08:00
Daniel Liu
3f1b7d3a7b rpc: check module availability at startup (#20597) 2024-11-13 09:35:41 +08:00
Daniel Liu
d3c023ed37 cmd/XDC, internal, node: nuke XDC monitor (#19399) 2024-11-13 09:35:41 +08:00
Daniel Liu
216ee418f1 cmd/utils, node: increase default maxpeers to 50 (#19497) 2024-11-04 16:13:02 +08:00
Daniel Liu
97a5ff616b rpc: Make HTTP server timeout values configurable (#17240) 2024-11-04 12:31:15 +08:00
Daniel Liu
8b2e8d9b3a all: refactor txpool into it's own package in prep for 4844 (#26038) 2024-11-01 11:36:53 +08:00
Daniel Liu
26fe46c008 eth/gasprice: implement feeHistory API (#23033) 2024-11-01 11:36:52 +08:00
Daniel Liu
edce9ccb27 all: fix staticcheck warning S1024: not use x.Sub(time.Now()) 2024-10-31 10:49:44 +08:00
Daniel Liu
60fedfed83 fix staticcheck SA5011: possible nil pointer dereference 2024-10-31 09:01:12 +08:00
Daniel Liu
371c3b6874 fix tautological condition: non-nil != nil 2024-10-31 09:01:12 +08:00
liam.icheng.lai
59a7eb1f9f resolve conflict from master 2024-10-30 16:47:26 -07:00
Daniel Liu
fbecb8c5a5 all: fix staticcheck warning ST1006: don't use generic name self
The name of a method’s receiver should be a reflection of its identity;
often a one or two letter abbreviation of its type suffices (such as
“c” or “cl” for “Client”). Don’t use generic names such as “me”, “this”
or “self”, identifiers typical of object-oriented languages that place
more emphasis on methods as opposed to functions. The name need not be
as descriptive as that of a method argument, as its role is obvious and
serves no documentary purpose. It can be very short as it will appear
on almost every line of every method of the type; familiarity admits
brevity. Be consistent, too: if you call the receiver “c” in one method,
don’t call it “cl” in another.
2024-10-25 21:30:54 +08:00
Daniel Liu
87a6b5f4c3
Merge pull request #689 from gzliudan/fix-st1005
all: fix staticcheck warning ST1005
2024-10-25 15:28:07 +08:00