Commit Graph

170 Commits

Author SHA1 Message Date
Jiří Musil
7d0c424ad8 Ignore Ordinals in Golomb filters (#967) 2023-11-08 10:21:18 +01:00
Martin Boehm
83d411be4e Use golomb config in block sync, refactor 2023-11-08 10:21:18 +01:00
Martin Boehm
96dbc8c9dc Add configuration for block golomb filters 2023-11-08 10:21:18 +01:00
grdddj
911454f171 Implement Golomb block filters for each block
Contains a websocket method `getBlockFilter` and REST endpoint `block-filters`
2023-11-08 10:21:18 +01:00
kevin
36c744b7df
perf: leverage binary search for managing for Ids and MultiTokenValues (#910)
The change executes a migration, which for ETH mainnet takes about 20 minutes of down time.
2023-04-13 13:22:58 +02:00
Martin Boehm
fabad15c10 Refetch failed ethereum internal data 2023-04-13 11:28:52 +02:00
Martin Boehm
bf5f6f9e30 Limit the number of db size on disc calculations 2023-03-12 20:56:11 +01:00
Martin Boehm
708f96cf57 Add extended index option - vin.txid 2023-03-08 17:04:20 +01:00
Martin Boehm
d52832f6f7 Add extended index option - spendingTxid 2023-03-08 17:04:20 +01:00
Martin Boehm
55f3ad3caa Estimate mining time of mempool tx 2023-02-01 17:58:37 +01:00
Martin Boehm
76a19b7f10 Add estimate fee and average block period prometheus metrics 2023-02-01 17:58:37 +01:00
Martin Boehm
91c4675a53 Give info about fiat rates in status page and API 2023-02-01 17:58:37 +01:00
Martin Boehm
0bb8f69e60 Migration from DB v5 to v6 for BitcoinType coins 2023-02-01 17:58:37 +01:00
Martin Boehm
1a476e58f0 Upgrade to go 1.19 and rocksdb 7.5.3 2023-02-01 17:58:37 +01:00
Martin Boehm
8bdc3da694 Return address aliases from API 2023-02-01 17:58:37 +01:00
Martin Boehm
f57bd2e6c3 Download ETH 4byte signatures 2023-02-01 17:58:37 +01:00
Martin Boehm
d5e871818a Minor refactor 2023-02-01 17:58:37 +01:00
Martin Boehm
ec510811cd Refactor storing Ethereum block specific data 2023-02-01 17:58:37 +01:00
Martin Boehm
91031715f7 Bulk import ETH internal transactions 2023-02-01 17:58:37 +01:00
Martin Boehm
e3bb706ea2 Index ETH internal transactions 2023-02-01 17:58:37 +01:00
Martin Boehm
c374ef86fd Update types in preparation for eth internal transactions,
bump dbVersion to 6
2023-02-01 17:58:37 +01:00
Martin Boehm
1febd808c3 Upgrade to go1.17.1 and rocksdb v6.22.1 2021-11-10 00:32:11 +01:00
Martin Boehm
576b8b57b7 Upgrade to go 1.15.6, rocksdb 6.13.3 and other dependecies 2020-12-04 11:57:11 +01:00
Martin Boehm
0a3ea6e225 Send websocket notification on new tx for input addresses 2020-05-24 17:58:29 +02:00
David Hill
13527bda06 build: go module support 2020-03-05 11:54:42 -05:00
Martin Boehm
6d1725717e Fix typos and texts 2020-03-05 11:18:21 +01:00
Martin Boehm
1d0a985c9e Fix packBlockInfo 2020-02-25 00:55:11 +01:00
Martin Boehm
a4da2f3865 Insert utxos in fixUtxo in the growing order 2020-02-24 23:11:46 +01:00
Martin Boehm
9feccfdb2e Automatically check for UTXO inconsitencies 2020-02-24 23:11:46 +01:00
Martin Boehm
1b713308a3 Fix order of utxos 2020-02-24 23:11:46 +01:00
Martin Boehm
7f46fbab0d Fix incorrect order of utxos 2020-02-24 23:11:46 +01:00
Martin Boehm
d583028721 Check the order of utxos 2020-02-24 23:11:46 +01:00
Martin Boehm
2e37cbb974 Insert utxos in the right order in disconnect block 2020-02-24 23:11:46 +01:00
Martin Boehm
00b0a402ea Alter disconnect block procedure to avoid possible utxo db inconsistency 2020-02-24 23:11:46 +01:00
Martin Boehm
47173774f6 Optimize and sort correctly fixed utxos 2020-02-24 23:11:46 +01:00
Martin Boehm
5a2b67bc9a Improve storing/loading of block info to db 2020-02-24 23:11:46 +01:00
Martin Boehm
2493c3d1af Fix errors in utxo db 2020-02-24 23:11:46 +01:00
Martin Boehm
58f426207e Handle possible address descriptor mismatch in db column addresses 2020-02-24 23:11:46 +01:00
Martin Boehm
0751ed452c Check for error in utxo DB 2020-02-24 23:11:46 +01:00
Vladyslav Burzakovskyy
4b63b483e4 fiatRates: always return rates as a map, even if the ticker is unavailable 2020-01-22 15:26:12 +01:00
Martin
5a604441b4 Fix formatting 2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
db8e0938df fiatRates: rename "data_timestamp" field to "ts" 2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
9cec5424e7 fiatRates: fields to camelCase, update output format and tests 2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
c58b1538d6 fiatRates: timestamps as int64, errors as -1, update field names and tests 2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
bef572c494 FiatRates: store rates as float64 instead of json.Number 2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
14c64410f7 FiatRates: change input & output time values to Unix timestamps
make currency parameter optional, return all rates if it's empty

update tests
2020-01-08 17:57:47 +01:00
Martin Boehm
1cec22ecba Merge branch 'master' into balanceHistory 2019-12-17 11:52:33 +01:00
Vladyslav Burzakovskyy
f6111af5da Add fiat rates functionality (#316)
* Add initial commit for fiat rates functionality

* templates.go: use bash from current user's environment

* bitcoinrpc.go: add FiatRates and FiatRatesParams to config

* blockbook.go: add initFiatRatesDownloader kickoff

* bitcoin.json: add coingecko API URL

* rockdb.go: add FindTicker and StoreTicker functions

* rocksdb_test.go: add a simple test for storing and getting FiatRate tickers

* rocksdb: add FindLastTicker and convertDate, make FindTicker return strings

* rocksdb: add ConvertDate function and CoinGeckoTicker struct, update tests

* blockbook.go, fiat: finalize the CoinGecko downloader

* coingecko.go: do not stop syncing when encountered an error

* rocksdb_test: fix the exported function name

* worker.go: make getBlockInfoFromBlockID a public function

* public.go: apiTickers kickoff

* rocksdb_test: fix the unittest comment

* coingecko.go: update comments

* blockbook.go, fiat: reword CoinGecko -> FiatRates, fix binary search upper bound, remove assignment of goroutine call result

* rename coingecko -> fiat_rates

* fiat_rates: export only the necessary methods

* blockbook.go: update log message

* bitcoinrpc.go: remove fiatRates settings

* use CurrencyRatesTicker structure everywhere, fix time format string, update tests, use UTC time

* add /api/v2/tickers tests, store rates as strings (json.Number)

* fiat_rates: add more tests, metrics and tickers-list endpoint, make the "currency" parameter mandatory

* public, worker: move FiatRates API logic to worker.go

* fiat_rates: add a future date test, fix comments, add more checks, store time as a pointer

* rocksdb_test: remove unneeded code

* fiat_rates: add a "ping" call to check server availability

* fiat_rates: do not return empty ticker, return nil instead if not found

add a test for non-existent ticker

* rocksdb_test: remove Sleep from tests

* worker.go: do not propagate all API errors to the client

* move InitTestFiatRates from rocksdb.go to public_test.go

* public.go: fix FiatRatesFindLastTicker result check

* fiat_rates: mock API server responses

* remove commented-out code

* fiat_rates: add comment explaining what periodSeconds attribute is used for

* websocket.go: implement fiatRates websocket endpoints & add tests

* fiatRates: add getFiatRatesTickersList websocket endpoint & test

* fiatRates: make websocket getFiatRatesByDate accept an array of dates, add more tests

* fiatRates: remove getFiatRatesForBlockID from websocket endpoints

* fiatRates: remove "if test", use custom startTime instead

Update tests and mock data

* fiatRates: finalize websocket functionality

add "date" parameter to TickerList

return data timestamps where needed

fix sync bugs (nil timestamp, duplicate save)

* fiatRates: add FiatRates configs for different coins

* worker.go: make GetBlockInfoFromBlockID private again

* fiatRates: wait & retry on errors, remove Ping function

* websocket.go: remove incorrect comment

* fiatRates: move coingecko-related code to a separate file, use interface

* fiatRates: if the new rates are the same as previous, try five more times, and only then store them

* coingecko: fix getting actual rates, add a timestamp parameter to get uncached responses

* vertcoin_testnet.json: remove fiat rates parameters

* fiat_rates: add timestamp to log message about skipping the repeating rates
2019-12-17 10:40:02 +01:00
Martin Boehm
bf3d822b87 Add filter from-to to balance history 2019-11-25 18:34:33 +01:00
Martin Boehm
b33414cdba Fix formatting and linting issues 2019-05-27 12:51:42 +02:00