Skip to content

Commit 35dd1f6

Browse files
author
Neil Booth
committed
Remove IRC support
1 parent 509069c commit 35dd1f6

14 files changed

Lines changed: 20 additions & 270 deletions

File tree

contrib/raspberrypi3/install_electrumx.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ sudo apt install libreadline6-dev/stable libreadline6/stable
1717
sudo apt-get install libleveldb-dev
1818
sudo apt-get install git
1919
sudo pip3 install plyvel
20-
sudo pip3 install irc
2120

2221
# install electrumx
2322
git clone https://github.com/kyuupichan/electrumx.git

contrib/raspberrypi3/run_electrumx.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ export TCP_PORT=50001
2020
export SSL_PORT=50002
2121

2222
# visibility
23-
export IRC=
24-
export IRC_NICK=hostname
2523
export REPORT_HOST=hostname.com
2624
export RPC_PORT=8000
2725

docs/ARCHITECTURE.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,3 @@ Database
8181

8282
The underlying data store, made up of the DB backend (such as
8383
`leveldb`) and the host filesystem.
84-
85-
IRC
86-
---
87-
88-
Handles advertising of ElectrumX services via IRC.

docs/ENVIRONMENT.rst

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ some of this.
296296
By default peer discovery happens over the clear internet. Set this
297297
to non-empty to force peer discovery to be done via the proxy. This
298298
might be useful if you are running a Tor service exclusively and
299-
wish to keep your IP address private. **NOTE**: in such a case you
300-
should leave **IRC** unset as IRC connections are *always* over the
301-
normal internet.
299+
wish to keep your IP address private.
302300

303301
* **TOR_PROXY_HOST**
304302

@@ -317,8 +315,8 @@ some of this.
317315
Server Advertising
318316
------------------
319317

320-
These environment variables affect how your server is advertised, both
321-
by peer discovery (if enabled) and IRC (if enabled).
318+
These environment variables affect how your server is advertised
319+
by peer discovery (if enabled).
322320

323321
* **REPORT_HOST**
324322

@@ -357,27 +355,6 @@ by peer discovery (if enabled) and IRC (if enabled).
357355
self-signed.
358356

359357

360-
IRC
361-
---
362-
363-
Use the following environment variables if you want to advertise
364-
connectivity on IRC:
365-
366-
* **IRC**
367-
368-
Set to anything non-empty to advertise on IRC. ElectrumX connects
369-
to IRC over the clear internet, always.
370-
371-
* **IRC_NICK**
372-
373-
The nick to use when connecting to IRC. The default is a hash of
374-
**REPORT_HOST**. Either way a prefix will be prepended depending on
375-
**COIN** and **NET**.
376-
377-
If **REPORT_HOST_TOR** is set, an additional connection to IRC
378-
happens with '_tor' appended to **IRC_NICK**.
379-
380-
381358
Cache
382359
-----
383360

docs/HOWTO.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ Python3 ElectrumX uses asyncio. Python version >= 3.6 is
1818
DB Engine I use `plyvel`_ 0.9, a Python interface to LevelDB.
1919
A database engine package is required but others
2020
are supported (see **Database Engine** below).
21-
`IRC`_ Python IRC package. Only required if you enable
22-
IRC; ElectrumX will happily serve clients that
23-
try to connect directly. I use 15.0.4 but
24-
older versions likely are fine.
2521
`x11_hash`_ Only required for DASH. Python X11 Hash package. Only
2622
required if for Dash. Version 1.4 tested.
2723
================ ========================
@@ -414,7 +410,6 @@ You can then set the port as follows and advertise the service externally on the
414410
.. _`runit`: http://smarden.org/runit/index.html
415411
.. _`aiohttp`: https://pypi.python.org/pypi/aiohttp
416412
.. _`pylru`: https://pypi.python.org/pypi/pylru
417-
.. _`IRC`: https://pypi.python.org/pypi/irc
418413
.. _`x11_hash`: https://pypi.python.org/pypi/x11_hash
419414
.. _`contrib/python3.6/python-3.6.sh`: https://github.com/kyuupichan/electrumx/blob/master/contrib/python3.6/python-3.6.sh
420415
.. _`contrib/raspberrypi3/install_electrumx.sh`: https://github.com/kyuupichan/electrumx/blob/master/contrib/raspberrypi3/install_electrumx.sh

