Commit Graph

3301 Commits

Author SHA1 Message Date
Andreas Schildbach
ad262de961 Migrate from SpongyCastle back to BouncyCastle.
Google moved their broken BouncyCastle out of the way with Android 3.0
(see 0ac85ead96%5E%21/).
2018-10-23 16:09:10 +02:00
Andreas Schildbach
5c768c6ae5 Migrate use of BouncyCastle/SpongyCastle Hex encoder to Guava BaseEncoding. 2018-10-23 16:05:44 +02:00
Andreas Schildbach
98e17db898 Remove non-responding seeds and sync seeds with Bitcoin Core. 2018-10-17 01:08:02 +02:00
Alok Menghrajani
b9adef2719 LevelDBFullPrunedBlockStore: Fix typo in exception message. 2018-09-20 21:04:26 +02:00
Alok Menghrajani
6b79d5e43b Fix typos/spelling issues in comments. 2018-09-20 20:58:29 +02:00
tau3
0c96402fc0 TxConfidenceTable: Fix a lock in seen() and add a test. 2018-09-04 16:34:25 +02:00
Andreas Schildbach
5df91ca886 Wallet: Check early for null context or params. 2018-08-01 19:31:11 +02:00
Andreas Schildbach
90c3cccb6f Git-ignore Gradle wrapper files. 2018-07-31 10:37:39 +02:00
BigAdam2005
49ea1de34b LegacyAddressTest: Extend test dataset and move it to a classpath resource. 2018-07-27 14:19:17 +02:00
Andreas Schildbach
6e85ea391d build.gradle: Version control generated protobuf files again.
This effectively reverts commit 002fe8184c. It lead to too much support hassle.
2018-07-27 14:14:12 +02:00
Andreas Schildbach
d80e13abd8 Git-ignore bin (Eclipse) and out (IntelliJ) directories. 2018-07-16 22:26:33 +02:00
BigAdam2005
4a316089fa Add BlockLocator class for representing block locators as used in GetBlocksMessage and GetHeadersMessage. 2018-07-13 18:44:36 +02:00
ueno
2ec193f847 Wallet: Fix null pointer exception that happens when using witness program on addWatchedAddress(). 2018-06-18 11:10:11 +02:00
Andreas Schildbach
df9f5a479d Add simple contributing guidelines. 2018-05-18 16:21:04 +02:00
Oscar Guindzberg
694955c98b Message.readBytes(): Fail fast if length is too large 2018-05-09 21:20:28 +02:00
Oscar Guindzberg
26adf68948 Limit initial size of some structures
Limits initial size of these structures:
- Inputs and Outputs in Transaction
- Transactions in Block
- Hashes in PartialMerkleeTree

The fix prevents this DoS attack:
- Somehow the attacker needs to get a p2p connection to the bitcoinj node.
- The attacker sends a tx msg that says the tx contains a trillion inputs (or a similar msg attacking any other of the structures described above).
- bitcoinj tries to instantiate an ArrayList with a size of a trillion.
OutOfMemoryError and the bitcoinj node is down.
2018-05-08 13:51:26 -03:00
Oscar Guindzberg
a6c356c403 TransactionWitness: Store pushes in a List<byte[]>
This is a pre-requisite to fix the exploit to its initial size
2018-05-08 13:44:39 -03:00
Andreas Schildbach
002fe8184c build.gradle: Don't version control generated protobuf files. 2018-05-05 18:56:29 +02:00
Andreas Schildbach
fb33e72ad2 SPVBlockStore: Fix JavaDoc param. 2018-05-01 23:03:40 +02:00
Andreas Schildbach
aaa5262ef4 Migrate from Maven to Gradle 3.4 for building. 2018-05-01 16:49:30 +02:00
Matthew Leon
a6fd71b767 ECKey: Factor out findRecoveryId() from signMessage(). 2018-05-01 16:38:25 +02:00
David Kingsbury
a5aac0f4b7 MnemonicCodeTest: Extract MnemonicCodeVectorsTest for maintainability and to cover empty passphrases. 2018-04-21 23:08:25 +02:00
Andreas Schildbach
c3d162d9b4 DeterministicKeyChain: Fix a conditional and. 2018-04-21 16:15:15 +02:00
Andreas Schildbach
2c370c07c7 DeterministicKeyChain: Make accountPath final. It's not meant to be changed. 2018-04-20 16:37:47 +02:00
Andreas Schildbach
b08cfe3f54 Remove TestNet2. 2018-04-18 16:40:51 +02:00
Andreas Schildbach
22e495fbab SendHeadersMessageTest: Remove unnecessary FQN-ism. 2018-04-18 16:26:01 +02:00
Andreas Schildbach
9cede7a7e6 PeerGroup: Log shutdown times. 2018-04-16 18:48:57 +02:00
Andreas Schildbach
6764430b5b PeerGroup: Remove deprecated awaitRunning() and awaitTerminated(). 2018-04-16 18:21:15 +02:00
Andreas Schildbach
648655da99 Transaction can serialize and deserialize according to Segwit (BIP144). This adds TransactionWitnesses to the wallet protobuf, too.
The goal of this commit is to fix loading blk*.dat files by BlockFileLoader. Bitcoinj cannot yet
create segwit transactions nor does it correctly process them.

