Commit graph

510 commits

Author SHA1 Message Date
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
wanwiset25
cb792ef34f Revert EIP-2464 2024-08-24 02:31:27 +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
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
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
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
Gary
0245344338 add TraceCall, backend.StateAtBlock(), RPCGasCap
update gen_config.go by tool `gencodec`
2024-05-17 21:34:34 +08:00
Wanwiset Peerapatanapokin
328176651c
use 0x address scheme by default and add new enable xdc prefix flag (#518) 2024-04-12 12:27:39 +07:00
Wanwiset Peerapatanapokin
aaa246f60e
PDF-01 (#397)
* replace deprecated ioutil lib calls

* fix for FileInfo type required

* fix for ioutil.Discard

* fix .Discard

* fix for go-bindata generated files
2024-01-19 15:05:03 +04:00
Daniel Liu
6f06a5638b add flag rpcwritetimeout for rpc http server (#358) 2023-11-27 22:48:56 +08:00
Liam Lai
5623ce8de0 merge from master 2023-07-30 16:50:45 +10:00
wgr523
cd74061ac2
Extend masternode candidate (#261)
* V2 truncate MaxMasternodes from candidates after penalty,
V1 same as before

TestUpdateMultipleMasterNodes: test V2, in snapshot we have all candidates, but at epoch switch, we pick MaxMasternodes

* code looks better
2023-05-16 21:43:56 +08:00
Daniel Liu
6a768b04f9
add enable-0x-prefix flag (#194) 2022-12-09 19:15:13 +08:00
Jerome
bcffe1ec16
Give the XDC option to use emit metrics (#89) 2022-06-19 13:42:48 +02: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
Jianrong
0fdab2027c add linting as the first CI task 2021-08-07 14:27:08 +10:00
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
Martin Holst Swende
e872ba7a9e
eth, les, geth: implement cli-configurable global gas cap for RPC calls (#19401)
* eth, les, geth: implement cli-configurable global gas cap for RPC calls

* graphql, ethapi: place gas cap in DoCall

* ethapi: reformat log message
2019-04-08 15:15:13 +03:00
AnilChinchawale
a638d2adc0 Minor error fixed. 2019-03-16 16:02:10 +05:30
parmarrushabh
1b13b3a305 hot fix 2019-02-24 17:40:26 +05:30
Anton Evangelatov
4f908db69e
cmd/utils: allow for multiple influxdb tags (#18520)
This PR is replacing the metrics.influxdb.host.tag cmd-line flag with metrics.influxdb.tags - a comma-separated key/value tags, that are passed to the InfluxDB reporter, so that we can index measurements with multiple tags, and not just one host tag.

This will be useful for Swarm, where we want to index measurements not just with the host tag, but also with bzzkey and git commit version (for long-running deployments).

(cherry picked from commit 21acf0bc8d)
2019-02-19 17:34:48 +01:00
Martin Holst Swende
048b463b30
common/fdlimit: cap on MacOS file limits, fixes #18994 (#19035)
* common/fdlimit: cap on MacOS file limits, fixes #18994

* common/fdlimit: fix Maximum-check to respect OPEN_MAX

* common/fdlimit: return error if OPEN_MAX is exceeded in Raise()

* common/fdlimit: goimports

* common/fdlimit: check value after setting fdlimit

* common/fdlimit: make comment a bit more descriptive

* cmd/utils: make fdlimit happy path a bit cleaner

(cherry picked from commit f48da43bae)
2019-02-19 10:57:49 +02:00
Péter Szilágyi
2072c26a96
cmd, core, params: add support for Goerli
(cherry picked from commit b0ed083ead)
2019-02-19 10:53:47 +02:00
parmarrushabh
56e1251a94 clean all state of block signer 2019-02-14 14:46:00 +05:30
AnilChinchawale
1ce4eba0d6 Fixed issue | File updated 2019-01-06 08:32:23 +05:30
Martin Holst Swende
83a9a73b89 cmd/geth, core, eth: implement Constantinople override flag (#18273)
* geth/core/eth: implement constantinople override flag

* les: implemnent constantinople override flag for les clients

* cmd/geth, eth, les: fix typo, move flag to experimentals
2018-12-11 14:19:03 +02:00
Péter Szilágyi
31b3334922
cmd/utils, eth: minor polishes on whitelist code 2018-12-10 14:47:01 +02:00
Ryan Schneider
48b70ecff1
cmd, eth: Add support for --whitelist <blocknum>=<hash>,... flag
* Rejects peers that respond with a different hash for any of the passed in block numbers.
* Meant for emergency situations when the network forks unexpectedly.
2018-12-10 14:30:06 +02:00
AnilChinchawale
4a6e8c7f5d Won't grasp txs at checkpoint 2018-12-07 10:42:40 +05:30
parmarrushabh
4a12d746ff tmp fix ethash unittests 2018-12-04 14:25:55 +05:30
parmarrushabh
2b7010d51f add state variable to verifyHeader(), verifyHeaders() in the consensus 2018-12-02 12:21:48 +05:30
Péter Szilágyi
cf62bd2e88
cmd/utils: max out the OS file allowance, don't cap to 2K 2018-11-29 12:47:29 +02:00
parmarrushabh
c2414371ca fix error read reward 2018-11-24 17:40:36 +05:30
AnilChinchawale
4624bbb988 updated utils.go 2018-11-24 16:23:43 +05:30
Ferenc Szabo
76f5f662cc cmd/swarm: FUSE do not require --ipcpath (#18112)
- Have `${DataDir}/bzzd.ipc` as IPC path default.
- Respect the `--datadir` flag.
- Keep only the global `--ipcpath` flag and drop the local `--ipcpath` flag
  as flags might overwrite each other. (Note: before global `--ipcpath`
  was ignored even if it was set)

fixes ethersphere#795
2018-11-23 01:32:34 +01:00
parmarrushabh
51c88fe8ce create new api get reward 2018-11-19 11:21:42 +05:30
parmarrushabh
ece14048a5 fixed only three MNs making block when --XDC testnet flag enable 2018-11-17 17:10:09 +05:30
parmarrushabh
5501a5707c fixed 2018-11-17 16:15:25 +05:30
Péter Szilágyi
434dd5bc00
cmd, core, eth, light, trie: add trie read caching layer 2018-11-15 12:22:13 +02:00
parmarrushabh
abd494055b fix err download block on masternode 2018-11-14 11:29:48 +05:30