docs/PEER_DISCOVERY.rst

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
Peer Discovery
22
==============
33

4-
This is a suggestion of a peer discovery prtocol as a way to gradually
5-
move off depending on IRC.
6-
7-
It will be implemented in ElectrumX from version 0.11.0
8-
onwards.
4+
This was imlpemented in ElectrumX as of version 0.11.0. Support for
5+
IRC peer discovery was removed in ElectrumX version 1.2.1.
96

107

118
Peer Database
@@ -154,14 +151,12 @@ Unknown keys should be silently ignored.
154151
* **protocol_min**
155152

156153
Strings that are the minimum and maximum Electrum protocol versions
157-
this server speaks. The maximum value should be the same as what
158-
would suffix the letter **v** in the IRC real name. Example: "1.1".
154+
this server speaks. Example: "1.1".
159155

160156
* **pruning**
161157

162158
An integer, the pruning limit. Omit or set to *null* if there is no
163-
pruning limit. Should be the same as what would suffix the letter
164-
**p** in the IRC real name.
159+
pruning limit.
165160

166161

167162
server.add_peer RPC call
@@ -184,18 +179,6 @@ calls to this method from a single connection.
184179
The result should be True if accepted and False otherwise.
185180

186181

187-
IRC
188-
---
189-
190-
Other server implementations may not have implemented the peer
191-
discovery protocol yet. Whilst we transition away from IRC, in order
192-
to keep these servers in the connected peer set, having one or two in
193-
the hard-coded peer list used to seed this process should suffice.
194-
Any peer on IRC will report other peers on IRC, and so if any one of
195-
them is known to any single peer implementing this protocol, they will
196-
all become known to all peers quite rapidly.
197-
198-
199182
Notes to Implementators
200183
-----------------------
201184

docs/PROTOCOL.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,7 @@ Get a list of features and services supported by the server.
846846
* **protocol_min**
847847

848848
Strings that are the minimum and maximum Electrum protocol versions
849-
this server speaks. The maximum value should be the same as what
850-
would suffix the letter **v** in the IRC real name. Example: "1.1".
849+
this server speaks. Example: "1.1".
851850

852851
* **pruning**
853852

docs/RPC-INTERFACE.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The following commands are available:
3838
"groups": 2, # The number of session groups
3939
"logged": 0, # The number of sessions being logged
4040
"paused": 0, # The number of paused sessions.
41-
"peers": 62, # Number of peer servers (from IRC)
41+
"peers": 62, # Number of peer servers
4242
"pid": 126275, # The server's process ID
4343
"requests": 0, # Number of unprocessed requests
4444
"sessions": 85, # Number of current sessions (connections)
@@ -153,14 +153,14 @@ The following commands are available:
153153

154154
Returns a list of peer electrum servers. This command takes no arguments.
155155

156-
Currently peer data is obtained via a peer discovery protocol; it
157-
used to be taken from IRC.
156+
Peer data is obtained via a peer discovery protocol documented in
157+
`docs/PEER_DISCOVERY.rst`_.
158158

159159
* **add_peer**
160160

161161
Add a peer to the peers list. ElectrumX will schdule an immediate
162162
connection attempt. This command takes a single argument: the
163-
peer's "real name" as it would advertise itself on IRC.
163+
peer's "real name" as it used to advertise itself on IRC.
164164

165165
.. code::
166166
@@ -186,3 +186,5 @@ The following commands are available:
186186

187187
Force a block chain reorg. This command takes an optional
188188
argument - the number of blocks to reorg - which defaults to 3.
189+
190+
.. _docs/PEER_DISCOVERY.rst: https://github.com/kyuupichan/electrumx/blob/master/docs/PEER_DISCOVERY.rst

