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

Port upstream PRs #36

Merged
merged 1,261 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1261 commits
Select commit Hold shift + click to select a range
030c682
rpcserver: wrap closure args to 80 chars
cfromknecht Jun 17, 2019
9f0b781
cmd/lncli/commands: add include_channels flag to getnodeinfo
cfromknecht Jun 17, 2019
4902781
server: properly set stopping atomic var upon shutdown
wpaulino Jun 19, 2019
174ef50
lncli: assign category to SendToRoute command
joostjager Jun 18, 2019
e0f5e27
lncli: add usage to querymc command
joostjager Jun 19, 2019
d89491c
lncli: add reset mission control command
joostjager Jun 19, 2019
d43b688
dcrlncli: Move file from lncli
matheusd Jul 5, 2019
3a50709
routing+watchtower/wtclient: prints stats once per minute
cfromknecht Jun 20, 2019
9fd0e49
watchtower/multi: fix logging in wtclient
cfromknecht Jun 20, 2019
9859724
lnrpc/rpc.proto: remove trailing spaces
halseth Jan 24, 2019
22386b3
discovery: set source of node announcement broadcast to belonging node
wpaulino Jun 19, 2019
90fc463
channeldb/migrations: skip migration for empty outgoing payments bucket
halseth Jun 17, 2019
f188772
lnrpc/watchtowerrpc: add protos for GetInfo
cfromknecht Jun 20, 2019
7886f34
lnrpc/watchtowerrpc: add WatchtowerBackend configs
cfromknecht Jun 20, 2019
4e5563f
lnrpc/watchtowerrpc/handler: implement Watchtower gRPC server
cfromknecht Jun 20, 2019
2e60142
watchtower: rename DefaultPeerPortStr -> DefaultListenAddr
cfromknecht Jun 20, 2019
4133e6e
watchtower: add externalip CLI configuration
cfromknecht Jun 20, 2019
0b254bf
watchtowerrpc/standalone: implement watchtowerrpc.WatchtowerBackend i…
cfromknecht Jun 20, 2019
521a1f1
watchtower: Fix lint warning
matheusd Jul 5, 2019
5a699f4
lnd+rpcserver: thread watchtower into subserver configs
cfromknecht Jun 20, 2019
05091ee
lnrpc/watchtowerrpc/driver: register watchtower rpc server on init
cfromknecht Jun 20, 2019
1d48c8c
lntest+make: build w/ watchtowerrpc tag, add grpc client to harness
cfromknecht Jun 20, 2019
273459e
keychain/derivation: add KeyFamilyTowerKey distinct from NodeID
cfromknecht Jun 20, 2019
f617898
lnwallet: Add last keyfamily constant
matheusd Jul 5, 2019
fc1a7ac
lnd: use distinct pubkey for watchtowers and server
cfromknecht Jun 20, 2019
913c6db
cmd/lncli/watchtower: add tower info command
cfromknecht Jun 20, 2019
5e77307
dcrlncli: Move watchtower files from lncli
matheusd Jul 5, 2019
750c239
release: update to include tower rpc build tag
Roasbeef Jun 21, 2019
9a5c11a
watchtower/wtclient: filter non-target towers from candidates
cfromknecht Jun 21, 2019
7f509b2
routerrpc: fix loop variable binding bug in querymc
joostjager Jun 26, 2019
6013ace
lnd: reject custom fee when force closing channel
2xic Jun 20, 2019
3c1603f
chainntnfs/multi: add interfaced ConfDetailsFromTxIndex
cfromknecht Jun 28, 2019
8426384
chainntnfs/interface: fix incorrect statuses for deserialization errors
cfromknecht Jun 28, 2019
75348bd
chainntnfs/multi: replace txid with ConfRequest in txindex matching
cfromknecht Jun 28, 2019
b83d2b9
chainntnfs/txnotifier: stricter confirmation matching via scripts
cfromknecht Jun 28, 2019
21ccbd0
chainntnfs/interface: stricter conf dispatch for txindex
cfromknecht Jun 28, 2019
ec06ea7
watchtower: fix linter errors
Roasbeef Jun 21, 2019
28e3f8c
discovery: remove retries from DNS based SampleNodeAddrs, allow down …
Roasbeef Jun 28, 2019
02b3302
server: don't re-use existing wait group for loops within initialPeer…
Roasbeef Jun 28, 2019
54d910e
server: extract backOffCeiling into bootstrapBackOffCeiling as constant
Roasbeef Jun 28, 2019
42f2e84
server: add an exponential back off to initialPeerBootstrap
Roasbeef Jun 28, 2019
68d24dd
chanrestore: return error instead of nil if failed derivation
Crypt-iQ Jun 30, 2019
7763ec8
itest: Improve force close cleanup reliability
matheusd Jul 5, 2019
d7bb383
rpcserver+router: log terminal sendPayment error
halseth Jun 21, 2019
8ca72b4
watchtower/wtdb: fix double hex encoding of chanid
cfromknecht Jul 1, 2019
49de365
sample-lnd.conf: add watchtower and wtclient sample confs
cfromknecht Jun 28, 2019
adea704
docs/watchtower.md: add watchtower guide
cfromknecht Jun 29, 2019
27021da
lnrpc/watchtowerrpc: prevent watchtowerrpc panic when tower not active
cfromknecht Jul 2, 2019
2aa46ee
routing: move call to PruneGraph outside of the collating loop
Crypt-iQ Jun 27, 2019
eabf25f
itest: Re-enable disabled tests
matheusd Jul 8, 2019
7bff67c
itest: Fix tests involving sweep of second-level txs
matheusd Jul 8, 2019
f602390
itest: Switch force close detection to WaitNoError
matheusd Jul 8, 2019
7f49996
lnd: fallback to localhost if failing getting hostname
halseth Jan 24, 2019
8013aa4
cmd/lncli/commands: fix updatechanpolicy lowest possible fee msg
cfromknecht Jul 2, 2019
9c293dd
trivial: typo fix (closes #3268)
ottosuess Jul 4, 2019
66ea4d1
routing+channeldb: add more failure reasons
joostjager Jun 4, 2019
cd9adf9
routing: add subscriber event constructors
joostjager Jun 4, 2019
75561e6
routing+routerrpc+channeldb: return route on invalid payment details
joostjager Jun 4, 2019
a000b90
routerrpc: accept route hints for SendPayment rpc
joostjager Jun 18, 2019
12753d5
multi: replace manual CAS with sync.Once in several more modules
federicobond Jun 6, 2019
8c675e1
channelnotifier: remove ChannelNotifier instance from log string
federicobond Jun 12, 2019
30dd256
lnrpc: Deprecate fee field in payment struct
carlaKC Jul 8, 2019
4357a94
rpcserver: ForwardingHistory end_time defaults to time.Now()
tyzbit Jul 8, 2019
6636675
Fill DestAddresses in unmined transactions
yaslama Jul 10, 2019
136853d
Add DestAddresses field in transactions returned by SubscribeTransact…
yaslama Jul 10, 2019
65f3629
rpc: make RPC permissions non static.
roeierez Jun 25, 2019
426ab37
lnrpc: make BumpFee doc start with RPC name
halseth Jul 10, 2019
361dadb
rpc: add channel reserve fields in RPC responses.
roeierez Jun 23, 2019
7f7ff5f
Update recovery.md
exfrog Jul 10, 2019
4c399c0
lnrpc+rpcserver: Adding last_update timestamp to RoutingPolicy
ccdle12 Jun 28, 2019
b2c5551
routing/test: allow arbitrary graph source nodes
joostjager Jan 31, 2019
c148b49
htlcswitch/test: stricter error check in TestSwitchSendPayment
joostjager May 6, 2019
5facc78
htlcswitch+routing+routerrpc: return error source as index
joostjager Jun 11, 2019
534fa59
htlcswitch+routing: make error decryption mockable
joostjager Jun 19, 2019
f1ff4da
htlcswitch: use distinct error for unreadable failures
joostjager Jun 19, 2019
280033e
lnwire+htlcswitch: only use references for failure messages
joostjager Jul 3, 2019
0299487
htlcswitch: do not consider unknown failures an error
joostjager Jun 19, 2019
4297702
MAKEFILE: Clarify what the testcase argument is
orbitalturtle Jul 11, 2019
c14d7cd
lntest/node: make ProfilePort part of node config
halseth Apr 15, 2019
c7639f2
lntest/harness: add method SaveProfilesPages
halseth Apr 15, 2019
6e9c8c3
lnd_test: add lndHarness to harnessTest, dump goroutines on Fatalf
halseth Apr 15, 2019
0679a47
lntest: add flag -goroutinedump
halseth Apr 15, 2019
2fd4c12
gitignore: add pprof files to gitignore
halseth Apr 15, 2019
9b3206d
make: add -goroutinedump, rm pprof*.log to itest
halseth Apr 15, 2019
394f143
invoicesrpc: fix route hint off-by-one-error
ottosuess Jul 12, 2019
5435535
docs/grpc: add C# docs
BrettCawley Jul 12, 2019
c61cb8c
lnd_test: fix channel event subscription test flake.
valentinewallace Feb 12, 2019
bc87495
routing+channeldb: findPath uses Vertex instead of LightningNode
Crypt-iQ Jun 19, 2019
c8288f9
routing: add index map to distanceHeap
Crypt-iQ Jun 19, 2019
df07eb9
peer: don't reply if peer's request `initial_graph_sync`
cfromknecht Jul 15, 2019
61d12e5
discovery/gossiper: remove unused SynchronizeNode method
cfromknecht Jul 15, 2019
16e32d1
routing/test: create mission control test context
joostjager Jun 3, 2019
50f808a
routing+routerrpc: isolate payment session source from mission control
joostjager Jun 18, 2019
987f9bf
routing: move generateBandwidthHints
joostjager Jun 24, 2019
fc177ff
routing: move second chance logic into mission control
joostjager Jun 26, 2019
1ed7c08
routing: report failures to mission control directly
joostjager Jun 26, 2019
bbf51b1
aezeed: publicly export the `word` field in `ErrUnknownMnenomicWord`
Roasbeef Jul 13, 2019
38221a7
lnd: log error if any throughout initialization
wpaulino Jul 17, 2019
c0904bd
lnrpc: add num_zombie_chans to NetworkInfo response
cfromknecht Jul 15, 2019
4bc8afe
channeldb/graph: add NumZombies method and tests
cfromknecht Jul 15, 2019
2d925f9
rpcserver: query and set num_zombie_chans in NetworkInfo resp
cfromknecht Jul 15, 2019
b6179d2
routing: create PathFindingConfig for global parameters
joostjager Jun 20, 2019
2326b57
lnrpc/routerrpc: create mission control interface
joostjager Jul 5, 2019
cb34f70
routing+routerrpc+lnrpc: add option to use mc in queryroutes
joostjager Jun 19, 2019
31054a5
lncli: add use_mc flag
joostjager Jun 26, 2019
c453335
fundingmanager+server: define MaxPendingChans. RejectPush in funding …
halseth Jul 11, 2019
0902d32
fundingmanager tests: run tests in parallel
halseth Jul 11, 2019
97d559b
lnwallet test: add TestCoinSelect
halseth Jul 11, 2019
e2a4af1
server+funding: remove unused remoteFundingAmt
halseth Jul 11, 2019
1fc142c
lnwallet+funding: rename Capacity and FundingAmt
halseth Jul 11, 2019
2a97337
lnwallet: make selectCoinsAndChange return selected coins
halseth Jul 11, 2019
06e353c
lnwallet: move coin selection before ChannelReservation
halseth Jul 11, 2019
a7a9ead
lnwallet/wallet: extract contribution setup into initOurContribution
halseth Jul 11, 2019
d100eea
lnwallet/wallet: add coinSelectSubtractFees
halseth Jul 11, 2019
21381a4
lnwallet/wallet: define SubtractFees for InitFundingReserveMsg
halseth Jul 11, 2019
3e647ae
fundingmanager test: extract publishing logic into fundChannel, set f…
halseth Jul 11, 2019
322e1cc
mock: make it possible to set list of returned utxos
halseth Jul 11, 2019
58a918f
fundingmanager+server: define subtractFees
halseth Jul 11, 2019
e103b97
fundingmanager test: add TestFundingManagerFundAll
halseth Jul 11, 2019
180f366
autopilot: use subtractFees when funding channel
halseth Jul 11, 2019
e643f4f
autopilot/agent_test: wait for expected num chans and balance
halseth Jul 11, 2019
f28e670
autopilot/agent_test: add more agent channel allocation testcases
halseth Jul 11, 2019
1df5f20
graph: implement index for disabled channels.
roeierez Jun 12, 2019
81bc653
router: Optimize pruneZombieChannels.
roeierez Jul 10, 2019
2455902
router: only prune disabled channels when AssumeChannelValid=true.
roeierez Jul 16, 2019
b31697a
lnd_test: remove TLSAutoRegeneration test
orbitalturtle Jun 23, 2019
d946551
Lnd + server_test: Add unit test for TLS cert autoregeneration
orbitalturtle Jun 23, 2019
16a79c6
lnd: remove global var access from genCertPair
halseth Jul 22, 2019
c7889df
htlcswitch: pipeline settles to switch
Crypt-iQ May 30, 2019
d8f8322
keychain: fix comment about derivation path
guggero Jul 22, 2019
a482875
cmd: Add retry for password capture in create wallet
carlaKC Jul 15, 2019
f413807
routing: adding the BlockPadding value to sendpayment
Crypt-iQ Jul 24, 2019
cbf8bdf
itest+routing: updating tests to account for BlockPadding
Crypt-iQ Jul 24, 2019
bf7f4f1
config: default autopilot min confs to 1
wpaulino Jul 24, 2019
58502d0
server: use custom wtclient policy instead of default
wpaulino Jul 11, 2019
a989491
itest: Improve flakiness of hodlSecondLevel test
matheusd Aug 7, 2019
fc3953f
breacharbiter: Fill ValueIn of justice transactions
matheusd Aug 7, 2019
4726216
build: Update bbolt to 1.3.3
matheusd Aug 15, 2019
8daad37
channeldb + wtdb: specify freelist bbolt options by default
Crypt-iQ Jul 8, 2019
941ecc4
lnrpc: remove lncli subscribechannelevents and add regenarated rpc.pb.go
openoms Jul 30, 2019
cf666f9
watchtower/wtclient: remove stale sessionQueue TODO
wpaulino Jun 8, 2019
f98c30f
wtclient: refactor client creation after database calls
wpaulino Jun 8, 2019
dc03909
watchtower/wtclient: export clientStats
wpaulino Jun 8, 2019
531dc67
watchtower: extend client db to filter sessions for a specific tower
wpaulino Jun 8, 2019
446eb69
watchtower: extend client databse with CRUD operations for towers
wpaulino Jun 8, 2019
8a6f0b1
watchtower/wtclient: extend TowerCandidateIterator to update candidates
wpaulino Jun 8, 2019
857ee2a
watchtower/wtclient: extend TowerClient with CRUD operations for towers
wpaulino Jun 8, 2019
516a130
multi: add watchtower client RPC subserver
wpaulino Jun 8, 2019
c443214
cmd/lncli: add watchtower client commands
wpaulino Jun 8, 2019
3b24583
watchtower: load persisted towers upon TowerClient creation
wpaulino Jul 4, 2019
db62922
multi: only allow specifying towers to TowerClient through RPC
wpaulino Jul 4, 2019
ab25621
watchtower/wtclient: only reset iterator once we've exhausted all can…
wpaulino Jul 4, 2019
5403816
htlcswitch+lnd: make max cltv expiry configurable
wpaulino Jul 27, 2019
12065ed
htlcswitch: lower max outgoing cltv expiry to one week worth of blocks
wpaulino Jul 27, 2019
5b9a549
discovery/syncer: add flag to prevent historical gossip filter dump
cfromknecht Jul 31, 2019
133448d
discovery/sync_manager: init all syncers with IgnoreHistoricalFilters
cfromknecht Jul 31, 2019
c7fee29
discovery/gossiper: thread IgnoreHistoricalFilters to sync manager
cfromknecht Jul 31, 2019
3bb7d52
config+server: add ignore-historical-filters CLI option
cfromknecht Jul 31, 2019
cf4117b
routing: move failure interpretation into mission control
joostjager Jun 26, 2019
4c82b28
routing: move unreadable failure handling into mission control
joostjager Jun 26, 2019
5d2a64b
routing: provide payment id to mission control
joostjager Jun 26, 2019
feca660
routing: extract timestamp from applying payment result
joostjager Jul 2, 2019
96c0f73
routing: define payment result
joostjager Jun 26, 2019
71ae020
lnwire: create failure message encode/decode functions
joostjager Jul 2, 2019
a892254
channeldb: export route serialization
joostjager Jun 14, 2019
6b6c34c
routerrpc: embed routing config
joostjager Jul 13, 2019
07599b2
routing: persist mission control data
joostjager Jun 26, 2019
65cba1f
log: correct NTFR -> ntfrLog mapping
halseth Aug 5, 2019
1c2184f
peernotifier: Add peer notifier package for peer online/offline events
carlaKC Jul 29, 2019
d6650c5
rpc: add unary+streaming interceptors to log all errors
Roasbeef Aug 7, 2019
3e569c3
tlv/varint: add modified bitcoin varint
cfromknecht Aug 7, 2019
288b4c0
tlv/varint_test: add tests vectors for custom Read/WriteVarInt
cfromknecht Aug 7, 2019
d7da201
tlv/primitive: add primitive encodings
cfromknecht Aug 7, 2019
d57f904
tlv/record: adds various tlv record constructors
cfromknecht Aug 7, 2019
d42e407
tlv/stream: adds tlv stream encoding/decoding
cfromknecht Aug 7, 2019
ba18b57
tlv: zero alloc encoding for extended types
cfromknecht Aug 7, 2019
b7b1835
tlv/bench_test: add basic benchmark
cfromknecht Aug 7, 2019
b7d5c47
tlv/truncated: add truncated integer encodings
cfromknecht Aug 7, 2019
4ef079c
tlv/tlv_test: add BOLT1 test vectors
cfromknecht Aug 7, 2019
ce155d2
REST: increase max msg size for REST proxy
Roasbeef Aug 7, 2019
f66e8cf
multi: fix linter errors
halseth Jul 24, 2019
9756d64
tlv/truncated_test: add tests for SizeTuintXX methods
cfromknecht Aug 8, 2019
4f530d3
tlv/truncated: fix decoding bug in DTUint16 and DTUint32
cfromknecht Aug 8, 2019
ed6020f
discovery: allow the SyncManager to report whether the graph is synced
wpaulino Jul 27, 2019
c1a8532
discovery: handle graph synced status after stalled initial historica…
wpaulino Aug 1, 2019
5cf1055
rpc: expose graph synced status within GetInfo
wpaulino Jul 29, 2019
059887e
htlcswitch/test: extract failure code assertion to function
joostjager Jul 4, 2019
e5b031f
multi: rename FailUnknownPaymentHash to FailIncorrectDetails
joostjager Jun 12, 2019
d365f12
htlcswitch: return final_incorrect_htlc_amount on onion payload mismatch
joostjager Jun 12, 2019
35876c1
htlcswitch: report incoming htlc time lock with FinalIncorrectCltvExpiry
joostjager Jun 25, 2019
a2c5d6a
htlcswitch+invoices: always return incorrect_or_unknown_payment_details
joostjager Jun 11, 2019
796cdac
invoices: remove redundant state field from invoice event
joostjager Aug 9, 2019
e5a3911
invoices: reuse client.notify function
joostjager Aug 9, 2019
70ee0b0
invoices: create error for invoice registry shutting down
joostjager Aug 13, 2019
721fc41
invoices: fix synchronization issue with single invoice subscribers
joostjager Aug 9, 2019
43d4f7f
routing/test: remove unused methods from mock
joostjager Aug 5, 2019
94b293a
lnrpc/routerrpc: fix line wrap
joostjager Aug 5, 2019
2094675
routing: extended DirectedNodePair functionality
joostjager Aug 5, 2019
c889883
routing/route: add vertex constructor from bytes
joostjager Aug 7, 2019
410006e
lnrpc/routerrpc: use vertex constructor
joostjager Aug 7, 2019
fd67f1c
routing: convert to node pair based
joostjager Jul 29, 2019
59199ea
tlv/primitive_test: add basic encode/decode tests for primitives
cfromknecht Aug 8, 2019
1bb74c1
tlv/primitive: use constructor for encoding/decoding type err
cfromknecht Aug 8, 2019
08d949e
cmd/lncli: properly set synced_to_graph for getinfo command
wpaulino Aug 14, 2019
43c2043
discovery: check non-nil syncer upon historical sync tick
wpaulino Aug 14, 2019
7b57e58
multi: remove debug invoices
joostjager Aug 14, 2019
eaaa95a
routing: convert to nillable failure reason
joostjager Aug 5, 2019
c65dfa3
routing: isolate failure interpretation from mission control
joostjager Aug 5, 2019
0f3c126
routing/test: do not test local channel mission control
joostjager Jun 18, 2019
9ef613d
routing: penalize all node pairs for unknown outcomes
joostjager Aug 5, 2019
7158ae6
htlcswitch: always assume an onion error for malformed htlc failures
joostjager Aug 16, 2019
1f96c1a
routing: query bandwidth hints before each payment attempt
joostjager Aug 17, 2019
f511c0b
routing: stricter payment result interpretation
joostjager Jun 25, 2019
48d2d06
discovery: prevent broadcast of anns received during initial graph sync
wpaulino Jul 30, 2019
a611ced
tlv: fix panic with large length
Crypt-iQ Aug 16, 2019
804f561
tlv/stream: create MaxRecordSize, remove lnwire import, add test
cfromknecht Aug 21, 2019
24116fc
pilot+discovery: remove info spews
cfromknecht Aug 15, 2019
1bb0fa3
utxonursery: demote building nursery report log to debug
cfromknecht Aug 15, 2019
ff2d83c
build: Use lightning-onion w/ variable EOB
matheusd Aug 29, 2019
9b922c3
tlv: add new Type() and Encode() methods to Record
Roasbeef Jul 31, 2019
2aba65d
tlv: display the unknown primitive type in MakePrimitiveRecord error …
Roasbeef Jul 31, 2019
2486b50
routing/route+tlv: add new TLV-EOB awareness to Hop+Route
Roasbeef Jul 31, 2019
88c9c92
routing: extend path finding to be TLV-EOB aware, allow dest TLV records
Roasbeef Jul 31, 2019
eac00ac
lnrpc+lnrpc/routerrpc: add a new TLV record field to the Hop proto
Roasbeef Jul 31, 2019
93f88f0
channeldb: update route.Hop serialization to include new EOB related …
Roasbeef Jul 31, 2019
b649d1d
multi: add TLV awareness to htlcswitch, pass extra EOB to the invoice…
Roasbeef Jul 31, 2019
4518005
lnwire: add new TLV onion feature bits
Roasbeef Jul 31, 2019
a587aa1
server: set new optional global TLV feature bit by default
Roasbeef Jul 31, 2019
c30a0d4
config: add new legacy protocol build tag protected sub-config for le…
Roasbeef Aug 6, 2019
7f75f1e
lntest/itest: force dave to use the legacy onion payload in multi-hop…
Roasbeef Aug 6, 2019
879af0b
channeldb: properly compare payment attempts in serialization test
Roasbeef Aug 23, 2019
eb75695
routing/test: remove unused parameter in mission control test
joostjager Aug 14, 2019
7405358
routing: process successes in mission control
joostjager Jul 29, 2019
2766d81
lnrpc/routerrpc: complete JSON naming for mc responses
Roasbeef Aug 23, 2019
9f1d9ac
lnd: close the wallet unlock grpc server
champo May 8, 2019
fd9f7c3
htlcswitch+config+server: Adds a rejecthtlc flag that disables forwarded
ccdle12 Nov 19, 2018
468ace1
chainntnfs: refactor common registration code within RegisterConfirma…
wpaulino Aug 17, 2019
e2cfb5a
chainntnfs: refactor common registration code within RegisterSpendNtfn
wpaulino Aug 17, 2019
6a63d05
chainntnfs: validate conf/spend ntfn registration parameters
wpaulino Aug 17, 2019
73357aa
chainntnfs: acquire TxNotifier lock after closing quit chan
wpaulino Aug 17, 2019
70bb32c
lnwallet: remove irrelevant fields in Utxo struct
wpaulino Aug 19, 2019
426293f
lnwallet/btcwallet: remove internal utxoCache
wpaulino Aug 19, 2019
1549c6d
sweep: remove unnecessary use of FetchInputInfo within CraftSweepAllTx
wpaulino Aug 19, 2019
22acb26
lnwallet: modify FetchInputInfo to return additional information for …
wpaulino Aug 19, 2019
98b5b2e
lnrpc/walletrpc: use current height as height hint for cpfp
wpaulino Aug 22, 2019
e70b61f
lnwire/features: add SerializeSize32 for base32 encodings
cfromknecht Aug 26, 2019
83da844
lnwire/features: add EncodeBase32 and DecodeBase32 w/ generic helpers
cfromknecht Aug 26, 2019
c8e2aa1
zpay32: add BOLT 11 feature bits and test vectors
cfromknecht Aug 26, 2019
0fd4c40
rpcserver: marshal db edges by increasing pubkey
cfromknecht Aug 28, 2019
8cdc900
rpcserver: correctly compute edge-level lastUpdate
cfromknecht Aug 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ _testmain.go
/dcrlncli-itest

# Integration test log files
output*.log
/.backendlogs
lntest/itest/output*.log
lntest/itest/pprof*.log
lntest/itest/.backendlogs
lntest/itest/.minerlogs

cmd/cmd
*.key
Expand Down
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
issues:
exclude-rules:
# Ignore govet.lostcancel in integration test files. The
# integration tests make substantial use of context.WithTimeout()
# without corresponding cancel() calls, which trigger this. So
# disable these warnings for now until this is fixed upstream
# (otherwise merging upstream itest changes will become
# significantly harder)
- path: lnd.*_test\.go
text: lostcancel
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ script:
- 'if [ "$RACE" = true ]; then make travis-race ; fi'

# Run integration tests.
- 'if [ "$ITEST" = true ]; then make itest; fi'
- 'if [ "$ITEST" = true ]; then make travis-itest; fi'

# Run unit tests and generate coverage report.
- 'if [ "$COVER" = true ]; then make travis-cover; fi'

after_script:
- LOG_FILES=./lntest/itest/*.log
- echo "Uploading to termbin.com..."
- find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
- find $LOG_FILES | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
- echo "Uploading to file.io..."
- tar -zcvO *.log | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'
- tar -zcvO $LOG_FILES | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'
3,435 changes: 3,435 additions & 0 deletions 000.txt

Large diffs are not rendered by default.

52 changes: 23 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ ESCPKG := github.com\/decred\/dcrlnd
DCRD_PKG := github.com/decred/dcrd
GOVERALLS_PKG := github.com/mattn/goveralls
LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
GOACC_PKG := github.com/ory/go-acc

GO_BIN := ${GOPATH}/bin
DCRD_BIN := $(GO_BIN)/dcrd
GOVERALLS_BIN := $(GO_BIN)/goveralls
LINT_BIN := $(GO_BIN)/golangci-lint
GOACC_BIN := $(GO_BIN)/go-acc

DCRD_DIR :=${GOPATH}/src/$(DCRD_PKG)

Expand All @@ -27,6 +29,8 @@ DCRD_COMMIT := $(shell cat go.mod | \
awk -F " " '{ print $$2 }' | \
awk -F "/" '{ print $$1 }')

GOACC_COMMIT := ddc355013f90fea78d83d3a6c71f1d37ac07ecd5

GOBUILD := GO111MODULE=on go build -v
GOINSTALL := GO111MODULE=on go install -v
GOTEST := GO111MODULE=on go test -v
Expand All @@ -44,23 +48,6 @@ include make/testing_flags.mk

DEV_TAGS := $(if ${tags},$(DEV_TAGS) ${tags},$(DEV_TAGS))

COVER = for dir in $(GOLISTCOVER); do \
$(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" \
-covermode=count \
-coverprofile=$$dir/profile.tmp $$dir; \
\
if [ $$? != 0 ] ; \
then \
exit 1; \
fi ; \
\
if [ -f $$dir/profile.tmp ]; then \
cat $$dir/profile.tmp | \
tail -n +2 >> profile.cov; \
$(RM) $$dir/profile.tmp; \
fi \
done

LINT = $(LINT_BIN) \
run \
--build-tags rpctest \
Expand Down Expand Up @@ -94,6 +81,11 @@ $(LINT_BIN):
@$(call print, "Fetching golangci-lint")
GO111MODULE=on go get -u $(LINT_PKG)

$(GOACC_BIN):
@$(call print, "Fetching go-acc")
go get -u -v $(GOACC_PKG)@$(GOACC_COMMIT)
$(GOINSTALL) $(GOACC_PKG)

dcrd:
@$(call print, "Installing dcrd $(DCRD_COMMIT).")
GO111MODULE=on go get -v github.com/decred/dcrd/@$(DCRD_COMMIT)
Expand All @@ -104,17 +96,17 @@ dcrd:

build:
@$(call print, "Building debug dcrlnd and dcrlncli.")
$(GOBUILD) -tags="$(DEV_TAGS)" -o dcrlnd-debug $(LDFLAGS) $(PKG)
$(GOBUILD) -tags="$(DEV_TAGS)" -o dcrlnd-debug $(LDFLAGS) $(PKG)/cmd/dcrlnd
$(GOBUILD) -tags="$(DEV_TAGS)" -o dcrlncli-debug $(LDFLAGS) $(PKG)/cmd/dcrlncli

build-itest:
@$(call print, "Building itest dcrlnd and dcrlncli.")
$(GOBUILD) -tags="$(ITEST_TAGS)" -o dcrlnd-itest $(LDFLAGS) $(PKG)
$(GOBUILD) -tags="$(ITEST_TAGS)" -o dcrlnd-itest $(LDFLAGS) $(PKG)/cmd/dcrlnd
$(GOBUILD) -tags="$(ITEST_TAGS)" -o dcrlncli-itest $(LDFLAGS) $(PKG)/cmd/dcrlncli

install:
@$(call print, "Installing dcrlnd and dcrlncli.")
$(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)
$(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)/cmd/dcrlnd
$(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)/cmd/dcrlncli

scratch: build
Expand All @@ -127,7 +119,7 @@ scratch: build
check: unit itest

itest-only:
@$(call print, "Running integration tests.")
@$(call print, "Running integration tests with ${backend} backend.")
$(ITEST)

itest: dcrd build-itest itest-only
Expand All @@ -138,35 +130,36 @@ unit-only:

unit: dcrd unit-only

unit-cover:
unit-cover: $(GOACC_BIN)
@$(call print, "Running unit coverage tests.")
echo "mode: count" > profile.cov
$(COVER)
$(GOACC_BIN) $(COVER_PKG) -- -test.tags="$(DEV_TAGS) $(LOG_TAGS)"


unit-race:
@$(call print, "Running unit race tests.")
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE)

goveralls: $(GOVERALLS_BIN)
@$(call print, "Sending coverage report.")
$(GOVERALLS_BIN) -coverprofile=profile.cov -service=travis-ci
$(GOVERALLS_BIN) -coverprofile=coverage.txt -service=travis-ci

travis-race: dcrd unit-race

travis-cover: dcrd unit-cover goveralls

travis-itest: itest

# =============
# FLAKE HUNTING
# =============

flakehunter: build
@$(call print, "Flake hunting integration tests.")
flakehunter: build-itest
@$(call print, "Flake hunting ${backend} integration tests.")
while [ $$? -eq 0 ]; do $(ITEST); done

flake-unit:
@$(call print, "Flake hunting unit tests.")
GOTRACEBACK=all $(UNIT) -count=1
while [ $$? -eq 0 ]; do /bin/sh -c "GOTRACEBACK=all $(UNIT) -count=1"; done
while [ $$? -eq 0 ]; do GOTRACEBACK=all $(UNIT) -count=1; done

# =========
# UTILITIES
Expand Down Expand Up @@ -212,6 +205,7 @@ clean:
goveralls \
travis-race \
travis-cover \
travis-itest \
flakehunter \
flake-unit \
fmt \
Expand Down
32 changes: 16 additions & 16 deletions aezeed/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# aezeed

[In this PR](https://github.com/lightningnetwork/lnd/pull/773) we add a new package implementing the aezeed cipher
seed scheme (based on [aez](http://web.cs.ucdavis.edu/~rogaway/aez/) ).
[In this PR](https://github.com/lightningnetwork/lnd/pull/773) we added a new package implementing the aezeed cipher
seed scheme (based on [aez](http://web.cs.ucdavis.edu/~rogaway/aez/)).

This is a new scheme developed that aims to overcome the
two major short comings of BIP39: a lack of a version, and a lack of a
wallet birthday. A lack a version means that wallets may not
This new scheme aims to address
two major features lacking in [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki): versioning, and a
wallet birthday. The lack a version means that wallets may not
necessarily know how to re-derive addresses during the recovery
process. A lack of a birthday means that wallets don’t know how far
back to look in the chain to ensure that they derive all the proper
user addresses. Additionally, BIP39 use a very weak KDF. We use
user addresses. Additionally, BIP39 use a very weak [KDF](https://en.wikipedia.org/wiki/Key_derivation_function). We use
scrypt with modern parameters (n=32768, r=8, p=1). A set of benchmarks has
been added, on my laptop I get about 100ms per attempt):

Expand All @@ -25,8 +25,8 @@ PASS
ok github.com/lightningnetwork/lnd/aezeed 4.168s
```

Aside from addressing the shortcomings of BIP 39 a cipher seed
can: be upgraded, and have it's password changed,
Aside from addressing the shortcomings of BIP 39, an aezeed cipher seed
can both be upgraded, and have its password changed.

Sample seed:

Expand All @@ -49,23 +49,23 @@ the keys of the wallet.
The 2 byte timestamp is expressed in Decred Days Genesis, meaning that
the number of days since the timestamp in Decred’s genesis block. This
allow us to save space, and also avoid using a wasteful level of
granularity. With the currently, this can express time up until 2188.
granularity. This can currently express time up until 2188.

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

## aezeed enciphering/deciperhing

Next, we’ll take the plaintext seed described above and encipher it to
procure a final cipher text. We’ll then take this cipher text (the
CipherSeed) and encode that using a 24-word mnemonic. The enciphering
process takes a user defined passphrase. If no passphrase is provided,
_CipherSeed_) and encode that using a 24-word mnemonic. The enciphering
process takes a user-defined passphrase. If no passphrase is provided,
then the string “aezeed” will be used.

To encipher a plaintext seed (19 bytes) to arrive at an enciphered
cipher seed (33 bytes), we apply the following operations:

* First we take the external version an append it to our buffer. The
* First we take the external version and append it to our buffer. The
external version describes how we encipher. For the first version
(version 0), we’ll use scrypt(n=32768, r=8, p=1) and aezeed.
* Next, we’ll use scrypt (with the version 9 params) to generate a
Expand All @@ -79,15 +79,15 @@ has what’s essentially a configurable MAC size. In our scheme we’ll use
a value of 8, which acts as a 64-bit checksum. We’ll encrypt with our
generated seed, and use an AD of (version || salt).
* Finally, we’ll encode this 33-byte cipher text using the default
world list of BIP 39 to produce 24 english words.
word list of BIP 39 to produce 24 English words.

## Properties of the aezeed cipher seed

The aezeed cipher seed scheme has a few cool properties, notably:

* The mnemonic itself is a cipher text, meaning leaving it in
plaintext is advisable if the user also set a passphrase. This is in
contrast to BIP 39 where the mnemonic alone (without a passrphase) may
plaintext is advisable if the user also sets a passphrase. This is in
contrast to BIP 39 where the mnemonic alone (without a passphrase) may
be sufficient to steal funds.
* A cipherseed can be modified to change the passphrase. This
means that if the users wants a stronger passphrase, they can decipher
Expand Down
7 changes: 5 additions & 2 deletions aezeed/cipherseed.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,13 @@ func (m *Mnemonic) Decipher(pass []byte) ([DecipheredCipherSeedSize]byte, error)
// Before we attempt to map the mnemonic back to the original
// ciphertext, we'll ensure that all the word are actually a part of
// the current default word list.
for _, word := range m {
for i, word := range m {
if !strings.Contains(englishWordList, word) {
emptySeed := [DecipheredCipherSeedSize]byte{}
return emptySeed, ErrUnknownMnenomicWord{word}
return emptySeed, ErrUnknownMnenomicWord{
Word: word,
Index: uint8(i),
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions aezeed/cipherseed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,12 @@ func TestDecipherUnknownMnenomicWord(t *testing.T) {
t.Fatalf("expected ErrUnknownMnenomicWord instead got %T", err)
}

if wordErr.word != "kek" {
t.Fatalf("word mismatch: expected %v, got %v", "kek", wordErr.word)
if wordErr.Word != "kek" {
t.Fatalf("word mismatch: expected %v, got %v", "kek", wordErr.Word)
}
if int32(wordErr.Index) != randIndex {
t.Fatalf("wrong index detected: expected %v, got %v",
randIndex, wordErr.Index)
}
}

Expand Down
10 changes: 8 additions & 2 deletions aezeed/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ var (
// ErrUnknownMnenomicWord is returned when attempting to decipher and
// enciphered mnemonic, but a word encountered isn't a member of our word list.
type ErrUnknownMnenomicWord struct {
word string
// Word is the unknown word in the mnemonic phrase.
Word string

// Index is the index (starting from zero) within the slice of strings
// that makes up the mnemonic that points to the incorrect word.
Index uint8
}

// Error returns a human readable string describing the error.
func (e ErrUnknownMnenomicWord) Error() string {
return fmt.Sprintf("word %v isn't a part of default word list", e.word)
return fmt.Sprintf("word %v isn't a part of default word list "+
"(index=%v)", e.Word, e.Index)
}
Loading