diff --git a/DEPLOY.md b/DEPLOY.md index e065dac..4e7a254 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -238,7 +238,8 @@ From another machine, `nc -zv 50001` must succeed if the server is m | log: connection refused / cannot connect to `palladiumd:2332` | the node is stopped or still starting; check that the node container is running | | log: `401`/authorization errors | wrong `PLM_RPC_USER` / `PLM_RPC_PASSWORD` in `.env`; the credentials must be the ones in the node's `palladium.conf` | | errors mentioning `txindex` | `txindex=1` is missing in `palladium.conf` (an index added later is built while the node runs, which takes time) | -| `blockchain.outpoint.subscribe` is refused, or package broadcast returns a daemon error | expected: Palladium Core does not have the RPCs they need (`gettxspendingprevout`, `submitpackage`) | +| `blockchain.outpoint.subscribe` or `blockchain.transaction.broadcast_package` return an error | expected: Palladium Core does not have the RPCs they need (`gettxspendingprevout`, `submitpackage`) | +| a client is disconnected, log says `disconnected whilst throttled` or `closing session over res usage` | expected: the server limits the cost of the requests of each client and IP (for example listing the UTXOs of an address with thousands of outputs); raise `COST_SOFT_LIMIT` / `COST_HARD_LIMIT` for your own trusted clients (see `docs/environment.rst`) | | the server stays at an old height | the node is not synced; ElectrumX only follows the node | | clients cannot connect from outside | port not published/forwarded, firewall, or `SERVICES` does not list that protocol | | container stops at once, log says `ERROR: ... is not writable` | the data directory belongs to another user (or to root, if Docker created it): `chown -R $(id -u):$(id -g) ~/.plm-electrumx`, or set `PLM_UID`/`PLM_GID` | diff --git a/README.md b/README.md index 1575474..1fb1640 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ When merging upstream, resolve modify/delete conflicts on these files by keeping - Palladium Core has no `getindexinfo`, `txospenderindex` (`gettxspendingprevout`) or `submitpackage` RPCs, so the daemon version/index checks are disabled for `COIN=Palladium`, and `blockchain.outpoint.subscribe` is refused with an explicit error (`Coin.DAEMON_HAS_TXO_SPENDER_INDEX`) - and `blockchain.transaction.broadcast_package` returns the daemon error to clients. + and `blockchain.transaction.broadcast_package` returns an explicit error to clients. - The daemon must run with `txindex=1`. - Same genesis blocks as Bitcoin (mainnet, testnet3, regtest), 80-byte headers, sha256d PoW. - Parameters (address prefixes, ports, genesis hashes) were taken from the Palladium Core chain parameters. diff --git a/docs/changelog.rst b/docs/changelog.rst index 1f38c02..293cf4d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,13 +14,15 @@ First release of the Palladium fork. Based on a snapshot of upstream ElectrumX 2 bech32/bech32m decoder let ``electrumx_rpc query`` read ``plm1``, ``tplm1`` and ``rplm1`` addresses. * Palladium Core has no ``getindexinfo``, ``txospenderindex`` or ``submitpackage`` RPCs: the daemon version/index checks are disabled, ``txindex=1`` is required, ``blockchain.outpoint.subscribe`` is refused with an explicit - error (``Coin.DAEMON_HAS_TXO_SPENDER_INDEX``) and ``blockchain.transaction.broadcast_package`` returns the - daemon error to clients. + error (``Coin.DAEMON_HAS_TXO_SPENDER_INDEX``) and ``blockchain.transaction.broadcast_package`` returns an + explicit "not supported" error to clients. * fixed: ``mempool.get_info`` (protocol 1.6) failed with the Palladium daemon, whose ``getmempoolinfo`` has no ``incrementalrelayfee`` (it is read from ``getnetworkinfo``), and ``blockchain.transaction.testmempoolaccept`` failed because the daemon does not report ``wtxid``. * new: integration tests (``tests/integration``) against a Palladium node in regtest mode, run in Docker, with - a ``integration`` job in CI. + an ``integration`` job in CI for LevelDB and RocksDB. They cover the protocol versions 1.4 to 1.7, SSL, reorgs and + the daemon limits. +* new: a mainnet taproot transaction among the test fixtures. * 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 diff --git a/src/electrumx/lib/coins.py b/src/electrumx/lib/coins.py index 7789a9d..86cb79b 100644 --- a/src/electrumx/lib/coins.py +++ b/src/electrumx/lib/coins.py @@ -271,7 +271,7 @@ class Palladium(Coin): Its daemon has no 'txospenderindex', 'getindexinfo' or 'submitpackage', so 'blockchain.outpoint.subscribe' is refused (DAEMON_HAS_TXO_SPENDER_INDEX) and - 'blockchain.transaction.broadcast_package' will return a daemon error to clients. + 'blockchain.transaction.broadcast_package' returns an explicit error to clients. The daemon needs 'txindex=1'. """ NAME = "Palladium" @@ -288,8 +288,8 @@ class Palladium(Coin): DAEMON_HAS_TXO_SPENDER_INDEX = False RPC_PORT = 2332 # snapshot (UpdateTip tx= count), only used for sync ETAs - TX_COUNT = 661_421 - TX_COUNT_HEIGHT = 542_032 + TX_COUNT = 662_327 + TX_COUNT_HEIGHT = 542_786 TX_PER_BLOCK = 2 PEERS = [] diff --git a/src/electrumx/server/session.py b/src/electrumx/server/session.py index 9f9bdc6..25d6262 100644 --- a/src/electrumx/server/session.py +++ b/src/electrumx/server/session.py @@ -2240,6 +2240,8 @@ class ElectrumX(SessionBase): error, = e.args message = error['message'] self.logger.info(f"error submitting package: {message}") + if error.get('code') == -32601: # method not found + raise RPCError(BAD_REQUEST, 'the daemon does not support package submission (submitpackage)') raise RPCError( BAD_REQUEST, f'the tx package was rejected by network rules.\n\n{message}.',