Based on code by:
  NicolasDorier <nicolas.dorier@gmail.com>
  Oscar Guindzberg <oscar.guindzberg@gmail.com>
  sstone <sstone@users.noreply.github.com>
2018-04-15 10:31:57 +02:00
Andreas Schildbach
9d6090a7ea Remove concept of stateful transaction signers. 2018-04-15 09:58:22 +02:00
Andreas Schildbach
ade58d2c19 PeerGroup: Start using VersionMessage.receivingAddr as it was originally intended. 2018-04-07 18:38:49 +02:00
Andreas Schildbach
e34f5e9af5 VersionMessage, AddressMessage: Fix address messages embedded in version messages cannot have time. 2018-04-07 18:38:49 +02:00
Andreas Schildbach
144818ea06 PeerAddressTest: Tidy up parse and bitcoinSerialize tests. 2018-04-07 18:38:49 +02:00
Andreas Schildbach
321ac5dbf2 VersionMessage: Fix names of addr fields. 2018-04-07 14:21:58 +02:00
Andreas Schildbach
3975a89f6a PeerAddressTest: Add roundtrip tests for all combinations of relevant protocol versions and IP address type. 2018-04-07 14:21:57 +02:00
Andreas Schildbach
7c270c23e6 BlockFileLoader: On an unexpected problem, wrap exception with additional information. 2018-04-06 20:47:16 +02:00
Andreas Schildbach
11d7f15322 BlockImporter: Set bitcoinj context. 2018-04-06 19:20:13 +02:00
Andreas Schildbach
93b9229397 BlockFileLoader: Add a second constructor that allows to specify a custom directory. 2018-04-06 19:20:05 +02:00
Andreas Schildbach
1700ec0be4 SPVBlockStore: Remove mmap hack for Windows.
It breaks on Java9 because it is using unofficial sun.* API.
2018-04-01 23:57:43 +02:00
Andreas Schildbach
03f404506c MonetaryFormat: Implement equals() and hashCode(). 2018-04-01 19:50:32 +02:00
Andreas Schildbach
8663236de0 SPVBlockStore: Ability to grow the block store. 2018-03-31 12:39:59 +02:00
Andreas Schildbach
37525e6eb7 WalletFiles: Getter for wallet that is managed. 2018-03-30 22:58:09 +02:00
Andreas Schildbach
c9a36647a9 WalletFiles: Don't save any more if executor is shut down. 2018-03-30 20:49:03 +02:00
Andreas Schildbach
e244453073 DeterministicKeyChain: Remove type argument from JavaDoc. 2018-03-24 22:58:42 +01:00
Daniel James
0be938b4a7 Block: Avoid NPE in hasTransactions()
Field is nullable;

```java
@Nullable List<Transaction> transactions;
```
2018-03-24 22:32:00 +01:00
Andreas Schildbach
52d000b6f9 README.md: Remove mention of ForwardingService, it's outdated. 2018-03-22 19:45:07 +01:00
Oscar Guindzberg
afa14d6968 Transaction: Limit initial size of inputs and outputs ArrayList. 2018-03-21 16:19:10 +01:00
Andreas Schildbach
b976205716 ScriptPattern: Add pattern matcher for segwit commitment (in an output of the coinbase transaction).
Adds a test for parsing block 481815, which contains a segwit commitment in its coinbase.
2018-03-21 15:04:03 +01:00
denis
d30d83c616 FiatTest: Increase test coverage for Fiat class. 2018-03-18 19:11:57 +01:00
HashEngineering
6aba962d62 DeterministicKeyChain: Allow decrypting DeterministicKeyChain with arbitrary path 2018-03-14 22:01:53 -07:00