Bitcoin Forum

Bitcoin => Bitcoin Wallet for Android => Topic started by: Green Lantern on September 08, 2013, 06:01:02 PM



Title: "SeedPeers" class
Post by: Green Lantern on September 08, 2013, 06:01:02 PM
First look in screenshot number one of davlik debug monitor server after running Bitcoin Wallet: http://piccy.info/view3/5090102/7074a1d99a96e67bdbea36a04073c21f/orig/
I suppose, that is normal work of Bitcoin Wallet.
Then I modified bitcoinj and bitcoin-wallet a little bit. I changed bitcoinj\core\src\main\java\com\google\bitcoin\kits\WalletAppKit.java (line 104):
Code:
vPeerGroup.addPeerDiscovery(new SeedPeers(params));
instead
Code:
vPeerGroup.addPeerDiscovery(new DnsDiscovery(params));
and bitcoin-wallet\wallet\src\de\schildbach\wallet\service\BlockchainServiceImpl.java (line 406):
Code:
private final PeerDiscovery normalPeerDiscovery = new SeedPeers(Constants.NETWORK_PARAMETERS);
instead
Code:
private final PeerDiscovery normalPeerDiscovery = new DnsDiscovery(Constants.NETWORK_PARAMETERS);
Look in screenshot number two of davlik debug monitor server after running Bitcoin Wallet to see the result: http://piccy.info/view3/5090104/aaf257fbd618863b16ed99ffb2263e66/orig/
I think, that is not normal work of app because you can see only "Peer died" and "Connection timed out".
So my question is: does class SeedPeers work correct? Maybe, it is not fully implemented?
P.S. Nonetheless, it could still work correct. I just don't have an opportunity to send or receive bitcoins to test Bitcoin Wallet with "SeedPeers" class instead "DnsDiscovery" class. So if you can do that, please do.
P.S.S. I'm not sure it is Bitcoin Wallet problem or bitcoinj problem.


Title: Re: "SeedPeers" class
Post by: Andreas Schildbach on September 08, 2013, 09:56:39 PM
First of all, Bitcoin Wallet does not use WalletAppKit. So your first change should not have any effect.

Second, did you build Bitcoin Wallet for testnet or mainnet? I assume SeedPeers only has mainnet peers, and who knows if they're still online. I'm not sure if they've ever been updated.


Title: Re: "SeedPeers" class
Post by: Green Lantern on September 08, 2013, 11:15:25 PM
First of all, Bitcoin Wallet does not use WalletAppKit. So your first change should not have any effect.

Second, did you build Bitcoin Wallet for testnet or mainnet? I assume SeedPeers only has mainnet peers, and who knows if they're still online. I'm not sure if they've ever been updated.
First, I have changed "DnsDiscovery" to "SeedPeers" everywhere. Just in case.
Second, yes, I'am using "mvn clean install -DskipTests" for bitcoinj and "mvn install -Prelease -DskipTests" for Bitcoin Wallet.
Third, do you mean, they just are idle? Damn it.


Title: Re: "SeedPeers" class
Post by: Andreas Schildbach on September 10, 2013, 06:48:22 AM
First of all, Bitcoin Wallet does not use WalletAppKit. So your first change should not have any effect.

Second, did you build Bitcoin Wallet for testnet or mainnet? I assume SeedPeers only has mainnet peers, and who knows if they're still online. I'm not sure if they've ever been updated.
First, I have changed "DnsDiscovery" to "SeedPeers" everywhere. Just in case.
Second, yes, I'am using "mvn clean install -DskipTests" for bitcoinj and "mvn install -Prelease -DskipTests" for Bitcoin Wallet.
Third, do you mean, they just are idle? Damn it.

I assume SeedPeers only has mainnet peers. Whereas if you build the app from master, you are running on testnet.


Title: Re: "SeedPeers" class
Post by: Green Lantern on September 10, 2013, 04:43:36 PM
First of all, Bitcoin Wallet does not use WalletAppKit. So your first change should not have any effect.

Second, did you build Bitcoin Wallet for testnet or mainnet? I assume SeedPeers only has mainnet peers, and who knows if they're still online. I'm not sure if they've ever been updated.
First, I have changed "DnsDiscovery" to "SeedPeers" everywhere. Just in case.
Second, yes, I'am using "mvn clean install -DskipTests" for bitcoinj and "mvn install -Prelease -Dskinlyu

I assume SeedPeers only has mainnet peers. Whereas if you build the app from master, you are running on testnet.

From https://code.google.com/p/bitcoin-wallet/source/browse/wallet/README lines(110-114):
Quote
   # each time
   cd bitcoin-wallet
   git fetch origin
   git checkout origin/prod
   mvn clean install -Prelease -Dandroid.sdk.path=<path to your android sdk>
I didn't do that each time. It seems I didn't do that at all! I am using only "mvn install -Prelease -DskipTests".


Title: Re: "SeedPeers" class
Post by: Green Lantern on September 22, 2013, 03:32:03 PM
First of all, Bitcoin Wallet does not use WalletAppKit. So your first change should not have any effect.

