Devrandom
50ad0e7666
Fix Orchid deadlock 3
...
https://github.com/subgraph/Orchid/pull/10
2014-08-24 00:06:17 +02:00
Oscar Guindzberg
2bc8f952e2
Wallet docs: link to github.io not google code
2014-08-23 18:45:02 -03:00
Devrandom
0464aa71c5
Add cycle detecting locks, fix Orchid deadlock 2
...
https://github.com/subgraph/Orchid/pull/10
Conflicts:
orchid/src/com/subgraph/orchid/circuits/CircuitIO.java
2014-08-23 21:59:05 +02:00
Devrandom
00d1821daa
Fix Orchid deadlock 1
...
https://github.com/subgraph/Orchid/pull/10
2014-08-23 21:59:05 +02:00
Mike Hearn
46104903fb
WalletAppKit: delete dead store.
2014-08-23 21:20:14 +02:00
Mike Hearn
03c8cf5927
Wallet: ban usage of wallet.importKey with deterministic keys.
2014-08-23 20:42:22 +02:00
Mike Hearn
fcdd0115c4
Slightly clearer comment and log message in Script.executeCheckSig.
2014-08-23 13:11:27 +02:00
Mike Hearn
729c716b18
WalletTest: pin creation time of wallet key hierarchy in keyRotationHD test to avoid timing race. Should resolve issue 575.
2014-08-23 13:11:05 +02:00
Andreas Schildbach
df006ba2ba
Add wallettemplate sub-project to CI build.
2014-08-23 12:55:04 +02:00
Andreas Schildbach
9546a13870
Fix spelling UTXOS -> UTXOs.
2014-08-22 23:43:01 +02:00
Andreas Schildbach
c8c30f8ec1
Add my testnet DNS seed. It runs sipas crawler, but rather than using its custom nameserver implementation it serves a generated zonefile via bind9.
...
FWIW, my domains are secured using DNSSEC.
2014-08-22 00:17:18 +02:00
Andreas Schildbach
8e5ab9356c
Introduce Fiat as a holder for fiat values. Coin and Fiat share an interface Monetary so that monetary infrastructure can be re-used.
...
Adapt CoinFormat to be used with Monetary. Add an ExchangeRate value class that can convert from Coin to Fiat and back.
2014-08-21 15:10:27 +02:00
Andreas Schildbach
6deba7be92
During CI builds, make Maven output less clutter.
2014-08-21 14:38:47 +02:00
Mike Hearn
664d0b130c
Make WalletTool compile again.
2014-08-21 13:57:44 +02:00
Andreas Schildbach
483b3bbc9b
When a wallet is added to a block chain that has a lower block height than the chain, try to repair.
...
Adds a "crash simulation" unit test.
2014-08-21 13:49:46 +02:00
Kosta Korenkov
d8944b922f
Make LocalTransactionSigner to sign P2SH inputs.
...
Transaction inputs are now prepopulated with empty scriptSig. Each signer
is expected to update this scriptSig with a signature at a proper place.
There is a new method in RedeemData to locate index of the key/signature
within scriptSig/program.
To generalize an above approach for all supported types of inputs,
RedeemData can now represent data for any type of input. For
pay-to-address and pay-to-pubkey inputs it is expected to contain single
key and CHECKSIG program.
Signers now accept ProposedTransaction object that could carry additional
metadata shared between signers. For now it shares derivation path of the
signing key.
To preserve the dummy sig feature, a new flag was introduced in a SendRequest.
It specifies whether to fill empty sigs with dummies during tx completion
or not. Default value is true (for backward compatibility).
There is a CustomTransactionSigner class that may be used as a base for
simple third-party signers (or may be not). It is used in unit test which
may be treated as a usage example.
2014-08-21 13:47:08 +02:00
Matt Corallo
b8e84ecdc7
Fix 100% CPU bug by clearing OP_CONNECT on connected key
2014-08-18 22:03:11 +00:00
Matt Corallo
ecd6afc7b7
Fix null getNewParser (again, and add test this time)
2014-08-18 14:11:47 -07:00
Andreas Schildbach
60c215b161
Configure IRC notifications for Travis CI. Messages will go to #bitcoinj.
2014-08-18 12:38:43 +02:00
Matt Corallo
ff52164921
Stop overwriting OP_WRITE when writing in ConnectionHandler c'tor
2014-08-18 11:51:51 +02:00
Andreas Schildbach
189605374c
Configure continuous integration using Travis CI.
...
Builds will be visible at https://travis-ci.org/bitcoinj/bitcoinj
2014-08-18 11:50:28 +02:00
Matt Corallo
d3003622f2
Handle getting a null from getNewParser gracefully
2014-08-17 14:24:59 -07:00
Kosta Korenkov
e2dbd2a3f7
Fix DeterministicKeyChainTest failing on Windows
...
Git changes line endings in files to CR+LF on Windows by default, while
protobuf always uses LF. That makes serialization tests fail.
2014-08-17 22:50:29 +07:00
Andreas Schildbach
4834fe6eb6
Remove TransactionConfidence.workDone. It doesn't seem useful and was somehow buggy.
2014-08-16 15:16:11 +02:00
Mike Hearn
9f8e09c5b4
HDUtils: less insistence on immutable params
2014-08-15 18:46:19 +02:00
Mike Hearn
1b92abe294
HDW: Add an AUTHENTICATION key purpose that's mapped to the internal chain.
2014-08-15 18:22:57 +02:00
Mike Hearn
f00aef2048
HDW: Add a getKeyByPath() method to wallet, and (experimental) sanity check precomputed keys before they're returned by the wallet API to guard against the potential of a bitflip in either the stored pubkey bytes, or the ECC precomputed tables. The chance of such a bit flip is small but such flips HAVE been seen in the wild against other bitcoin implementations, so it could happen to a bitcoinj user too. The consequences can be catastrophic (destroyed money) so best to try and do what we can.
2014-08-15 18:06:06 +02:00
Mike Hearn
f8bc4d544e
HDW: Create/activate a new HD chain when a wallet is constructed if the passed KeyChainGroup is empty. This means you can back up a wallet immediately after construction even before you request a key. Thanks to Andreas for the suggestion.
2014-08-15 17:04:27 +02:00
Kosta Korenkov
e893894f50
Make RedeemData to sort keys.
...
So that these keys are stored in the same order they appear in redeem script. That would make easier for signers to locate signature position in scriptSig.
2014-08-15 11:35:15 +07:00
Mike Hearn
7ec75b3483
Fix typo in comment.
2014-08-13 16:11:13 +02:00
Mike Hearn
014438b456
Take out the redundant SigHashType parameter to wallet.signTransaction.
...
In the end the API evolved in such a way that changing this param isn't that useful. To do contracts you tend to work with transactions directly, and a Wallet subclass that needs to do special signing by default can override the signing engine used.
2014-08-13 14:57:43 +02:00
Mike Hearn
c1e79b442c
Fix some thread safety issues with Bloom filtering.
...
This hasn't shown up in any bug reports, I just spotted them through reading the code.
2014-08-13 14:55:54 +02:00
Mike Hearn
e1f270f726
Revert "PeerFilterProvider methods are called with the lock already held, so just assert on that instead of locking again."
...
This reverts commit e888807dfd
.
2014-08-13 14:47:15 +02:00
Kosta Korenkov
1ba5909687
Add method to derive new keys when queried by path
...
Added DeterministicKeyChain.getKeyByPath(List, boolean) allowing to
specify whether to create non-existing key or not
2014-08-13 11:09:36 +02:00
Mike Hearn
e888807dfd
PeerFilterProvider methods are called with the lock already held, so just assert on that instead of locking again.
2014-08-12 18:32:51 +02:00
Kosta Korenkov
f6b2fa5a2b
Pluggable signers: simple local KeyBag signer
...
Introduced pluggable signers notion. Instances of
TransactionSigner could be added into the wallet, so that they subsequently
applied to transaction to complete it.
Existing signing code (Transaction.signInputs) was refactored into
LocalTransactionSigner, which is always implicitly added to any wallet.
Related pull request: #157
2014-08-12 17:58:29 +02:00
Mike Hearn
4a9295ccde
Fix duplicateDetached
2014-08-12 16:32:52 +02:00
Mike Hearn
a30cdfed0c
Eliminate the duplicated parentTransaction field from TransactionInput/Output.
2014-08-12 15:44:59 +02:00
Matt Corallo
20447bc340
Fix error when using Block.verify() after the Block constructor
...
...which takes all the elements of the block as paramters.
2014-08-11 15:27:48 -07:00
Mike Hearn
5220fb5141
Hide some fields in PartialMerkleTree
2014-08-11 19:21:25 +02:00
Andreas Schildbach
19b73600c8
Remove comment. I could not find any divergence in the getResourceAsStream error handling.
2014-08-11 18:45:35 +02:00
ollekullberg
fe91dc9110
Payment channel extension should be able to be initialized in two steps:
...
* A constructor that only takes the wallet as an argument
* A setTransactionBroadcaster() which should be called when the Bitcoin network is ready
Motivation: Some wallets (MultiBitHD) does not use WalletAppKit, and starts with reading the wallet before initializing the bitcoin network.
Now these wallets can create the wallet (and the wallet file is read), and call the setter after the bitcoin network is up.
2014-08-11 18:43:18 +02:00
Mike Hearn
90492b61f7
Change printed format of the wallet to be less verbose and make wallet-tool not dump privkeys by default.
2014-08-11 18:26:23 +02:00
Mike Hearn
e8ba287029
HD wallets: experimental change to not trigger full lookahead when deriving keys. This allows a savvy app to get keys/addresses at startup fast, if they do so before starting up the peergroup (which wants all keys in the zone so it can calculate a Bloom filter). May be reverted if it causes trouble.
2014-08-11 17:53:33 +02:00
Mike Hearn
d824666c2f
HD Wallets: fix a lookahead bug.
...
We were not previously triggering lookahead before calculating a Bloom filter, which means we might have missed transactions in some edge cases. Add a test to catch this and then fix up various unit tests to have fewer magic numbers and be more robust to changes.
2014-08-11 16:37:31 +02:00
Mike Hearn
54a543bf77
HDW: Fix the case of wallet upgrades where the aesKey is provided.
2014-08-11 15:03:07 +02:00
Mike Hearn
00a276f906
HDW: Simplify an unusual for loop in DKC
2014-08-11 14:17:21 +02:00
Mike Hearn
53aa33c2e8
HDW: Clear some static analysis warnings from DKC.
2014-08-11 14:15:06 +02:00
Kosta Korenkov
0d2fb93536
Introduce MultisigKeyBag to expose P2SH redeem data
...
For married wallets KeyChainGroup now keeps redeem scripts together with keys
2014-08-11 11:34:20 +02:00
Devrandom
588e314b06
Fix failed precondition in maybeLookaheadScripts
2014-08-11 11:22:06 +02:00