Bitcoin Forum

Bitcoin => Project Development => Topic started by: rik8119 on July 16, 2015, 01:51:14 PM



Title: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on July 16, 2015, 01:51:14 PM
Hello everyone,

i tried to modified a mobile wallet that was first programmed by Hashengineering for digitalcoin. The wallet was modified for freicoin. As i am using a fork of freicoin i modified the freicoinj wallet as far as possible.

As mvn make clean install produces too many errors for me to handle i switched of the tests and tested the wallet on my phone. I was able to install it and it is connecting to some nodes, but it is not downloading any blocks although it produces a lot of traffic. My guess was that the genesisblock hash does not fit. But as i am not really able to debug it i am not shure.

The wallet is mostly finished so i put a bounty of 0.5 BTC plus 10k FRC for getting the WLC wallet fixed (www.github.com/worldleadcurrency/wlcj & wlc-wallet).

I am a little desperate scinse i gone through the changes several times without finding any point where i can begin again.

I talked to hashengineering but he seems to be quite busy, so i post the offer again here.

Any help is appreciated  ;)

Many greetings Rik.


EDIT: the template is now namecoinj the repository for WLC is at www.github.com/Rikski/namecoinj)

EDIT: The bounty is now1.2 BTC 400WLC and 10k FRC


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on July 16, 2015, 08:58:24 PM
I can try to do this although time is limited for me. At this point it looks like the unit tests weren't properly ported, and a lot of them are simply broken (retaining test data from other coins). I'll pull unit tests from the C++ wallet.

Edit: Can you provide details such as known correct txns and the like?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on July 17, 2015, 05:37:58 AM
I can try to do this although time is limited for me. At this point it looks like the unit tests weren't properly ported, and a lot of them are simply broken (retaining test data from other coins). I'll pull unit tests from the C++ wallet.

Edit: Can you provide details such as known correct txns and the like?

Hi hexafraction,

i am glad you want to help. Do you mean some transaction detail from a transaction from the blockchain? i do not know what known correct txns can be found andgoogle did not throw out something useful. Can you explain a little bit more in detail what is needed?

Thanks Rik



Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: bitsum on July 17, 2015, 05:48:14 AM
maybe i can help u


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: MoonOfLife on July 17, 2015, 06:04:33 AM
pm`d


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on July 17, 2015, 07:18:08 AM
pm`d

Hi everyone, thanks for now i will try to fix the genesis block hash. I will came back again if there are more questions (bounty will be splitted between all helping hands if i get it fixed).

Rik


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on July 17, 2015, 02:00:29 PM
I can try to do this although time is limited for me. At this point it looks like the unit tests weren't properly ported, and a lot of them are simply broken (retaining test data from other coins). I'll pull unit tests from the C++ wallet.

Edit: Can you provide details such as known correct txns and the like?

Hi hexafraction,

i am glad you want to help. Do you mean some transaction detail from a transaction from the blockchain? i do not know what known correct txns can be found andgoogle did not throw out something useful. Can you explain a little bit more in detail what is needed?

Thanks Rik



Yeah, I need some sample transactions on the WLC network that I can use to create unit tests.

I can always take the coin parameters themselves from the C++ wallet but keeping the unit tests working is paramount to secure development. Is there a WLC block explorer or something that I can use? If not, I can compile and install the C++ client once I get the chance to do so.

Actually, if I'm understanding this correctly, there are so many issues going on with the unit tests themselves. The unit tests were never properly edited to reflect WLC's coin parameters. In fact, there are unit tests failing because they are checking Bitcoin's test blocks against the Bitcoin blockchain, with Bitcoin mainnet headers. In fact, it doesn't look like the unit tests were ever modified.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: MoonOfLife on July 17, 2015, 02:12:17 PM
hey bro , reply my message

