-
Notifications
You must be signed in to change notification settings - Fork 363
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
Run with mutagen on travis. #453
Commits on Jan 25, 2020
-
Configuration menu - View commit details
-
Copy full SHA for bbeadbc - Browse repository at this point
Copy the full SHA bbeadbcView commit details -
Flatten OnionHopData struct with the Realm0 struct.
Previously OnionHopData contained a OnionRealm0HopData field however instead of bumping the realm number, it has been replaced with a length, used to indicte the length of a TLV-formatted object. Because a TLV-formatted hop data can contain the same information as a realm-0 hop data, we flatten the field and simply keep track of what format it was in.
Configuration menu - View commit details
-
Copy full SHA for b3dd229 - Browse repository at this point
Copy the full SHA b3dd229View commit details -
Pull hmac out of OnionHopData.
Its a bit awkward to have an hmac field covering the struct that its in, and there is little difference in removing it, so just pull it out and use a [u8; 32] where we care about the hmac.
Configuration menu - View commit details
-
Copy full SHA for 0b40b0c - Browse repository at this point
Copy the full SHA 0b40b0cView commit details -
Move BogusHopData generation into test instead of OnionHopData.
This, as it should be, restricts OnionHopData to only being able to represent valid states, while still allowing for tests to generate bogus hop data fields to test deserialization.
Configuration menu - View commit details
-
Copy full SHA for 32c245b - Browse repository at this point
Copy the full SHA 32c245bView commit details -
Add a ChaChaReader adapter to read an encrypted stream & use it
This prepares for variable-length per-hop-data by wrapping the full hop_data field in a decrypting stream, with a few minor optimizations and redundant allocations to boot.
Configuration menu - View commit details
-
Copy full SHA for 9552082 - Browse repository at this point
Copy the full SHA 9552082View commit details -
Add macros for building TLV (de)serializers.
There's quite a bit of machinery included here, but it neatly avoids any dynamic allocation during TLV deserialization, and the calling side looks nice and simple. There's a few new state-tracking read/write streams, but they should be pretty cheap (just a few increments/decrements per read/write. The macro-generated code is pretty nice, though has some redundant if statements (I haven't checked if they get optimized out yet, but I can't imagine they don't).
Configuration menu - View commit details
-
Copy full SHA for 12c7eba - Browse repository at this point
Copy the full SHA 12c7ebaView commit details -
Configuration menu - View commit details
-
Copy full SHA for e7ce124 - Browse repository at this point
Copy the full SHA e7ce124View commit details -
Use RouteHop's new node_features to send TLV-encoded onion hops
This implements the new TLV variable-length encoding for onion hop data, opting to send it if the RouteHop's node_features indicates support. It also uses the new process_inline method in ChaCha20 to optimize a few things (though it grows a new TODO for a probably-important optimization).
Configuration menu - View commit details
-
Copy full SHA for b341d68 - Browse repository at this point
Copy the full SHA b341d68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cde6f4 - Browse repository at this point
Copy the full SHA 4cde6f4View commit details -
Allow node_announcement timestamps of 0 in accordance with BOLT 7
Unlike channel_update messages, node_announcement messages have no requirement that the timestamp is greater than 0.
Configuration menu - View commit details
-
Copy full SHA for 6883f9d - Browse repository at this point
Copy the full SHA 6883f9dView commit details -
Add ability to broadcast our own node_announcement.
This is a somewhat-obvious oversight in the capabilities of rust-lightning, though not a particularly interesting one until we start relying on node_features (eg for variable-length-onions and Base AMP). Sadly its not fully automated as we don't really want to store the list of available addresses from the user. However, with a simple call to ChannelManager::broadcast_node_announcement and a sensible peer_handler, the announcement is made.
Configuration menu - View commit details
-
Copy full SHA for 06d2a07 - Browse repository at this point
Copy the full SHA 06d2a07View commit details -
Avoid treating option_upfront_shutdown (req) as unknown_required.
This fixes the bitmask in requires_unknown_bits.
Configuration menu - View commit details
-
Copy full SHA for 7d68813 - Browse repository at this point
Copy the full SHA 7d68813View commit details -
Configuration menu - View commit details
-
Copy full SHA for e36d78c - Browse repository at this point
Copy the full SHA e36d78cView commit details -
Clarify the in-flight HTLC state-tracking structs a bit.
This also renames PendingForwardHTLCInfo to PendingHTLCInfo since it now also encompasses Pending *Received* HTLCs.
Configuration menu - View commit details
-
Copy full SHA for 9cfc6e9 - Browse repository at this point
Copy the full SHA 9cfc6e9View commit details -
Split only-receive/forward data out of PendingHTLCInfo into an enum
This should avoid blowing up the size of the struct when we add additional data that is only relevant for receive.
Configuration menu - View commit details
-
Copy full SHA for ae3c878 - Browse repository at this point
Copy the full SHA ae3c878View commit details -
Support (de)serializing payment_data in onion TLVs and track them
This is the first step in Base AMP support, just tracking the relevant data in internal datastructures.
Configuration menu - View commit details
-
Copy full SHA for 8e82808 - Browse repository at this point
Copy the full SHA 8e82808View commit details -
Refuse to deserialize OnionHopDatas with values > 21 million
We should probably do this for all values (and define a newtype for msat values), but this will do for now.
Configuration menu - View commit details
-
Copy full SHA for 5894543 - Browse repository at this point
Copy the full SHA 5894543View commit details -
Impl Base AMP in the receive pipeline and expose payment_secret
Sadly a huge diff here, but almost all of it is changing the method signatures for sending/receiving/failing HTLCs and the PaymentReceived event, which all now need to expose an Option<[u8; 32]> for the payment_secret. It doesn't yet properly fail back pending HTLCs when the full AMP payment is never received (which should result in accidental channel force-closures). Further, as sending AMP payments is not yet supported, the only test here is a simple single-path payment with a payment_secret in it.
Configuration menu - View commit details
-
Copy full SHA for f24c725 - Browse repository at this point
Copy the full SHA f24c725View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c4d221 - Browse repository at this point
Copy the full SHA 4c4d221View commit details -
Expand the Route object to include multiple paths.
Rather big diff, but its all mechanical and doesn't introduce any new features.
Configuration menu - View commit details
-
Copy full SHA for 2274482 - Browse repository at this point
Copy the full SHA 2274482View commit details -
Implement multipath sends using payment_secret.
This rather dramatically changes the return type of send_payment making it much clearer when resending is safe and allowing us to return a list of Results since different paths may have different return values.
Configuration menu - View commit details
-
Copy full SHA for 4bc2b67 - Browse repository at this point
Copy the full SHA 4bc2b67View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7ef025 - Browse repository at this point
Copy the full SHA f7ef025View commit details -
Time out incoming HTLCs when we reach cltv_expiry (+ test)
We only do this for incoming HTLCs directly as we rely on channel closure and HTLC-Timeout broadcast to fail any HTLCs which we relayed onwards where our next-hop doesn't update_fail in time.
Configuration menu - View commit details
-
Copy full SHA for 87372e9 - Browse repository at this point
Copy the full SHA 87372e9View commit details -
Time out AwatingRemoteRAA outgoing HTLCs when we reach cltv_expiry
In case of committing out-of-time outgoing HTLCs, we force ourselves to close the channel to avoid remote peer claims on a non-backed HTLC
Configuration menu - View commit details
-
Copy full SHA for 35350bc - Browse repository at this point
Copy the full SHA 35350bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 367602f - Browse repository at this point
Copy the full SHA 367602fView commit details -
Fix EnforcingChannelKeys panic when our counterparty burns their $.
If our counterparty burns their funds by revoking their current commitment transaction before we've sent them a new one, we'll step forward the remote commitment number. This would be otherwise fine (and may even encourage them to broadcast their revoked state(s) on chain), except that our new EnforcingChannelKeys expects us to not jump forward in time. Since it isn't too important that we punish our counterparty in such a corner-case, we opt to just close the channel in such a case and move on.
Configuration menu - View commit details
-
Copy full SHA for 87091f0 - Browse repository at this point
Copy the full SHA 87091f0View commit details
Commits on Jan 26, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 1ed82b0 - Browse repository at this point
Copy the full SHA 1ed82b0View commit details -
Fix deadlock in handle_error!() when we have HTLCs to fail-back.
Configuration menu - View commit details
-
Copy full SHA for baab176 - Browse repository at this point
Copy the full SHA baab176View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6719f1 - Browse repository at this point
Copy the full SHA e6719f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 739badf - Browse repository at this point
Copy the full SHA 739badfView commit details -
Drop individual fuzz target duplicate_crash tests for file reader
Previously, in each of our fuzz tests we had a dummy test which had a hard-coded hex string which it passed into the fuzz target so that when a failing test case was found, its hex could be copied into the test and you could run cargo test to analyze the failure. However, this was somewhat unwieldy as converting large tests back and forth between hex and raw files is quite annoying. Instead, we replace each of those tests with a test in each target that looks for files in fuzz/test_cases and runs each file it finds. Since we're editing every bin target anyway, we also automate adding no_main to libfuzzer builds with #![cfg_attr].
Configuration menu - View commit details
-
Copy full SHA for b8dbf27 - Browse repository at this point
Copy the full SHA b8dbf27View commit details -
Panic on txn with value > 21mill in ChannelMonitor::block_connected
full_stack_target found a crash where we may overflow ruring fee calculation if a transaction appears on-chain with massive value available for us to claim. Since these transactions are clearly bogus, we shouldn't allow full_stack_target to connect them, but we also improve the error generated by explicitly panicing on them.
Configuration menu - View commit details
-
Copy full SHA for d5e93c6 - Browse repository at this point
Copy the full SHA d5e93c6View commit details
Commits on Jan 27, 2020
-
Sadly our test coverage isn't very good and I had to hunt for functions to mutate where we fail tests on every mutation mutagen creates, but committing the framework is a start.
Configuration menu - View commit details
-
Copy full SHA for f2f7e70 - Browse repository at this point
Copy the full SHA f2f7e70View commit details