Commit Graph

11739 Commits

Author SHA1 Message Date
TomZ 24d4503c4e Is release = true 2019-10-22 15:26:59 +02:00
TomZ 8e9808edaf Test: Follow changes in the API 2019-10-21 14:18:19 +02:00
TomZ c1c3d7bd25 Reviewed the API for BlockChain service more.
This finishes the refactor and review and making it much
more future proof by adding gaps in the numbers for extensibility.
2019-10-21 13:55:30 +02:00
TomZ 7708e3f840 simplify 2019-10-20 22:12:09 +02:00
TomZ 3c25232751 Exit when nothing is found. 2019-10-20 22:12:09 +02:00
TomZ 79e4974d19 Port API getblock::filter to use script-hash
The API call for GetBlock has a filter-on-address functionality which is
now ported to no longer use ripe160 addresses but instead uses output-
script hashes.
This avoids problems for transactions not using p2pkh and generally is a
cleaner solution.

This also adds a unit test to test this feature.
2019-10-20 22:12:09 +02:00
TomZ f1d0a68579 Port address monitor service to use address-hash
Remove addresses of type ripe160 to be used in the API of AddresMonitor
API service. Instead use a sha256 hash of the entire output script.

This is mostly internal changes not affecting the operations much.
2019-10-20 20:17:17 +02:00
TomZ e6df5a8e06 Fix running API test in a dev-test-build
This initializes the hubs random when built using unsafe crypto.
Typically only used when the dev wants to run it in tools like valgrind.
2019-10-20 19:17:18 +02:00
TomZ c4e255560b Port indexer client to use script-hash
This allows us to support p2sh properly.
2019-10-20 12:19:00 +02:00
TomZ 2396938cfb New version and only connect to new versions 2019-10-20 11:57:01 +02:00
TomZ fcbe8d3b8b Adjust BitcoreProxy to the new Indexer API 2019-10-16 22:57:50 +02:00
TomZ 00814e24f9 API: Use hash of outscript instead of address
The usage of a ripe160 for bitcoin addresses in the API and in the
Indexer loses some info, specifically what kind of script it is.
Additionally not all types of scripts fit this mold. At best that means
its not future-proof.

This adds a method to the API in order to select from a Tx the hashed
outscript (thats singlehashed sha256) and refactor the address indexer
to use that instead of the ripe160 address.

The API enums broke a little, so I used the opportunity to break it a
lot and clean up the enums in order to make them more future-proof.
But, yeah, software from before this commit is protocol incompatible
with software after this commit.
2019-10-16 22:57:50 +02:00
TomZ e2209abcbb Make the slowness of the SQL DB show up in everyday logs. 2019-10-16 22:32:47 +02:00
TomZ 09a251c1df Fix test stability. 2019-10-15 19:23:57 +02:00
TomZ d24b4450ea A little cleanup of main.cpp 2019-10-15 19:23:57 +02:00
TomZ 7489baae5a Add testnet seeds
The only one maintained last time I tested is now severely outdated...
So lets just add a bunch more.

also use proper testnet fork point time.
2019-10-15 19:23:57 +02:00
TomZ 60390cc452 Promote multisig tests to the new test framework 2019-10-14 19:24:19 +02:00
TomZ 3d34226103 Fixes in types and unsigned/signed comparisons. 2019-10-14 19:24:19 +02:00
TomZ 4d501f77f7 Add [[noreturn]] attribute. 2019-10-14 19:24:19 +02:00
TomZ 7593d06473 Use blockheight to enable historical features
We used various ways to enable new features over the last 10 years.
We can remove that legacy code and just set the blockheight.

