Commit graph

2011 commits

Author SHA1 Message Date
Daniel Liu
d451580b37
miner, XDPoS, XDC: close chanels by owner, close XFN-41 (#1641) 2025-11-03 14:52:31 +05:30
wit liu
6a1fa08d02
all: refactor to use builtin max/min #32694 (#1596) 2025-10-08 12:52:22 +08:00
wit liu
11e82672fe
cmd: fix lint error mirror (#1575) 2025-10-08 12:25:59 +08:00
Daniel Liu
5e9db6066d
console: add note about typing exit to exit #23602 (#1532)
* add explicit note about typing exit in console

* Add note about typing exit as alternative

Co-authored-by: Thad Guidry <thadguidry@gmail.com>
2025-10-08 12:22:52 +08:00
wit liu
cd74961cda
cmd: fix ineffectual assignment (#1563) 2025-09-27 10:40:38 +08:00
Daniel Liu
0ece8529c4
cmd, eth, internal/ethapi: allow for flag configured timeouts for eth_call #23645 (#1593) 2025-09-26 19:01:02 +08:00
Daniel Liu
294591e67e
all: remove duplicate word in comments (#1570) 2025-09-24 07:57:33 +08:00
wit liu
2b658e7934
core: fix unnecessary conversion (#1565) 2025-09-24 07:55:14 +08:00
Daniel Liu
6c73723f47
cmd, console: drop geth js command #25000 (#1534) 2025-09-24 07:47:21 +08:00
Daniel Liu
db0cd1581f
console: don't exit on ctrl-c, only on ctrl-d #21660 (#1531)
* add interrupt counter

* remove interrupt counter, allow ctrl-C to clear ONLY, ctrl-D will terminate console, stop node

* format

* add instructions to exit

* fix tests

Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
2025-09-24 07:46:25 +08:00
Daniel Liu
22dc136ffe
cmd: replace passPHRASE with passWORD in any user interactions #19932 (#1535) 2025-09-21 19:31:00 +08:00
Daniel Liu
8615067df1
cmd, console, internal: support interrupting the js console #23387 (#1533) 2025-09-21 19:23:41 +08:00
Daniel Liu
5ad87e559f
cmd, console: password input fixes #20960 (#1524) 2025-09-21 18:59:34 +08:00
Wanwiset Peerapatanapokin
1f6bd2bae5
Merge pull request #1280 from XinFinOrg/XDPoSv2-privatenet-improve-genesis
Improve genesis for easy privatechain deployment
2025-09-20 19:03:52 +04:00
wanwiset25
30e1a9a7fd fix 2025-09-20 17:56:20 +04:00
Daniel Liu
af69d382ff
eth/tracers: various fixes #30540 (#1491)
Breaking changes:

- The ChainConfig was exposed to tracers via VMContext passed in
`OnTxStart`. This is unnecessary specially looking through the lens of
live tracers as chain config remains the same throughout the lifetime of
the program. It was there so that native API-invoked tracers could
access it. So instead we moved it to the constructor of API tracers.

Non-breaking:

- Change the default config of the tracers to be `{}` instead of nil.
This way an extra nil check can be avoided.

Refactoring:

- Rename `supply` struct to `supplyTracer`.
- Un-export some hook definitions.

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
2025-09-17 09:04:38 +08:00
wit liu
99e2885b03
all: fix misspell (#1510)
Co-authored-by: wit <wit765765346@gmail>
2025-09-17 08:27:52 +08:00
wit liu
4a6fccaf69
all: fix whitespace (#1506)
Co-authored-by: wit <wit765765346@gmail>
2025-09-17 08:23:06 +08:00
wanwiset25
ae696dc547 func CopyConstants choose local chain if unknown chainID 2025-09-14 15:21:26 +04:00
wanwiset25
a1e5a98377 update validator initial configs 2025-09-14 15:19:19 +04:00
wanwiset25
069cd8ebce fix wrong storage in genesis due to rlp changed behavior (EIP-2718) 2025-09-14 15:19:19 +04:00
wanwiset25
4df9699821 genesis wizard accept file input 2025-09-14 15:19:19 +04:00
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
7d4d81f586
eth/tracers, core/vm: remove time from trace output and tracing interface #26291 (#1311)
This removes the 'time' field from logs, as well as from the tracer interface. This change makes the trace output deterministic.  If a tracer needs the time they can measure it themselves. No need for evm to do this.

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2025-09-09 09:26:10 +08:00
Daniel Liu
05a9e91898
cmd/abigen, accounts/abi/bind: implement abigen version 2 #31379 (#1416)
This PR implements a new version of the abigen utility (v2) which exists
along with the pre-existing v1 version.

Abigen is a utility command provided by go-ethereum that, given a
solidity contract ABI definition, will generate Go code to transact/call
the contract methods, converting the method parameters/results and
structures defined in the contract into corresponding Go types. This is
useful for preventing the need to write custom boilerplate code for
contract interactions.

Methods in the generated bindings perform encoding between Go types and
Solidity ABI-encoded packed bytecode, as well as some action (e.g.
`eth_call` or creating and submitting a transaction). This limits the
flexibility of how the generated bindings can be used, and prevents
easily adding new functionality, as it will make the generated bindings
larger for each feature added.

Abigen v2 was conceived of by the observation that the only
functionality that generated Go bindings ought to perform is conversion
between Go types and ABI-encoded packed data. Go-ethereum already
provides various APIs which in conjunction with conversion methods
generated in v2 bindings can cover all functionality currently provided
by v1, and facilitate all other previously-desired use-cases.

To generate contract bindings using abigen v2, invoke the `abigen`
command with the `--v2` flag. The functionality of all other flags is
preserved between the v2 and v1 versions.

The execution of `abigen --v2` generates Go code containing methods
which convert between Go types and corresponding ABI-encoded data
expected by the contract. For each input-accepting contract method and
the constructor, a "packing" method is generated in the binding which
converts from Go types to the corresponding packed solidity expected by
the contract. If a method returns output, an "unpacking" method is
generated to convert this output from ABI-encoded data to the
corresponding Go types.

For contracts which emit events, an unpacking method is defined for each
event to unpack the corresponding raw log to the Go type that it
represents.

Likewise, where custom errors are defined by contracts, an unpack method
is generated to unpack raw error data into a Go type.

For a smooth user-experience, abigen v2 comes with a number of utility
functions to be used in conjunction with the generated bindings for
performing common contract interaction use-cases. These include:

* filtering for historical logs of a given topic
* watching the chain for emission of logs with a given topic
* contract deployment methods
* Call/Transact methods

https://geth.ethereum.org will be updated to include a new tutorial page
for abigen v2 with full code examples. The page currently exists in a
PR: https://github.com/ethereum/go-ethereum/pull/31390 .

There are also extensive examples of interactions with contract bindings
in [test
cases](cc855c7ede/accounts/abi/bind/v2/lib_test.go)
provided with this PR.

---------

Co-authored-by: jwasinger <j-wasinger@hotmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-09-03 15:47:12 +08:00
Daniel Liu
e2edc41b50
all: mv loggers to eth/tracers #23892 (#1269) 2025-09-03 15:35:28 +08:00
Daniel Liu
031ea75eca
eth/tracers: package restructuring #23857 (#1266) 2025-08-29 05:26:36 +08:00
Daniel Liu
6f36533962
all: remove ethash pow 27178 (#1378) 2025-08-26 11:54:01 +08:00
Daniel Liu
516883d14c
all: snapshot dump + unify with trie dump #22795 (#1205) 2025-08-22 16:39:28 +08:00
Daniel Liu
4ec6e8cd58
cmd, node, p2p: implement whitelist and blacklist for peers (#1331) 2025-08-20 15:14:56 +08:00
Daniel Liu
36374be05f
eth/tracers: move tracing APIs into eth/tracers #22161 #22473 (#1252) 2025-08-08 10:25:43 +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
34a245fbc8
all: use common.FileExist for checking file existence #24748 (#1212) 2025-07-11 10:42:51 +08:00
Daniel Liu
618a8dd247
core, cmd: streaming json output for command #15475 (#1184) 2025-07-11 09:29:13 +08:00
JukLee0ira
b413f71763
all: remove personal RPC namespace #30704 (#1180) 2025-07-02 09:11:58 +08:00
JukLee0ira
1c5b5ea883
node: remove unused error return from Attach #27450 (#1155) 2025-06-26 10:51:24 +08:00
JukLee0ira
b15a8ac67e
cmd/geth: accountcmd no need to acquire the datadir lock #27084 (#1154) 2025-06-26 10:50:28 +08:00
JukLee0ira
afa3a4ea5c
cmd, internal/ethapi: avoid panic if keystore is not available #27039 (#1157) 2025-06-26 09:14:41 +08:00
JukLee0ira
16f41238b8
cmd, console, node : deprecate personal namespace #26390 (#1153) 2025-06-25 17:57:33 +08:00
Daniel Liu
10c7e1d775
ccid, cmd: disable personal module by default (#1148) 2025-06-25 16:58:46 +08:00
Daniel Liu
93c2745b7b
all: disable recording preimage of trie keys #21402 (#1054) 2025-06-17 13:10:47 +08:00
Daniel Liu
ae70b5dc14
cmd: disable prefetch next block state by default, fix #997 (#1025) 2025-06-06 17:23:12 +08:00
Daniel Liu
aa7c8644c3
all: fix tests on 32-bit and windows + minor rpc fixes #21871 (#1055) 2025-06-03 11:47:11 +08:00
JukLee0ira
c145287e87
node: allow JWT pass by file only #24579 (#1035) 2025-05-16 12:01:36 +08:00
Daniel Liu
fbd4364fc3
cmd, debug: fix debug_verbosity (#1030) 2025-05-08 16:10:53 +08:00
JukLee0ira
fe422720f3
cmd, node: implement --authrpc-vhosts flag #24506 (#1028) 2025-05-08 11:13:44 +08:00
Daniel Liu
80abc58f25
all: replace some cases of strings.SplitN with strings.Cut #28446 (#1007)
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
2025-04-28 18:07:59 +08:00
Daniel Liu
c75623ace7
rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00