Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removals after v0.11.1 #5264

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cln-grpc/proto/node.proto
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ message ListpeersPeersChannels {
optional bytes close_to = 14;
optional bool private = 15;
ChannelSide opener = 16;
optional ChannelSide closer = 17;
repeated string features = 18;
optional Amount to_us_msat = 20;
optional Amount min_to_us_msat = 21;
Expand Down
1 change: 1 addition & 0 deletions cln-grpc/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ impl From<&responses::ListpeersPeersChannels> for pb::ListpeersPeersChannels {
close_to: c.close_to.as_ref().map(|v| hex::decode(&v).unwrap()), // Rule #2 for type hex?
private: c.private.clone(), // Rule #2 for type boolean?
opener: c.opener as i32,
closer: c.closer.map(|v| v as i32),
features: c.features.iter().map(|i| i.into()).collect(), // Rule #3 for type ListpeersPeersChannelsFeatures
to_us_msat: c.to_us_msat.map(|f| f.into()), // Rule #2 for type msat?
min_to_us_msat: c.min_to_us_msat.map(|f| f.into()), // Rule #2 for type msat?
Expand Down
2 changes: 2 additions & 0 deletions cln-rpc/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,8 @@ pub mod responses {
// Path `ListPeers.peers[].channels[].opener`
#[serde(rename = "opener")]
pub opener: ChannelSide,
#[serde(skip_serializing_if = "Option::is_none")]
pub closer: Option<ChannelSide>,
#[serde(alias = "features")]
pub features: Vec<String>,
#[serde(alias = "to_us_msat", skip_serializing_if = "Option::is_none")]
Expand Down
4 changes: 1 addition & 3 deletions connectd/connectd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,8 +1437,7 @@ setup_listeners(const tal_t *ctx,
toraddr = tor_autoservice(tmpctx,
&proposed_wireaddr[i],
tor_password,
localaddr,
daemon->use_v3_autotor);
localaddr);

if (!(proposed_listen_announce[i] & ADDR_ANNOUNCE)) {
continue;
Expand Down Expand Up @@ -1534,7 +1533,6 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
&proxyaddr, &daemon->always_use_proxy,
&daemon->dev_allow_localhost, &daemon->use_dns,
&tor_password,
&daemon->use_v3_autotor,
&daemon->timeout_secs,
&daemon->websocket_helper,
&daemon->websocket_port,
Expand Down
3 changes: 0 additions & 3 deletions connectd/connectd.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ struct daemon {
/* File descriptors to listen on once we're activated. */
const struct listen_fd **listen_fds;

/* Allow to define the default behavior of tor services calls*/
bool use_v3_autotor;

/* Our features, as lightningd told us */
struct feature_set *our_features;

Expand Down
1 change: 0 additions & 1 deletion connectd/connectd_wire.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ msgdata,connectd_init,use_tor_proxy_always,bool,
msgdata,connectd_init,dev_allow_localhost,bool,
msgdata,connectd_init,use_dns,bool,
msgdata,connectd_init,tor_password,wirestring,
msgdata,connectd_init,use_v3_autotor,bool,
msgdata,connectd_init,timeout_secs,u32,
msgdata,connectd_init,websocket_helper,wirestring,
msgdata,connectd_init,websocket_port,u16,
Expand Down
31 changes: 11 additions & 20 deletions connectd/tor_autoservice.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ static void discard_remaining_response(struct rbuf *rbuf)
static struct wireaddr *make_onion(const tal_t *ctx,
struct rbuf *rbuf,
const struct wireaddr *local,
bool use_v3_autotor,
u16 port)
{
char *line;
Expand All @@ -101,25 +100,18 @@ static struct wireaddr *make_onion(const tal_t *ctx,
if (!strstarts(line, "VERSION Tor="))
continue;

if (use_v3_autotor)
if (strstr(line, "\"0.0") ||
strstr(line, "\"0.1") ||
strstr(line, "\"0.2") ||
strstr(line, "\"0.3")) {
use_v3_autotor = false;
status_unusual("Autotor: fallback to try a V2 onion service, your Tor version is smaller than 0.4.x.x");
}
};
if (strstr(line, "\"0.0") ||
strstr(line, "\"0.1") ||
strstr(line, "\"0.2") ||
strstr(line, "\"0.3")) {
status_failed(STATUS_FAIL_INTERNAL_ERROR,
"Autotor: your Tor version is smaller than 0.4.x.x");
}
}

if (!use_v3_autotor) {
tor_send_cmd(rbuf,
tal_fmt(tmpctx, "ADD_ONION NEW:RSA1024 Port=%d,%s Flags=DiscardPK,Detach",
port, fmt_wireaddr(tmpctx, local)));
} else {
tor_send_cmd(rbuf,
tor_send_cmd(rbuf,
tal_fmt(tmpctx, "ADD_ONION NEW:ED25519-V3 Port=%d,%s Flags=DiscardPK,Detach",
port, fmt_wireaddr(tmpctx, local)));
}

while ((line = tor_response_line(rbuf)) != NULL) {
const char *name;
Expand Down Expand Up @@ -268,8 +260,7 @@ static void negotiate_auth(struct rbuf *rbuf, const char *tor_password)
struct wireaddr *tor_autoservice(const tal_t *ctx,
const struct wireaddr_internal *tor_serviceaddr,
const char *tor_password,
const struct wireaddr *laddr,
const bool use_v3_autotor)
const struct wireaddr *laddr)
{
int fd;
struct wireaddr *onion;
Expand All @@ -290,7 +281,7 @@ struct wireaddr *tor_autoservice(const tal_t *ctx,
rbuf_init(&rbuf, fd, buffer, tal_count(buffer), buf_resize);

negotiate_auth(&rbuf, tor_password);
onion = make_onion(ctx, &rbuf, laddr, use_v3_autotor, tor_serviceaddr->u.torservice.port);
onion = make_onion(ctx, &rbuf, laddr, tor_serviceaddr->u.torservice.port);

/*on the other hand we can stay connected until ln finish to keep onion alive and then vanish */
//because when we run with Detach flag as we now do every start of LN creates a new addr while the old
Expand Down
3 changes: 1 addition & 2 deletions connectd/tor_autoservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
struct wireaddr *tor_autoservice(const tal_t *ctx,
const struct wireaddr_internal *tor_serviceaddr,
const char *tor_password,
const struct wireaddr *localaddr,
const bool use_v3_autotor);
const struct wireaddr *localaddr);

struct wireaddr *tor_fixed_service(const tal_t *ctx,
const struct wireaddr_internal *tor_serviceaddr,
Expand Down
3 changes: 1 addition & 2 deletions doc/lightning-listconfigs.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion doc/lightning-listconfigs.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ EXAMPLE JSON RESPONSE
"autolisten": true,
"proxy": "127.0.0.1:9050",
"disable-dns": "false",
"enable-autotor-v2-mode": "false",
"encrypted-hsm": false,
"rpc-file-mode": "0600",
"log-level": "DEBUG",
Expand Down
4 changes: 2 additions & 2 deletions doc/lightning-listpeers.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ On success, an object containing **peers** is returned. It is an array of objec
- **scratch_txid** (txid): The commitment transaction txid we would use if we went onchain now
- **close_to** (hex, optional): scriptPubkey which we have to close to if we mutual close
- **private** (boolean, optional): if False, we will not announce this channel
- **closer** (string, optional): Who initiated the channel close (`null` is deprecated!) (one of "local", "remote", *null*)
- **closer** (string, optional): Who initiated the channel close (one of "local", "remote")
- **funding** (object, optional):
- **local_msat** (msat): Amount of channel we funded
- **remote_msat** (msat): Amount of channel they funded
Expand Down Expand Up @@ -380,4 +380,4 @@ Main web site: <https://github.com/ElementsProject/lightning> Lightning
RFC site (BOLT \#9):
<https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md>

[comment]: # ( SHA256STAMP:6b0ec5c899c8685487190209f594635030205a275e1dc6d61a7b057adbf66192)
[comment]: # ( SHA256STAMP:4f76b5ac19d3dfdaf3d04f5dd5de2312a2ab0ccffe779508c416aaf6e644612a)
2 changes: 1 addition & 1 deletion doc/lightning-listtransactions.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ RESOURCES
---------

Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ba0624377601e6e90c2ca90b709fd076f3ed0f2b813f73553ec6b935eeec54a1)
[comment]: # ( SHA256STAMP:bd9c33dd27be0f25b0212b4115714768ffbec2ff6e72f083613a4464a3f98bc0)
32 changes: 3 additions & 29 deletions doc/schemas/listpeers.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,12 @@
"description": "Who initiated the channel"
},
"closer": {
"FIXME": "deprecated_apis turns off null!",
"type": [
"string",
"null"
],
"type": "string",
"enum": [
"local",
"remote",
null
"remote"
],
"description": "Who initiated the channel close (`null` is deprecated!)"
"description": "Who initiated the channel close"
},
"features": {
"type": "array",
Expand Down Expand Up @@ -360,12 +355,6 @@
}
}
},
"funding_allocation_msat": {
"deprecated": true
},
"funding_msat": {
"deprecated": true
},
"to_us_msat": {
"type": "msat",
"description": "how much of channel is owed to us"
Expand Down Expand Up @@ -765,8 +754,6 @@
"closer": {},
"features": {},
"funding": {},
"funding_allocation_msat": {},
"funding_msat": {},
"to_us_msat": {},
"min_to_us_msat": {},
"max_to_us_msat": {},
Expand Down Expand Up @@ -817,7 +804,6 @@
"last_feerate": {},
"next_feerate": {},
"inflight": {},
"last_tx_fee": {},
"last_tx_fee_msat": {},
"direction": {},
"close_to_addr": {
Expand Down Expand Up @@ -854,8 +840,6 @@
"closer": {},
"features": {},
"funding": {},
"funding_allocation_msat": {},
"funding_msat": {},
"to_us_msat": {},
"min_to_us_msat": {},
"max_to_us_msat": {},
Expand Down Expand Up @@ -907,9 +891,6 @@
"next_feerate": {},
"close_to_addr": {},
"direction": {},
"last_tx_fee": {
"deprecated": true
},
"last_tx_fee_msat": {
"type": "msat",
"description": "fee attached to this the current tx"
Expand Down Expand Up @@ -944,8 +925,6 @@
"closer": {},
"features": {},
"funding": {},
"funding_allocation_msat": {},
"funding_msat": {},
"to_us_msat": {},
"min_to_us_msat": {},
"max_to_us_msat": {},
Expand Down Expand Up @@ -995,7 +974,6 @@
"initial_feerate": {},
"last_feerate": {},
"next_feerate": {},
"last_tx_fee": {},
"close_to_addr": {},
"last_tx_fee_msat": {},
"direction": {
Expand Down Expand Up @@ -1033,8 +1011,6 @@
"closer": {},
"features": {},
"funding": {},
"funding_allocation_msat": {},
"funding_msat": {},
"to_us_msat": {},
"min_to_us_msat": {},
"max_to_us_msat": {},
Expand Down Expand Up @@ -1082,7 +1058,6 @@
"out_msatoshi_fulfilled": {},
"htlcs": {},
"inflight": {},
"last_tx_fee": {},
"close_to_addr": {},
"direction": {},
"last_tx_fee_msat": {},
Expand Down Expand Up @@ -1129,7 +1104,6 @@
"connected": {},
"htlcs": {},
"log": {},
"last_tx_fee": {},
"netaddr": {
"type": "array",
"minItems": 1,
Expand Down
3 changes: 0 additions & 3 deletions doc/schemas/listtransactions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@
"type": "u32",
"description": "the 0-based output number"
},
"satoshis": {
"deprecated": true
},
"msat": {
"type": "msat",
"description": "the amount of the output"
Expand Down
1 change: 0 additions & 1 deletion lightningd/connect_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ int connectd_init(struct lightningd *ld)
ld->proxyaddr, ld->always_use_proxy || ld->pure_tor_setup,
IFDEV(ld->dev_allow_localhost, false), ld->config.use_dns,
ld->tor_service_password ? ld->tor_service_password : "",
ld->config.use_v3_autotor,
ld->config.connection_timeout_secs,
websocket_helper_path,
ld->websocket_port,
Expand Down
3 changes: 0 additions & 3 deletions lightningd/lightningd.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ struct config {
/* Minimal amount of effective funding_satoshis for accepting channels */
u64 min_capacity_sat;

/* Allow to define the default behavior of tor services calls*/
bool use_v3_autotor;

/* This is the key we use to encrypt `hsm_secret`. */
struct secret *keypass;

Expand Down
9 changes: 0 additions & 9 deletions lightningd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,6 @@ static const struct config testnet_config = {
/* Sets min_effective_htlc_capacity - at 1000$/BTC this is 10ct */
.min_capacity_sat = 10000,

.use_v3_autotor = true,

/* 1 minute should be enough for anyone! */
.connection_timeout_secs = 60,

Expand Down Expand Up @@ -859,9 +857,6 @@ static const struct config mainnet_config = {
/* Sets min_effective_htlc_capacity - at 1000$/BTC this is 10ct */
.min_capacity_sat = 10000,

/* Allow to define the default behavior of tor services calls*/
.use_v3_autotor = true,

/* 1 minute should be enough for anyone! */
.connection_timeout_secs = 60,

Expand Down Expand Up @@ -1168,10 +1163,6 @@ static void register_opts(struct lightningd *ld)
opt_register_early_noarg("--disable-dns", opt_set_invbool, &ld->config.use_dns,
"Disable DNS lookups of peers");

if (deprecated_apis)
opt_register_noarg("--enable-autotor-v2-mode", opt_set_invbool, &ld->config.use_v3_autotor,
opt_hidden);

opt_register_noarg("--encrypted-hsm", opt_set_hsm_password, ld,
"Set the password to encrypt hsm_secret with. If no password is passed through command line, "
"you will be prompted to enter it.");
Expand Down
24 changes: 0 additions & 24 deletions lightningd/peer_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ static void json_add_channel(struct lightningd *ld,
struct channel_stats channel_stats;
struct amount_msat funding_msat, peer_msats, our_msats;
struct amount_sat peer_funded_sats;
struct peer *p = channel->peer;
struct state_change_entry *state_changes;
u32 feerate;

Expand All @@ -639,9 +638,6 @@ static void json_add_channel(struct lightningd *ld,
bitcoin_txid(channel->last_tx, &txid);

json_add_txid(response, "scratch_txid", &txid);
if (deprecated_apis)
json_add_amount_sat_only(response, "last_tx_fee",
bitcoin_tx_compute_fee(channel->last_tx));
json_add_amount_sat_only(response, "last_tx_fee_msat",
bitcoin_tx_compute_fee(channel->last_tx));
}
Expand Down Expand Up @@ -746,8 +742,6 @@ static void json_add_channel(struct lightningd *ld,
if (channel->closer != NUM_SIDES)
json_add_string(response, "closer", channel->closer == LOCAL ?
"local" : "remote");
else if (deprecated_apis)
json_add_null(response, "closer");

json_array_start(response, "features");
if (channel_has(channel, OPT_STATIC_REMOTEKEY))
Expand Down Expand Up @@ -781,24 +775,6 @@ static void json_add_channel(struct lightningd *ld,
our_msats = AMOUNT_MSAT(0);
}

if (deprecated_apis) {
json_object_start(response, "funding_allocation_msat");
json_add_u64(response, node_id_to_hexstr(tmpctx, &p->id),
peer_msats.millisatoshis); /* Raw: JSON field */
json_add_u64(response, node_id_to_hexstr(tmpctx, &ld->id),
our_msats.millisatoshis); /* Raw: JSON field */
json_object_end(response);

json_object_start(response, "funding_msat");
json_add_sat_only(response,
node_id_to_hexstr(tmpctx, &p->id),
peer_funded_sats);
json_add_sat_only(response,
node_id_to_hexstr(tmpctx, &ld->id),
channel->our_funds);
json_object_end(response);
}

json_object_start(response, "funding");
json_add_sat_only(response, "local_msat", channel->our_funds);
json_add_sat_only(response, "remote_msat", peer_funded_sats);
Expand Down
Loading