btw dont reply at this account i will give you my another account .
pm`d


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 13, 2015, 02:12:46 PM
Hello again everybody,

i ported the coin to namecoinj as a template now and with the help of hexafraction i get the wallet to start downloading Blocks until it crashes at Block 10k. The Bounty is now at 0.7 BTC for fixing the wallet. The crash report says its something with the deserialization. I dont know why this occurs only at Block 10k but it seems to be related with the increase in the Block height digits. Maybe someone has an idea?

The crash report is:
Code:
=== application info ===

%0A%0AVersion: 0.13-beta (10013)%0APackage: hashengineering.worldleadcurrency.wallet%0ATest/Prod: prod%0ATime: 2015-08-06 16:35:14 +0200%0ATime of launch: 2015-08-06 16:35:08 +0200%0ATime of last update: 2015-08-06 16:02:48 +0200%0ATime of first install: 2015-08-06 16:02:48 +0200%0ATime of backup: none%0ANetwork: org.worldleadcurrency.production%0AEncrypted: false%0AKeychain size: 271%0ATransactions: 0%0AInputs: 0%0AOutputs: 0 (spent: 0)%0ALast block seen: 9817 (00000000041658165ce05600eccf7c0a05b2801b2fd9cca5df3c43bdb5016986)%0ADatabases:%0A%0AContents of FilesDir /data/data/hashengineering.worldleadcurrency.wallet/files:%0A2015-08-06 16:35:12       68  files%0A  - 2015-08-06 16:03:00      685  key-backup-protobuf%0A  - 2015-08-06 16:35:12    23428  wallet-protobuf%0A%0AContents of LogDir /data/data/hashengineering.worldleadcurrency.wallet/app_log:%0A2015-08-06 16:02:57       20  app_log%0A  - 2015-08-06 16:35:14    86030  wallet.log%0A%0A%0A%0A

=== stack trace ===


%0A%0A
java.lang.OutOfMemoryError%0A%09at
java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:94)%0A%09at
java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:145)%0A%09at
java.lang.StringBuilder.append(StringBuilder.java:216)%0A%09at
org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:193)%0A%09at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:139)%0A%09at
org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)%0A%09at
org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)%0A%09at
org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)%0A%09at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)%0A%09at com.google.common.util.concurrent.Callables$3.run(Callables.java:93)%0A%09at
java.lang.Thread.run(Thread.java:856)%0A%0A%0A%0A

=== device info ===

%0A%0ADevice Model: Jolla%0AAndroid Version: 4.1.2%0ABoard: unknown%0ABrand: Jolla%0ADevice: alien_jolla_bionic%0ADisplay: JZO54K%0AFinger Print: Jolla/alien_jolla_bionic/alien_jolla_bionic:4.1.2/JZO54K/eng.erin.20150306.110700:user/dev-keys%0AHost: erin-ubuntu%0AID: JZO54K%0AProduct: alien_jolla_bionic%0ATags: dev-keys%0ATime: 1425611265000%0AType: user%0AUser: erin%0AConfiguration: {1.0 262mcc7mnc en_GB sw360dp w360dp h592dp nrml port ?uimode ?night finger -keyb/v/h -nav/h s.3}%0AScreen Layout: size 2 long 16%0ADisplay Metrics: DisplayMetrics{density=1.5, width=540, height=888, scaledDensity=1.5, xdpi=240.0, ydpi=240.0}%0AMemory Class: 48/128%0A%0A%0A%0A

=== saved exceptions ===%0A%0A%0A---

collected at 2015-08-06 16:04:06 +0200 on version 0.13-beta (10013)%0A
org.bitcoinj.core.ProtocolException: Error deserializing message 0101110087b88f89154291bd1c21baab0e283adf7665e91341de0d8dbeba64386c944196937af73956ef026ba241a1a9353cd1dd70a368b9b4fdf890d85fd11185691928c667c3550e05051a0000000001000000010000000000000000000000000000000000000000000000000000000000000000ffffffff310310a0052cfabe6d6df658fb392c3561e595f21d37699f1a238f3f133cf830a0664b8d5084dbad38d22000000000000000fffffffff326540100000000001976a9149625d55cc95d16453d7c9ef580bfef7f14bb6b3788accd5d0100000000001976a91463d6e29e09cf1064bc4e5f0152a914435e87f90b88aca5610100000000001976a9143471f062962e11e90bc9fc61bb39fc542467c47288acd16c0100000000001976a91469b42308b5c2c502001042ac63e62439c2f7879188ac23730100000000001976a914bc1b806175a317039a67981b70b122883a2200ab88ac27750100000000001976a914c05870357ed56d2229d1ad2842cacc2d9adb432d88ac21780100000000001976a914bbd74748a7b6138e2485ffc1b3d8d0bb2cec422b88ac768b0100000000001976a91424e469e9b8c9b3487378717d357c19f8ed062fa788acbbe20100000000001976a914016a638da741466c7eb454718593cabaa3c52ca888acb4e80100000000001976a9140f7627c634124e4d68f2c838ffc3156bf659543488ac8fed0100000000001976a9149a96d5c4796588ef25baabe337e752ba177d3cf288ac78ee0100000000001976a914cc15d26acb265a9a579002f5d75904defe907edf88ace9f00100000000001976a914d0c8a7fe08bf2317f0c198e5ed69d7b7563a980a88acdc810200000000001976a91493bded4187f898fa9f6496dfd0e94651b30ad02888ac87910200000000001976a9145fc6d7fa84a47d63c3b3f48c1c472a5e6eb52ff888accbaf0200000000001976a9140e7b6447d53e989a90619353f8d9d91c95b7b5d488ac9dc70200000000001976a91482d7868c8987af8c158c3ac266ad84bb6782862288ac44ca0200000000001976a914efe4a88a5e981cd0ffbb2172e5d53d04a4f8858288ace2d40200000000001976a914b9b7c5a35c9df0bb113689f4aaa74276f55413d288ac8cdf0200000000001976a91404d6b174978fa483e8f8546362def58caaa4d07288ac02f40200000000001976a914ca5233bee183e66639fda8183dfb99dea51a9da688acbe370300000000001976a91496c644cd188615eb5041a655dafee8b8fb92a22388ac6a390300000000001976a914b3cd725ae500d5c1b84a16381c21a8e587e186dd88ac84440300000000001976a914557a46354b3061c60cd8fcc334e83581bfc4a6e188acdc520300000000001976a914265f1fc0aaa602c86bd34b05d82aa2e2963f920588ac7d6d0300000000001976a9142600a4921baf711dc30a47705b6012bda87388da88acad890300000000001976a914f19638ad0dd4f508a756e1ad7492beee46d7652d88ac9f090400000000001976a914d9fe02df526cd3af03c70520ac5d757dfb3e7cb788ac90170400000000001976a91429fb6d52dc3c0f1891332a8ead38eba44f0e588688ac8a320400000000001976a9141e7ca42119893a17616f7d4f28c44de860f8cf0088ac91580400000000001976a9143d47986f727402feb3df5134dff583af4ace807488ac32610400000000001976a914e8adc66b62aad05f17e8d14d0bcc1b8d5703827188ac66b50400000000001976a9148d3aba805295dfb3bbf41ac8d59a149088dd37f088acb2f30400000000001976a91406d18507d4a8526687dc1ee0a225f2fb6e365c5888aca74c0500000000001976a914cfd07b1fdbf269517f721873952a2ac902021fd888acee600500000000001976a914d6aa128f24c6c2d3a94e1fdaf601634b4042141c88ac636a0500000000001976a9140e608c6b957a50c54a291783069b626d4e6e2f8d88acca7a0500000000001976a914d8485ef946630762ddcbae9428580f5ad6d99cc388ac659d0500000000001976a914f54e8b762ff17c06a71f2a523dbe51238d523cfd88ace3b50500000000001976a914c31e895bce22626780a611097fed7efef04c3c9788aca5cd0500000000001976a9142d879a0a340bab53efa3434bf6044a18285be45688ac3f360600000000001976a9140b874ab588207ccfe6e9265346c3c08bf8b52d7188ac9e8c0600000000001976a9143501af2627792ae25e61ea1141a69253e54d5fa388ac0cb40600000000001976a91409cea2e5fe401e5a1ed031d12f8e727c02241d7c88ac56850700000000001976a914b7ce480cef9f57dd44e4f7a63843126bb5b35e5788ac13b70700000000001976a914032e12a29c825297b1c7a7a68fb5060ea724e17a88acba1d0800000000001976a9145e85ee917f2ea8f267dffe98f9c45333de7e9dfe88ac9c680800000000001976a9141aef4d2f748ec7053989347f9825a105b3b72f8088aca6830800000000001976a9145e83b2ef86170a96dd373edc71d454ab8d561a2888ac41cd0800000000001976a914a0530c34149b2d650bf3f24e48925ec9cd1c2a6988ac2e4b0900000000001976a91495fedc518c216bc0e8ccfabb1be676fc744c76fb88ac049a0900000000001976a914bdc8d8f9fc846062dcf9a59fd06c095cb308147488ac369b0900000000001976a914f6a374a20e80cf6f8a117c691a453c1fa39baee388ac39af0900000000001976a914993a206d70e2b8abe7b3a24ca4c4c0cea443160d88ac340f0a00000000001976a9140809d9e2b5011d4719efed4be816d072965493de88ac284b0a00000000001976a91407d1a6b4c7868291f217a0dc5bec029ec98018c588ac2c5e0a00000000001976a914c63fc62be992d4fe7e96e92f2d8cb678a71187a288aca98a0a00000000001976a9148fff6f9995c6305000642f3eccf6102c1721701a88ac03d90a00000000001976a9143bbde305c474323adb600dd54baf122cf311c60f88ac1c040b00000000001976a9148f928db8f5242c591ecc51f191207542b2a496ae88acbc6b0b00000000001976a914c10dfcbf3366666558e152a6e51fe62ea10905f788ac7b710b00000000001976a91483eb0e3545d06df9d87e7ed77248fb8408f5efe988acd48f0b00000000001976a9145d2b3d7ae9ef3cfbb2294f877b3b19ae7736847488acc7190c00000000001976a914614665a7509eb1288013b89ecc7f0f4444f28c3688ac2a1a0c00000000001976a9142710a8c44d7c6bd7824dd0cadd80d7993e8c301088acc9570c00000000001976a914c7ed69f012e768f821056df6744975d53eba3d1088acd7830c00000000001976a914389069d174568b8e0602b4a94ae8e05aa87114ec88ac0d8c0c00000000001976a914ad7988d7552ded08fe3ac7a94fcc9e4a269fd59f88acd0b70c00000000001976a914707d35ac85b182e8f79c446affe856938684553f88acedde0c00000000001976a914664487c72af54c56e6ed0cc6865f77f777ea28a488ac4c5a0d00000000001976a9148fdfac7894d9670dfcb8fc321399ee1d09c0293788ac606a0d00000000001976a91408c5a8a9e5be66e0d04f97813f93a3861ff4bcc688acdc9d0d00000000001976a9140690bb7c17350c34cdfe172ecf442966cde3522288ac9fb50d00000000001976a914949f0f85cc31ce3e24e5642e47fe98776dbaea7888ac4dcd0d00000000001976a91452ebe14b4170dfa4fc001968b689f9832000fe3988acd3580e00000000001976a914e7310be191486c26dfa0ebc9824b25f335339d3788acba690e00000000001976a914df6164e79ee2bbb9d7de3cc1f0edf5c367451e1188ac55d40f00000000001976a91447242b85c3ad6973979bb1b64212a7f931dd915288ac27d60f00000000001976a9141a916ecfd533c95d8c1bbdc19fba2e615a15e85088ac7a541000000000001976a914c874705d9cc458e34c999a69829e3f81b4fb1b0c88ac65661000000000001976a91408ffc837663bf40e2821b856a0960d9b38c48b3e88ac82c11000000000001976a9145a6a337a5447923210fd3f6d8dfc11b6723f81df88ac56251100000000001976a914986e5d11072bb3d697fc94d94638c9f1170703c088ac4f591100000000001976a914d63ae02cad41643d79ba4651fdf664ba87209de588ac3dcf1100000000001976a9147d4604279d053aed391dc76ee04103b0f9ca458188ac47d81100000000001976a91462f208af94b00c05128cfc7d4e1779914f1266d888ac41941200000000001976a91495213765b708a57e214c15520ec1fbe2cba6815488ac4cb31200000000001976a914f13126ffd287aeeb70531ab4d4cf4658391dc5e088ac62ea1200000000001976a914cfcdc83e389c71a5ce55b268171bce3a81a6b62488ac03fd1200000000001976a91417881c8cf9654f50ac205ed8c9dc3a4970d9c62188ac72061300000000001976a9144698e7f38b5b1547270359be9478329bf5b4f39188ac42ac1300000000001976a91494abbd1cc44585810323585addb1e993717de70c88ace9ea1300000000001976a9144ccfee8d196d5880fcaedc18f73a7b2937c0342588ac66ff1400000000001976a9148a507397c061289053801341fff438bbc9a546e388ac880f1500000000001976a914dddc8d721decec019f67c99ebb9533205763ab1488ac92541500000000001976a914633b4fb39c710212e1373c29bebafe8aa6356f3088ace8681500000000001976a914f95f65aaa34a8a5fbc38edae4641c9b3b826a40188acc6941500000000001976a914fb212bd0a013c906c556e9b764916677edcb29e188ace5971500000000001976a914e1c0dcf3775c0f9d5131e781fb11a7b0f858195488ac24e01600000000001976a91408ffc830f614c5eb0938a2b4793cd9ab50b1fa3b88ac2bf31600000000001976a914b005ef7765e2e905a44496b079d83eab8f370ae788ac14321700000000001976a914e2e6225fef18ddca411ae3fe46b9dd2b98ca048688ac59761800000000001976a914cb17b02b7b146b5385de1f9416c2f2221e54015188ac0fbd1800000000001976a9141f9f3e1b43823c2bfe5aeecd582f4922619e572288ac8d861a00000000001976a91440998dac0a6440fb8a6ee606f0e89936e2f448c088ac5cb81a00000000001976a914dd38381ca3815a8d66abaa0e3b7695f9cf12af0a88ac8ec11a00000000001976a914697c36ba8ee06fecc45155b077b77f9fb49a43d088acbfeb1a00000000001976a914838151b12bbba4e843aa878ad4cabea5ddae016488ac37681b00000000001976a9141be25970b163cd3a02e0079488f3fa960c57fd9888ace1d11b00000000001976a91441a6ababa839ddd38cab8ac8c9004838eabec8a988ac57131c00000000001976a914052a67d334c55a38fc825ae04da75034470d85b088ac68221c00000000001976a914e71cd2fab85b4d0a984dc08f29159c60bb8b839988ac785c1c00000000001976a91401757db965c33c530b8b0abe6003b0873918e53888ac0d671c00000000001976a914159bb0eb02cb1c35f5d4942420d23fff8b6ae62d88acc9931c00000000001976a91404adaa609dacbd642be6cbcd24520d4d19ec35c288ac0ee11d00000000001976a9148e652be4a3475cbeda073956e87783bfaa32053d88ac5d8e1f00000000001976a91434533e6a1fbd140b8f207ad1a1697ce44529cf1488acfb9a1f00000000001976a914c2c420dc7d821bc5a01ffa182346a7e9b5615aae88ac3b9c2000000000001976a9146e3984f6a5e61b58b639ddf59e5e45d7b2b4b27688acf0bb2100000000001976a914b764dd0a8cc279f9715670c2d741e4bb95b58eb388acd4a72200000000001976a9149a29110e38f0c33f2c8d65943dbe3b46a55ca27988ac6d622300000000001976a91489105878c3678e865cd9624f5a1e8f83ecf2d78588ac3c6f2300000000001976a91436ce0f2d0baff5cdd459db1f885a1351fc7f916588ace3562400000000001976a914c52fdb50c6777a83c39469c9500c91ab1f1c4cd488ac7b7d2400000000001976a9142e1cb3de456ebf9461b3401c3b6ab9e9da938ea588ac22f92400000000001976a91407de36aa88b78d8229d44efaca0c06a359fee79088acef642500000000001976a9140b617b420c55deb57e5d693162f66a5dd194c81988ac17ab2600000000001976a914a77641643b0769c0f09c4ed1b66451e35852fe6788ac18612700000000001976a914f1012e2c3aa77ff2630caa9ae7e6278441c981bd88ac25222800000000001976a914eb9fc75c74c1041154ddb8514bcff19dffa6e1d188acc70e2a00000000001976a91463528f401a25468f141ee6aff64257ab5a991aaf88ac3d172b00000000001976a914a5f5008a39ec65f4a846999cd23774b41c74aba488ac711a2b00000000001976a914dd0a49505d476bdcbd61fec3e7103b26e46c4e9988ac9a3b2b00000000001976a91437c27917761a119172879d0155229ba7a71b51c688acf70a2c00000000001976a914356469ddbf0ec76d74604f65553d7b26dee619ee88acb2282c00000000001976a91407de36a5289b4cb7fa2aec977b2e53931732ef4788ac5f4f2c00000000001976a9146f6aa8e188e6cc0b7afde34091b5d0690ba6ce9988ac19902c00000000001976a91489d3754e07b8a05f2d06b79fc6484757299f2bcf88ac73022d00000000001976a9145d9a2105c0804fea0edc766a69d49b10ed23e9bd88ac2af92d00000000001976a91408ffc82af8ebae0dabed8b705ab83b0b392dcc7488ac3a822e00000000001976a9145b4f1d699593a88670c6c1f34055e88d9081fd3b88ac1a1c2f00000000001976a914b405ab1c5ca388d5a4961acee4530da57e3555c588ac21972f00000000001976a91480662a72e4402bfc79e66a2cd59a6f6a145d49a288ac49783000000000001976a91442f3f5d6497a46a5bc379b918708d08c22a5184d88ac7ef43000000000001976a914d6f71f8e7adbf261bf4f989446e5130d6dcf640288ace7073200000000001976a9142492fc0181777fec3c6001e034ac5de53fea94c288acca773200000000001976a91427b4668a922eecb79411cc168475ef029b820db188acff933200000000001976a9149eb8b988597d392b8a6b24fa8c4b22a6ae8db24c88ac7ed23300000000001976a9146ad798d913b91084410069ae66103a19ed1d9f6088ac4ae23300000000001976a9141bc67f0fa2f845e1f58cd127a813518ebb391ef888ac73f13300000000001976a914e921d3035ee97c5f809c803e4c2741bb845cacd988ac5a363400000000001976a91400317a6e4e4a1418a1fd37484107aa7a4cca208788acb86d3500000000001976a9147f2dfb7479c28809d32c4475eb17875caea7d06d88aced8d3500000000001976a9141ef1b80e6094d7ca305ce2e44f4f02cb103e128988ac2f643700000000001976a91477f19d8000341beddf6812a4cf428969c34cc80d88ac58de3700000000001976a91409dacbf95ff961b057b74428f781a15c26b0193388ac16573800000000001976a91491326ea24c845cd78eb460cf4c91d6111736237488acdb503b00000000001976a914eb8816b2973bd921c9cf262ae5ff1c043f8e2d7f88ac5b813c00000000001976a9145765e6ab03757ab48b7e1de55c183904bbb844d388ac1dfe3c00000000001976a914580fe4e39f67aedaf460de94bb9cde7be153cc6188ace1043e00000000001976a914d1b5a3c69e606e5eaa3a98732035b7810c4626cb88ac1eec3e00000000001976a91426bf95123c1c1a331e34f96892e50c316557d82b88aca4fd3e00000000001976a914cb7616c98f0ad198957ae6c0a98f56bd4503803288acfc353f00000000001976a914e62fb2e520e972cd62686469a08bf59b8190a32088ac39984000000000001976a914888bb97f88820d424bb2f2357f1716a4598f379888ac67b04000000000001976a91412c164a87397d05d1a4a8006e6459add9ce3c22f88ac98db4000000000001976a914f68327493cc7763c18d50b6c7944b25bd225256c88ac97b44200000000001976a91463cbce769fcca0ad709f90abc8a8e82142f956d988ac5c0f4500000000001976a9145100088d8c152331e814febda1e0956b8c45d9c888acd56a4500000000001976a914ed7411aabacb49be9a4326cfa7212e20b0d7b01388aceb894500000000001976a914e0613c79551f06746d86aec98ab7b0c4bf107d0188acff774600000000001976a9141d27cdd4a421b60a71b7e9220cf52ac4547dabd788ac76c84600000000001976a9142acb553c46fdbec7367a344f4d46c049af8cba6288ac98c14700000000001976a914dbee77d2aaeda4f7eda3ba483fe3fa0b87efeb9388ac00d04800000000001976a9145c92232239b0b2aba3408e633fe94ab1fba135c388acec434a00000000001976a914f6291009ee2787a78d9c2fc5814bec12799bd75288ac0f564b00000000001976a914612792fadd4ae9b1883c66d5a73c7f50911d8a3688ac14e04b00000000001976a9142e66df7163166ac7339c9a4306ce7a1a3b9d61c788ac83cd4e00000000001976a914cbeb07cd4a9b6e55ef58b5c91d5444fef999ceff88acaa5c4f00000000001976a91458f09cd444d334a2be8e20457b40f6cf7fe917dd88ac34814f00000000001976a914bd50057b57b5b44c56da410233b3d424b61ac8af88acf5de5100000000001976a9147a296d10a7558d816ca33de47d39b35bbb881ee088ac359b5200000000001976a914c2a17364d2dfc4d24462f9290055a5d998344db888ac69b85200000000001976a9148ab88cc2aa9bb97a82943a725f8749a01940291888ac9cba5200000000001976a91483d884f35c8b2b1ad9a890275f7ddcb9ef10063988acafa85500000000001976a91406398f2c64fbe6388f258caf359f45377087156d88ac05085600000000001976a9140a577ae6c39160315e05683600a5a37e5ca845b488ac2c765800000000001976a914a4f6c07f21e25ca4a5eddcb030450be061e4f4ed88aca2085900000000001976a91481a5abf3619cf39526327ce37606506f43fa322d88aced215900000000001976a91415f7061dbb324b172ae7c09435d26cdb1d16c3c488ac287a5c00000000001976a9147e205faa283976b0de1997bbdaa0ed3034240f9b88ac7a1a5f00000000001976a914c7aca55050f7d76868908add24568fbab91ad2be88ac03b06200000000001976a91433fa320e8e38110a670bd0435d7f878b0923f86d88acdac16900000000001976a914d174612685ac19215d8282e1de797fcfca18fa9c88acc7a76c00000000001976a914eec8f0793e8977b891df25661f6ae739ab284fa788acc80c6d00000000001976a914cf1a3451d2da9d6cffb686e3fc7483cfb722278f88ac8a0e6d00000000001976a914b1fd81918e34fac8c4875dfe15620acfb46ef49688ac7b8d7300000000001976a9144283846b7a9c98b45f205200454fa4bd842d2dda88ac573f7800000000001976a914301aa42fad784dcf1409656d93d554f34126091e88ac2b867b00000000001976a914c6052ea9e2bf38c68e7bc8daaf791ad68d119da388ac302a8100000000001976a9149209eaedbc248ad582560ffdd420b3352042670988ac10548300000000001976a914722384d02c1fe7639f44ee967154c2bc24a157ee88ac0ec48e00000000001976a914cfbf579977645d2b3be46ca09f2e724fc9a3a41088ac7afd9000000000001976a914750c29378fece4c9e853fb6f8470e1524e2bb54688acf1079200000000001976a9146df069828879f2932246ac7e332a55980d0afdc688ace8af9300000000001976a9149244c19100effe8d457ea336ffd481d2a22a208f88ac1e9f9400000000001976a91428a188b783859c55490418cb10f2fd9a7ebcca9b88ac38159c00000000001976a914c717152dc2e1b2c8e1d11645828188513ccf22f388ac7739a600000000001976a914c1ca2a776c5908664c9a2977c16fb641f428edb488ac1f29a900000000001976a914530a43f79d7f83a69e4c70a3e3104aabf60614ff88ac8f5cb000000000001976a914638c20458832057ac20f5c700dd676ba1ecd0cc388ac183ab200000000001976a9144d27c1b943a911674c1ccc38bcb2c807bdcedba688ac3134b300000000001976a914fcc03dd43bf59391f8643f8a7b46eef7b8708f1c88acc062c600000000001976a9147d6012667a507ffc167fe0ae5a5ea6ffb7f6f09788acea3ace00000000001976a914560917e9f6790722485027121aac3da358a3e81c88ac864dce00000000001976a914b033fd664031cc3aa3c3df2d45bc70a3e351388088acdb7cd000000000001976a914971603936050727183649d4c07e2c264823cc83e88aca6e2dc00000000001976a914e806dfc0ebee2334e363e797ceb334f1a36eef6388ac33fbee00000000001976a91424317cce92a24cde92a13bda94edc4b3a58ef49d88acf003fa00000000001976a9144ccfc84876a1cd1e184faf5c59e1c214cfc6c19b88ac5e12fc00000000001976a91499566b93376903ffd4bcc811797579d772f33cb588ac9b8e1801000000001976a91413c2c000bc979531b6f2a5f53c237c2cd2c8256288ac7aafb201000000001976a914fb02f1084f7d06601e53540ec18a0e5ee8bcd0ad88ace710b701000000001976a91436d58dcc70e150d8343fc67bdac846049b45f06188acf77abb01000000001976a914b40cdd2d3e0d0a50b774d7514df1c23eb7f0ab5688ac0a64d401000000001976a91416ed65355b0a06c884ef43db5d544e6eb62c459188aceecfe701000000001976a914c73eab3abff961e95d993c12ff86fd4b7530225988acbf692902000000001976a914ecc2daa2ed9fb7933854c8b80a724cc51e71108288acab1b4202000000001976a9141d9e4ebb1df1dbe5acc779dee8acc05605c89a8988ac89e95502000000001976a91486487c68973d87baa2a953dd46781139df0df1de88accc3d6f02000000001976a9140dbfb73bef742319ea15f14e2b4a806e9159433b88ac46a8f902000000001976a914fcc21b073eb9ae6f55363031f9591dbe87bec84f88ac149d3103000000001976a9140eb219eecef1a0205b040311f165646bc63b710788ac81ffa803000000001976a914140f0e13a9517eeb08f1af08fdd12ec619160f6b88ac47d15005000000001976a9140f69c105fe00d56f0a31d835370606bb7d7b7a0788acc2a4ef06000000001976a91459ff1d12e8e574ef6dfd656b728fce1b8f77dada88acb6adf208000000001976a914f19638af91481e45a018c443aa909068ff4835da88acc30e7f09000000001976a914ae6a2f5b8268c54a9d1ac5d8a44551443240f3c388ac4611ff0b000000001976a914e9a07a2b5be7f884b345118d242f572c4700000e88acc1b8ff0c000000001976a9147650d035a8890f06b821c948c6faff39035e3fd088ac7e70e617000000001976a914a9bda3b431b0b9e096457e06de5527ac1dca6daf88ac4df52e0000000000434104ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664bac00000000000000002a6a2859d660f378486c7466d2f3fcad9a3c8c25ad8029aaebc197a30f2ebb8a16b613070000001c00000000000000c6c59b70885437d29928568410f738ca4fd7e85588fd994e1f010000000000000accedf80d07432d9c29338c32503cb4cd5f75f9f356664d6d343b72097be77a9b4877fe25ecd98865f1c0e04dbe6d45b950809e9c39ee202fc6d3fd78fbe4615035438317e7f48ca295933933a88d87e20973f8eaa2b041f7bf3e253c16c551577ab9fca6e077bb1cdf8cd61a20bcfba179489b7c4e1ed612d71c18cb92731abb811ecf4c3d454ae24d9ae38c9ab37c9b7af44176814638f9c1361334c920a32ea7e0b23d2c14a1410f3fcbcd117af5fded7d98afa32a213ff440f3d8e4cf47b5171a3cdb00a83cde72854289100508d040450a38ecaa3d65c7206edfa223011695c722ae0abc54cfd10aced66ebc81fdb6ad1bb9e0abcfce8aa2bc03cbae5cfe1d2d3b1a0e175ce0ff2e7bd3d84c622efee6c121685d7990583b21efbbb577542fffe18ac702b690a1828d489e08d5c8ccee0fc71b736f1cc3b5f0656b3f37e6000000000500000000000000000000000000000000000000000000000000000000000000008c8f9cc47670b399c301e72a2d54021dac17cf84b7865ae2bad1cb1bc3749d03ddeefea5ab23dd74cb308e286ea899f9c13d7139482f29d78e010f3d7d1e2f1dc2dd9e323bdaf23455bc11eb418a743d002875459396fc1f3b86496d15578cf631181cf39fdae484fa2abddef670dc6f4adb183a394898feb7ab6087fafa7f0b1b0000000300000096a2224469005c2893939f34b34ff0c80c3dc1a3622074040000000000000000003e5f2591f1847deaab8926f42974ad64d3d2cab59407c231288f2f7d9e37635569c35515081518925dc60b0102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff08040e05051a010152ffffffff0261927a050000000023210325df428a228016d230b2ddcda1b2d56cdc14fe9724587710ba30e80358c540c9aca29b661e020000001976a9148b322d581d911694bb2ff85086fe93f5d192ee3a88ac00000000854f0000%0A%0A%09at

org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:193)%0A%09at org.bitcoinj.core.BitcoinSerializer.deserialize(BitcoinSerializer.java:156)%0A%09at
org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:149)%0A%09at
org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)%0A%09at
org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)%0A%09at
org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)%0A%09at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)%0A%09at

com.google.common.util.concurrent.Callables$3.run(Callables.java:93)%0A%09at
java.lang.Thread.run(Thread.java:856)%0ACaused by:
org.bitcoinj.core.ProtocolException:
java.lang.ArrayIndexOutOfBoundsException: src.length=9245 srcPos=10563 dst.length=80 dstPos=0 length=80%0A%09at
org.bitcoinj.core.BlockMergeMinedPayload.readBytes(BlockMergeMinedPayload.java:156)%0A%09at
org.bitcoinj.core.BlockMergeMinedPayload.parseMergedMineInfo(BlockMergeMinedPayload.java:90)%0A%09at
org.bitcoinj.core.BlockMergeMinedPayload.parse(BlockMergeMinedPayload.java:41)%0A%09at
org.bitcoinj.core.BlockMergeMinedPayload.<init>(BlockMergeMinedPayload.java:32)%0A%09at

org.bitcoinj.core.BlockMergeMined.<init>(BlockMergeMined.java:53)%0A%09at
org.bitcoinj.core.Block.parseHeader(Block.java:215)%0A%09at
org.bitcoinj.core.Block.parse(Block.java:278)%0A%09at
org.bitcoinj.core.Message.<init>(Message.java:117)%0A%09at
org.bitcoinj.core.Message.<init>(Message.java:153)%0A%09at
org.bitcoinj.core.Block.<init>(Block.java:132)%0A%09at
org.bitcoinj.core.BitcoinSerializer.makeMessage(BitcoinSerializer.java:205)%0A%09at org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:191)%0A%09...

And the wallet.log looks as follow:
Code:
22:38:35.327 [Wallet autosave thread] WalletFiles - Background saving wallet, last seen block is 10000/000000000476f76304230b34d074a20822f2250f5c04c4424749a62831837aca
22:38:35.613 [Wallet autosave thread] WalletFiles - Save completed in 283msec
22:38:45.798 [NioClientManager] PeerGroup - [109.73.173.119]:55889: Peer died
22:38:45.844 [NioClientManager] PeerGroup - [91.108.68.164]:55889: Peer died
22:38:45.846 [NioClientManager] PeerGroup - Download peer died. Picking a new one.
22:38:45.848 [NioClientManager] PeerGroup - Unsetting download peer: [91.108.68.164]:55889
22:38:45.855 [NioClientManager] PeerGroup - Setting download peer: [185.38.44.6]:55889
22:38:45.885 [NioClientManager] PeerGroup - [185.38.44.6]:55889: Peer died
22:38:45.887 [NioClientManager] PeerGroup - Download peer died. Picking a new one.
22:38:45.888 [NioClientManager] PeerGroup - Unsetting download peer: [185.38.44.6]:55889
22:38:45.932 [NioClientManager] CrashReporter - crashing because of uncaught exception
java.lang.OutOfMemoryError: null
at java.lang.String.<init>(String.java:432) ~[na:0.0]
at java.lang.AbstractStringBuilder.toString(AbstractStringBuilder.java:642) ~[na:0.0]
at java.lang.StringBuilder.toString(StringBuilder.java:663) ~[na:0.0]
at ch.qos.logback.classic.pattern.ThrowableProxyConverter.throwableProxyToString(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.pattern.FormattingConverter.write(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.PatternLayout.doLayout(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.PatternLayout.doLayout(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.OutputStreamAppender.writeOut(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.FileAppender.writeOut(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.OutputStreamAppender.subAppend(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.FileAppender.subAppend(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.OutputStreamAppender.append(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(Unknown Source) ~[na:0.0]
at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.Logger.callAppenders(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Unknown Source) ~[na:0.0]
at ch.qos.logback.classic.Logger.warn(Unknown Source) ~[na:0.0]
at org.bitcoinj.core.PeerSocketHandler.exceptionCaught(PeerSocketHandler.java:227) ~[na:0.0]
at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:181) ~[na:0.0]
at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217) ~[na:0.0]
at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75) ~[na:0.0]
at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111) ~[na:0.0]
at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60) ~[na:0.0]
at com.google.common.util.concurrent.Callables$3.run(Callables.java:93) ~[na:0.0]
at java.lang.Thread.run(Thread.java:856) ~[na:0.0]
22:38:45.934 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.de: got 4 peers
22:38:45.953 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.com: failed to look up: java.net.UnknownHostException: Unable to resolve host "seed.winc-ev.com": No address associated with hostname
22:38:45.953 [PeerGroup] DnsDiscovery - DNS seed dnsseed.wlc-dnsseed.ssdpool.com: got 3 peers
22:38:45.957 [PeerGroup] PeerGroup - Waiting 848 msec before next connect attempt to [109.73.173.119]:55889
22:38:46.810 [PeerGroup] PeerGroup - Failed to connect to [109.73.173.119]:55889: null
22:38:46.811 [PeerGroup] PeerGroup - [109.73.173.119]:55889: Peer died
22:38:46.817 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.de: got 4 peers
22:38:46.818 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.com: failed to look up: java.net.UnknownHostException: Unable to resolve host "seed.winc-ev.com": No address associated with hostname
22:38:46.819 [PeerGroup] DnsDiscovery - DNS seed dnsseed.wlc-dnsseed.ssdpool.com: got 3 peers
22:38:46.820 [PeerGroup] PeerGroup - Waiting 64 msec before next connect attempt to [91.108.68.164]:55889
22:38:46.887 [PeerGroup] PeerGroup - Failed to connect to [91.108.68.164]:55889: null
22:38:46.888 [PeerGroup] PeerGroup - [91.108.68.164]:55889: Peer died
22:38:46.889 [PeerGroup] PeerGroup - Waiting 999 msec before next connect attempt to [185.38.44.6]:55889
22:38:47.189 [main] BlockchainServiceImpl - service start command: Intent { act=de.schildbach.wallet.service.cancel_coins_received cmp=hashengineering.worldleadcurrency.wallet/de.schildbach.wallet.service.BlockchainServiceImpl }
22:38:47.890 [PeerGroup] PeerGroup - Failed to connect to [185.38.44.6]:55889: null
22:38:47.891 [PeerGroup] PeerGroup - [185.38.44.6]:55889: Peer died
22:38:47.922 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.de: got 4 peers
22:38:47.924 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.com: failed to look up: java.net.UnknownHostException: Unable to resolve host "seed.winc-ev.com": No address associated with hostname
22:38:47.926 [PeerGroup] DnsDiscovery - DNS seed dnsseed.wlc-dnsseed.ssdpool.com: got 3 peers
22:38:47.928 [PeerGroup] PeerGroup - Waiting 387 msec before next connect attempt to [109.73.173.119]:55889
22:38:48.317 [PeerGroup] PeerGroup - Failed to connect to [109.73.173.119]:55889: null
22:38:48.318 [PeerGroup] PeerGroup - [109.73.173.119]:55889: Peer died
22:38:48.439 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.de: got 4 peers
22:38:48.441 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.com: failed to look up: java.net.UnknownHostException: Unable to resolve host "seed.winc-ev.com": No address associated with hostname
22:38:48.442 [PeerGroup] DnsDiscovery - DNS seed dnsseed.wlc-dnsseed.ssdpool.com: got 3 peers
22:38:48.444 [PeerGroup] PeerGroup - Failed to connect to [91.108.68.164]:55889: null
22:38:48.446 [PeerGroup] PeerGroup - [91.108.68.164]:55889: Peer died
22:38:48.450 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.de: got 4 peers
22:38:48.451 [PeerGroup] DnsDiscovery - DNS seed seed.winc-ev.com: failed to look up: java.net.UnknownHostException: Unable to resolve host "seed.winc-ev.com": No address associated with hostname
22:38:48.452 [PeerGroup] DnsDiscovery - DNS seed dnsseed.wlc-dnsseed.ssdpool.com: got 3 peers
22:38:48.455 [PeerGroup] PeerGroup - Waiting 937 msec before next connect attempt to [185.38.44.6]:55889

Rik


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 13, 2015, 04:26:58 PM
Looks like you're getting an out of memory error. I'll pull code and try it myself. I'm getting a different error, due to some messages from the C++ client being apparently malformed. My sync consistently stops somewhere between 12000 and 16000.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 13, 2015, 05:48:20 PM
Scratch that, my memory was wrong. It always stops at/around block 11418, trying to download the same block over and over. Here's my stacktrace, if anyone more familiar with bitcoinj can take a look:

Code:
03:20:50 13 DownloadListener.onChainDownloadStarted: Chain download switched to [127.0.0.1]:55889
03:20:50 13 ConnectionHandler.handleKey: Error handling SelectionKey: null
03:20:50 13 PeerSocketHandler.exceptionCaught: [127.0.0.1]:55889 -
org.bitcoinj.core.ProtocolException: Error deserializing message 0101110073e37483762f0a88d4b6462c4182fdc29e824fc882c528854572ad02000000008546f8f97ce59af5206ee047aa8fa50eac2c17bd940552944126c295ce376a7f668179559cf0041c0000000001000000010000000000000000000000000000000000000000000000000000000000000000ffffffff38031580052cfabe6d6d1e79ff31c5e10cda9b1d3651b9ed5228b2adaa2c8bc13e50c9c4dea473c770cb2000000000000000062f503253482ffffffffffd1f01363d0100000000001976a914111b2b13a5a53cd6d02bfb422e6a6640e70b4ad988acd1760100000000001976a91407c72230d9e5f8c49e1fc8f6cb07951def37ee9888acdaad0100000000001976a914ef3388db0052a623e22f938f0497794efce2df0488ac51c00100000000001976a914411a810ec88df7f1101842a3936719e9cbc8e39f88ac7ec10100000000001976a91449dea5f5e80c3b3dd5f084f8f7675560f91e53fd88acbfdd0100000000001976a914b2e5d22fa4e0317c46478bf3d4a2af3ff83d2b7088ac2de90100000000001976a914fa26d78d7a348292908048ccec98097a6051cd9688accdf20100000000001976a914b405ab1c5ca388d5a4961acee4530da57e3555c588acdc560200000000001976a914758609ddf67cb4f29016501d0dd85acde32d640388ac9e670200000000001976a9147ab41a189ce64040af10e473e04dfc453cb7733a88acdf760200000000001976a91408ffc830f614c5eb0938a2b4793cd9ab50b1fa3b88ac1b800200000000001976a9145594b4a15a0c6c87b4f1563f164cc0152db0d96f88ac44920200000000001976a914ca5233bee183e66639fda8183dfb99dea51a9da688ac1e9d0200000000001976a914aecaa2b694cb571ba18b5da5b86f50d25f6184a588accfa20200000000001976a9148fff6f9995c6305000642f3eccf6102c1721701a88acf0a60200000000001976a91417881c8cf9654f50ac205ed8c9dc3a4970d9c62188ac8da80200000000001976a91426f42dec4ea1751e196f89f1ac2ecd17cbafb89488acdea80200000000001976a9144ccfee8d196d5880fcaedc18f73a7b2937c0342588aceaba0200000000001976a914bbd74748a7b6138e2485ffc1b3d8d0bb2cec422b88ac48c60200000000001976a914016a638da741466c7eb454718593cabaa3c52ca888ac25f00200000000001976a9142d879a0a340bab53efa3434bf6044a18285be45688ac2af60200000000001976a914fbbd9435db08aec0a51ce15c7e26daa196ccdd2e88aca52b0300000000001976a914ac752a7df3a2dd14ef2002349ce00c9b43d1fbdb88ac7f380300000000001976a9147e3d1dfc5a7837ad6392d780b5b8b06b322613b588ac3e560300000000001976a91482d7868c8987af8c158c3ac266ad84bb6782862288ac9a640300000000001976a914aa933038de37ed5df9c3c42c861b7ae89f07fa2d88acb17c0300000000001976a914a6e87b78cffdb2277e26e6913e362670a33e82b188ac50b60300000000001976a914356469ddbf0ec76d74604f65553d7b26dee619ee88acc0e90300000000001976a9148fff9e2c6b48b8c9ff160f62896f6068d0401f6188acf7f80300000000001976a91467cc623743440cf87a7af7b46dd54190fba124c488ac4ffb0300000000001976a914f54e8b762ff17c06a71f2a523dbe51238d523cfd88ac8c0a0400000000001976a914db619ecfc378a461122872a09ddf29c37aeb45ff88acca1a0400000000001976a9143151c3b5466842874b02e9587d3a2591eea8a61a88acb5350400000000001976a9144dfc0b493a05b3ce1cc2a28ed5380ce1d3e76fab88ac82550400000000001976a914801203fc3c8cb57c036a92769cb0eb63d6cd789888ac0a640400000000001976a91496c644cd188615eb5041a655dafee8b8fb92a22388aca26a0400000000001976a91438bdebf3debee032e8bd9d4637b775413ec0c43188acb26d0400000000001976a91406e33bb2cc5d4df9a6e0e1abe0e876b7d3ea3cc188ace7d40400000000001976a914f19638ad0dd4f508a756e1ad7492beee46d7652d88acdb090500000000001976a9141995afcf9d61260cf536043225e0ff840c4f0b2a88ac24120500000000001976a9148623e6239733557ae341dcbdc23662cce1382a4088ac5a470500000000001976a9143d47986f727402feb3df5134dff583af4ace807488acf8590500000000001976a91460871be55229abae77ad661912436aa947e1631588acc7720500000000001976a91449b2f5403c26624eed7df36c7095344ad72d04c388ac11b40500000000001976a91495e2db1c45ff7307601b8971a8915027db2ee9c088acc7c70500000000001976a9142b2bac8754de99d46e68e18518395e46a920b32f88ac5fd10500000000001976a9147d4604279d053aed391dc76ee04103b0f9ca458188ac98e30500000000001976a9149eb1fdd07ccb027bad161f37e48e1d473f226e7688ac69f80500000000001976a9143bbde305c474323adb600dd54baf122cf311c60f88ac97fd0500000000001976a914970601bfc8a9a309b2f15da91d222a12d429221d88ac352f0600000000001976a914ba45e07d26231947688f1b49025e795770c7caba88ac8b600600000000001976a91462f208af94b00c05128cfc7d4e1779914f1266d888ac6e800600000000001976a9148dadc1ab595a7e354b0993918eb8b0ef3683d24088acd7a10600000000001976a914b2f563fd35359297e5e5ac8f3ac283254190a66988ac5af70600000000001976a91463d6e29e09cf1064bc4e5f0152a914435e87f90b88ac99070700000000001976a914af8b2d32c59218cc3a0d81fa472c0bc355d6d88588ac150d0700000000001976a9145a2b6dd57ae7e29c5c2515e41afcbd1e63ceffc188acb0360700000000001976a9142600a4921baf711dc30a47705b6012bda87388da88ac424b0700000000001976a91404adaa609dacbd642be6cbcd24520d4d19ec35c288ac65520700000000001976a91460352699b55d5b675809dc72919dee067b83875d88ac1e940700000000001976a914ccbcb26d59e0f48edc0803e160465ccda174ceec88ac06ab0700000000001976a91459af234dfa9315e435a4c531886b77bf72064db388ac727a0800000000001976a9149f082732af68f490a6d25f9c736229fa5415c59088ac10890800000000001976a914b29a8fbaa60e20dc4ce47b39033c61156dae49e388ac9ed30800000000001976a914389069d174568b8e0602b4a94ae8e05aa87114ec88ac58650900000000001976a91404d6b174978fa483e8f8546362def58caaa4d07288ac4c930900000000001976a914e71cd2fab85b4d0a984dc08f29159c60bb8b839988ac66b40900000000001976a914d7f00f19e19d1d325fe71ba66f8da519a3afd4b788acd0bc0900000000001976a914f6a374a20e80cf6f8a117c691a453c1fa39baee388ac78e70900000000001976a91459a955107e778d8f5bac018e317a40e2da6b934788acbc1a0a00000000001976a914d0568cd5ae52155a416d5173260c30ca7dc1380a88ac0b210a00000000001976a914dddc8d721decec019f67c99ebb9533205763ab1488ac79a90a00000000001976a914c02cec4dbb0feb594ae771505939c8c3fcad6f8c88ac64bd0a00000000001976a914339f779148b644c42d5bbe46f1a43d2fc873a98288ac83c90a00000000001976a914b005ef7765e2e905a44496b079d83eab8f370ae788ac9b580b00000000001976a9145ad95839ba6597b51766d5c9960941c1cc2d2ded88ac4a740b00000000001976a914032e12a29c825297b1c7a7a68fb5060ea724e17a88aceb7f0b00000000001976a914c0727d3a9f5493367f19ac4ac7a4faa35f38b10788ac22850b00000000001976a9145d2b3d7ae9ef3cfbb2294f877b3b19ae7736847488ac59980b00000000001976a91408ffc837663bf40e2821b856a0960d9b38c48b3e88acb5990b00000000001976a914e8adc66b62aad05f17e8d14d0bcc1b8d5703827188ac4cd40b00000000001976a914af9090ac3ab1250da10f7c7f3df3a9be329197d488ace30e0c00000000001976a914595f90887c705f90fd5163af5d7359821da2c8fd88ac5b490c00000000001976a914df6164e79ee2bbb9d7de3cc1f0edf5c367451e1188ac795f0c00000000001976a914f066f6e95707899f98ea06a525d610a782885edc88ac2d6d0c00000000001976a914121f043be3762630d3fda1c6b15be1df111bf13c88acf4760c00000000001976a91497bdbed75d9debfb93a44a38d0bdc4a21ebd264e88ac4bef0c00000000001976a914308bb5d5b0abf4ec7c2c8ab888678f3af463f62088acc0060d00000000001976a91407d1a6b4c7868291f217a0dc5bec029ec98018c588acd1090d00000000001976a914cbdf8e0fac5fb3f11e867666e5743b37bb2ff13f88ac07900d00000000001976a9145765e6ab03757ab48b7e1de55c183904bbb844d388ac519f0d00000000001976a914c10dfcbf3366666558e152a6e51fe62ea10905f788acc5ca0d00000000001976a914281dec8dec741867725d4e03d5a716b54dd2381088ac21cd0d00000000001976a914957d49effe3ff5b6ece21509510872a02b5992ee88ac16d00d00000000001976a91489482d1c2f25d5385b597555b3497c186aacc6be88ac973e0e00000000001976a9145e24d7e12cd37b0cf8eb1d8b25fc502b3779f0d388ac6cb20e00000000001976a914d63ae02cad41643d79ba4651fdf664ba87209de588ac63ef0e00000000001976a91486f43c0e2042d4b22d92fc237741744e529c147088ac603a0f00000000001976a914b68595f0be5e90264806bbf4d1ca2aba3498c1b388acd04b0f00000000001976a914ad7988d7552ded08fe3ac7a94fcc9e4a269fd59f88ac4b4f0f00000000001976a914cfd07b1fdbf269517f721873952a2ac902021fd888ac7e5a0f00000000001976a91424565ee22555c819c3ecd8684351041b09f5145988accce71000000000001976a9149093d0372cc7aa2f2ce410eb8182fbbc42090e9688ac12ea1000000000001976a91495adace9b3e3a84b278a5033b6487c86b0c70cbe88aca3291100000000001976a91440998dac0a6440fb8a6ee606f0e89936e2f448c088acbd731100000000001976a914fb33fe8bb00297104cc3937690cb82c1fdd0794188ac597f1100000000001976a91408c5a8a9e5be66e0d04f97813f93a3861ff4bcc688ac6dc01100000000001976a914052a67d334c55a38fc825ae04da75034470d85b088ac26e21100000000001976a914dc414a839b873561169e23bdd170f2f27aec1ef788ac5a211200000000001976a91434533e6a1fbd140b8f207ad1a1697ce44529cf1488ac85281200000000001976a9145d9a2105c0804fea0edc766a69d49b10ed23e9bd88ac896b1200000000001976a91408167de195f8bee4318cf64a5c34d516731e61ce88aca4001300000000001976a914c52fdb50c6777a83c39469c9500c91ab1f1c4cd488ac231f1300000000001976a91495213765b708a57e214c15520ec1fbe2cba6815488acb0ac1300000000001976a914dd38381ca3815a8d66abaa0e3b7695f9cf12af0a88acf9391400000000001976a9141a916ecfd533c95d8c1bbdc19fba2e615a15e85088ace3951400000000001976a9147937ed708afff84d11ce34125372375080113f1c88ac06701500000000001976a914587aa50bd866d9eec811ebdea68fdf7f78c26a6688ac89731500000000001976a9140b617b420c55deb57e5d693162f66a5dd194c81988ac61791500000000001976a9147f2dfb7479c28809d32c4475eb17875caea7d06d88ac23c31500000000001976a914e1c0dcf3775c0f9d5131e781fb11a7b0f858195488acba931600000000001976a914cd20af83bd8711dc8a5280c9e6461dd120e8d8e888acc9941600000000001976a9144698e7f38b5b1547270359be9478329bf5b4f39188acea941600000000001976a9149702a5b713a16369ba29377b3d23155e396d782e88ac88a51600000000001976a9145408e1f7f3b4e7919bc764c53e09438f116cd4ce88acd9bf1600000000001976a91401cb21d735cdfc9526231c5aa2a3a92e1b5443df88acc2d21600000000001976a914e4429f293bd7e3e520dd3e63f9937b4bd6819bcf88acbc0b1700000000001976a9148ec5317c51b5d394ea2cc568232515930defd18888ac31111700000000001976a914838151b12bbba4e843aa878ad4cabea5ddae016488acbd501700000000001976a9148e652be4a3475cbeda073956e87783bfaa32053d88acb09a1700000000001976a9149ddf22668dce94be1e1dfaa89709207b50d4364388acfabd1700000000001976a91489105878c3678e865cd9624f5a1e8f83ecf2d78588acead91700000000001976a914bd12d03ebcca5a813ef5669071201743cde8eb6d88ac9bdb1700000000001976a914093098699f1c9b30f17d4eba25bee25585d851c588acb40c1800000000001976a9140809d9e2b5011d4719efed4be816d072965493de88ac87141900000000001976a914e921d3035ee97c5f809c803e4c2741bb845cacd988acbe591900000000001976a914a77641643b0769c0f09c4ed1b66451e35852fe6788ac391d1a00000000001976a914620197879f87f9190c4b6ee7cdbf36c2ebc8c3fb88ac2d6d1a00000000001976a91404c311f2a1e830c27a92fadf916e21cf6cae3de188ac11751a00000000001976a914f3f13d0dfd1b3d899eab198e38cac80f6a549ad288ac56571b00000000001976a914c9147d3eb8959aaf79e9df528e80187c8e06f91588ac708e1b00000000001976a9140f69c105fe00d56f0a31d835370606bb7d7b7a0788ac44601c00000000001976a914da0edc5a0fd74b6f8778a15f037e177532cb5d4188aced921c00000000001976a9146b580b79280326b073c6161dcbeca44184da58bd88ac3ebb1c00000000001976a914492b2dc00a67f674f1de92f5f942a887aa4bd19f88ac86ee1c00000000001976a9144dd0c22b3abfa9383773b407d8dd7fe5ae2bdf9e88ac6c9a1d00000000001976a914d96be77b1c0bc4164812f90ff9048541b4dd6d9b88acd7a81d00000000001976a914a5f5008a39ec65f4a846999cd23774b41c74aba488ac27aa1d00000000001976a91494abbd1cc44585810323585addb1e993717de70c88ac86371e00000000001976a91432b6e7bf0eefef57d63e873dea662e1b5ec511df88ac1e5d1e00000000001976a914eb9fc75c74c1041154ddb8514bcff19dffa6e1d188acd2621e00000000001976a9141f9f3e1b43823c2bfe5aeecd582f4922619e572288ac17232000000000001976a91463528f401a25468f141ee6aff64257ab5a991aaf88ac64092200000000001976a914591c07374c1af37d65c6240ba25fd6ea59597f9f88ac0b232200000000001976a9142e1cb3de456ebf9461b3401c3b6ab9e9da938ea588ac362f2200000000001976a91460c97825530758cacc00549335b7bc1b3c9980e588ace0862200000000001976a91428a188b783859c55490418cb10f2fd9a7ebcca9b88acd04c2300000000001976a91453b88e1f56c18f8b9970f81a9b128be4974902e088acac642500000000001976a91423b5650e4d084c65ca32e374c1067776f08585cc88ac87892500000000001976a91477909c022a189c235f66da262957b68885b25d6388ac37722600000000001976a9146ee8cf307ebffd6e7d32f622608da5f1aee434e188ac902c2700000000001976a9142492fc0181777fec3c6001e034ac5de53fea94c288acba632700000000001976a91410fbba77920c8f8500c16a99d3e40849e63864f288acf6b92700000000001976a914632ec88d9e171948e254fb4501f0d7041e1fd1c688acf15d2800000000001976a914e2e6225fef18ddca411ae3fe46b9dd2b98ca048688acc4752800000000001976a914d151e140ebc672a886d36bce85474597f205ade588acc6ba2800000000001976a91408ffc82af8ebae0dabed8b705ab83b0b392dcc7488ac7c892900000000001976a914e2db6b763a7064112ec865f0b49d595446edecb488acc8e72900000000001976a9146ad798d913b91084410069ae66103a19ed1d9f6088acfaf42900000000001976a9147a296d10a7558d816ca33de47d39b35bbb881ee088ac361a2a00000000001976a914fe28d50d4ff1b30de779c9c7d6b5882298b60e8088acc81d2a00000000001976a914c0c0980b7927fd9ccddd06fdc58016ba091a3f5888ac22512b00000000001976a91483eb0e3545d06df9d87e7ed77248fb8408f5efe988ac5a0d2c00000000001976a9148ab88cc2aa9bb97a82943a725f8749a01940291888acd53c2c00000000001976a914301aa42fad784dcf1409656d93d554f34126091e88ace8e42c00000000001976a914986e5d11072bb3d697fc94d94638c9f1170703c088ac1ff72c00000000001976a914298b77b28ca639b66bde0758cef1f786b6af942088acae242d00000000001976a914dd0a49505d476bdcbd61fec3e7103b26e46c4e9988ace0342d00000000001976a9146f6aa8e188e6cc0b7afde34091b5d0690ba6ce9988ac73872d00000000001976a91428fc8ed6651aefec2686e3ecc7cf61edb28f306288ac3fdc2d00000000001976a91459ff1d12e8e574ef6dfd656b728fce1b8f77dada88ac00232e00000000001976a914f041c9198e0e08629913d26c434323080bc3202988acec4b2e00000000001976a914f1012e2c3aa77ff2630caa9ae7e6278441c981bd88ac74cb2e00000000001976a914e4529862ac66142bcbf752aed6dc43b60bf9a7a688ac3b053000000000001976a91478e46b09cd7d0bffdb9eca19c02a68dc7b9bb01888ac990a3100000000001976a914d1b5a3c69e606e5eaa3a98732035b7810c4626cb88ac17cb3100000000001976a914de1404c8ba7e03f9acfcc38b531c2cc7a430905588ac6c3c3200000000001976a9148d4ed3ab3fe190f7fe3cd3a722bc13e44ff447ca88ac18233400000000001976a91401fe5b7024bac18afa714a08db2af5dc94cdddf988ac0aa83600000000001976a91427b4668a922eecb79411cc168475ef029b820db188ac4c233700000000001976a914ab2e4d2ff994653b1f539ac64f46a062f0c389c588ace6353700000000001976a9140a577ae6c39160315e05683600a5a37e5ca845b488ac09633800000000001976a914c2a17364d2dfc4d24462f9290055a5d998344db888ac1f423c00000000001976a914432af9b48525cb56c001cea6e6002acecb1d4f9f88acccc73c00000000001976a91457f2387a1d670d7f1fc0c4baf4920484764b26af88ac2a223d00000000001976a914c5094c32473fc809f4b2d3bfbd7692084f138df488ac47683d00000000001976a91447d84c0ddaf28324669938343a247c40d6bf49d288ac12fd3e00000000001976a914b1da65273a4361c0a9c60b89793185a466f8dee088acc43a4000000000001976a91415f7061dbb324b172ae7c09435d26cdb1d16c3c488ac6d124100000000001976a9144283846b7a9c98b45f205200454fa4bd842d2dda88ac9f424100000000001976a914f8bbf2f6223b6d610e6cf697dd74cd09da6f9dd588acd1f54100000000001976a9141d27cdd4a421b60a71b7e9220cf52ac4547dabd788acb2ec4200000000001976a91439658a7628ec576d056a8bddb4b097fb23a7b4bf88ac069b4400000000001976a91442f3f5d6497a46a5bc379b918708d08c22a5184d88ac4b4d4500000000001976a914e9ca0206af609e6a8c06e455e8540c9afd0dee6988ac10534600000000001976a91433fa320e8e38110a670bd0435d7f878b0923f86d88acc3bc4600000000001976a914bd50057b57b5b44c56da410233b3d424b61ac8af88ac891c4700000000001976a91406398f2c64fbe6388f258caf359f45377087156d88ac08cd4700000000001976a91490710a4d325d3168788542b90ae568996575601d88aceb674a00000000001976a91489d3754e07b8a05f2d06b79fc6484757299f2bcf88ac3ec94a00000000001976a914e62fb2e520e972cd62686469a08bf59b8190a32088ac086b4c00000000001976a91483d884f35c8b2b1ad9a890275f7ddcb9ef10063988ac3dcd4d00000000001976a91444deed3a51886bdae60210bbd761d76e7dc9809488acc3384f00000000001976a914dbee77d2aaeda4f7eda3ba483fe3fa0b87efeb9388ac0e404f00000000001976a914ef510f898abf63878543d06d9d8ae811c396691088ac98e14f00000000001976a9148a78cbd8293d3bac9334b3a500cefd6124d1c5ea88ac7c445300000000001976a914b0ddf4bf42fb638cee6fd6749c9d408eafa8e77a88acf27e5300000000001976a91474da354d4686c46e5765f2306573aa3f8168d73088ac92e65500000000001976a914de5b3023b22a524545a07ee88282fefade20165988acc25c5700000000001976a914f2101bb3080405afbf2926cf2df81efecb4d133b88acec4a5800000000001976a9146df069828879f2932246ac7e332a55980d0afdc688ace8475900000000001976a91463cbce769fcca0ad709f90abc8a8e82142f956d988ac1ff15900000000001976a914e806dfc0ebee2334e363e797ceb334f1a36eef6388ac9b465a00000000001976a914c717152dc2e1b2c8e1d11645828188513ccf22f388ac7ba05b00000000001976a914d0c6ce01686bee64ccecb66d59c16c386c98ea7b88ac53295c00000000001976a9141433adf4a4eef7bbf667dfd326b1d414e3ffd24588ac9fa45c00000000001976a914b1fd81918e34fac8c4875dfe15620acfb46ef49688ac577a5e00000000001976a91481a5abf3619cf39526327ce37606506f43fa322d88ac052a5f00000000001976a914acf662da627f378187f68cb25426ca5953473dcb88ac92355f00000000001976a914c6052ea9e2bf38c68e7bc8daaf791ad68d119da388ace4466000000000001976a914680e6ee3152e7f21096fa0b8b9e7078f64a24a2788ac70326400000000001976a914c329791e9df08bea69db66f0bafbc4ebacf5199788acd3cd6500000000001976a914a1dea76e10faf69a88793c807d06ee7e20c56f8388acda5e6700000000001976a91449fb61908db37c65f01c530ee0a3480e984e420488ac4f486800000000001976a9145e83b2ef86170a96dd373edc71d454ab8d561a2888ac80fd6900000000001976a914c7aca55050f7d76868908add24568fbab91ad2be88acbf1e6c00000000001976a91452ebe14b4170dfa4fc001968b689f9832000fe3988ac39b76c00000000001976a914dbe8432946f9ba59717514fd8fa75fe8ecc19ba788ac65a56f00000000001976a914aa9e1143832a081583ad4581ef2dbb8cd98782a588ac54157100000000001976a9141be25970b163cd3a02e0079488f3fa960c57fd9888ac4b457a00000000001976a914365552703d650d018ee97a3eac3ce8cf6964a7f588ac6c0d8400000000001976a9149f547d8a50fd5fec133e36c001e34039a068632188aca6738700000000001976a914cf1a3451d2da9d6cffb686e3fc7483cfb722278f88ac9bec8b00000000001976a9149244c19100effe8d457ea336ffd481d2a22a208f88acd8b39000000000001976a9143464806951e0d54bb3904752232a550ce2ad7a7188acf56d9200000000001976a914233b562aeeebafbbf6fb21764e625a960f12ab7a88acc30b9a00000000001976a914d94a4e3e59f74585cc388d74d93f13baf167acb988acd18d9e00000000001976a9143ae0c73d66407ddf23f7af4143e00f0d0a9c387e88ac0f2c9f00000000001976a914530a43f79d7f83a69e4c70a3e3104aabf60614ff88acc133a200000000001976a91499566b93376903ffd4bcc811797579d772f33cb588acd9b3a600000000001976a914c1ca2a776c5908664c9a2977c16fb641f428edb488ace57aa800000000001976a914971603936050727183649d4c07e2c264823cc83e88ac7d83c000000000001976a914853b0aec3202b32ecf1bab4833de68d877d42dee88acf918c300000000001976a9142a7f6751bab3fb66d73edfee3ea6796404e46cb888ac5fe1c700000000001976a9144ccfc84876a1cd1e184faf5c59e1c214cfc6c19b88ac615bd700000000001976a91413c2c000bc979531b6f2a5f53c237c2cd2c8256288ac9346e300000000001976a914b40cdd2d3e0d0a50b774d7514df1c23eb7f0ab5688ac5469ec00000000001976a914a72bc37c37f7837eaeae48f517c7981e1be5269c88ac976cfc00000000001976a914b033fd664031cc3aa3c3df2d45bc70a3e351388088ac58580f01000000001976a914f15a50a319ed67a68902e5191464d8b99818cbf188ac73871601000000001976a914c73eab3abff961e95d993c12ff86fd4b7530225988ac21b45001000000001976a9140dbfb73bef742319ea15f14e2b4a806e9159433b88ac41157d01000000001976a91486487c68973d87baa2a953dd46781139df0df1de88aca1969101000000001976a91432887e2d4c12e03383f16370837e27b446504fad88ac75d5aa01000000001976a9146d6cc3c80b789628f7e00f67c1bf477a2892d52688acbb03ad01000000001976a91416ed65355b0a06c884ef43db5d544e6eb62c459188ac2561e201000000001976a914fcc21b073eb9ae6f55363031f9591dbe87bec84f88acc683f001000000001976a9144d27c1b943a911674c1ccc38bcb2c807bdcedba688ac66483302000000001976a914f619d2abea4032425db98b1f628e3fb7287fac2388ac77715102000000001976a914638c20458832057ac20f5c700dd676ba1ecd0cc388acf9075e02000000001976a9140eb219eecef1a0205b040311f165646bc63b710788ac9df09d02000000001976a914ecc2daa2ed9fb7933854c8b80a724cc51e71108288ac98d4dc02000000001976a91486d823c1a811025d2ab8dd2aa77d3d2cddce89d288ac7e792903000000001976a91485a2550a565c081bf3ea75abb9d48447cc7fc06988ac30a98903000000001976a914697c36ba8ee06fecc45155b077b77f9fb49a43d088acaaed9303000000001976a91407de36aa88b78d8229d44efaca0c06a359fee79088ac88e9c603000000001976a9141d9e4ebb1df1dbe5acc779dee8acc05605c89a8988acd8ddc703000000001976a914ae6a2f5b8268c54a9d1ac5d8a44551443240f3c388acc3fc6004000000001976a91436d58dcc70e150d8343fc67bdac846049b45f06188ac01541705000000001976a914140f0e13a9517eeb08f1af08fdd12ec619160f6b88ac4c315f05000000001976a914f19638af91481e45a018c443aa909068ff4835da88acd854b305000000001976a914e9a07a2b5be7f884b345118d242f572c4700000e88ac6c675206000000001976a914b1aea295fa47b72f029664b1fde5dc8f40bec1ae88ac52c86f10000000001976a914a9bda3b431b0b9e096457e06de5527ac1dca6daf88ac6ecf1d13000000001976a9147650d035a8890f06b821c948c6faff39035e3fd088accdb6180000000000434104ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664bac00000000000000002a6a286b3f9c3841bfbba3985321d416058cef094f84749f0558f8e7840ee75445de8e00000000010000000000000022cb4b4f0a3de00e54a169fff23c1dc1fd1fb644eb5ed568d3495a01000000000000000000050000000000000000000000000000000000000000000000000000000000000000371224c570ab0d75a13cbf97e40a37176d01cd7b38aa6d29adaa0723cd0bd7b3463dd0de9b66aa094b45e8696bf2b8e97afc134ae927054b84934296a27b4c1a074c4d7dc9be7f041dd76f42472c0444b52352794fc0e68a136ebad5b97664fa84cafd9688bf1a4076b387de544ee2b231bd2738a730fc05dcbc13996a07c6701b00000002000000edd27cd6ef4fc66b05ef0bccfffba454ea6708320fedbb030000000000000000945cfb0a6dc281692ecd3e1a8e752c8d6047e67fceb80eaf2fe81a2b49b74f8f9a8179558b1a1718f96ca5240102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff08049cf0041c010152ffffffff02b9d97213000000002321033525a572eebf4d26f779ad9d546734cdb25e22e0db61c60d24a1c1ae2753b81aacaa326a85070000001976a9148b322d581d911694bb2ff85086fe93f5d192ee3a88ac000000009a2c0000

at org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:193)
at org.bitcoinj.core.BitcoinSerializer.deserialize(BitcoinSerializer.java:156)
at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:149)
at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)
at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)
at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)
at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)
at com.google.common.util.concurrent.Callables$3.run(Callables.java:93)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.bitcoinj.core.ProtocolException: java.lang.ArrayIndexOutOfBoundsException
at org.bitcoinj.core.Message.readBytes(Message.java:513)
at org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
at org.bitcoinj.core.Message.<init>(Message.java:118)
at org.bitcoinj.core.Message.<init>(Message.java:157)
at org.bitcoinj.core.ChildMessage.<init>(ChildMessage.java:52)
at org.bitcoinj.core.TransactionInput.<init>(TransactionInput.java:126)
at org.bitcoinj.core.Transaction.parse(Transaction.java:594)
at org.bitcoinj.core.Message.<init>(Message.java:118)
at org.bitcoinj.core.Message.<init>(Message.java:157)
at org.bitcoinj.core.ChildMessage.<init>(ChildMessage.java:52)
at org.bitcoinj.core.Transaction.<init>(Transaction.java:242)
at org.bitcoinj.core.Block.parseTransactions(Block.java:263)
at org.bitcoinj.core.Block.parse(Block.java:279)
at org.bitcoinj.core.Message.<init>(Message.java:118)
at org.bitcoinj.core.Message.<init>(Message.java:157)
at org.bitcoinj.core.Block.<init>(Block.java:132)
at org.bitcoinj.core.BitcoinSerializer.makeMessage(BitcoinSerializer.java:206)
at org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:191)
... 8 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
at org.bitcoinj.core.Message.readBytes(Message.java:509)
... 25 more
03:20:50 13 PeerGroup.handlePeerDeath: [127.0.0.1]:55889: Peer died
03:20:50 13 PeerGroup.handlePeerDeath: Download peer died. Picking a new one.
03:20:50 13 PeerGroup.setDownloadPeer: Unsetting download peer: [127.0.0.1]:55889
03:20:50 13 ConnectionHandler.handleKey: Error handling SelectionKey: null
Peer #0 disconnected: [127.0.0.1]:55889

C++ client debug.log (with some extra debug statements of my own):

Code:
2015-08-13 19:22:15 disconnecting node 127.0.0.1:57487                                                                    [51/9435]
2015-08-13 19:22:15 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:15 trying connection 104.131.12.128:55889 lastseen=25.5hrs
2015-08-13 19:22:20 accepted connection 127.0.0.1:57490
2015-08-13 19:22:20 accepted connection 127.0.0.1:57491
2015-08-13 19:22:20 received: version (113 bytes)
2015-08-13 19:22:20 send version message: version 70001, blocks=21379, us=74.70.116.138:55889, them=0.0.0.0:0, peer=127.0.0.1:57490
2015-08-13 19:22:20 receive version message: /WorldleadcurrencyJ:0.12.2/: version 70001, blocks=11417, us=127.0.0.1:55889, them=127
.0.0.1:55889, peer=127.0.0.1:57490
2015-08-13 19:22:20 received: version (113 bytes)
2015-08-13 19:22:20 send version message: version 70001, blocks=21379, us=74.70.116.138:55889, them=0.0.0.0:0, peer=127.0.0.1:57491
2015-08-13 19:22:20 receive version message: /WorldleadcurrencyJ:0.12.2/: version 70001, blocks=11417, us=127.0.0.1:55889, them=127
.0.0.1:55889, peer=127.0.0.1:57491
2015-08-13 19:22:20 received: verack (0 bytes)
2015-08-13 19:22:20 received: verack (0 bytes)
2015-08-13 19:22:20 received: ping (8 bytes)
2015-08-13 19:22:20 received: getblocks (3269 bytes)
2015-08-13 19:22:20 getblocks 11418 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
2015-08-13 19:22:20   getblocks stopping at limit 11917 089e5f2f0ea7e20da7169714203c64a3105b0ea7fcd825790f4430c0445c59c2
2015-08-13 19:22:20 received: ping (8 bytes)
2015-08-13 19:22:20 connection timeout
2015-08-13 19:22:20 received: getdata (18003 bytes)
2015-08-13 19:22:20 received getdata (500 invsz)
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 [hexdbg] sending MSG_BLOCK
2015-08-13 19:22:20 [hexdbg] processing getdata
2015-08-13 19:22:20 socket send error 104
2015-08-13 19:22:20 disconnecting node 127.0.0.1:57491


Also, it looks like you're already trying to test on Android. I suggest just testing your namecoinj fork by itself first, and then trying to integrate it as a library into an Android application once it's working on its own.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 13, 2015, 07:15:44 PM
I did a bit more checking. It looks like there's something really wrong parsing the first transaction of block 11418. When it is parsed, the cursor ends up at position 92, and not 80, while all other blocks finish parsing their headers at position 80. I'm not sure why yet. Overriding it didn't seem to help. I'll try tracing back earlier in the block parsing code later when I get the chance.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 14, 2015, 12:10:11 PM
Hi hexafraction Block 11418 is the first merged mining block with bitcoin/and other merge mining coins. This should be the reason why the cursor ends up a bigger position.

And i am sorry how do you test the namecoinj on its own? Do you mean with the tests included when compiling?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 14, 2015, 01:10:36 PM
Hi hexafraction Block 11418 is the first merged mining block with bitcoin/and other merge mining coins. This should be the reason why the cursor ends up a bigger position.

And i am sorry how do you test the namecoinj on its own? Do you mean with the tests included when compiling?

No, not using the built-in unit tests. I simply imported the namecoinj project into my Java IDE, and added my own class into the samples package, that contained a main method that connected to my WLC C++ client, and began fetching blocks. I also used my IDE's debugger to poke around as to what was going on.

Would you be able to tell me what network block 11418 was merge-mined with, and what the block hash/id is on the other network?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 14, 2015, 07:18:08 PM
I have looked at the code and it looks like that the coinj you forked does not have support for merge mining. I would suggest that you fork the java library for something that does support merged mining.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 14, 2015, 07:25:13 PM
I have looked at the code and it looks like that the coinj you forked does not have support for merge mining. I would suggest that you fork the java library for something that does support merged mining.

The latest code is a fork of namecoinj and does support merged mining, in theory. It is failing in practice at the moment.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 14, 2015, 07:30:26 PM
I have looked at the code and it looks like that the coinj you forked does not have support for merge mining. I would suggest that you fork the java library for something that does support merged mining.

The latest code is a fork of namecoinj and does support merged mining, in theory. It is failing in practice at the moment.
It is? The repository linked above is still forked from freicoinj, nor namecoinj. Is there another repository.I could help if I knew what the code is and what coin wlc itself is forked from.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 14, 2015, 07:54:10 PM
I have looked at the code and it looks like that the coinj you forked does not have support for merge mining. I would suggest that you fork the java library for something that does support merged mining.

The latest code is a fork of namecoinj and does support merged mining, in theory. It is failing in practice at the moment.
It is? The repository linked above is still forked from freicoinj, nor namecoinj. Is there another repository.I could help if I knew what the code is and what coin wlc itself is forked from.

Sure thing, I didn't realize it wasn't linked here. https://github.com/Rikski/namecoinj

I have a fairly trivial main class I'm using for testing. I can post if you need it, but I don't have access to it right this minute (mobile).


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 15, 2015, 05:32:48 PM
I have looked at the code and it looks like that the coinj you forked does not have support for merge mining. I would suggest that you fork the java library for something that does support merged mining.

The latest code is a fork of namecoinj and does support merged mining, in theory. It is failing in practice at the moment.

Hi the first blocks after the genesisblock were merge mined with freicoin, so merge mining of namecoinj is working (for freicoin as parent). I looked into BlockMergeMinedPayload.java and it is creating a "new Transaction" for the Parent Block Coinbase Transaction. Maybe the problem is that transactions for my WLC are including refHeight wchich BlockMergeMinedPayload is also using for the Parent header but Bitcoin transactions dont have this parameter and so it stops downloading as soon as Bitcoin is present as parent. But this is just a guess at the moment first i have to learn how to include this main from you inside my testingsetup.

I tried to get to know which hash inside the block belongs to which coin, but i can not see it at the moment.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: cryptosun on August 15, 2015, 06:12:26 PM
I can help u PM me


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 15, 2015, 06:18:05 PM
I can help u PM me

Cryptosun, there's a link to the code. Run it and see if you can fix the issue.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: cryptosun on August 15, 2015, 06:23:35 PM
I can help u PM me

Cryptosun, there's a link to the code. Run it and see if you can fix the issue.
Oh Ok bro:)


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 17, 2015, 12:03:14 PM
I can help u PM me

Cryptosun, there's a link to the code. Run it and see if you can fix the issue.
Oh Ok bro:)

Hi cryptosun,

thanks for your offer. Hope you can fix the issue with bitcoin as parent while merge mining.

Rik


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 17, 2015, 07:06:55 PM
I can help u PM me

Cryptosun, there's a link to the code. Run it and see if you can fix the issue.
Oh Ok bro:)

Please keep us informed if you manage to make any progress, where I haven't been able to do so.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 17, 2015, 08:28:06 PM
I think I may have found where the problem is, but I will need to do some testing. This is just from looking at the code. I think it has to do with VarInt and the readVarInt() method in message.java. This method is called to get the length of the array and I think it isn't doing something correctly which causes the length to be too small. I need to check this out with debugging though.

Hexafraction, can you send me the main class that you are using?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 17, 2015, 09:08:01 PM
I think I may have found where the problem is, but I will need to do some testing. This is just from looking at the code. I think it has to do with VarInt and the readVarInt() method in message.java. This method is called to get the length of the array and I think it isn't doing something correctly which causes the length to be too small. I need to check this out with debugging though.

Hexafraction, can you send me the main class that you are using?

readVarInt isn't the culprit, as far as I can tell. It's being called when the array pointer is already pointing in an invalid location. I'll pastebin the main class I'm using shortly.

Edit: http://paste.ubuntu.com/12112739/
It's nothing fancy, but it fetches blocks and gives me a debuggable program. Chain is static so the debugger can easily access it for expression evaluation and conditional breakpoints.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 19, 2015, 02:13:58 AM
So I have done some debugging and I found the problem to be at Line 505 in message.java with the line
Code:
System.arraycopy(payload, cursor, b, 0, length);
which is called at line 43 of TransactionInput.java. It appears that the the length passed in is too long since the cursor + length exceeds the length of payload. Either the length passed in is too large, or the cursor is positioned too far back. I will investigate some more the find out.

Edit: The length of the payload is 10430, the cursor is at 10177, and the length is 34966. 34966 + 10177 =45143 > 10430.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 19, 2015, 02:27:02 AM
How does the coin format the merge mining data in the block? Also, is there a block explorer I can use for this coin? That would make it much easier to figure this whole thing out.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 19, 2015, 09:40:59 AM
How does the coin format the merge mining data in the block? Also, is there a block explorer I can use for this coin? That would make it much easier to figure this whole thing out.

The Blockexplorer can be found at: 109.73.173.119:81 (the balances are in satoshi not in wlc).

I try to find out more about the merge mining data in the block, can you specify a little bit what information you need?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 19, 2015, 11:14:35 AM
How does the coin format the merge mining data in the block? Also, is there a block explorer I can use for this coin? That would make it much easier to figure this whole thing out.

I'm not sure, but https://github.com/WorldLeadCurrency/WLC/blob/master/src/auxpow.cpp might help you. I can't read others' C++ very well, however.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 19, 2015, 11:34:24 AM
How does the coin format the merge mining data in the block? Also, is there a block explorer I can use for this coin? That would make it much easier to figure this whole thing out.

The Blockexplorer can be found at: 109.73.173.119:81 (the balances are in satoshi not in wlc).

I try to find out more about the merge mining data in the block, can you specify a little bit what information you need?
Thanks. The blockexplorer helps. It gives me the data I need, which is the raw format of the blocks in a human-readable format.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 19, 2015, 04:34:49 PM
I think I may have found where the problem is, but I will need to do some testing. This is just from looking at the code. I think it has to do with VarInt and the readVarInt() method in message.java. This method is called to get the length of the array and I think it isn't doing something correctly which causes the length to be too small. I need to check this out with debugging though.

Hexafraction, can you send me the main class that you are using?

readVarInt isn't the culprit, as far as I can tell. It's being called when the array pointer is already pointing in an invalid location. I'll pastebin the main class I'm using shortly.

Edit: http://paste.ubuntu.com/12112739/
It's nothing fancy, but it fetches blocks and gives me a debuggable program. Chain is static so the debugger can easily access it for expression evaluation and conditional breakpoints.
I think the error is definitely in VarInt or readVarInt because at line 259 of Block.java returns number of transactions to be 132 when there is only 1 and in line 590 of Transaction.java it also returns 132 from readVarInt(). The specific ArrayIndexOutOfBounds error is caused by the length being too long, which is also set by ReadVarInt(). I am going to take a look at VarInt to see whether I can find the problem.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 19, 2015, 05:42:13 PM
I think I may have found where the problem is, but I will need to do some testing. This is just from looking at the code. I think it has to do with VarInt and the readVarInt() method in message.java. This method is called to get the length of the array and I think it isn't doing something correctly which causes the length to be too small. I need to check this out with debugging though.

Hexafraction, can you send me the main class that you are using?

readVarInt isn't the culprit, as far as I can tell. It's being called when the array pointer is already pointing in an invalid location. I'll pastebin the main class I'm using shortly.

Edit: http://paste.ubuntu.com/12112739/
It's nothing fancy, but it fetches blocks and gives me a debuggable program. Chain is static so the debugger can easily access it for expression evaluation and conditional breakpoints.
I think the error is definitely in VarInt or readVarInt because at line 259 of Block.java returns number of transactions to be 132 when there is only 1 and in line 590 of Transaction.java it also returns 132 from readVarInt(). The specific ArrayIndexOutOfBounds error is caused by the length being too long, which is also set by ReadVarInt(). I am going to take a look at VarInt to see whether I can find the problem.

Why is reading varints for the last thousands of blocks OK? Is the format different for that specific piece of data? Or are the parser reads misordered, misaligned to the actual structure, or calling for a varint where the format isn't a varint?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 19, 2015, 05:46:16 PM
I think I may have found where the problem is, but I will need to do some testing. This is just from looking at the code. I think it has to do with VarInt and the readVarInt() method in message.java. This method is called to get the length of the array and I think it isn't doing something correctly which causes the length to be too small. I need to check this out with debugging though.

Hexafraction, can you send me the main class that you are using?

readVarInt isn't the culprit, as far as I can tell. It's being called when the array pointer is already pointing in an invalid location. I'll pastebin the main class I'm using shortly.

Edit: http://paste.ubuntu.com/12112739/
It's nothing fancy, but it fetches blocks and gives me a debuggable program. Chain is static so the debugger can easily access it for expression evaluation and conditional breakpoints.
I think the error is definitely in VarInt or readVarInt because at line 259 of Block.java returns number of transactions to be 132 when there is only 1 and in line 590 of Transaction.java it also returns 132 from readVarInt(). The specific ArrayIndexOutOfBounds error is caused by the length being too long, which is also set by ReadVarInt(). I am going to take a look at VarInt to see whether I can find the problem.

Why is reading varints for the last thousands of blocks OK? Is the format different for that specific piece of data? Or are the parser reads misordered, misaligned to the actual structure, or calling for a varint where the format isn't a varint?
The data for block 11418 is different because it is merge mined, which is probably causing the problem. Actually, it might not be VarInt but the offset passed into it. After a little more analysis, it looks like the offset is not set correctly, which is causing VarInt to return incorrect numbers. I could be wrong.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 19, 2015, 06:46:55 PM
Why is reading varints for the last thousands of blocks OK? Is the format different for that specific piece of data? Or are the parser reads misordered, misaligned to the actual structure, or calling for a varint where the format isn't a varint?
The data for block 11418 is different because it is merge mined, which is probably causing the problem. Actually, it might not be VarInt but the offset passed into it. After a little more analysis, it looks like the offset is not set correctly, which is causing VarInt to return incorrect numbers. I could be wrong.

https://github.com/FreicoinAlliance/freicoinj/commit/8c27b562cd814f2a6a026e76f0e11bcc0960ab4d

As you can see in this hash the offset for transactions has to be changed because of the extra property "refHeight" of the transactions of the coin.

Merged mining with freicoin as parent chain is working ok (Blocks 1 - 1405).

When merge mining with bitcoin as parent starts, the offset is suddenly wrong,
so maybe the wallet is expecting also the parent chain to have refHeight in its transactions?

I would like to test it somehow but right now i have no clue how to implement a solution.

Maybe something like:

If (length !="expected value")
    length = "value without refHeight";   


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 19, 2015, 07:25:01 PM
I might have an idea on how this could be done. I think there should be extra fields to differentiate the merged chain used, probably a version or something. I don't think we can just check an expected value in a neat way. I'm going to try it shortly, and see if my idea works in practice.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 19, 2015, 07:37:36 PM
I managed to sync successfully up to height 22103, by modifying org.bitcoinj.core.Transaction.

Edit: Now synced to 22194 before crashing. I think I've managed to sync almost all of the chain, however it's rejecting the last block with an invalid difficulty. The C++ client accepts it, and the two clients are in agreement about difficulty.

The parse() method in that class should now be:

Code:
 @Override
    void parse() throws ProtocolException {

        if (parsed)
            return;

        cursor = offset;

        version = readUint32();
        optimalEncodingMessageSize = 4;

        // First come the inputs.
        long numInputs = readVarInt();
        optimalEncodingMessageSize += VarInt.sizeOf(numInputs);
        inputs = new ArrayList<TransactionInput>((int) numInputs);
        for (long i = 0; i < numInputs; i++) {
                TransactionInput input = new TransactionInput(params, this, payload, cursor, parseLazy, parseRetain);
                inputs.add(input);
                long scriptLen = readVarInt(TransactionOutPoint.MESSAGE_LENGTH);
                optimalEncodingMessageSize += TransactionOutPoint.MESSAGE_LENGTH + VarInt.sizeOf(scriptLen) + scriptLen + 4;
                cursor += scriptLen + 4;
        }
        // Now the outputs
        long numOutputs = readVarInt();
        optimalEncodingMessageSize += VarInt.sizeOf(numOutputs);
        outputs = new ArrayList<TransactionOutput>((int) numOutputs);
        for (long i = 0; i < numOutputs; i++) {
            TransactionOutput output = new TransactionOutput(params, this, payload, cursor, parseLazy, parseRetain);
            outputs.add(output);
            long scriptLen = readVarInt(8);
            optimalEncodingMessageSize += 8 + VarInt.sizeOf(scriptLen) + scriptLen;
            cursor += scriptLen;
        }
        lockTime = readUint32();
        optimalEncodingMessageSize += 4;
        if(this.version==2) {
            refHeight = readUint32();
            optimalEncodingMessageSize += 4 + 4;
        }
        length = cursor - offset;
    }

Here's the new error:

Code:
org.bitcoinj.core.VerificationException: Could not verify block f26842324aca22db7c16ddf087277ee99117d0fa29ca5d5f6eaaaf4d42d9d8f0
v1114369 block:
   previous block: c85bfc960881fa6cfa833feef10e2842fe7b56f56aa962fdd0e2300b59c4da3e
   merkle root: 505a544293220d73c2f1b1ca3285906828fc8abcc39aa41a3f4155fc347b3c3a
   time: [1440012311] Wed Aug 19 15:25:11 EDT 2015
   difficulty target (nBits): 436643261
   nonce: 0
   Merged-mining info:
      version: v1114369
      time: [Wed Aug 19 15:25:11 EDT 2015] Wed Aug 19 15:25:11 EDT 2015
      difficulty target (nBits): 436643261
      nonce: 0
      Network: org.worldleadcurrency.production
      parent block coin base transaction:
  679a73c3467721d6fc3ffdcf6865da6b0283d50664b1d2914d67b111bbe072fd: Unknown confidence level.
     == COINBASE TXN (scriptSig PUSHDATA(3)[a4a705] PUSHDATA(44)[fabe6d6d7f15c02dd05c3eacefde83dd74b0f9b5ed7155c9ec92ef280acdda2bacd1f5c32000000000000000])  (scriptPubKey DUP HASH160 PUSHDATA(20)[3d47986f727402feb3df5134dff583af4ace8074] EQUALVERIFY CHECKSIG)

      coinbase link:
          hash of parent block header: 000000000000023a97f467afb051ac1480e27bed9788e8fdb9ac2d892614f551
      parent block header:
v3 block:
   previous block: 00000000000000000759c455cd9b9402a461885fe76e0261092a5cd7a575038d
   merkle root: cac502a2d3a6865430f959b445ff563b4bcd49f60ab9ad8579d6ab54ff829108
   time: [1440012417] Wed Aug 19 15:26:57 EDT 2015
   difficulty target (nBits): 404020484
   nonce: 3237608803


   with 1 transaction(s):
  505a544293220d73c2f1b1ca3285906828fc8abcc39aa41a3f4155fc347b3c3a: Unknown confidence level.
     == COINBASE TXN (scriptSig PUSHDATA(4)[bda5061a] PUSHDATA(1)[01] 2)  (scriptPubKey PUSHDATA(33)[02bc41065c462d75844cf77624b712a29064cd21630e9b8c3c68990e4881a9b58e] CHECKSIG)

at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:286)
at org.bitcoinj.core.Peer.processBlock(Peer.java:872)
at org.bitcoinj.core.Peer.processMessage(Peer.java:360)
at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:178)
at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)
at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)
at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)
at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)
at com.google.common.util.concurrent.Callables$3.run(Callables.java:93)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.bitcoinj.core.VerificationException: Hash is higher than target: 13e6b9f88b5a8bd9a36adb475588d6108d8594b8eb37c5122ae70d3c4beface7 vs 6a5bd0000000000000000000000000000000000000000000000
at org.bitcoinj.core.Block.checkProofOfWork(Block.java:766)
at org.bitcoinj.core.Block.verifyHeader(Block.java:886)
at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:397)
at org.bitcoinj.core.AbstractBlockChain.tryConnectingOrphans(AbstractBlockChain.java:825)
at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:424)
at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:275)
... 9 more



Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 20, 2015, 01:44:19 AM
I managed to sync successfully up to height 22103, by modifying org.bitcoinj.core.Transaction.

Edit: Now synced to 22194 before crashing. I think I've managed to sync almost all of the chain, however it's rejecting the last block with an invalid difficulty. The C++ client accepts it, and the two clients are in agreement about difficulty.

The parse() method in that class should now be:

Code:
 @Override
    void parse() throws ProtocolException {

        if (parsed)
            return;

        cursor = offset;

        version = readUint32();
        optimalEncodingMessageSize = 4;

        // First come the inputs.
        long numInputs = readVarInt();
        optimalEncodingMessageSize += VarInt.sizeOf(numInputs);
        inputs = new ArrayList<TransactionInput>((int) numInputs);
        for (long i = 0; i < numInputs; i++) {
                TransactionInput input = new TransactionInput(params, this, payload, cursor, parseLazy, parseRetain);
                inputs.add(input);
                long scriptLen = readVarInt(TransactionOutPoint.MESSAGE_LENGTH);
                optimalEncodingMessageSize += TransactionOutPoint.MESSAGE_LENGTH + VarInt.sizeOf(scriptLen) + scriptLen + 4;
                cursor += scriptLen + 4;
        }
        // Now the outputs
        long numOutputs = readVarInt();
        optimalEncodingMessageSize += VarInt.sizeOf(numOutputs);
        outputs = new ArrayList<TransactionOutput>((int) numOutputs);
        for (long i = 0; i < numOutputs; i++) {
            TransactionOutput output = new TransactionOutput(params, this, payload, cursor, parseLazy, parseRetain);
            outputs.add(output);
            long scriptLen = readVarInt(8);
            optimalEncodingMessageSize += 8 + VarInt.sizeOf(scriptLen) + scriptLen;
            cursor += scriptLen;
        }
        lockTime = readUint32();
        optimalEncodingMessageSize += 4;
        if(this.version==2) {
            refHeight = readUint32();
            optimalEncodingMessageSize += 4 + 4;
        }
        length = cursor - offset;
    }

Here's the new error:

Code:
org.bitcoinj.core.VerificationException: Could not verify block f26842324aca22db7c16ddf087277ee99117d0fa29ca5d5f6eaaaf4d42d9d8f0
v1114369 block:
   previous block: c85bfc960881fa6cfa833feef10e2842fe7b56f56aa962fdd0e2300b59c4da3e
   merkle root: 505a544293220d73c2f1b1ca3285906828fc8abcc39aa41a3f4155fc347b3c3a
   time: [1440012311] Wed Aug 19 15:25:11 EDT 2015
   difficulty target (nBits): 436643261
   nonce: 0
   Merged-mining info:
      version: v1114369
      time: [Wed Aug 19 15:25:11 EDT 2015] Wed Aug 19 15:25:11 EDT 2015
      difficulty target (nBits): 436643261
      nonce: 0
      Network: org.worldleadcurrency.production
      parent block coin base transaction:
  679a73c3467721d6fc3ffdcf6865da6b0283d50664b1d2914d67b111bbe072fd: Unknown confidence level.
     == COINBASE TXN (scriptSig PUSHDATA(3)[a4a705] PUSHDATA(44)[fabe6d6d7f15c02dd05c3eacefde83dd74b0f9b5ed7155c9ec92ef280acdda2bacd1f5c32000000000000000])  (scriptPubKey DUP HASH160 PUSHDATA(20)[3d47986f727402feb3df5134dff583af4ace8074] EQUALVERIFY CHECKSIG)

      coinbase link:
          hash of parent block header: 000000000000023a97f467afb051ac1480e27bed9788e8fdb9ac2d892614f551
      parent block header:
v3 block:
   previous block: 00000000000000000759c455cd9b9402a461885fe76e0261092a5cd7a575038d
   merkle root: cac502a2d3a6865430f959b445ff563b4bcd49f60ab9ad8579d6ab54ff829108
   time: [1440012417] Wed Aug 19 15:26:57 EDT 2015
   difficulty target (nBits): 404020484
   nonce: 3237608803


   with 1 transaction(s):
  505a544293220d73c2f1b1ca3285906828fc8abcc39aa41a3f4155fc347b3c3a: Unknown confidence level.
     == COINBASE TXN (scriptSig PUSHDATA(4)[bda5061a] PUSHDATA(1)[01] 2)  (scriptPubKey PUSHDATA(33)[02bc41065c462d75844cf77624b712a29064cd21630e9b8c3c68990e4881a9b58e] CHECKSIG)

at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:286)
at org.bitcoinj.core.Peer.processBlock(Peer.java:872)
at org.bitcoinj.core.Peer.processMessage(Peer.java:360)
at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:178)
at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)
at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)
at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)
at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)
at com.google.common.util.concurrent.Callables$3.run(Callables.java:93)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.bitcoinj.core.VerificationException: Hash is higher than target: 13e6b9f88b5a8bd9a36adb475588d6108d8594b8eb37c5122ae70d3c4beface7 vs 6a5bd0000000000000000000000000000000000000000000000
at org.bitcoinj.core.Block.checkProofOfWork(Block.java:766)
at org.bitcoinj.core.Block.verifyHeader(Block.java:886)
at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:397)
at org.bitcoinj.core.AbstractBlockChain.tryConnectingOrphans(AbstractBlockChain.java:825)
at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:424)
at org.bitcoinj.core.AbstractBlockChain.add(AbstractBlockChain.java:275)
... 9 more


Yup. Getting the same error as well. I think I know what the problem is. For some reason (can't find it yet) it sets all of the headerParsed boolean to true except for the last block. Then, for the last block, it parses the header, and finds that the hash of the header is not less than the target. To show this, if you convert the last block's header (22214) to a decimal integer, you get
Code:
f76c22e3179b613366e6098d5a963df3147a140684377cb04babfa31615e839d -> 111912333864832649963788629443113007904287670404150873962674491627731299500957
and the bits (1a6a5bd) is
Code:
6a5bd0000000000000000000000000000000000000000000000 -> 10681984318408322427192353450286343108761369678138805919416320
For a valid block, subtracting the block integer from the bits integer should result in a positive number (hash is less than difficulty). However, in this block (and many others) the hash is an integer that is GREATER than the bits. Therefore I conclude that there is something wrong with how WLC is merged mining its blocks.

Of course this could all be wrong. Please not that I have not yet taken a look at the c++ code yet, but I am running the client.


Nevermind, the above is semi wrong. I forgot that merged mining checks the parent block hash and not the actual block hash. The problem is that it is not setting the parent block hash as the hash, but is using the normal hash. The problem is specifically at the if block at line 732 in Block.java. I am investigating to see what is causing it to fail.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 20, 2015, 09:04:14 AM
Cool, i would have thought that the transactionversion is not set before parsing, but as long as it works  ;D.

The difficulty fail is really unexpected. Why is it only the last block? Totally confusing. The check for the merged mining work is copy-paste from devcoin (which copy-pasted it from namecoin) and no rocket science. As you said it is taking the blockhash from the parent chain as POW. So i would exclude mistakes in the c++ wallet if there are no further hints.

So either the diffucultyfilter is wrong for all the blocks (or all merge miningblocks) but the last,
or the difficultyfilter is correct but fails to validate the most current block.

To me the last option is the most probalbe which throws up the question:
what is special about the current block that hinders the wallet to get the right hash?

-----------------------------------------------------------------
Ok, of course it is set before parsing, but i thought the "new Transaction" in BlockMergeMinedPayload is setting it to Version 2 and that is the problem


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 01:13:22 PM
So it seems the merge mining information can not be found mmBlock == null returns true.

I dont know why but the c++ wallet somehow handles the newly generated blocks in another way than namecoin and devcoin.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 01:15:16 PM
So it seems the merge mining information can not be found mmBlock == null returns true.

I dont know why but the c++ wallet somehow handles the newly generated blocks in another way than namecoin and devcoin.

Are you sure that the last block is specifically merge-mined? Having merge mined data isn't a requirement for a block to be valid.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 01:43:13 PM
Nope, my previous reply was bogus. However, I also got the chain to sync 100% without errors using another fix.

Code:
09:37:39 15 DownloadListener.progress: Chain download 100% done with 0 blocks to go, block date Aug 21, 2015 9:12:56 AM

The issue was in the constructor of AbstractBlockChain$OrphanBlock:

Code:
 if (!shouldVerifyTransactions())
                this.block = block.cloneAsHeader();
            else
                this.block = block;

This optimization is invalid for merged mining since it will wipe out ALL of the merged mining data. A naive fix is to simply change it to this.block = block in ALL cases, but this will keep a bunch of payload data nobody cares around in many cases. There's a better solution that I'm testing right now.

Edit: I've tested my solution and it seems to work properly. To integrate it:

1) Don't change OrphanBlock from the original. Keep that if-statement.

2) Add the following to BlockMergeMined:

Code:
    public BlockMergeMined cloneAsHeader(Block mainBlock){
        BlockMergeMined bmm = new BlockMergeMined(this.params, null, 0, mainBlock);
        bmm.payload = this.payload;
        return bmm;
    }

3) Replace cloneAsHeader in Block with:

Code:
    public Block cloneAsHeader() {
        maybeParseHeader();
        Block block = new Block(params);
        block.nonce = nonce;
        block.prevBlockHash = prevBlockHash.duplicate();
        block.merkleRoot = getMerkleRoot().duplicate();
        block.version = version;
        block.time = time;
        block.difficultyTarget = difficultyTarget;
        block.transactions = null;
        block.hash = getHash().duplicate();
        if(mmBlock!=null)
            block.mmBlock = mmBlock.cloneAsHeader(block);
        return block;
    }

I've tested this with a successful sync up to 22397 (the latest block at the time).

Edit: I've synced up and am able to process new blocks successfully as they come in.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 02:06:30 PM
Awesome! I wish i had a portion of that skill of yours. The last step will be to get the wallet onto the phone. It is stll crashing at 10k, hmm..


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 02:08:01 PM
Would you mind sharing the logcat and errors at the stage where it crashes? I'm going to try to get this to build and run on my phone soon.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 02:18:51 PM
Yes sure,
it is giving me a Java heap space error when running with that new code hm, did i set something wrong?

Code:
New block: 18539:2830f1d3fe790817ff4703373c2689eaa65470553ed254041e673904dfc1655d
04:14:34 13 AbstractBlockChain.add: 6 blocks per second
New block: 18540:c967137ed7a6affd2618b64ae23339e4b1281c5dbc82dac9bea00a3c0a972f86
Peer #1 disconnected: [127.0.0.1]:55889
04:14:36 13 PeerGroup.handlePeerDeath: [127.0.0.1]:55889: Peer died
04:14:36 11 PeerGroup.connectToAnyPeer: Waiting 1000 msec before next connect attempt
04:14:36 13 PeerGroup.handlePeerDeath: [127.0.0.1]:55889: Peer died
04:14:36 13 PeerGroup.handlePeerDeath: Download peer died. Picking a new one.
04:14:36 13 PeerGroup.setDownloadPeer: Unsetting download peer: [127.0.0.1]:55889
04:14:37 11 PeerGroup.connectToAnyPeer: Waiting 2250 msec before next connect attempt
Peer #0 disconnected: [127.0.0.1]:55889
Exception in thread "NioClientManager" java.lang.OutOfMemoryError: Java heap space
at org.bitcoinj.core.Utils.copyOf(Utils.java:457)


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 02:24:33 PM
That means it ran out of memory. What device are you running it on?

I have a fairly high-end Android I can test it on, to see if it's just a need for resources, or an actual bug. Can you send me an APK file?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 02:29:44 PM
The error above is from intellij on my phone it is crashing at block 10k already.

Download is here: http://www.winc-ev.org/english/downloads-contact/


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 02:42:59 PM
My phone made it past 10k, and is around 17k and syncing right now. I'll continue testing with adb.

Edit: I've fetched up to the second to last block. Was this version built before my last change?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 05:22:09 PM
My phone made it past 10k, and is around 17k and syncing right now. I'll continue testing with adb.

Edit: I've fetched up to the second to last block. Was this version built before my last change?

Hmm this apk included the changes in Transaction.java in BlockMergedMining.java and in Block.java

EDIT: I put another .5 BTC and 400 WLC to the bounty


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 21, 2015, 08:31:33 PM
My phone made it past 10k, and is around 17k and syncing right now. I'll continue testing with adb.

Edit: I've fetched up to the second to last block. Was this version built before my last change?
you should just commit the changes to github and submit him a pull request to make sure that the changes are correct.

I will also test the app on my phone.

Edit: just ran the app and there were no errors.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 08:43:50 PM
My phone made it past 10k, and is around 17k and syncing right now. I'll continue testing with adb.

Edit: I've fetched up to the second to last block. Was this version built before my last change?
you should just commit the changes to github and submit him a pull request to make sure that the changes are correct.

I will also test the app on my phone.

Edit: just ran the app and there were no errors.

My working copy is a mess due to debugging code. I'd need to redo many of the changes cleanly to make a PR.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 21, 2015, 08:51:38 PM
My phone made it past 10k, and is around 17k and syncing right now. I'll continue testing with adb.

Edit: I've fetched up to the second to last block. Was this version built before my last change?
you should just commit the changes to github and submit him a pull request to make sure that the changes are correct.

I will also test the app on my phone.

Edit: just ran the app and there were no errors.

My working copy is a mess due to debugging code. I'd need to redo many of the changes cleanly to make a PR.
When I get to my computer I can make all the changes she submit the PR. My code is relatively clean and I can do it quickly.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 08:56:58 PM
My phone made it past 10k, and is around 17k and syncing right now. I'll continue testing with adb.

Edit: I've fetched up to the second to last block. Was this version built before my last change?
you should just commit the changes to github and submit him a pull request to make sure that the changes are correct.

I will also test the app on my phone.

Edit: just ran the app and there were no errors.

My working copy is a mess due to debugging code. I'd need to redo many of the changes cleanly to make a PR.
When I get to my computer I can make all the changes she submit the PR. My code is relatively clean and I can do it quickly.

Awesome, thanks! Just to confirm, with an up to date android build, you can sync to the last (not second to last) block? In that case, should we begin testing with real coins and various transaction patterns?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 21, 2015, 09:06:35 PM
My phone made it past 10k, and is around 17k and syncing right now. I'll continue testing with adb.

Edit: I've fetched up to the second to last block. Was this version built before my last change?
you should just commit the changes to github and submit him a pull request to make sure that the changes are correct.

I will also test the app on my phone.

Edit: just ran the app and there were no errors.

My working copy is a mess due to debugging code. I'd need to redo many of the changes cleanly to make a PR.
When I get to my computer I can make all the changes she submit the PR. My code is relatively clean and I can do it quickly.

Awesome, thanks! Just to confirm, with an up to date android build, you can sync to the last (not second to last) block? In that case, should we begin testing with real coins and various transaction patterns?
It loads all the way.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 09:14:59 PM
Awesome, thanks. I'll try building on my own machine again soon. Are you building against API level 14, as per the pom.xml?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 21, 2015, 09:40:53 PM
Awesome, thanks. I'll try building on my own machine again soon. Are you building against API level 14, as per the pom.xml?
I just used the version on his site with a logcat app and I did not see any errors. The github for the app has not been updated for a few days. Doesn't the pom.xml need to be changed to use wlcj and not namecoinj?

He also already committed the changes to wlcj so I won't submit a PR.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 09:43:47 PM
I uploaded all changes on github -namecoinj. Is there a way to get the android build up to date on my s3 mini without rooting?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 21, 2015, 09:44:55 PM
I uploaded all changes on github -namecoinj. Is there a way to get the android build up to date on my s3 mini without rooting?
Install the apk. How have you been testing it?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 09:50:42 PM
I uploaded all changes on github -namecoinj. Is there a way to get the android build up to date on my s3 mini without rooting?
Install the apk. How have you been testing it?

I just run it on my phone but the wallet stops syncing somewhere. At first it crashes at block 10k then it loads some more until it stops completely at some block (11964). Always producing ouOfMemoryError s. I will test installing the apk tomorrow see you then...


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 21, 2015, 09:52:52 PM
I uploaded all changes on github -namecoinj. Is there a way to get the android build up to date on my s3 mini without rooting?
Install the apk. How have you been testing it?

I just run it on my phone but the wallet stops syncing somewhere. At first it crashes at block 10k then it loads some more until it stops completely at some block (11964). Always producing ouOfMemoryError s. I will test installing the apk tomorrow see you then...
It is possible that your phone simply doesn't have enough RAM and thus can't run the app.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 21, 2015, 09:54:12 PM
I uploaded all changes on github -namecoinj. Is there a way to get the android build up to date on my s3 mini without rooting?
Install the apk. How have you been testing it?

I just run it on my phone but the wallet stops syncing somewhere. At first it crashes at block 10k then it loads some more until it stops completely at some block (11964). Always producing ouOfMemoryError s. I will test installing the apk tomorrow see you then...
It is possible that your phone simply doesn't have enough RAM and thus can't run the app.

Of course but the namecoin-wallet installes correctly..


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 21, 2015, 10:21:16 PM
Could you try uninstalling the app completely and then reinstalling it? (It's possible you were just installing the new test versions as upgrades over the current app, meaning data isn't cleared).

10K is a spot where the wallet would write back some data to storage.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 22, 2015, 02:06:38 AM
Could you try uninstalling the app completely and then reinstalling it? (It's possible you were just installing the new test versions as upgrades over the current app, meaning data isn't cleared).

10K is a spot where the wallet would write back some data to storage.

Did it, still crashing.. is there more data that needsto be deleted?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 22, 2015, 12:22:53 PM
Could you try uninstalling the app completely and then reinstalling it? (It's possible you were just installing the new test versions as upgrades over the current app, meaning data isn't cleared).

10K is a spot where the wallet would write back some data to storage.

Did it, still crashing.. is there more data that needsto be deleted?

Yes, the application's whole data directory. If you pull up app info on it there should be options to clear cache and clear data.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 23, 2015, 02:52:55 PM
Could you try uninstalling the app completely and then reinstalling it? (It's possible you were just installing the new test versions as upgrades over the current app, meaning data isn't cleared).

10K is a spot where the wallet would write back some data to storage.

Did it, still crashing.. is there more data that needsto be deleted?

Yes, the application's whole data directory. If you pull up app info on it there should be options to clear cache and clear data.

Hi i tried to install the apk on a friends s3 mini than never saw a wallet before and i got the same error so a clean install is not enough -pointing to a memory issue..

Code:
java.lang.outOfMemoryError
BitcoinSerializer.java
deserializePayload


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 23, 2015, 03:05:35 PM
That's funny. Could you try knightdk's APK?

I'm still trying to figure out the android builder. Maven is having trouble resolving perfectly OK artifacts, even after clearing my repository cache.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 23, 2015, 08:12:30 PM
That's funny. Could you try knightdk's APK?

I'm still trying to figure out the android builder. Maven is having trouble resolving perfectly OK artifacts, even after clearing my repository cache.

Hi i can not see the apk, where did he put it?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 23, 2015, 08:13:57 PM
That's funny. Could you try knightdk's APK?

I'm still trying to figure out the android builder. Maven is having trouble resolving perfectly OK artifacts, even after clearing my repository cache.

Hi i can not see the apk, where did he put it?
I just used the apk on your website and that worked fine for me. I am currently building my own version and testing that.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 23, 2015, 09:33:36 PM
I'm trying to build it but it doesn't work. I tried using maven and through android studio but neither seems to build it. How did you build the app that is on the website?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 23, 2015, 09:40:56 PM
I'm trying to build it but it doesn't work. I tried using maven and through android studio but neither seems to build it. How did you build the app that is on the website?

I'm also having trouble building on my end. The android project structure is reported as non-standard, which I can override, but there are many package name mismatches and other errors.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 24, 2015, 09:25:33 AM
Hi i am building it with maven. I just downloaded it / git clone it and then i compile it.

A problem could be with support-v4 and v13 artifacts they are somehow not loading from online repository. I installed them manually again from the local repository by using
Code:
mvn install:install-file -DgroupId=com.android.support -DartifactId=support-v4 -Dfile=support-v4-19.1.0.jar -Dversion=19.1.0 -Dpackaging=jar -DgeneratePom=true -D

After that the libs folder in the wallet has to be moved to src/main/libs and then the namecoinj is compiling with
Code:
mvn clean install -Dmaven.test.skip=true
and the wallet with
Code:
mvn clean install -DskipTests=true -Dandroid.sdk.path=/path_to_sdk


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 25, 2015, 12:40:34 AM
Hi i am building it with maven. I just downloaded it / git clone it and then i compile it.

A problem could be with support-v4 and v13 artifacts they are somehow not loading from online repository. I installed them manually again from the local repository by using
Code:
mvn install:install-file -DgroupId=com.android.support -DartifactId=support-v4 -Dfile=support-v4-19.1.0.jar -Dversion=19.1.0 -Dpackaging=jar -DgeneratePom=true -D

After that the libs folder in the wallet has to be moved to src/main/libs and then the namecoinj is compiling with
Code:
mvn clean install -Dmaven.test.skip=true
and the wallet with
Code:
mvn clean install -DskipTests=true -Dandroid.sdk.path=/path_to_sdk

I got it building and debugging with IDEA after a few changes:

Remove support-v4. It conflicted with v13 at the dex stage.

Add <failOnNonStandardStructure>false</failOnNonStandardStructure> to BOTH instances of the Android plugin in wallet/pom.xml
Build as Android Application (nothing Maven specific) in IDEA.

Would you mind updating us on what is left to do, and the state of the bounty?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 25, 2015, 12:05:30 PM
The Bounty is at 1.2 BTC 400 WLC 10k FRC.

What is left to be done:

The Wallet crashes at 10k blocks (sometimes at 12k or even more) and is loading extreme slow compared to the original namecoinj wallet. The crashes seem to be dependend on the memory of the device. So somehow the wallet is using very much memory leads to a crash on the most devices.

Here are a few of my errormessages (if it helps)

Code:
=== stack trace ===

%0A%0Ajava.lang.OutOfMemoryError

%0A%09at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:63)
%0A%09at org.bitcoinj.core.UnsafeByteArrayOutputStream.<init>(UnsafeByteArrayOutputStream.java:39)
%0A%09at org.bitcoinj.core.Message.unsafeBitcoinSerialize(Message.java:361)
%0A%09at org.bitcoinj.core.Message.bitcoinSerialize(Message.java:323)
%0A%09at org.bitcoinj.core.Transaction.getHash(Transaction.java:259)
%0A%09at org.bitcoinj.core.Transaction.getHashAsString(Transaction.java:276)
%0A%09at org.bitcoinj.core.Transaction.toString(Transaction.java:666)
%0A%09at org.bitcoinj.core.Transaction.toString(Transaction.java:656)
%0A%09at org.bitcoinj.core.BlockMergeMinedPayload.parseMergedMineInfo(BlockMergeMinedPayload.java:95)
%0A%09at org.bitcoinj.core.BlockMergeMinedPayload.parse(BlockMergeMinedPayload.java:41)
%0A%09at org.bitcoinj.core.BlockMergeMinedPayload.<init>(BlockMergeMinedPayload.java:32)
%0A%09at org.bitcoinj.core.BlockMergeMined.<init>(BlockMergeMined.java:53)
%0A%09at org.bitcoinj.core.Block.parseHeader(Block.java:215)
%0A%09at org.bitcoinj.core.Block.parse(Block.java:278)
%0A%09at org.bitcoinj.core.Message.<init>(Message.java:171)
%0A%09at org.bitcoinj.core.Block.<init>(Block.java:136)
%0A%09at org.bitcoinj.core.HeadersMessage.parse(HeadersMessage.java:85)
%0A%09at org.bitcoinj.core.Message.<init>(Message.java:117)
%0A%09at org.bitcoinj.core.Message.<init>(Message.java:149)
%0A%09at org.bitcoinj.core.HeadersMessage.<init>(HeadersMessage.java:42)
%0A%09at org.bitcoinj.core.BitcoinSerializer.makeMessage(BitcoinSerializer.java:228)
%0A%09at org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:191)
%0A%09at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:139)
%0A%09at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)
%0A%09at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)
%0A%09at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)
%0A%09at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)
%0A%09at com.google.common.util.concurrent.Callables$3.run(Callables.java:93)
%0A%09at java.lang.Thread.run(Thread.java:856)%0A%0A%0A%0A

Code:
=== stack trace ===

%0A%0Ajava.lang.OutOfMemoryError

%0A%09at org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:172)
%0A%09at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:139)
%0A%09at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)
%0A%09at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)
%0A%09at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)
%0A%09at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)
%0A%09at com.google.common.util.concurrent.Callables$3.run(Callables.java:93)
%0A%09at java.lang.Thread.run(Thread.java:856)%0A%0A%0A%0A

Code:
=== stack trace === 

java.lang.OutOfMemoryError

at org.bitcoinj.core.Utils.copyOf(Utils.java:457)
at org.bitcoinj.core.UnsafeByteArrayOutputStream.toByteArray(UnsafeByteArrayOutputStream.java:117)
at org.bitcoinj.core.Message.unsafeBitcoinSerialize(Message.java:387)
at org.bitcoinj.core.Message.bitcoinSerialize(Message.java:323)
at org.bitcoinj.core.Transaction.getHash(Transaction.java:259)
at org.bitcoinj.core.Transaction.getHashAsString(Transaction.java:276)
at org.bitcoinj.core.Transaction.toString(Transaction.java:666)
at org.bitcoinj.core.Transaction.toString(Transaction.java:656)
at org.bitcoinj.core.BlockMergeMinedPayload.parseMergedMineInfo(BlockMergeMinedPayload.java:95)
at org.bitcoinj.core.BlockMergeMinedPayload.parse(BlockMergeMinedPayload.java:41)
at org.bitcoinj.core.BlockMergeMinedPayload.(BlockMergeMinedPayload.java:32)
at org.bitcoinj.core.BlockMergeMined.(BlockMergeMined.java:53)
at org.bitcoinj.core.Block.parseHeader(Block.java:215)
at org.bitcoinj.core.Block.parse(Block.java:278)
at org.bitcoinj.core.Message.(Message.java:171)
at org.bitcoinj.core.Block.(Block.java:136)
at org.bitcoinj.core.HeadersMessage.parse(HeadersMessage.java:85)
at org.bitcoinj.core.Message.(Message.java:117)
at org.bitcoinj.core.Message.(Message.java:149)
at org.bitcoinj.core.HeadersMessage.(HeadersMessage.java:42)
at org.bitcoinj.core.BitcoinSerializer.makeMessage(BitcoinSerializer.java:228)
at org.bitcoinj.core.BitcoinSerializer.deserializePayload(BitcoinSerializer.java:191)
at org.bitcoinj.core.PeerSocketHandler.receiveBytes(PeerSocketHandler.java:139)
at org.bitcoinj.net.ConnectionHandler.handleKey(ConnectionHandler.java:217)
at org.bitcoinj.net.NioClientManager.handleKey(NioClientManager.java:75)
at org.bitcoinj.net.NioClientManager.run(NioClientManager.java:111)
at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)
at com.google.common.util.concurrent.Callables$3.run(Callables.java:93)
at java.lang.Thread.run(Thread.java:856)

After the memory-fix there is no reason on my side to keep the bounty from payout.

Rik


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 25, 2015, 12:51:19 PM
I'm going to see if I can get a reasonable heap snapshot and a profiler working to see what's up with the block sync.

Edit: I've taken a few heap dumps around blocks 10K, 11400, and 14000. All of them report heap sizes of no more than 60 MB (44MB at block 10K). I'll upload an APK tonight.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 25, 2015, 01:26:34 PM
I'm going to see if I can get a reasonable heap snapshot and a profiler working to see what's up with the block sync.

Edit: I've taken a few heap dumps around blocks 10K, 11400, and 14000. All of them report heap sizes of no more than 60 MB (44MB at block 10K). I'll upload an APK tonight.


Thanks.. Enlarging the heap size by adding android:largeHeap="true" did not change anything in the behaviour.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 25, 2015, 06:13:22 PM
I do see slow block sync after 10K. I'm also investigating that, although my Android abilities are somewhat more limited than my understanding of Java. Would you be able to capture a heap dump and email it to me/upload it somewhere if it is of a reasonable size? (there should be a button called "capture heap dump" or similar to the left of the logcat window in IDEA/Android Studio.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 26, 2015, 11:36:40 AM
I am trying, but to make an app with android studio out of a maven project. On my laptop the main you created is also crashing and at the first run it has produced an otOfMemoryError: Java heap space  So maybe i can capture a heap dump.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 26, 2015, 11:45:25 AM
I am trying, but to make an app with android studio out of a maven project. On my laptop the main you created is also crashing and at the first run it has produced an otOfMemoryError: Java heap space  So maybe i can capture a heap dump.

It's hard to tell what is going on without a heap dump. Would you mind sending me the apk you have, and trying to run the one that I built? I have a special build process I already use for other android projects used for robotic applications that I used.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 26, 2015, 05:04:03 PM
I am trying, but to make an app with android studio out of a maven project. On my laptop the main you created is also crashing and at the first run it has produced an otOfMemoryError: Java heap space  So maybe i can capture a heap dump.

It's hard to tell what is going on without a heap dump. Would you mind sending me the apk you have, and trying to run the one that I built? I have a special build process I already use for other android projects used for robotic applications that I used.

Ok i have 3 heap dumps now:

- After the block 10k is reached the memory usage goes up from 16 Mb to 50 Mb. I took the first here.

- At some point the wallet loads again and the memory is at 50 Mb still. I took the second here (Block ~11400)

- When the block 12k is reached i took the 3 heap here.

After that the memoryusage reduces to 30 Mb and crashes then without loading further blocks.

The heaps are uploaded here: https://drive.google.com/file/d/0Bzt8Hb4nQtyhQ0FxU3kzT0hkbTQ/view?usp=sharing


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 26, 2015, 05:07:36 PM

Ok i have 3 heap dumps now:

- After the block 10k is reached the memory usage goes up from 16 Mb to 50 Mb. I took the first here.

- At some point the wallet loads again and the memory is at 50 Mb still. I took the second here (Block ~11400)

- When the block 12k is reached i took the 3 heap here.

After that the memoryusage reduces to 30 Mb and crashes then without loading further blocks.

The heaps are uploaded here: https://drive.google.com/file/d/0Bzt8Hb4nQtyhQ0FxU3kzT0hkbTQ/view?usp=sharing
That memory usage is interesting. When I ran it, it used 40 MB initially until 10000 and kept going up to around 300 MB after 10k blocks.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 26, 2015, 05:51:14 PM
Maybe because your device is of a newer generation, so newer phones can handle the memoryerror?

The main memory consumer is org.bitcoinj.core.Block with:

- org.bitcoinj.core.TransactionOutput    with 167.034 objects and 13.362.720 heap swallow   and
- byte[] with 176.775 objects and 7.195.488 heap swallow


EDIT: Inbound connection was to HeaderMessage if i am reading it correctly.

2nd Edit: The BlockMergeMinedPayload loads Transaction and this loads a TransactionOutput and this creates byte[] which has 80 byte of space, so it looks like every transaction in the Parent chain gets 80 bytes assigned.. And this leads to a high memoryload after it reaches block 10k and loading 2k more blocks (including mmBlocks)..

So the question seems to be why does the wallet sees parentcoinbase transaction as headersJ?

3rd Edit: Every new transaction has a size of 80 byte. The problem is that the wallet loads 2k blocks at once. After the block 10k the merge mining starts and the Parent header has 250+ Coinbase transactions per block. Keeping them all inside the heap memory seems to be hard for small devices but after block 12k every block is MM, so the memoryload is even bigger and the app crashes. so reducing the blocks to be loaded at once should solve the problem i guess.

...hmm when i reduce the MAX_HEADERS in HeaderMassage to 500 it completely refuses to download blocks (Error deserializing message)... weird..


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 28, 2015, 09:50:48 PM
Maybe because your device is of a newer generation, so newer phones can handle the memoryerror?

The main memory consumer is org.bitcoinj.core.Block with:

- org.bitcoinj.core.TransactionOutput    with 167.034 objects and 13.362.720 heap swallow   and
- byte[] with 176.775 objects and 7.195.488 heap swallow


EDIT: Inbound connection was to HeaderMessage if i am reading it correctly.

2nd Edit: The BlockMergeMinedPayload loads Transaction and this loads a TransactionOutput and this creates byte[] which has 80 byte of space, so it looks like every transaction in the Parent chain gets 80 bytes assigned.. And this leads to a high memoryload after it reaches block 10k and loading 2k more blocks (including mmBlocks)..

So the question seems to be why does the wallet sees parentcoinbase transaction as headersJ?

3rd Edit: Every new transaction has a size of 80 byte. The problem is that the wallet loads 2k blocks at once. After the block 10k the merge mining starts and the Parent header has 250+ Coinbase transactions per block. Keeping them all inside the heap memory seems to be hard for small devices but after block 12k every block is MM, so the memoryload is even bigger and the app crashes. so reducing the blocks to be loaded at once should solve the problem i guess.

...hmm when i reduce the MAX_HEADERS in HeaderMassage to 500 it completely refuses to download blocks (Error deserializing message)... weird..

Sorry about the delay. I took a look at the heap dumps you sent, and I don't see anything abnormal, or an abnormally large heap. It's all around 40-50MB as with my dumps. However, a difference I cannot test directly is dalvik vs ART. Your heap dump reports the environment as Dalvik (if I'm interpreting mixed messages correctly), while my devices uses ART instead.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 28, 2015, 10:30:02 PM

3rd Edit: Every new transaction has a size of 80 byte. The problem is that the wallet loads 2k blocks at once. After the block 10k the merge mining starts and the Parent header has 250+ Coinbase transactions per block. Keeping them all inside the heap memory seems to be hard for small devices but after block 12k every block is MM, so the memoryload is even bigger and the app crashes. so reducing the blocks to be loaded at once should solve the problem i guess.

...hmm when i reduce the MAX_HEADERS in HeaderMassage to 500 it completely refuses to download blocks (Error deserializing message)... weird..
Try going to store/SPVBlockStore.java and changing the constant DEFAULT_NUM_HEADERS to a lower number. I think that might help.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 29, 2015, 11:16:54 AM
Sorry about the delay. I took a look at the heap dumps you sent, and I don't see anything abnormal, or an abnormally large heap. It's all around 40-50MB as with my dumps. However, a difference I cannot test directly is dalvik vs ART. Your heap dump reports the environment as Dalvik (if I'm interpreting mixed messages correctly), while my devices uses ART instead.

Not a deal. Yes the heap is just at 40-50 mb and when the block download reaches 12k it loads 2k blocks in the cache and that is too much, because somehow on older phones the heap memory seems to be restricted to 64 mb (sorry i dont know about whic test app is running at my anfdroid studio).

So there are 2 ways: 1. increase heap
2. reduce blocks in cache.

The second one seems to be more convienient scince older devices maybe get to slow if one app use all ram (although it is just for the download).

@ kinght
This goes straight in the right direction but memory usage is still high and it crashes at 12k (going down to 500 with DEFAULT_NUM_HEADERS and to 260 with the blockCache).


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 29, 2015, 03:20:10 PM
So guys, now it works with additional largeHeap="true" the memory increases to 190 mb and the wallet loads fine.

I dont know why largeHeap did not work with the earlier version but hey.... you 2 rock!!

Now i just have to adjust some pics and stuff but thats it..

@hexafraction: jk14 send me a private message about a wallet for a bounty i said he maybe could ask you about. Just in case..


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: hexafraction on August 29, 2015, 11:59:35 PM
So guys, now it works with additional largeHeap="true" the memory increases to 190 mb and the wallet loads fine.

I dont know why largeHeap did not work with the earlier version but hey.... you 2 rock!!

Now i just have to adjust some pics and stuff but thats it..

@hexafraction: jk14 send me a private message about a wallet for a bounty i said he maybe could ask you about. Just in case..

Thanks; please let us know if anything is needed. I did get in touch with jk14; the job ended up changing to the point where it involved the C++ side of things, so I had to decline as I do not know enough C++ to make changes and make the resulting code remain secure and reliable.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: achow101 on August 30, 2015, 02:39:36 AM
So guys, now it works with additional largeHeap="true" the memory increases to 190 mb and the wallet loads fine.

I dont know why largeHeap did not work with the earlier version but hey.... you 2 rock!!

Now i just have to adjust some pics and stuff but thats it..

@hexafraction: jk14 send me a private message about a wallet for a bounty i said he maybe could ask you about. Just in case..
Now that you fixed that, is that all that needed to be done? Or are there other problems that need to be fixed before you can pay the bounty?


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 30, 2015, 03:13:36 AM
So guys, now it works with additional largeHeap="true" the memory increases to 190 mb and the wallet loads fine.

I dont know why largeHeap did not work with the earlier version but hey.... you 2 rock!!

Now i just have to adjust some pics and stuff but thats it..

@hexafraction: jk14 send me a private message about a wallet for a bounty i said he maybe could ask you about. Just in case..
Now that you fixed that, is that all that needed to be done? Or are there other problems that need to be fixed before you can pay the bounty?

Nope just send me your addresses, as for my personal opinion hexafraction should get a bigger portion of the bounty but please let me know your opinion how to split the bounty.

@hexafraction, ok maybe i can help him i am much better at c++ than i am at java and now i have a little bit more time.


Title: Re: [BOUNTY] fix mobile WLCj wallet for android
Post by: rik8119 on August 30, 2015, 06:53:13 PM
Ok, thank you both! The last part of the bounty will be payed as soon as i have the confirmation from hexafraction.

It is sometime hard for me to get projects like this on the road. I had a little c++ in the university but the stuff needed to create a new coin, the phyton to fit p2pool for FRC/WLC and the Java/android stuff for the wallet now i had to teach me myself (good thing to have you on board for this, i tried it before and failed epicaly ;-).

So to answer hexafraction "I'm really excited to see where this coin (..WLC..) might go." It will go as far as i can. The vision is to supply communities all over the world with coins. This was already tried by many but the demurrage WLC got from Freicoin guaranties a stable monthly payout.

What WLC really needs at the moment are common good initiatives all over the globe.. So if any of you know some feel free to invite them to the WLC homepage (www.winc-ev.org).

@hexafraction thanks for the offer i will send you a message if i need help again.