Commit Graph

7552 Commits

Author SHA1 Message Date
MarcoFalke 477777f250 [rpcwallet] Don't use floating point 2016-07-08 12:01:25 +02:00
Wladimir J. van der Laan ff46dd4a34
Merge #7540: Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY
18c975c Rename NOP3 to CHECSEQUENCEVERIFY in rpc tests (BtcDrak)
14d0130 Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY (BtcDrak)
2016-07-08 11:39:10 +02:00
Suhas Daftuar bb66a11396 Fix DoS vulnerability in mempool acceptance
Moves the IsStandard check to happen after the premature-witness check,
so that adding a witness to a transaction can't prevent mempool acceptance.

Note that this doesn't address the broader category of potential mempool DoS
issues that affect transactions after segwit activation.
2016-07-07 15:49:26 -04:00
Bob McElrath 36ae37a9f9 Rename CTxinWitness -> CTxInWitness 2016-07-06 19:46:46 -04:00
Jonas Schnelli 91abb77970
Merge #8288: qt: Network-specific example address
4f44cb6 qt: Network-specific example address (Wladimir J. van der Laan)
2016-07-06 15:45:17 +02:00
Wladimir J. van der Laan b978701ba1
qt: periodic translations update 2016-07-06 07:59:07 +02:00
Wladimir J. van der Laan 396f9d6296
Merge #8273: Bump `-dbcache` default to 300MiB
efd1d83 doc: Mention dbcache increase in release notes (Wladimir J. van der Laan)
32cab91 Bump `-dbcache` default to 300MiB (Wladimir J. van der Laan)
2016-07-06 07:46:47 +02:00
Wladimir J. van der Laan 32cab91278 Bump `-dbcache` default to 300MiB
Also cap the allocation for the leveldb-specific cache for the UTXO set
to 8MiB.
This avoids that the extra cache memory goes to the much less effective
leveldb cache instead of our application-level cache.
2016-07-06 07:44:51 +02:00
Wladimir J. van der Laan 042c323922
Merge #8275: Remove bad chain alert partition check
ab8be98 Remove bad chain alert partition check (BtcDrak)
2016-07-06 07:35:54 +02:00
Wladimir J. van der Laan aef381161f
Merge #8298: wallet: Revert input selection post-pruning
20f3cd7 wallet: Revert input selection post-pruning (Wladimir J. van der Laan)
2016-07-06 07:21:40 +02:00
Suhas Daftuar c1d61fbd08 Add warning if -blockminsize is used. 2016-07-05 19:57:45 -04:00
Gregory Maxwell 4fbdc4365b Revert "net: Avoid duplicate getheaders requests." PR #8054
This reverts commit f93c2a1b7e.

This can cause synchronization to get stuck.
2016-07-05 20:45:14 +00:00
Wladimir J. van der Laan 20f3cd75f6 wallet: Revert input selection post-pruning
This reverts PR #4906, "Coinselection prunes extraneous inputs from
ApproximateBestSubset".

Apparently the previous behavior of slightly over-estimating the set of
inputs was useful in cleaning up UTXOs.

See also #7664, #7657, as well as 2016-07-01 discussion on #bitcoin-core-dev IRC.
2016-07-01 13:26:01 +02:00
Suhas Daftuar 27362dda4d Remove -blockminsize option 2016-06-30 11:41:13 -04:00
Suhas Daftuar d2e46e1b5c Remove addScoreTxs() 2016-06-30 11:37:38 -04:00
Suhas Daftuar 6dd4bc289c Exclude witness transactions in addPackageTxs() pre-segwit activation 2016-06-30 11:24:32 -04:00
Wladimir J. van der Laan 975a41dcc2 windows: Add testnet icon for testnet link
Overhauled testnet icon by Jonas Schnelli
2016-06-30 17:17:58 +02:00
Wladimir J. van der Laan 4f44cb616d qt: Network-specific example address
Generate an (invalid) example address for in the bitcoin address
widgets, based on the network prefix, instead of hardcoding a mainnet
address.