lib/coins.py

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ class Coin(object):
7070
BLOCK_PROCESSOR = BlockProcessor
7171
XPUB_VERBYTES = bytes('????', 'utf-8')
7272
XPRV_VERBYTES = bytes('????', 'utf-8')
73-
IRC_PREFIX = None
74-
IRC_SERVER = "irc.freenode.net"
75-
IRC_PORT = 6667
7673
# Peer discovery
7774
PEER_DEFAULT_PORTS = {'t': '50001', 's': '50002'}
7875
PEERS = []
@@ -87,8 +84,6 @@ def lookup_coin_class(cls, name, net):
8784
if (coin.NAME.lower() == name.lower() and
8885
coin.NET.lower() == net.lower()):
8986
coin_req_attrs = req_attrs.copy()
90-
if coin.IRC_PREFIX is not None:
91-
coin_req_attrs.append('IRC_CHANNEL')
9287
missing = [attr for attr in coin_req_attrs
9388
if not hasattr(coin, attr)]
9489
if missing:
@@ -616,8 +611,6 @@ class Viacoin(AuxPowMixin, Coin):
616611
TX_COUNT = 113638
617612
TX_COUNT_HEIGHT = 3473674
618613
TX_PER_BLOCK = 30
619-
IRC_PREFIX = "E_"
620-
IRC_CHANNEL="#vialectrum"
621614
RPC_PORT = 5222
622615
REORG_LIMIT = 5000
623616
DESERIALIZER = lib_tx.DeserializerAuxPowSegWit
@@ -665,8 +658,9 @@ class Namecoin(AuxPowMixin, Coin):
665658
TX_COUNT = 4415768
666659
TX_COUNT_HEIGHT = 329065
667660
TX_PER_BLOCK = 10
668-
IRC_PREFIX = "E_"
669-
IRC_CHANNEL = "#electrum-nmc"
661+
PEERS = [
662+
'elec.luggs.co s446',
663+
]
670664

671665

672666
class NamecoinTestnet(Namecoin):
@@ -694,8 +688,6 @@ class Dogecoin(AuxPowMixin, Coin):
694688
TX_COUNT = 27583427
695689
TX_COUNT_HEIGHT = 1604979
696690
TX_PER_BLOCK = 20
697-
IRC_PREFIX = "E_"
698-
IRC_CHANNEL = "#electrum-doge"
699691
REORG_LIMIT = 2000
700692

701693

