Mike Hearn
eb15ded065
PeerGroup: use a default FP rate that's much lower than the current rate, to boost performance. As there are various well documented de-anonymization attacks on Bloom filtering in bitcoinj (and BreadWallet) wasting bandwidth without getting additional privacy benefit doesn't help us much, so may as well take the performance until one day the code is smart enough to lie convincingly.
2015-04-21 13:52:53 +02:00
Mike Hearn
dd453ca677
PeerGroup: stall handling tweak: specify default bandwidth requirement in terms of block headers per second and make much lower, to avoid having false stalls when the Bloom FP rate is lowered (and thus bandwidth required is much lower). It's unclear how useful stall handling will be after this change, but we'll experiment with it a bit and find out.
2015-04-21 13:50:32 +02:00
Mike Hearn
82a0ddd4de
Wallet: Provide new balance types to calculate balances excluding watching outputs. This is useful for wallets where transactions have been manually added and thus there is a mix of watching and non-watching transactions. The "new in 0.13" behaviour that getBalance(AVAILABLE) includes unspendable outputs is preserved, so the more typical approach of having a watching wallet and calling getBalance() still does what you expect and reports the balance of the watched wallet.
...
API change: send completion would previously include watched outputs and could therefore throw MissingPrivateKeyException. This has now changed so watched outputs won't be considered and thus the exception may change to be InsufficientMoneyException, unless completing a pre-prepared transaction that is already connected to watched outputs.
2015-04-21 13:01:29 +02:00
Mike Hearn
ef9e49d5e7
DeterministicKey: override hasPrivKey and getSecretBytes to reflect the private key derivation strategy used.
2015-04-21 13:01:29 +02:00
Mike Hearn
9faa4a686b
DK.isWatching simplification
2015-04-21 13:01:29 +02:00
Mike Hearn
54a6316243
Make BasicKeyChain.isWatching return a state enum instead and use it to simplify KeyChainGroup.isWatching()
2015-04-21 13:01:29 +02:00
Andreas Schildbach
ed6821ed15
Add Wallet.isWatching() to determine if the wallet is a watching wallet. Comes with tests.
2015-04-21 13:01:29 +02:00
Mike Hearn
1e6ce4b1ba
Rename DeterministicKey.getPubOnly() to dropPrivateBytes() to reflect what it's actually trying to do, and add dropParent() as well for the cases where we actually need a truly privkey-lacking object. Update the call sites to do whatever is appropriate for those situations.
2015-04-21 13:01:28 +02:00
Andreas Schildbach
a1612b0a8f
Implement DeterministicKey.isPubKeyOnly(). The super-implementation in ECKey doesn't take possible rederivation into account.
2015-04-21 13:01:28 +02:00
Mike Hearn
e9bffdda18
DefaultCoinSelector: no-op code simplification
2015-04-21 13:01:28 +02:00
Andreas Schildbach
f2eaf4a562
Update to jackson 2.5.x.
2015-04-17 16:37:13 +02:00
Andreas Schildbach
dba18dfb4d
Update to slf4j 1.7.7.
2015-04-17 16:37:13 +02:00
Andreas Schildbach
f2e3111ba8
Update to junit 4.12.
2015-04-17 16:37:13 +02:00
Andreas Schildbach
2e3ee3b161
Update to easymock 3.2.
2015-04-17 16:37:13 +02:00
Andreas Schildbach
ee6fb7c65e
Add missing checksum for the new leveldb dependency.
2015-04-11 11:30:07 +02:00
Mike Hearn
7d7ba9c8ef
Some fixes for LevelDB SPV block store.
2015-04-09 16:57:28 +02:00
Mike Hearn
ec6f8a3c9d
WalletAppKit: Allow overriding of the block store in use.
2015-04-08 18:30:34 +02:00
Mike Hearn
d46ba33343
Add a LevelDB/JNI based SPV block store that records all headers.
2015-04-08 18:30:21 +02:00
Mike Hearn
527274a40f
Add FilteredBlock.getPartialMerkleTree()
2015-04-07 19:26:32 +02:00
Mike Hearn
c426e34646
Bug fix: don't pointlessly download a transaction we already have because we're broadcasting it.
...
This is a regression caused by the TxConfidenceTable rewrite: previously it pinned entire transactions and that was used to notice that a broadcast was happening. Now it only pins confidence objects. So instead we use the confidence.source property: if it's SELF then we assume we have it somewhere in the address space and don't bother downloading it when a peer announces it. If it's UNKNOWN then PeerGroup.broadcastTransaction will set it to SELF.
2015-04-07 15:37:22 +02:00
Mike Hearn
325e7e170b
Transaction: print a log warning if lock time is set and a sequence number has not been. This is a common programming error.
2015-04-07 15:35:28 +02:00
Mike Hearn
1e7a13dd27
PeerGroup: better stall handling.
...
Calculate a moving average of the actual download speed and use it to decide when to disconnect. If the network is pathologically slow and we keep stalling, give up after the third time.
2015-04-06 19:01:19 +02:00
Mike Hearn
09744edfe3
Context: some small fixes + javadocs for WalletAppKit
2015-04-06 17:20:03 +02:00
Mike Hearn
b5994e3788
A bit of unit test cleanup.
2015-04-06 16:34:59 +02:00
Mike Hearn
7576a44ef4
getutxo: Bugfixes identified by static analysis
2015-04-06 15:32:02 +02:00
Mike Hearn
037ec5aef9
getutxo: Flesh out the JavaDocs, link to the BIP, include brief security discussion, and make Peer support multiple in flight queries at once.
2015-04-06 15:14:31 +02:00
Mike Hearn
4c12127501
Context: add c'tors that take a context to [Abstract/FullPruned/]BlockChain and PeerGroup. The existing c'tors now do a consistency check against the existing context or create a new one on the fly.
2015-04-05 19:52:58 +02:00
Mike Hearn
960e58343e
Context: more TODOs
2015-04-03 19:42:36 +02:00
Oscar Guindzberg
64e09452f4
PeerSocketHandler: bugfix for incomplete message headers at the end of
...
the buffer
2015-03-27 16:44:00 -03:00
Oscar Guindzberg
e5b52fb73b
PeerSocketHandler: make first message validation explicit
2015-03-27 16:43:44 -03:00
Andreas Schildbach
2837ad581a
Make maven-javadoc-plugin print a lot less clutter.
2015-03-23 13:34:27 +01:00
Manfred Karrer
d13665c22f
Add linebreak to comment
2015-03-23 11:15:19 +01:00
Manfred Karrer
b74d1e32a2
Add readObject method to initialise listeners object which would be null in case the confidence object gets created from Serialisation
2015-03-23 10:29:47 +01:00
Carlos Lopez-Camey
b28204b6ca
Run core tests in alphabetical order
2015-03-22 10:42:37 -06:00
Carlos Lopez-Camey
4e6b544920
Create context for TestWithWallet
2015-03-22 17:07:53 +01:00
Carlos Lopez-Camey
48401a0af1
Removes deprecation warnings. In pom.xml artifactId is project.artifactId. Sha256Hash.createHash is Sha256Hash.hashTwice. LazyECPoint.getX and getY use getXCoord and getYCoord while forcing normalization.
2015-03-22 17:07:17 +01:00
Mike Hearn
275c9320ea
More plugin updates and a regen of the dep verifier list.
2015-03-22 17:05:10 +01:00
Mike Hearn
c5123a320e
Create context for WalletProtobufSerializerTest.
2015-03-22 16:48:57 +01:00
Mike Hearn
9c80c3b3b8
Update SureFire plugin.
2015-03-22 16:48:14 +01:00
Mike Hearn
16f953c6c1
Payment channels: log connection failures in NioClient
2015-03-22 16:27:29 +01:00
Mike Hearn
50e7e14763
Propagate context to the wallet autosave thread.
2015-03-21 17:23:12 +01:00
Mike Hearn
e3f70c6d4f
Context: add some more TODOs.
...
WalletAppKit: propagate context.
2015-03-21 17:07:45 +01:00
Mike Hearn
d03b68a109
Transaction: add alternatives for getConfidence()
2015-03-21 17:07:44 +01:00
Mike Hearn
7e9f0f47a2
Context: add TODOs and some more complete class javadocs
2015-03-21 17:07:44 +01:00
Mike Hearn
1a70f05ca7
Add a notion of an event horizon to the context. This is intended to unify the various places in the library where we want to throw data away after a tx is buried so deep it will probably never be re-orged, but which presently use different constants. The wallet will use the event horizon in future as well.
2015-03-21 17:07:44 +01:00
Mike Hearn
aae60d8391
Add NetworkParameters to the Context, and verify consistency when a context is fetched.
...
Make Wallet accept Context as a c'tor parameter and then update unit tests (which switch params very often) to create contexts when necessary.
2015-03-21 17:07:44 +01:00
Mike Hearn
0ba5f61c88
Delete broadcastBy data once a tx is buried under >100 blocks, as a memory saving. Remove TODO as the code is fairly clear these days.
2015-03-21 17:07:44 +01:00
Mike Hearn
3a9a47b67a
Don't access TransactionConfidence.broadcastBy from mixed synchronized/unsynchronized contexts. This isn't a real bug but clears an Inspector warning.
2015-03-21 17:07:44 +01:00
Mike Hearn
95dec1a910
Don't run event listener twice if a peer announces twice.
2015-03-21 17:07:44 +01:00
Mike Hearn
750f469bd3
Confidence objects now pin themselves when a listener is attached, eliminating a certain class of GC-triggered heisenbug.
2015-03-21 17:07:44 +01:00