aboutsummaryrefslogtreecommitdiffstats
path: root/node/node.go
Commit message (Collapse)AuthorAgeFilesLines
* node, rpc: log cleanups in ipc listener function (#18124)Péter Szilágyi2018-12-101-1/+1
|\ | | | | node,rpc: remove unused log in ipc listener function
| * .Franklin2018-11-201-1/+1
| |
* | core: better side-chain importingMartin Holst Swende2018-11-201-1/+1
|/
* p2p/simulations: fix a deadlock and clean up adapters (#17891)Felix Lange2018-10-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* rpc: make HTTP RPC timeouts configurable, raise defaults (#17240)Ryan Schneider2018-07-311-3/+3
| | | | | | | | | | | | | | | | * 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
* cmd, dashboard, log: log collection and exploration (#17097)Kurkó Mihály2018-07-111-2/+2
| | | | | | | | | | | | * 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
* all: get rid of error when creating memory database (#16716)gary rong2018-05-091-1/+1
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* rpc: clean up IPC handler (#16524)Felix Lange2018-04-181-12/+2
| | | | This avoids logging accept errors on shutdown and removes a bit of duplication. It also fixes some goimports lint warnings.
* cmd/clef, signer: initial poc of the standalone signer (#16154)Martin Holst Swende2018-04-161-80/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* node: fix typo hvosts -> vhosts (#16096)GuiltyMorishita2018-02-151-1/+1
|
* node, rpc: fix linter issuesMartin Holst Swende2018-02-121-1/+1
|
* rpc: dns rebind protection (#15962)Martin Holst Swende2018-02-121-15/+14
| | | | | | | | | | | | | | | | * cmd,node,rpc: add allowedHosts to prevent dns rebinding attacks * p2p,node: Fix bug with dumpconfig introduced in r54aeb8e4c0bb9f0e7a6c67258af67df3b266af3d * rpc: add wildcard support for rpcallowedhosts + go fmt * cmd/geth, cmd/utils, node, rpc: ignore direct ip(v4/6) addresses in rpc virtual hostnames check * http, rpc, utils: make vhosts into map, address review concerns * node: change log messages to use geth standard (not sprintf) * rpc: fix spelling
* p2p/simulations: various stability fixes (#15198)Lewis Marshall2017-12-011-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | p2p/simulations: introduce dialBan - Refactor simulations/network connection getters to support avoiding simultaneous dials between two peers If two peers dial simultaneously, the connection will be dropped to help avoid that, we essentially lock the connection object with a timestamp which serves as a ban on dialing for a period of time (dialBanTimeout). - The connection getter InitConn can be wrapped and passed to the nodes via adapters.NodeConfig#Reachable field and then used by the respective services when they initiate connections. This massively stablise the emerging connectivity when running with hundreds of nodes bootstrapping a network. p2p: add Inbound public method to p2p.Peer p2p/simulations: Add server id to logs to support debugging in-memory network simulations when multiple peers are logging. p2p: SetupConn now returns error. The dialer checks the error and only calls resolve if the actual TCP dial fails.
* p2p: add network simulation framework (#14982)Lewis Marshall2017-09-251-4/+15
| | | | | | This commit introduces a network simulation framework which can be used to run simulated networks of devp2p nodes. The intention is to use this for testing protocols, performing benchmarks and visualising emergent network behaviour.
* node: fix instance dir locking and improve error messageFelix Lange2017-08-181-24/+12
| | | | | | The lock file was ineffective because opening leveldb storage in read-only mode doesn't really take the lock. Fix it by including a dedicated flock library (which is actually split out of goleveldb).
* node: Rename TrusterNodes (#14827)Chase Wright2017-07-181-1/+1
| | | | | | * node: Rename TrusterNodes * node: Rename TrusterNodes
* node: fixes deadlock on Wait()Victor Farazdagi2017-04-251-0/+1
|
* cmd/utils, node: remove unused solc references and improve RPC config (#14324)bas-vk2017-04-131-2/+2
| | | | | Currently http cors and websocket origins are a comma separated string in the config object. These are replaced with string arrays that are more expressive in case of a config file.
* cmd/geth: add --config file flag (#13875)Felix Lange2017-04-121-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * p2p/discover, p2p/discv5: add marshaling methods to Node * p2p/netutil: make Netlist decodable from TOML * common/math: encode nil HexOrDecimal256 as 0x0 * cmd/geth: add --config file flag * cmd/geth: add missing license header * eth: prettify Config again, fix tests * eth: use gasprice.Config instead of duplicating its fields * eth/gasprice: hide nil default from dumpconfig output * cmd/geth: hide genesis block in dumpconfig output * node: make tests compile * console: fix tests * cmd/geth: make TOML keys look exactly like Go struct fields * p2p: use discovery by default This makes the zero Config slightly more useful. It also fixes package node tests because Node detects reuse of the datadir through the NodeDatabase. * cmd/geth: make ethstats URL settable through config file * cmd/faucet: fix configuration * cmd/geth: dedup attach tests * eth: add comment for DefaultConfig * eth: pass downloader.SyncMode in Config This removes the FastSync, LightSync flags in favour of a more general SyncMode flag. * cmd/utils: remove jitvm flags * cmd/utils: make mutually exclusive flag error prettier It now reads: Fatal: flags --dev, --testnet can't be used at the same time * p2p: fix typo * node: add DefaultConfig, use it for geth * mobile: add missing NoDiscovery option * cmd/utils: drop MakeNode This exposed a couple of places that needed to be updated to use node.DefaultConfig. * node: fix typo * eth: make fast sync the default mode * cmd/utils: remove IPCApiFlag (unused) * node: remove default IPC path Set it in the frontends instead. * cmd/geth: add --syncmode * cmd/utils: make --ipcdisable and --ipcpath mutually exclusive * cmd/utils: don't enable WS, HTTP when setting addr * cmd/utils: fix --identity
* cmd/geth, node: surface geth architecture into version (#13866)Péter Szilágyi2017-04-061-1/+1
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-14/+14
|
* cmd/bootnode, cmd/geth, cmd/bzzd: add --netrestrictFelix Lange2016-11-231-0/+1
|
* cmd, mobile, node, p2p: surface the discovery V5 bootnodesPéter Szilágyi2016-11-151-15/+16
|
* node: add InstanceDir methodFelix Lange2016-11-111-0/+6
|
* p2p/discv5: added new topic discovery packageZsolt Felfoldi2016-11-091-0/+2
|
* node: ensure datadir can be co-inhabited by different instancesFelix Lange2016-09-161-63/+112
| | | | | This change ensures that nodes started with different Name but same DataDir values don't use the same nodekey and IPC socket.
* cmd/utils, node: create account manager in package nodeFelix Lange2016-08-171-4/+30
| | | | | | | | | | | | | | | The account manager was previously created by packge cmd/utils as part of flag processing and then passed down into eth.Ethereum through its config struct. Since we are starting to create nodes which do not have eth.Ethereum as a registered service, the code was rearranged to register the account manager as its own service. Making it a service is ugly though and it doesn't really fix the root cause: creating nodes without eth.Ethereum requires duplicating lots of code. This commit splits utils.MakeSystemNode into three functions, making creation of other node/service configurations easier. It also moves the account manager into Node so it can be used by those configurations without requiring package eth.
* rpc: add new client, use it everywhereFelix Lange2016-07-231-4/+2
| | | | | | The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.
* node, p2p: move network config out of ServerFelix Lange2016-05-181-5/+3
| | | | This silences a go vet message about copying p2p.Server in package node.
* release, all: integrate the release service into gethPéter Szilágyi2016-05-021-2/+1
|
* common/versions, cmd/utils: add geth version contractGustav Simonsson2016-05-021-0/+1
|
* rpc: various fixes/enhancementsBas van Kervel2016-04-121-6/+14
| | | | | | | | rpc: be less restrictive on the request id rpc: improved documentation console: upgrade web3.js to version 0.16.0 rpc: cache http connections rpc: rename wsDomains parameter to wsOrigins
* rpc: add pub/sub supportBas van Kervel2016-04-021-1/+1
|
* cmd, node, rpc: readd inproc RPC client, expose via nodePéter Szilágyi2016-02-091-1/+54
|
* cmd, common, node, rpc: rework naming convention to canonical onePéter Szilágyi2016-02-091-12/+12
|
* cmd, node, rpc: move websockets into node, break singletonPéter Szilágyi2016-02-051-13/+72
|
* cmd, common, node, rpc: move HTTP RPC into node, drop singletone aspectPéter Szilágyi2016-02-051-44/+138
|
* cmd, common, node, rpc: move IPC into the node itselfPéter Szilágyi2016-02-041-8/+92
|
* internal/debug: APIs for profiling and tracingFelix Lange2016-01-281-1/+2
| | | | | | The debug package provides an RPC wrapper for glog settings and the debugging facilities of the Go runtime. They can be triggered through both command line flags and the IPC listener.
* rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-261-1/+6
|
* core, eth, node, rpc: port the admin and debug APIPéter Szilágyi2015-12-151-3/+27
|
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+10
|
* cmd, eth, node, rpc, xeth: use single-instance servicesPéter Szilágyi2015-11-271-87/+39
|
* cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacksPéter Szilágyi2015-11-271-31/+93
|
* node: customizable protocol and service stacksPéter Szilágyi2015-11-271-0/+252