- `1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L` for mainnet (same as now)
- `n2wxQmfexkjwEPgdD6iJA7T7RtzkmHxhFc` for testnet
2016-06-29 17:35:54 +02:00
Wladimir J. van der Laan a7897c02f7 qt: Remove client name from debug window
Remove the client name from the debug window in the GUI. It is already
part of the user agent, so adding it separately doesn't add anything.
2016-06-28 18:27:49 +02:00
BtcDrak 14d01309be Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY 2016-06-28 17:17:36 +01:00
Wladimir J. van der Laan 3685e0c1da
Merge #8261: The bit field is shown only when status is "started"
2129fce The bit field is shown only when status is "started" (Pavel Janík)
2016-06-28 16:06:40 +02:00
Wladimir J. van der Laan 3b2dadc8d5
qt: Periodic translations update 2016-06-28 11:49:38 +02:00
Pavel Janík 2129fcea69 The bit field is shown only when status is "started" 2016-06-28 10:25:27 +02:00
Wladimir J. van der Laan ff03c50c00
Merge #8257: Do not ask a UI question from bitcoind
1acf1db Do not ask a UI question from bitcoind (Pieter Wuille)
2016-06-28 10:12:01 +02:00
Suhas Daftuar f15c2cde45 CreateNewBlock: add support for size-accounting to addPackageTxs
Includes a change to not continue to use size-accounting in addScoreTxs
or addPackageTxs just because addPriorityTxs() is used.
2016-06-27 10:58:58 -04:00
Wladimir J. van der Laan 5a06ebbf2d
Merge #8258: RPC: Hide softfork if timeout is 0
409f833 RPC: Hide softfork if timeout is 0 (jl2012)
2016-06-27 16:07:50 +02:00
Pieter Wuille 252675efc6 Do not send witnesses in cmpctblock 2016-06-26 20:19:00 +02:00
Wladimir J. van der Laan 1922e5a654
Merge #8244: remove unnecessary LOCK(cs_main) in getrawpmempool
27f8126 remove unnecessary LOCK(cs_main) (Daniel Cousens)
2016-06-25 16:10:10 +02:00
jl2012 409f83322e RPC: Hide softfork if timeout is 0 2016-06-25 00:55:07 +08:00
Wladimir J. van der Laan d612837814
Merge #8149: Segregated witness rebased
f852813 BIP9 parameters for testnet (Johnson Lau)
070dbc4 --- [SEGWIT] begin: deployment --- (Pieter Wuille)
fdb43df [qa] Add GetTransactionSigOpCost unit tests (Jonas Nick)
d846e02 [qa] script_tests: witness tests can specify tx amount (Suhas Daftuar)
330b0f3 [qa] p2p segwit tests (Suhas Daftuar)
4f7ff00 [qa] Add rpc test for segwit (Alex Morcos)
66cca79 [qa] Autogeneration support for witness in script_tests (Pieter Wuille)
06d3805 [qa] Add segwit support to script_tests (Pieter Wuille)
00f46cb [qa] Add transaction tests for segwit (NicolasDorier)
0aa9207 [qa] Witness version 0 signing unit tests (Pieter Wuille)
978e200 --- [SEGWIT] begin: tests --- (Pieter Wuille)
745eb67 [RPC] signrawtransaction can sign P2WSH (NicolasDorier)
f4691ab [RPC] Add wallet support for witness transactions (using P2SH) (Pieter Wuille)
605e847 BIP143: Signing logic (Pieter Wuille)
9757b57 --- [SEGWIT] begin: wallet --- (Pieter Wuille)
af87a67 Do not use compact blocks when segwit is enabled (Pieter Wuille)
6032f69 Add rewind logic to deal with post-fork software updates (Pieter Wuille)
b7dbeb2 [libconsensus] Script verification API with amounts (Thomas Kerin)
2b1f6f9 BIP141: Other consensus critical limits, and BIP145 (Pieter Wuille)
7c4bf77 [RPC] Return witness data in blockchain RPCs (Johnson Lau)
3dd4102 BIP143: Verification logic (Pieter Wuille)
0ef1dd3 Refactor script validation to observe amounts (Pieter Wuille)
b8a9749 BIP144: Handshake and relay (receiver side) (Pieter Wuille)
8b49040 BIP141: Commitment structure and deployment (Pieter Wuille)
449f9b8 BIP141: Witness program (Pieter Wuille)
7030d9e BIP144: Serialization, hashes, relay (sender side) (Pieter Wuille)
ecacfd9 --- [SEGWIT] begin: P2P/node/consensus --- (Pieter Wuille)
2016-06-24 18:07:44 +02:00
Pieter Wuille 1acf1db76f Do not ask a UI question from bitcoind 2016-06-24 16:45:12 +02:00
Wladimir J. van der Laan af2421c291
Merge #8256: BUG: bitcoin-qt crash
d7828ab check that transactionView->selectionModel()->selectedRows(0) exists (fsb4000)
2016-06-24 13:48:16 +02:00
fsb4000 d7828abd5b check that transactionView->selectionModel()->selectedRows(0) exists 2016-06-24 18:08:32 +07:00
Pieter Wuille 133deb83df Mark my dnsseed as supporting filtering 2016-06-23 15:44:35 +02:00
Wladimir J. van der Laan 08338942b5
Merge #8204: Update petertodd's testnet seed
d80efec Update petertodd's testnet seed (Peter Todd)
2016-06-23 13:04:42 +02:00
Wladimir J. van der Laan a1c92c29fd trivial: capitalize BIP32 in option help
For consistency, BIP32 should be in uppercase in translation message.

