Page 1 of 1

BitcoinJ port (WIP)

Posted: Sun Feb 21, 2016 12:50 am
by biolizard89
Note: this isn't usable for anything yet. It stops syncing after about 6%, because it doesn't yet handle auxpow. It doesn't handle name operations. It will probably be completely scrapped later. Now, for those of you who still care, continue reading:

https://github.com/JeremyRand/bitcoinj/tree/namecoin

This is a partial port of BitcoinJ to Namecoin. It's loosely based on parts of HashEngineering's NamecoinJ. Unfortunately, HashEngineering's code was pretty messy (did you know that HashEngineering's NamecoinJ has a bunch of code in it that's specific to Litecoin, Digitalcoin, and Groestlcoin?). So I'm trying to be somewhat cleaner. It's rebased on latest master branch of upstream BitcoinJ. Auxpow support is missing right now, so it will stop syncing at about 6%. I'm going to ping one of the BitcoinJ people to see if there is a way we can avoid maintaining a full fork; if that pans out, all of this code will be rewritten.

All that said, if you'd like to try it out:

Code: Select all

mvn clean install -Dmaven.test.skip=true
cd examples
mvn exec:java -Dexec.mainClass=org.bitcoinj.examples.ForwardingService -Dexec.args="NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5" 2> forwarding-service.log
This will probably overwrite any BitcoinJ installation that you've already built from source, so if you use BitcoinJ for Bitcoin things, do this in a fresh VM.

Feel free to substitute any mainnet Namecoin address into that last line.

The log file will show progress syncing the blockchain. Syncing is somewhat slow, because BitcoinJ can only sync from Namecoin Core clients; NamecoinQ clients will be dropped by BitcoinJ. Protip: search the log file for the "%" character to find the progress notices.

Huge thanks to EN and Stephen for their ongoing work in this area, and huge thanks to Brandon for giving a bunch of useful tips on this.