Skip to content

Commit 89d2489

Browse files
authored
Remove Electrum support (#1750)
Electrum support was provided for mobile wallets, server nodes should always run a bitcoind node as this provides more control (especially for utxo management for anchor outputs channels). Since wallets will use https://github.com/acinq/eclair-kmp instead of eclair, we can now remove Electrum and API fee providers from eclair. We also removed 3rd-party fee API providers that were only used on wallets.
1 parent 5729b28 commit 89d2489

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+121
-10105
lines changed

eclair-core/src/main/resources/electrum/checkpoints_mainnet.json

-1,230
This file was deleted.

eclair-core/src/main/resources/electrum/checkpoints_testnet.json

-3,306
This file was deleted.

eclair-core/src/main/resources/electrum/servers_mainnet.json

-108
This file was deleted.

eclair-core/src/main/resources/electrum/servers_regtest.json

-10
This file was deleted.

eclair-core/src/main/resources/electrum/servers_testnet.json

-38
This file was deleted.

eclair-core/src/main/resources/reference.conf

-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ eclair {
2020
// override this with a script/exe that will be called everytime a new database backup has been created
2121
# backup-notify-script = "/absolute/path/to/script.sh"
2222

23-
watcher-type = "bitcoind" // other *experimental* values include "electrum"
2423
watch-spent-window = 1 minute // at startup watches will be put back within that window to reduce herd effect; must be > 0s
2524

2625
bitcoind {
@@ -91,7 +90,6 @@ eclair {
9190
on-chain-fees {
9291
min-feerate = 1 // minimum feerate in satoshis per byte
9392
smoothing-window = 6 // 1 = no smoothing
94-
provider-timeout = 5 seconds // max time we'll wait for answers from a fee provider before we fallback to the next one
9593

9694
default-feerates { // those are per target block, in satoshis per kilobyte
9795
1 = 210000

eclair-core/src/main/scala/fr/acinq/eclair/NodeParams.scala

+3-12
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package fr.acinq.eclair
1919
import com.typesafe.config.{Config, ConfigFactory, ConfigValueType}
2020
import fr.acinq.bitcoin.Crypto.PublicKey
2121
import fr.acinq.bitcoin.{Block, ByteVector32, Crypto, Satoshi}
22-
import fr.acinq.eclair.NodeParams.WatcherType
2322
import fr.acinq.eclair.Setup.Seeds
2423
import fr.acinq.eclair.blockchain.fee._
2524
import fr.acinq.eclair.channel.Channel
@@ -79,7 +78,6 @@ case class NodeParams(nodeKeyManager: NodeKeyManager,
7978
maxReconnectInterval: FiniteDuration,
8079
chainHash: ByteVector32,
8180
channelFlags: Byte,
82-
watcherType: WatcherType,
8381
watchSpentWindow: FiniteDuration,
8482
paymentRequestExpiry: FiniteDuration,
8583
multiPartPaymentExpiry: FiniteDuration,
@@ -110,11 +108,10 @@ case class NodeParams(nodeKeyManager: NodeKeyManager,
110108

111109
object NodeParams extends Logging {
112110

111+
// @formatter:off
113112
sealed trait WatcherType
114-
115113
object BITCOIND extends WatcherType
116-
117-
object ELECTRUM extends WatcherType
114+
// @formatter:on
118115

119116
/**
120117
* Order of precedence for the configuration parameters:
@@ -123,7 +120,7 @@ object NodeParams extends Logging {
123120
* 3) Optionally provided config
124121
* 4) Default values in reference.conf
125122
*/
126-
def loadConfiguration(datadir: File) =
123+
def loadConfiguration(datadir: File): Config =
127124
ConfigFactory.parseProperties(System.getProperties)
128125
.withFallback(ConfigFactory.parseFile(new File(datadir, "eclair.conf")))
129126
.withFallback(ConfigFactory.load())
@@ -214,11 +211,6 @@ object NodeParams extends Logging {
214211
val color = ByteVector.fromValidHex(config.getString("node-color"))
215212
require(color.size == 3, "color should be a 3-bytes hex buffer")
216213

217-
val watcherType = config.getString("watcher-type") match {
218-
case "electrum" => ELECTRUM
219-
case _ => BITCOIND
220-
}
221-
222214
val watchSpentWindow = FiniteDuration(config.getDuration("watch-spent-window").getSeconds, TimeUnit.SECONDS)
223215
require(watchSpentWindow > 0.seconds, "watch-spent-window must be strictly greater than 0")
224216

@@ -364,7 +356,6 @@ object NodeParams extends Logging {
364356
maxReconnectInterval = FiniteDuration(config.getDuration("max-reconnect-interval").getSeconds, TimeUnit.SECONDS),
365357
chainHash = chainHash,
366358
channelFlags = config.getInt("channel-flags").toByte,
367-
watcherType = watcherType,
368359
watchSpentWindow = watchSpentWindow,
369360
paymentRequestExpiry = FiniteDuration(config.getDuration("payment-request-expiry").getSeconds, TimeUnit.SECONDS),
370361
multiPartPaymentExpiry = FiniteDuration(config.getDuration("multi-part-payment-expiry").getSeconds, TimeUnit.SECONDS),

0 commit comments

Comments
 (0)