Skip to content

Commit 9998883

Browse files
authored
Merge pull request #84 from ffranr/upgrade_lnd_tor
Upgrade lnd tor to version v1.1.0
2 parents 92a4def + 4f8e09f commit 9998883

28 files changed

+1646
-289
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# Top-most EditorConfig file.
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file.
7+
[*.md]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
max_line_length = 80
11+
12+
# 8 space indentation for Golang code.
13+
[*.go]
14+
indent_style = tab
15+
indent_size = 8
16+
max_line_length = 80

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
# https://github.com/golang/go/issues/51799). There was a race condition
2525
# introduced with go 1.16.10 that causes the unit tests to fail (could also
2626
# happen in production).
27-
GO_VERSION: 1.16.9
27+
GO_VERSION: 1.19.2
2828

2929
jobs:
3030
########################

.golangci.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,34 @@ linters-settings:
1515
simplify: true
1616

1717
linters:
18-
enable-all: true
19-
disable:
20-
# Init functions are used by loggers throughout the codebase.
21-
- gochecknoinits
2218

23-
# Global variables are used by loggers.
24-
- gochecknoglobals
25-
26-
# Some lines are over 80 characters on purpose and we don't want to make
27-
# them even longer by marking them as 'nolint'.
28-
- lll
29-
30-
# We don't care (enough) about misaligned structs to lint that.
31-
- maligned
32-
33-
# We have long functions, especially in tests. Moving or renaming those
34-
# would trigger funlen problems that we may not want to solve at that time.
35-
- funlen
36-
37-
# Gosec is outdated and reports false positives.
38-
- gosec
19+
# Specify an enabled list of linters rather than a disabled list because
20+
# the latest linter includes many sub-linters which do not pass the codebase.
21+
enable:
22+
- bodyclose
23+
- deadcode
24+
- depguard
25+
- dupl
26+
- errcheck
27+
- goconst
28+
- gocritic
29+
- gocyclo
30+
- gofmt
31+
- goimports
32+
- golint
33+
- gosimple
34+
- govet
35+
- ineffassign
36+
- interfacer
37+
- misspell
38+
- nakedret
39+
- prealloc
40+
- scopelint
41+
- staticcheck
42+
- structcheck
43+
- stylecheck
44+
- typecheck
45+
- unconvert
46+
- unparam
47+
- unused
48+
- varcheck

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/golang/go/issues/51799). There was a race condition
33
# introduced with go 1.16.10 that causes the unit tests to fail (could also
44
# happen in production).
5-
FROM golang:1.16.9-alpine as builder
5+
FROM golang:1.19.2-alpine as builder
66

77
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
88
# queries required to connect to linked containers succeed.

Makefile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
PKG := github.com/lightninglabs/aperture
22
ESCPKG := github.com\/lightninglabs\/aperture
3+
TOOLS_DIR := tools
34

4-
LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
55
GOVERALLS_PKG := github.com/mattn/goveralls
66
GOACC_PKG := github.com/ory/go-acc
77

88
GO_BIN := ${GOPATH}/bin
99
GOVERALLS_BIN := $(GO_BIN)/goveralls
10-
LINT_BIN := $(GO_BIN)/golangci-lint
1110
GOACC_BIN := $(GO_BIN)/go-acc
12-
13-
LINT_COMMIT := v1.18.0
1411
GOACC_COMMIT := ddc355013f90fea78d83d3a6c71f1d37ac07ecd5
1512

1613
DEPGET := cd /tmp && GO111MODULE=on go get -v
@@ -29,7 +26,9 @@ XARGS := xargs -L 1
2926

3027
include make/testing_flags.mk
3128

32-
LINT = $(LINT_BIN) run -v
29+
# DOCKER_TOOLS is a docker run command which executes the
30+
# aperture tools (e.g. linting) docker image.
31+
DOCKER_TOOLS = docker run -v $$(pwd):/build aperture-tools
3332

3433
default: build
3534

@@ -43,10 +42,6 @@ $(GOVERALLS_BIN):
4342
@$(call print, "Fetching goveralls.")
4443
go get -u $(GOVERALLS_PKG)
4544

46-
$(LINT_BIN):
47-
@$(call print, "Fetching linter")
48-
$(DEPGET) $(LINT_PKG)@$(LINT_COMMIT)
49-
5045
$(GOACC_BIN):
5146
@$(call print, "Fetching go-acc")
5247
$(DEPGET) $(GOACC_PKG)@$(GOACC_COMMIT)
@@ -63,6 +58,10 @@ install:
6358
@$(call print, "Installing aperture.")
6459
$(GOINSTALL) $(PKG)/cmd/aperture
6560

