From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XEgDp-0001Rb-Bj for bitcoin-development@lists.sourceforge.net; Tue, 05 Aug 2014 15:00:17 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.214.179 as permitted sender) client-ip=209.85.214.179; envelope-from=mh.in.england@gmail.com; helo=mail-ob0-f179.google.com; Received: from mail-ob0-f179.google.com ([209.85.214.179]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XEgDo-0006AB-BE for bitcoin-development@lists.sourceforge.net; Tue, 05 Aug 2014 15:00:17 +0000 Received: by mail-ob0-f179.google.com with SMTP id wn1so768529obc.24 for ; Tue, 05 Aug 2014 08:00:10 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.19.135 with SMTP id f7mr6514406obe.40.1407250810788; Tue, 05 Aug 2014 08:00:10 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.76.35.234 with HTTP; Tue, 5 Aug 2014 08:00:10 -0700 (PDT) Date: Tue, 5 Aug 2014 17:00:10 +0200 X-Google-Sender-Auth: HdhZRoJBtfuPqC-HiVWrZ5Uoxeg Message-ID: From: Mike Hearn To: Bitcoin Dev Content-Type: multipart/alternative; boundary=001a11c29966afe34e04ffe31cdf X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (mh.in.england[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1XEgDo-0006AB-BE Subject: [Bitcoin-development] How to create a pull tester JAR X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 15:00:17 -0000 --001a11c29966afe34e04ffe31cdf Content-Type: text/plain; charset=UTF-8 I just checked in a change to bitcoinj git master that makes it much easier to create a pull tester jar. Here are instructions for how to do it. You will need: - A Java Development Kit (JDK), version 6 or up should work. As Java 6 was released eight years ago, this should not be a challenging requirement. If you have a Mac just running "java" from the command line should give you a GUI prompt to install it automatically. Otherwise apt-get or fetch the latest from the interwebs. - Apache Maven. This is a rough equivalent of autotools, except it does dependency resolution for you. Grab it from http://maven.apache.org/download.cgi then unzip it and make sure the bin directory is in your PATH. You may need to set the JAVA_HOME environment variable if you installed Java to an odd place. - git Make sure you can run "javac" from the command line, then make sure you can run "mvn", it should complain it can't find a POM (this is a build config file) and not, say, that it can't find Java. Now grab bitcoinj from git master: git clone https://github.com/bitcoinj/bitcoinj.git ... and build .... cd bitcoinj mvn -DskipTests package It will go off and download the libraries needed, compile, and create a bundled executable JAR called core/target/pull-tests.jar. This is sort of analogous to static linking in the Java world. It should be fast - expect a full build plus downloads to take less than a minute. You can use it either with the QA scripts in the bitcoin core qa/pull-tester directory or just run things directly: ./bitcoind -regtest -connect=0.0.0.0 -listen -whitelist=127.0.0.1 -datadir=/tmp/pulltester java -jar core/target/pull-tests.jar It should go ahead and print lots of debug spew, then at the end say it's happy. Let me know if you encounter any problems with this. Java JARs (which are just zip files renamed) are easily reproduced if you use the same version of javac and the same bitcoinj version. The ZIP container has timestamps, but unzipping them and simply diffing the files between two builds should reveal no differences. I am happy to provide a pull-tests.jar from my local machine if anyone would like to do this. --001a11c29966afe34e04ffe31cdf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I just checked in a change to bitcoinj git master that mak= es it much easier to create a pull tester jar. Here are instructions for ho= w to do it.

You will need:
  • A Java Deve= lopment Kit (JDK), version 6 or up should work. As Java 6 was released eigh= t years ago, this should not be a challenging requirement. If you have a Ma= c just running "java" from the command line should give you a GUI= prompt to install it automatically. Otherwise apt-get or fetch the latest = from the interwebs.

  • Apache Maven. This is a rough equivalent of autotools, except = it does dependency resolution for you. Grab it from=C2=A0http://maven.apache.org/download.cgi the= n unzip it and make sure the bin directory is in your PATH. You may need to= set the JAVA_HOME environment variable if you installed Java to an odd pla= ce.

  • git
Make sure you can run "javac"= ; from the command line, then make sure you can run "mvn", it sho= uld complain it can't find a POM (this is a build config file) and not,= say, that it can't find Java.

Now grab bitcoinj from git master:

=

... and build ....

cd bitcoinj
mvn -DskipTests package

It will go off and download the libraries needed, compile, and create a bun= dled executable JAR called core/target/pull-tests.jar. This is sort of anal= ogous to static linking in the Java world. It should be fast - expect a ful= l build plus downloads to take less than a minute. You can use it either wi= th the QA scripts in the bitcoin core qa/pull-tester directory or just run = things directly:

./bitcoind -regte= st -connect=3D0.0.0.0 -listen -whitelist=3D127.0.0.1 -datadir=3D/tmp/pullte= ster
java -jar core/= target/pull-tests.jar

It should go ahead and print lots of debug spew, then a= t the end say it's happy.

Let me know if you e= ncounter any problems with this.

Java JARs (which = are just zip files renamed) are easily reproduced if you use the same versi= on of javac and the same bitcoinj version. The ZIP container has timestamps= , but unzipping them and simply diffing the files between two builds should= reveal no differences. I am happy to provide a pull-tests.jar from my loca= l machine if anyone would like to do this.
--001a11c29966afe34e04ffe31cdf--