]>
git.bitcoin.ninja Git - ldk-java/log
Matt Corallo [Mon, 29 Nov 2021 01:03:22 +0000 (01:03 +0000)]
CHECK_ACCESS inner pointers using the new __unmangle_inner_ptr meth
Matt Corallo [Sun, 28 Nov 2021 23:17:52 +0000 (23:17 +0000)]
Add Variant-Level docs on complex and unitary enums.
Fixes #60.
Matt Corallo [Thu, 11 Nov 2021 17:43:44 +0000 (17:43 +0000)]
Allow users to specify a `UserConfig` when de-ser'ing a ChanManager
Fixes #55.
Matt Corallo [Thu, 11 Nov 2021 17:34:41 +0000 (17:34 +0000)]
Hold a reference when we pass Option<Trait> to rust
This resolves a NPE when calling trait methods if the user doesn't
hold their own reference to the underlying trait, which is quite
possible for, eg, the `Filter` object.
We also adapt `HumanObjectPeerTest` to test this with a `Filter`.
Matt Corallo [Thu, 11 Nov 2021 17:34:21 +0000 (17:34 +0000)]
Make enum-contains-trait detection more robust
Matt Corallo [Thu, 4 Nov 2021 06:07:54 +0000 (06:07 +0000)]
Merge pull request #54 from TheBlueMatt/main
v0.0.103.0
Matt Corallo [Wed, 3 Nov 2021 20:18:44 +0000 (20:18 +0000)]
Update Github Actions branch reference to 0.0.103
Matt Corallo [Tue, 2 Nov 2021 17:51:11 +0000 (17:51 +0000)]
Add support for InvoicePayer to ChannelManagerConstructor and test
Note that this adds an additional bit of runs in the
HumanObjectPeerTest, bringing leaks for a full run to:
149 allocations remained for
1157302 bytes.
Matt Corallo [Tue, 2 Nov 2021 15:30:34 +0000 (15:30 +0000)]
Update tests for latest upstream API
Leaks in a full test run is now
89 allocations remained for
1138102 bytes.
Matt Corallo [Tue, 2 Nov 2021 20:22:09 +0000 (20:22 +0000)]
Update auto-generated bindings to 0.0.103
Matt Corallo [Tue, 2 Nov 2021 20:15:49 +0000 (20:15 +0000)]
Support passing trait instance references from C to Java without clone or double-free
Matt Corallo [Tue, 2 Nov 2021 20:43:14 +0000 (20:43 +0000)]
Support nullable for opaque objects as well as traits and some arrays
Matt Corallo [Tue, 2 Nov 2021 20:41:50 +0000 (20:41 +0000)]
Treat pointers up to 4096 as null, matching our test values in ldk-c-bindings
Matt Corallo [Wed, 3 Nov 2021 21:10:12 +0000 (21:10 +0000)]
Fix race condition in NioPeerHandler on `socket_disconnected`
Matt Corallo [Tue, 19 Oct 2021 18:28:38 +0000 (18:28 +0000)]
Use gitweb's snapshots to fetch binaries for comparison, not git
Matt Corallo [Tue, 19 Oct 2021 06:29:30 +0000 (06:29 +0000)]
Update auto-generate bindings (incl new RL clone methods)
Matt Corallo [Tue, 19 Oct 2021 06:24:54 +0000 (06:24 +0000)]
Don't allocate a buffer to return a reference to a tuple element
If we're returning a reference to an object because we don't have a
clone function available, we'll set the reference flag implying no
free'ing will occur. In that case, we don't need to allocate a
buffer to copy the object's memory, we might as well just return a
pointer to the original.
After this commit, test leaks are:
73 allocations remained for
1137376 bytes.
Matt Corallo [Tue, 19 Oct 2021 05:48:41 +0000 (05:48 +0000)]
Remove (broken) duplicative tuple constructor
Matt Corallo [Tue, 19 Oct 2021 05:23:04 +0000 (05:23 +0000)]
Add basic use-after-free checking in limited places.
Sadly this appears to have exposed some missing allocation wraps,
which prevents us from applying this in more locations.
Matt Corallo [Tue, 19 Oct 2021 04:03:39 +0000 (04:03 +0000)]
Drop requires_clone ret_conv cloning in complex enums
requires_clone is supposed to be aboug arg_conv, not ret_conv so
its mis-labeled anyway. Somewhat unclear exactly what this was for.
Memory leaks are reduced to:
169 allocations remained for
1141984 bytes.
Matt Corallo [Tue, 19 Oct 2021 01:49:57 +0000 (01:49 +0000)]
Merge pull request #50 from TheBlueMatt/main
v0.0.102.0
Matt Corallo [Mon, 18 Oct 2021 21:40:23 +0000 (21:40 +0000)]
Use lld to link on OSX with LLVM 13
Matt Corallo [Mon, 18 Oct 2021 21:08:44 +0000 (21:08 +0000)]
Update auto-generated bindings to 0.0.102
Matt Corallo [Mon, 18 Oct 2021 21:04:55 +0000 (21:04 +0000)]
Bump OSX clang/LLVM to 13.0.0
Matt Corallo [Mon, 18 Oct 2021 20:56:56 +0000 (20:56 +0000)]
Update CI C-Bindings dependency to 0.0.102
Matt Corallo [Sun, 17 Oct 2021 01:22:34 +0000 (01:22 +0000)]
Update tests to upstream 0.0.102 API
Matt Corallo [Sun, 10 Oct 2021 04:49:45 +0000 (04:49 +0000)]
Merge pull request #49 from TheBlueMatt/main
v0.0.101.3
Matt Corallo [Sun, 10 Oct 2021 02:51:17 +0000 (02:51 +0000)]
Update maven to 3.8.3 (since apparently they yank old binaries?!)
Matt Corallo [Sun, 10 Oct 2021 00:53:57 +0000 (00:53 +0000)]
Update auto-generated bindings
Matt Corallo [Sun, 10 Oct 2021 01:40:35 +0000 (01:40 +0000)]
Update android API version to 24 (Nougat) as we need it for streams
Matt Corallo [Sat, 9 Oct 2021 23:28:00 +0000 (23:28 +0000)]
Correctly handle top-bit-set pointers, fixing Android 11
Matt Corallo [Thu, 7 Oct 2021 02:54:42 +0000 (02:54 +0000)]
Aggressively avoid object creation during message read handling
Matt Corallo [Sun, 3 Oct 2021 21:42:31 +0000 (21:42 +0000)]
[NioPeerHandler] Un-set Read interest when we fail to write fully
...as required by the SocketDescriptor.send_data API docs
Matt Corallo [Tue, 28 Sep 2021 06:53:18 +0000 (06:53 +0000)]
Merge pull request #47 from TheBlueMatt/main
v0.0.101.2
Matt Corallo [Tue, 28 Sep 2021 04:46:02 +0000 (04:46 +0000)]
Ensure listening sockets are closed to work around OSX breaking
Matt Corallo [Tue, 28 Sep 2021 01:29:18 +0000 (01:29 +0000)]
Try new paths for Android NDK library search
I'm not sure where these paths came from to begin with, but [1]
seems to indicate they're wrong, so let's try new ones.
[1] https://developer.android.com/ndk/guides/abis#sa
Matt Corallo [Tue, 28 Sep 2021 01:24:42 +0000 (01:24 +0000)]
Drop accidentally checked-in class file and update .gitignore
Matt Corallo [Tue, 28 Sep 2021 01:23:02 +0000 (01:23 +0000)]
Update auto-generated bindings
Matt Corallo [Tue, 28 Sep 2021 01:19:22 +0000 (01:19 +0000)]
Skip object reference adding when cloning within the FFI on to-Rust object passing
Matt Corallo [Mon, 27 Sep 2021 23:31:55 +0000 (23:31 +0000)]
Correct and use ChannelManagerConstructor in HumanObjectPeerTest
When ChannelManagerConstructor support was added, the test loop
bounds were never updated to actually test it. This corrects that
(and a few regressions that snuck in over time).
Memory leaks during tests are now:
249 allocations remained for
1146062 bytes.
Matt Corallo [Mon, 27 Sep 2021 06:27:06 +0000 (06:27 +0000)]
Merge pull request #46 from TheBlueMatt/main
v0.0.101.1
Matt Corallo [Mon, 27 Sep 2021 00:34:32 +0000 (00:34 +0000)]
Expand HumanObjectPeerTest to cover get_claimable_balances
Memory leaks during tests are unchanged
Matt Corallo [Mon, 27 Sep 2021 00:20:44 +0000 (00:20 +0000)]
Update auto-generated bindings
Memory leaks during tests are now:
193 allocations remained for
1136846 bytes.
Matt Corallo [Mon, 27 Sep 2021 00:10:49 +0000 (00:10 +0000)]
Update batteries to new Tuple-mapping API
Matt Corallo [Mon, 27 Sep 2021 00:10:31 +0000 (00:10 +0000)]
Update tests to new Tuple mapping API
Matt Corallo [Mon, 27 Sep 2021 00:05:18 +0000 (00:05 +0000)]
Redo tuple mapping to be explicit and not generic
This was suggested by Galder as more Java-y, but also fixes
a number of memory leaks by avoiding the complexity of
always holding references and letting the common code do
more work.
Matt Corallo [Sun, 26 Sep 2021 17:12:02 +0000 (17:12 +0000)]
Fix exception catch in native library load failure to catch NPE
Matt Corallo [Sun, 26 Sep 2021 04:55:28 +0000 (04:55 +0000)]
Use current HEAD for version in CI instead of previous commit
Matt Corallo [Sun, 26 Sep 2021 04:53:04 +0000 (04:53 +0000)]
Move version information out of git into new files
Matt Corallo [Sat, 25 Sep 2021 22:48:11 +0000 (22:48 +0000)]
Merge pull request #45 from TheBlueMatt/main
Various fixes + cut 0.0.101
Matt Corallo [Fri, 24 Sep 2021 03:14:18 +0000 (03:14 +0000)]
Update auto-generated bindings to 0.0.101
Matt Corallo [Sat, 25 Sep 2021 05:29:10 +0000 (05:29 +0000)]
Fix CI failures due to faketime breaking PKI time checks
Matt Corallo [Fri, 24 Sep 2021 22:25:28 +0000 (22:25 +0000)]
Update CI branch refernces to 0.0.101
Matt Corallo [Sat, 25 Sep 2021 06:32:07 +0000 (06:32 +0000)]
Specify maven plugin versions to avoid inconsistent jars
Matt Corallo [Fri, 24 Sep 2021 19:02:14 +0000 (19:02 +0000)]
Expand test coverage in HumanObjectPeerTest to hit new API features
Leak count is now:
507 allocations remained for
1163454 bytes.
Matt Corallo [Fri, 24 Sep 2021 17:53:23 +0000 (17:53 +0000)]
Update batteries and tests to latest upstream API
With the upstream v0.0.101, memory leaks during tests are now:
411 allocations remained for
1156930 bytes.
Matt Corallo [Fri, 24 Sep 2021 22:01:34 +0000 (22:01 +0000)]
Drop reallocarray wrapper, enforcing that we don't need it
Matt Corallo [Fri, 24 Sep 2021 21:59:30 +0000 (21:59 +0000)]
Swap java locks to pthread to avoid relying on newer GLIBC versions
Matt Corallo [Fri, 24 Sep 2021 21:41:08 +0000 (21:41 +0000)]
Add a build mode for "release optimizations with leaks checks", handle a jar in CI
Matt Corallo [Fri, 24 Sep 2021 17:44:45 +0000 (17:44 +0000)]
Implement partial clones when passing complex enums containing traits
Matt Corallo [Fri, 24 Sep 2021 17:44:24 +0000 (17:44 +0000)]
Add missing clone when passing a complex enum to Java
Matt Corallo [Fri, 24 Sep 2021 17:36:56 +0000 (17:36 +0000)]
Expand the criteria for cloning when passing to Rust
If a method takes an object by ownership, we always need to clone.
Matt Corallo [Fri, 24 Sep 2021 02:05:03 +0000 (02:05 +0000)]
Remap non-clonable move-passed optional fn args into Option<&Type>
This may break in the future, so we print a huge warning.
Matt Corallo [Thu, 23 Sep 2021 22:41:47 +0000 (22:41 +0000)]
Fix calling Java/TS methods that return strings
Matt Corallo [Thu, 23 Sep 2021 22:40:47 +0000 (22:40 +0000)]
Fix conflicting overuse of "ret" as a variable name
Matt Corallo [Mon, 20 Sep 2021 17:34:42 +0000 (17:34 +0000)]
Print error information when we fail to load LDK native library
Matt Corallo [Sat, 4 Sep 2021 22:07:12 +0000 (22:07 +0000)]
Correctly handle reference tracking for array elements, construct multi-dimentional arrays
Matt Corallo [Sat, 4 Sep 2021 20:39:32 +0000 (20:39 +0000)]
Rename ChannelManagerConstructor.ChannelManagerPersister to EventHandler
ChannelManagerPersister is a bit of a misnomer for the struct which
now handles events as well. Thus, we rename it to focus on the
event-handling function here.
Matt Corallo [Sat, 4 Sep 2021 19:46:46 +0000 (19:46 +0000)]
Drop dup PeerManager tiemr_tick_occurred calls from NioPeerHandler
We call PeerManager's timer_tick_occurred in the
lightning-background-processor crate, initialized from the
ChannelManagerConstructor. Prior to the use of the
lightning-background-processor we'd needed to call PeerManager's
timer_tick_occurred from NioPeerHandler, but we never dropped it
after the switch. Thus, every ~30 seconds we'll call
PeerManager::timer_tick_occurred twice in a row, disconnecting all
of our peers.
Matt Corallo [Wed, 25 Aug 2021 22:42:56 +0000 (22:42 +0000)]
Merge pull request #42 from TheBlueMatt/main
Cut 0.0.100.2 which should be uploadable to Maven Central
Matt Corallo [Wed, 25 Aug 2021 03:39:51 +0000 (03:39 +0000)]
Bump version to 0.0.100.2
Matt Corallo [Wed, 25 Aug 2021 06:05:00 +0000 (06:05 +0000)]
Skip javadoc generation on OSX since its broken
Matt Corallo [Wed, 25 Aug 2021 00:23:17 +0000 (00:23 +0000)]
Update pom.xml to comply with Maven Central requirements
Matt Corallo [Sun, 22 Aug 2021 04:53:16 +0000 (04:53 +0000)]
Merge pull request #40 from TheBlueMatt/main
v0.0.100.1
Matt Corallo [Fri, 20 Aug 2021 20:38:36 +0000 (20:38 +0000)]
Update autogenerated bindings to new version
Matt Corallo [Wed, 18 Aug 2021 22:45:34 +0000 (22:45 +0000)]
Test use of IgnoringMessageHandler with ChannelManagerConstructor
Matt Corallo [Wed, 18 Aug 2021 04:50:17 +0000 (04:50 +0000)]
Merge pull request #39 from TheBlueMatt/main
v0.0.100.0
Matt Corallo [Tue, 17 Aug 2021 22:31:53 +0000 (22:31 +0000)]
Update auto-generated files
Matt Corallo [Wed, 18 Aug 2021 00:18:27 +0000 (00:18 +0000)]
Switch to the 0.0.100 branch on ldk-c-bindings
Matt Corallo [Fri, 6 Aug 2021 19:09:10 +0000 (19:09 +0000)]
Update tests to latest upstream master
Matt Corallo [Tue, 17 Aug 2021 22:18:46 +0000 (22:18 +0000)]
Correct Rust -> Java method call semantics to avoid double-conversion
Matt Corallo [Tue, 17 Aug 2021 22:15:55 +0000 (22:15 +0000)]
Fix cloning trait structs via native clone method
When cloning a trait struct, we need to reference the
already-converted-to-struct value, not the original, integer,
value.
Matt Corallo [Mon, 9 Aug 2021 15:34:19 +0000 (15:34 +0000)]
Merge pull request #33 from TheBlueMatt/main
Expose supertrait implemetations to the Java API
Matt Corallo [Sat, 7 Aug 2021 22:34:45 +0000 (22:34 +0000)]
Update auto-generated bindings to latest upstream
Note that the inclusion of enum constructor functions fixes #30.
Matt Corallo [Mon, 9 Aug 2021 14:34:55 +0000 (14:34 +0000)]
Drop fail-fast in CI to run jobs even after another fails
Matt Corallo [Mon, 9 Aug 2021 04:58:52 +0000 (04:58 +0000)]
Move release jar comparisons to run before functional tests in CI
Matt Corallo [Sun, 8 Aug 2021 23:24:48 +0000 (23:24 +0000)]
Automatically run diffoscope on changed compressed files in CI
Matt Corallo [Sat, 7 Aug 2021 22:03:13 +0000 (22:03 +0000)]
Use the 0.0.99 branch of ldk-c-bindings in CI
Matt Corallo [Sat, 7 Aug 2021 22:24:22 +0000 (22:24 +0000)]
Use explicit paths for function arguments in Java
When we have an enum with a variant named the same as a struct we
need to specify a full concrete path when referring to it. The
simplest approach is to just use full concrete paths for all
function arguments, which we do here.
Matt Corallo [Sat, 7 Aug 2021 17:57:02 +0000 (17:57 +0000)]
Add an accessor to UInt5 to get the value and correct conversion
Matt Corallo [Fri, 6 Aug 2021 18:52:57 +0000 (18:52 +0000)]
Test function returning Option::None returns null to Java
Matt Corallo [Fri, 6 Aug 2021 18:48:17 +0000 (18:48 +0000)]
Use new TxOut constructor in tests
Matt Corallo [Fri, 6 Aug 2021 18:46:48 +0000 (18:46 +0000)]
Add constructors and expose fields in TxOut
Fixes #34.
Matt Corallo [Fri, 6 Aug 2021 17:40:09 +0000 (17:40 +0000)]
Add a simple wrapper for `disconnect_by_node_id` in `NioPeerHandler`
Fixes #36.
Matt Corallo [Fri, 6 Aug 2021 17:10:51 +0000 (17:10 +0000)]
Add docs for and mark nullable complex enum fields
Matt Corallo [Fri, 6 Aug 2021 17:10:19 +0000 (17:10 +0000)]
Correctly handle passing a null to Rust for an array
Matt Corallo [Fri, 6 Aug 2021 17:09:55 +0000 (17:09 +0000)]
Mark function arguments and return values Nullable if relevant
Fixes #35.
Matt Corallo [Thu, 5 Aug 2021 03:18:28 +0000 (03:18 +0000)]
Correctly handle null pointers returned from Rust representing None
Fixes the SEGFAULT in #35.
Matt Corallo [Thu, 5 Aug 2021 03:17:43 +0000 (03:17 +0000)]
Use findbugs for Nullable annotations instead of jetbrains
Matt Corallo [Sun, 18 Jul 2021 02:25:28 +0000 (02:25 +0000)]
Use a full Sign wrapper again in HumanObjectPeerTest
With the new upstream clone API and this, memory leaks during tests are
now:
418 allocations remained for
1160528 bytes.