Commit graph

18114 commits

Author SHA1 Message Date
Gregory Sanders
c00d83f126 Set walletrbf default to 1 2018-12-18 16:08:44 -05:00
Luke Dashjr
0853a234a4 Make it possible to unconditionally RBF with mempoolreplacement=fee,-optin 2018-12-18 16:08:18 -05:00
Luke Dashjr
d0cccad9d4 Recognise temporary REPLACE_BY_FEE service bit 2018-12-18 16:08:18 -05:00
Gregory Sanders
cecfe80cc5
Merge #467: [0.17] Add initialfreecoins option, default of 0
95432aa Test listunspent sanity when specifying initialfreecoins (Carl Dong)
1ac14fc restore bitcoin regtest gen block using -genesis_style (Gregory Sanders)
8b8c11a Add initialfreecoins option, default of 0 (Carl Dong)

Pull request description:

  This PR adds a `-initialfreecoins` debug option, and a `-con_genesis_style` to go along with it.

  This allows us to correctly set the amount of coins created in the genesis block, either in the `elements` style or `bitcoin` style.

  Tests have been modified to test that the correct amount of coins are created.

Tree-SHA512: d3c56e7109e8e6496b6e5b819dc09f3ebf82013882854cc76062a39e4399e7eeb5789b567be527133278c1646a2765d02a09bd2d9618bdaeec5a852042e40c2b
2018-12-18 16:01:15 -05:00
Carl Dong
95432aad58 Test listunspent sanity when specifying initialfreecoins 2018-12-18 10:27:45 -08:00
Gregory Sanders
1ac14fc958 restore bitcoin regtest gen block using -genesis_style
- also regenerate test data for getblockstats
2018-12-18 10:27:43 -08:00
Carl Dong
8b8c11a44b Add initialfreecoins option, default of 0
- Add CommitToArgument without fedpegScript or signblockscript
- Modify CreateGenesisBlock to take in the genesis scriptSig
- Add AppendInitialIssuace without assets support
- AppendInitialIssuance to genesis block for Custom chain only
- Add -initialfreecoins option
- Modify tests to work with initialfreecoins
2018-12-18 10:21:51 -08:00
Gregory Sanders
b59eccb62e
Merge #470: [0.17] Block v4 mandatory
e04f6c7 Activate BIPs 34, 65, 66 at block 0 (Carl Dong)
2018-12-18 13:15:41 -05:00
Carl Dong
e04f6c7018 Activate BIPs 34, 65, 66 at block 0
- Reinstate Bitcoin BIP activation heights for tests
- Add tests for block v4 after genesis block
2018-12-17 02:53:37 -08:00
Gregory Sanders
d24ecf21a4
Merge #482: update secp to secp-zkp 53ad841cafa3bcb94b65409aec91fd7043533cf7
2d465aa Squashed 'src/secp256k1/' changes from 0b70241..53ad841 (Gregory Sanders)
2018-12-14 18:07:39 -05:00
Gregory Sanders
2d465aa9cd Squashed 'src/secp256k1/' changes from 0b70241..53ad841
53ad841 Add explanation about how BIP32 unhardened derivation can be used to simplify whitelisting
71c5fe0 Add comment to explain effect of max_n_iterations in surjectionproof_init
85fd42f add unit test for generator and pedersen commitment roundtripping
2ccf885 rangeproof: fix serialization of pedersen commintments
60c173b rangeproof: verify correctness of pedersen commitments when parsing
32d7526 generator: verify correctness of point when parsing
ae14e8a rangeproof: check that points deserialize correctly when verifying rangeproof
44fe43d rangeproof: add fixed vector test case
e065d7d Expose generator in shared library
fb1ba32 fix spelling in documentation
fb75faa Test for rejection of trailing bytes in range proofs
9b2cf17 Test for rejection of trailing bytes in surjection proofs
a3a1800 Reject surjection proofs with trailing garbage
0c77ae9 Minor bugfix. Wrong length due to NUL character.
b1f31bc Add whitelisting benchmark
52a9f8f add whitelist_impl.h to include for dist
a707865 generator: add API tests
ec1ef04 generator: remove unnecessary ARG_CHECK from generate()
b0e9aa8 Fix generator makefile
526c654 Fix pedersen_blind_generator_blind_sum return value documentation
b51886e Add n_keys argument to whitelist_verify
37c57de Fix checks of whitelist serialize/parse arguments
9b8a9d9 whitelist: fix serialize/parse API to take serialized length
7f17515 Fix include/secp256k1_rangeproof.h function argument documentation.
0d81702 rangeproof: add API tests
417bb06 surjectionproof: rename unit test functions to be more consistent with other modules
1e2d5c1 surjectionproof: add API unit tests
7878a29 surjectionproof: tests_impl.h s/assert/CHECK/g
e609591 rangeproof: fix memory leak in unit tests
0c17f79 add surjection proof module
c174f0c Implement ring-signature based whitelist delegation scheme
a2bc660 rangeproof: several API changes
21bfb3c Expose generator in pedersen/rangeproof API
f4620de Constant-time generator module
d46fc3c rangeproof: expose sidechannel message field in the signing API
cf40b1b [RANGEPROOF BREAK] Use quadratic residue for tie break and modularity cleanup
6d28767 Get rid of precomputed H tables (Pieter Wuille)
ae1e576 Pedersen commitments, borromean ring signatures, and ZK range proofs.
efc61dc Add 64-bit integer utilities
e34ceb3 Merge #557: Eliminate scratch memory used when generating contexts
b3bf5f9 ecmult_impl: expand comment to explain how effective affine interacts with everything
efa783f Store z-ratios in the 'x' coord they'll recover
ffd3b34 add `secp256k1_ge_set_all_gej_var` test which deals with many infinite points
84740ac ecmult_impl: save one fe_inv_var
4704527 ecmult_impl: eliminate scratch memory used when generating context
7f7a2ed ecmult_gen_impl: eliminate scratch memory used when generating context
314a61d Merge #553: add static context object which has no capabilities
1086fda Merge #354: [ECDH API change] Support custom hash function
40fde61 prevent attempts to modify `secp256k1_context_no_precomp`
ed7c084 add static context object which has no capabilities
1e6f1f5 Merge #529: fix tests.c in the count == 0 case
c8fbc3c [ECDH API change] Allow pass arbitrary data to hash function
b00be65 [ECDH API change] Support custom hash function
95e99f1 fix tests.c in the count == 0 case
452d8e4 Merge #523: scratch: add stack frame support
6fe5043 scratch: add stack frame support
9bc2e26 Merge #522: parameterize ecmult_const over input size
7c1b91b parameterize ecmult_const over input size
dbc3ddd Merge #513: Increase sparsity of pippenger fixed window naf representation
fb9271d Merge #510: add a couple missing `const`s to ecmult_pippenger_wnaf
cd5f602 Merge #515: Fix typo
09146ae Merge #512: secp256k1_ec_privkey_negate - fix documentation
ec0a7b3 Don't touch leading zeros in wnaf_fixed.
9e36d1b Fix bug in wnaf_fixed where the wnaf array is not completely zeroed when given a 0 scalar.
96f68a0 Don't invert scalar in wnaf_fixed when it is even because a caller might intentionally give a scalar with many leading zeros.
9b7c47a Fix typo
6dbb007 Increase sparsity of pippenger fixed window naf representation
1646ace secp256k1_ec_privkey_negate - fix documentation
9b3ff03 add a couple missing `const`s to ecmult_pippenger_wnaf
cd329db Merge #460: [build] Update ax_jni_include_dir.m4 macro
7f9c1a1 Merge #498: tests: Avoid calling fclose(...) with an invalid argument
f99aa8d Merge #499: tests: Make sure we get the requested number of bytes from /dev/urandom
b549d3d Merge #472: [build] Set --enable-jni to no by default instead of auto.
d333521 Merge #494: Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
2ef8ea5 Merge #495: Add bench_ecmult to .gitignore
82a96e4 tests: Make sure we get the requested number of bytes from /dev/urandom
5aae5b5 Avoid calling fclose(...) with an invalid argument
cb32940 Add bench_ecmult to .gitignore
31abd3a Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
c95f6f1 Merge #487: fix tests typo, s/changed/unchanged
fb46c83 Merge #463: Reduce usage of hardcoded size constants
02f5001 Merge #490: Disambiguate bench functions and types
1f46d60 Disambiguate bench functions and types
f54c6c5 Merge #480: Enable benchmark building by default
c77fc08 Merge #486: Add pippenger_wnaf for multi-multiplication
d2f9c6b Use more precise pippenger bucket windows
4c950bb Save some additions per window in _pippenger_wnaf
a58f543 Add flags for choosing algorithm in ecmult_multi benchmark
36b22c9 Use scratch space dependent batching in ecmult_multi
355a38f Add pippenger_wnaf ecmult_multi
bc65aa7 Add bench_ecmult
dba5471 Add ecmult_multi tests
8c1c831 Generalize Strauss to support multiple points
548de42 add resizeable scratch space API
0e96cdc fix typo, s/changed/unchanged
c7680e5 Reduce usage of hardcoded size constants
6ad5cdb Merge #479: Get rid of reserved _t in type names
7a78f60 Print whether we're building benchmarks
4afec9f Build benchmarks by default
d1dc9df Get rid of reserved _t in type names
57752d2 [build] Set --enable-jni to no by default instead of auto.
e7daa9b [build] Tweak JNI macro to warn instead of error for JNI not found.
5b22977 [build] Update ax_jni_include_dir.m4 macro to deal with recent versions of macOS

