Commit graph

84 commits

Author SHA1 Message Date
Daniel Liu
cf99bd07ff
refactor(node): use standalone flock dependency #19376 #26633 (#1993)
* refactor(node): switching prometheus flock location to tsdb #19376

* refactor(node): use standalone flock dependency #26633
2026-02-10 16:41:27 +05:30
JukLee0ira
b413f71763
all: remove personal RPC namespace #30704 (#1180) 2025-07-02 09:11:58 +08:00
JukLee0ira
1dc8158ef0
all: use slices.Contains #29459 (#1177) 2025-07-01 17:49:42 +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
16f41238b8
cmd, console, node : deprecate personal namespace #26390 (#1153) 2025-06-25 17:57:33 +08:00
JukLee0ira
cc8508bd38
node: drop support for static & trusted node list files #25610 (#1151) 2025-06-25 17:53:36 +08:00
JukLee0ira
edd683035b
node: prevent exposing engine API on unauthenticated endpoint #25939 (#1142) 2025-06-24 15:20:00 +08:00
JukLee0ira
e351d96e01
node: rename startNetworking to openEndpoints #22105 (#1130) 2025-06-23 14:56:09 +08:00
JukLee0ira
47dae16a40
node: add JWT secret log line #25095 (#1036) 2025-05-16 12:03:11 +08:00
JukLee0ira
c145287e87
node: allow JWT pass by file only #24579 (#1035) 2025-05-16 12:01:36 +08:00
JukLee0ira
fe422720f3
cmd, node: implement --authrpc-vhosts flag #24506 (#1028) 2025-05-08 11:13:44 +08:00
Daniel Liu
35a202675d
node, rpc: add configurable HTTP request limit #28948 (#1010)
Adds a configurable HTTP request limit, and bumps the engine default

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-04-29 17:06:06 +08:00
Daniel Liu
c75623ace7
rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00
JukLee0ira
0e84001c0b node, rpc: add JWT auth support in client #24911 2025-04-28 10:25:07 +08:00
JukLee0ira
80547a50d9
cmd/geth: make authrpc listening address settable from cli #24522 (#994) 2025-04-27 19:55:03 +08:00
JukLee0ira
230a2f09ba
cmd/geth, node, rpc: implement jwt tokens #24364 (#993)
* cmd/geth, node, rpc: implement jwt tokens #24364

* fix
2025-04-27 18:17:09 +08:00
Daniel Liu
58e9b8c8f6
node, rpc: improve HTTP write timeout handling #25457 (#982)
Here we add special handling for sending an error response when the write timeout of the
HTTP server is just about to expire. This is surprisingly difficult to get right, since is
must be ensured that all output is fully flushed in time, which needs support from
multiple levels of the RPC handler stack:

The timeout response can't use chunked transfer-encoding because there is no way to write
the final terminating chunk. net/http writes it when the topmost handler returns, but the
timeout will already be over by the time that happens. We decided to disable chunked
encoding by setting content-length explicitly.

