Commit graph

1371 commits

Author SHA1 Message Date
Steven Roose
95602ec21f
Merge #834: Switch default bits of hiding to 52
c780a5186 nit: Comment in blind_tests.cpp was wrong (Steven Roose)
e87b39040 Some readability improvements in blind.cpp (Steven Roose)
26e5490e8 Switch default bits of hiding to 52 (Gregory Sanders)

Pull request description:

  Replaces https://github.com/ElementsProject/elements/pull/793 and is basically that MR but rebased. (I can't rebase on Greg's branch.)

Tree-SHA512: 2c321d7f50d1c16f73e9eafc905b3a21a1aa7a4c44a2da39b1adda7f7c12d74c0f49379c7995afe605b5c07410e8e2f0e3468826e4d246c91c8a1c2c8a03e5dc
2020-03-17 17:40:05 +00:00
Steven Roose
ad27fddd1f
Merge #796: Trivial: fix typo in error message when mainchain daemon is unavailable
5489e602f Trivial: fix typo in error message when mainchain daemon is unavailable (Philippe McLean)

Pull request description:

Tree-SHA512: 84c00897122e67305f6147266eca92d9794662bb386fc957a2dbe92ac044db781993fe65a8f8b5d69e0aba87d40184678e535c1364210fd8c0f729b56675e731
2020-03-17 16:07:40 +00:00
Gregory Sanders
26e5490e83
Switch default bits of hiding to 52 2020-03-16 20:55:37 +00:00
Steven Roose
c5cb714847
Place the mainchain RPC warmup message in a better place 2020-02-18 15:15:52 +00:00
Steven Roose
1bdda5e0a9
Add DEFAULT chain and set to liquidv1
This fixes f.e. that when arguments are set in CLI or the config file
without a network attached (`port` instead of `liquidv1.port`), they
will now be assigned to the liquidv1 instead of Bitcoin mainnet.
2020-01-30 17:29:39 +00:00
Philippe McLean
5489e602ff Trivial: fix typo in error message when mainchain daemon is unavailable 2019-12-04 18:22:09 -08:00
Gregory Sanders
674f3c7473 When RPC server disabled, only warn on validatepegin failure 2019-11-05 09:06:56 -05:00
Gregory Sanders
dce4cecdda Replace fedpeg template init check for pak one 2019-09-05 10:51:09 -04:00
Gregory Sanders
16b87ba951 Disable PAK loading from configuration on init, disable pak test 2019-09-03 10:55:06 -04:00
Gregory Sanders
a502bc8ff9 Move MainchainRPCCheck to its own schedule, fix resolution 2019-06-05 14:33:24 +02:00
Steven Roose
efe4e8ff04
MERGE-FIX: Fix functional tests 2019-05-24 17:11:47 +01:00
Steven Roose
f4889a5253
UPSTREAM MERGE BROKEN: Merge upstream commit '519b0bc5dc' into master 2019-05-17 16:17:09 +01:00
Steven Roose
dc900eb7d7
Merge branch 'master' into catchup 2019-05-14 16:49:18 +01:00
Gregory Sanders
9d4097dca2 Only schedule mainchain RPC checks after initial check succeeds 2019-05-06 09:38:58 -04:00
Steven Roose
9f4f2e7519
MERGE-FIX: Fix compilation errors 2019-05-03 17:46:12 +01:00
Steven Roose
7f894ae00b
UPSTREAM MERGE BROKEN: Merge commit 'f617e05c38' into master 2019-05-01 19:18:18 +01:00
Gregory Sanders
967ed83852 f'init: If bitcoind is unreachable, explain where the user can get it' 2019-04-10 11:25:25 -04:00
Luke Dashjr
0a3f589058 init: If bitcoind is unreachable, explain where the user can get it
Fixes: https://github.com/greenaddress/elements/issues/2
2019-04-10 10:12:48 -04:00
Steven Roose
ade539cbb4 Don't assume mainchain is Bitcoin 2019-03-21 19:30:52 +00:00
Steven Roose
aba54b3f92
Make validatepegin default to true if has parent chain 2019-03-21 17:55:02 +00:00
Gregory Sanders
04a8f2e051 Document blindedprefix arg 2019-03-20 09:32:21 -04:00
Steven Roose
0b5066143d
[BROKEN] Add CA validation 2019-03-20 12:05:46 +00:00
Steven Roose
04d06917d2
Rename con_elementswitness to con_elementsmode
It will have effect on more than just witness structure from now on.
2019-03-20 12:05:44 +00:00
Steven Roose
484d83c371
Add new arguments 2019-03-20 12:05:43 +00:00
Steven Roose
84954c8110
Add CAssetsDir 2019-03-20 12:05:38 +00:00
Steven Roose
0f28780364
Add blech32 implementation and API 2019-03-20 12:05:35 +00:00
Pieter Wuille
880ce7d46b Call RewindBlockIndex without cs_main held 2019-02-24 18:55:21 -08:00
Wladimir J. van der Laan
a83aedca18
Merge #13676: Explain that mempool memory is added to -dbcache
7cb1a1401d Explain that unused mempool memory is added to -dbcache (Sjors Provoost)

