Commit Graph

303 Commits

Author SHA1 Message Date
Neil Booth
c4e7878407 Add session ID for each session
Show it in the logs with each session-specific message.
Show the sessions ID in the sessions list with an L suffix if logging.
Add RPC commands to toggle logging of, and disconnect, a session.
Closes #55
2016-12-03 14:32:09 +09:00
Neil Booth
3d2824218b Close stale sessions
New envvar SESSION_TIMEOUT
A session with no activity is cut off after this time
Fixes #56
2016-12-03 13:06:20 +09:00
Neil Booth
7e3ca6926d Prepare 0.7.20 2016-12-03 11:06:52 +09:00
Neil Booth
c16792fb89 Only wait 30 secsonds on shutdown 2016-12-03 11:03:27 +09:00
Neil Booth
f1e0676a47 Prepare 0.7.19 2016-12-02 18:44:36 +09:00
Neil Booth
62a531b1d0 Revert "Fix ref leak in mempool updates"
This reverts commit 6c95644ae0.
2016-12-02 18:43:15 +09:00
Neil Booth
35f118edc6 Prepare 0.7.18 2016-12-02 07:49:35 +09:00
Neil Booth
7a9e8c7fef Small tweaks to IRC code 2016-12-02 07:45:51 +09:00
Neil
9f90ae049e Merge pull request #53 from valesi/tor
Add IRC option to publish Tor address
2016-12-02 07:33:29 +09:00
Neil Booth
6c95644ae0 Fix ref leak in mempool updates 2016-12-02 07:22:30 +09:00
Shane Moore
0edff0056d Add Tor-specific port options for IRC 2016-12-01 03:21:52 -08:00
Shane Moore
33c5bd65aa Fix IRC port bug, more readable 2016-12-01 02:25:21 -08:00
Shane Moore
95c848a720 Add IRC option to publish Tor address 2016-11-30 23:50:20 -08:00
Neil Booth
d3f8ed31c2 0.7.17 release 2016-11-30 07:29:21 +09:00
Neil Booth
aa2baa9706 Prepare 0.7.16 2016-11-29 23:22:59 +09:00
Neil Booth
6b551973e8 queue -> tasks 2016-11-29 23:21:22 +09:00
Neil Booth
5e7f982427 Prepare 0.7.15 2016-11-29 23:04:06 +09:00
Neil Booth
0892b12036 Replace $DAEMON_VERSION and $DAEMON_SUBVERSION
in banner file.
2016-11-29 23:03:05 +09:00
Neil Booth
9c8f0283c9 Update version 2016-11-29 22:26:55 +09:00
Neil Booth
b65bcda504 Add per-session bandwidth limits 2016-11-29 22:19:12 +09:00
Neil Booth
c9a10be5ba Introduce incoming buffer size limit
- incoming buffered network requests limited to 150,000 bytes
  which I believe is ample for a genuine client
- if exceeded, the connection is dropped
- raise outgoing data limit for RPC connections to 5 MB - expect
  sessions calls can be long and connection is implicitly trusted
- similarly raise incoming buffered data limit to 5 MB for RPC
  connections
2016-11-29 20:24:58 +09:00
Neil Booth
c6d8440b3d Remove all RocksDB references on close 2016-11-29 19:50:44 +09:00
Neil Booth
5053101cee LOG_SESSIONS should use self.integer 2016-11-29 19:32:11 +09:00
Neil Booth
6713373aa2 Prepare 0.7.13 2016-11-29 08:03:51 +09:00
Neil Booth
c08ade5861 Add session logging facility
Move session logging code to protocol.py from electrum_rpc.py
Use it for periodic logging controlled by envvar LOG_SESSIONS
For each session, track sent transaction stats and show that
per-session instead of errors
2016-11-29 08:00:54 +09:00
Neil Booth
98c4ce3fef Prepare 0.7.12 2016-11-27 22:01:12 +09:00
Neil Booth
b8fc739590 Fix ordering in get_utxos 2016-11-27 21:54:05 +09:00
Neil Booth
f9cc21807f Further optimize the inner loop 2016-11-27 14:20:36 +09:00
Neil Booth
5c0b026158 Tasks queue just has null entries for now 2016-11-27 13:35:09 +09:00
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.
2016-11-27 12:20:16 +09:00
Neil Booth
1b95bcd8ac Open DB differently depending on if syncing
If syncing, use a high max_open_files, otherwise lower it.
2016-11-27 07:25:28 +09:00
Neil Booth
0afddb7bc3 Give backing up its own flush function
Remove some excessive log messages
2016-11-26 20:59:59 +09:00
Neil Booth
f5384ccc98 Remove get_tx_hash
Anything in the DB should be on the disk.  Remove misleading
comment.
2016-11-26 20:09:18 +09:00
Neil Booth
4fc5e309ab Prepare 0.7.11 2016-11-26 18:20:40 +09:00
Neil Booth
9eb701f220 Replace $VERSION in the banner file
with the ElectrumX version string
2016-11-26 18:19:53 +09:00
Neil Booth
1aaed2e913 Create just one server connection
I hope this
Fixes #47
2016-11-26 18:10:03 +09:00
Neil Booth
3f743e9630 Distinguish undo_info being empty and not existing
Fixes #46
2016-11-26 16:16:17 +09:00
Neil Booth
af3ae6429e Fix logging bug 2016-11-26 15:35:55 +09:00
Neil Booth
4e26e0fe96 Bump default value of MAX_SEND to 1m bytes.
Otherwise historic large txs could not be served to clients.
2016-11-26 15:22:42 +09:00
Neil Booth
95a2de6dae Move DB undo code to db.py 2016-11-26 13:18:10 +09:00
Neil Booth
8d253c81d3 Move clean_db() to db.py 2016-11-26 13:15:45 +09:00
Neil Booth
db5d0dd6cb Merge branch 'serve_disk_only' into develop 2016-11-26 13:12:57 +09:00
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.
2016-11-26 13:11:59 +09:00
Neil Booth
df3cb8535a Cleaner handling of touched addresses
Moved to local vars rather than an instance variable
2016-11-26 12:46:11 +09:00
Neil Booth
b97496d4a5 Set max_open_files for LevelDB to 256
On Linux it seems a bit greedy
2016-11-26 10:38:48 +09:00
Neil Booth
9544170c55 Prepare release-0.7.10 2016-11-26 09:53:47 +09:00
Neil Booth
292073f2c7 Log large requests and reject them 2016-11-26 09:32:29 +09:00
Neil Booth
59733e4609 Move bitcoin-specific coin defaults to Bitcoin 2016-11-26 08:32:30 +09:00
TheLazieR Yip
f3ecfe00e2 Remove unused variables 2016-11-25 07:45:45 -05:00
TheLazieR Yip
828727d41a Remove unneccessary local variables 2016-11-25 07:44:19 -05:00