Commit Graph

29 Commits

Author SHA1 Message Date
Neil Booth
23e484b1d9 Enforce pycodestyle in lib/ 2018-06-10 19:19:08 +09:00
WO
8d42c23026 Update for Zcash v3 tx (#475) 2018-05-26 17:48:58 +07:00
cipherzzz
9d6ddfbe56 Change RPC testnet port and remove invalid assert (#405)
* Fix testnet rpc port and removed invalid assert for Decred
2018-03-09 00:14:43 +08:00
cipherzzz
c26227413e Add Decred(DCR) (#402) 2018-03-08 23:06:58 +08:00
John L. Jegutanis
dfea542d0e Add Bitcoin Atom support (#378) 2018-02-21 18:22:16 +08:00
Neil Booth
81a08d13ac Fix recursion in prior commit 2018-01-11 15:57:26 +08:00
Neil Booth
e5b4f5f316 Change read_tx interface of deserializer
Most callers didn't want the hash, so create a separate call
that does both.  Add a new call that returns the TX and its vsize.
2018-01-11 15:45:10 +08:00
John L. Jegutanis
f3fea9f8ee Equihash POW abstraction and Bitcoin Gold support (#311)
* Extract the Equihash mixin from Zcash

The extracted EquihashMixin and DeserializerEquihash are used when
the Equihash POW support is needed but the Zcash transaction parsing
is not.

* Add Bitcoin Gold support

* Minor formatting fixing
2017-11-14 08:27:57 +09:00
Neil Booth
5c7bf3cce9 Try and fix Viacoin 2017-10-14 12:20:14 +09:00
Sergii Vakula
9303153150 Add support for Emercoin (#284)
* Add parameters for emercoin.

* Add tests for emercoin.

* add block for test new read_header function

* add to daemon https protocol support
2017-10-13 10:12:24 +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
f696a7933d Prevent unnecessary copying of raw blocks 2017-07-30 20:47:54 +09:00
John L. Jegutanis
b48465a065 Add Reddcoin support 2017-06-11 01:37:49 +03:00
John L. Jegutanis
1e9a65dccb Handle legacy daemon RPCs
Add support for daemons that don't have the new 'getblock' RPC call that
returns the block in hex, the workaround is to manually recreate the block
bytes. The recreated block bytes may not be the exact ones as in the
underlying blockchain but it is good enough for our indexing purposes.
2017-06-11 01:37:45 +03:00
John L. Jegutanis
232d6be72c Remove dead code 2017-05-18 15:07:34 +02:00
John L. Jegutanis
bc31df8ee0 Fix support for Namecoin and Dogecoin, add Zcash support
Closes #83
2017-03-25 11:35:55 +09:00
John L. Jegutanis
ed7d8a319d Refactor block parsing API 2017-03-25 11:35:55 +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
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
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
Nathan Marley
a03665696c recommendations from pycodestyle (pep8 style) 2017-02-07 20:12:50 -08: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
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
0ff579604c Speed up tx.py; giving ~ 5% higher tx/s in memory 2016-11-06 12:07:53 +09:00
Neil Booth
d2ebb80fac Extend copyright notice; improve comments 2016-11-03 16:45:06 +09:00
Neil Booth
2b45698962 Remove Outpoint as a separate object
Hopefully this is a little more efficient
2016-10-28 07:35:18 +09:00
Neil Booth
64b7554b73 Fix some typos 2016-10-08 17:34:12 +09:00
Neil Booth
a3dbc68614 Initial revision 2016-10-08 17:17:43 +09:00