Reported by @pryds on Transifex.
2016-06-23 10:44:36 +00:00
Daniel Cousens 27f8126ff3 remove unnecessary LOCK(cs_main) 2016-06-23 12:44:53 +10:00
Johnson Lau f8528134fc BIP9 parameters for testnet 2016-06-22 15:43:02 +02:00
Jonas Nick fdb43df23e [qa] Add GetTransactionSigOpCost unit tests 2016-06-22 15:43:02 +02:00
Suhas Daftuar d846e02372 [qa] script_tests: witness tests can specify tx amount
Add tests that witness signatures cover value
2016-06-22 15:43:02 +02:00
Suhas Daftuar 330b0f31ee [qa] p2p segwit tests
mininode now supports witness transactions/blocks, blocktools
has a helper for adding witness commitments to blocks, and script
has a function to calculate hashes for signature under sigversion
1, used by segwit.

Py3 conversion by Marco Falke

Test to make sure upgraded nodes don't ask for non-wit blocks by
Gregory Sanders.
2016-06-22 15:43:02 +02:00
Alex Morcos 4f7ff00497 [qa] Add rpc test for segwit
Amended by Pieter Wuille to use multisig 1-of-1 for P2WSH tests, and BIP9
based switchover logic.

Fixes and py3 conversion by Marco Falke.
2016-06-22 15:43:01 +02:00
Pieter Wuille 66cca79130 [qa] Autogeneration support for witness in script_tests 2016-06-22 15:43:01 +02:00
Pieter Wuille 06d3805c1a [qa] Add segwit support to script_tests
Contains fix by Johnson Lau.
2016-06-22 15:43:01 +02:00
NicolasDorier 00f46cbcd9 [qa] Add transaction tests for segwit
Including BIP143 P2WSH examples by jl2012.
2016-06-22 15:43:01 +02:00
Pieter Wuille 0aa9207451 [qa] Witness version 0 signing unit tests 2016-06-22 15:43:01 +02:00
NicolasDorier 745eb678ef [RPC] signrawtransaction can sign P2WSH 2016-06-22 15:43:01 +02:00
Pieter Wuille f4691ab3a9 [RPC] Add wallet support for witness transactions (using P2SH)
Includes support for pushkeyhash wit v0 by Alex Morcos.
2016-06-22 15:43:01 +02:00
Pieter Wuille 605e8473a7 BIP143: Signing logic 2016-06-22 15:43:01 +02:00
Pieter Wuille af87a67eff Do not use compact blocks when segwit is enabled 2016-06-22 15:43:00 +02:00
Pieter Wuille 6032f6930a Add rewind logic to deal with post-fork software updates
Includes logic for dealing with pruning by Suhas Daftuar.
2016-06-22 15:43:00 +02:00
Thomas Kerin b7dbeb24eb [libconsensus] Script verification API with amounts
script_tests: always test bitcoinconsensus_verify_script_with_amount if VERIFY_WITNESS isn't set

