Commit Graph

  • 1738f60e1e Refactorings of the current filtered block tracking code. Mike Hearn 2013-01-28 17:38:29 +01:00
  • 1d6a8c908c Fix off by one error in SIGHASH_SINGLE code. Resolves issue 292. Mike Hearn 2013-01-28 16:31:04 +01:00
  • dece35e95c Fix typo in name of FilteredBlockAndPartialMerkleTreeTests Mike Hearn 2013-01-28 16:26:28 +01:00
  • 35d6084bbf Refactor some of the wallet/peer interaction. Analyze dependencies of relevant pending transactions. The Peer object now asks each connected Wallet if it cares about a transaction. If it does, then receivePending() is not called immediately, but rather after downloading of dependencies and with those dependencies. If any dependencies are time locked, a new wallet property controls whether they are discarded or not. Mike Hearn 2013-01-20 23:23:50 +01:00
  • bfcf67ee5a Allow NotFoundMessage to be constructed with a list of InventoryItems. Mike Hearn 2013-01-20 22:17:22 +01:00
  • 8b9ddd2caf Link Peer and Wallet directly instead of using an event listener. This paves the way for tighter coupling in future, needed for various features. Mike Hearn 2013-01-20 20:56:36 +01:00
  • e9babb2772 Use ping messages to work around the lack of notfound messages on old nodes. For now optimistically assume Gavin merges the notfound patch into bitcoin-qt, version wise. Mike Hearn 2013-01-19 19:27:55 +01:00
  • b7b52c3fc9 Add support for recursively downloading mempool dependencies of a given mempool transaction. This isn't currently used anywhere, but can be used as the first step of doing some basic risk analysis of unconfirmed transactions. Mike Hearn 2013-01-19 18:57:10 +01:00
  • 43e1d084cb Add Matts copyright notice to TestWithPeerGroup Mike Hearn 2013-01-28 16:20:43 +01:00
  • cea95b809d Refresh filter every 25000 blocks to avoid a ballooning fp rate. Matt Corallo 2013-01-17 18:19:12 -05:00
  • 5f070e9861 Improve privacy: use const tweak + try for const filter parameters Matt Corallo 2013-01-17 18:15:51 -05:00
  • 1ea4cb457d Add the new nFlags BloomFilter fields to control auto-updating. Matt Corallo 2013-01-14 12:29:54 -05:00
  • 3906aa62d9 Add test cases for PMT/FilteredBlock including network download. Matt Corallo 2012-12-24 17:28:12 -05:00
  • 9577bd644e Ask peers for filtered blocks when appropriate and handle them. Matt Corallo 2012-11-16 14:36:04 -05:00
  • db8afbdadf Add an AbstractBlockChain.add(FilteredBlock...) Matt Corallo 2013-01-06 10:33:11 -08:00
  • 289c3d19f0 Add a Wallet.notifyTransactionIsInBlock(Sha256Hash txHash...) Matt Corallo 2012-12-23 17:44:18 -05:00
  • 661ad3cb04 Add PartialMerkleTree and FilteredBlock classes Matt Corallo 2012-11-16 14:35:49 -05:00
  • a5f9c3381b Add relayTxesBeforeFilter flag to VersionMessage, PROTOCOL_VERSION Matt Corallo 2012-12-20 18:21:57 -05:00
  • a0c25aed28 Make bloom filter false positive rate configurable. Matt Corallo 2013-01-17 17:50:04 -05:00
  • 7c03eefefd Send peers a bloom filter from our wallet(s). Matt Corallo 2012-07-21 16:36:39 +02:00
  • 394d0b788d Add Wallet.getBloomFilter and a test-case for it. Matt Corallo 2012-07-21 15:47:35 +02:00
  • e263229b62 Add BloomFilter class/messages and a test-case. Matt Corallo 2012-07-21 14:20:42 +02:00
  • c751e1f179 Add Utils.checkBitLE/setBitLE to interact with bit sets. Matt Corallo 2013-01-06 09:37:24 -08:00
  • 3805e8956b Remove useless conditional (old version of 95b5e0d894 was merged) Matt Corallo 2013-01-06 10:25:11 -08:00
  • 38d01e14a6 Fix #292 by &'ing sigHashType to treat it as unsigned. Matt Corallo 2013-01-27 02:09:17 -05:00
  • 3211fe59f3 Fix s/connectionTimeoutMillis/connectTimeoutMillis/ in a javadoc. Resolves issue 284. Mike Hearn 2013-01-23 17:22:09 +01:00
  • 40c13eb3f3 Fix send futures in FakeChannelSink to unbreak a unit test that deadlocks after a previous change. Mike Hearn 2013-01-23 17:17:00 +01:00
  • d919ede7a8 Specify time zone in block chain unit test. Resolves issue 291. Mike Hearn 2013-01-23 17:12:53 +01:00
  • 19b032e2e4 Simplify TCPNetworkConnection a bit and print the version message data when the peer sends it to us, not when we get a VerAck back from our own version announcement. Mike Hearn 2013-01-20 23:47:56 +01:00
  • caa92985e1 When broadcasting a spend, wait for the tx message to actually hit the wire before proceeding. This resolves an issue where wallet-tool would shut down before the message was actually sent. Mike Hearn 2013-01-20 23:47:32 +01:00
  • 6504296b79 Avoid confusing bugs by switching NetworkParameters.testNet() to be testnet3 not testnet2. Mike Hearn 2013-01-16 17:53:36 +01:00
  • 707e3a0989 Simplify FetchBlock by updating it to the latest APIs. Mike Hearn 2013-01-16 17:53:01 +01:00
  • 22f8034de8 Minor JavaDoc updates. Mike Hearn 2013-01-16 17:50:43 +01:00
  • 75e467dfc4 Make TestUtils.roundTripTransaction public. Mike Hearn 2013-01-16 17:50:27 +01:00
  • ee715a5f59 Add some convenience getters to a couple of classes. Mike Hearn 2013-01-16 17:50:13 +01:00
  • 9382ee15e9 POM indentation fix. Mike Hearn 2013-01-16 14:23:17 +01:00
  • a39dfddead Silence a newly noisy MemoryPool debug log, as we now expect to receive un-announced transactions in several cases (dep download, Bloom filtering) Mike Hearn 2013-01-16 13:20:55 +01:00
  • 8923af5785 Fix typo that prevented connection timeouts from being set properly. Mike Hearn 2013-01-15 14:17:15 +01:00
  • 4254e276fb Clean up Peer.java a bit - remove the custom future implementation and use Guava futures instead. Mike Hearn 2013-01-14 22:30:32 +01:00
  • e4e4e45a47 Allow re-signing of transactions and re-sign after adjusting the sequence number. Mike Hearn 2013-01-12 14:47:43 +01:00
  • 916e33254f Resolve some race conditions. It was possible that during saving of a wallet a network thread would update the confidence metrics due to broadcast announcements. This change makes TransactionConfidence use a COW list so the broadcast peer set can be iterated over safely. Resolves issue 277. Mike Hearn 2013-01-12 14:11:11 +01:00
  • 9a65d4cab8 Move ping timer cancellation to after channel close during PeerGroup shutdown. Check if the service is running before trying to re-ping a peer. Attempts to solve a shutdown race. Updates issue 275. Mike Hearn 2013-01-12 13:52:24 +01:00
  • 89c611d86b Always use getLockTime in isFinal. Mike Hearn 2013-01-12 00:58:00 +01:00
  • a6f1233b4e Delete some 0.5 -> 0.6 migration code from WalletTool. Mike Hearn 2013-01-12 00:40:27 +01:00
  • b5b43f3a15 Better support for lock timed transactions. Lock times are now included in various toString dumps. Transactions can estimate their lock time when the time is specified as a block number. Add support to WalletTool for creating timelocked transactions. Mike Hearn 2013-01-12 00:35:55 +01:00
  • 48cdc1d9e7 improve findbugs exclusions Mike Hearn 2013-01-11 23:27:28 +01:00
  • f2db0028ca Slightly improve wallet-tool help text. Updates issue 273. Mike Hearn 2013-01-11 22:30:38 +01:00
  • 9da08d2036 Try all returned IP addresses in IRC discovery and use the given timeout. Resolves issue 268. Resolves issue 269. Mike Hearn 2013-01-11 22:20:49 +01:00
  • 1454261ff3 Use the testnet3 channel in PrintPeers. Mike Hearn 2013-01-11 22:14:12 +01:00
  • 682033aef6 Actually use the provided IRC server name in IrcDiscovery. Resolves issue 266. Mike Hearn 2013-01-11 21:58:45 +01:00
  • 93870110c3 Use blocking PeerGroup startup in WalletTool Mike Hearn 2013-01-10 14:11:29 +01:00
  • 43e8752ef8 Make PeerGroup.addAddress adjust the number of requested connections. Mike Hearn 2013-01-10 14:12:05 +01:00
  • dd9e0d5d0d Fix my previous buggy commit that changed Utils.bitcoinValueToFriendlyString Mike Hearn 2013-01-10 13:26:19 +01:00
  • d268270d7b Use compressed pubkeys by default. Resolves issue 111. Mike Hearn 2013-01-09 23:45:04 +01:00
  • 0bdfa7b635 Better formatting in Utils.bitcoinValueToFriendlyString Mike Hearn 2013-01-09 23:41:32 +01:00
  • f2a6e41c82 Don't abuse BigIntegers in WalletTool/Utils when parsing hex pubkeys. Mike Hearn 2013-01-08 17:33:19 +01:00
  • ee5f881c51 Run TransactionConfidence listeners with the confidence object unlocked when markBroadcastBy is called. Resolves issue 270. Mike Hearn 2013-01-07 11:13:33 +01:00
  • ae6b2fbd4d Improvements to the ECKey class: - Implement ECDSA key recovery. - Use it to implement sign/verifymessage functionality that's compatible with Bitcoin-Qt. - Redesign the signing APIs a bit. Mike Hearn 2013-01-06 22:07:55 +01:00
  • 7fc325900c Clarify some parameter names in Sha256Hash and add a utility method. Mike Hearn 2013-01-06 21:57:09 +01:00
  • 7e8ed913ec Use ChannelGroups for shutdowns. This cleans up the code and makes the PeerGroup shutdown futures work correctly. Mike Hearn 2013-01-04 18:29:47 +01:00
  • 972c19a95f Use canonical path to the wallet destination file. Resolves issue 265. Mike Hearn 2013-01-04 17:54:17 +01:00
  • 12a652bd1e Close the temporary FileInputStream created in Sha256Hash.hashFileContents. Updates issue 265. Mike Hearn 2013-01-04 17:38:05 +01:00
  • 44865a3c50 Fix NullPointerException if using chain == null in PeerGroup Matt Corallo 2012-11-24 01:02:49 -05:00
  • 0208b426f5 Add a few more tests to FullBlockTestGenerator. Matt Corallo 2012-12-30 13:53:48 -05:00
  • 810b03dd0a Give Blocks/Transactions an idea of their optimally-encoded size. Matt Corallo 2012-12-30 13:50:49 -05:00
  • 009939f9be Give VarInt a concept of originally serialized size. Matt Corallo 2012-12-30 13:47:35 -05:00
  • 95b5e0d894 Make FullPrunedBlockStore/Chain upgrade-friendly. Matt Corallo 2012-10-20 22:21:38 -04:00
  • 4e0f5d8903 FindBugs: make random an object field rather than a disposable temporary. Mike Hearn 2012-12-26 18:57:03 +00:00
  • bf3a8dc085 Clear a minor FindBugs warning. Mike Hearn 2012-12-26 18:55:17 +00:00
  • 671a5aec18 Add a TransactionInput.verify() method that checks signatures and use it from the basicSpending test to ensure we generate valid signatures/scripts. Mike Hearn 2012-12-26 18:14:39 +00:00
  • 2f0d4cdbd8 Update Script javadoc. Mike Hearn 2012-12-26 18:01:48 +00:00
  • 273548c863 Take ping time into account when performing peer selection. Mike Hearn 2012-12-25 01:23:28 +00:00
  • 3197be51ea Minor simplifications. Mike Hearn 2012-12-25 01:23:16 +00:00
  • ea3fca970c Incorporate protocol version into download peer selection logic. Mike Hearn 2012-12-25 00:28:49 +00:00
  • ac61578e8a Use a COW list in Peer instead of protecting pendingPings under the peer lock. Mike Hearn 2012-12-24 23:57:28 +00:00
  • 22ff79dd8a Re-evaluate download peer when a new peer connects. Add unit tests for selecting the best peer. Mike Hearn 2012-12-24 23:48:48 +00:00
  • ffc953abc8 Don't hold the Peer lock whilst invoking a ping callback. Mike Hearn 2012-12-24 23:47:14 +00:00
  • eb7c4be136 Fix lock inversion. Mike Hearn 2012-12-24 23:33:13 +00:00
  • b71015a297 Convert table co-ordinates correctly in PeerMonitor. Mike Hearn 2012-12-24 22:53:17 +00:00
  • 8e91459dcc Fix a bug that could cause failure to reach the requested number of peers if peer connections failed immediately due to unroutable addresses. Mike Hearn 2012-12-24 22:33:04 +00:00
  • 07011be796 Introduce a PeerGroup method for calculating the most common chain height. Use it to make peer selection a little smarter. Render pending peers and peers that are reporting un-common chain heights in PeerMonitor. Mike Hearn 2012-12-24 22:32:16 +00:00
  • 2a55c58460 Make PeerGroup startup blocking in the unit tests. Mike Hearn 2012-12-24 21:27:49 +00:00
  • 7d7e76a3b0 Deduplicate peers retrieved from peer discovery. Resolves issue 260. Mike Hearn 2012-12-24 17:51:40 +00:00
  • 75c007fab3 Fix unit tests. Mike Hearn 2012-12-24 16:35:52 +00:00
  • a54e2e96eb Fix a bug in difficulty calculation logic that is revealed by testnet3. It should not impact the main net. Resolves issue 262. Rethrow block verification errors with a message containing the block. Mike Hearn 2012-12-24 16:12:13 +00:00
  • 9639b45ad8 BitCoin -> Bitcoin Mike Hearn 2012-12-24 16:11:11 +00:00
  • 93893e10ad Make PeerGroup use the Guava services framework. Makes start/stop optionally non-blocking. Resolves issue 258. Mike Hearn 2012-12-21 22:37:12 +01:00
  • 826aafd3e0 Make H2 non required. Mike Hearn 2012-12-16 13:38:46 +01:00
  • eacda0bdfc Decouple the wallet from the block chain by introducing a BlockChainListener interface, and making the Wallet implement it. Resolves issue 94. Mike Hearn 2012-12-14 17:04:30 +01:00
  • 5abd546eb2 Update the AbstractBlockChain javadoc. Mike Hearn 2012-12-14 16:33:37 +01:00
  • f6a498c241 Remove the redundant Wallet.isTransactionRelevant(..., includeDoubleSpending) parameter, as it was always set to true. Mike Hearn 2012-12-14 16:24:24 +01:00
  • ca629e330f Duplicate a transaction before sending to wallets beyond the first. Resolves issue 257. Mike Hearn 2012-12-14 15:24:22 +01:00
  • 1710be5b06 Fix typo in PeerGroup c'tor javadoc. Spotted by Matt. Mike Hearn 2012-12-12 22:23:55 +01:00
  • 590fd82fdc Fix a regression introduced by the block height accessor changes that prevented DownloadListener from triggering. Fix more inconsistent locking issues. Mike Hearn 2012-12-11 00:22:25 +01:00
  • 372a23fbfe Fix more inconsistent synchronization bugs. Mike Hearn 2012-12-11 00:01:50 +01:00
  • 93fd045488 Lock the ping time accessors correctly. Mike Hearn 2012-12-10 23:50:21 +01:00
  • df1ba42100 Fix OP_PUSHDATA decoding by preventing sign-extension. Clears some FindBugs warnings. Mike Hearn 2012-12-10 23:44:14 +01:00
  • 5668e1457e Fix a bogus format string. Mike Hearn 2012-12-10 23:43:46 +01:00
  • 16668390b3 Support full verification in wallet tool. Mike Hearn 2012-12-10 23:30:22 +01:00
  • 917e4460f0 Tabs to spaces. Mike Hearn 2012-12-10 13:28:11 +01:00