git-subtree-dir: src/secp256k1
git-subtree-split: 53ad841cafa3bcb94b65409aec91fd7043533cf7
2018-12-14 16:06:00 -05:00
Gregory Sanders
ed1acfe647 Merge commit '2d465aa9cd' into secp_update 2018-12-14 16:06:00 -05:00
Gregory Sanders
8a472b9e6b
Merge #431: [0.17] blockheaders include block height, nodes validate it
2bfabb3 blockheaders include block height, nodes validate it (Gregory Sanders)
8f6bedf functional framework support for CScriptNum decode (Gregory Sanders)

Pull request description:

  The feature is enabled by default in custom chains; cannot be activated in legacy chains.

Tree-SHA512: d033b7dd0d853e5693efda584494cf58ed7ff43ce32d1f5d44e4ee52907b989e434c8dbb28a0f843da8b799548924d2499e8759a96ed5a7191b95f22b29c7f6e
2018-11-27 11:11:12 -05:00
Gregory Sanders
2bfabb3e4f blockheaders include block height, nodes validate it
The block height validation is gated by the startup option
`con_blockheightinheader`, accesible in custom chains only
using option `chain=<name>`. Only if set to true will this
field be (de)serialized and evaluated in consensus logic.
Otherwise the field is simply ignored, other than being
stored in memory as the default value 0.
2018-11-27 09:46:25 -05:00
Gregory Sanders
8f6bedfd4b functional framework support for CScriptNum decode 2018-11-27 09:45:15 -05:00
Gregory Sanders
823b9093e9
Merge #453: [0.17] Add OptionsCategory::ELEMENTS
2e4cb70 Mark chain params as ::CHAINPARAMS (Steven Roose)
91e48e7 Sane defaults for CHAINPARAM cli args (Steven Roose)
fdf494e Also change Elements-specific chainparams (Steven Roose)
2638df8 Set correct OptionsCategory for elements options (Steven Roose)
6ba4764 Add OptionsCategory::ELEMENTS (Steven Roose)

