Commit Graph

111 Commits

Author SHA1 Message Date
Neil Booth
af9c82dbdb Doc updates 2017-09-07 17:00:39 +09:00
Neil Booth
3cc5b5ea43 Make COIN env variable mandatory.
- make a clean split between the  Cash and Segwit flavours of bitcoin
  by giving them their own COIN names.  They can then both have a NET
  of mainnet.
- The previous Bitcoin COIN names no longer exist, and the env var is
  now mandatory, so everyone will need to set COIN and NET appropriately
  for their flavour of bitcoin and mainnet or testnet.
2017-09-07 13:53:44 +09:00
Neil Booth
a978ca6df7 Permit HOST to be a comma-separated list.
Update documentation to match.
2017-09-06 20:19:59 +09:00
Neil Booth
f2f2b1e7b6 Update protocol documentation 2017-09-06 17:56:23 +09:00
Neil Booth
eb91522d20 Merge remote-tracking branch 'github/master' 2017-09-06 15:29:32 +09:00
EagleTM
80f1a8edc0 Update HOWTO.rst: Add iptables example for running on privileged port (#245) 2017-09-02 16:26:46 +07:00
Neil Booth
f8a838c589 Add "hash_function" member to server.features.
Update documentation
2017-08-26 15:37:59 +09:00
Neil Booth
137236712f Add EVENT_LOOP_POLICY environment variable
Based on #215 by JustinTArthur.

- Accept EVENT_LOOP_POLICY of uvloop
- Move initilisation from electrumx_server to controller
- SocksProxy now requires a loop
- Update tests
2017-08-26 14:03:02 +09:00
Neil Booth
ab62092afc Add note about new NET assignments. 2017-08-21 20:59:51 +09:00
Pavel Zhovner
9279602c4b Update HOWTO.rst (#206) 2017-07-23 14:06:51 +09:00
Henry
5cc3973eff HOWTO: fixed paths 2017-07-04 03:37:56 +02:00
Andres G. Aragoneses
8fb0faac2d HOWTO.rst: fix typo 2017-05-04 15:11:32 +08:00
Neil
37a9b27646 Update ENVIRONMENT.rst 2017-05-04 00:22:53 +09:00
LaoDC
3c8ab998e4 sorry about permissions 2017-05-03 19:27:00 +07:00
LaoDC
70c6c87852 fixed typo. 2017-05-03 19:26:49 +07:00
LaoDC
c5c75c30de Updated docs/ENVIRONMENT.rst to reflect changes in variables 2017-05-03 19:25:14 +07:00
Neil Booth
a94d320e5d New feature: force peer discovery via proxy
Set FORCE_PROXY to non-empty to force peer discovery to go
through the proxy.  See docs/ENVIRONMENT.rst

Wait for an attempt at proxy discovery to be made before beginning
peer discovery.
2017-04-02 15:06:29 +09:00
Neil Booth
9abc1dc11e REPORT_HOST no longer defaults to HOST
Cleanup of identity handling.  It is now possible to specify
a Tor identity and no clearnet identity.
2017-04-01 12:03:53 +09:00
Neil Booth
9f12379181 Update notes about rocksdb in Python 2017-03-29 17:01:40 +09:00
Neil Booth
31755e1dac Update PROTOCOL.rst and PEER_DISCOVERY.rst 2017-03-25 13:28:20 +09:00
John L. Jegutanis
a820829e0e Dynamic header support
Block headers can have a dynamic size that is being indexed on a
new meta file "headers_offsets".

The offsets are 64 bits in order to accommodate coins with big
headers that will accumulate GBs of header data after some years.

Closes #128
2017-03-25 11:35:55 +09:00
Neil Booth
127b4de745 Add new RPC method: add_peer 2017-03-25 11:35:54 +09:00
Neil Booth
30c91c69e1 Update protocol docs 2017-03-22 23:45:26 +09:00
shsmith
5ef25976c4 merge samples into contrib 2017-03-12 18:30:44 -07:00
Neil Booth
9c6d2f5764 Update ACKNOWLEDGEMENTS 2017-03-11 13:51:51 +09:00
Neil Booth
30bb832ef8 Prepare 1.0 2017-03-05 13:22:09 +09:00
Neil Booth
39bcdb1b6a Require Python 3.5.3
3.5.2 has various socket and API issues affecting peer discovery

Closes #135
2017-03-01 07:23:11 +09:00
Neil Booth
6f32f99a06 Prepare 0.99 2017-02-19 19:42:26 +09:00
Neil Booth
5662f1fa88 Add facility to disable peer discovery
and/or self announcement.
2017-02-19 19:02:01 +09:00
Neil Booth
e261824593 Tweak docs 2017-02-19 10:32:28 +09:00
xHire
881e9cc6cc A note about testnet-segwit NET in docs (#130)
Thanks
2017-02-19 10:32:27 +09:00
Neil Booth
151da40d5b Implement peer discovery protocol
Closes #104

DEFAULT_PORTS now a coin property
A Peer object maintains peer information
Revamp LocalRPC "peers" call to show a lot more information
Have lib/jsonrpc.py take care of handling request timeouts
Save and restore peers to a file
Loosen JSON RPC rules so we work with electrum-server and beancurd which don't follow the spec.
Handle incoming server.add_peer requests
Send server.add_peer registrations if peer doesn't have us or correct ports
Verify peers at regular intervals, forget stale peers, verify new peers or those with updated ports
If connecting via one port fails, try the other
Add socks.py for SOCKS4 and SOCKS5 proxying, so Tor servers can now be reached by TCP and SSL
Put full licence boilerplate in lib/ files
Disable IRC advertising on testnet
Serve a Tor banner file if it seems like a connection came from your tor proxy (see ENVIONMENT.rst)
Retry tor proxy hourly, and peers that are about to turn stale
Report more onion peers to a connection that seems to be combing from your tor proxy
Only report good peers to server.peers.subscribe; always report self if valid
Handle peers on the wrong network robustly
Default to 127.0.0.1 rather than localhost for Python <= 3.5.2 compatibility
Put peer name in logs of connections to it
Update docs
2017-02-18 12:43:45 +09:00
Neil Booth
82d57dc90f Accept IPv6 addresses in DAEMON_URL
Fixes #126
2017-02-16 08:00:08 +09:00
Neil Booth
60ad792179 Update docs 2017-02-12 08:35:47 +09:00
Neil Booth
616bcf6bfd Add daemon_url RPC call and document it.
Closes #111
2017-01-31 08:13:25 +09:00
Neil Booth
cd078be882 Fix some typos 2017-01-29 18:43:58 +09:00
Neil Booth
d0ecdcc5bc Add docs/PROTOCOL.rst 2017-01-29 18:38:23 +09:00
Neil Booth
4a8cec9988 Prepare 0.10.14 2017-01-29 08:29:41 +09:00
Neil Booth
0202b2210a Add peer discovery document 2017-01-29 08:24:18 +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
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
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
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
5aaee6b608 Update docs 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
d2da494120 Clarify README; no need to resync.
Update HOWTO and docs
2017-01-12 22:40:21 +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
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
91ca5fc14a Split out history into its own DB. 2017-01-07 11:51:12 +09:00