Commit Graph

19 Commits

Author SHA1 Message Date
tomFlowee 586c0d5eef Some string usage cleanups.
Avoid unneeded conversions.
2025-02-12 15:35:41 +01:00
John Galt aa44de7d89 Change PostgreSQL so that inserts are faster (using COPY) 2025-02-12 15:35:41 +01:00
tomFlowee ae78dd0bb8 Update email address 2021-06-20 22:44:44 +02:00
TomZ 9744e01343 Make compile 2020-02-19 16:55:46 +01:00
TomZ a85a9e1207 Indexer now uses blockCount
Instead of asking for a block and reacting when we get a failure, this
just uses the current height instead.

This also makes 'flush' happen in each indexers' own thread, which should
be good for performance.
2019-12-12 16:02:08 +01:00
TomZ 8dde1c86ed Avoid unneeded copying 2019-11-06 23:20:17 +01: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 425ee250cb Fixlets from static code inspector 2019-09-12 15:21:48 +02:00
TomZ b6c4ac6f88 Fixes in SQL speed
This explicitly detects the initial sync and refuses to create
any indexes on the SQL databases during this massive insert stage.

Some other minor issues got fixed here too.
2019-08-29 22:33:57 +02:00
TomZ 691ff90014 Avoid uninit data from entering DB
Also fix typo in variable name
2019-08-15 10:55:41 +02:00
TomZ 0fdba5a404 Add special postgres SQL statements
When the user selected postgres, use specific SQL statements that are
optimised for it.
2019-08-13 22:21:22 +02:00
TomZ cb5ff404d3 Refactor the Indexer application
This moves each indexer to live in its own thread, making blocking
operations allowed and Ok and separate from incoming requests.
2019-06-26 21:39:07 +02:00
TomZ a6888b74d8 Need 2 connections to do multithreading
Lets open 2 SQL connections to allow the bulk inserts
to happen in a different thread from the selects we do
resulting from incoming questions.
2019-06-19 16:55:39 +02:00
TomZ ed7ca33d6a Add decoding and printing addresses work.
This now supports cashaddress, legacy addresses and it prints
basic info about the usages of said address.
2019-04-11 18:45:28 +02:00
TomZ dad38b66c6 Flush indexer to SQL database when we reach Tip() 2019-04-11 00:01:54 +02:00
TomZ a3a456cdcd Try to get more speed out of the SQL DB
we chunk the data and make sure we create a transaction so autocommit
is turned off.
2019-04-06 19:00:55 +02:00
TomZ e14254f33d Make indexer load a config file for setup
Using standard ini file format.
This is the easiest way to configure it to connect to an external SQL
database.
2019-04-06 15:16:37 +02:00
TomZ dfb28874ca Adjust design by inverting hash
Additionally I split the sql data over multiple tables
to avoid a forever-growing one.
2019-04-05 23:11:37 +02:00
TomZ 5ed3419d9b Add beginnings of the AddressIndexer as well 2019-04-04 22:46:38 +02:00