Pull request description:

  Attempt to group elements-specific -options together.

Tree-SHA512: 3cc669c55f657b9d20c4bc2d67d222b73649b916b45f127858f3ca20210f5589a44a0dac508d47007b7f628fc4108f5ee3011a658ff269c47b722270404a4c4f
2018-11-27 09:42:11 -05:00
Gregory Sanders
609323f7b7
Merge #468: Replace deprecated tostring with tobytes
00315c8 Replace deprecated tostring with tobytes (Carl Dong)

Pull request description:

  Upstream: https://github.com/bitcoin/bitcoin/pull/13963

Tree-SHA512: 667cb8799941e7c3a567e8c9b77b77fdf1b838d170b5de2c51618e6d1284216039cb39e44f9650b6a7de325036a0d2c80aeb9cf5387da7e183f33461a31c9727
2018-11-27 09:09:53 -05:00
Gregory Sanders
cc4b98f854
Merge #469: Add TX_TRUE output format, accept in wallet with anyonecanspendaremine
9908f9a Add TX_TRUE output format, accept in wallet with `anyonecanspendaremine` (Gregory Sanders)
2018-11-27 08:59:18 -05:00
Steven Roose
2e4cb70112 Mark chain params as ::CHAINPARAMS 2018-11-26 12:18:05 +00:00
Steven Roose
91e48e7233 Sane defaults for CHAINPARAM cli args 2018-11-20 11:33:02 +00:00
Gregory Sanders
9908f9a152 Add TX_TRUE output format, accept in wallet with anyonecanspendaremine 2018-11-15 15:12:12 -05:00
Carl Dong
00315c85bb Replace deprecated tostring with tobytes 2018-11-15 05:30:49 -08:00
Steven Roose
fdf494e060 Also change Elements-specific chainparams 2018-11-09 12:20:05 +00:00
Gregory Sanders
9196b708b3
Merge #463: Update PGP key for stevenroose
e61e78b Update PGP key for stevenroose (Steven Roose)
2018-11-08 12:08:51 -05:00
Steven Roose
e61e78b87d Update PGP key for stevenroose
Also remove jtimon's
2018-11-08 17:08:11 +00:00
Gregory Sanders
0272fb7499
Merge #456: [0.17] move most extended tests to normal
32f1bf2 move most extended tests to normal (Gregory Sanders)
2018-11-05 09:32:17 -05:00
Gregory Sanders
32f1bf26ec move most extended tests to normal 2018-11-01 14:43:44 -04:00
Steven Roose
2638df8ef4 Set correct OptionsCategory for elements options 2018-10-30 17:12:40 +00:00
Steven Roose
6ba4764d6d Add OptionsCategory::ELEMENTS 2018-10-29 19:46:17 +00:00
Gregory Sanders
48e3e957ce
Merge #449: Actually run the bitcoin functional tests with test_runner
e20b836 Actually run the bitcoin functional tests with test_runner (Gregory Sanders)