61+
docker-tools:
62+
@$(call print, "Building tools docker image.")
63+
docker build -q -t aperture-tools $(TOOLS_DIR)
64+
6665
# =======
6766
# TESTING
6867
# =======
@@ -101,9 +100,9 @@ fmt:
101100
@$(call print, "Formatting source.")
102101
gofmt -l -w -s $(GOFILES_NOVENDOR)
103102

104-
lint: $(LINT_BIN)
103+
lint: docker-tools
105104
@$(call print, "Linting source.")
106-
$(LINT)
105+
$(DOCKER_TOOLS) golangci-lint run -v
107106

108107
list:
109108
@$(call print, "Listing commands.")

aperture.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"errors"
77
"fmt"
88
"io"
9-
"io/ioutil"
109
"net/http"
1110
"os"
1211
"path/filepath"
@@ -414,7 +413,7 @@ func getConfig() (*Config, error) {
414413

415414
// Read our config file, either from the custom path provided or our
416415
// default location.
417-
b, err := ioutil.ReadFile(configFile)
416+
b, err := os.ReadFile(configFile)
418417
switch {
419418
// If the file was found, unmarshal it.
420419
case err == nil:

go.mod

Lines changed: 130 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
module github.com/lightninglabs/aperture
22

3-
go 1.15
3+
go 1.19
44

55
require (
6-
github.com/btcsuite/btcd v0.22.0-beta.0.20220207191057-4dc4ff7963b4
7-
github.com/btcsuite/btcd/btcec/v2 v2.1.0
8-
github.com/btcsuite/btcd/btcutil v1.1.0
6+
github.com/btcsuite/btcd v0.23.4
7+
github.com/btcsuite/btcd/btcec/v2 v2.2.2
8+
github.com/btcsuite/btcd/btcutil v1.1.3
9+
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2
910
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
1011
github.com/btcsuite/btcwallet/wtxmgr v1.5.0
1112
github.com/fortytw2/leaktest v1.3.0
@@ -14,23 +15,141 @@ require (
1415
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
1516
github.com/jessevdk/go-flags v1.4.0
1617
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2
17-
github.com/lightninglabs/lndclient v0.15.0-0
18-
github.com/lightningnetwork/lnd v0.14.1-beta.0.20220324135938-0dcaa511a249
18+
github.com/lightninglabs/lndclient v0.16.0-6
19+
github.com/lightningnetwork/lnd v0.15.0-beta.rc6.0.20221207163254-a0385a535b66
1920
github.com/lightningnetwork/lnd/cert v1.1.1
20-
github.com/lightningnetwork/lnd/tlv v1.0.2
21-
github.com/lightningnetwork/lnd/tor v1.0.0
21+
github.com/lightningnetwork/lnd/tlv v1.1.0
22+
github.com/lightningnetwork/lnd/tor v1.1.0
2223
github.com/prometheus/client_golang v1.11.0
23-
github.com/stretchr/testify v1.7.0
24+
github.com/stretchr/testify v1.8.0
2425
go.etcd.io/etcd/client/v3 v3.5.1
2526
go.etcd.io/etcd/server/v3 v3.5.1
26-
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
27-
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
27+
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3
28+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
2829
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
2930
google.golang.org/grpc v1.39.0
3031
google.golang.org/protobuf v1.27.1
3132
gopkg.in/macaroon.v2 v2.1.0
3233
gopkg.in/yaml.v2 v2.4.0
3334
)
3435

36+
require (
37+
github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e // indirect
38+
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82 // indirect
39+
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 // indirect
40+
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
41+
github.com/aead/siphash v1.0.1 // indirect
42+
github.com/andybalholm/brotli v1.0.3 // indirect
43+
github.com/beorn7/perks v1.0.1 // indirect
44+
github.com/btcsuite/btcd/btcutil/psbt v1.1.5 // indirect
45+
github.com/btcsuite/btcwallet v0.16.6-0.20221203002441-6c7480c8a46b // indirect
46+
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 // indirect
47+
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 // indirect
48+
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 // indirect
49+
github.com/btcsuite/btcwallet/walletdb v1.4.0 // indirect
50+
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
51+
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
52+
github.com/btcsuite/winsvc v1.0.0 // indirect
53+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
54+
github.com/coreos/go-semver v0.3.0 // indirect
55+
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
56+
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
57+
github.com/davecgh/go-spew v1.1.1 // indirect
58+
github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect
59+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
60+
github.com/decred/dcrd/lru v1.0.0 // indirect
61+
github.com/dsnet/compress v0.0.1 // indirect
62+
github.com/dustin/go-humanize v1.0.0 // indirect
63+
github.com/fergusstrange/embedded-postgres v1.10.0 // indirect
64+
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
65+
github.com/go-errors/errors v1.0.1 // indirect
66+
github.com/gogo/protobuf v1.3.2 // indirect
67+
github.com/golang/snappy v0.0.4 // indirect
68+
github.com/google/btree v1.0.1 // indirect
69+
github.com/gorilla/websocket v1.4.2 // indirect
70+
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
71+
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
72+
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
73+
github.com/jackc/pgconn v1.10.0 // indirect
74+
github.com/jackc/pgio v1.0.0 // indirect
75+
github.com/jackc/pgpassfile v1.0.0 // indirect
76+
github.com/jackc/pgproto3/v2 v2.1.1 // indirect
77+
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
78+
github.com/jackc/pgtype v1.8.1 // indirect
79+
github.com/jackc/pgx/v4 v4.13.0 // indirect
80+
github.com/jackpal/gateway v1.0.5 // indirect
81+
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad // indirect
82+
github.com/jonboulle/clockwork v0.2.2 // indirect
83+
github.com/jrick/logrotate v1.0.0 // indirect
84+
github.com/json-iterator/go v1.1.11 // indirect
85+
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 // indirect
86+
github.com/kkdai/bstream v1.0.0 // indirect
87+
github.com/klauspost/compress v1.13.6 // indirect
88+
github.com/klauspost/pgzip v1.2.5 // indirect
89+
github.com/lib/pq v1.10.3 // indirect
90+
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
91+
github.com/lightninglabs/neutrino v0.14.2 // indirect
92+
github.com/lightningnetwork/lightning-onion v1.2.1-0.20221202012345-ca23184850a1 // indirect
93+
github.com/lightningnetwork/lnd/clock v1.1.0 // indirect
94+
github.com/lightningnetwork/lnd/healthcheck v1.2.2 // indirect
95+
github.com/lightningnetwork/lnd/kvdb v1.3.1 // indirect
96+
github.com/lightningnetwork/lnd/queue v1.1.0 // indirect
97+
github.com/lightningnetwork/lnd/ticker v1.1.0 // indirect
98+
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
99+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
100+
github.com/mholt/archiver/v3 v3.5.0 // indirect
101+
github.com/miekg/dns v1.1.43 // indirect
102+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
103+
github.com/modern-go/reflect2 v1.0.1 // indirect
104+
github.com/nwaples/rardecode v1.1.2 // indirect
105+
github.com/pierrec/lz4/v4 v4.1.8 // indirect
106+
github.com/pmezard/go-difflib v1.0.0 // indirect
107+
github.com/prometheus/client_model v0.2.0 // indirect
108+
github.com/prometheus/common v0.26.0 // indirect
109+
github.com/prometheus/procfs v0.6.0 // indirect
110+
github.com/rogpeppe/fastuuid v1.2.0 // indirect
111+
github.com/sirupsen/logrus v1.7.0 // indirect
112+
github.com/soheilhy/cmux v0.1.5 // indirect
113+
github.com/spf13/pflag v1.0.5 // indirect
114+
github.com/stretchr/objx v0.4.0 // indirect
115+
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
116+
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
117+
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 // indirect
118+
github.com/ulikunitz/xz v0.5.10 // indirect
119+
github.com/xdg-go/stringprep v1.0.4 // indirect
120+
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
121+
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
122+
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
123+
go.etcd.io/bbolt v1.3.6 // indirect
124+
go.etcd.io/etcd/api/v3 v3.5.1 // indirect
125+
go.etcd.io/etcd/client/pkg/v3 v3.5.1 // indirect
126+
go.etcd.io/etcd/client/v2 v2.305.1 // indirect
127+
go.etcd.io/etcd/pkg/v3 v3.5.1 // indirect
128+
go.etcd.io/etcd/raft/v3 v3.5.1 // indirect
129+
go.opentelemetry.io/contrib v0.20.0 // indirect
130+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
131+
go.opentelemetry.io/otel v0.20.0 // indirect
132+
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
133+
go.opentelemetry.io/otel/metric v0.20.0 // indirect
134+
go.opentelemetry.io/otel/sdk v0.20.0 // indirect
135+
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
136+
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
137+
go.opentelemetry.io/otel/trace v0.20.0 // indirect
138+
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
139+
go.uber.org/atomic v1.7.0 // indirect
140+
go.uber.org/multierr v1.6.0 // indirect
141+
go.uber.org/zap v1.17.0 // indirect
142+
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
143+
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
144+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
145+
golang.org/x/text v0.3.8 // indirect
146+
google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect
147+
gopkg.in/errgo.v1 v1.0.1 // indirect
148+
gopkg.in/macaroon-bakery.v2 v2.0.1 // indirect
149+
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
150+
gopkg.in/yaml.v3 v3.0.1 // indirect
151+
sigs.k8s.io/yaml v1.2.0 // indirect
152+
)
153+
35154
// Fix etcd token renewal issue https://github.com/etcd-io/etcd/pull/13262.
36155
replace go.etcd.io/etcd/client/v3 => github.com/lightninglabs/etcd/client/v3 v3.5.1-retry-patch

0 commit comments

Comments
 (0)