Commit graph

5142 commits

Author SHA1 Message Date
Sean Gilligan
5edb96cbb8 Bech32: use ByteUtils.concat() in verifyChecksum() 2025-02-25 23:28:45 +01:00
Sean Gilligan
96835143db Bech32: make private verifyChecksum() throw on invalid checksum
This eliminates the last @Nullable annotation in the `base` module.

Since this is a private method and is called for every address
that is parsed, let's not use Optional<>, but move the throw from
decode() to verifyChecksum().
2025-02-25 23:23:18 +01:00
Sean Gilligan
7bbb841730 gradle.yml: make job name conform with graalvm.yml
This harmonizes the job names to make it easier to compare files.
2025-02-24 09:36:10 +01:00
Sean Gilligan
1f4454837d graalvm.yml: move java-version line
This is cosmetic only, but matches the order in
gradle.yml, to make diffs easier.
2025-02-24 09:32:15 +01:00
Sean Gilligan
ce54d42fbc gradle.yml, graalvm.yml: add JDK 23 to the build matrices 2025-02-24 09:29:43 +01:00
Andreas Schildbach
455a874950 Peer: reduce logging when fee filter is announced to us 2025-02-19 22:47:22 +01:00
Andreas Schildbach
9bf97c997b NioClientManager: reduce logging for the happy path
It's up to higher-level classes like Peer to provide reasonable logging
for successful connections.
2025-02-19 22:44:48 +01:00
Andreas Schildbach
9e143a919e PeerGroup: remove redundant log message when download peer dies
It's always

```
Download peer died. Picking a new one.
Unsetting download peer: <peer>
Setting download peer: <peer>
```

So the first message can go away.
2025-02-19 22:43:35 +01:00
Andreas Schildbach
6f0dae931a ConnectionHandler: reduce log for CancelledKeyException
* log without stacktrace
* reduce log level to info
2025-02-19 22:42:02 +01:00
Andreas Schildbach
446f8a213d NioClientManager: reduce log for IOException
* log without stacktrace
* reduce log level to info
2025-02-19 22:40:31 +01:00
Sean Gilligan
47441d397a TransactionBroadcast: fix minor typos in comment 2025-02-19 22:38:51 +01:00
Sean Gilligan
561ce2a868 Transaction: fix typos in comments and exception message 2025-02-19 22:30:28 +01:00
Sean Gilligan
6aaf7af52e graalvm.yml: rename matrix variable java from java-version 2025-02-19 22:21:51 +01:00
Sean Gilligan
9e1dd68a70 gradle.yml, graalvm.yml: update gradle-build-action to setup-gradle@v4
See https://github.com/gradle/actions/releases for changes.
2025-02-19 12:47:32 +01:00
Andreas Schildbach
3ebb1714de build.Containerfile: use cache for Gradle/Maven build artifacts 2025-02-10 21:39:49 +01:00
Andreas Schildbach
1d4fb63a60 build.Containerfile: use cache for Debian packages 2025-02-10 21:38:14 +01:00
Andreas Schildbach
80bdbbf86c build.Containerfile: only install Debian packages that are strictly necessary 2025-02-10 21:23:38 +01:00
Andreas Schildbach
92a4feb8d6 MainNetParams, TestNet3Params, SigNetParams: update DNS seeds from Bitcoin Core 28.1 2025-02-10 21:09:03 +01:00
Andreas Schildbach
85d9d3e881 Transaction: cache transaction IDs
Without caching, transactions are serialized way too often.

This effectively reverts b8d3c4a641, but
invalidation is slightly different.
2025-02-10 19:19:34 +01:00
Andreas Schildbach
179fb049fa TransactionWitness: add missing class and method JavaDoc 2025-02-10 18:09:33 +01:00
Andreas Schildbach
7efdd39bc1 TransactionInput: make field scriptBytes immutable
Because tweaking is necessary for transaction signing, these usages
have been changed to produce new inputs instead and replace them in
transactions as needed.
2025-02-10 01:05:35 +01:00
Andreas Schildbach
fbf836d2ca TransactionInput: make field witness immutable
Because tweaking is necessary for transaction signing, these usages
have been changed to produce new inputs instead and replace them in
transactions as needed.
2025-02-10 00:59:40 +01:00
Andreas Schildbach
60f949aa17 TransactionInput: make field sequence immutable
Because tweaking is necessary in cases like unit tests, these usages
have been changed to produce new inputs instead and replace them in
transactions as needed.
2025-02-10 00:46:23 +01:00
Andreas Schildbach
9daf18eb0f TransactionOutput: make field value immutable
Because tweaking is necessary for fee calculation logic, these usages
have been changed to produce new TransactionOutputs instead and
replace them in transactions as needed.
2025-02-09 01:47:53 +01:00
Andreas Schildbach
3f3b73fc09 TransactionOutput: make field scriptBytes immutable 2025-02-08 10:33:12 +01:00
Andreas Schildbach
4e88ff284d ScriptBuilder: if pushing an empty data, use data() not smallNum()
Pushing an empty data is *not* a no-op: an item is added to the
stack. So that empty array should be represented in the data
part of the script chunk.