Second, did you build Bitcoin Wallet for testnet or mainnet? I assume SeedPeers only has mainnet peers, and who knows if they're still online. I'm not sure if they've ever been updated.
First, I have changed "DnsDiscovery" to "SeedPeers" everywhere. Just in case.
Second, yes, I'am using "mvn clean install -DskipTests" for bitcoinj and "mvn install -Prelease -Dskinlyu

I assume SeedPeers only has mainnet peers. Whereas if you build the app from master, you are running on testnet.

From https://code.google.com/p/bitcoin-wallet/source/browse/wallet/README lines(110-114):
Quote
   # each time
   cd bitcoin-wallet
   git fetch origin
   git checkout origin/prod
   mvn clean install -Prelease -Dandroid.sdk.path=<path to your android sdk>
I didn't do that each time. It seems I didn't do that at all! I am using only "mvn install -Prelease -DskipTests".
I have tried to build Productive version again from beginning according https://code.google.com/p/bitcoin-wallet/source/browse/wallet/README
1. I download bitcoinj:
- git clone -b release-0.10 https://code.google.com/r/bitcoinj/ bitcoinj
- cd bitcoinj
- mvn clean install -DskipTests
2. I download Bitcoin Wallet:
- git clone -b master https://code.google.com/p/bitcoin-wallet/ bitcoin-wallet
3. I built Productive version:
- cd bitcoin-wallet
- git fetch origin
- git checkout origin/prod
- mvn clean install -Prelease -DskipTests
4. I changed "DnsDiscovery" to "SeedPeers" in "bitcoin-wallet\wallet\src\de\schildbach\wallet\service\BlockchainServiceImpl.java" (line 405):
line 405: private final PeerDiscovery normalPeerDiscovery = new SeedPeers(Constants.NETWORK_PARAMETERS);
line 406: //private final PeerDiscovery normalPeerDiscovery = new DnsDiscovery(Constants.NETWORK_PARAMETERS);
5. mvn clean install -Prelease -DskipTests
6. I upload file "wallet-3.19.apk" to android virtual device.
7. I saw the same result (only "Peer died" and "connection timed out").
You also can see ddms logs personally here: http://www63.zippyshare.com/v/70937152/file.html

So my question is the same. Does class "SeedPeers" work properly?


Title: Re: "SeedPeers" class
Post by: Andreas Schildbach on September 22, 2013, 04:03:36 PM
I've never used the SeedPeers class. I'd check manually if these IP addresses are still online. As I wrote earlier, perhaps the list of peers needs to be updated in bitcoinj.


Title: Re: "SeedPeers" class
Post by: Green Lantern on September 22, 2013, 04:13:15 PM
I've never used the SeedPeers class. I'd check manually if these IP addresses are still online. As I wrote earlier, perhaps the list of peers needs to be updated in bitcoinj.

Thanks a lot for the reply. I suppose it is not IP addresses problem... but do you have email of any bitcoinj developer? Bitconj site (http://www.bitcoinj.org/) is down and I still didn't get aswer here: https://groups.google.com/forum/#!forum/bitcoinj :(


Title: Re: "SeedPeers" class
Post by: Andreas Schildbach on September 22, 2013, 04:15:57 PM
but do you have email of any bitcoinj developer? Bitconj site (http://www.bitcoinj.org/) is down and I still didn't get aswer here: https://groups.google.com/forum/#!forum/bitcoinj :(

Where did you get that site URL from? Bitcoinj is hosted at http://code.google.com/p/bitcoinj/

In the links section, you'll see a discussion group.


Title: Re: "SeedPeers" class
Post by: Green Lantern on September 22, 2013, 04:24:51 PM
but do you have email of any bitcoinj developer? Bitconj site (http://www.bitcoinj.org/) is down and I still didn't get aswer here: https://groups.google.com/forum/#!forum/bitcoinj :(

Where did you get that site URL from? Bitcoinj is hosted at http://code.google.com/p/bitcoinj/

In the links section, you'll see a discussion group.
I got site url earlier from the same place: http://code.google.com/p/bitcoinj/
"Got questions? Comments? Patches? Talk to us on the mailing list. You can quickly reach this website via bitcoinj.org. You can read the release notes for each release starting from 0.3."
And I saw earlier discussion group link in links section and discussion group is https://groups.google.com/forum/#!forum/bitcoinj :(


Title: Re: "SeedPeers" class
Post by: Andreas Schildbach on September 22, 2013, 04:32:54 PM
I got site url earlier from the same place: http://code.google.com/p/bitcoinj/
"Got questions? Comments? Patches? Talk to us on the mailing list. You can quickly reach this website via bitcoinj.org. You can read the release notes for each release starting from 0.3."

Thanks, I filed an issue. However, I think it will just redirect you back to Google Code.


Title: Re: "SeedPeers" class
Post by: Mike Hearn on September 23, 2013, 08:39:33 AM
Yeah, I guess I should fix that URL.