Sean Gilligan
7ec1c95b57
gradle.yml: update JDK to 19 in the build matrix
2023-02-11 21:45:20 +01:00
Sean Gilligan
d3d240b855
graalvm.yml: use official setup-graalvm action
...
Switch from the DeLaGuardo/setup-graalvm action to the "official"
graalvm/setup-graalvm action.
2023-02-11 21:02:20 +01:00
Sean Gilligan
545c1c8be7
gradle.yml, graalvm.yml: update Gradle to 7.6
2023-02-11 20:59:53 +01:00
micheal swiggs-malmevik
e283a832dd
Message: deprecate unused property recached
and its getter
2023-02-11 12:53:43 +01:00
micheal swiggs-malmevik
1b9b339720
BitcoinSerializer: remove redundant cursor incrementation
2023-02-09 15:40:22 +01:00
micheal swiggs-malmevik
3ff22bdf13
ChildMessage: remove deprecated constructor
2023-02-09 15:33:37 +01:00
Andreas Schildbach
a480bc3281
TransactionBroadcastTest: always compare txId with a txId
2023-02-09 14:39:34 +01:00
Andreas Schildbach
24a94ec981
Peer: make sure to not invoke the unimplemented Message.getHash()
...
This fixes the integration tests which were broken with the previous commit.
2023-02-09 14:37:56 +01:00
micheal swiggs-malmevik
7fa3730dbc
Transaction: remove deprecated methods getHash(), getHashAsString()
2023-02-09 13:58:21 +01:00
micheal swiggs-malmevik
0869228cc4
Peer: remove deprecated method toStringServices()
2023-02-09 12:08:06 +01:00
Andreas Schildbach
2b5c50db25
Transaction: remove deprecated constant MIN_NONDUST_OUTPUT
2023-02-09 11:52:11 +01:00
micheal swiggs-malmevik
6a7ac8e2c7
NetworkParameters: remove deprecated method getMinNonDustOutput()
2023-02-09 11:46:22 +01:00
micheal swiggs-malmevik
ea5de696e8
Message: remove unused method hasMoreBytes()
2023-02-02 13:25:17 +01:00
micheal swiggs-malmevik
1477230f40
Peer: remove unused method isNotFoundMessageSupported()
2023-02-02 12:17:12 +01:00
micheal swiggs-malmevik
3950b88f76
BitcoinSerializer: remove unused parameter checksum
in makeMessage()
2023-02-02 12:13:03 +01:00
Johannes Zweng
56e936d534
SegwitAddress: include length check for Taproot witness programs
2023-01-30 11:47:38 +01:00
Andreas Schildbach
aaeadb52c8
build.gradle: update protobuf-javalite to 3.21.12
2023-01-29 21:59:16 +01:00
Andreas Schildbach
27cc40a301
build.gradle: update EasyMock to 5.1.0
2023-01-29 21:52:41 +01:00
Andreas Schildbach
7b970e6001
build.gradle: update picocli to 4.7.1
2023-01-29 21:35:31 +01:00
Johannes Zweng
fa2d3b3db6
MessageVerifyUtils: add util for verifying signed messages
...
Since P2SH-P2WPKH addresses do not contain the public itself – but instead
a value derived from a pubkey, namely
RIPEMD160(SHA256(0x00 0x14 <20-byte-pubKeyHash>)) - the verification of
signed messages got a bit more complicated (and different per address
type). To encapsulate this complexity and make it easy to use, this commit
introduces a new util class for verifying signed Bitcoin messages.
It also adds some test vectors partly from other projects implementing
the same functionality to test interoperability, as well as some publicly
known messages and signatures.
2022-12-18 12:01:59 +01:00
Johannes Zweng
070e53889e
ECKey: add BIP 137 support for signing text messages with segwit addresses
...
BIP 137 defined new header byte values for the created signature
when the signature was created with a private key from a segwit
address.
This commit extends the "signMessage(..)" with a new ScriptType argument
(because the value of the signature header since BIP 137 depends on the
address type). This commit keeps the old methods (without the ScriptType
argument), but marks them as deprecated (using P2SH as default, if called
without ScriptType, thus not changing old behaviour).
2022-12-18 12:00:44 +01:00
Johannes Zweng
e4f6dbd866
ECKey: add BIP 137 support for verifying signatures from segwit addresses
...
BIP 137 extended the allowed range of values for the header byte
of signatures (for signatures created from segwit addresses).
This commit reflects these changes and adds the newly allowed
header byte values to ECKey.signedMessageToKey(...).
Also adds test cases verifying signatures created with segwit addresses.
2022-12-18 11:59:57 +01:00
Andreas Schildbach
bc27caaae0
build.gradle: update protobuf-javalite to 3.21.10
2022-12-04 20:03:08 +01:00
Andreas Schildbach
adcba44ae0
SeedPeers: add a constructor for InetSocketAddress
...
The old `int` format for peer addresses is now deprecated, as it doesn't support IPv6.
2022-12-04 13:36:45 +01:00
Andreas Schildbach
fe72abe8fc
SeedPeers: don't throw in getPeers() if service bit filtering is used
...
This brings SeedPeers more in line with the other peer discoveries. There
is no guarantee for filtering.
2022-12-04 13:32:52 +01:00
Andreas Schildbach
3fffeee295
PeerGroup: discover peers via P2P addr
and addrv2
messages
...
Adds peer addresses discovered via P2P to the list of potential peers to connect to.
This is enabled by default if at least one PeerDiscovery is set via addPeerDiscovery(),
and the default can be overridden with setDiscoverPeersViaP2P().
2022-11-21 16:23:39 +01:00
Andreas Schildbach
74d54de1f6
AddressEventListener: new event produced by Peer if an addr
or addrv2
message is received
2022-11-21 15:39:24 +01:00
Andreas Schildbach
15cc61d066
build.gradle: update Jackson to 2.14.0
2022-11-14 08:24:23 +01:00
Andreas Schildbach
5a43d69775
build.gradle: update equalsverifier to 3.11
2022-11-14 08:24:23 +01:00
Andreas Schildbach
a9fcec648d
build.gradle: update EasyMock to 5.0.1
2022-11-14 08:24:23 +01:00
Andreas Schildbach
8348285b39
build.gradle: update ZXing to 3.5.1
2022-11-14 08:24:23 +01:00
Andreas Schildbach
8bd519624d
build.gradle: update picocli to 4.7.0
2022-11-14 08:10:13 +01:00
Andreas Schildbach
310a3ffc4a
build.gradle: update protobuf-javalite to 3.21.9
2022-11-14 01:05:58 +01:00
Andreas Schildbach
271e9ab018
build.gradle: update BouncyCastle to 1.72
2022-11-14 00:36:16 +01:00
Sean Gilligan
6ce061c9d3
modular-architecture.md: a quick sketch of a possible near-future modular architecture
2022-09-14 20:48:45 +02:00
Andreas Schildbach
f367ffa709
PeerAddress: addresses that make use of base32 in hostnames generally do not use padding, so omit it
2022-08-24 15:26:01 +02:00
Sean Gilligan
97590435d7
PeerAddressTest: add placeholder I2P test case to deserializeToString()
2022-08-23 08:11:01 +02:00
Sean Gilligan
94ad7dd344
PeerMonitor: use CompletableFuture for lookupReverseDNS() and getAddr()
...
* Create threadpool for reverseDns (rather than use new Thread() repeatedly)
* For getAddr() run completion handler on callback thread (and eliminate new Thread())
* Add getHostName() method that handles case where peerAddress.getAddr() is null
2022-08-23 01:09:17 +02:00
Sean Gilligan
39d799e58f
PeerMonitor: simplify getAddressForPeer() with trinary operator
2022-08-23 01:02:13 +02:00
Sean Gilligan
b21b10774a
PeerAddressTest: add parameterized deserializeToString test
...
* build.gradle: Add JUnitParams so we can have parameterized tests in existing test
* Add deserializeToString method with three addresses to test
2022-08-23 00:51:39 +02:00
Sean Gilligan
8a2d4c99d2
PeerAddress: create NetworkId enum, define I2P, CJDNS network IDs
...
* Replace hardcoded integer values (e.g. `0x01`) with NetworkId enum.
* Define (currently) unsupported values: I2P(5), CJDNS(6)
* Use switch statement to handle Network IDs
* Add placeholder cases for I2P and CJDNS
2022-08-23 00:45:03 +02:00
Sean Gilligan
22f02955d7
PeerAddress: make onionChecksum static
...
The onionChecksum() method uses no instance variables and has no side-effects,
so it can be static.
2022-08-23 00:15:56 +02:00
Sean Gilligan
bdc174e9bc
PeerSocketHandler: make peerAddress field final
2022-08-23 00:13:25 +02:00
Sean Gilligan
10e701f8d7
WalletAppKit, DefaultCoinSelector, BuildCheckpoints: simplify some network-related comparisons
...
Enums can use ==/!=.
2022-08-22 22:27:46 +02:00
Sean Gilligan
0ccface14d
PeerAddress: clean up toString, equals, hashCode - handle nulls properly
...
* Include `hostname` in equals() and hashcode()
* Fix NPE in toString() that occurs for (unsupported) I2P addresses (both addr and hostname are null)
* Better null-handling in equals()
* Add EqualsVerify test
* Add comments
2022-08-22 21:58:05 +02:00
Sean Gilligan
6bec092af2
LegacyAddress, SegwitAddress: normalize network type
...
Normalize/canonicalize network member of Address types.
LegacyAddress: map SIGNET, REGTEST to TESTNET
SegwitAddress: map SIGNET to TESTNET
Add tests to verify correct behavoir.
2022-08-17 22:50:07 +02:00
Andreas Schildbach
103250efcf
Message: remove obsolete readObject() method
...
It had been used for Java Serialization.
2022-08-17 14:57:49 +02:00
Sean Gilligan
2dfd5befb9
PeerMonitor: use ConcurrentHashMap rather than manually synchronized HashMap
...
* Use ConcurrentHashMap for `reverseDnsLookups` and `addressMessages`
* Remove now-unnecessary `synchronized` blocks
2022-08-17 11:00:56 +02:00
Andreas Schildbach
83644530cd
EncodedPrivateKey: migrate from NetworkParameters to Network
2022-08-17 09:34:04 +02:00
Andreas Schildbach
1ba9011cfa
EncodedPrivateKeyTest: move "stringification" tests to Base58EncodeCheckedTest
...
This allows us to get rid of mocking in EncodedPrivateKeyTest.
2022-08-17 01:25:11 +02:00