Skip to content

Commit 19d2ab7

Browse files
authored
Merge branch 'lightningnetwork:master' into restore-node-announcement
2 parents 1482382 + b7c59b3 commit 19d2ab7

File tree

244 files changed

+12775
-7516
lines changed

Some content is hidden

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

244 files changed

+12775
-7516
lines changed

.github/actions/rebase/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Rebase on to the PR target base branch"
2+
description: "A reusable workflow that's used to rebase the PR code on to the target base branch."
3+
4+
runs:
5+
using: "composite"
6+
7+
steps:
8+
- name: fetch and rebase on ${{ github.base_ref }}
9+
shell: bash
10+
run: |
11+
git remote add upstream https://github.com/${{ github.repository }}
12+
git fetch upstream ${{ github.base_ref }}:refs/remotes/upstream/${{ github.base_ref }}
13+
export GIT_COMMITTER_EMAIL="lnd-ci@example.com"
14+
export GIT_COMMITTER_NAME="LND CI"
15+
git rebase upstream/${{ github.base_ref }}

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ Steps for reviewers to follow to test the change.
1515
- [ ] Commits follow the [Ideal Git Commit Structure](https://github.com/lightningnetwork/lnd/blob/master/docs/code_contribution_guidelines.md#IdealGitCommitStructure).
1616
- [ ] Any new logging statements use an appropriate subsystem and logging level.
1717
- [ ] Any new lncli commands have appropriate tags in the comments for the rpc in the proto file.
18-
- [ ] [There is a change description in the release notes](https://github.com/lightningnetwork/lnd/tree/master/docs/release-notes), or `[skip ci]` in the commit message for small changes.
18+
- [ ] [There is a change description in the release notes](https://github.com/lightningnetwork/lnd/tree/master/docs/release-notes), or `[skip ci]` in the commit message for small changes.
1919

20-
📝 Please see our [Contribution Guidelines](https://github.com/lightningnetwork/lnd/blob/master/docs/code_contribution_guidelines.md) for further guidance.
20+
📝 Please see our [Contribution Guidelines](https://github.com/lightningnetwork/lnd/blob/master/docs/code_contribution_guidelines.md) for further guidance.

.github/workflows/main.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ defaults:
2323
env:
2424
BITCOIN_VERSION: "27"
2525

26-
TRANCHES: 16
26+
TRANCHES: 8
2727

2828
# If you change this value, please change it in the following files as well:
2929
# /.travis.yml
3030
# /Dockerfile
3131
# /dev.Dockerfile
3232
# /make/builder.Dockerfile
3333
# /.github/workflows/release.yml
34-
GO_VERSION: 1.22.3
34+
GO_VERSION: 1.22.5
3535

3636
jobs:
3737
########################
@@ -103,12 +103,7 @@ jobs:
103103
go-version: '${{ env.GO_VERSION }}'
104104

105105
- name: fetch and rebase on ${{ github.base_ref }}
106-
run: |
107-
git remote add upstream https://github.com/${{ github.repository }}
108-
git fetch upstream
109-
export GIT_COMMITTER_EMAIL="lnd-ci@example.com"
110-
export GIT_COMMITTER_NAME="LND CI"
111-
git rebase upstream/${{ github.base_ref }}
106+
uses: ./.github/actions/rebase
112107

113108
- name: check commits
114109
run: scripts/check-each-commit.sh upstream/${{ github.base_ref }}
@@ -200,6 +195,12 @@ jobs:
200195
steps:
201196
- name: git checkout
202197
uses: actions/checkout@v3
198+
with:
199+
fetch-depth: 0
200+
201+
- name: fetch and rebase on ${{ github.base_ref }}
202+
if: github.event_name == 'pull_request'
203+
uses: ./.github/actions/rebase
203204

204205
- name: git checkout fuzzing seeds
205206
uses: actions/checkout@v3
@@ -266,6 +267,12 @@ jobs:
266267
steps:
267268
- name: git checkout
268269
uses: actions/checkout@v3
270+
with:
271+
fetch-depth: 0
272+
273+
- name: fetch and rebase on ${{ github.base_ref }}
274+
if: github.event_name == 'pull_request'
275+
uses: ./.github/actions/rebase
269276

270277
- name: setup go ${{ env.GO_VERSION }}
271278
uses: ./.github/actions/setup-go
@@ -311,6 +318,12 @@ jobs:
311318
steps:
312319
- name: git checkout
313320
uses: actions/checkout@v3
321+
with:
322+
fetch-depth: 0
323+
324+
- name: fetch and rebase on ${{ github.base_ref }}
325+
if: github.event_name == 'pull_request'
326+
uses: ./.github/actions/rebase
314327

315328
- name: setup go ${{ env.GO_VERSION }}
316329
uses: ./.github/actions/setup-go
@@ -349,6 +362,12 @@ jobs:
349362
steps:
350363
- name: git checkout
351364
uses: actions/checkout@v3
365+
with:
366+
fetch-depth: 0
367+
368+
- name: fetch and rebase on ${{ github.base_ref }}
369+
if: github.event_name == 'pull_request'
370+
uses: ./.github/actions/rebase
352371

353372
- name: setup go ${{ env.GO_VERSION }}
354373
uses: ./.github/actions/setup-go

.github/workflows/release.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
# /dev.Dockerfile
1717
# /make/builder.Dockerfile
1818
# /.github/workflows/main.yml
19-
GO_VERSION: 1.22.3
19+
GO_VERSION: 1.22.5
2020

2121
jobs:
2222
main:
@@ -40,11 +40,10 @@ jobs:
4040
run: SKIP_VERSION_CHECK=1 make release tag=${{ env.RELEASE_VERSION }}
4141

4242
- name: Create Release
43-
uses: lightninglabs/gh-actions/action-gh-release@2021.01.25.00
43+
uses: lightninglabs/gh-actions/action-gh-release@c7149b6a7818d1c39b36b69e727569897b6f2c5a
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4646
with:
47-
tag_name: ${{ env.RELEASE_VERSION }}
4847
name: lnd ${{ env.RELEASE_VERSION }}
4948
draft: true
5049
prerelease: false

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# If you change this value, please change it in the following files as well:
2-
# /.travis.yml
32
# /dev.Dockerfile
43
# /make/builder.Dockerfile
54
# /.github/workflows/main.yml
65
# /.github/workflows/release.yml
7-
FROM golang:1.22.3-alpine as builder
6+
FROM golang:1.22.5-alpine as builder
87

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ said, the current status of `lnd`'s BOLT compliance is:
5151
The daemon has been designed to be as developer friendly as possible in order
5252
to facilitate application development on top of `lnd`. Two primary RPC
5353
interfaces are exported: an HTTP REST API, and a [gRPC](https://grpc.io/)
54-
service. The exported API's are not yet stable, so be warned: they may change
54+
service. The exported APIs are not yet stable, so be warned: they may change
5555
drastically in the near future.
5656

5757
An automatically generated set of documentation for the RPC APIs can be found

aezeed/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ process. A lack of a birthday means that wallets don’t know how far
1111
back to look in the chain to ensure that they derive all the proper
1212
user addresses. Additionally, BIP39 use a very weak [KDF](https://en.wikipedia.org/wiki/Key_derivation_function). We use
1313
scrypt with modern parameters (n=32768, r=8, p=1). A set of benchmarks has
14-
been added, on my laptop I get about 100ms per attempt):
14+
been added, on my laptop I get about 100ms per attempt:
1515

1616
```shell
1717
$ go test -run=XXX -bench=.
@@ -48,13 +48,13 @@ the keys of the wallet.
4848

4949
The 2 byte timestamp is expressed in Bitcoin Days Genesis, meaning that
5050
the number of days since the timestamp in Bitcoin’s genesis block. This
51-
allow us to save space, and also avoid using a wasteful level of
51+
allows us to save space, and also avoid using a wasteful level of
5252
granularity. This can currently express time up until 2188.
5353

5454
Finally, the entropy is raw entropy that should be used to derive the
5555
wallet’s HD root.
5656

57-
## aezeed enciphering/deciperhing
57+
## aezeed enciphering/deciphering
5858

5959
Next, we’ll take the plaintext seed described above and encipher it to
6060
procure a final cipher text. We’ll then take this cipher text (the

autopilot/graph.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (d *dbNode) Addrs() []net.Addr {
8989
//
9090
// NOTE: Part of the autopilot.Node interface.
9191
func (d *dbNode) ForEachChannel(cb func(ChannelEdge) error) error {
92-
return d.db.ForEachNodeChannel(d.tx, d.node.PubKeyBytes,
92+
return d.db.ForEachNodeChannelTx(d.tx, d.node.PubKeyBytes,
9393
func(tx kvdb.RTx, ei *models.ChannelEdgeInfo, ep,
9494
_ *models.ChannelEdgePolicy) error {
9595

@@ -105,7 +105,9 @@ func (d *dbNode) ForEachChannel(cb func(ChannelEdge) error) error {
105105
return nil
106106
}
107107

108-
node, err := d.db.FetchLightningNode(tx, ep.ToNode)
108+
node, err := d.db.FetchLightningNodeTx(
109+
tx, ep.ToNode,
110+
)
109111
if err != nil {
110112
return err
111113
}
@@ -164,7 +166,7 @@ func (d *databaseChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
164166
return nil, err
165167
}
166168

167-
dbNode, err := d.db.FetchLightningNode(nil, vertex)
169+
dbNode, err := d.db.FetchLightningNode(vertex)
168170
switch {
169171
case err == channeldb.ErrGraphNodeNotFound:
170172
fallthrough

autopilot/manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
"github.com/btcsuite/btcd/btcec/v2"
88
"github.com/btcsuite/btcd/wire"
9+
"github.com/lightningnetwork/lnd/graph"
910
"github.com/lightningnetwork/lnd/lnwallet"
1011
"github.com/lightningnetwork/lnd/lnwire"
11-
"github.com/lightningnetwork/lnd/routing"
1212
)
1313

1414
// ManagerCfg houses a set of values and methods that is passed to the Manager
@@ -36,7 +36,7 @@ type ManagerCfg struct {
3636

3737
// SubscribeTopology is used to get a subscription for topology changes
3838
// on the network.
39-
SubscribeTopology func() (*routing.TopologyClient, error)
39+
SubscribeTopology func() (*graph.TopologyClient, error)
4040
}
4141

4242
// Manager is struct that manages an autopilot agent, making it possible to

brontide/noise.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ type Machine struct {
379379
// errors that cause partial writes.
380380
nextHeaderSend []byte
381381

382-
// nextHeaderBody holds a reference to the remaining body bytes to write
382+
// nextBodySend holds a reference to the remaining body bytes to write
383383
// out for a pending message. This allows us to tolerate timeout errors
384384
// that cause partial writes.
385385
nextBodySend []byte

0 commit comments

Comments
 (0)