Mike Hearn
3d6691c82a
Switch to using DNS for testnet discovery, as LFnet has gone away.
...
Put DNS seeds into NetworkParams.
Deprecate IrcDiscovery and remove the unit tests for it.
Update examples and tools to use DNS for everything.
Resolves issue 299.
2013-03-29 17:39:24 +00:00
Mike Hearn
57b3fb4368
Bump language level to java 6 in the pom and fix the ToyWallet demo.
2013-03-19 15:40:52 +01:00
Mike Hearn
5d0518dafd
Merge encrypted wallets functionality by Jim Burton.
2013-03-18 18:27:12 +01:00
Mike Hearn
c8c1e68152
Unlock TransactionConfidence event listeners, make sure MemoryPool is not locked when a tx is marked broadcast by a peer to avoid inversions via listeners.
...
Unfortunately this introduces some new FindBugs warnings because it doesn't understand the inside-out locking pattern used here, despite that it's correct.
Update issue 233.
2013-03-07 17:38:13 +01:00
Mike Hearn
0534231de9
Run wallet event listeners unlocked. Resolves another inversion.
...
Update issue 223.
2013-03-07 17:08:15 +01:00
Mike Hearn
97bce595c3
ToyWallet -> SPVBlockStore.
2013-03-06 13:47:51 +01:00
Mike Hearn
96cd35f139
Add a convenience method to CheckpointManager and example of how to use in PingService.
2013-03-05 14:48:28 +01:00
Mike Hearn
121695fa13
Use a shutdown hook to make sure everything is wrapped up nice and neat. It's not actually required in this example, but it's good practice.
2013-03-05 14:48:28 +01:00
Mike Hearn
20fdc72ab2
Make PingService use SPVBlockStore.
2013-03-05 14:48:28 +01:00
Mike Hearn
a700b97f75
Delete the Derby block store. It isn't that useful now we have full verification based on H2.
2013-02-25 21:43:43 +01:00
Mike Hearn
72d6f23e92
Version 0.8-SNAPSHOT
2013-02-19 16:11:22 +01:00
Mike Hearn
3b7a494a37
Show reverse DNS for nodes in PeerMonitor.
2013-02-15 16:10:26 +01:00
Mike Hearn
53f526cef0
Refresh PingService example for 0.7
2013-02-05 21:35:04 +01:00
Mike Hearn
f488c29c12
Fix some races in PeerMonitor.
2013-02-05 15:14:34 +01:00
Mike Hearn
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.
2013-01-28 16:32:31 +01:00
Mike Hearn
6504296b79
Avoid confusing bugs by switching NetworkParameters.testNet() to be testnet3 not testnet2.
2013-01-16 18:15:46 +01:00
Mike Hearn
707e3a0989
Simplify FetchBlock by updating it to the latest APIs.
2013-01-16 17:55:46 +01:00
Mike Hearn
1454261ff3
Use the testnet3 channel in PrintPeers.
2013-01-11 22:14:12 +01:00
Mike Hearn
3197be51ea
Minor simplifications.
2012-12-25 01:23:16 +00:00
Mike Hearn
22ff79dd8a
Re-evaluate download peer when a new peer connects. Add unit tests for selecting the best peer.
2012-12-24 23:48:48 +00:00
Mike Hearn
b71015a297
Convert table co-ordinates correctly in PeerMonitor.
2012-12-24 22:53:17 +00:00
Mike Hearn
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.
2012-12-24 22:32:16 +00:00
Mike Hearn
93893e10ad
Make PeerGroup use the Guava services framework. Makes start/stop optionally non-blocking. Resolves issue 258.
2012-12-21 23:03:15 +01:00
Mike Hearn
b64a3b5d1e
Some work on DNS discovery - look up all seeds in parallel, pick 30 results, shuffle them and return. Allow users to specify a timeout. Return after the 30 results are found or we run out of time, whichever is first. Should smooth bumpy startup delays caused by occasional seed breakdowns.
2012-12-07 17:06:53 +01:00
Mike Hearn
26f63550be
Implement calculation of a moving average of ping times. Improve PeerMonitor by making columns sortable.
2012-12-07 14:45:41 +01:00
Mike Hearn
5cc9710e1f
Have PeerGroup ping peers that support BIP 31 ping/pong responses, by default every 5 seconds. The last time ping is available in Peer.getLastPingTime(). This will shortly be used for ordering peers by responsiveness so we don't try and download from overloaded peers.
2012-12-07 12:47:38 +01:00
Mike Hearn
f440913c1d
Some improvements to the network code:
...
- Delete the PeerGroupThread and replace it with a connectToAnyPeer() method. Getting connected to the network is now significantly faster as there is no sleep-wait loop between connections.
- Delete the connectionTimeMillis param to the PeerGroup constructors.
- Expose the PeerGroup c'tor that lets you specify the ClientBootstrap and expose a utility method to make one. This means users can now customize TCP options directly.
- PeerGroup.setMaxConnections() now actually creates or tears down connections to meet the new required number, if the peer group is running.
- Update the PeerMonitor so there's a spinner that lets you add or remove peers. Connecting and version handshaking is very fast now.
- Misc changes and fixes.
2012-12-06 15:06:37 +01:00
Mike Hearn
fc573d5f1c
Add a ping() method to the Peer class. It returns a future that can be used to find out when the pong returns and how slow it was. Temporarily, use this in the PeerMonitor example. Next up: moving pinging into the PeerGroup.
2012-11-02 16:19:13 +01:00
Mike Hearn
547bc29864
Add a PeerMonitor example. I'll extend it later.
2012-11-02 15:25:59 +01:00
Mike Hearn
7873254b2d
Move BlockImporter from examples to tools.
2012-11-01 16:48:24 +01:00
Mike Hearn
9c124ac257
Close stream in BlockImporter
2012-11-01 15:41:52 +01:00
Matt Corallo
282b58c5ea
Add a BlockImporter tool to examples.
2012-11-01 15:29:15 +01:00
Matt Corallo
6a96b0c392
Tweak ToyWallet to allow for easy switching to FullPrunedBlockChain
2012-10-08 17:12:41 +02:00
Mike Hearn
74042b8ca3
Fix minor bug in PingService.
2012-10-08 14:36:35 +02:00
Mike Hearn
8a4c34edd0
Improvements to the toy wallet example. Now shows received transactions in a list. Uses auto save. Testnet3. Uses the new event to refresh the wallet tx list. Lets you copy the address to the clipboard with one click. Smaller and simpler than before!
2012-10-04 00:24:51 +02:00
Mike Hearn
254393253c
Version 0.7-SNAPSHOT
2012-09-24 15:27:30 +02:00
Mike Hearn
2961f65594
Use the new TCPNetworkConnection.connectTo API in PrintPeers, act as an example of the Guava futures API too.
2012-08-30 23:16:37 +02:00
Mike Hearn
dee14b7109
Use JDK logging in the examples module.
2012-08-30 23:14:00 +02:00
Mike Hearn
fd9eba1697
Change PeerGroup.broadcastTransaction() to wait for propagation.
...
It means a send won't be considered completed until it's accepted by the net.
Also is for the case where you receive a transaction (eg, via Bluetooth) and
you want to broadcast it such that you can know it's valid.
Make WalletTool use --peers instead of --peer, a comma separated list of
addresses to use. Remove the crappy sleep after send now we can wait.
Resolves issue 167.
2012-07-22 01:20:48 +02:00
Mike Hearn
567fccbf8a
Fix indentation in core/pom, clear a couple of findbugs warnings that were introduced with the last commit.
2012-07-04 17:58:35 +02:00
Miron Cuperman
fa10523007
Netty network stack.
...
This should resolve some scalability and robustness issues.
2012-07-04 17:08:35 +02:00
Mike Hearn
893013b415
Remove a couple of redundant Maven <version> tags.
2012-06-08 17:21:38 +02:00
Jim Burton
80f141cbf5
TransactionConfidence changes (coinbase phase 2) + Mike's feedback
2012-06-01 16:14:18 +02:00
Mike Hearn
7705bd59a4
Version 0.6-SNAPSHOT
2012-05-21 16:46:44 +02:00
Mike Hearn
08f5630cf9
Update ToyWallet to spongycastle.
2012-05-18 17:22:47 +02:00
Mike Hearn
eb490f7168
Stop the main thread as the peer group thread is now daemonized.
2012-04-04 17:38:05 +02:00
Miron Cuperman
9474eaa0d4
Change NetworkConnection API to separate connect method.
...
This allows the Peer to close the connection earlier when connect()
takes a long time.
Resolves issue 161.
2012-03-26 15:23:14 -07:00
Mike Hearn
a119286b29
POM changes and refactorings from Gary.
2012-03-16 13:20:50 +01:00
Mike Hearn
6e162057c1
Removed IML files from git.
2012-03-13 19:00:33 +01:00
Mike Hearn
0e52c98c45
Use the standard Maven directory layout, rename "lib" to "core". Mavenize submodules.
2012-03-13 18:57:03 +01:00