Commit Graph

133 Commits

Author SHA1 Message Date
John L. Jegutanis
bc31df8ee0 Fix support for Namecoin and Dogecoin, add Zcash support
Closes #83
2017-03-25 11:35:55 +09:00
Neil Booth
37602d4eae A couple of tweaks to the prior commit. 2017-03-25 11:35:55 +09:00
John L. Jegutanis
ed7d8a319d Refactor block parsing API 2017-03-25 11:35:55 +09:00
Neil Booth
9238fe397d Drop ports from top level of features 2017-03-25 11:35:54 +09:00
Neil Booth
af67536598 Set reorg limit to 8k on testnet 2017-03-21 20:04:51 +09:00
Neil
5c050e1d31 Merge pull request #151 from erasmospunk/master
Set the correct XPUB, XPRV bytes for dogecoin
2017-03-18 11:53:01 +09:00
John L. Jegutanis
fe544eae7f Set the correct XPUB, XPRV bytes for dogecoin 2017-03-18 03:27:53 +02:00
pooler
11a3c77fdb Fix Litecoin parameters 2017-03-17 12:16:44 +01:00
Neil Booth
30bb832ef8 Prepare 1.0 2017-03-05 13:22:09 +09:00
Neil Booth
42dfd16b14 Add Bitoin Unlimited nolnet 2017-03-04 09:52:47 +09:00
Neil Booth
56130e4a66 Fix uninitialized variable 2017-03-03 08:03:48 +09:00
Neil Booth
85f17b75c8 Remove stray commas 2017-02-27 19:39:22 +09:00
Neil Booth
ac8e38a87c Tweak prior 2017-02-27 07:36:52 +09:00
John L. Jegutanis
6b1b9d01f2 Better handle base58 version bytes and allow for a >1 byte version 2017-02-27 07:36:33 +09:00
Neil Booth
d36d222489 Maintain more than one self-identity
Rather than just retaining our clearnet identity from the environment,
maintain any tor one as well.  This is a little cleaner and avoids
confusion over port assignment when converting to real names.

Fixes #136
2017-02-26 10:22:22 +09:00
Neil Booth
f8f5d4429f Merge branch 'develop' 2017-02-19 19:05:24 +09:00
Thomas König
b6be653f4f Adding FairCoin (#122)
* Adding FairCoin

* remove redundant 'header_len' function

* removed serializer
added missing commas
removed assertion from read_block and replaced it with a comment
2017-02-19 19:03:21 +09:00
Neil Booth
86f6a148b9 Separate async item processor per session
Improve daemon wait logic

Fixes #100
2017-02-19 19:01:41 +09:00
Neil Booth
23b7ec3fb5 get_extra_info fix 2017-02-19 10:52:34 +09:00
Neil Booth
0149f2785f A few peer handling improvements
based on suggestions from hsmiths
Set transport to None if a connection is lost
Only subscribe to peers if the peer is verified on same network
2017-02-19 10:21:17 +09:00
Neil Booth
9d6b353eec Fix typo pointed out by hsmiths, thanks 2017-02-18 23:42:24 +09:00
Neil Booth
3f35bc0298 More PEP8 stuff 2017-02-18 13:05:26 +09:00
Neil Booth
33cdfa4fc8 Merge branch 'nmarley-pep8' into develop 2017-02-18 12:54:01 +09:00
Neil Booth
9bd7b5a9f9 Merge branch 'pep8' of https://github.com/nmarley/electrumx into nmarley-pep8 2017-02-18 12:51:58 +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
251dca4da9 Update match groups 2017-02-17 21:42:34 +09:00
Neil Booth
4dcd7f25a5 Further fix regex for hex chars 2017-02-17 07:59:49 +09:00
Neil Booth
82d57dc90f Accept IPv6 addresses in DAEMON_URL
Fixes #126
2017-02-16 08:00:08 +09:00
Nathan Marley
a03665696c recommendations from pycodestyle (pep8 style) 2017-02-07 20:12:50 -08:00
Neil Booth
6db9cb967c Require attributes to be specified for a coin 2017-02-06 19:48:30 +09:00
shsmith
169f5df91f update hostnames (#120) 2017-02-06 07:28:52 +09:00
Neil Booth
f1251766b6 Merge branch 'master' of github.com:kyuupichan/electrumx 2017-02-05 09:50:29 +09:00
Neil Booth
1856cbe6c0 Coin fixes/cleanup (erasmospunk)
2 out of 3 from #118
2017-02-05 09:41:27 +09:00
Neil Booth
a019fde853 Show uptime in RPC getinfo result 2017-02-04 10:35:36 +09:00
TheLazieR Yip
0e51c80156 Add PEERS for DASH (#117)
* Add PEERS for DASH

* Update PEER_DEFAULT_PORTS for DASH Testnet
2017-02-02 11:32:38 +09:00
Neil Booth
97557fa437 Don't send batches for now 2017-01-31 20:05:40 +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
f43c08d979 Log fatal messages once only 2017-01-29 06:08:29 +09:00
Neil Booth
e4c206e123 Namespace fix 2017-01-25 20:38:28 +09:00
Neil Booth
551c04a3bc Remove all uses of "except:" 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
Petr Kracík
5343c1a286 Changed litecoin genesis block hash (#109) 2017-01-22 23:41:45 +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
5f9e337457 Improve RocksDB iterator 2017-01-17 07:43:06 +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
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
540479ad23 Tweaks for prior; update README. 2017-01-08 12:10:56 +09:00
protonn
1aa55f2976 add digibyte and argentum (#96)
* add DigiByte and Argentum
2017-01-08 12:00:41 +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