Commit Graph

70 Commits

Author SHA1 Message Date
elmora-do
50e2785256 Update masternode doc and masternode_list rpc method (#493)
* Update protocol-methods.rst

* Error is raised if the payees is not a list in RPC method masternode_list
2018-06-13 01:30:05 +08:00
Neil Booth
46adf543fc Enforce pycodestyle in server/ 2018-06-10 18:39:12 +09:00
Neil Booth
e29b692b9d Fix typo 2018-06-10 18:21:19 +09:00
elmora-do
7baf6cf68d Add $PAC (#474)
* Add $PAC

* Refactor and improve masternode notifications
* Update DASH/$PAC RPC documentation

These RPC commands were documented:

masternode.announce.broadcast
masternode.subscribe
masternode.list
masternode.info
2018-06-06 09:15:36 +09:00
Neil Booth
7d9ffbbed0 Minimum supported protocol version is 1.1 2018-05-29 13:31:40 +08:00
Neil Booth
55e060c318 RPC member is 'message' not 'msg'
Fixes #455
2018-04-25 01:04:46 +08:00
Neil Booth
8bf30fba0e Move server/version.py to Controller class 2018-04-09 09:37:07 +09:00
Neil Booth
415552989b Fix group consolidation logic 2018-04-08 10:16:36 +09:00
Neil Booth
bc6093a8fe Fully integrate aiorpcX 2018-04-08 10:16:36 +09:00
John L. Jegutanis
90f28314d2 Add DROP_CLIENT env variable (#432)
This will disconnect any client based on their version string,
using a regular expression.
Useful for dropping buggy/unsupported clients.
2018-04-05 06:49:56 +09:00
Neil Booth
80fc334449 Switch to aiorpcX for SOCKS proxying. 2018-03-10 13:06:37 +08:00
Neil Booth
47f65ffda2 Add raw header subscriptions. 2018-03-08 16:14:03 +08:00
Neil Booth
bab8d9f915 Add server.ping RPC call 2018-03-08 14:28:57 +08:00
Neil Booth
521227c2b8 coin is on the controller, unfortunately 2018-03-06 23:02:39 +08:00
Neil Booth
62220f64db Remove dead code left over from prior 2018-03-06 22:25:54 +08:00
Neil Booth
5109990ea4 Add blockchain.block.headers RPC call 2018-03-03 18:39:24 +08:00
Neil Booth
7823129526 Clarify truncation behaviour of get_chunk in docs 2018-03-03 18:39:24 +08:00
Neil Booth
7a989ad4e7 Remove get_chunk restriction 2018-02-22 15:35:13 +08:00
ThomasV
2d7403f2ef New protocol: (#330)
- add method mempool.get_fee_histogram
- bump protocol version to 1.2
2018-01-20 08:51:38 -04:00
TheLazieR Yip
e61490a5ba Remove support for Electrum-Dash 2.6.4 (#347) 2018-01-11 18:50:04 +08:00
TheLazieR Yip
a6e466e37e Update DashElectrumX follow notification process of ElectrumX. (#346) 2018-01-11 18:05:18 +08:00
Neil Booth
b01139bb93 Don't iterate over mempool_statuses
Fixes #321
2017-11-28 18:56:36 +09:00
Neil Booth
cb33dd115f Clean up client notifications
- mempool informed of new block; it notifies controller synchronously
- controller notifies sessions synchronously
- sessions are notified of new height synchronously.  Any address touch
notifications are returned to the controller and scheduled
asynchronously.

Also, remove a redundant notification of height on initial header
subscriptions - the subscription response gives the current height;
we also used to send a notification as we didn't update our idea
of notified height.
2017-11-27 18:22:32 +09:00
Neil Booth
72fce87088 Put server_features() on the environment object
Fixes #302
2017-11-16 20:14:49 +00:00
Neil Booth
cf99f733d9 Remove the get_proof RPC.
The client will get an unknown method error message instead.
2017-10-15 16:27:10 +09: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
Neil Booth
9dd5541f82 RPCError has msg member, not message 2017-09-08 17:02:37 +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
2684f3b888 Require protocol_version to be given if >= 1.1 2017-09-07 13:20:39 +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
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
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
d9ff685958 Merge pull request #183 from thelazier/dash_mn_methods
Add support for Dash Masternode methods
2017-05-16 19:02:17 +07:00
Neil Booth
08dbbf217a client_version must be a tuple
Fixes #180
2017-05-16 14:55:19 +09:00
TheLazieR Yip
2e87d49e04 Add more comment on DashElectrumX.server_version 2017-05-15 08:10:09 +00:00
TheLazieR Yip
e99400c225 Update DashElectrumX as commented 2017-05-15 04:12:33 +00:00
TheLazieR Yip
4da2278729 Force server string response for Electrum-Dash 2.6.4 client 2017-05-14 17:38:55 +00:00
TheLazieR Yip
f179c67935 Add support for Dash Masternode methods
+ Add DashDaemon class
+ Add DashElectrumX class
+ Update coin configurations for Dash
2017-05-14 16:36:02 +00:00
LaoDC
9e34bf8583 reverted and made the version split isolated within the banner logic only as not to affect other parts of the code. 2017-05-03 17:43:47 +07:00
LaoDC
9dceeb914c Add new variables to BANNER(_TOR)
$SERVER_VER will return the version number (eg: 1.0.10)
$SERVER_SUBVERSION will return the full version string (eg: ElectrumX 1.0.10)

$VERSION is kept for legacy which is the same as $SERVER_SUBVERSION
2017-05-03 17:10:52 +07:00
LaoDC
5e92feb8a6 Add new variables to BANNER(_TOR)
$SERVER_VER will return the version number (eg: 1.0.10)
$SERVER_SUBVERSION will return the full version string (eg: ElectrumX 1.0.10)

$VERSION is kept for legacy which is the same as $SERVER_SUBVERSION
2017-05-03 17:09:52 +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
abba36ac6c Relax the get_chunk restriction based on client
Closes #162
2017-04-01 11:17:57 +09:00
Neil Booth
7a2f29aabe Be stricter accepting add_peer requests
- rate-limit onion add_peer requests
- for clearnet peers only accept if the peer resolves to the
  source address
2017-03-25 11:36:14 +09:00
Neil Booth
e0fd64d29a Rate-limit add_peer calls randomly
Prepare 1.0.1
2017-03-22 07:59:56 +09:00