docs: adapt to Palladium, drop Bitcoin/upstream examples and links
index, features, HOWTO (node requirements, sizes and sync time measured on Palladium, real startup log, clone URL), environment, peer discovery and architecture; rpc-interface examples (getinfo, peers, query with real data); release_process rewritten without tags/PyPI; changelog gets a plm-electrumx 1.0.0 entry above the upstream history. Links point to this repository. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e1bde28cb
commit
3d05c37feb
10 files changed
+127
-172
No files matched your search
+38
-83
@@ -23,15 +23,16 @@ DB Engine A database engine package is required; two are
|
|||||||
supported (see `Database Engine`_ below).
|
supported (see `Database Engine`_ below).
|
||||||
================ ========================
|
================ ========================
|
||||||
|
|
||||||
You **must** be running a non-pruning bitcoin daemon with::
|
You **must** be running a non-pruning Palladium daemon with::
|
||||||
|
|
||||||
|
server=1
|
||||||
txindex=1
|
txindex=1
|
||||||
|
|
||||||
set in its configuration file. If you have an existing installation
|
set in its configuration file (:file:`palladium.conf`). If you have an
|
||||||
of bitcoind and have not previously set this you will need to reindex
|
existing installation of palladiumd and have not previously set
|
||||||
the blockchain with::
|
``txindex`` you will need to reindex the blockchain with::
|
||||||
|
|
||||||
bitcoind -reindex
|
palladiumd -reindex
|
||||||
|
|
||||||
which can take some time.
|
which can take some time.
|
||||||
|
|
||||||
@@ -47,11 +48,10 @@ used to either.
|
|||||||
When building the database from the genesis block, ElectrumX has to
|
When building the database from the genesis block, ElectrumX has to
|
||||||
flush large quantities of data to disk and its DB. You will have a
|
flush large quantities of data to disk and its DB. You will have a
|
||||||
better experience if the database directory is on an SSD than on an
|
better experience if the database directory is on an SSD than on an
|
||||||
HDD. Currently to around height 611,600 of the Bitcoin blockchain the
|
HDD. At around height 542,000 of the Palladium blockchain the final
|
||||||
final size of the leveldb database, and other ElectrumX file metadata
|
size of a RocksDB database, and other ElectrumX file metadata, is
|
||||||
comes to just over 46.9GB (43.7 GiB). LevelDB needs a bit more for
|
roughly 230 MB. The block chain only gets longer, so leave some room to
|
||||||
brief periods, and the block chain is only getting longer, so I would
|
grow; a few GB of free space is plenty for now.
|
||||||
recommend having at least 70-80GB of free space before starting.
|
|
||||||
|
|
||||||
Database Engine
|
Database Engine
|
||||||
===============
|
===============
|
||||||
@@ -87,8 +87,8 @@ Install the prerequisites above.
|
|||||||
|
|
||||||
Check out the code from Github::
|
Check out the code from Github::
|
||||||
|
|
||||||
git clone https://github.com/spesmilo/electrumx.git
|
git clone https://github.com/palladium-coin/plm-electrumx.git
|
||||||
cd electrumx
|
cd plm-electrumx
|
||||||
|
|
||||||
You can install with::
|
You can install with::
|
||||||
|
|
||||||
@@ -251,30 +251,9 @@ has its caches and disk I/O tuned to that task only.
|
|||||||
The :envvar:`CACHE_MB` environment variable controls the total cache
|
The :envvar:`CACHE_MB` environment variable controls the total cache
|
||||||
size ElectrumX uses; see :ref:`here <CACHE>` for caveats.
|
size ElectrumX uses; see :ref:`here <CACHE>` for caveats.
|
||||||
|
|
||||||
Here is my experience with the codebase of early 2017 (the current
|
On a development machine (12 cores, RocksDB) with the daemon on the same host, building the database from
|
||||||
codebase is faster), to given heights and rough wall-time. The period
|
genesis to height 542,000 of the Palladium blockchain took about a minute. Blocks are small and the chain is short,
|
||||||
from heights 363,000 to 378,000 is the most sluggish::
|
so synchronization is much faster than for large chains; times on other hardware will vary.
|
||||||
|
|
||||||
Machine A Machine B
|
|
||||||
181,000 25m 00s 5m 30s
|
|
||||||
283,500 1h 00m
|
|
||||||
321,800 1h 40m
|
|
||||||
357,000 12h 32m 2h 41m
|
|
||||||
386,000 21h 56m 4h 25m
|
|
||||||
414,200 1d 12h 29m 6h 30m
|
|
||||||
447,168 2d 13h 20m 9h 47m
|
|
||||||
|
|
||||||
*Machine A*: a low-spec 2011 1.6GHz AMD E-350 dual-core fanless CPU,
|
|
||||||
8GB RAM and a DragonFlyBSD UFS filesystem on an SSD. It requests
|
|
||||||
blocks over the LAN from a bitcoind on machine B. :envvar:`DB_CACHE`
|
|
||||||
the default of 1,200. LevelDB.
|
|
||||||
|
|
||||||
*Machine B*: a late 2012 iMac running Sierra 10.12.2, 2.9GHz quad-core
|
|
||||||
Intel i5 CPU with an HDD and 24GB RAM. Running bitcoind on the same
|
|
||||||
machine. :envvar:`DB_CACHE` set to 1,800. LevelDB.
|
|
||||||
|
|
||||||
For chains other than bitcoin-mainnet synchronization should be much
|
|
||||||
faster.
|
|
||||||
|
|
||||||
.. note:: ElectrumX will not serve normal client connections until it
|
.. note:: ElectrumX will not serve normal client connections until it
|
||||||
has fully synchronized and caught up with your daemon.
|
has fully synchronized and caught up with your daemon.
|
||||||
@@ -316,8 +295,8 @@ You can see the status of a running service with::
|
|||||||
svstat ~/service/electrumx
|
svstat ~/service/electrumx
|
||||||
|
|
||||||
:command:`svscan` can of course handle multiple services
|
:command:`svscan` can of course handle multiple services
|
||||||
simultaneously from the same service directory, such as a testnet or
|
simultaneously from the same service directory, such as a testnet
|
||||||
altcoin server. See the man pages of these various commands for more
|
server. See the man pages of these various commands for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
|
|
||||||
@@ -330,53 +309,29 @@ You can see the logs usefully like so::
|
|||||||
|
|
||||||
Here is typical log output on startup::
|
Here is typical log output on startup::
|
||||||
|
|
||||||
INFO:BlockProcessor:switching current directory to /crucial/server-good
|
INFO:Controller:software version: plm-electrumx 1.0.0
|
||||||
INFO:BlockProcessor:using leveldb for DB backend
|
INFO:Controller:aiorpcX version: 0.25.0
|
||||||
INFO:BlockProcessor:created new database
|
INFO:Controller:supported protocol versions: 1.4-1.7.0
|
||||||
INFO:BlockProcessor:creating metadata diretcory
|
INFO:Controller:reorg limit is 200 blocks
|
||||||
INFO:BlockProcessor:software version: ElectrumX 0.10.2
|
INFO:Daemon:daemon #1 at 127.0.0.1:2332/ (current)
|
||||||
INFO:BlockProcessor:DB version: 5
|
INFO:DB:switching current directory to /var/lib/electrumx
|
||||||
INFO:BlockProcessor:coin: Bitcoin
|
INFO:DB:using rocksdb for DB backend
|
||||||
INFO:BlockProcessor:network: mainnet
|
INFO:DB:created new database
|
||||||
INFO:BlockProcessor:height: -1
|
INFO:DB:coin: Palladium
|
||||||
INFO:BlockProcessor:tip: 0000000000000000000000000000000000000000000000000000000000000000
|
INFO:DB:network: mainnet
|
||||||
INFO:BlockProcessor:tx count: 0
|
INFO:DB:height: -1
|
||||||
INFO:BlockProcessor:sync time so far: 0d 00h 00m 00s
|
INFO:DB:tx count: 0
|
||||||
INFO:BlockProcessor:reorg limit is 200 blocks
|
INFO:DB:flushing DB cache at 1,200 MB
|
||||||
INFO:Daemon:daemon at 192.168.0.2:8332/
|
INFO:Prefetcher:catching up to daemon height 542,044 (542,045 blocks behind)
|
||||||
INFO:BlockProcessor:flushing DB cache at 1,200 MB
|
|
||||||
INFO:Controller:RPC server listening on localhost:8000
|
|
||||||
INFO:Prefetcher:catching up to daemon height 447,187...
|
|
||||||
INFO:Prefetcher:verified genesis block with hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
|
INFO:Prefetcher:verified genesis block with hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
|
||||||
INFO:BlockProcessor:our height: 9 daemon: 447,187 UTXOs 0MB hist 0MB
|
INFO:BlockProcessor:our height: 9 daemon: 542,044 UTXOs 0MB hist 0MB
|
||||||
INFO:BlockProcessor:our height: 52,509 daemon: 447,187 UTXOs 9MB hist 14MB
|
|
||||||
INFO:BlockProcessor:our height: 85,009 daemon: 447,187 UTXOs 12MB hist 31MB
|
|
||||||
INFO:BlockProcessor:our height: 102,384 daemon: 447,187 UTXOs 15MB hist 47MB
|
|
||||||
[...]
|
[...]
|
||||||
INFO:BlockProcessor:our height: 133,375 daemon: 447,187 UTXOs 80MB hist 222MB
|
INFO:BlockProcessor:caught up to height 542047
|
||||||
INFO:BlockProcessor:our height: 134,692 daemon: 447,187 UTXOs 96MB hist 250MB
|
INFO:BlockProcessor:plm-electrumx 1.0.0 synced to height 542,047
|
||||||
INFO:BlockProcessor:flushed to FS in 0.7s
|
|
||||||
INFO:BlockProcessor:flushed history in 16.3s for 1,124,512 addrs
|
|
||||||
INFO:BlockProcessor:flush #1 took 18.7s. Height 134,692 txs: 941,963
|
|
||||||
INFO:BlockProcessor:tx/sec since genesis: 2,399, since last flush: 2,400
|
|
||||||
INFO:BlockProcessor:sync time: 0d 00h 06m 32s ETA: 1d 13h 03m 42s
|
|
||||||
|
|
||||||
Under normal operation these cache stats repeat once or twice a
|
While syncing, the ``our height`` lines repeat once or twice a minute with the
|
||||||
minute. UTXO flushes can take several minutes and look like this::
|
sizes of the caches, which are flushed to disk when they reach :envvar:`CACHE_MB`.
|
||||||
|
Once synced, the server follows new blocks and the mempool.
|
||||||
INFO:BlockProcessor:our height: 378,745 daemon: 447,332 UTXOs 1,013MB hist 184MB
|
|
||||||
INFO:BlockProcessor:our height: 378,787 daemon: 447,332 UTXOs 1,014MB hist 194MB
|
|
||||||
INFO:BlockProcessor:flushed to FS in 0.3s
|
|
||||||
INFO:BlockProcessor:flushed history in 13.4s for 934,933 addrs
|
|
||||||
INFO:BlockProcessor:flushed 6,403 blocks with 5,879,440 txs, 2,920,524 UTXO adds, 3,646,572 spends in 93.1s, committing...
|
|
||||||
INFO:BlockProcessor:flush #120 took 226.4s. Height 378,787 txs: 87,695,588
|
|
||||||
INFO:BlockProcessor:tx/sec since genesis: 1,280, since last flush: 359
|
|
||||||
INFO:BlockProcessor:sync t ime: 0d 19h 01m 06s ETA: 3d 21h 17m 52s
|
|
||||||
INFO:BlockProcessor:our height: 378,812 daemon: 447,334 UTXOs 10MB hist 10MB
|
|
||||||
|
|
||||||
The ETA shown is just a rough guide and in the short term can be quite
|
|
||||||
volatile. It tends to be a little optimistic at first; once you get
|
|
||||||
to height 280,000 is should be fairly accurate.
|
|
||||||
|
|
||||||
.. _SSL certificates:
|
.. _SSL certificates:
|
||||||
|
|
||||||
@@ -436,7 +391,7 @@ You can then set the port as follows and advertise the service externally on the
|
|||||||
REPORT_SSL_PORT=110
|
REPORT_SSL_PORT=110
|
||||||
|
|
||||||
|
|
||||||
.. _`contrib/systemd/electrumx.service`: https://github.com/spesmilo/electrumx/blob/master/contrib/systemd/electrumx.service
|
.. _`contrib/systemd/electrumx.service`: https://github.com/palladium-coin/plm-electrumx/blob/main/contrib/systemd/electrumx.service
|
||||||
.. _`daemontools`: http://cr.yp.to/daemontools.html
|
.. _`daemontools`: http://cr.yp.to/daemontools.html
|
||||||
.. _`runit`: http://smarden.org/runit/index.html
|
.. _`runit`: http://smarden.org/runit/index.html
|
||||||
.. _`aiohttp`: https://pypi.python.org/pypi/aiohttp
|
.. _`aiohttp`: https://pypi.python.org/pypi/aiohttp
|
||||||
@@ -31,13 +31,13 @@ Handles JSON Electrum client connections over TCP or SSL. One
|
|||||||
instance per client session. Should be the only component concerned
|
instance per client session. Should be the only component concerned
|
||||||
with the details of the Electrum wire protocol.
|
with the details of the Electrum wire protocol.
|
||||||
|
|
||||||
Not started until the Block Processor has caught up with bitcoind.
|
Not started until the Block Processor has caught up with palladiumd.
|
||||||
|
|
||||||
Daemon
|
Daemon
|
||||||
------
|
------
|
||||||
|
|
||||||
Encapsulates the RPC wire protocol with bitcoind for the whole server.
|
Encapsulates the RPC wire protocol with palladiumd for the whole server.
|
||||||
Transparently handles temporary bitcoind connection errors, and fails
|
Transparently handles temporary palladiumd connection errors, and fails
|
||||||
over if necessary.
|
over if necessary.
|
||||||
|
|
||||||
Notifies the Mempool when the list of mempool transaction hashes is
|
Notifies the Mempool when the list of mempool transaction hashes is
|
||||||
@@ -62,14 +62,14 @@ Prefetcher
|
|||||||
----------
|
----------
|
||||||
|
|
||||||
Cooperates with the Block Processor to asynchronously prefetch blocks
|
Cooperates with the Block Processor to asynchronously prefetch blocks
|
||||||
from bitcoind. Once it has caught up it additionally asks the Daemon
|
from palladiumd. Once it has caught up it additionally asks the Daemon
|
||||||
to refresh its view of bitcoind's mempool transaction hashes. Serves
|
to refresh its view of palladiumd's mempool transaction hashes. Serves
|
||||||
blocks to the Block Processor via a queue.
|
blocks to the Block Processor via a queue.
|
||||||
|
|
||||||
Mempool
|
Mempool
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Handles all the details of maintaining a representation of bitcoind's
|
Handles all the details of maintaining a representation of palladiumd's
|
||||||
mempool state. Obtains the list of current mempool transaction hashes
|
mempool state. Obtains the list of current mempool transaction hashes
|
||||||
from the Daemon when notified by the Prefetcher.
|
from the Daemon when notified by the Prefetcher.
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,27 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
Version 1.0.0 (plm-electrumx)
|
||||||
|
=============================
|
||||||
|
|
||||||
|
First release of the Palladium fork. Based on a snapshot of upstream ElectrumX 2.0.0
|
||||||
|
(commit ``280cb339aa158e099eb936033eecd15719770651``); the entries below this one are the history of upstream.
|
||||||
|
|
||||||
|
* new: ``Palladium``, ``PalladiumTestnet`` and ``PalladiumRegtest`` coins, now the only ones (the default ``COIN``
|
||||||
|
is ``Palladium``).
|
||||||
|
* Palladium Core is based on Bitcoin Core 0.19: the daemon version/index checks are disabled, ``txindex=1`` is
|
||||||
|
required, and ``blockchain.outpoint.subscribe`` / ``blockchain.transaction.broadcast_package`` return a daemon
|
||||||
|
error to clients.
|
||||||
|
* removed: all other coins, their transaction deserializers, session/daemon/block processor classes, tests,
|
||||||
|
pip extras and ``contrib`` files.
|
||||||
|
* new: ``Dockerfile`` and ``docker-compose.yml`` to run next to the Palladium node container, with automatic
|
||||||
|
self-signed SSL certificate, data in ``~/.plm-electrumx`` and ``DONATION_ADDRESS`` support.
|
||||||
|
* new: CI on ``main`` with a Docker job; ``README.md`` and ``DEPLOY.md``.
|
||||||
|
* changed: package name ``plm-electrumx``, own versioning.
|
||||||
|
|
||||||
|
Upstream history
|
||||||
|
================
|
||||||
|
|
||||||
Version 2.0.0 (03 July 2026)
|
Version 2.0.0 (03 July 2026)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -81,9 +81,9 @@ html_theme = 'alabaster'
|
|||||||
# documentation.
|
# documentation.
|
||||||
#
|
#
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
'description': 'Lightweight Electrum Server in Python',
|
'description': 'Electrum server for Palladium (PLM)',
|
||||||
'github_user': 'spesmilo',
|
'github_user': 'palladium-coin',
|
||||||
'github_repo': 'electrumx',
|
'github_repo': 'plm-electrumx',
|
||||||
'github_button': True,
|
'github_button': True,
|
||||||
'github_type': 'star',
|
'github_type': 'star',
|
||||||
'github_banner': True,
|
'github_banner': True,
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ Here are some examples of valid services::
|
|||||||
rpc:// # RPC protocol, default host and port
|
rpc:// # RPC protocol, default host and port
|
||||||
|
|
||||||
.. note:: ElectrumX will not serve any incoming connections until it has fully caught up
|
.. note:: ElectrumX will not serve any incoming connections until it has fully caught up
|
||||||
with your bitcoin daemon. The only exception is local **RPC** connections,
|
with your Palladium daemon. The only exception is local **RPC** connections,
|
||||||
which are served at any time after the server has initialized.
|
which are served at any time after the server has initialized.
|
||||||
|
|
||||||
.. envvar:: SERVICES
|
.. envvar:: SERVICES
|
||||||
@@ -268,8 +268,8 @@ These environment variables are optional:
|
|||||||
The maximum number of blocks to be able to handle in a chain
|
The maximum number of blocks to be able to handle in a chain
|
||||||
reorganisation. ElectrumX retains some fairly compact undo
|
reorganisation. ElectrumX retains some fairly compact undo
|
||||||
information for this many blocks in levelDB. The default is a
|
information for this many blocks in levelDB. The default is a
|
||||||
function of :envvar:`COIN` and :envvar:`NET`; for Bitcoin mainnet it
|
function of :envvar:`COIN` and :envvar:`NET`; for Palladium mainnet it
|
||||||
is 200.
|
is 200 (8,000 on testnet and regtest).
|
||||||
|
|
||||||
.. envvar:: EVENT_LOOP_POLICY
|
.. envvar:: EVENT_LOOP_POLICY
|
||||||
|
|
||||||
@@ -314,8 +314,7 @@ raise them.
|
|||||||
.. envvar:: MAX_SEND
|
.. envvar:: MAX_SEND
|
||||||
|
|
||||||
The maximum size of a response message to send over the wire, in
|
The maximum size of a response message to send over the wire, in
|
||||||
bytes. Defaults to 8,100,000 (except for AuxPoW coins, which default
|
bytes. Defaults to 8,100,000. Values smaller than 350,000 are taken as 350,000
|
||||||
to 10,000,000). Values smaller than 350,000 are taken as 350,000
|
|
||||||
because standard Electrum protocol header "chunk" requests are almost
|
because standard Electrum protocol header "chunk" requests are almost
|
||||||
that large.
|
that large.
|
||||||
|
|
||||||
@@ -506,5 +505,5 @@ your available physical RAM:
|
|||||||
|
|
||||||
I do not recommend raising this above 2000.
|
I do not recommend raising this above 2000.
|
||||||
|
|
||||||
.. _lib/coins.py: https://github.com/spesmilo/electrumx/blob/master/src/electrumx/lib/coins.py
|
.. _lib/coins.py: https://github.com/palladium-coin/plm-electrumx/blob/main/src/electrumx/lib/coins.py
|
||||||
.. _uvloop: https://pypi.python.org/pypi/uvloop
|
.. _uvloop: https://pypi.python.org/pypi/uvloop
|
||||||
+2
-5
@@ -2,11 +2,8 @@ Features
|
|||||||
========
|
========
|
||||||
|
|
||||||
- Efficient, lightweight reimplementation of electrum-server
|
- Efficient, lightweight reimplementation of electrum-server
|
||||||
- Fast synchronization of bitcoin mainnet from Genesis. Recent
|
- Fast synchronization of Palladium mainnet from Genesis: about a
|
||||||
hardware should synchronize in well under 24 hours. The fastest
|
minute to height 542k on a modern development machine with RocksDB.
|
||||||
time to height 448k (mid January 2017) reported is under 4h 30m. On
|
|
||||||
the same hardware JElectrum would take around 4 days and
|
|
||||||
electrum-server probably around 1 month.
|
|
||||||
- Various configurable means of controlling resource consumption and
|
- Various configurable means of controlling resource consumption and
|
||||||
handling bad clients and denial of service attacks. These include
|
handling bad clients and denial of service attacks. These include
|
||||||
maximum connection counts, subscription limits per-connection and
|
maximum connection counts, subscription limits per-connection and
|
||||||
|
|||||||
+18
-22
@@ -1,18 +1,17 @@
|
|||||||
=========
|
=============
|
||||||
ElectrumX
|
plm-electrumx
|
||||||
=========
|
=============
|
||||||
|
|
||||||
.. image:: https://github.com/spesmilo/electrumx/actions/workflows/ci.yml/badge.svg?branch=master
|
.. image:: https://github.com/palladium-coin/plm-electrumx/actions/workflows/ci.yml/badge.svg?branch=main
|
||||||
:target: https://github.com/spesmilo/electrumx/actions/workflows/ci.yml
|
:target: https://github.com/palladium-coin/plm-electrumx/actions/workflows/ci.yml
|
||||||
|
|
||||||
This project is a fork of `kyuupichan/electrumx <https://github.com/kyuupichan/electrumx>`_.
|
plm-electrumx is an Electrum protocol server for Palladium (PLM). It is a fork of
|
||||||
The original author dropped support for Bitcoin, which we intend to keep.
|
`spesmilo/electrumx <https://github.com/spesmilo/electrumx>`_ (which is itself a fork of
|
||||||
|
`kyuupichan/electrumx <https://github.com/kyuupichan/electrumx>`_) that supports Palladium only.
|
||||||
|
|
||||||
ElectrumX allows users to run their own Electrum server. It connects to your
|
It connects to your Palladium full node and indexes the blockchain, allowing efficient
|
||||||
full node and indexes the blockchain, allowing efficient querying of history of
|
querying of history of arbitrary addresses. The server can be exposed publicly, and joined
|
||||||
arbitrary addresses. The server can be exposed publicly, and joined to the public network
|
to the network of servers via peer discovery.
|
||||||
of servers via peer discovery. As of May 2020, a significant chunk of the public
|
|
||||||
Electrum server network runs ElectrumX.
|
|
||||||
|
|
||||||
The current version is |release|.
|
The current version is |release|.
|
||||||
|
|
||||||
@@ -20,12 +19,12 @@ Source Code
|
|||||||
===========
|
===========
|
||||||
|
|
||||||
The project is hosted on `GitHub
|
The project is hosted on `GitHub
|
||||||
<https://github.com/spesmilo/electrumx/>`_. and uses `GitHub Actions
|
<https://github.com/palladium-coin/plm-electrumx>`_ and uses `GitHub Actions
|
||||||
<https://github.com/spesmilo/electrumx/actions>`_ for Continuous
|
<https://github.com/palladium-coin/plm-electrumx/actions>`_ for Continuous
|
||||||
Integration.
|
Integration.
|
||||||
|
|
||||||
Please submit an issue on the `bug tracker
|
Please submit an issue on the `bug tracker
|
||||||
<https://github.com/spesmilo/electrumx/issues>`_ if you have found a
|
<https://github.com/palladium-coin/plm-electrumx/issues>`_ if you have found a
|
||||||
bug or have a suggestion to improve the server.
|
bug or have a suggestion to improve the server.
|
||||||
|
|
||||||
Authors and License
|
Authors and License
|
||||||
@@ -35,19 +34,16 @@ Neil Booth wrote the vast majority of the code; see :ref:`Authors`.
|
|||||||
Python version at least 3.10 is required.
|
Python version at least 3.10 is required.
|
||||||
|
|
||||||
The code is released under the `MIT Licence
|
The code is released under the `MIT Licence
|
||||||
<https://github.com/spesmilo/electrumx/LICENCE>`_.
|
<https://github.com/palladium-coin/plm-electrumx/blob/main/LICENCE>`_.
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
===============
|
===============
|
||||||
|
|
||||||
See :ref:`HOWTO`.
|
See :ref:`HOWTO`.
|
||||||
|
|
||||||
There is also an `installer`_ available that simplifies the
|
The repository also contains a :file:`Dockerfile` and a :file:`docker-compose.yml` that run the server next
|
||||||
installation on various Linux-based distributions, and a `Dockerfile`_
|
to a Palladium node container; see `README.md <https://github.com/palladium-coin/plm-electrumx#with-docker-next-to-the-palladium-node>`_
|
||||||
available.
|
and `DEPLOY.md <https://github.com/palladium-coin/plm-electrumx/blob/main/DEPLOY.md>`_ (ports, firewall, SSL, RPC credentials).
|
||||||
|
|
||||||
.. _installer: https://github.com/bauerj/electrumx-installer
|
|
||||||
.. _Dockerfile: https://github.com/lukechilds/docker-electrumx
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
=============
|
=============
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ process. Ideally it should have at least 4 servers that have shown
|
|||||||
commitment to reliable service.
|
commitment to reliable service.
|
||||||
|
|
||||||
In ElectrumX this is a per-coin property in `lib/coins.py
|
In ElectrumX this is a per-coin property in `lib/coins.py
|
||||||
<https://github.com/spesmilo/electrumx/blob/master/electrumx/lib/coins.py>`_.
|
<https://github.com/palladium-coin/plm-electrumx/blob/main/src/electrumx/lib/coins.py>`_.
|
||||||
|
|
||||||
|
|
||||||
server.peers.subscribe
|
server.peers.subscribe
|
||||||
|
|||||||
+10
-22
@@ -2,32 +2,20 @@
|
|||||||
|
|
||||||
### 1. Add changelog
|
### 1. Add changelog
|
||||||
|
|
||||||
|
Add an entry for the new version at the top of `docs/changelog.rst`.
|
||||||
|
|
||||||
### 2. Update version number
|
### 2. Update version number
|
||||||
|
|
||||||
|
Both files must have the same version (it is shown to clients by `server.version`, in the banner and in the logs):
|
||||||
|
|
||||||
- `docs/conf.py`
|
- `docs/conf.py`
|
||||||
- `electrumx/__init__.py`
|
- `src/electrumx/__init__.py`
|
||||||
|
|
||||||
### 3. Tag
|
### 3. Check
|
||||||
|
|
||||||
```
|
The CI on `main` (`.github/workflows/ci.yml`) must pass: tests, pycodestyle, docs build, and the Docker image with its
|
||||||
$ git tag -s "$VERSION" -m "$VERSION"
|
smoke test (`contrib/docker-smoke-test.sh`).
|
||||||
$ git push "$REMOTE_ORIGIN" tag "$VERSION"
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Build sdist
|
### 4. Deploy
|
||||||
|
|
||||||
see [`contrib/sdist/`](contrib/sdist)
|
On the server: `git pull && docker compose up -d --build` (see `DEPLOY.md`).
|
||||||
|
|
||||||
```
|
|
||||||
$ ELECBUILD_COMMIT=HEAD ELECBUILD_NOCACHE=1 ./contrib/sdist/build.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. Upload to PyPI
|
|
||||||
|
|
||||||
```
|
|
||||||
// $ python3 -m twine upload --repository testpypi dist/$DISTNAME
|
|
||||||
$ python3 -m twine upload dist/$DISTNAME
|
|
||||||
```
|
|
||||||
|
|
||||||
This will prompt for a username and password. For the username, use `__token__`.
|
|
||||||
For the password, use API token from https://pypi.org/manage/account/ , including the pypi- prefix.
|
|
||||||
+23
-24
@@ -69,10 +69,10 @@ A typical result is as follows (with annotated comments)::
|
|||||||
|
|
||||||
$ electrumx_rpc getinfo
|
$ electrumx_rpc getinfo
|
||||||
{
|
{
|
||||||
"coin": "Bitcoin",
|
"coin": "Palladium",
|
||||||
"daemon": "127.0.0.1:9334/",
|
"daemon": "127.0.0.1:2332/",
|
||||||
"daemon height": 572154, # The daemon's height when last queried
|
"daemon height": 542048, # The daemon's height when last queried
|
||||||
"db height": 572154, # The height to which the DB is flushed
|
"db height": 542048, # The height to which the DB is flushed
|
||||||
"groups": 586, # The number of session groups
|
"groups": 586, # The number of session groups
|
||||||
"history cache": "185,014 lookups 9,756 hits 1,000 entries",
|
"history cache": "185,014 lookups 9,756 hits 1,000 entries",
|
||||||
"merkle cache": "280 lookups 54 hits 213 entries",
|
"merkle cache": "280 lookups 54 hits 213 entries",
|
||||||
@@ -192,12 +192,12 @@ Peer data is obtained via a peer discovery protocol documented
|
|||||||
:ref:`here <Peer Discovery>`::
|
:ref:`here <Peer Discovery>`::
|
||||||
|
|
||||||
$ electrumx_rpc peers
|
$ electrumx_rpc peers
|
||||||
Host Status TCP SSL Server Min Max Pruning Last Good Last Try Tries Source IP Address
|
Host Status TCP SSL Server Min Max Pruning Last Good Last Try Tries Source IP Address
|
||||||
bch.tedy.pw good 50001 50002 ElectrumX 1.2.1 0.9 1.2 07h 29m 23s 07h 30m 40s 0 peer 185.215.224.26
|
electrum1.example.com good 50001 50002 plm-electrumx 1.0.0 1.4 1.7 07h 29m 23s 07h 30m 40s 0 peer 192.0.2.10
|
||||||
shsmithgoggryfbx.onion good 60001 60002 ElectrumX 1.2.1 0.9 1.2 07h 30m 34s 07h 30m 38s 0 peer
|
electrum2.example.com good 50001 50002 plm-electrumx 1.0.0 1.4 1.7 07h 30m 34s 07h 30m 38s 0 peer
|
||||||
bccarihace4jdcnt.onion good 52001 52002 ElectrumX 1.2.1 0.9 1.2 07h 30m 34s 07h 30m 39s 0 peer
|
|
||||||
[...]
|
[...]
|
||||||
electroncash.checksum0.com good 50001 50002 ElectrumX 1.2.1 0.9 1.1 07h 30m 40s 07h 30m 41s 0 peer 149.56.198.233
|
|
||||||
|
(The host names above are examples.)
|
||||||
|
|
||||||
.. _query:
|
.. _query:
|
||||||
|
|
||||||
@@ -205,26 +205,25 @@ query
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
Run a query of the UTXO and history databases against one or more
|
Run a query of the UTXO and history databases against one or more
|
||||||
addresses, hex scripts or ASCII names (for coins that have an index
|
addresses or hex scripts. `--limit <N>` or `-l <N>` limits the output
|
||||||
on names like Namecoin). `--limit <N>` or `-l <N>` limits the output
|
|
||||||
for each kind to that many entries. History is printed in blockchain
|
for each kind to that many entries. History is printed in blockchain
|
||||||
order; UTXOs in an arbitrary order.
|
order; UTXOs in an arbitrary order.
|
||||||
|
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
$ electrumx_rpc query --limit 5 76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac
|
$ electrumx_rpc query --limit 5 76a91405d230d91166fa0e82b9142e66172846855e469a88ac
|
||||||
Script: 76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac
|
Script: 76a91405d230d91166fa0e82b9142e66172846855e469a88ac
|
||||||
History #1: height 123,723 tx_hash 3387418aaddb4927209c5032f515aa442a6587d6e54677f08a03b8fa7789e688
|
History #0: height 28,227 txid 021bd9352ba2c0e8847f642753b0dea07db9fc76a991b154c8806b528280a1dc
|
||||||
History #2: height 127,280 tx_hash 4574958d135e66a53abf9c61950aba340e9e140be50efeea9456aa9f92bf40b5
|
History #1: height 28,234 txid c7da889fdf7686a6f2f8a79ca1275b05b08f0d2f9051c85d1c2c70c0949ae025
|
||||||
History #3: height 127,909 tx_hash 8b960c87f9f1a6e6910e214fcf5f9c69b60319ba58a39c61f299548412f5a1c6
|
History #2: height 28,242 txid b940e1d63caf8b73562705df6bdf1f4c2e2ef47df5be46483c7ba4fd02fc7f66
|
||||||
History #4: height 127,943 tx_hash 8f6b63012753005236b1b76e4884e4dee7415e05ab96604d353001662cde6b53
|
History #3: height 28,339 txid dd844c6838b9dfd18619dbf2816f22249c063755afaeaf67ed1e1118ad662616
|
||||||
History #5: height 127,943 tx_hash 60ff2dfdf67917040139903a0141f7525a7d152365b371b35fd1cf83f1d7f704
|
History #4: height 28,368 txid 0d95947d605984d6d1d32bc252af398a18e218fe4a7625c1496f88abd4a8a07e
|
||||||
UTXO #1: tx_hash 9aa497bf000b20f5ec5dc512bb6c1b60b68fc584d38b292b434e839ea8807bf0 tx_pos 0 height 254,148 value 5,500
|
UTXO #1: txid 407a1be25f9962e83d1734fbf9773094428c77f835276cf965eef9f9778770c1 tx_pos 2 height 130,276 value 250,000,000
|
||||||
UTXO #2: tx_hash 1c998142a5a5aae6f8c1eab245351413fe8d4032a3f14345f9943a0d0bc90ec0 tx_pos 0 height 254,161 value 5,500
|
UTXO #2: txid 0cd05022306e2cfdf30f1def563cb6fa2b5e0d13896da9531ce93c86296d8855 tx_pos 1 height 130,286 value 100,000,000
|
||||||
UTXO #3: tx_hash 53345491b4829140be53f30079c6e4556a18545343b122900ebbfa158f9ca97a tx_pos 0 height 254,163 value 5,500
|
UTXO #3: txid 6b172cf9477aec19198b89fa53600cfdb27ed0dd6d6c945ced5e0f02daa673fb tx_pos 1 height 130,359 value 300,000,000
|
||||||
UTXO #4: tx_hash c71ad947ac46af217da3cd5521113cbd03e36ddada2b4452afe6c15f944d2529 tx_pos 0 height 372,916 value 1,000
|
UTXO #4: txid b8a9992d63fa185c410f9d6855c39bc4afc0002b81b21a29c947aeac6f5b6428 tx_pos 0 height 130,447 value 250,000,000
|
||||||
UTXO #5: tx_hash c944a6acac054275a5e294e746d9ce79f6dcae91f3b4f5a84561aee6404a55b3 tx_pos 0 height 254,148 value 5,500
|
UTXO #5: txid 3cb0f3f21c8aad26293dd0228595c4f0f1c0e1f2863e756bb2d994e0fe2ba6a8 tx_pos 1 height 130,501 value 100,000,000
|
||||||
Balance: 17.8983303 BCH
|
Balance: 16.500000 PLM
|
||||||
|
|
||||||
reorg
|
reorg
|
||||||
-----
|
-----
|
||||||
|
|||||||
Reference in new issue
Block a user