Rename internal method + make it static

trim bitcoinconsensus_ prefix

Add SERIALIZE_TRANSACTION_WITNESS flag
2016-06-22 15:43:00 +02:00
Pieter Wuille 2b1f6f9ccf BIP141: Other consensus critical limits, and BIP145
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22 15:43:00 +02:00
Johnson Lau 7c4bf779e8 [RPC] Return witness data in blockchain RPCs
Includes RPC field name changes by Luke-jr.
2016-06-22 15:43:00 +02:00
Pieter Wuille 3dd410294d BIP143: Verification logic
Includes simplifications by Eric Lombrozo.
2016-06-22 15:43:00 +02:00
Pieter Wuille 0ef1dd3e11 Refactor script validation to observe amounts
This is a preparation for BIP143 support.
2016-06-22 15:43:00 +02:00
Pieter Wuille b8a97498df BIP144: Handshake and relay (receiver side)
Service bit logic by Nicolas Dorier.

Only download blocks from witness peers after fork.
2016-06-22 15:42:59 +02:00
Pieter Wuille 8b49040854 BIP141: Commitment structure and deployment
Includes a fix by Suhas Daftuar and LongShao007
2016-06-22 15:42:59 +02:00
Pieter Wuille 449f9b8deb BIP141: Witness program 2016-06-22 15:42:59 +02:00
Pieter Wuille 7030d9eb47 BIP144: Serialization, hashes, relay (sender side)
Contains refactorings by Eric Lombrozo.
Contains fixup by Nicolas Dorier.
Contains cleanup of CInv::GetCommand by Alex Morcos
2016-06-22 15:42:59 +02:00
Wladimir J. van der Laan e9d76a161d
Merge #8068: Compact Blocks
48efec8 Fix some minor compact block issues that came up in review (Matt Corallo)
ccd06b9 Elaborate bucket size math (Pieter Wuille)
0d4cb48 Use vTxHashes to optimize InitData significantly (Matt Corallo)
8119026 Provide a flat list of txid/terators to txn in CTxMemPool (Matt Corallo)
678ee97 Add BIP 152 to implemented BIPs list (Matt Corallo)
56ba516 Add reconstruction debug logging (Matt Corallo)
2f34a2e Get our "best three" peers to announce blocks using cmpctblocks (Matt Corallo)
927f8ee Add ability to fetch CNode by NodeId (Matt Corallo)
d25cd3e Add receiver-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
9c837d5 Add sender-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
00c4078 Add protocol messages for short-ids blocks (Matt Corallo)
e3b2222 Add some blockencodings tests (Matt Corallo)
f4f8f14 Add TestMemPoolEntryHelper::FromTx version for CTransaction (Matt Corallo)
85ad31e Add partial-block block encodings API (Matt Corallo)
5249dac Add COMPACTSIZE wrapper similar to VARINT for serialization (Matt Corallo)
cbda71c Move context-required checks from CheckBlockHeader to Contextual... (Matt Corallo)
7c29ec9 If AcceptBlockHeader returns true, pindex will be set. (Matt Corallo)
96806c3 Stop trimming when mapTx is empty (Pieter Wuille)
2016-06-22 14:30:38 +02:00
Wladimir J. van der Laan 9e45ef1ef0
Merge #8234: qt: Periodic transifex update
4cbe05b qt: Periodic transifex update (Wladimir J. van der Laan)
2016-06-22 08:52:06 +02:00
Wladimir J. van der Laan 760a6c7cb2
Merge #8231: [Qt] fix a bug where the SplashScreen will not be hidden during startup
b3e1348 [Qt] fix a bug where the SplashScreen will not be hidden during startup (Jonas Schnelli)
2016-06-22 08:50:14 +02:00
Wladimir J. van der Laan 961893f26e
Merge #8222: Enable mempool consistency checks in unit tests
3775ff9 Enable mempool consistency checks in unit tests (Pieter Wuille)
2016-06-22 08:48:37 +02:00
Matt Corallo 48efec82f3 Fix some minor compact block issues that came up in review 2016-06-21 16:09:46 -07:00
Wladimir J. van der Laan 4cbe05bf20 qt: Periodic transifex update
Pulls in the following new languages:

