Commit Graph

637 Commits

Author SHA1 Message Date
Neil Booth
74cb4c2f45 Require Python 3.6 2017-10-14 11:51:11 +09:00
Neil Booth
9bf220dec6 Widen min and max columns 2017-10-12 14:19:28 +09:00
Neil Booth
e039ba4b15 Prepare 1.2 2017-10-12 14:11:11 +09:00
Neil Booth
56d03625f6 Keep P2PK scripts separate from P2PKH scripts
This makes the DB incompatible with prior versions,
so the DB version is bumped.
2017-10-12 14:02:22 +09:00
Neil Booth
1cf084fb69 Prepare 1.1.2 2017-10-12 14:02:22 +09:00
Neil Booth
346385680e Fix listunspent methods to remove mempool spends
Fixes #277
2017-10-12 13:56:46 +09:00
Neil Booth
81947d796b Enhance PEER_DISCOVERY environment variable
It is now tri-state - ON, OFF or SELF.

Fixes #287
2017-10-11 13:54:13 +09:00
Neil Booth
7fa7d290ca Prepare 1.1.1 2017-09-28 09:05:51 +08:00
Neil Booth
3e376a79eb Rename lib/env to lib/env_base 2017-09-28 08:57:44 +08:00
Neil Booth
366c556c5f Split out lib/server_base.py 2017-09-28 08:56:12 +08:00
Neil Booth
ae03ea6cb6 Add env object for wallet engine
Split out common Env parts to a base class.
2017-09-21 18:16:37 +08:00
cipig
b16a4f5a94 fix DASH set_protocol_handlers (#271)
fix NameError: name 'masternode_announce_broadcast_1_0' is not defined
2017-09-21 09:32:42 +08:00
Luke Childs
0e6b59eb92 Add ALLOW_ROOT option (#268)
* Add ALLOW_ROOT option

* Document ALLOW_ROOT option

* Update controller.py

* Update ENVIRONMENT.rst
2017-09-20 08:14:06 +08:00
Neil Booth
131344715a Minor environment variable improvements
- COIN and NET strip surrounding whitespace
- new environment variable RPC_HOST, similar to HOST, but
  for RPC.  Permits fine-grained control of which addresses
  the RPC server listens on.
- HOST and RPC_HOST strip surrounding whitespace from hostnames
  and IP addresses
- tests and documentation updated to match
2017-09-09 22:00:54 +09:00
Justin Turner Arthur
0c2e5c6368 Minor optimizations to Bitcoin tx processing (#214)
* Construct unpacking functions for byte format up front to save time
wasted on parsing format string every iteration.

* Store length ahead of time as the overhead adds up.

* Reduce object attribute lookups in hash functions.

* Clean up lib pkg API changes. Unit test new "public" API members.
Underscore prefix for internal hash module funcs. Make bytes.fromhex a
public function.

* Document recent performance findings.
2017-09-09 11:06:46 +07:00
Neil Booth
8cfa42ed9c Prepare 1.1 2017-09-09 10:51:43 +09:00
Neil Booth
2f69aaa487 Remove dead code 2017-09-09 10:39:13 +09:00
Neil Booth
305fd89740 Stop persisting peers; resdiscover on restart 2017-09-08 17:39:48 +09:00
Neil Booth
40fa79da63 Remove exception for onion peers
Like clearnet peers, they are only returned in server.peers.subscribe
if there was a successful connection.
2017-09-08 17:31:46 +09:00
Neil Booth
9dd5541f82 RPCError has msg member, not message 2017-09-08 17:02:37 +09:00
Neil Booth
f723455992 Prepare 1.1pre2 2017-09-08 11:28:23 +09:00
Neil Booth
4f5a219438 Dash: return errors in JSON error field for protocol 1.1 2017-09-08 11:09:30 +09:00
Neil Booth
06693c5880 Fix handling of failed transaction broadcast 2017-09-08 10:55:09 +09:00
Neil Booth
794e1d86ff Peerdisc: handle protocol 1.1 server.version replies 2017-09-07 17:03:17 +09:00
Neil Booth
c1c4906fba Prepare 1.1pre1 2017-09-07 14:16:22 +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
2684f3b888 Require protocol_version to be given if >= 1.1 2017-09-07 13:20:39 +09:00
Neil Booth
09783aeacc Accept protocols down to 0.9 for Electrum 1.x clients
Fixes #248
2017-09-07 13:13:47 +09:00
Neil Booth
2a955a922a Improved handler handling
- move server.donation_address to the session from controller
- session controls handler map, no longer lives partly on controller
2017-09-07 13:13:34 +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
37c15f7018 Show protocol version in sessions RPC call 2017-09-06 18:14:52 +09:00
Neil Booth
f2f2b1e7b6 Update protocol documentation 2017-09-06 17:56:23 +09:00
Neil Booth
9c25685eb9 Handle client protocol range requests.
Add more tests.
2017-09-06 17:11:18 +09:00
Neil Booth
e7601a23cd Implement other address methods for scripthash 2017-09-06 16:41:14 +09:00
Neil Booth
135ab68f74 Simple protocol negotiation and setting of handlers
It turns out clients pass 0.10 instead of 1.0 as the protocol version.
Distinguish some handlers for 1.0 and 1.1 protocols.
Log protocol version request
Add tests of new library function
2017-09-06 16:24:56 +09: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
1f3e942cbc Some further cleanup 2017-08-26 12:47:47 +09:00
John L. Jegutanis
885872f0b5 Various improvements (#233)
* Fix formatting

* Refactor daemons

Replaced FujiDaemon with FakeEstimateFeeDaemon that simulates estimate
fee calls and provide the same functionality.
Removed the parameter False for LegacyRPCDaemon's getblock RPC call as
it is not needed.

* Fix Crown coin P2SH_VERBYTES and add REORG_LIMIT
2017-08-26 12:33:20 +09:00
Neil Booth
d324bdc0d1 Prepare 1.0.17 2017-08-21 23:41:30 +09:00
Neil Booth
fab3f5affe Have proxy.create_connection use kwargs
Fixes #227
2017-08-21 23:38:54 +09:00
Neil Booth
7442bad66c Prepare 1.0.16 2017-08-21 20:52:02 +09:00
Neil Booth
4d2456e4b4 Explicitly bind to both IPv4 and IPv6. 2017-08-21 20:07:08 +09:00
mmouse-
69c1535d13 Use our listening Host/IP for outgoing connections also (#226)
Explicitely set the local IP for outgoing connections, if we're listening
on only one Hostname or IP (of a multi-IP machine). This makes sure our
peers see our outgoing connections coming from the same IP that we're
listening on when we have a specific HOST= configured.

For machines with more than one IP this avoids source-destination
mismatch errors when advertizing our peer. Resolves kyuupichan/electrumx#225
2017-08-21 05:47:05 +07:00
Kefkius
59d8421c87 Fix KeyError on incorrect genesis hash (#224)
Fix KeyError that occurs when creating an exception for an incorrect genesis hash.
2017-08-20 05:31:55 +07:00
FujiCoin
b4ac4b6a05 Add Fujicoin (#218)
* Add Fujicoin

* Add explanation of FujiDaemon
2017-08-18 15:05:54 +07:00
sam
5b475751f1 Correct 'seessions' (sessions) (#220) 2017-08-13 07:29:20 +07:00
Neil Booth
92ba67037f Use None instead of localhost
See #211.  Some don't have localhost mapped, and
we should also bind to IPv6 interfaces.

Thanks to gaoyaxing24 for testing.
2017-08-02 16:54:58 +09:00
Justin Turner Arthur
28764936c4 Remove semicolons and a couple unused variables. (#212) 2017-08-02 15:55:44 +09:00
Neil Booth
23b121e799 Prepare 1.0.15 2017-07-30 21:38:51 +09:00