This cleans up the code quite a bit.
2019-10-14 19:24:19 +02:00
TomZ dae5ce3a6b Fixes and comments in the new MultiSig code 2019-10-14 19:24:19 +02:00
TomZ 2e600dfe7f Import Schnorr multisig code 2019-10-14 19:22:27 +02:00
TomZ 71f0dcf942 Fixlets
Add 'override' keyword on various places.
Make test output a more readable should it fail.
2019-10-10 19:20:04 +02:00
TomZ d684bb5b52 Remove dead code. 2019-10-10 19:18:47 +02:00
TomZ 035cbe34f7 Do not construct out-of-bound pointers in SHA2 code
Backport of Bitcoin Core PR15950
2019-10-10 17:47:56 +02:00
TomZ 4f1bf92aef Remove unneeded semicolon 2019-10-10 17:42:16 +02:00
TomZ 2161d919fc Add test for SINGLE|ANYONECANPAY
Backport of Bitcoin Core PR12082
2019-10-10 17:33:31 +02:00
TomZ 0cac942685 Replace boost::bind with std::bind
This is done almost everywhere, I skipped the boost signals since thats
only really used in the GUI part which is just there to do testing.
2019-10-10 16:18:53 +02:00
TomZ da199a5cf7 Port https://github.com/bitcoin/bitcoin/pull/12460
Assert CPubKey::ValidLength to the pubkey's header-relevant size

Original author: Marco Falke
2019-10-10 15:13:34 +02:00
TomZ a69ab412f5 Add unit test to test the minimalPush consensus change. 2019-10-09 19:36:48 +02:00
TomZ 51dbc6163e Add a more generic API for outputscripts. 2019-10-09 19:36:29 +02:00
TomZ b09fa3ab7e Minor fixups
This makes the whitespace usage more in line with the standard.

This also moves an implementation of a virtual method to the cpp file
in order to avoid dynamic linking issues down the line.
2019-10-09 19:35:14 +02:00
TomZ 4e9f66a335 Remove unused CScript::isCommitment() method. 2019-10-09 19:16:52 +02:00
TomZ bba96f3805 Remove unused member 2019-10-09 19:13:03 +02:00
TomZ 1f33f9c6bc Remove various warnings 2019-10-08 14:24:22 +02:00
TomZ 3fc088a76d Add 2019-11 HF activation mechanism. 2019-10-08 14:24:22 +02:00
TomZ 80f27ee26d Make CheckMinimalPush exposed and unit test it. 2019-10-08 14:24:22 +02:00
TomZ 0a6774eb33 Warn when variable not understood. 2019-10-08 14:24:22 +02:00
TomZ 387cf4482c Add benchmark option to Bitcore-Proxy
This is a compile time option to log how many milliseconds it took to
fulfill a request.
Enabled by default for now.
2019-10-08 10:26:22 +02:00
TomZ 4c2c57e5cc fix docs bugs 2019-10-06 15:20:41 +02:00
TomZ 07e7b93e3e BitCore: Add support for 'address/balance' endpoint 2019-10-06 13:27:19 +02:00
TomZ ba11657cf7 BitcoreProxy; add endpoint & docs
This makes the service mostly self-documenting as it serves plain simple
html pages for error messages which show the end points you can use.

This adds support for the "unspent outputs for address" endpoint.
2019-10-06 13:07:28 +02:00
TomZ 9a1121efd4 At least be right most of the time. 2019-10-05 18:17:12 +02:00
TomZ 937b97b64b Remove stray debug statement 2019-10-05 17:59:06 +02:00
TomZ 2b5dad002a BitCore: fix docker config file 2019-10-05 17:58:32 +02:00
TomZ 55f139220f new version 2019-10-05 17:23:50 +02:00
TomZ 680437f16f Merge branch '2019.07' 2019-10-05 17:12:15 +02:00
TomZ a9e546071f BitCore: Add support for address lookup 2019-10-05 16:08:37 +02:00
TomZ 922d8b1f16 Fixlets in types 2019-10-05 16:08:37 +02:00
TomZ 9107d7d3b9 Change member from CScript to ConstBuffer
The Tx::Output struct can do better by keeping the ConstBuffer as
converting to CScript is cheap, the other way around is not.
2019-10-05 16:08:37 +02:00