Pull request description:

  Since `-maxmempool` is 450 MB by default it's quite possible for a user to accidentally OOM a low
  memory device if they increase `-dbcache` beyond the default.

  <img width="563" alt="schermafbeelding 2018-09-06 om 17 02 40" src="https://user-images.githubusercontent.com/10217/45166219-c9c4f700-b1f6-11e8-9ee5-14b8b3a9830b.png">

Tree-SHA512: 44c7419d0b06c14aee5d2c02a41e5da488bcb40a5f65ba24554a45707b222f1e4b03d42486dfef9336d917ac2990eef2b1aec287a75b3ef1ccca0e88ac86a0c0
2019-02-21 18:57:21 +01:00
Wladimir J. van der Laan
3e1ca1348c
Merge #15278: Improve PID file error handling
3782075a5f Move all PID file stuff to init.cpp (Hennadii Stepanov)
561e375c73 Make PID file creating errors fatal (Hennadii Stepanov)
745a2ace18 Improve PID file removing errors logging (Hennadii Stepanov)

Pull request description:

  Digging into #15240 the lack of the proper logging has been discovered.
  Fixed by this PR.

  UPDATE (inspired by @laanwj's [comment](https://github.com/bitcoin/bitcoin/pull/15278#discussion_r252641810)):
  Not being able to create the PID file is fatal now.

  Output of `bitcoind`:

  ```
  $ src/bitcoind -pid=/run/bitcoind/bitcoind.pid
  2019-02-01T23:20:10Z Bitcoin Core version v0.17.99.0-561e375c7 (release build)
  2019-02-01T23:20:10Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.
  2019-02-01T23:20:10Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463
  2019-02-01T23:20:10Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
  2019-02-01T23:20:10Z Using RdRand as an additional entropy source
  2019-02-01T23:20:11Z Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory
  Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory
  2019-02-01T23:20:11Z Shutdown: In progress...
  2019-02-01T23:20:11Z Shutdown: Unable to remove PID file: File does not exist
  2019-02-01T23:20:11Z Shutdown: done
  ```

  Output of `bitcoin-qt`:
  ![screenshot from 2019-02-02 01-19-05](https://user-images.githubusercontent.com/32963518/52154886-9349b600-2688-11e9-8128-470f16790305.png)

  **Notes for reviewers**
  1. `CreatePidFile()` has been moved from `util/system.cpp` to `init.cpp` for the following reasons:
  - to get the ability to use `InitError()`
  - now `init.cpp` contains code of both creating PID file and removing it

  2. Regarding 0.18 release process: this PR modifies 1 string and introduces 2 new ones.

Tree-SHA512: ac07d0f800e61ec759e427d0afc0ca43d67f232e977662253963afdd0a220d34b871050f58149fc9fabd427bfc8e0d3f6a6032f2a38f30ad366fc0d074b0f2b3
2019-02-21 09:23:10 +01:00
Hennadii Stepanov
3782075a5f
Move all PID file stuff to init.cpp
It is only used from init.cpp.
Move-only refactoring.
2019-02-14 22:53:03 +02:00
Wladimir J. van der Laan
65435701ef
Merge #15358: util: Add SetupHelpOptions()
a99999cc04 util: Add SetupHelpOptions() (MarcoFalke)

Pull request description:

  Every binary we have sets up the help option in their own way and wording.

  Solve that by having one function take care of it for all of them.

Tree-SHA512: 6e947fa8bc2a46fa6ca9f45777020aa269a5df0dd916ebc863224f9a1e0f79e8e7754a1478567307edd9461e8babd77d26bc2710bbd56e8f8da9020aa85a8c9c
2019-02-12 15:27:39 +01:00
Jordan Baczuk
dfbf117bbb Move maxTxFee initialization to init.cpp 2019-02-08 07:06:44 -07:00
MarcoFalke
a99999cc04
util: Add SetupHelpOptions() 2019-02-06 14:16:43 -05:00
Wladimir J. van der Laan
3a573fd46c
Merge #14922: windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
0164b0f5cf build: Remove WINVER pre define in Makefile.leveldb.inlcude (Chun Kuan Lee)
d0522ec94e Drop defunct Windows compat fixes (Ben Woosley)
d8a2992067 windows: Call SetProcessDEPPolicy directly (Chun Kuan Lee)
1bd9ffdd44 windows: Set _WIN32_WINNT to 0x0601 (Windows 7) (Chun Kuan Lee)

Pull request description:

  The current minimum support Windows version is Vista. So set it to 0x0600
  5a88def8ad/mingw-w64-headers/include/sdkddkver.h (L19)

Tree-SHA512: 38e2afc79426ae547131c8ad3db2e0a7f54a95512f341cfa0c06e4b2fe79521ae67d2795ef96b0192e683e4f1ba6183c010d7b4b8d6b3e68b9bf48c374c59e7d
2019-02-05 18:15:01 +01:00
MarcoFalke
452acee4da
Merge #15266: memory: Construct globals on first use
77777c5624 log: Construct global logger on first use (MarcoFalke)

Pull request description:

  The (de)initialization order is not well defined in C++, so generally it is not safe to use globals as the (de/con)structor of one global could use the (de/con)structor of another global before/after it has been (con/de)structed.

  Specifically this fixes:
  * `g_logger` might not be initialized on the first use, so do that. (Fixes #15111)

Tree-SHA512: eb9c22f4baf31ebc5b0b9ee6a51d1354bae1f0df186cc0ce818b4483c7b5a7f90268d2b549ee96b4c57f8ef36ab239dc6497f74f3e2ef166038f7437c368297d
2019-02-04 14:26:07 -05:00
Hennadii Stepanov
561e375c73
Make PID file creating errors fatal 2019-02-02 01:07:23 +02:00
Hennadii Stepanov
745a2ace18
Improve PID file removing errors logging 2019-02-02 00:33:33 +02:00
Gregory Sanders
4202671221 MERGE FIX: spelling linter fixes 2019-01-31 10:55:03 +00:00
Sjors Provoost
7cb1a1401d
Explain that unused mempool memory is added to -dbcache 2019-01-31 10:56:06 +01:00
Wladimir J. van der Laan
77339e5c24
Merge #15163: Correct units for "-dbcache" and "-prune"
6f6514a080 Correct units for "-dbcache" and "-prune" (Hennadii Stepanov)

Pull request description:

  Actually, all `dbcache`-related values in the code are measured in MiB (not in megabytes, MB) or in bytes (e.g., `nTotalCache`).

  See: https://github.com/bitcoin/bitcoin/blob/master/src/txdb.h

  ba8c8b2227/src/init.cpp (L1405-L1424)

  Also, "-prune" is fixed:
  1. The GUI values in GB are translated to the node values in MiB correctly.
  2. The maximum of the "prune" `QSpinBox` is not limited by default value of 99 (GB).

  Fix: #15106

Tree-SHA512: 151ec43b31b1074db8b345fedb1dcc10bde225899a5296bfc183f57e1553d13ac27db8db100226646769ad03c9fcab29d88763065a471757c6c41ac51108459d
2019-01-30 20:22:57 +01:00
Hennadii Stepanov
6f6514a080
Correct units for "-dbcache" and "-prune"
All dbcache-related values in the code are measured in MiB (not in
megabytes, MB) or in bytes.
The GUI "-prune" values in GB are translated to the node values in MiB
correctly. The maximum of the "-prune" QSpinBox is not limited by the
default value of 99 (GB).
Also, this improves log readability.
2019-01-30 07:17:22 +02:00
MarcoFalke
77777c5624
log: Construct global logger on first use 2019-01-29 15:30:24 -05:00
Gregory Sanders
c62fab2d69 UPSTREAM MERGE BROKEN: Merge commit '3832c25f17' into merge_14225 2019-01-28 18:14:25 +00:00
Gregory Sanders
07173d02f4 Merge branch 'elements-0.17' into merge_13968 2019-01-24 12:51:19 -05:00
Steven Roose
9308a7f388
Merge #484: [0.17] PAK Enforcement, as policy
19ef5e3cb Add link to pak authorization design in secp-zpk (Gregory Sanders)
1cb252e01 Descriptor support in PAK infrastructure and tests (Gregory Sanders)
636673447 Properly encode parent witness addresses (Gregory Sanders)
7e63ce39e Extend validateaddress to check parent address validity. (Gregory Sanders)
85bcda52f pak mempool removal: don't modify the vector you are taking range over (Gregory Sanders)
8de42370d fixup mempool clearing of peg-outs on block commitment (Gregory Sanders)
542b826c9 ScriptHasvalidPAKProof: Allow any standard single-key output script type (Gregory Sanders)
71acfb359 Add IsPayToWitnessPubkeyHash convenience function (Gregory Sanders)
1241343bd testproposedblock: Reject blocks with non-matching pak commitments (Gregory Sanders)
47ea638b4 miner adds commitment when pak enforcement is set only (Gregory Sanders)
3fc3ac340 disallow pak enforcement arg when nonstandard tx are possible (Gregory Sanders)
dfe5331db Miner adds PAK commitments when config 'disagress' with block commits (Gregory Sanders)
bcd8db972 functional test for pak feature (Gregory Sanders)
5b6d767b6 Load PAK arguments from config and disk on startup (Gregory Sanders)
d391782cd Add getwalletpakinfo RPC call (Gregory Sanders)
f06e6f648 Wallet offline_counter starts at -1 (Gregory Sanders)
0e52456f3 Return status of pak enforcement on the blockchain in (Gregory Sanders)
050bb4905 Add getpakinfo RPC call, without wallet state (Gregory Sanders)
3cfe2d49e Add sendtomainchain RPC call which is used when -pak_enforce is enabled (Gregory Sanders)
567de67af Break out sendtomainchain to call functions based on -enforce_pak (Gregory Sanders)
070be0f5c add initpegout RPC for peg-out wallet initialization (Gregory Sanders)
47422e71d Write and load peg-out wallet functions on wallet load (Gregory Sanders)
4e631bd77 Add derivation helpers for peg-out wallet infrastructure (Gregory Sanders)
1559cc9c3 C(Pub)Key::Derive: Return optional tweak vector for peg-out wallets (Gregory Sanders)
f1dbd1cf3 -multi_data_permitted: Allow >1 op_return output by policy (Gregory Sanders)
9f5cc03f9 Read PAK list from connected blocks, save list, and boot transactions not conforming (Gregory Sanders)
86fbc2418 GetPAKKeysFromCommitment utility function (Gregory Sanders)
bf66d77a8 Add Read/Write functions to txdb for PAK lists (Gregory Sanders)
2b4899dd3 PAK enforcement via standardness, drop multi-op_return restriction (Gregory Sanders)
6679823fc Create global PAK lists for config and blockchain state (Gregory Sanders)
8c7746c4d Add CScript::IsPayToPubkeyHash convienience function (Gregory Sanders)
43424cbf7 Add PAK proof validation function (Gregory Sanders)
378e59461 Define PAKList structure and operations (Gregory Sanders)
40571ab6d Turn on secp-zkp experimental modules for PAK (Gregory Sanders)
2019-01-24 17:25:36 +00:00
Gregory Sanders
3fc3ac340f disallow pak enforcement arg when nonstandard tx are possible 2019-01-24 11:07:11 -05:00
Gregory Sanders
5b6d767b61 Load PAK arguments from config and disk on startup 2019-01-24 11:07:10 -05:00
Gregory Sanders
c5a93c008f UPSTREAM MERGE BROKEN: Merge commit '8aa9badf5e' into e17 2019-01-23 16:48:22 -05:00
Gregory Sanders
e3388ecfa2 UPSTREAM MERGE: Merge commit '62d40f1983' into elements-0.17 2019-01-23 12:57:11 -05:00
Chun Kuan Lee
d8a2992067 windows: Call SetProcessDEPPolicy directly 2019-01-23 21:37:44 +08:00