@@ -726,8 +718,6 @@ class Dash(Coin):
726718
TX_COUNT = 2157510
727719
TX_PER_BLOCK = 4
728720
RPC_PORT = 9998
729-
IRC_PREFIX = "D_"
730-
IRC_CHANNEL = "#electrum-dash"
731721
PEERS = [
732722
'electrum.dash.org s t',
733723
'electrum.masternode.io s t',
@@ -760,7 +750,6 @@ class DashTestnet(Dash):
760750
TX_COUNT = 132681
761751
TX_PER_BLOCK = 1
762752
RPC_PORT = 19998
763-
IRC_PREFIX = "d_"
764753
PEER_DEFAULT_PORTS = {'t': '51001', 's': '51002'}
765754
PEERS = [
766755
'electrum.dash.siampm.com s t',
@@ -779,8 +768,6 @@ class Argentum(AuxPowMixin, Coin):
779768
TX_COUNT = 2263089
780769
TX_COUNT_HEIGHT = 2050260
781770
TX_PER_BLOCK = 2000
782-
IRC_PREFIX = "A_"
783-
IRC_CHANNEL = "#electrum-arg"
784771
RPC_PORT = 13581
785772

786773

@@ -806,8 +793,6 @@ class DigiByte(Coin):
806793
TX_COUNT = 1046018
807794
TX_COUNT_HEIGHT = 1435000
808795
TX_PER_BLOCK = 1000
809-
IRC_PREFIX = "DE_"
810-
IRC_CHANNEL = "#electrum-dgb"
811796
RPC_PORT = 12022
812797

813798

@@ -818,8 +803,6 @@ class DigiByteTestnet(DigiByte):
818803
WIF_BYTE = bytes.fromhex("ef")
819804
GENESIS_HASH = ('b5dca8039e300198e5fe7cd23bdd1728'
820805
'e2a444af34c447dbd0916fa3430a68c2')
821-
IRC_PREFIX = "DET_"
822-
IRC_CHANNEL = "#electrum-dgb"
823806
RPC_PORT = 15022
824807
REORG_LIMIT = 2000
825808

@@ -837,8 +820,6 @@ class FairCoin(Coin):
837820
TX_COUNT = 505
838821
TX_COUNT_HEIGHT = 470
839822
TX_PER_BLOCK = 1
840-
IRC_PREFIX = "E_"
841-
IRC_CHANNEL = "#fairlectrum"
842823
RPC_PORT = 40405
843824
PEER_DEFAULT_PORTS = {'t': '51811', 's': '51812'}
844825
PEERS = [
@@ -882,8 +863,6 @@ class Zcash(EquihashMixin, Coin):
882863
TX_COUNT = 329196
883864
TX_COUNT_HEIGHT = 68379
884865
TX_PER_BLOCK = 5
885-
IRC_PREFIX = "E_"
886-
IRC_CHANNEL = "#electrum-zcash"
887866
RPC_PORT = 8232
888867
REORG_LIMIT = 800
889868

@@ -939,8 +918,6 @@ class Einsteinium(Coin):
939918
TX_COUNT = 2087559
940919
TX_COUNT_HEIGHT = 1358517
941920
TX_PER_BLOCK = 2
942-
IRC_PREFIX = "E_"
943-
IRC_CHANNEL = "#electrum-emc2"
944921
RPC_PORT = 41879
945922
REORG_LIMIT = 2000
946923

@@ -958,8 +935,6 @@ class Blackcoin(ScryptMixin, Coin):
958935
TX_COUNT = 4594999
959936
TX_COUNT_HEIGHT = 1667070
960937
TX_PER_BLOCK = 3
961-
IRC_PREFIX = "E_"
962-
IRC_CHANNEL = "#electrum-blk"
963938
RPC_PORT = 15715
964939
REORG_LIMIT = 5000
965940

@@ -977,8 +952,6 @@ class Bitbay(ScryptMixin, Coin):
977952
TX_COUNT = 4594999
978953
TX_COUNT_HEIGHT = 1667070
979954
TX_PER_BLOCK = 3
980-
IRC_PREFIX = "E_"
981-
IRC_CHANNEL = "#electrum-bay"
982955
RPC_PORT = 19914
983956
REORG_LIMIT = 5000
984957

@@ -997,8 +970,6 @@ class Peercoin(Coin):
997970
TX_COUNT = 1207356
998971
TX_COUNT_HEIGHT = 306425
999972
TX_PER_BLOCK = 4
1000-
IRC_PREFIX = "E_"
1001-
IRC_CHANNEL = "#electrum-ppc"
1002973
RPC_PORT = 9902
1003974
REORG_LIMIT = 5000
1004975

@@ -1016,8 +987,6 @@ class Reddcoin(Coin):
1016987
TX_COUNT = 5413508
1017988
TX_COUNT_HEIGHT = 1717382
1018989
TX_PER_BLOCK = 3
1019-
IRC_PREFIX = "E_"
1020-
IRC_CHANNEL = "#electrum-rdd"
1021990
RPC_PORT = 45443
1022991

1023992

@@ -1197,8 +1166,6 @@ class CanadaeCoin(AuxPowMixin, Coin):
11971166
TX_COUNT = 3455905
11981167
TX_COUNT_HEIGHT = 3645419
11991168
TX_PER_BLOCK = 1
1200-
IRC_PREFIX = "E_"
1201-
IRC_CHANNEL="#electrum-cdn"
12021169
RPC_PORT = 34330
12031170
REORG_LIMIT = 1000
12041171

server/env.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ def __init__(self):
6868
self.bandwidth_limit = self.integer('BANDWIDTH_LIMIT', 2000000)
6969
self.session_timeout = self.integer('SESSION_TIMEOUT', 600)
7070

71-
# IRC
72-
self.irc = self.boolean('IRC', False)
73-
self.irc_nick = self.default('IRC_NICK', None)
74-
7571
# Identities
7672
clearnet_identity = self.clearnet_identity()
7773
tor_identity = self.tor_identity(clearnet_identity)
@@ -104,7 +100,7 @@ def clearnet_identity(self):
104100
or host.lower() == 'localhost')
105101
else:
106102
bad = (ip.is_multicast or ip.is_unspecified
107-
or (ip.is_private and (self.irc or self.peer_announce)))
103+
or (ip.is_private and self.peer_announce))
108104
if bad:
109105
raise self.Error('"{}" is not a valid REPORT_HOST'.format(host))
110106
tcp_port = self.integer('REPORT_TCP_PORT', self.tcp_port) or None

0 commit comments

Comments
 (0)