Skip to content

Commit

Permalink
Merge pull request #4980 from cfromknecht/v0.12.1-beta.rc1-branch-com…
Browse files Browse the repository at this point in the history
…mits

v0.12.1-beta.rc1
  • Loading branch information
cfromknecht authored Feb 4, 2021
2 parents d176d2d + 964f2e7 commit 79c8ecc
Show file tree
Hide file tree
Showing 51 changed files with 1,824 additions and 1,280 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: lightninglabs/gh-actions/setup-qemu-action@2021.01.25.00

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: lightninglabs/gh-actions/setup-buildx-action@2021.01.25.00

- name: Login to DockerHub
uses: docker/login-action@v1
uses: lightninglabs/gh-actions/login-action@2021.01.25.00
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_API_KEY }}
Expand All @@ -34,7 +34,7 @@ jobs:

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: lightninglabs/gh-actions/build-push-action@2021.01.25.00
with:
push: true
platforms: linux/amd64,linux/arm64
Expand Down
78 changes: 9 additions & 69 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ env:
# go needs absolute directories, using the $HOME variable doesn't work here.
GOCACHE: /home/runner/work/go/pkg/build
GOPATH: /home/runner/work/go
DOWNLOAD_CACHE: /home/runner/work/download_cache
BITCOIN_VERSION: 0.20.1

# If you change this value, please change it in the following files as well:
Expand All @@ -25,14 +24,14 @@ env:
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/release.yml
GO_VERSION: 1.15.6
GO_VERSION: 1.15.7

jobs:
########################
# RPC compilation check
# RPC and mobile compilation check
########################
rpc-check:
name: RPC compilation check
name: RPC and mobile compilation check
runs-on: ubuntu-latest
steps:
- name: git checkout
Expand All @@ -54,20 +53,14 @@ jobs:
with:
go-version: '~${{ env.GO_VERSION }}'

- name: download cache
uses: actions/cache@v1
with:
path: /home/runner/work/download_cache
key: lnd-${{ runner.os }}-download-${{ hashFiles('**/install_travis_proto.sh') }}
restore-keys: |
lnd-${{ runner.os }}-download-${{ hashFiles('**/install_travis_proto.sh') }}
lnd-${{ runner.os }}-download-
- name: install protoc and protobuf libraries
run: ./scripts/install_travis_proto.sh

- name: run check
run: make rpc-check

- name: build mobile RPC bindings
run: make mobile-rpc

- name: build mobile specific code
run: go build --tags="mobile" ./mobile

########################
# check commits
Expand Down Expand Up @@ -169,50 +162,6 @@ jobs:
- name: build release for all architectures
run: make release

########################
# mobile compilation
########################
mobile-compile:
name: mobile compilation
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2

- name: go cache
uses: actions/cache@v1
with:
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '~${{ env.GO_VERSION }}'

- name: download cache
uses: actions/cache@v1
with:
path: /home/runner/work/download_cache
key: lnd-${{ runner.os }}-download-${{ hashFiles('**/install_travis_proto.sh') }}
restore-keys: |
lnd-${{ runner.os }}-download-${{ hashFiles('**/install_travis_proto.sh') }}
lnd-${{ runner.os }}-download-
- name: install protoc and protobuf libraries
run: ./scripts/install_travis_proto.sh

- name: build mobile RPC bindings
run: make mobile-rpc

- name: build mobile specific code
run: go build --tags="mobile" ./mobile

########################
# sample configuration check
########################
Expand All @@ -239,15 +188,6 @@ jobs:
with:
go-version: '~${{ env.GO_VERSION }}'

- name: download cache
uses: actions/cache@v1
with:
path: /home/runner/work/download_cache
key: lnd-${{ runner.os }}-download-${{ hashFiles('**/install_travis_proto.sh') }}
restore-keys: |
lnd-${{ runner.os }}-download-${{ hashFiles('**/install_travis_proto.sh') }}
lnd-${{ runner.os }}-download-
- name: check all command line flags exist in sample-lnd.conf file
run: make sample-conf-check

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/main.yml
GO_VERSION: 1.15.6
GO_VERSION: 1.15.7

jobs:
main:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
run: SKIP_VERSION_CHECK=1 make release tag=${{ env.RELEASE_VERSION }}

- name: Create Release
uses: softprops/action-gh-release@v1
uses: lightninglabs/gh-actions/action-gh-release@2021.01.25.00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: go
cache:
directories:
- $DOWNLOAD_CACHE
- $GOCACHE
- $GOPATH/pkg/mod
- $GOPATH/src/github.com/btcsuite
Expand All @@ -22,12 +21,11 @@ go:
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
- "1.15.6"
- "1.15.7"

env:
global:
- GOCACHE=$HOME/.go-build
- DOWNLOAD_CACHE=$HOME/download_cache
- BITCOIN_VERSION=0.20.1

sudo: required
Expand All @@ -36,11 +34,6 @@ jobs:
include:
- stage: Sanity Check
name: Lint and compile
before_script:
# Install the RPC tools as a before step so Travis collapses the output
# after it's done.
- ./scripts/install_travis_proto.sh

