Commit Graph

11773 Commits

Author SHA1 Message Date
TomZ e8c38f6b77 Add api docs 2019-11-28 23:59:32 +01:00
TomZ 42aaf08e6b Fixlet in comments grammar. 2019-11-25 23:23:00 +01:00
TomZ c094c8d523 Merge branch '2019.09' 2019-11-22 19:24:13 +01:00
TomZ abdefac590 Fix handling a tx spending an out-of-range output
Those should not be stored in the orphan cache, as the data is just
wrong. Not missing.
So also punish the sender, it won't ever be valid.
2019-11-22 19:23:57 +01:00
TomZ 79437d227e Avoid forwarding transactions twice.
An INV in some cases could lead us to reply with two transactions
instead of one.
2019-11-22 19:14:32 +01:00
TomZ 69ea2ddfcd Make whitelisted peers not get punished for bad transactions. 2019-11-22 18:58:58 +01:00
TomZ d86c5a837f Make orphancache follow coding style-guide.
member methods start with a lowercase character.
2019-11-21 20:03:26 +01:00
TomZ ca1d61dc46 Auto-restart hub inside of the docker container.
If the hub dies after running for more than 2 minutes, auto-restart it.
2019-11-21 15:43:52 +01:00
TomZ c1671c707e Merge branch '2019.09' 2019-11-15 21:07:25 +01:00
TomZ 0f67b095a1 Fix CLI access inside docker
Don't limit RPC-JSON to just localhost, that won't work cross-docker.
2019-11-15 21:02:08 +01:00
TomZ f24fa2b6ad Make it easier to connect using cookies. 2019-11-15 20:57:12 +01:00
TomZ adec1ef3b2 Make rpc-cookie reuse existing cookie files.
This allows external software to create it and manage the cookie which
is useful in a cloud setting.
2019-11-15 19:15:22 +01:00
TomZ f77589b7d3 Whitespace and minor issues. 2019-11-15 18:59:55 +01:00
TomZ 9d77814cc0 cleanups and splits
The recent introduction of helper methods on pubkey.h had the
side-effect of pulling in crypto libraries.
This splits the static methods into a separate namespace and file
to avoid such cross-module dependencies.
2019-11-13 19:09:24 +01:00
TomZ 175096b2bd Refactor: move files
Move some files back to the server "library".
Merge the 'console' lib with server, as it doesn't really make sense with
just one file and nobody exclusively linking to it.

The server "libary" is not really a library, its the place we put all
the files shared by hub-qt hub-cli and hub.
We no longer depend on these files from other places (mostly due to
moving to the new logging framework) and as such we can move the files
back.
2019-11-13 19:09:24 +01:00
TomZ bcec400e79 Remove Qt dependency from the blockchain search stuff. 2019-11-13 19:09:16 +01:00
TomZ d573e307c3 Refactor; move SplitHostPort to utilstrencodings 2019-11-12 15:35:54 +01:00
TomZ 3412d67f62 master is not a release branch 2019-11-11 21:13:17 +01:00
TomZ 6cc749627d Merge branch '2019.09' 2019-11-11 21:12:18 +01:00
TomZ 0f5f8c2920 Cleanup config file example.
Remove dbcache option, flowee doesn't need it.
This is a legacy option that was needed when the leveldb layer was
used for the utxo, as that required us to write our own caching.
2019-11-11 19:50:25 +01:00
TomZ 6770467a06 Change the callback to have the version included 2019-11-11 19:37:15 +01:00
TomZ f3785a1339 ignore the config file from qtqreator 2019-11-11 19:37:12 +01:00
TomZ 700f8644a5 Remove duplicate 2019-11-11 19:37:08 +01:00
TomZ 0e8a4da185 Find address from newest to oldest. 2019-11-11 19:37:04 +01:00
TomZ 3b5491e9d3 Fixlets in log-levels for the bitcore proxy. 2019-11-11 19:37:01 +01:00
TomZ 4050b1b415 Add dependency 2019-11-11 18:07:45 +01:00
TomZ ea57495a4d Fixlets in debian package 2019-11-11 16:43:58 +01:00
TomZ 92ef04cb6d Update deb versions 2019-11-11 15:42:06 +01:00
TomZ a645f963dc Make node ignore tx-invs during IBD/catch-up
This now also works when using '-connect' or other ways to whitelist a
node.
2019-11-06 23:43:13 +01:00
TomZ 917a5babe3 Give nodes 1 point of damage here
This is mostly nodes not following the same chain, doesn't make sense to
keep those around.
2019-11-06 23:43:13 +01:00
TomZ 8dde1c86ed Avoid unneeded copying 2019-11-06 23:20:17 +01:00
TomZ 748cd54a8e Fix log line limiter
Avoid logging being the slow part.
2019-11-06 23:20:17 +01:00
TomZ e7ad998d57 Add -fPIC to installed libs 2019-11-04 14:20:50 +01:00
TomZ 77cff07ec5 Add a cmake file to find installed components 2019-11-04 14:20:26 +01:00
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