Gzip compression must also be disabled for timeout responses because we don't know the
true content-length before compressing all output, i.e. compression would reintroduce
chunked transfer-encoding.

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2025-04-25 08:01:44 +08:00
JukLee0ira
10dd75e82f
node: serve JSON-RPC on custom path prefix #22184 (#952) 2025-04-24 11:34:26 +08:00
JukLee0ira
b1e08e6642
all: refactor package node #21105 (#923) 2025-04-10 18:52:49 +08:00
Daniel Liu
639d3f63a0 node: warn when using deprecated config/resource files (#18199) 2025-02-21 15:30:55 +08:00
Daniel Liu
f74eacd2cd node: remove dependency on wallet backend packages (#23019)
* accounts: new AddBackends method in manager

* node,cmd/geth: mv accman backend init to cmd/geth

* node,cmd/geth: mv scrypt config downstreawm from node

* accounts: use static buffer size for accman sub chan

minor fix

* accounts,cmd/geth: update accman backends through its event loop

* accounts,node: add comments

* accounts: un-export newBackendEvent

* accounts: use chan instead of wg in newBlockEvent

* node: rename isKeyDirEphem

* accounts,cmd: AddBackends->AddBackend

* accounts: fix potential blocking when adding backend
2025-01-24 16:18:30 +08:00
Daniel Liu
97c50f97bb all: add read-only option to database 2025-01-24 14:24:39 +08:00
Daniel Liu
240757a1ce all: remove empty function SaveData() 2024-12-28 09:04:02 +08:00
JukLee0ira
6f9fb9d1da node, p2p/simulations: fix node.Node AccountsManager leak (#19004) 2024-11-25 16:33:26 +08:00
Daniel Liu
ba23964062 node: shutdown HTTP and WebSocket servers gracefully (#20956) 2024-11-13 09:35:41 +08:00
Daniel Liu
b76438aafe node: allow WebSocket and HTTP work on same port (#20810) 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
cec7dcb02a node: report actual port used for http rpc (#20789) 2024-11-04 12:31:16 +08:00
Daniel Liu
ef8fa666d3 node: prefer nil slices over zero-length slices (#19083) 2024-11-04 12:31:16 +08:00
Daniel Liu
4cb240981e node: fix a deadlock (#17891) 2024-11-04 12:31:16 +08:00
Daniel Liu
97a5ff616b rpc: Make HTTP server timeout values configurable (#17240) 2024-11-04 12:31:15 +08:00
Daniel Liu
56bce3983d rpc: clean up IPC handler (#16524) 2024-11-04 12:31:15 +08:00
Daniel Liu
6b653a22ad node: fix staticcheck warning SA1019: NewHTTPServer and NewWSServer are deprecated (#16154) 2024-11-04 12:31:15 +08:00
JukLee0ira
ad71d706fb all: add global block logs cache (#25459) 2024-08-03 10:03:22 +08:00
Daniel Liu
6f06a5638b add flag rpcwritetimeout for rpc http server (#358) 2023-11-27 22:48:56 +08:00
Banana-J
39f6e6ee56
upgrade the websocket in xdpos (#349) 2023-11-06 15:37:14 +11: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
Péter Szilágyi
af8daf91a6
node, rpc: log cleanups in ipc listener function (#18124)
node,rpc: remove unused log in ipc listener function
2018-12-10 13:15:03 +02:00
Franklin
21dd59bd04 . 2018-11-20 22:16:40 +08:00
Martin Holst Swende
493903eede
core: better side-chain importing 2018-11-20 12:28:43 +02:00
Felix Lange
dcae0d348b
p2p/simulations: fix a deadlock and clean up adapters (#17891)
This fixes a rare deadlock with the inproc adapter:

- A node is stopped, which acquires Network.lock.
- The protocol code being simulated (swarm/network in my case)
  waits for its goroutines to shut down.
- One of those goroutines calls into the simulation to add a peer,
  which waits for Network.lock.

The fix for the deadlock is really simple, just release the lock
before stopping the simulation node.

Other changes in this PR clean up the exec adapter so it reports
node startup errors better and remove the docker adapter because
it just adds overhead.

In the exec adapter, node information is now posted to a one-shot
server. This avoids log parsing and allows reporting startup
errors to the simulation host.

A small change in package node was needed because simulation
nodes use port zero. Node.{HTTP,WS}Endpoint now return the live
endpoints after startup by checking the TCP listener.
2018-10-11 20:32:14 +02:00
Ryan Schneider
5d7e18539e rpc: make HTTP RPC timeouts configurable, raise defaults (#17240)
* rpc: Make HTTP server timeout values configurable

* rpc: Remove flags for setting HTTP Timeouts, configuring via .toml is sufficient.

* rpc: Replace separate constants with a single default struct.

* rpc: Update HTTP Server Read and Write Timeouts to 30s.

* rpc: Remove redundant NewDefaultHTTPTimeouts function.

* rpc: document HTTPTimeouts.

* rpc: sanitize timeout values for library use
2018-07-31 12:16:14 +03:00
Kurkó Mihály
a9835c1816 cmd, dashboard, log: log collection and exploration (#17097)
* cmd, dashboard, internal, log, node: logging feature

* cmd, dashboard, internal, log: requested changes

* dashboard, vendor: gofmt, govendor, use vendored file watcher

* dashboard, log: gofmt -s -w, goimports

* dashboard, log: gosimple
2018-07-11 10:59:04 +03:00
gary rong
7beccb29be all: get rid of error when creating memory database (#16716)
* all: get rid of error when create mdb

* core: clean up variables definition

* all: inline mdb definition
2018-05-09 15:24:25 +03:00
Felix Lange
52b046c9b6
rpc: clean up IPC handler (#16524)
This avoids logging accept errors on shutdown and removes
a bit of duplication. It also fixes some goimports lint warnings.
2018-04-18 12:27:20 +02:00
Martin Holst Swende
ec3db0f56c cmd/clef, signer: initial poc of the standalone signer (#16154)
* signer: introduce external signer command

* cmd/signer, rpc: Implement new signer. Add info about remote user to Context

* signer: refactored request/response, made use of urfave.cli

* cmd/signer: Use common flags

* cmd/signer: methods to validate calldata against abi

* cmd/signer: work on abi parser

* signer: add mutex around UI

* cmd/signer: add json 4byte directory, remove passwords from api

* cmd/signer: minor changes

* cmd/signer: Use ErrRequestDenied, enable lightkdf

* cmd/signer: implement tests

* cmd/signer: made possible for UI to modify tx parameters

* cmd/signer: refactors, removed channels in ui comms, added UI-api via stdin/out

* cmd/signer: Made lowercase json-definitions, added UI-signer test functionality

* cmd/signer: update documentation

* cmd/signer: fix bugs, improve abi detection, abi argument display

* cmd/signer: minor change in json format

* cmd/signer: rework json communication

* cmd/signer: implement mixcase addresses in API, fix json id bug

* cmd/signer: rename fromaccount, update pythonpoc with new json encoding format

* cmd/signer: make use of new abi interface

* signer: documentation

* signer/main: remove redundant  option

* signer: implement audit logging

* signer: create package 'signer', minor changes

* common: add 0x-prefix to mixcaseaddress in json marshalling + validation

* signer, rules, storage: implement rules + ephemeral storage for signer rules

* signer: implement OnApprovedTx, change signing response (API BREAKAGE)

* signer: refactoring + documentation

* signer/rules: implement dispatching to next handler

* signer: docs

* signer/rules: hide json-conversion from users, ensure context is cleaned

* signer: docs

* signer: implement validation rules, change signature of call_info

* signer: fix log flaw with string pointer

* signer: implement custom 4byte databsae that saves submitted signatures

* signer/storage: implement aes-gcm-backed credential storage

* accounts: implement json unmarshalling of url

* signer: fix listresponse, fix gas->uint64

* node: make http/ipc start methods public

* signer: add ipc capability+review concerns

* accounts: correct docstring

* signer: address review concerns

* rpc: go fmt -s

* signer: review concerns+ baptize Clef

* signer,node: move Start-functions to separate file

* signer: formatting
2018-04-16 15:04:32 +03:00
GuiltyMorishita
e2f2bb3e2e node: fix typo hvosts -> vhosts (#16096) 2018-02-15 12:38:39 +02:00
Martin Holst Swende
6c6247a690
node, rpc: fix linter issues 2018-02-12 14:12:55 +01:00