Commit graph

43 commits

Author SHA1 Message Date
Daniel Liu
b71279d442
feat(metrics): allow changing influxdb interval #33767 (#2118) 2026-03-06 11:24:00 +05:30
wit liu
a83c43f240
all: use 0x-prefix string for type Address in log message (#1874) 2025-12-19 08:55:21 +04:00
Daniel Liu
07328dcec4
core, eth, trie: abstract node scheme #25532 (#1123)
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon.

Apart from that, a few changes are also included which is worth mentioning:

-  port the changes in the stacktrie, tracking the path prefix of nodes during commit
-  use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-17 11:25:08 +05:30
Daniel Liu
c9f2b73861
cmd, eth: rename config and flag to VMTraceJsonConfig #29573 (#1490) 2025-09-13 10:52:31 +08:00
wit765
12eab8e785
all: rename ChainId to ChainID #16853 (#1456)
Co-authored-by: wit <wit765765346@gmail>
2025-09-09 22:54:34 +08:00
Daniel Liu
ad9003c41e
eth/tracers: live chain tracing with hooks #29189 (#1352)
Here we add a Go API for running tracing plugins within the main block import process.

As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within
that file register your custom tracer implementation. Then recompile geth and select your tracer
on the command line. Hooks defined in the tracer will run whenever a block is processed.

The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of
requiring an interface, for several reasons:

- We plan to keep this API stable long-term. The core/tracing hook API does not depend on
  on deep geth internals.
- There are a lot of hooks, and tracers will only need some of them. Using a struct allows you
   to implement only the hooks you want to actually use.

All existing tracers in eth/tracers/native have been rewritten to use the new hook system.

This change breaks compatibility with the vm.EVMLogger interface that we used to have.
If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking
your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM.

---------

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2025-09-09 17:30:56 +08:00
Daniel Liu
516883d14c
all: snapshot dump + unify with trie dump #22795 (#1205) 2025-08-22 16:39:28 +08:00
Daniel Liu
390ea247d3
cmd/XDC: fixes db unavailability for chain commands #21415 (#1204) 2025-07-28 16:56:37 +08:00
Daniel Liu
618a8dd247
core, cmd: streaming json output for command #15475 (#1184) 2025-07-11 09:29:13 +08:00
JukLee0ira
b1e08e6642
all: refactor package node #21105 (#923) 2025-04-10 18:52:49 +08:00
Daniel Liu
a4c7d7f458 all: clean duplicate constants in package common 2025-04-07 16:43:01 +08:00
Daniel Liu
5fff93dd01 cmd: group network and database flags together 2025-03-20 10:37:01 +08:00
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
92bc30bc37 cmd: remove deprecated flags --fast and --light 2025-02-21 15:35:09 +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
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
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
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
29b72dbba6 metrics/influxdb: support V2 (#23194) 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
ae56946690 internal/flags: remove low-use type TextMarshalerFlag (#30707) 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
Wanwiset Peerapatanapokin
75c8d40399
Ensure DB is close before client exit (#478) 2024-03-08 14:57:15 +04:00
Liam Lai
69c38ac490 fix broken the tests and one bug 2023-08-02 09:27:46 +10:00
Liam Lai
5623ce8de0 merge from master 2023-07-30 16:50:45 +10:00
Daniel Liu
87455baf2e init genesis from source if flag --apothem 2023-04-20 16:52:35 +08:00
Jerome
bcffe1ec16
Give the XDC option to use emit metrics (#89) 2022-06-19 13:42:48 +02:00
wgr523
8fde52c512
Xin 145 (#82)
* add HandleProposedBlock() in procFutureBlocks()

* add proposedBlockHandler for downloader
2022-04-22 00:12:44 +08:00
olumuyiwadad
b5abbfed79 new EVM Upgrade
- Solidity Upgraded up to v0.8.0
-  Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
571c41f891 FIx Bad block error. 2021-09-17 17:59:06 +05:30
dev-vadim
dbe8c9d984 upgrade XDC.Network with v1.8.27. 2020-12-23 16:32:06 +05:30
diglspacedavid
474cc37036 upgrade codebase with ethereum:v1.8.13 2020-11-23 13:40:30 +05:30
AnilChinchawale
05a7433768 Fixed issue accountcmd & chaincmd | File Modified 2018-12-31 23:28:15 +05:30
AnilChinchawale
9bc7680c02 remove rinkby and discovery in bootnode 2018-10-31 10:56:58 +05:30
parmarrushabh
cb5a55a904 change config from flag to toml file; fix tag listenaddr 2018-10-31 10:30:25 +05:30
AnilChinchawale
5d7c5ef101 updated XDC WITH NEW MODE 2018-05-24 14:23:51 +05:30