aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/client.go
Commit message (Collapse)AuthorAgeFilesLines
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-03-121-1/+1
|
* rpc: fix client shutdown hang when Close races with Unsubscribe (#17894)Felix Lange2018-10-151-47/+12
| | | Fixes #17837
* rpc: reset client write deadline after write (#17549)Gísli Kristjánsson2018-09-031-0/+1
| | | This fixes an issue with websocket ping frame handling.
* rpc: fixed comment grammar issue (#17146)LeoLiao2018-07-091-1/+1
|
* all: library changes for swarm-network-rewrite (#16898)Elad2018-06-141-1/+1
| | | | | | | | | | | | This commit adds all changes needed for the merge of swarm-network-rewrite. The changes: - build: increase linter timeout - contracts/ens: export ensNode - log: add Output method and enable fractional seconds in format - metrics: relax test timeout - p2p: reduced some log levels, updates to simulation packages - rpc: increased maxClientSubscriptionBuffer to 20000
* rpc: clean up IPC handler (#16524)Felix Lange2018-04-181-1/+1
| | | | 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-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* p2p: add network simulation framework (#14982)Lewis Marshall2017-09-251-50/+14
| | | | | | 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.
* whisperv5: integrate whisper and add whisper RPC simulatorBas van Kervel2017-06-151-0/+46
|
* rpc: support subscriptions under custom namespacesBas van Kervel2017-04-251-16/+19
|
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-1/+1
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-20/+19
|
* rpc: send nil on subscription Err channel when Client is closedFelix Lange2017-01-261-1/+4
| | | | | This change makes client subscriptions compatible with the new Subscription semantics introduced in the previous commit.
* rpc: add context argument to EthSubscribeFelix Lange2016-08-061-3/+3
| | | | | It's inconsistent not to pass it and most callers will work with contexts anyway.
* rpc: ensure client doesn't block for slow subscribersFelix Lange2016-08-061-30/+62
| | | | | | | | | | | | | | | | | | | | | I initially made the client block if the 100-element buffer was exceeded. It turns out that this is inconvenient for simple uses of the client which subscribe and perform calls on the same goroutine, e.g. client, _ := rpc.Dial(...) ch := make(chan int) // note: no buffer sub, _ := client.EthSubscribe(ch, "something") for event := range ch { client.Call(...) } This innocent looking code will lock up if the server suddenly decides to send 2000 notifications. In this case, the client's main loop won't accept the call because it is trying to deliver a notification to ch. The issue is kind of hard to explain in the docs and few people will actually read them. Buffering is the simple option and works with close to no overhead for subscribers that always listen.
* rpc: don't exceed context deadline while waiting for send lockFelix Lange2016-08-051-0/+4
|
* rpc: add new client, use it everywhereFelix Lange2016-07-231-0/+740
The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.