Neil Booth
6aef79461f
Don't shut down block processor by cancellation
The block processor needs to be able to close cleanly, and not
mid-block. In order to be able to yield whilst processing blocks
we cannot forcefully close its coroutine with a cancellation.
8 years ago
Neil Booth
9eb701f220
Replace $VERSION in the banner file
with the ElectrumX version string
8 years ago
Neil Booth
59244cc24e
Move bulk of FS flush code to db.py
More logically belongs there.
Have servers use the flushed DB height not the block processor's height.
Get all headers only from disk.
8 years ago
Neil Booth
9544170c55
Prepare release-0.7.10
8 years ago
Neil Booth
292073f2c7
Log large requests and reject them
8 years ago
Neil Booth
42c00d32d2
Rewrite lib/jsonrpc.py to be a useful client too
Use for an improved electrumx_rpc.py, so it now handles responses spread
over several packets. Also added a timeout of 5 seconds.
Fixes #43
8 years ago
Neil Booth
de4930b96d
Introduce MAX_HIST environment variable.
8 years ago
Neil Booth
9e220820aa
Rework futures and event handling
8 years ago
Neil Booth
bab0d162de
Merge ServerManager and BlockServer
8 years ago
Neil Booth
fa30c5529b
Fix missing qualifier
8 years ago
Neil Booth
dd0cd0156f
Remove debug log
8 years ago
Neil Booth
11558fd9d2
Add debug log
8 years ago
Neil Booth
1dc43b3020
Show connection total in connection log
Fix typo resulting in no mempool notifications
8 years ago
Neil Booth
5eb92007ae
Remove redundant log; IRC will emit one
8 years ago
Neil Booth
98fd178c62
Make mempool truly asynchronous
Mempool updates happen in parallel asynchronously to processing of
new blocks once caught up. This means that, e.g., during the initial
slow mempool download incoming blocks can be processed and communicated
to clients without waiting for the downloaded mempool transaction
analysis to complete. From a client's point of view the server won't
be seen as lagging.
8 years ago
Neil Booth
dd5a31d0f4
Take a little more care cleaning up connections
8 years ago
Neil Booth
ccf24fdc71
Wait 20 secs for sockets to close
10 seems a little low
8 years ago
Neil Booth
52116539d4
Clean shutdown: wait for transports to close
We give 10 seconds for everything to be cleaned up, then close forcibly.
Fixes #30
8 years ago
Neil Booth
0b52376f23
Add subscription limits
8 years ago
Neil Booth
913d156786
Convert DaemonError to RPCError
To cleanly return errors to clients
getrawtransaction has the ugly API and still does its own thing
Fixes #32
8 years ago
Neil Booth
942d5d6b00
Fix import
8 years ago
Neil Booth
063a5469cc
Move mempool to be with BlockServer
BlockProcessor doesn't really need a mempool; mempools are
only useful for servers.
Set first_sync before flushing, so it goes into DB state.
Start servers immediately on catchup; mempool fills asynchronously.
Fixes #31
8 years ago
Neil Booth
3abddf4a51
Simplify sessions call
8 years ago
Neil Booth
88185b0daa
Bump log threshold up; tweak log
8 years ago
Neil Booth
beeb60f324
Implement blockchain.address.get_mempool
Fixes #26
8 years ago
Neil Booth
7f3551e435
tx_merkle: catch bad hashes and report properly
Fixes #27
8 years ago
Neil Booth
4c7f72fe68
RPCError is not a global variable
8 years ago
Neil Booth
c5c7b6f438
Have all expensive requests yield.
8 years ago
Neil Booth
f17ad2ddf4
Put notifications on the session queue
This keeps the network in-order and means slow clients get slow
notifications, which seems fairer.
Add some simple logging
8 years ago
Neil Booth
a1eb446af4
Tweak notify handling
8 years ago
Neil Booth
db187540d5
Have task coros handle cancelled exceptions
8 years ago
Neil Booth
a2280bbc93
Clean up futures handling
8 years ago
Neil Booth
8c55f41305
Accept more SSL protocols
8 years ago
Neil Booth
1830cae3de
Remove a redundant message
8 years ago
Neil Booth
83674b1b7b
Clarify peername() logic
8 years ago
Neil Booth
be45a9e228
Minor improvements to client handling
Don't create a task until ready to execute it
Log expensive tasks
Assume peers are for logging unless explicitly not stated
8 years ago
Neil Booth
14d3d85bd9
Need an array to take its len
8 years ago
Neil Booth
dc74c869a1
Await task after cancelling it.
8 years ago
Neil Booth
12ed9f7069
Have session_count return a dictionary
8 years ago
Neil Booth
1b8881800d
Move the RPC handlers to the manager
8 years ago
Johann Bauer
d45321927e
Add optional option to anonymise logs (remove IP addresses)
8 years ago
Neil Booth
57dd4ece9c
Avoid annoying exception on shutdown
8 years ago
Neil Booth
831225492e
Better RPC sessions stats
8 years ago
Neil Booth
7523735f99
Split out server and session management
8 years ago
Neil Booth
3b6ab77e47
Break out JSONRPC into own file
- improved handling of JSON 2.0 RPC protocol
- permits batched requests (not yet supported by Electrum client)
8 years ago
Neil Booth
14d8ece7c6
Return a version the Electrum client expects
If you don't do this you don't appear in the network dialog box
8 years ago
Neil Booth
751bb2d970
Remove debug code
8 years ago
Neil Booth
c93f6cb920
Final cleanup
8 years ago
Neil Booth
cb7b7dd1fe
Move pretty printing of sessions to client
Tweak logging
8 years ago
Neil Booth
501807bf1a
Implement IRC support and related queries from clients
8 years ago