- `af` Afrikaans
- `es_419` Spanish (Latin America)
- `es_AR` Spanish (Argentina)
- `es_CO` Spanish (Colombia)
- `fil` Filipino
- `it_IT` Italian (Italy)
- `ro` Romanian
- `sr@latin` Serbian (Latin)
- `ta` Tamil
- `uz@Latn` Uzbek (Latin)
- `zh_HK` Chinese (Hong Kong)
2016-06-21 15:32:07 +02:00
Jonas Schnelli b3e1348c46
[Qt] fix a bug where the SplashScreen will not be hidden during startup 2016-06-21 11:35:29 +02:00
TheLazieR Yip bf9c70b100
Fix LogPrint to LogPrintf
Printing Log without category defined should use LogPrintf

Github-Pull: #8230
Meta: PR should have been based on master in the first place
2016-06-21 10:21:42 +02:00
Wladimir J. van der Laan 1f86d64f6d
Merge #8220: Stop trimming when mapTx is empty
ad0752e Stop trimming when mapTx is empty (Pieter Wuille)
2016-06-20 15:21:27 +02:00
Wladimir J. van der Laan 94ab58b5cc
Merge #8179: Evict orphans which are included or precluded by accepted blocks.
54326a6 Increase maximum orphan size to 100,000 bytes. (Gregory Maxwell)
8c99d1b Treat orphans as implicit inv for parents, discard when parents rejected. (Gregory Maxwell)
11cc143 Adds an expiration time for orphan tx. (Gregory Maxwell)
db0ffe8 This eliminates the primary leak that causes the orphan map to  always grow to its maximum size. (Gregory Maxwell)
1b0bcc5 Track orphan by prev COutPoint rather than prev hash (Pieter Wuille)
2016-06-20 14:53:33 +02:00
Wladimir J. van der Laan a6ddb19bd9
Merge #7687: Stop treating importaddress'ed scripts as change
595b22e Stop treating importaddress'ed scripts as change (Pieter Wuille)
2016-06-20 14:09:49 +02:00
Wladimir J. van der Laan 12a541e8da
Merge #8210: [Qt] Bump to Qt5.6.1
2759597 Only pass -lQt5PlatformSupport if >=Qt5.6 (Jonas Schnelli)
59d063d Use runtime linking of QT libdbus, use custom/temp. SDK URL (Jonas Schnelli)
6194d9a Fix bitcoin_qt.m4 and fix-xcb-include-order.patch (Jonas Schnelli)
f6eb4e2 [depends] OpenSSL 1.0.1k - update config_opts (fanquake)
f25209a depends: bump OSX toolchain (Cory Fields)
2016-06-20 13:33:41 +02:00
Jonas Schnelli 2759597bc8
Only pass -lQt5PlatformSupport if >=Qt5.6 2016-06-20 10:17:01 +02:00
Pieter Wuille ccd06b94f6 Elaborate bucket size math 2016-06-19 23:06:55 -07:00
Matt Corallo 0d4cb48ef1 Use vTxHashes to optimize InitData significantly 2016-06-19 23:06:55 -07:00
Matt Corallo 811902649d Provide a flat list of txid/terators to txn in CTxMemPool 2016-06-19 23:06:55 -07:00
Matt Corallo 56ba516727 Add reconstruction debug logging 2016-06-19 23:06:55 -07:00
Matt Corallo 2f34a2e476 Get our "best three" peers to announce blocks using cmpctblocks 2016-06-19 23:06:55 -07:00
Matt Corallo 927f8eede0 Add ability to fetch CNode by NodeId 2016-06-19 23:06:55 -07:00
Matt Corallo d25cd3ec4e Add receiver-side protocol implementation for CMPCTBLOCK stuff 2016-06-19 23:06:55 -07:00
Matt Corallo 9c837d5468 Add sender-side protocol implementation for CMPCTBLOCK stuff 2016-06-19 01:34:58 -07:00
Matt Corallo 00c40784fe Add protocol messages for short-ids blocks 2016-06-19 01:34:57 -07:00
Matt Corallo e3b2222144 Add some blockencodings tests 2016-06-19 01:34:57 -07:00
Matt Corallo f4f8f14adc Add TestMemPoolEntryHelper::FromTx version for CTransaction 2016-06-19 01:34:57 -07:00
Matt Corallo 85ad31ede7 Add partial-block block encodings API 2016-06-19 01:34:57 -07:00
Matt Corallo 5249daca5a Add COMPACTSIZE wrapper similar to VARINT for serialization 2016-06-19 01:34:57 -07:00
Matt Corallo cbda71cf04 Move context-required checks from CheckBlockHeader to Contextual... 2016-06-19 01:34:57 -07:00
Matt Corallo 7c29ec9449 If AcceptBlockHeader returns true, pindex will be set.
Assert this instead of checking (and then dref'ing later anyway)
to make sure no one thinks they can change that postcondition of
AcceptBlockHeader..
2016-06-19 01:34:57 -07:00
Pieter Wuille 96806c39f4 Stop trimming when mapTx is empty 2016-06-19 01:34:57 -07:00
Pieter Wuille 3775ff9ea7 Enable mempool consistency checks in unit tests 2016-06-18 19:15:03 +02:00
Pieter Wuille ad0752e41f Stop trimming when mapTx is empty 2016-06-18 18:50:40 +02:00
MarcoFalke faa91b12f7 [wallet] tests: Don't use floating point 2016-06-17 13:07:38 +02:00
Pieter Wuille 66db2d62d5
Merge #7600: Mining: Select transactions using feerate-with-ancestors
29fac19 Add unit tests for ancestor feerate mining (Suhas Daftuar)
c82a4e9 Use ancestor-feerate based transaction selection for mining (Suhas Daftuar)
2016-06-16 19:20:13 +02:00
Suhas Daftuar 29fac19c93 Add unit tests for ancestor feerate mining 2016-06-16 12:35:37 -04:00
Suhas Daftuar c82a4e9a63 Use ancestor-feerate based transaction selection for mining
Includes changes by Pieter Wuille
2016-06-16 12:35:37 -04:00
Wladimir J. van der Laan 9c3d0fab36
Merge #7892: Add full UTF-8 support to RPC
7982fce doc: Mention full UTF-8 support in release notes (Wladimir J. van der Laan)
6bbb4ef test: test utf-8 for labels in wallet (Wladimir J. van der Laan)
a406fcb test: add ensure_ascii setting to AuthServiceProxy (Wladimir J. van der Laan)
60ab9b2 Squashed 'src/univalue/' changes from 2740c4f..f32df99 (Wladimir J. van der Laan)
2016-06-16 12:08:35 +02:00
Wladimir J. van der Laan 3f89a534ac
Merge #8113: Rework addnode behaviour
1a5a4e6 Randomize name lookup result in ConnectSocketByName (Pieter Wuille)
f9f5cfc Prevent duplicate connections where one is by name and another by ip (Pieter Wuille)
1111b80 Rework addnode behaviour (Pieter Wuille)
2016-06-16 12:06:51 +02:00
Wladimir J. van der Laan 62fcf27bd8
Merge #8171: [RPC] Fix createrawtx sequence number unsigned int parsing
6fa950a [RPC] Fix createrawtx sequence number unsigned int parsing (Jonas Schnelli)
2016-06-16 11:06:51 +02:00
Wladimir J. van der Laan e4bb4a85a5
Merge #8084: Add recently accepted blocks and txn to AttemptToEvictConnection.
6ee7f05 Allow disconnecting a netgroup with only one member in eviction. (Gregory Maxwell)
5d0ca81 Add recently accepted blocks and txn to AttemptToEvictConnection. (Gregory Maxwell)
2016-06-16 11:03:52 +02:00
Wladimir J. van der Laan 0a64777b90
Merge #8208: Do not set extra flags for unfiltered DNS seed results
bc0a895 Do not set extra flags for unfiltered DNS seed results (Pieter Wuille)
2016-06-16 10:57:59 +02:00