[Bitcoin-development] How to create a pull tester JAR

2014-08-05 Thread Mike Hearn
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

Re: [Bitcoin-development] How to create a pull tester JAR

2014-08-05 Thread Mike Hearn
Oh, I forgot to mention something important. Ridiculously, the default package repository Maven uses was not protected by SSL up until a few days ago. They made it available via SSL now, but you have to tell Maven about the new URL. I guess they'll do a new release where SSL is the default soon.

Re: [Bitcoin-development] How to create a pull tester JAR

2014-08-05 Thread Jeff Garzik
Thanks for posting that (and implicitly archiving the knowledge). Anything that makes test improvement easier is welcomed. On Tue, Aug 5, 2014 at 11:00 AM, Mike Hearn m...@plan99.net wrote: I just checked in a change to bitcoinj git master that makes it much easier to create a pull tester

Re: [Bitcoin-development] How to create a pull tester JAR

2014-08-05 Thread Andreas Schildbach
On 08/05/2014 05:11 PM, Mike Hearn wrote: Oh, I forgot to mention something important. Ridiculously, the default package repository Maven uses was not protected by SSL up until a few days ago. They made it available via SSL now, but you have to tell Maven about the new URL. I guess they'll

Re: [Bitcoin-development] How to create a pull tester JAR

2014-08-05 Thread Mike Hearn
No problem. The pull tester entry point can be found here: https://github.com/bitcoinj/bitcoinj/blob/master/core/src/test/java/com/google/bitcoin/core/BitcoindComparisonTool.java (nb: in the near future I will be re-namespacing the library from com.google.bitcoin to org.bitcoinj to reflect that

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Flavien Charlon
It would make more sense to introduce a new script opcode that pushes the current block height onto the operand stack. Then you could implement arbitrary logic about which blocks the transaction can be valid in. This would require that the client revalidate all transactions in its mempool

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Jeff Garzik
Glad this was brought up. Transaction expiration is something that I have wanted to see happen in bitcoin for a long, long time. The user experience of unconfirming transactions setting around in limbo is just horrible. Bitcoin software by necessity has gotten better about attaching fees so

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Alex Mizrahi
A distinction there is that they can only become invalid via a conflict— replaced by another transaction authored by the prior signers. If no other transaction could be created (e.g. you're a multisigner and won't sign it again) then there is no such risk. You need to check transaction's

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Mike Hearn
The user experience of unconfirming transactions setting around in limbo is just horrible. Bitcoin software by necessity has gotten better about attaching fees so this sort of behavior is uncommon, but that does not eliminate the problem. Yes, indeed. I suspect there's a quick hack that

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Jeff Garzik
I feel like a lot of this will be driven by implementation, and costs of changing the implementation. Additional look-backs are of course doable, but they incur some disk I/O costs. The fields available in memory for each mempool TX are uint256 tx_hash; // hash of next field

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Kaz Wesley
In general, if a transaction has not made it into a block within 144*X blocks, there is _some_ reason it is getting rejected by the miners. This is the crux of my concern: relay policy and miner priorities will not necessarily always be in sync, and node resource management shouldn't rely on

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Jeff Garzik
On Tue, Aug 5, 2014 at 3:10 PM, Kaz Wesley kezi...@gmail.com wrote: Any approach based on beginning a transaction expiry countdown when a transaction is received (as in mempool janitor) seems unviable to me: ... That's why I think including information in the transaction itself, as with my

Re: [Bitcoin-development] deterministic transaction expiration

2014-08-05 Thread Tom Harding
On 8/5/2014 12:10 PM, Kaz Wesley wrote: Any approach based on beginning a transaction expiry countdown when a transaction is received (as in mempool janitor) seems unviable to me: once a node has forgotten a transaction, it must be susceptible to reaccepting it; It's hard to argue with