Bitcoin Forum
June 21, 2024, 08:46:14 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5]  All
  Print  
Author Topic: Vertigo - Lightweight Vertcoin Wallet  (Read 6112 times)
nov (OP)
Sr. Member
****
Offline Offline

Activity: 433
Merit: 251


Independent crypto developer


View Profile WWW
December 13, 2014, 09:54:55 AM
 #81

Yes, it is some solution.

Although it is not ideal solution.

Translating lyra2re algorithm step by step would be much better.

To test, if it works properly and the same way is, that for the same input value it should provide the same output value as for QT client lyra2re code.

We can e.g. prepare big text file with values to hash and generate output file with hashes and compare results to make sure that the lyra2re algorithm is the same as in QT client lyra2re code.


So far I haven't seen the lyra2re algorithm in Java.  It could be translated, but that leaves much room for lots of bugs.

Ideally, we would have Java code and Native and each platform can choose which code is run based on if the correct native code is available.



WowDoge - DogeCoin Lightweight Wallet DOGE: DLoawzLvw5WvvpGUkSTxrwMgKhkamsqFo7
Vertigo - VertCoin Lightweight Wallet VTC: VertGv5nVwYYR7mTmDDeAP9et1NJyAsC9P | Exelite - ExeCoin Lightweight Wallet EXE: ELiteWbMDwX95YZj5Jf5BkHS54qbH7wpXg | Lightweight Wallet Creation Service
MultiCoin - Multiple Crypto Coin Lightweight Wallet in Development BTC: 1EKT9uaaDbTRuwjttFQbfax7KmGNZX32HP | BitcoinViewer - Bitcoin Balances & Transactions on iPhone/iPad BTC: 1NEvfbiA5Bs2sG2jqRdCidGUjLD5JjAjEZ
HashEngineering
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250

Independent Cryptoveloper


View Profile WWW
December 13, 2014, 05:01:39 PM
 #82

I think I found another problem.  This is the code for calculating the POW Hash.  It uses the height of the block to determine which hash to use.  This will require other code changes, because the Java class Block, doesn't have a height field, it will have to be supplied elsewhere, hopefully such that we don't end up with the wrong hash being calculated.

Code:
uint256 GetPoWHash(int height) const
    {
        uint256 thash;
        // Hardfork to Lyra2RE occurs on about the 15th December 2014
        // testnet fork set to 100
        printf("Choosing PoW Algo at height: %i... ", height);
        if((fTestNet && height >= 100) || height >= 208301)
        {
            printf("Chose Lyra2RE\n");
            lyra2re_hash(BEGIN(nVersion), BEGIN(thash));
        }
        else
        {
    printf("Chose Scrypt-N\n");
            scrypt_N_1_1_256(BEGIN(nVersion), BEGIN(thash), GetNfactor(nTime));
        }
        return thash;
    }

GRS:  FrFpTbfEAni5Ruf8mNdwVQazJVJaQyEM2Y
BTC:  128Ptecsv4j6NoxdBxdvGzBtipfaAarZMJ
https://bitcointalk.org/index.php?topic=336215 - Android Wallet Creation Service
Pages: « 1 2 3 4 [5]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!