forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Update with upstream up to v0.9.0-beta-rc1 #74
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matheusd
force-pushed
the
upstream-v0.9
branch
from
January 22, 2020 17:58
e0f34f8
to
292beff
Compare
Updated to match the final upstream v0.9-beta work. |
This commit sets our close addresss to the address specified by option upfront shutdown, if specified, and disconnects from peers that fail to provide their upfront shutdown address for coopertaive closes of channels that were opened with the option set.
This commit adds fields for upfront shutdown scripts set by the local and remote peer to the OpenChannel struct. These values are optional, so they are added with their own keys in the chanBucket in the DB.
This commit gets upfront shutdown scripts from openchannel and acceptchannel wire messages sent from our peer and sets upfront shutdown scripts in our open and accept channel messages when the remote peer supports option upfront shutdown and we have the feature enabled.
To allow mocking when testing other packages.
This commit adds a test context for invoice registry and additionally passed in a payload object to NotifyExitHopHtlc. This makes the test match the reality better where a payload is always provided.
This commit moves the update code into its own function as a preparation for extending the logic further for mpp. In order to make this change cleanly, structured result codes are introduced. This also prepares for a future htlc notifier rpc hook that reports htlc settle decisions to external applications. Furthermore the awkward use of errNoUpdate as a way to signal no update is removed.
Previously the cancel and add actions were combined in a single map. Nil values implictly signaled cancel actions. This wasn't very obvious. Furthermore this split prepares for processing the adds and cancels separately, which is more efficient if there are already two maps.
This commit also consolidates the existing code duplication in parsing payment hashes and description hashes into a single, combined method for parsing 32-byte values. A similar change is made for encoding 32-byte values. zpay32/invoice: consolidate 32-byte encoding logic
This commit modifies Lighting.AddInvoice and InvoicesRPC.AddHoldInvoice to include the node's supported feature bits on the invoice. For now this only includes the optional TLV Onion Payload bit.
This is preparation for the subsequent commit, allowing us to fix a race condition in the integration test assertions.
This commit adds an itest assertion to check that a coop closed channel's status is properly refelcted in list channels. We also fix a race condition that prevented the rpc from being externally consistent by marking the close sooner in the pipeline.
This commit removes an unnecessarely large 32 byte buffer in favor of a small 2 byte buffer and cleans up type conversion between uint16 and uint32 values.
…x HTLC pay size" This reverts commit c943d85.
…y size" This reverts commit 9b3385e.
In this commit, we add `msats` to the return value of `DecodePayReq` to ensure we always show full value information as we're moving to do generally for all RPC calls that deal with off-chain amounts.
This allows us to remove the custom error type originally implemented for this purpose.
Clarifies that last_hop is not the destination, but the penultimate node in the path, i.e. the last intermediary.
Before this commit, both writing and reading an encoded empty set of short channel IDs from the wire would fail. Prior to this commit, we treated decoding an empty set as a caller error, and failed to write out the zlib encoding of an empty set in a way that us and the other implementations were able to read. To fix this, rather than giving zlib an empty buffer to write out (which results in an encoding with the zlib header data and the rest), we just write a blank slice. When decoding, if we have an empty query body, then we'll return a `nil` slice. With the above changes, we'll now always write out an empty short channel ID set as: ``` 0001 (1 byte follows) || <encoding_type> ``` A new test has also been added to exercise this case for both known encoding types.
Modifies TestMissingFeatureDep and TestDestPaymentAddr to use the test ctx directly instead of generating a closure and using local state to modify restrictions.
This commit fixes deep copy of chaneldb.InvoiceHTLC, where previously the map holding the custom record set wasn't properly copied.
This commit removes channeldb.FetchAllInvoices and changes tests such that expectation sets are prepared in the test case instead of selected from the DB.
Similar to what was done for the regular RPC server, we add auth dial options for the wallet unlocker, as it also requires TLS now.
The wallet unlocker service also requires the TLS certificates to be added, but this was not set. This commit sets the options similar to what is done for the regular RPC server.
On both Android and iOS (when not using a simulator) the application procees doesn't have write permissions to the default lnd directory. This commit adds a note about using the app directory given by the used platform.
The default was increased for the main sendpayment RPC in commit d3fa976. This commit sets the same default for QueryRoutes, routerrpc.SendPayment and router.EstimateRouteFee. NOTE(decred) the relevant ported commit is f8b909f9a89955059da95ce34fabe3f1aaa26cd6.
Add a constructor for the creation of forwarding errors. A special constructor is added for the case where we have an unknown wire failure, and must set a nil failure message.
This commit adds a ClearTextError interface which is implemented by non-opaque errors that we know the underlying wire failure message for. This interface is implemented by ForwardingErrors, because we can fully decrypt the onion blob to obtain the underlying failure reason. This interface will also be implemented by errors which originate at our node in following commits, because we know the failure reason when we fail the htlc. The lnwire interface is un-embedded in the ForwardingError struct in favour of implementing this interface. This change is made to protect against accidental passing of a ForwardingError to the wire, where the embedded FailureMessage interface will present as wire failure but will not serialize properly.
This change introduces a LinkError implementation of the ClearTextError interface. This error is intended to represent failures which occur on our incoming and outgoing link when sending, receiving and forwarding htlcs. Paired with ForwardingError, which is represents failures that did not occur at our node, this error covers all non-opaque errors that the switch experiences.
Update the type check used for checking local payment failures to check on the ClearTextError interface rather than on the ForwardingError type. This change prepares for splitting payment errors up into Link and Forwarding errors.
Update the ChannelLink interface to specifically return the LinkError struct. This error implements the ClearTextError interface, so will be picked up as a routing realted error by the router. With LinkErrors implemented, the switch now returns a LinkError for all failures on our incoming/outgoing link and ForwardingError when the failure occurs down the line.
Remove the extramsg field in ForwardingError because it has been replaced with detailed link errors.
This shortcut does not work when the destination is a private node. We also don't have this shortcut for regular payments. This commit aligns the behavior between SendPayment and QueryRoutes.
In this commit, we change the release script slightly to return the latest tag if there're multiple tags at head. Otherwise the release script will fail if our final tag is at the same commit as the prior release candidate tag.
matheusd
force-pushed
the
upstream-v0.9
branch
from
February 25, 2020 12:31
292beff
to
f0455ec
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This brings all commits made upstream adjusted for the decred network up to the recently tagged v0.9.0-beta-rc1 version.