Commit graph

1867 commits

Author SHA1 Message Date
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
Daniel Liu
f79763ca88 all: fix staticcheck warning S1039: unnecessary use of fmt.Sprintf 2024-10-24 12:49:37 +08:00
Daniel Liu
a79411fa06 all: fix staticcheck warning ST1005: incorrectly formatted error string 2024-10-24 09:48:20 +08:00
Liam Lai
22fc7d0710 fix conflict 2024-10-16 22:42:53 -07:00
Daniel Liu
a8ea86e40c
Merge pull request #644 from gzliudan/format-0x
all: change format 0x%x to %#x
2024-10-17 10:35:34 +08:00
Mr.P
861c7102a2 cherry pick from #664 2024-10-09 17:08:59 +08:00
Mr.P
22c54206bd
add flag rpc-gascap and set RPCGasCap to 50M (#664)
* add gas cap flag

* default gas cap to 50m

* rpc-gascap
2024-10-09 09:28:24 +08:00
Daniel Liu
edace6ac6c all: change format 0x%x to %#x (#25221) 2024-09-27 15:24:31 +08:00
Daniel Liu
c47819c7d6 core, cmd: add generic LRU implementation (#26162) 2024-08-26 11:17:23 +08:00
wanwiset25
cb792ef34f Revert EIP-2464 2024-08-24 02:31:27 +07:00
Liam
e3df8e55a6
remove legacy testnet validate masternode logic (#603)
* remove legacy testnet validate masternode logic

* remove legacy testnet validate masternode logic

* remove legacy testnet validate masternode logic
2024-08-12 00:13:36 -07:00
wgr523
52077f18f3
support for golang tracers + add golang callTracer (#558)
* feat: rename Tracer interface to EVMLogger;
minor changes in API
refine api_tracer.go
refine Tracer interface

* fix: broken tracer tests

* feat: add BenchmarkTransactionTrace

* feat: tracer CaptureEnter CaptureExit in evm

* feat: upgrade js tracers with geth upstream

* chore: clean test

* feat: eth/tracers: support for golang tracers + add golang callTracer
cf. https://github.com/ethereum/go-ethereum/pull/23708

* chore: clean testdata json

* fix: change test due to IntrinsicGas is not upgraded

* feat: make native Tracer the default Tracer

* fix: update tracers.New in api

* fix: addr prefix in callTracer

* fix: remove `native` in BenchmarkTracers

* fix: return consensus error of InsufficientBalance for tx, instead of vmerr

* chore: drop js tracers: call and noop
2024-08-06 00:14:04 -07:00
JukLee0ira
ad71d706fb all: add global block logs cache (#25459) 2024-08-03 10:03:22 +08:00
Daniel Liu
99c2e18b88 cmd/geth: move cache sanity check to SetEthConfig (#22510) 2024-08-03 08:12:28 +08:00
Daniel Liu
b2c6191bea cmd/XDC: expose CacheFlag and CacheDatabaseFlag 2024-08-03 08:12:28 +08:00
Daniel Liu
020fac603c cmd/utils: allow file descriptor limit to be set via CLI (#24477) 2024-08-03 08:12:28 +08:00
Daniel Liu
9cedb25a8d common/fdlimit: cap on MacOS file limits, fixes #18994 (#19035) 2024-08-03 08:12:28 +08:00
Daniel Liu
cb8a9edd03 cmd/utils: max out the OS file allowance, don't cap to 2K (#18211) 2024-08-03 08:12:28 +08:00
Felix Lange
3ca7a7c1d6 p2p, p2p/discover: add signed ENR generation (#17753)
This PR adds enode.LocalNode and integrates it into the p2p
subsystem. This new object is the keeper of the local node
record. For now, a new version of the record is produced every
time the client restarts. We'll make it smarter to avoid that in
the future.

There are a couple of other changes in this commit: discovery now
waits for all of its goroutines at shutdown and the p2p server
now closes the node database after discovery has shut down. This
fixes a leveldb crash in tests. p2p server startup is faster
because it doesn't need to wait for the external IP query
anymore.
2024-06-28 11:30:16 +04:00
Felix Lange
1bdf53662e all: new p2p node representation (#17643)
Package p2p/enode provides a generalized representation of p2p nodes
which can contain arbitrary information in key/value pairs. It is also
the new home for the node database. The "v4" identity scheme is also
moved here from p2p/enr to remove the dependency on Ethereum crypto from
that package.

Record signature handling is changed significantly. The identity scheme
registry is removed and acceptable schemes must be passed to any method
that needs identity. This means records must now be validated explicitly
after decoding.

The enode API is designed to make signature handling easy and safe: most
APIs around the codebase work with enode.Node, which is a wrapper around
a valid record. Going from enr.Record to enode.Node requires a valid
signature.

* p2p/discover: port to p2p/enode

This ports the discovery code to the new node representation in
p2p/enode. The wire protocol is unchanged, this can be considered a
refactoring change. The Kademlia table can now deal with nodes using an
arbitrary identity scheme. This requires a few incompatible API changes:

  - Table.Lookup is not available anymore. It used to take a public key
    as argument because v4 protocol requires one. Its replacement is
    LookupRandom.
  - Table.Resolve takes *enode.Node instead of NodeID. This is also for
    v4 protocol compatibility because nodes cannot be looked up by ID
    alone.
  - Types Node and NodeID are gone. Further commits in the series will be
    fixes all over the the codebase to deal with those removals.

* p2p: port to p2p/enode and discovery changes

This adapts package p2p to the changes in p2p/discover. All uses of
discover.Node and discover.NodeID are replaced by their equivalents from
p2p/enode.

New API is added to retrieve the enode.Node instance of a peer. The
behavior of Server.Self with discovery disabled is improved. It now
tries much harder to report a working IP address, falling back to
127.0.0.1 if no suitable address can be determined through other means.
These changes were needed for tests of other packages later in the
series.

* p2p/simulations, p2p/testing: port to p2p/enode

No surprises here, mostly replacements of discover.Node, discover.NodeID
with their new equivalents. The 'interesting' API changes are:

 - testing.ProtocolSession tracks complete nodes, not just their IDs.
 - adapters.NodeConfig has a new method to create a complete node.

These changes were needed to make swarm tests work.

Note that the NodeID change makes the code incompatible with old
simulation snapshots.

* whisper/whisperv5, whisper/whisperv6: port to p2p/enode

This port was easy because whisper uses []byte for node IDs and
URL strings in the API.

* eth: port to p2p/enode

Again, easy to port because eth uses strings for node IDs and doesn't
care about node information in any way.

* les: port to p2p/enode

Apart from replacing discover.NodeID with enode.ID, most changes are in
the server pool code. It now deals with complete nodes instead
of (Pubkey, IP, Port) triples. The database format is unchanged for now,
but we should probably change it to use the node database later.

* node: port to p2p/enode

This change simply replaces discover.Node and discover.NodeID with their
new equivalents.

* swarm/network: port to p2p/enode

Swarm has its own node address representation, BzzAddr, containing both
an overlay address (the hash of a secp256k1 public key) and an underlay
address (enode:// URL).

There are no changes to the BzzAddr format in this commit, but certain
operations such as creating a BzzAddr from a node ID are now impossible
because node IDs aren't public keys anymore.

Most swarm-related changes in the series remove uses of
NewAddrFromNodeID, replacing it with NewAddr which takes a complete node
as argument. ToOverlayAddr is removed because we can just use the node
ID directly.
2024-06-28 11:30:16 +04:00
Daniel Liu
f445196dcf eth/gasprice: add configurable threshold to gas price oracle (#22752) 2024-06-20 15:52:32 +08:00
Daniel Liu
1521b8a663 eth: move eth.Config to a common package (#22205) 2024-06-20 15:52:32 +08:00
Daniel Liu
2125a1afaa eth/gasprice: offer maxprice flag for overwritting price cap (#21531) 2024-06-20 15:52:32 +08:00
Daniel Liu
56591d37e1 eth/gasprice: lighter gas price oracle for light client (#20409) 2024-06-20 15:52:32 +08:00
Daniel Liu
0063c14ed3 cmd, eth, internal, les: add gasprice cap (#21212) 2024-06-20 15:52:32 +08:00
Liam Lai
d28c7f659d rebase from dev-upgrade 2024-06-19 16:05:08 +08:00
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
JukLee0ira
0aab4ced98 common: add binary variables for system contract 2024-06-06 19:33:59 +08:00
Gary
0245344338 add TraceCall, backend.StateAtBlock(), RPCGasCap
update gen_config.go by tool `gencodec`
2024-05-17 21:34:34 +08:00