Pull request description:

  We were just re-running the other tests.

Tree-SHA512: 25d7ffada5fc97f1188cdd906b4c36cdb230ef3ec51e9db4fd199902b675db1e91d6595292ccb0b24a094055c13aae3fe076e0cfc9a09b5d718695f27344f96e
2018-10-26 12:17:41 -04:00
Gregory Sanders
e20b836aeb Actually run the bitcoin functional tests with test_runner 2018-10-26 12:00:55 -04:00
Gregory Sanders
c0d1dbc833
Merge #429: [0.17] Connect gen block tx to db, don't validate gen block
d97920c add functional test for coinbase connection to db (Gregory Sanders)
e532664 allow grabbing genesis transaction(s) when connected (Gregory Sanders)
c7e5549 [#9102] really don't validate genesis block (Gregory Sanders)
ccf40db connect genesis block transaction outputs to coin db (Gregory Sanders)

Pull request description:

  Tests should now be working.

Tree-SHA512: aa2af6637c534d7f9185e969118b52519fe0609ae79fa8f4d5213f939f9a5915f958cf93d02aa6f4a47795c87cc23c93daff3807347cb1b12a426326e6dea60e
2018-10-25 13:39:15 -04:00
Gregory Sanders
d97920caa4 add functional test for coinbase connection to db 2018-10-25 13:21:42 -04:00
Gregory Sanders
e532664298 allow grabbing genesis transaction(s) when connected 2018-10-25 12:51:53 -04:00
Gregory Sanders
c7e5549317 [#9102] really don't validate genesis block 2018-10-25 12:51:53 -04:00
Gregory Sanders
ccf40db968 connect genesis block transaction outputs to coin db 2018-10-25 12:51:53 -04:00
Gregory Sanders
866da4496b
Merge #447: pin flake8 version to avoid breaking compatibilities
77e8fa4 pin flak8 version to avoid breaking compatibilities (Gregory Sanders)

Pull request description:

  This happened upstream too.

Tree-SHA512: a6d05c86e1421c03ac38ee69c4b5ff7174d7c00b0c965fcd6016a9f9b94510e4a68dce162f4bb47a2ba5d624bfc33cc6ae53fc47264d98e117632f0a6a580bed
2018-10-25 12:08:04 -04:00
Gregory Sanders
77e8fa4ac7 pin flak8 version to avoid breaking compatibilities 2018-10-25 11:25:20 -04:00
Gregory Sanders
725e62ad36
Merge #446: Duplicate serializations of consensus objects to use as Bitcoin seria…
5b4aff7 Duplicate serializations of consensus objects to use as Bitcoin serialization (Gregory Sanders)

Pull request description:

  …lization

  This will allow us to break elements serialization in other PRs such as height in block header.

Tree-SHA512: 1c58bb6caeef8d874579abcf536c7ca4541538e85441f51709971b7c7c5ce9e48e0c6dc09626a27aed0f045fbb1fe21c756b1d3986ce75489cf06fecc16eb15b
2018-10-24 15:27:56 -04:00
Gregory Sanders
5b4aff7108 Duplicate serializations of consensus objects to use as Bitcoin serialization 2018-10-24 15:11:19 -04:00
Gregory Sanders
3d274183d2
Merge #445: [0.17] Duplicate bitcoin functional tests
ef039f0 Add travis build that tests bitcoin functional tests (Gregory Sanders)

Pull request description:

  We're going to keep these tests alive as long as possible to increase modularity/QA of the codebase.

Tree-SHA512: c0639422fe518cd9a5f6eb06f24a4c812d38bdde95f37a6787b10ab009e6ee9ff22b30ea8f79e6cf47581bd0d7577fe149f3e636c4c6f0488c9c6555730b8315
2018-10-24 11:00:37 -04:00
Gregory Sanders
e63e500658
Merge #443: [0.17] add block subsidy argument to allow different/non-inflation chains
7bac720 add block subsidy argument to allow different/non-inflation chains (Gregory Sanders)

Pull request description:

  Previously we just set this to 0 and continued, this allows tests to otherwise pass up until this point.

Tree-SHA512: e4e6ae85779a6079ccad38941b4b0dbb3362fa4d902aff5cedbea4641201646f6946cc0d140cb0fdac81c5009ff983baabebcbeeed99f089e44ad492fd6cd1ee
2018-10-24 10:57:48 -04:00
Gregory Sanders
ef039f001b Add travis build that tests bitcoin functional tests 2018-10-23 13:29:57 -04:00
Gregory Sanders
7bac720925 add block subsidy argument to allow different/non-inflation chains 2018-10-23 09:45:16 -04:00
Jorge Timón
146d80ff9d
Merge #441: rename mandatory coinbase test, add it to test_runner list
2d6f137 rename mandatory coinbase test, add it to test_runner list (Gregory Sanders)

Pull request description:

Tree-SHA512: cd35c6360cbc59db480dd4ced1d07699b947ecaede985e331a9ca389af9636e942bea29bbd8d976405f0abc1e3fe8f6fbbaa36ef1d70bdbb9267e19ce61bcfbe
2018-10-22 18:18:46 +02:00
Gregory Sanders
2d6f1374c2 rename mandatory coinbase test, add it to test_runner list 2018-10-22 09:49:07 -04:00
Gregory Sanders
101ec23faa
Merge #430: [0.17] Mandatory coinbase feature
0d20b55 add mandatory coinbase functional test (Gregory Sanders)
edb0532 add consensus.mandatory_coinbase_destination (Gregory Sanders)

Pull request description:

  Includes functional test

Tree-SHA512: e7fdf4584c5a61516778dff272c0f4c9964fee515b705c4fd3ade842954bcc7426bdaf5273a64e4b2472fedc940ead7552c0ec80b4608aac381f91a8f2356d95
2018-10-22 09:22:24 -04:00
Gregory Sanders
0d20b55374 add mandatory coinbase functional test 2018-10-18 15:17:15 -04:00
Gregory Sanders
edb053276b add consensus.mandatory_coinbase_destination 2018-10-18 15:17:15 -04:00
Gregory Sanders
de842cb58f
Merge #432: [0.17] QA: Use resgtest2 chain instead of regtest for rpc tests
a1e0c56 QA: Use resgtest2 chain instead of regtest for rpc tests (Jorge Timón)
4454c52 QA: Adapt BitcoinTestFramework for chains other than "regtest" (Jorge Timón)
a06be15 Testchains: Introduce custom chain whose constructor... (Jorge Timón)
46749eb Testchains: Qt: Simplify network/chain styles and add a default purple (Jorge Timón)
c0c1e38 Testchains: Generic selection with -chain=<str> in addition of -testnet and -regtest (Jorge Timón)
56515c3 9102: Really don't validate genesis block (Gregory Sanders)

Pull request description:

  Backport of https://github.com/bitcoin/bitcoin/pull/8994

  The tests seem to pass with:

  ```
  python3 ./test/functional/test_runner.py -j4 --extended
  ```

  Let's please try to keep all general review things on https://github.com/bitcoin/bitcoin/pull/8994 and elements-specific things here.

  Dependencies:

  - [x] [0.17] Don't edit Chainparams after initialization #427
  - [x] [0.17] Test: Fix example_test.py #434

Tree-SHA512: e216587b6f9d3a462372915e01c8eb3c65a61e4ea29f398e65a7fc03a3ea5676c4711527b5cc2c115893591e7cd5b0ecd2f1fac4faf7ef747a022e2657bc99d4
2018-10-16 14:19:47 -04:00