Neil Booth
b23b19473c
Sanity check on basic IRC reported settings
...
Closes #110
2017-01-31 07:58:19 +09:00
Neil Booth
eff5d3d7e4
Force JSONRPCv2
...
Temporary backwards compat hack for old Coinomi wallets
2017-01-31 07:48:18 +09:00
John L. Jegutanis
fd19bddeb1
fix crash due to a missing env variable in irc.py and a typo fix ( #112 )
...
Thank you!
2017-01-30 23:52:56 +09:00
Neil Booth
4a8cec9988
Prepare 0.10.14
2017-01-29 08:29:41 +09:00
Neil Booth
06c8eda161
Preparations for peer discovery
...
DEFAULT_PORTS is a now a coin property.
Other miscellaneous updates to get things closer
2017-01-29 06:47:43 +09:00
Neil Booth
8bc9abf9c1
Prepare 0.10.13
2017-01-25 20:30:02 +09:00
Neil Booth
e56f188816
Implement peer subscriptions
...
Incremental updates are passed.
Also implement a server.features RPC
2017-01-25 20:28:19 +09:00
Neil Booth
551c04a3bc
Remove all uses of "except:"
2017-01-25 20:28:19 +09:00
Neil Booth
76b6899cf2
Try to avoid asyncio log spew on shutdown
...
Closes #106 .
This is a hacky workaround to an issue that needs to be
fixed in Python's asyncio library (where I filed issue 487
on github)
2017-01-25 20:27:33 +09:00
Neil Booth
cb0160901f
Unify executor and futures logic
2017-01-24 21:25:37 +09:00
Neil Booth
9b5cb105d5
Prepare 0.10.12
2017-01-24 07:57:29 +09:00
Neil Booth
0ac36aeca0
Make a copy of sessions to loop over
2017-01-24 07:55:52 +09:00
Neil Booth
1a48ad136c
Prepare 0.10.11
2017-01-23 23:39:49 +09:00
Neil Booth
a7462a6ea3
Complete rewrite of JSON RPC infrastructure
...
Aim to be easier for clients to use, because to do peer
discovery we must act as a client to other servers.
Split out JSON session concept from the asyncio protocol
concept. This makes the JSON RPC support more easily
testable and usable as a stand-alone library.
In addition, support JSON RPC v1 and v2, and auto-detection
of peer's version.
2017-01-23 23:36:02 +09:00
Neil Booth
d0d4c0d75f
Prepare 0.10.10
2017-01-23 07:28:13 +09:00
Neil Booth
05a6da1920
Move peer management to peers.py from irc
...
It's cleaner and will be useful for peer-to-peer comms later
2017-01-22 23:34:44 +09:00
Neil Booth
ed0646efbf
Tidy up request and notification sending
2017-01-20 20:04:56 +09:00
Neil Booth
766da5ed79
Don't maintain a sub_count in controller
...
Just do a tally occasionally.
It's too tricky to keep it accurate as it double-counts resubscribing to
the same address, for example
2017-01-20 08:09:33 +09:00
Neil Booth
112e0a12a9
Prepare 0.10.9
2017-01-18 20:35:24 +09:00
Neil Booth
4729ba2e21
Tweak the shutdown process
...
Clean it up a bit and make it harder to do wrongly.
2017-01-18 20:28:57 +09:00
Neil Booth
9a8c598fa8
The session needs to handle the version command.
2017-01-18 19:50:26 +09:00
Neil Booth
b03a44ca5a
Prepare 0.10.8
2017-01-18 08:04:14 +09:00
Neil Booth
23c4616711
Fix testcase
2017-01-18 08:02:45 +09:00
Neil Booth
0dfdfaba7e
Prepare 0.10.7
2017-01-17 08:13:57 +09:00
Neil Booth
f05dd6c2a3
Use snappy compression
...
Seems to make ~4.5% faster (5281 tx/s -> 5516 tx/s)
Shrinks UTXO DB by ~15% and hist DB by ~5%
2017-01-17 07:59:50 +09:00
Neil Booth
5f9e337457
Improve RocksDB iterator
2017-01-17 07:43:06 +09:00
Neil Booth
5abe4faa8d
JSON results are returned with HTTP status 500
2017-01-17 07:23:58 +09:00
Neil Booth
c958b3af49
Remove LMDB
...
Performance of history writes was very poor even with
the code rewritten to accommodate the environment concept
(see db_abstraction branch)
2017-01-16 22:03:45 +09:00
Neil Booth
ffb4d4f158
Don't print response; might have auth info
2017-01-16 21:27:30 +09:00
Neil Booth
1a9ac22fa0
Prepare 0.10.6
2017-01-16 21:24:59 +09:00
Neil Booth
65f927122b
daemon: properly check for HTTP status codes
2017-01-16 21:22:41 +09:00
Neil Booth
131601a7b2
Rework clean shutdown logic
...
So that the main block processor future is cancellable.
We wait for the executor and then flush anything unflushed.
Resolves the rest of the second part of #100
2017-01-16 21:22:24 +09:00
Neil Booth
73945c51d1
Prepare 0.10.5
2017-01-16 19:34:17 +09:00
Neil Booth
b01933913f
Add traceback for daemon errors
2017-01-16 19:32:22 +09:00
Neil Booth
8d58d2a0e7
Clean up shutdown logic and logging
...
Add RPC "stop" command, and document it.
Fixes the 2nd part of #100
2017-01-16 19:31:57 +09:00
Neil Booth
0845f26ec2
Prepare 0.10.4
2017-01-12 22:45:28 +09:00
Neil Booth
9e6de7a554
Merge branch 'json-named-args' into develop
2017-01-12 22:41:18 +09:00
Neil Booth
d2da494120
Clarify README; no need to resync.
...
Update HOWTO and docs
2017-01-12 22:40:21 +09:00
Neil Booth
4eed43accb
Add named-argument handling as per JSON RPC 2.0
...
This involved a rewrite of the JSON RPC layer.
I took the opportunity to clean up the handling of requests
in general. It should now be easy to return nice help from
the docstrings.
Closes issue #99
2017-01-12 07:59:21 +09:00
Neil Booth
5784412393
Write out undo info with the UTXO flushes
...
Cleaner and slightly more efficient.
Closes #101
2017-01-09 18:58:39 +09:00
Neil Booth
a8a82224e7
Prepare 0.10.3
2017-01-09 17:19:15 +09:00
Neil Booth
2ad64f6243
Add an RPC call to force a reorg at run-time
...
This required a large rework block processor and prefetcher
interaction, and led to various cleanups
Closes #103
2017-01-09 17:14:06 +09:00
Neil Booth
15051124af
Make flushes and reorgs async
...
Apart from the flush on shutdown and the flush when caught up,
neither of which matter, this makes flushes asynchronous.
Also, block processing for reorgs is now asynchronous.
This also removes the FORCE_REORG debug envvar; I want to
put that into the RPC interface.
Closes #102
2017-01-09 16:15:17 +09:00
Neil Booth
89209632ae
Clean up daemon.py
2017-01-08 18:48:32 +09:00
Neil Booth
4bd474bf57
Prepare 0.10.2
2017-01-08 10:07:58 +09:00
Neil Booth
dcc2c92bd6
Rename NETWORK envvar to NET
...
For consistency with lib/coins.py
SegWit testnet needs its own NET
2017-01-08 10:07:58 +09:00
Neil Booth
4d62019b07
Check Genesis hash
...
Testnet RPC_PORT is 18332
2017-01-08 10:07:57 +09:00
Neil Booth
852753cb94
Implement deserialization of SegWit transactions
...
tx_hash needs to be that of the prior serialization, so
need to change internal read_block API.
Bitcoin core 0.13.1 broke backwards compat of the RPC interface.
Closes #92
2017-01-08 10:07:57 +09:00
Neil Booth
7392306e68
Prepare 0.10.1
2017-01-07 15:25:22 +09:00
Neil Booth
18af57059f
Improve group handling.
...
I believe this fixes #94
2017-01-07 15:21:45 +09:00
Neil Booth
fe70a6db30
Prepare 0.10.0
2017-01-07 11:54:52 +09:00
Neil Booth
91ca5fc14a
Split out history into its own DB.
2017-01-07 11:51:12 +09:00
Neil Booth
7f9cb9cd9d
Generic header length
...
If header lengths change in the future, only one function needs
to change in coins.py.
2017-01-07 11:51:12 +09:00
Neil Booth
c8c4199503
New VirtualFile abstraction
...
Use for headers, tx counts and tx hashes.
2017-01-07 11:51:11 +09:00
Neil Booth
427183ae01
Place metadata files in meta/, db in db/
2017-01-07 11:51:11 +09:00
Neil Booth
2b2909f1c4
Move to hashX
...
The hashX of a script is the first 11 bytes of its sha256 hash.
Closes #72 .
2017-01-07 11:51:01 +09:00
Neil Booth
de201a247f
Double fetch size of mempool.
...
Set testnet genesis hash.
2017-01-07 11:51:01 +09:00
Neil Booth
0f43ce564a
Fix log message
2017-01-07 11:51:00 +09:00
Neil Booth
4b0ba2fcd3
Prepare 0.9.22
...
Documentation updates only
2017-01-03 17:08:55 +09:00
Neil Booth
7d899e07ae
Fix version
2017-01-02 20:12:08 +09:00
Neil Booth
533c97a575
Clean up DB open handling
...
Closes #89
2017-01-02 18:11:17 +09:00
Neil Booth
ddfefd7f36
Prepare 0.9.20
2017-01-02 17:38:01 +09:00
Neil Booth
517f78858c
Fix IRC flood issues
...
Tweaked version of suggestions from Valesi, petrkr, and bauerj.
Fixes #93
2017-01-02 17:30:32 +09:00
Neil Booth
5cbe878cb8
Move ServerManager to controller.py
...
rename Controller
2017-01-02 17:30:32 +09:00
Neil Booth
67908b3541
Slightly cleaner semaphore fix
2017-01-02 17:30:32 +09:00
shsmith
62eded55bb
move sleep outside semaphore (issue 88)
2016-12-26 09:15:22 -08:00
Neil Booth
b1e8012b56
Prepare 0.9.18
2016-12-22 06:37:04 +09:00
Neil Booth
a81b8917d8
Logging tweaks
2016-12-21 21:15:48 +09:00
Neil Booth
d45e174e03
Prepare 0.9.17
2016-12-21 20:33:09 +09:00
Neil Booth
4c4cd92c54
Banner: add $DONATION_ADDRESS meta variable
...
Replaced with the DONATION_ADDRESS environment variable
2016-12-21 20:31:42 +09:00
Neil Booth
7a3b0830e1
Make all storage use fsync
...
Hopefully costs little and increases robustness.
Closes #75
2016-12-21 20:30:56 +09:00
Neil Booth
99d8cbfbf6
Permit RPC requests up to 1MB
...
Fixes #85
Prepare 0.9.16
2016-12-21 19:47:27 +09:00
Neil Booth
622f61e943
Don't do an initial sessions log
2016-12-21 19:47:26 +09:00
Neil Booth
50f02747de
Throttle abusive logging
2016-12-21 19:47:25 +09:00
Neil Booth
01c2fad534
Log paused or low-priority sessions on exit
2016-12-21 07:28:32 +09:00
Neil Booth
6a6bbaa07b
Tweak mempool logging
2016-12-21 07:28:32 +09:00
Neil Booth
a9b1bc16dd
Prepare 0.9.15
2016-12-20 06:54:06 +09:00
Neil Booth
efe3ebd9ee
Remove None from touched when backing up.
...
Fixes #84
2016-12-20 06:50:55 +09:00
Neil Booth
8b87a837b8
Prepare 0.9.14
2016-12-19 23:28:14 +09:00
Neil Booth
e91f49101b
Don't start processing mempool until caught up
...
Print server manager settings once servers start
2016-12-19 23:25:37 +09:00
Neil Booth
7b8119d787
Prepare 0.9.13
2016-12-18 23:21:22 +09:00
Neil Booth
813d8ee7e3
Reduce logging verbosity for delayed requests
...
Only log when the delay changes
2016-12-18 23:17:03 +09:00
Neil Booth
6c7cf34bcd
Prepare 0.9.12
2016-12-18 08:15:53 +09:00
Neil Booth
0dccb795dc
Add pid to RPC getinfo
...
Closes #77
2016-12-18 08:13:17 +09:00
Neil Booth
3cf23c88bd
Start up RPC server immediately
...
Don't wait for catch-up
Closes #78
2016-12-18 08:10:20 +09:00
Neil Booth
6679eea04c
getinfo RPC: change height reporting
...
Also rename watched to subs
Closes #80
2016-12-18 07:57:48 +09:00
Neil Booth
ef54413054
Prepare 0.9.11
2016-12-18 00:02:16 +09:00
Neil Booth
645e60eaee
Put peer at RHS of sessions log.
...
Then IPv6 addresses don't mess up the formatting.
2016-12-18 00:02:16 +09:00
Neil Booth
0665e1ac5c
Clear the touched addresses if not caught up
2016-12-18 00:02:16 +09:00
Neil Booth
39af7a7463
Rework main block processor loop
...
It's less awkward and more explicit.
This brings back the efficiency lost in the 0.9.x series.
It also removes the special case hack: both when syncing and
caught up, block processing is done in the executor.
Fixes #58
2016-12-17 21:45:44 +09:00
Neil Booth
3f64a8dd6e
Log block processing time only if not syncing
...
Prepare 0.9.10
2016-12-17 15:31:30 +09:00
Neil Booth
1ebebf08d9
Improve logging
2016-12-17 15:26:17 +09:00
Neil Booth
a30932fc86
Fix namespace of RPCError
...
Fixes #76
2016-12-17 14:43:27 +09:00
Neil Booth
35f07bd01e
Prepare 0.9.9
2016-12-15 17:24:16 +09:00
Neil Booth
49714a45e6
Mempool tx processing to handle DBError
...
Fixes #74
2016-12-15 17:22:20 +09:00
Neil Booth
5c80b96d0f
Prioritize mempool processing of sent txs
...
Closes #73
2016-12-15 17:22:19 +09:00
Neil Booth
ac48695db8
daemon: getting height optionally gets mempool
...
Improve daemon startup log message
2016-12-15 15:38:22 +09:00
Neil Booth
5fe49bb261
Synchronize daemon height and mempool fetching
...
Cleanup and simplify touched handling and its event, which is
now controlled and owned by the mempool.
The daemon object owns the set of current mempool hashes.
Clean up and simplify the mempool main loop.
Fixes #70 .
2016-12-15 12:08:14 +09:00
Neil Booth
e88ea91e89
Defer address notifications whilst processing a block
...
Partial fix of #70
2016-12-15 12:08:14 +09:00
Neil Booth
1b2a0bd761
Append first.
2016-12-15 12:08:14 +09:00