aboutsummaryrefslogtreecommitdiffstats
path: root/node/config.go
Commit message (Collapse)AuthorAgeFilesLines
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2018-12-191-9/+9
|
* node: warn when using deprecated config/resource files (#18199)Felix Lange2018-12-071-9/+35
|
* all: new p2p node representation (#17643)Felix Lange2018-09-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* rpc: make HTTP RPC timeouts configurable, raise defaults (#17240)Ryan Schneider2018-07-311-0/+5
| | | | | | | | | | | | | | | | * 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-6/+6
| | | | | | | | | | | | * 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: fix various typos (#16533)Wuxiang2018-04-191-1/+1
| | | | | | | | * fix typo * fix typo * fix typo
* rpc: dns rebind protection (#15962)Martin Holst Swende2018-02-121-1/+10
| | | | | | | | | | | | | | | | * 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-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* cmd/geth: make geth account new faster with many keys (#15529)Martin Holst Swende2017-11-211-14/+22
|
* p2p: add network simulation framework (#14982)Lewis Marshall2017-09-251-0/+7
| | | | | | 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.
* accounts, console, internal: support trezor hardware walletPéter Szilágyi2017-08-091-0/+7
|
* node: fix megacheck warningsEgon Elbre2017-08-071-2/+2
|
* node: Rename TrusterNodes (#14827)Chase Wright2017-07-181-2/+2
| | | | | | * node: Rename TrusterNodes * node: Rename TrusterNodes
* cmd, node: add --nosub and node.Config.NoUSB to disable hw walletsPéter Szilágyi2017-04-201-4/+9
|
* 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-71/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-9/+8
|
* accounts, cmd, internal, node: implement HD wallet self-derivationPéter Szilágyi2017-02-131-18/+1
|
* accounts, cmd, internal, mobile, node: canonical account URLsPéter Szilágyi2017-02-131-3/+3
|
* accounts, cmd, eth, internal, miner, node: wallets and HD APIsPéter Szilágyi2017-02-131-5/+25
|
* accounts/usbwallet: initial support for Ledger walletsPéter Szilágyi2017-02-131-2/+12
|
* accounts, cmd, eth, internal, mobile, node: split account backendsPéter Szilágyi2017-02-131-6/+7
|
* cmd/bootnode, cmd/geth, cmd/bzzd: add --netrestrictFelix Lange2016-11-231-0/+5
|
* node: Remove redundant filepath.Join in parsePersistentNodes (#3300)FrankWang2016-11-181-2/+1
|
* cmd, mobile, node, p2p: surface the discovery V5 bootnodesPéter Szilágyi2016-11-151-3/+11
|
* node: add InstanceDir methodFelix Lange2016-11-111-2/+9
|
* p2p/discv5: added new topic discovery packageZsolt Felfoldi2016-11-091-0/+4
|
* common, node: move datadir defaults into package nodeFelix Lange2016-09-161-3/+3
|
* node: ensure datadir can be co-inhabited by different instancesFelix Lange2016-09-161-23/+106
| | | | | 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/+54
| | | | | | | | | | | | | | | 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.
* all: update license informationFelix Lange2016-04-151-1/+1
|
* rpc: various fixes/enhancementsBas van Kervel2016-04-121-2/+2
| | | | | | | | 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
* cmd, common, node, rpc: rework naming convention to canonical onePéter Szilágyi2016-02-091-50/+50
|
* cmd, node, rpc: move websockets into node, break singletonPéter Szilágyi2016-02-051-0/+34
|
* cmd, common, node, rpc: move HTTP RPC into node, drop singletone aspectPéter Szilágyi2016-02-051-1/+36
|
* cmd, common, node, rpc: move IPC into the node itselfPéter Szilágyi2016-02-041-0/+40
|
* node: customizable protocol and service stacksPéter Szilágyi2015-11-271-0/+171
|
* Moved node to ethereumobscuren2014-03-221-37/+0
|
* Major re-organisation.obscuren2014-03-221-0/+37
The Ethereum node and Gui are now separated.