]>
git.bitcoin.ninja Git - ldk-java/log
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.
Matt Corallo [Sun, 18 Jul 2021 02:24:52 +0000 (02:24 +0000)]
Expose supertrait implemetations to the Java API
Matt Corallo [Sun, 18 Jul 2021 02:24:07 +0000 (02:24 +0000)]
Support new cloned upstream API instead of clone
Matt Corallo [Sun, 18 Jul 2021 02:24:24 +0000 (02:24 +0000)]
Free constructed LDK strings when relevant.
With LDK C Bindings v0.0.99.2, this reduces memory leaks during tests from:
538 allocations remained for
1188720 bytes.
to
358 allocations remained for
1141342 bytes.
Matt Corallo [Sun, 18 Jul 2021 02:48:47 +0000 (02:48 +0000)]
Deliver messages in PeerTest more robustly
Matt Corallo [Wed, 14 Jul 2021 03:24:57 +0000 (03:24 +0000)]
Merge pull request #31 from TheBlueMatt/main
Build deterministic Android AARs, Test built OSX bins
Matt Corallo [Sun, 11 Jul 2021 19:30:18 +0000 (19:30 +0000)]
Update auto-generated bindings to 0.0.99.1
Matt Corallo [Wed, 14 Jul 2021 00:54:10 +0000 (00:54 +0000)]
Add script to build deterministic android aar
Matt Corallo [Wed, 14 Jul 2021 00:02:33 +0000 (00:02 +0000)]
Enable macos-11 in CI
Matt Corallo [Tue, 13 Jul 2021 21:00:31 +0000 (21:00 +0000)]
Don't explicitly override __cxa_thread_atexit_impl, rely on LLVM to optimize it out
Matt Corallo [Sat, 10 Jul 2021 02:19:04 +0000 (02:19 +0000)]
Merge pull request #29 from TheBlueMatt/main
Update to LDK 0.0.99
Matt Corallo [Sat, 10 Jul 2021 00:17:29 +0000 (00:17 +0000)]
Update auto-generated bindings to LDK v0.0.99
Matt Corallo [Fri, 9 Jul 2021 16:24:34 +0000 (16:24 +0000)]
Drop disconnect_socket blocking in NioPeerHandler for 0.0.99
0.0.99 no longer requires that we block disconnect_socket and
simplifes our side of the SocketDescriptor interface substantially,
which we implement here.
Matt Corallo [Thu, 1 Jul 2021 22:41:22 +0000 (22:41 +0000)]
Merge pull request #28 from TheBlueMatt/main
Provide Better Diagnostics when a Java method called from Rust panics
Matt Corallo [Thu, 1 Jul 2021 21:25:04 +0000 (21:25 +0000)]
Update auto-generated bindings with new error messages and version
Matt Corallo [Thu, 1 Jul 2021 21:16:08 +0000 (21:16 +0000)]
Test that channel_manager_bytes is not null when persisting
We had an apparently-spurious report that this was the case, though
it doesn't seem to be.
Matt Corallo [Thu, 1 Jul 2021 21:15:07 +0000 (21:15 +0000)]
Specify the method which threw an exception when aborting
Matt Corallo [Thu, 24 Jun 2021 23:23:31 +0000 (23:23 +0000)]
Merge pull request #25 from TheBlueMatt/main
Fix glibc compat tweaks, make jars deterministic
Matt Corallo [Wed, 23 Jun 2021 14:58:49 +0000 (14:58 +0000)]
Bump auto-generated bindings version to 0.0.98.4
Matt Corallo [Wed, 23 Jun 2021 14:47:18 +0000 (14:47 +0000)]
Drop binaries from the repo, they are now at https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=summary
Matt Corallo [Thu, 24 Jun 2021 06:16:02 +0000 (06:16 +0000)]
Redo the glibc compatibility issues workaround, see comment for details
Matt Corallo [Wed, 23 Jun 2021 14:42:00 +0000 (14:42 +0000)]
Deterministically build the jars and check in CI, from a new repo
Matt Corallo [Thu, 24 Jun 2021 22:52:18 +0000 (22:52 +0000)]
Add a utility script to make release jars deterministic
Matt Corallo [Wed, 23 Jun 2021 14:41:29 +0000 (14:41 +0000)]
Set a library suffix for all platforms, useful for android builds
Matt Corallo [Wed, 23 Jun 2021 00:42:04 +0000 (00:42 +0000)]
Merge pull request #24 from TheBlueMatt/main
Support glibc 2.17 and make exception failures explicit
Matt Corallo [Wed, 23 Jun 2021 00:19:33 +0000 (00:19 +0000)]
Update auto-generated bindings
Matt Corallo [Tue, 22 Jun 2021 21:55:12 +0000 (21:55 +0000)]
Handle Java exceptions thrown in calls from C, printing and aborting
Closes #23.
Matt Corallo [Tue, 22 Jun 2021 21:47:35 +0000 (21:47 +0000)]
Support glibc versions prior to 2.18 for linux builds
Matt Corallo [Wed, 16 Jun 2021 19:26:37 +0000 (19:26 +0000)]
Merge pull request #22 from TheBlueMatt/main
Support building on OSX
Matt Corallo [Tue, 15 Jun 2021 23:18:12 +0000 (23:18 +0000)]
Re-generate auto-generated bindings + add Mac OS generated bindings
Matt Corallo [Tue, 15 Jun 2021 23:17:53 +0000 (23:17 +0000)]
Drop the liblightningjni link, creating it in CI instead
Matt Corallo [Tue, 15 Jun 2021 19:55:19 +0000 (19:55 +0000)]
Add a CI run on OSX
Matt Corallo [Tue, 15 Jun 2021 22:02:19 +0000 (22:02 +0000)]
Build a test jar which we can run to test the built jar is runnable
Matt Corallo [Tue, 15 Jun 2021 21:07:25 +0000 (21:07 +0000)]
Include native libraries in jar by shifting folder structure
Matt Corallo [Wed, 16 Jun 2021 01:57:45 +0000 (01:57 +0000)]
Drop most instances of Thread.sleep in HumanObjectPeerTest
Matt Corallo [Wed, 16 Jun 2021 00:14:30 +0000 (00:14 +0000)]
Do not rely on assertions being enabled in ChannelManagerConstructor
Matt [Mon, 14 Jun 2021 22:30:43 +0000 (18:30 -0400)]
Update README with notes about OSX addrsan
Matt Corallo [Mon, 14 Jun 2021 21:12:54 +0000 (21:12 +0000)]
Adjust compile flags for OSX, set trace on genbindings.sh
Matt Corallo [Mon, 14 Jun 2021 21:09:55 +0000 (21:09 +0000)]
Skip manual leak checking on OSX as -Wl,-wrap is too complicated
Matt Corallo [Mon, 14 Jun 2021 19:51:41 +0000 (19:51 +0000)]
Support OSX (ie builds where int64_t is not an alias for jlong)
Matt Corallo [Sat, 12 Jun 2021 21:47:48 +0000 (21:47 +0000)]
Drop _test_only_get_ptr as it is no longer used
Matt Corallo [Sat, 12 Jun 2021 18:16:00 +0000 (18:16 +0000)]
Merge pull request #21 from TheBlueMatt/main
Android Fixes
Matt Corallo [Sat, 12 Jun 2021 17:03:04 +0000 (17:03 +0000)]
Update auto-generated bindings with new release tag
Matt Corallo [Sat, 12 Jun 2021 16:51:02 +0000 (16:51 +0000)]
Avoid use of covariant return type change fns fixing backwards compat
See, eg, https://jira.mongodb.org/browse/JAVA-2559. This results
in errors like the following:
```
2021-06-12 17:15:58.893 13340-13412/com.example.rnldk E/AndroidRuntime: FATAL EXCEPTION: NioPeerHandler NIO Thread
Process: com.example.rnldk, PID: 13340
java.lang.NoSuchMethodError: No virtual method clear()Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of 'java.nio.ByteBuffer' appears in /system/framework/core-oj.jar)
at org.ldk.batteries.NioPeerHandler.lambda$new$0$NioPeerHandler(NioPeerHandler.java:185)
at org.ldk.batteries.-$$Lambda$NioPeerHandler$f9v_DKRzmlYYXidLTlb3OtA-tVY.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:764)
```
Matt Corallo [Sat, 12 Jun 2021 16:50:21 +0000 (16:50 +0000)]
Do not cast JavaEnv to void** for AttachCurrentThread on Android
Matt Corallo [Sat, 12 Jun 2021 16:50:05 +0000 (16:50 +0000)]
Better support alternative targets in genbindings.sh
Matt Corallo [Fri, 11 Jun 2021 22:00:57 +0000 (22:00 +0000)]
Merge pull request #20 from TheBlueMatt/main
Update auto-generated bindings with missed files and v0.0.98 tags
Matt Corallo [Fri, 11 Jun 2021 21:20:59 +0000 (21:20 +0000)]
Update auto-generated bindings with missed files and v0.0.98 tags
Matt Corallo [Fri, 11 Jun 2021 21:08:33 +0000 (21:08 +0000)]
Merge pull request #18 from TheBlueMatt/main
Update to latest upstream C bindings with Invoice support
Matt Corallo [Mon, 7 Jun 2021 21:08:21 +0000 (21:08 +0000)]
Update auto-generated bindings
Matt Corallo [Wed, 9 Jun 2021 01:48:07 +0000 (01:48 +0000)]
Force CPU target to Sandy Bridge when compiling
See the similar commit on ldk-c-bindings for more info.
Matt Corallo [Mon, 7 Jun 2021 21:16:17 +0000 (21:16 +0000)]
Use newly-exposed get_route in HumanObjectPeerTest
Matt Corallo [Sun, 2 May 2021 22:34:52 +0000 (22:34 +0000)]
Update CI to not require git tags checked in and fix WASM32 paths.
Matt Corallo [Mon, 7 Jun 2021 20:38:52 +0000 (20:38 +0000)]
Avoid git version always appearing as dirty
Matt Corallo [Mon, 7 Jun 2021 03:19:07 +0000 (03:19 +0000)]
Update tests and Constructor to new APIs
Matt Corallo [Mon, 7 Jun 2021 03:17:12 +0000 (03:17 +0000)]
Expand the list of things exposed via UtilMethods
Matt Corallo [Mon, 7 Jun 2021 03:16:53 +0000 (03:16 +0000)]
Drop the "LDK" prefix from unitary enums
Matt Corallo [Sat, 5 Jun 2021 17:06:31 +0000 (17:06 +0000)]
Expand and update ChannelManagerConstructor+tests for BP and Event API
Matt Corallo [Sat, 5 Jun 2021 16:49:20 +0000 (16:49 +0000)]
Handle methods taking non-ref self by using standard conversion
Matt Corallo [Wed, 2 Jun 2021 19:26:42 +0000 (19:26 +0000)]
Handle C -> Java calls from Rust-spawned threads
Turns out you need to "attach" threads to the JVM before you can
make Java calls.
Matt Corallo [Fri, 14 May 2021 15:57:13 +0000 (15:57 +0000)]
Redo constructor function names to feel more natural in Java
Matt Corallo [Mon, 3 May 2021 01:04:49 +0000 (01:04 +0000)]
Slightly reduce race conditions in NioPeerHandler
Sadly there's some restructuring that needs to happen to PeerHandler
before all possible race conditions go away.
Matt Corallo [Sun, 2 May 2021 03:47:16 +0000 (03:47 +0000)]
Update test ChannelManagerConstructor and invoice parsing as well
Matt Corallo [Sun, 2 May 2021 03:31:31 +0000 (03:31 +0000)]
Use uint64_t instead of long for pointers represented in C
While long is generally correct, the conversion of pointers to
long, then int64_t (passed to Java), then back to pointers
results in poor sign-extension, giving us invalid pointers.
Instead, convert to uint64_t everywhere and things work.
Matt Corallo [Sun, 2 May 2021 18:08:40 +0000 (11:08 -0700)]
Expose bindings versions and print on startup in debug mode
Also updates to latest upstream ldk-c-bindings include structure.
Co-Authored-By: Arik Sosman <git@arik.io>
Matt Corallo [Sun, 2 May 2021 03:33:21 +0000 (03:33 +0000)]
Support debug builds on Android by calling native log and not using BT
Matt Corallo [Sat, 1 May 2021 00:01:33 +0000 (00:01 +0000)]
Handle LDKStr in other structs and fix string conversion overread
Matt Corallo [Fri, 30 Apr 2021 21:50:03 +0000 (21:50 +0000)]
Handle empty variant structs and enums in variants
Matt Corallo [Fri, 30 Apr 2021 04:36:49 +0000 (04:36 +0000)]
Update HumanObjectPeerTest to print invoice in string form
Matt Corallo [Fri, 30 Apr 2021 02:03:50 +0000 (02:03 +0000)]
Update tests for new upstream API and using invoicse
Matt Corallo [Fri, 30 Apr 2021 02:03:14 +0000 (02:03 +0000)]
Use explicit return type var names instead of guessing
Matt Corallo [Thu, 29 Apr 2021 18:29:34 +0000 (18:29 +0000)]
Map more methods that go in UtilMethods
Matt Corallo [Thu, 29 Apr 2021 18:28:36 +0000 (18:28 +0000)]
Don't FREE things when we holds_ref if we're not calling *_free
After this we still only have minor leaks across 128 runs of
HumanObjectPeerTest:
314 allocations remained for
1126840 bytes.
Matt Corallo [Thu, 29 Apr 2021 16:39:03 +0000 (16:39 +0000)]
Handle u5, LDKTwentyBytes, and LDKRecoverableSignature
Matt Corallo [Thu, 22 Apr 2021 17:27:25 +0000 (17:27 +0000)]
Fix genbindings.sh sed call on OSX
Matt Corallo [Thu, 22 Apr 2021 16:29:50 +0000 (16:29 +0000)]
Handle calls which take strings as an argument in Java
Matt Corallo [Thu, 22 Apr 2021 15:28:24 +0000 (15:28 +0000)]
Merge pull request #17 from TheBlueMatt/main
Update to latest upstream
Matt Corallo [Fri, 16 Apr 2021 02:39:52 +0000 (02:39 +0000)]
Fix CI
Matt Corallo [Fri, 16 Apr 2021 00:38:28 +0000 (00:38 +0000)]
Update tests for latest upstream API, sadly disabling the Sign wrapper test
Matt Corallo [Sun, 21 Mar 2021 16:23:21 +0000 (12:23 -0400)]
Test new block connection API and update tests to new API
Matt Corallo [Wed, 31 Mar 2021 19:56:19 +0000 (15:56 -0400)]
Update auto-generated bindings
Matt Corallo [Thu, 15 Apr 2021 23:56:19 +0000 (23:56 +0000)]
Handle supertraits with constructor arguments
Matt Corallo [Thu, 15 Apr 2021 23:00:35 +0000 (19:00 -0400)]
Handle the somewhat half-mapped alias TransactionOutputs
TransactionOutputs is actually a
C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ, but with a type alias that
gives it a more readable name in a few places. Sadly, we don't
support type aliases, so we have to just map it back before building
our bindings.
Matt Corallo [Tue, 23 Mar 2021 00:48:41 +0000 (20:48 -0400)]
Treat Txid as an alias for LDKThirtyTwoBytes