script:
# Step 1: Make sure no diff is produced when compiling with the correct
# version.
Expand Down
19 changes: 7 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ BTCD_PKG := github.com/btcsuite/btcd
GOVERALLS_PKG := github.com/mattn/goveralls
LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
GOACC_PKG := github.com/ory/go-acc
FALAFEL_PKG := github.com/lightninglabs/falafel
GOIMPORTS_PKG := golang.org/x/tools/cmd/goimports
GOFUZZ_BUILD_PKG := github.com/dvyukov/go-fuzz/go-fuzz-build
GOFUZZ_PKG := github.com/dvyukov/go-fuzz/go-fuzz
Expand Down Expand Up @@ -37,7 +36,6 @@ BTCD_COMMIT := $(shell cat go.mod | \

LINT_COMMIT := v1.18.0
GOACC_COMMIT := ddc355013f90fea78d83d3a6c71f1d37ac07ecd5
FALAFEL_COMMIT := v0.7.1
GOFUZZ_COMMIT := 21309f307f61

DEPGET := cd /tmp && GO111MODULE=on go get -v
Expand All @@ -46,7 +44,7 @@ GOINSTALL := GO111MODULE=on go install -v
GOTEST := GO111MODULE=on go test

GOVERSION := $(shell go version | awk '{print $$3}')
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*" -not -name "*pb.go" -not -name "*pb.gw.go")

RM := rm -f
CP := cp
Expand Down Expand Up @@ -113,10 +111,6 @@ btcd:
@$(call print, "Installing btcd.")
$(DEPGET) $(BTCD_PKG)@$(BTCD_COMMIT)

falafel:
@$(call print, "Installing falafel.")
$(DEPGET) $(FALAFEL_PKG)@$(FALAFEL_COMMIT)

goimports:
@$(call print, "Installing goimports.")
$(DEPGET) $(GOIMPORTS_PKG)
Expand Down Expand Up @@ -245,7 +239,9 @@ fuzz-run: $(GOFUZZ_BIN)
# UTILITIES
# =========

fmt:
fmt: goimports
@$(call print, "Fixing imports.")
goimports -w $(GOFILES_NOVENDOR)
@$(call print, "Formatting source.")
gofmt -l -w -s $(GOFILES_NOVENDOR)

Expand All @@ -262,7 +258,7 @@ list:

rpc:
@$(call print, "Compiling protos.")
cd ./lnrpc; ./gen_protos.sh
cd ./lnrpc; ./gen_protos_docker.sh

rpc-format:
@$(call print, "Formatting protos.")
Expand All @@ -277,9 +273,9 @@ sample-conf-check:
@$(call print, "Making sure every flag has an example in the sample-lnd.conf file")
for flag in $$(GO_FLAGS_COMPLETION=1 go run -tags="$(RELEASE_TAGS)" $(PKG)/cmd/lnd -- | grep -v help | cut -c3-); do if ! grep -q $$flag sample-lnd.conf; then echo "Command line flag --$$flag not added to sample-lnd.conf"; exit 1; fi; done

mobile-rpc: falafel goimports
mobile-rpc:
@$(call print, "Creating mobile RPC from protos.")
cd ./mobile; ./gen_bindings.sh $(FALAFEL_COMMIT)
cd ./lnrpc; COMPILE_MOBILE=1 ./gen_protos_docker.sh

vendor:
@$(call print, "Re-creating vendor directory.")
Expand Down Expand Up @@ -316,7 +312,6 @@ clean:
unit \
unit-cover \
unit-race \
falafel \
goveralls \
travis-race \
travis-cover \
Expand Down
11 changes: 6 additions & 5 deletions breacharbiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lntest/channels"
"github.com/lightningnetwork/lnd/lntest/mock"
"github.com/lightningnetwork/lnd/lntest/wait"
"github.com/lightningnetwork/lnd/lnwallet"
Expand Down Expand Up @@ -1679,7 +1680,7 @@ func createTestArbiter(t *testing.T, contractBreaches chan *ContractBreachEvent,
})

aliceKeyPriv, _ := btcec.PrivKeyFromBytes(btcec.S256(),
alicesPrivKey)
channels.AlicesPrivKey)
signer := &mock.SingleSigner{Privkey: aliceKeyPriv}

// Assemble our test arbiter.
Expand Down Expand Up @@ -1714,9 +1715,9 @@ func createTestArbiter(t *testing.T, contractBreaches chan *ContractBreachEvent,
func createInitChannels(revocationWindow int) (*lnwallet.LightningChannel, *lnwallet.LightningChannel, func(), error) {

aliceKeyPriv, aliceKeyPub := btcec.PrivKeyFromBytes(btcec.S256(),
alicesPrivKey)
channels.AlicesPrivKey)
bobKeyPriv, bobKeyPub := btcec.PrivKeyFromBytes(btcec.S256(),
bobsPrivKey)
channels.BobsPrivKey)

channelCapacity, err := btcutil.NewAmount(10)
if err != nil {
Expand All @@ -1730,7 +1731,7 @@ func createInitChannels(revocationWindow int) (*lnwallet.LightningChannel, *lnwa
csvTimeoutBob := uint32(4)

prevOut := &wire.OutPoint{
Hash: chainhash.Hash(testHdSeed),
Hash: channels.TestHdSeed,
Index: 0,
}
fundingTxIn := wire.NewTxIn(prevOut, nil, nil)
Expand Down Expand Up @@ -1887,7 +1888,7 @@ func createInitChannels(revocationWindow int) (*lnwallet.LightningChannel, *lnwa
RemoteCommitment: aliceCommit,
Db: dbAlice,
Packager: channeldb.NewChannelPackager(shortChanID),
FundingTxn: testTx,
FundingTxn: channels.TestFundingTx,
}
bobChannelState := &channeldb.OpenChannel{
LocalChanCfg: bobCfg,
Expand Down
4 changes: 2 additions & 2 deletions build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const (
AppMinor uint = 12

// AppPatch defines the application patch for this binary.
AppPatch uint = 0
AppPatch uint = 1

// AppPreRelease MUST only contain characters from semanticAlphabet
// per the semantic versioning spec.
AppPreRelease = "beta"
AppPreRelease = "beta.rc1"
)

func init() {
Expand Down
Loading

0 comments on commit 79c8ecc

Please sign in to comment.