This makes behaviour consistent with script parsing, and input
signing expects the empty array as a placeholder for a missing
signature.

This reverts 07682145e3 from 2015!

Also adds a test.
2025-02-08 02:19:59 +01:00
Andreas Schildbach
c35f320e89 TransactionInput, TransactionOutPoint: in write(), prefer calling write() over serialize()
The reason is `write()` re-uses the `ByteBuffer`, whereas `serialize()` allocates
an intermediate byte array.
2025-02-05 13:57:09 +01:00
Sean Gilligan
31be6f5d33 wallettemplate: modular build using jlink plugin
* add module-info.java
* wallettemplate/build.gradle: add jlink plugin and mainModule
* gradle.yml: add bitcoinj-wallettemplate:jlink Gradle target
* add instructions to the README
2025-01-30 14:15:04 +01:00
Sean Gilligan
b363afbc98 gradle.yml, README.adoc: add wallettemplate installDist target
Now that this target is working correctly, we can include it in the
GitHub Actions builds. We can also add instructions
for how to build to the README.

The GitLab CI is currently using Debian Gradle 4.4.1 and
DO NOT build wallettemplate, so they remain unchanged.
2025-01-30 10:36:34 +01:00
Sean Gilligan
d1b1a5cf26 build.gradle: more precise SLF4J dependency declaration
There is a compile-time dependency on slf4j-api and a runtimeOnly
dependency on slf4j-jdk14. This commit updates Gradle to declare this
explicitly.
2025-01-30 10:29:09 +01:00
itorod
a07b23d0e5 bitcoin_address.fxml: remove icon text for copy and qrcode icons 2025-01-29 23:33:05 +01:00
itorod
85c7c78854 bitcoin_address.fxml: replace fontawesomefx icons by PNGs
The PNGs are sourced from https://pictogrammers.com

This also gets rid of the dependency to fontawesomefx.
2025-01-29 22:18:23 +01:00
Sean Gilligan
d367fd2226 gradle.yml, graalvm.yml: update Gradle to 8.12.1 2025-01-27 11:00:29 -08:00
Andreas Schildbach
1152c3b751 SPVBlockStore: make sure to use position(int) only from Buffer rather than MappedByteBuffer
Without this cast, on some old JDKs it links against an overloaded method in MappedByteBuffer
and Android doesn't have it.
2025-01-27 16:08:19 +01:00
Omoniyi Ilesanmi
cd48efe15b Wallet: rename TransactionCompletionException from CompletionException
This avoids naming confusion with `java.util.concurrent.CompletionException`.
2025-01-23 10:28:51 +01:00
Andreas Schildbach
055f1362b3 build.gradle: update Kotlin to 2.0.21 2025-01-20 10:06:12 +01:00
Andreas Schildbach
4eb75d8d0b build.gradle: update Gradle plugin for GraalVM to 0.10.3 2025-01-20 09:29:56 +01:00
Andreas Schildbach
498240a897 gradle.yml, graalvm.yml: update Gradle to 8.12 2025-01-20 09:23:49 +01:00
Andreas Schildbach
4c70646ab7 checkpoints.txt: refresh bundled checkpoints 2025-01-19 23:42:07 +01:00
Andreas Schildbach
0ba1682a42 build.gradle: update protobuf-javalite to 4.29.3 2025-01-19 21:31:53 +01:00
Andreas Schildbach
04e400ea10 build.gradle: update equalsverifier to 3.18.1 2025-01-19 21:31:53 +01:00
Andreas Schildbach
e46100650f build.gradle: update Jackson to 2.18.2 2025-01-19 21:13:39 +01:00
Andreas Schildbach
bddcf9d2ca build.gradle: update EasyMock to 5.5.0 2025-01-19 21:07:58 +01:00
Andreas Schildbach
7ed3d327cd build.gradle: update JUnit 5 to 5.11.4 2025-01-19 21:03:28 +01:00
Andreas Schildbach
e229bb5e91 build.gradle: update Guava to 33.4.0-android 2025-01-19 20:58:20 +01:00
Andreas Schildbach
3956d6cf16 build.gradle: update Bouncy Castle to 1.80 2025-01-17 10:09:46 +01:00
Sean Gilligan
09defa6266 ECKey: add JavaDoc for toAddress() 2025-01-03 11:32:21 +01:00
Johannes Zweng
cd922bb839 SegwitAddress: allow instantiation of P2A (pay-to-anchor) address 2024-12-15 15:18:55 +01:00
Andreas Schildbach
25ff2243cd ScriptPattern: simplify isWitnessCommitment() and extractWitnessCommitmentHash()
It now operates on bytes, rather than chunks. This also adds a bit of JavaDoc
and a couple of tests.
2024-12-09 15:02:25 +01:00
Andreas Schildbach
be91b31440 Script, ScriptBuilder: don't use current time as a default for creationTime
Rather, leave it `null`.
2024-12-03 13:18:28 +01:00