Compare commits

...

3914 Commits

Author SHA1 Message Date
Kgothatso
a4e536d637 chimaera logic 2025-02-01 12:20:02 +02:00
Kgothatso
a232b6d3e8 Oh well 2025-02-01 12:09:04 +02:00
Kgothatso
4bcb3f6ab2 Configure the mempool backend 2025-02-01 12:06:58 +02:00
Kgothatso
6f8901229a Don't run docker on port 80 2025-02-01 12:04:55 +02:00
wiz
bb5b771128
ops: Tweak nginx cache limits for apinormal 2025-02-01 01:52:19 +09:00
wiz
6a17d665e0
Merge pull request #5761 from mempool/nymkappa/cashapp-69 2025-01-29 12:19:18 +09:00
nymkappa
f54bccf267
[accelerator] fix cashapp acceleration 2025-01-28 18:33:50 +01:00
wiz
f909d6bca5
Merge pull request #5760 from mempool/natsoni/enable-first-seen 2025-01-28 21:01:07 +09:00
natsoni
2407cbfd9a
Enable microsecond logging in bitcoin.conf 2025-01-28 12:55:28 +01:00
natsoni
ec7af86142
Add debug.log path to mainnet prod config 2025-01-28 12:47:11 +01:00
wiz
5f761098ae
Merge pull request #5753 from mempool/knorrium/update_rust 2025-01-28 18:58:45 +09:00
wiz
b2456d104c
Merge pull request #5759 from mempool/nymkappa/image-md5 2025-01-28 18:56:50 +09:00
nymkappa
edc5593792
[services] remove image md5 in urls 2025-01-28 07:57:19 +01:00
wiz
85c78a448d
Merge pull request #5755 from mempool/mononaut/hnl 2025-01-27 12:52:55 +09:00
Mononaut
60d548df46
add missing sg1 hnl emojis 2025-01-27 03:37:01 +00:00
Felipe Knorr Kuhn
0674f3a3ee
Update Rust to 1.84 2025-01-26 10:05:19 -08:00
Felipe Knorr Kuhn
210b632720
Merge branch 'master' into knorrium/update_rust 2025-01-25 19:09:22 -08:00
wiz
fc6c97172b
Merge pull request #5754 from mempool/nymkappa/cc-icons
[accelerator] add credit card provider fa icons
2025-01-26 11:29:45 +09:00
nymkappa
a074c4b2c3
[accelerator] add credit card provider fa icons 2025-01-26 11:26:27 +09:00
Felipe Knorr Kuhn
9e8a35f4a9
Update rust to 1.83 2025-01-25 18:00:45 -08:00
wiz
7b581b2ac3
Merge pull request #5691 from mempool/ops/remove-fmt-add-hnl-sg1
ops: Remove fmt, add hnl + sg1
2025-01-25 17:59:11 +09:00
wiz
1a62c867de
Merge branch 'master' into ops/remove-fmt-add-hnl-sg1 2025-01-25 17:57:28 +09:00
wiz
470a6a7534
Merge pull request #5752 from mempool/nymkappa/rename-twitter-x
[services] twitter -> X
2025-01-25 17:50:53 +09:00
wiz
8bd7849b9d
Merge pull request #5721 from mempool/nymkappa/retry-btcpay-invoice
[accelerator] add btcpay invoice retry button and polish checkout UI
2025-01-25 16:57:39 +09:00
wiz
43393f7227
Merge pull request #5705 from mempool/nymkappa/503-faucet-utxo-chain
[faucet] add new error message when no utxo available
2025-01-25 16:54:43 +09:00
wiz
f67f946723
Merge pull request #5626 from mempool/nymkappa/remove-tx-restrictions-cashapp
[accelerator] remove tx restriction for cashapp payments
2025-01-25 16:54:23 +09:00
wiz
a0d0ee230e
Merge pull request #5665 from mempool/nymkappa/block-pools-json-hash
[blocks] fetch list of block hash filtered by pools-v2.json sha
2025-01-25 16:51:36 +09:00
wiz
edf7798587
Merge pull request #5436 from mempool/nymkappa/fix-bitcoin-payment
[btcpay] better handling for invoice expiration
2025-01-25 16:37:04 +09:00
nymkappa
b826227b36
[services] twitter -> X 2025-01-25 15:46:21 +09:00
wiz
0924f6184b
Merge pull request #5751 from mempool/mononaut/fix-merkle-row-layout 2025-01-24 12:52:20 +09:00
Mononaut
24d0ed4ced
fix next block merkle row layout 2025-01-24 01:56:15 +00:00
nymkappa
9eb85200e0
Merge branch 'master' into nymkappa/fix-bitcoin-payment 2025-01-24 10:53:29 +09:00
wiz
a79c165b30
Merge pull request #5749 from mempool/nymkappa/fido 2025-01-23 22:44:00 +09:00
wiz
7f07c5cbab
Merge branch 'master' into nymkappa/fido 2025-01-23 21:14:35 +09:00
wiz
c021a15d0b
Merge pull request #5750 from mempool/nymkappa/fix-sca-card-on-file 2025-01-23 21:14:24 +09:00
Felipe Knorr Kuhn
a2009aa322
Merge branch 'master' into nymkappa/fido 2025-01-23 01:08:25 -08:00
nymkappa
e6965dac80
[accelerator] fix sca card on file 2025-01-23 18:00:50 +09:00
wiz
c4a7a2e781
Merge pull request #5732 from mempool/nymkappa/accelerator-card-on-file
[accelerator] add support for card on file acceleration
2025-01-23 16:43:14 +09:00
wiz
03bea14f89
Merge pull request #5747 from mempool/nymkappa/overflow
[accelerator] truncate dashboard title
2025-01-23 16:42:44 +09:00
wiz
834f9a9f6d
Merge pull request #5748 from mempool/knorrium/fix_docker_frontend_stratum_config
Fix the missing frontend Stratum config for Docker builds
2025-01-23 16:42:23 +09:00
nymkappa
518297494f
Merge branch 'master' into nymkappa/accelerator-card-on-file 2025-01-23 16:18:40 +09:00
nymkappa
15e67bc77f
Merge branch 'master' into nymkappa/fido 2025-01-23 15:30:26 +09:00
wiz
ff383f9c58
Merge pull request #5742 from mempool/nymkappa/faucet-twitter-to-github
[auth] add login/signup with github support
2025-01-23 15:21:34 +09:00
Felipe Knorr Kuhn
ed44e27991
Merge branch 'master' into knorrium/fix_docker_frontend_stratum_config 2025-01-22 22:01:53 -08:00
wiz
a869ea5ec4
Merge pull request #5746 from mempool/nymkappa/failed-canceled-accel
[accelerator] differentiate failed/canceled accelerations
2025-01-23 14:59:23 +09:00
Felipe Knorr Kuhn
fc4a0f7461
Fix the missing frontend Stratum config for Docker builds 2025-01-22 21:59:15 -08:00
nymkappa
b3f21a10b9
[accelerator] truncate dashboard title 2025-01-23 14:55:31 +09:00
wiz
4290e00376
Merge pull request #5745 from mempool/mononaut/stratum-tweaks 2025-01-22 21:11:33 +09:00
nymkappa
3b91a1437a
[accelerator] differentiate failed/canceled accelerations 2025-01-22 18:58:54 +09:00
Mononaut
363fa3d877
improve stratum table layout on mobile 2025-01-22 09:16:25 +00:00
Mononaut
2e44ea3f01
reorder stratum job table 2025-01-22 09:13:44 +00:00
Mononaut
cac62765a1
fix stratum tree branch level 2025-01-22 09:10:22 +00:00
Mononaut
23713a11c2
link to merkle branch first tx 2025-01-22 05:06:02 +00:00
nymkappa
ff4aca8370
[blocks] update sha in memory/db before re-indexing blocks 2025-01-22 11:26:34 +09:00
softsimon
469faf7456
Merge pull request #5707 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.12.0
Bump mysql2 from 3.11.0 to 3.12.0 in /backend
2025-01-21 23:18:11 +07:00
dependabot[bot]
665a12a040
Bump mysql2 from 3.11.0 to 3.12.0 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.11.0...v3.12.0)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 15:57:18 +00:00
nymkappa
b42431f14a
[auth] add login/signup with github support 2025-01-21 17:39:50 +09:00
softsimon
69dfcbe6fa
Merge pull request #5741 from mempool/simon/remove-babel-dep
Remove babel backend dep
2025-01-21 14:09:39 +07:00
softsimon
b454fa09d2
Remove babel backend dep 2025-01-21 13:49:12 +07:00
softsimon
019101862f
Merge pull request #5711 from mempool/dependabot/npm_and_yarn/frontend/echarts-5.6.0
Bump echarts from 5.5.0 to 5.6.0 in /frontend
2025-01-21 13:43:09 +07:00
wiz
5aeaa68259
ops: Enable stratum in FOSS prod frontend config 2025-01-20 17:56:56 +09:00
nymkappa
e01898a4c5
Merge pull request #5640 from mempool/nymkappa/square-errors
[accelerator] display payment errors, auto reload after 10 secs instead of 3 secs
2025-01-20 17:47:18 +09:00
nymkappa
817076fcbd
Merge branch 'master' into nymkappa/accelerator-card-on-file 2025-01-20 17:36:36 +09:00
nymkappa
0568a8c6c1
Merge branch 'master' into nymkappa/square-errors 2025-01-20 17:36:31 +09:00
wiz
e53e810a55
ops: Fix stratum server URL path in prod config 2025-01-20 17:34:19 +09:00
nymkappa
e2c44b6c62
Merge branch 'master' into nymkappa/square-errors 2025-01-20 17:23:15 +09:00
wiz
36b691e25b
ops: Enable stratum in prod config via localhost nginx proxy 2025-01-20 17:20:38 +09:00
nymkappa
778837322d
Merge branch 'master' into nymkappa/accelerator-card-on-file 2025-01-20 17:05:55 +09:00
wiz
4a14e8d921
Merge pull request #5736 from mempool/mononaut/fix-stratum-trees
fix stratum tree rendering with different branch lengths
2025-01-20 16:39:56 +09:00
Mononaut
4e735cc8b0
fix stratum tree rendering with different branch lengths 2025-01-20 07:30:27 +00:00
softsimon
4520e3fdf2
Merge pull request #5735 from mempool/nymkappa/new-fa-icon
add new fa icon
2025-01-20 14:01:37 +07:00
nymkappa
390bbf1097
add new fa icon 2025-01-20 15:20:29 +09:00
wiz
bd8c1efc8e
Merge pull request #5734 from mempool/knorrium/update_stg_hosts 2025-01-20 13:07:31 +09:00
Felipe Knorr Kuhn
8fbc497a58
Merge branch 'knorrium/update_stg_hosts' of github.com:mempool/mempool into knorrium/update_stg_hosts 2025-01-19 19:50:25 -08:00
Felipe Knorr Kuhn
003956fd16
Update staging hosts
Add rerouting logic for testnet4 tests
Split CI e2e workflow matrix into mempool, liquid and testnet4
2025-01-19 19:50:05 -08:00
Felipe Knorr Kuhn
227d99e990
Fix reroute logic 2025-01-19 19:35:08 -08:00
Felipe Knorr Kuhn
3d1aacbd66
Copypasta matrix for tests 2025-01-19 19:21:02 -08:00
Felipe Knorr Kuhn
1098d2fe3c
Change build step to shell script 2025-01-19 14:21:23 -08:00
Felipe Knorr Kuhn
f59e95fcc8
Run the default mempool config if we are running testnet4 tests 2025-01-19 14:11:41 -08:00
Felipe Knorr Kuhn
7f6399093e
Fix YAML 2025-01-19 13:56:16 -08:00
Felipe Knorr Kuhn
e9e8b0c758
Use testnet as a matrix config instead 2025-01-19 13:38:06 -08:00
Felipe Knorr Kuhn
517a30d2b0
Split module and spec matrix 2025-01-19 13:25:29 -08:00
Felipe Knorr Kuhn
7e766cc28d
Change spec test 2025-01-19 12:36:20 -08:00
Felipe Knorr Kuhn
34099e3861
Stop switching to testnet4 until we can check for the proxied server 2025-01-19 12:32:37 -08:00
Felipe Knorr Kuhn
671b5ea2f2
Reroute testnet4 tests to a different server 2025-01-19 12:24:26 -08:00
Felipe Knorr Kuhn
caa2d83247
Update staging hosts 2025-01-19 02:34:05 -08:00
nymkappa
58e6a78579
[accelerator] add support for card on file acceleration 2025-01-19 17:56:19 +09:00
wiz
703241acf0
Merge pull request #5509 from mempool/mononaut/pool-next-block
mining pool next block info
2025-01-19 17:00:38 +09:00
wiz
6e8579363d
Merge pull request #5508 from mempool/mononaut/stratum
stratum job visualization
2025-01-19 16:48:48 +09:00
Mononaut
b254be2f49
add stratum job to pool page 2025-01-19 06:02:58 +00:00
Mononaut
d6283c54ee
fix stratum config 2025-01-19 05:42:40 +00:00
Mononaut
9ba7172b5b
add coinbase tag column to stratum table 2025-01-19 05:42:40 +00:00
Mononaut
cb4bf0611e
add blockchain bar to stratum page 2025-01-19 05:42:40 +00:00
Mononaut
3ea491ad13
stratum frontend config 2025-01-19 05:42:40 +00:00
Mononaut
eddd7344ad
stratum backend config 2025-01-19 05:42:39 +00:00
Mononaut
4ecf2eb679
experimental stratum job visualization 2025-01-19 05:41:48 +00:00
wiz
34acbca4b9
Merge pull request #5720 from mempool/nymkappa/missing-icon
add new robot icon
2025-01-17 17:14:47 +09:00
wiz
8793fafa4c
Merge pull request #5704 from mempool/mononaut/sca-loading-ux
[accelerator] improve SCA UX
2025-01-17 17:04:52 +09:00
softsimon
341da85c77
Merge pull request #5726 from mempool/mononaut/close-time-rift
Fix time traveling balance charts
2025-01-17 10:56:22 +07:00
softsimon
0d8f63feff
Merge pull request #5725 from mempool/mononaut/fix-partial-rbf
avoid creating incomplete RBF trees
2025-01-17 10:36:46 +07:00
softsimon
e7af43efa2
Merge pull request #5723 from mempool/mononaut/fix-cached-tx-badge
Fix unconfirmed badge on broken RBF txs
2025-01-17 10:15:35 +07:00
wiz
aca2f2ec7d
ops: Set expires -1 header on 2s server cached responses 2025-01-15 16:34:56 +09:00
wiz
803b005880
Merge pull request #5562 from mempool/mononaut/wallet-transactions
Wallet page transactions
2025-01-15 16:33:57 +09:00
Mononaut
204d54b189
fix wallet transactions ordering 2025-01-15 02:39:31 +00:00
Mononaut
c248544fe8
Update wallet page title 2025-01-15 02:39:31 +00:00
Mononaut
b65d00f289
switch multi-address APIs to use POST 2025-01-15 02:39:30 +00:00
Mononaut
f77dc68ec7
Add link to wallet page from custom dashboard txs widget 2025-01-15 02:39:30 +00:00
Mononaut
c4ec50b771
Restore transactions list to wallet page 2025-01-15 02:39:30 +00:00
Mononaut
8529b99675
custom dashboard wallet widgets 2025-01-15 02:39:29 +00:00
Mononaut
cd02d89235
Fix time traveling balance charts 2025-01-14 09:18:35 +00:00
Mononaut
4dcbccd9b2
avoid creating incomplete RBF trees 2025-01-14 06:41:34 +00:00
Mononaut
6a4aeaf7ed
Fix unconfirmed badge on broken RBF txs 2025-01-14 06:31:35 +00:00
softsimon
6432f72664
Merge pull request #5724 from mempool/natsoni/textarea-nav
Fix textarea keyboard navigation
2025-01-14 12:25:24 +07:00
natsoni
f6ab2caaf9
Fix textarea keyboard navigation 2025-01-14 10:42:40 +09:00
nymkappa
3325db4883
[accelerator] add btcpay invoice retry button and polish checkout UI 2025-01-13 11:06:21 +09:00
softsimon
0a255d7fe5
Merge pull request #5706 from mempool/natsoni/websocket-docs
Add websocket commands doc
2025-01-13 06:55:15 +07:00
softsimon
ca0a8aee49
Merge pull request #5716 from mempool/natsoni/fix-address-amount
Fix transaction amount change for P2PK addresses
2025-01-13 06:36:46 +07:00
nymkappa
4a4259fa7d
add new robot icon, wrap import into new lines 2025-01-12 12:16:51 +09:00
nymkappa
faa83866fd
[blocks] fix block pools-v2 hash migration 2025-01-12 12:04:19 +09:00
nymkappa
54058b64ad
Merge branch 'master' into nymkappa/block-pools-json-hash 2025-01-12 11:47:55 +09:00
nymkappa
f142b421f9
Merge pull request #5623 from mempool/nymkappa/delete-irrelevant-code
[refactor] cleaning users.full_name
2025-01-12 11:38:23 +09:00
nymkappa
47cc58c610
Merge branch 'master' into mononaut/sca-loading-ux 2025-01-12 11:11:29 +09:00
nymkappa
21cdb7e3a1
[accelerator] remove tx restriction for cashapp payments 2025-01-11 18:31:45 +09:00
softsimon
c3686a5500
Merge pull request #5713 from mempool/mononaut/fix-missing-unsubs
clean up subscriptions & component references
2025-01-09 16:48:44 +07:00
natsoni
9fbbe4980d
Fix transaction amount change for P2PK addresses 2025-01-08 16:01:59 +01:00
softsimon
0611773647
Merge pull request #5715 from mempool/natsoni/fix-first-seen-loop
Fix filter logic for first seen API fetching
2025-01-08 21:28:11 +07:00
Mononaut
7740908a4c
fix access block scene after destroyed 2025-01-08 13:08:33 +00:00
natsoni
68ea7c59f3
Fix transaction filter logic for first seen fetching 2025-01-07 11:21:04 +01:00
wiz
915f7a6c27
Merge pull request #5714 from mempool/nymkappa/missing-icon
add missing icon
2025-01-07 16:34:46 +09:00
nymkappa
e18c572549
add missing icon 2025-01-07 16:31:03 +09:00
wiz
25133d8505
Merge pull request #5708 from mempool/nymkappa/sca-notification
[accelerator] print sca status for google payment
2025-01-07 15:56:35 +09:00
Mononaut
9f5666f410
explicitly destroy block scenes 2025-01-06 20:44:28 +00:00
Mononaut
6553344489
add missing rxjs unsubscriptions 2025-01-06 18:55:40 +00:00
dependabot[bot]
e77dd114f4
Bump echarts from 5.5.0 to 5.6.0 in /frontend
Bumps [echarts](https://github.com/apache/echarts) from 5.5.0 to 5.6.0.
- [Release notes](https://github.com/apache/echarts/releases)
- [Commits](https://github.com/apache/echarts/compare/5.5.0...5.6.0)

---
updated-dependencies:
- dependency-name: echarts
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-30 02:15:20 +00:00
softsimon
3c84505579
upgrading fortawesome dep 2024-12-27 18:44:37 +07:00
softsimon
81315af206
Merge pull request #5710 from mempool/simon/remove-lightweight-charts
remove unused lightweight-charts
2024-12-27 17:13:51 +07:00
softsimon
6fa747b303
remove unused lightweight-charts 2024-12-27 15:58:53 +07:00
nymkappa
ff235760b2
[fido] logout localstorage update 2024-12-27 15:37:36 +08:00
nymkappa
37ddc29c2c
[accelerator] print sca status for google payment 2024-12-25 16:38:53 +08:00
nymkappa
c66f028f12
Merge pull request #5702 from mempool/nymkappa/fix-response-header
fix duplicated response header
2024-12-23 15:38:11 +08:00
natsoni
a5c67b5ca1
Add websocket commands doc 2024-12-22 20:24:20 +01:00
Mononaut
f49152d09d
[accelerator] keep checkout locked until request completes 2024-12-22 15:34:32 +00:00
Mononaut
464fabf137
[accelerator] reference counting for checkout lock 2024-12-22 15:34:03 +00:00
nymkappa
c9b9485313
[faucet] add new error message when no utxo available 2024-12-22 22:40:35 +08:00
nymkappa
ed28a24c8a
fix duplicated response header 2024-12-22 22:33:54 +08:00
Mononaut
ba1ee15286
[accelerator] improve SCA UX 2024-12-22 12:27:29 +00:00
softsimon
ddcf745722
Merge pull request #5703 from mempool/mononaut/revert-difficulty-timeavg
revert difficulty widget to true avg block time
2024-12-22 18:19:09 +07:00
Mononaut
774c0b4f83
revert difficulty widget to true avg block time 2024-12-22 10:12:00 +00:00
softsimon
734d5f2461
Merge pull request #5579 from mempool/natsoni/use-adjusted-time-avg
Use adjusted block time for difficulty and ETA calculation
2024-12-22 15:59:52 +07:00
softsimon
24a76cafa4
Merge branch 'master' into natsoni/use-adjusted-time-avg 2024-12-21 22:10:04 +07:00
softsimon
348a12c4a1
Merge pull request #5600 from mempool/natsoni/tx-input-overflow
Fix input/output overflow in transaction list
2024-12-21 22:09:30 +07:00
softsimon
67750bd166
Merge branch 'master' into natsoni/tx-input-overflow 2024-12-21 17:41:27 +07:00
softsimon
e5ea7afbe2
Merge pull request #5637 from mempool/natsoni/timezone-selection
Add timezone selector
2024-12-21 16:27:32 +07:00
softsimon
4b56144e6e
Merge pull request #5701 from mempool/natsoni/fix-inscription-badge
Fix inscription badge disappearing when loading more inputs
2024-12-21 16:07:22 +07:00
wiz
332099cc01
Merge pull request #5700 from mempool/mononaut/standardize-api-errors
standardize API error strings & validation
2024-12-20 12:58:15 +09:00
natsoni
0a933d022c
Fix inscription disappearing when loading more inputs 2024-12-19 15:01:58 +01:00
Mononaut
47044db043
standardize API error strings & validation 2024-12-19 13:00:44 +00:00
wiz
01df22ef86
Merge pull request #5682 from mempool/nymkappa/googlepaysca
[accelerator] add sca for googlepay payments
2024-12-18 11:26:20 +09:00
wiz
8670897a50
ops: Remove fmt, add hnl + sg1 2024-12-14 21:01:37 +09:00
wiz
6d4f03e5f2
Merge pull request #5683 from mempool/mononaut/fix-liquid-monitoring
fix liquid monitoring url routes
2024-12-14 15:16:13 +09:00
wiz
2d2f3ad4c4
Merge pull request #5687 from mempool/natsoni/fix-package-broadcast-css
Fix package broadcast table css
2024-12-14 15:16:01 +09:00
wiz
70036e4a7e
Merge pull request #5689 from mempool/mononaut/fix-monitoring-hash-urls
fix monitoring git hash urls
2024-12-14 15:15:50 +09:00
wiz
4daa997e58
Merge pull request #5690 from mempool/mononaut/fix-unfurler-meta-title
fix unfurler meta titles
2024-12-14 15:15:39 +09:00
wiz
15dd4cd633
Merge pull request #5680 from mempool/natsoni/unify-db-schema
Unify database schema for all backend types
2024-12-14 12:18:12 +09:00
Mononaut
8b73bdfba9
fix unfurler meta titles 2024-12-13 22:09:14 +00:00
Mononaut
4fe246ecf1
fix monitoring git hash urls 2024-12-13 16:16:18 +00:00
wiz
90bb5304ef
ops: Only build backends that actually exist 2024-12-13 09:53:51 +09:00
wiz
ded47eb309
Merge pull request #5684 from mempool/mononaut/monitoring-hash
add git hashes to monitoring page
2024-12-13 09:52:54 +09:00
wiz
aef361b01a
Merge pull request #5676 from mempool/mononaut/balance-chart-ticks
Fix fiat tick precision on address balance chart
2024-12-13 09:50:09 +09:00
natsoni
392f6a01c4
Fix package broadcast table css 2024-12-12 19:22:03 +01:00
Mononaut
6112c7f8ee
Add git hashes to monitoring 2024-12-12 00:52:28 +00:00
Mononaut
58b4c07924
fix liquid monitoring url routes 2024-12-10 22:19:57 +00:00
nymkappa
ad360db71f
[accelerator] add sca for googlepay payments 2024-12-10 15:16:19 +01:00
wiz
e58579ed8a
Merge pull request #5681 from mempool/mononaut/wallet-preview
wallet unfurler preview
2024-12-10 13:18:41 +09:00
wiz
f57eb047f6
Merge pull request #5679 from mempool/nymkappa/cherry-pick-lol
update unfurler and build config
2024-12-10 13:18:03 +09:00
Mononaut
dcae94ba66
add wallet unfurler preview 2024-12-10 00:28:41 +00:00
Mononaut
1d2a5e9c94
refactor address graph rendering controls 2024-12-10 00:27:00 +00:00
Mononaut
522b4d914f
add missing unfurler config file 2024-12-09 17:20:34 +00:00
natsoni
2372d8cff3
Unify database schema for all backend types 2024-12-09 12:08:29 +01:00
Mononaut
59cefc2b4b
update unfurler and build config 2024-12-09 09:05:18 +01:00
wiz
9714789062
Add metaplanet routes to unfurler 2024-12-09 15:53:38 +09:00
wiz
13405b4494
ops: Start metaplanet unfurler process 2024-12-09 15:30:37 +09:00
wiz
6d51ce1f38
ops: Fix metaplanet unfurler config 2024-12-09 15:22:37 +09:00
wiz
bce9ea3661
Merge pull request #5677 from mempool/mononaut/enterprise-logo-center
center enterprise footer logo
2024-12-09 13:54:31 +09:00
Mononaut
05a21f3867
center enterprise footer logo 2024-12-09 03:30:06 +00:00
wiz
d50cfe135f
Merge pull request #5674 from mempool/mononaut/balance-widget-usd
show USD series by default in address balance widget
2024-12-09 12:11:22 +09:00
wiz
8ae8430711
Merge pull request #5659 from mempool/nymkappa/internal-price-rest-api
[internal] provide internal rest api to retreive btcusd price history
2024-12-09 10:32:11 +09:00
wiz
12daea0f62
ops: Add metaplanet related configs 2024-12-09 10:22:46 +09:00
wiz
0d31143fed
Merge pull request #5671 from mempool/natsoni/cancelled-accel-on-timeline
Canceled acceleration on timeline
2024-12-08 13:12:27 +09:00
Mononaut
526625fc56
Fix fiat tick precision on address balance chart 2024-12-07 20:38:02 +00:00
Mononaut
7f3cdbfdb6
show USD series by default in address balance widget 2024-12-07 16:01:26 +00:00
nymkappa
5be4346dc1
Merge branch 'master' into nymkappa/internal-price-rest-api 2024-12-06 10:17:52 +01:00
wiz
a2bc6f5bba
Trim string for Hawaii Standard Time 2024-12-06 17:20:16 +09:00
wiz
a0596cd366
Merge pull request #5654 from mempool/natsoni/address-graph-fix
Fix address balance graph
2024-12-06 17:17:08 +09:00
wiz
0f14aa7ad3
Merge pull request #5635 from mempool/natsoni/refactor-clipboard
Refactor clipboard component
2024-12-06 17:16:26 +09:00
wiz
44a0f92cc1
Merge pull request #5627 from mempool/mononaut/custom-dash-assets
update custom dashboard assets
2024-12-06 17:15:47 +09:00
wiz
97a9ea47fc
Merge pull request #5641 from mempool/mononaut/fix-mempool-network-change
fix stuck mempool block on network change
2024-12-06 17:14:35 +09:00
wiz
d573147ad4
Remove unnecessary par=16 from bitcoin.conf 2024-12-06 15:14:26 +09:00
wiz
679745fb6c
Merge pull request #5668 from mempool/natsoni/fix-accel-cancellation
Fix tx frontend issues after acceleration cancellation
2024-12-06 14:30:04 +09:00
wiz
c089920e4b
Merge pull request #5666 from mempool/mononaut/fix-undefined-mempooltxs
fix undefined mempool tx errors
2024-12-06 14:29:47 +09:00
softsimon
62c96272d8
Merge pull request #5669 from mempool/natsoni/fix-liquid
Fix liquid database index
2024-12-05 21:55:35 +07:00
natsoni
d87b668353
Show timeline on canceled accelerations 2024-12-05 12:36:17 +01:00
natsoni
ebd4170da1
Fix liquid database index 2024-12-04 16:14:51 +01:00
natsoni
0310452dfb
Fix tx frontend issues after acceleration cancellation 2024-12-04 15:45:18 +01:00
wiz
969687ef39
Merge pull request #5662 from mempool/nymkappa/remove-useless-unique-uuid-accel
[accelerator] remove useless accelerationUUID
2024-12-04 17:15:09 +09:00
wiz
0831256cce
Merge pull request #5663 from mempool/nymkappa/acceleration-cancel
[doc] add accelerator cancel doc
2024-12-04 16:41:54 +09:00
wiz
af40cac284
Merge pull request #5643 from mempool/mononaut/liquid-db-indexes
liquid db indexes
2024-12-04 16:37:40 +09:00
Mononaut
e4868b70c1
more processBlockTemplates null checks 2024-12-02 22:51:24 +00:00
Mononaut
5f45ce80f1
filter accelerations before calculating pool positions 2024-12-02 22:51:23 +00:00
nymkappa
4ff2aad94a
[blocks] return list of block hash filtered by definition hash 2024-11-29 17:55:06 +01:00
nymkappa
ac997f3d9e
[blocks] add 2 endpoints to retreive pools-v2.json hashes 2024-11-29 17:13:28 +01:00
nymkappa
c8e967cc0c
[blocks] save pools-v2.json hash in blocks table 2024-11-29 16:04:54 +01:00
softsimon
14e49126c3
Merge pull request #5642 from mempool/mononaut/db-indexes
Add missing db indexes
2024-11-28 15:03:43 +07:00
nymkappa
a4d73130b7
[doc] add accelerator cancel doc 2024-11-26 17:30:11 +01:00
nymkappa
cd702955fc
[accelerator] remove useless accelerationUUID 2024-11-26 17:14:47 +01:00
wiz
4c66bf61f0
Merge pull request #5649 from mempool/mononaut/fix-acc-ws-timeout
fix acceleration websocket timeout loop
2024-11-22 07:21:10 -10:00
Mononaut
ffa582558b
more verbose accelerator websocket error logs 2024-11-21 21:54:19 +00:00
nymkappa
423b41939e
[internal] provide internal rest api to retreive btcusd price history 2024-11-21 15:20:24 +01:00
Mononaut
9a81db8e6c
fix acceleration websocket ping error 2024-11-19 23:00:28 +00:00
natsoni
cb3326d691
Wrap large amounts in power of ten in address graph 2024-11-19 19:32:28 +01:00
natsoni
535e5313ef
Polish address balance graph tooltip 2024-11-19 18:11:02 +01:00
natsoni
8bd6d40ed2
Don't use SI units in address balance graph axis 2024-11-19 18:00:00 +01:00
natsoni
7516db0c71
Fix USD y axis overflow in address graph 2024-11-19 17:45:09 +01:00
Mononaut
abe9aa1fdc
fix acceleration websocket timeout loop 2024-11-18 20:40:08 +00:00
Mononaut
60b3f9ace6
update custom dashboard assets 2024-11-17 16:05:48 +00:00
wiz
073fe8e8cd
Merge pull request #5645 from mempool/nymkappa/accelerator-back-button-payment 2024-11-16 19:28:10 +09:00
nymkappa
bfe7b996a4
[accelerator] fix "Go back" button breaking payment flow 2024-11-16 11:23:09 +01:00
Mononaut
bfd771056d
split new liquid db indexes into separate migrations 2024-11-16 00:01:13 +00:00
Mononaut
e05f5ee751
Add missing liquid db indexes 2024-11-16 00:00:18 +00:00
Mononaut
d9f3611da3
split new db indexes into separate migrations 2024-11-15 23:54:26 +00:00
Mononaut
7c7419ab1c
Add missing db indexes 2024-11-15 22:30:46 +00:00
Mononaut
96afbca029
fix stuck mempool block on network change 2024-11-15 01:34:06 +00:00
softsimon
8c80358e71
Merge pull request #5634 from mempool/simon/fix-broken-cpfp-button
fix broken cpfp button
2024-11-15 08:29:02 +07:00
natsoni
9e5b7436d4
Add timezone selector 2024-11-14 17:10:30 +01:00
wiz
a5fbc94182
Merge pull request #5638 from mempool/mononaut/fix-acc-list-sub 2024-11-15 00:51:18 +09:00
nymkappa
72ddb8c6a4
[accelerator] display payment errors, auto reload after 10 secs instead of 3 secs 2024-11-14 16:46:18 +01:00
Mononaut
fd7f340854
Fix acceleration list observable subscription logic 2024-11-14 02:40:41 +00:00
wiz
7f784944af
ops: Fix install script nginx config parse error 2024-11-14 07:37:01 +09:00
natsoni
5a3ee725b8
Use timestamp component 2024-11-13 14:43:04 +01:00
natsoni
cab01f7f26
Refactor clipboard to use native clipboard API 2024-11-12 17:09:58 +01:00
softsimon
3b4eda432f
fix cpfp list title position 2024-11-12 03:22:16 +07:00
softsimon
8b699da721
fix broken cpfp button 2024-11-12 03:18:22 +07:00
wiz
5b2f613856
Merge pull request #5633 from mempool/mononaut/fix-acc-ping-pong
Fix acceleration websocket ping/pong
2024-11-12 02:25:15 +09:00
Mononaut
f1e2c893cc
Fix acceleration websocket ping/pong 2024-11-11 17:23:30 +00:00
wiz
7d3d59c348
Merge pull request #5632 from mempool/mononaut/acc-ws-ping
regularly ping acceleration websocket server
2024-11-12 02:08:48 +09:00
wiz
8719b424e5
Increase websocket from 5s to 10s 2024-11-12 02:03:56 +09:00
Mononaut
ef498b55ed
reset acceleration websocket if unresponsive 2024-11-11 16:59:08 +00:00
Mononaut
9718610104
regularly ping acceleration websocket server 2024-11-11 16:26:30 +00:00
wiz
937e82bb89
Merge pull request #5631 from mempool/mononaut/acc-ws-debug
Better debug logs for accelerator websocket
2024-11-12 00:32:54 +09:00
Mononaut
91bf35bb65
Better debug logs for accelerator websocket 2024-11-11 14:40:25 +00:00
wiz
f0f6ee1919
Merge pull request #5630 from mempool/mononaut/fix-acc-websocket
fix acceleration websocket protocol
2024-11-11 20:53:27 +09:00
Mononaut
7b837b96da
fix acceleration websocket protocol 2024-11-11 11:46:17 +00:00
softsimon
c417470be2
Merge pull request #5621 from mempool/natsoni/tx-first-seen-fix
Show tx first seen time with audit disabled
2024-11-09 00:28:47 +07:00
softsimon
dfd7877f82
Merge pull request #5584 from mempool/simon/cpfp-polish
Polish CPFP button
2024-11-09 00:25:05 +07:00
softsimon
136e80e5cf
Merge pull request #5625 from mempool/natsoni/fix-url-nav
Fix navigation to use relative paths
2024-11-09 00:08:52 +07:00
natsoni
b3aed2f58b
Fix navigation to use relative paths 2024-11-02 10:41:37 +01:00
wiz
e75f913af3
ops: Cache testnet electrs endpoints for minimum of 1s 2024-11-01 21:20:54 +09:00
wiz
0a9703f164
ops: Cache all electrs endpoints for minimum of 1s 2024-11-01 21:15:07 +09:00
nymkappa
cdc4a430cd
[refactor] cleaning users.full_name 2024-10-31 09:52:34 +01:00
natsoni
db321c3fa5
Get tx first seen from block summary if not available in audit 2024-10-30 15:43:28 +01:00
natsoni
b6aeb5661f
Add block/:hash/tx/:txid/summary endpoint 2024-10-30 15:31:01 +01:00
natsoni
f08fa034cc
Add missing frontend audit flag for testnet4 2024-10-30 15:19:46 +01:00
wiz
c0ef01d4da
Merge pull request #5617 from vostrnad/fix-missing-fakescripthash
Add missing fake_scripthash to the data filter
2024-10-30 19:11:08 +09:00
wiz
c6711d8191
Merge pull request #5619 from mempool/nymkappa/fix-zindex-loading-indicator
[ui] fix loading indicator zindex
2024-10-30 19:10:51 +09:00
wiz
216bd5ad23
Merge pull request #5618 from mempool/nymkappa/fix-pool-blocks-page-length
[mining] return 100 blocks per page instead of 10 for pool block list
2024-10-30 19:10:37 +09:00
wiz
a7d59d6b2e
Merge pull request #5620 from mempool/nymkappa/pool-hashrate 2024-10-30 18:51:36 +09:00
nymkappa
a257bcc12a
[mining] show pools estimated hashrate on 3d and 1w timeframes 2024-10-30 10:46:44 +01:00
wiz
66c0ea7ca3
Merge pull request #5500 from mempool/mononaut/esplora-monitoring-reorg
Fix reorg to lower height on /monitoring status page
2024-10-30 18:28:35 +09:00
wiz
7692b2af66
Merge pull request #5511 from mempool/mononaut/summary-indexing-limit
respect INDEXING_BLOCKS_AMOUNT during summary indexing
2024-10-30 18:27:26 +09:00
wiz
397f53f42d
Merge branch 'master' into mononaut/esplora-monitoring-reorg 2024-10-30 18:18:16 +09:00
wiz
2ea76d9c38
Merge pull request #5394 from mempool/mononaut/use-acceleration-websocket
[accelerator] get acceleration updates over websocket
2024-10-30 18:17:26 +09:00
nymkappa
59ac27b104
[ui] fix loading indicator zindex 2024-10-30 09:59:41 +01:00
nymkappa
d27bb7e156
[mining] return 100 blocks per page instead of 10 for pool block list 2024-10-30 09:54:13 +01:00
Vojtěch Strnad
4eadfc0a3b Add missing fake_scripthash to the data filter 2024-10-29 07:25:36 +01:00
wiz
76cfa3ca47
Merge pull request #5615 from mempool/mononaut/adjust-app-imports 2024-10-27 13:55:58 +09:00
Mononaut
3a4a4d9ffd
don't allow overriding critical @app imports 2024-10-27 02:39:55 +00:00
wiz
8b01a83948
Increase time of demo mode from 3s to 15s 2024-10-25 16:49:24 +09:00
nymkappa
cbce49a8bf
Merge branch 'master' into nymkappa/fix-bitcoin-payment 2024-10-25 15:45:16 +09:00
wiz
2ceb9001a1
Merge pull request #5613 from mempool/mononaut/fix-purple-pie-chart
fix purple pie chart with single pool
2024-10-25 15:13:06 +09:00
wiz
d44b7926d2
Merge pull request #5611 from mempool/nymkappa/demo-mode-but-it-does-not-crash-the-tv-anymore-well-maybe-we-ll-see-about-this
[demo] better? demo mode
2024-10-25 14:48:59 +09:00
wiz
57299e086e
Remove /graphs from demo routes 2024-10-25 14:45:45 +09:00
Mononaut
c1d17dac43
fix purple pie chart with single pool 2024-10-25 05:39:52 +00:00
wiz
cb49f9d929
Merge pull request #5612 from mempool/nymkappa/internal-core-rpc-proxy
[core routes] /api/internal -> /api/v1/internal
2024-10-25 14:09:03 +09:00
nymkappa
185be3d598
[core routes] use config.MEMPOOL.API_URL_PREFIX 2024-10-25 14:02:09 +09:00
softsimon
aa9888a2fe
Related Transactions 2024-10-25 11:58:01 +07:00
nymkappa
c950e3d0ae
[core routes] /api/internal -> /api/v1/internal 2024-10-25 13:54:40 +09:00
softsimon
3909148d6e
Polish CPFP button 2024-10-25 11:52:01 +07:00
nymkappa
99cc47cf00
[demo] better? demo mode 2024-10-24 16:52:47 +09:00
wiz
908b8b4352
Merge pull request #5606 from mempool/nymkappa/configurable-prod-domains
make prod domains configurable
2024-10-23 22:58:56 +09:00
nymkappa
1a7f475220
make prod domains configurable 2024-10-23 22:51:04 +09:00
wiz
cb63d17a2f
ops: Don't always set frameoptions in nginx 2024-10-23 22:12:40 +09:00
wiz
c8ce4631e2
Merge pull request #5605 from mempool/mononaut/tx-extras-module
Refactor transaction page component
2024-10-23 22:00:39 +09:00
Mononaut
96c2b0a2f7
fix cpfp button 2024-10-23 12:28:40 +00:00
Mononaut
23475c7a1b
Refactor transaction page component 2024-10-23 08:56:27 +00:00
wiz
9ab3d3195e
Merge pull request #5604 from mempool/wiz/use-typescript-buildtime-path-aliases
Use typescript path aliases for build time import path resolution
2024-10-23 12:01:36 +09:00
wiz
a22d07ae60
Rename some more relative paths to use @app path alias 2024-10-23 11:46:33 +09:00
wiz
221658f6bf
Change @app/interfaces to new @interfaces path alias 2024-10-23 11:09:38 +09:00
wiz
133df2e4be
Use typescript path aliases for build time import path resolution 2024-10-22 23:30:19 +09:00
wiz
5fba9595af
Merge pull request #5601 from mempool/nymkappa/demo-mode
implement very simple demo mode
2024-10-22 15:16:45 +09:00
wiz
90ca77a46a
Tweak demo mode to use all dashboards 2024-10-22 15:08:57 +09:00
nymkappa
f0c76c1349
implement very simple demo mode 2024-10-19 16:07:09 +09:00
nymkappa
f2e7cf7441
[btcpay] better handling for invoice expiration 2024-10-18 21:49:35 +09:00
wiz
6e5cfa9bf2
Merge pull request #4831 from mempool/mononaut/wallet
Add multi-address wallet page
2024-10-18 13:05:17 +09:00
wiz
9ffcf2eca5
ops: Enable wallets in prod mempool backend config 2024-10-18 12:32:42 +09:00
wiz
8514fb9bdc
Merge branch 'master' into mononaut/wallet 2024-10-18 12:08:05 +09:00
wiz
c1be7460c0
Merge pull request #5375 from mempool/mononaut/wallet-dashboard-widgets
custom wallet dashboard widgets
2024-10-18 12:06:02 +09:00
Mononaut
602aa4f948
fix wallet merge conflicts 2024-10-18 03:02:30 +00:00
Mononaut
2d2c55ce0e
Add link to wallet page from custom dashboard widget 2024-10-18 02:41:44 +00:00
Mononaut
f0e207dff2
fix wallet balance graph bug 2024-10-18 02:41:44 +00:00
Mononaut
756e4356a5
named wallet sync track txo stats 2024-10-18 02:41:44 +00:00
Mononaut
9c303e8c23
address wallet page by name 2024-10-18 02:41:43 +00:00
Mononaut
a7ba4a0be8
Add multi-address wallet page 2024-10-18 02:41:18 +00:00
Mononaut
54c2d7efe5
move custom wallet sync to services backend 2024-10-18 02:35:19 +00:00
Mononaut
3f8eb3a2cd
check in new resources 2024-10-18 02:35:19 +00:00
Mononaut
e095192968
custom dashboard wallet widgets 2024-10-18 02:35:17 +00:00
Mononaut
862c9591a1
wallet tracking backend support 2024-10-18 02:34:25 +00:00
natsoni
7a8ae7c9a6
Fix input/output overflow in transaction list 2024-10-17 16:33:36 +02:00
wiz
ca7221f8b7
Merge pull request #5594 from mempool/nymkappa/revalidate-accel
[accelerator] revalidate user choice after choosing fee option
2024-10-17 15:09:31 +09:00
wiz
8a579cc374
Merge pull request #5595 from mempool/nymkappa/hashrate-1w
[mining] use getNetworkHashPs(1008)
2024-10-17 15:08:47 +09:00
softsimon
b454959acd
Merge pull request #5598 from mempool/dependabot/npm_and_yarn/frontend/tslib-2.8.0
Bump tslib from 2.7.0 to 2.8.0 in /frontend
2024-10-16 14:19:27 +09:00
dependabot[bot]
4498e14be8
Bump tslib from 2.7.0 to 2.8.0 in /frontend
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: tslib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-16 02:51:18 +00:00
wiz
f27a9a3c50
Merge pull request #5597 from mempool/junderw/llvm17
Use llvm17 because C sucks
2024-10-15 21:19:24 +09:00
junderw
1f0b597e2f
Use llvm17 because C sucks 2024-10-15 19:43:56 +09:00
wiz
a3884b95b8
Merge pull request #5593 from mempool/simon/whale-size-increase
Whale size increase
2024-10-14 19:58:02 +09:00
softsimon
f67687b573
Merge pull request #5596 from mempool/simon/taproot-wizards
Add taproot wizards as enterprise sponsor
2024-10-14 19:54:26 +09:00
softsimon
7f4dc7eb3e
Add taproot wizards as enterprise sponsor 2024-10-14 19:42:32 +09:00
nymkappa
1c4be164dd
[mining] use getNetworkHashPs(1008) 2024-10-14 17:03:52 +09:00
nymkappa
450d83461c
[accelerator] revalidate user choice after choosing fee option 2024-10-14 14:49:53 +09:00
softsimon
5f222f59a7
Whale size increase 2024-10-14 14:47:12 +09:00
softsimon
8dac5cff9a
Merge pull request #5591 from mempool/dependabot/npm_and_yarn/frontend/multi-d3b9e25284
Bump send and browser-sync in /frontend
2024-10-14 11:33:35 +09:00
softsimon
83c7b3034b
Merge pull request #5589 from mempool/dependabot/npm_and_yarn/backend/multi-9f37c16f8f
Bump cookie and express in /backend
2024-10-14 11:32:45 +09:00
dependabot[bot]
ce1babf67b
Bump send and browser-sync in /frontend
Bumps [send](https://github.com/pillarjs/send) to 0.19.0 and updates ancestor dependency [browser-sync](https://github.com/BrowserSync/browser-sync). These dependencies need to be updated together.


Updates `send` from 0.16.2 to 0.19.0
- [Release notes](https://github.com/pillarjs/send/releases)
- [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md)
- [Commits](https://github.com/pillarjs/send/compare/0.16.2...0.19.0)

Updates `browser-sync` from 3.0.2 to 3.0.3
- [Release notes](https://github.com/BrowserSync/browser-sync/releases)
- [Changelog](https://github.com/BrowserSync/browser-sync/blob/master/changelog.js)
- [Commits](https://github.com/BrowserSync/browser-sync/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: send
  dependency-type: indirect
- dependency-name: browser-sync
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 02:28:52 +00:00
softsimon
7ea921a5cb
Merge pull request #5590 from mempool/dependabot/npm_and_yarn/frontend/multi-2c5a3fe122
Bump cookie, socket.io and express in /frontend
2024-10-14 11:28:06 +09:00
softsimon
26e3a2413d
Merge pull request #5567 from mempool/natsoni/block-first-seen-audit
Store first seen time in block audit
2024-10-14 10:10:21 +09:00
wiz
8ad6c93e92
Merge pull request #5587 from mempool/simon/bump-core-28
Bump Core to v28.0
2024-10-13 23:25:34 +09:00
natsoni
198d79f149
Merge branch 'master' into natsoni/block-first-seen-audit 2024-10-13 17:41:56 +09:00
dependabot[bot]
8a72a5871d
Bump cookie, socket.io and express in /frontend
Bumps [cookie](https://github.com/jshttp/cookie), [socket.io](https://github.com/socketio/socket.io) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `socket.io` from 4.7.1 to 4.8.0
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.7.1...socket.io@4.8.0)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-13 07:51:12 +00:00
dependabot[bot]
2c12f890bd
Bump cookie and express in /backend
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.1 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-13 07:50:05 +00:00
softsimon
f9300130fe
Bump Core to v28.0 2024-10-13 16:00:08 +09:00
softsimon
5b557b2c12
Merge pull request #5586 from mempool/natsoni/search-bar-seconds
Include optional seconds in search bar date
2024-10-13 15:28:49 +09:00
natsoni
071e9b6c2c
Include optional seconds in search bar date 2024-10-13 12:54:58 +09:00
wiz
f78971e640
Merge pull request #5547 from Emzy/ops/add-testnet4
Add testnet4 to install script
2024-10-13 11:54:05 +09:00
wiz
b86c8f7976
Merge pull request #5585 from mempool/natsoni/submit-package
Add package broadcaster to tx push page
2024-10-13 11:30:57 +09:00
wiz
2ce596a14b
Merge branch 'master' into natsoni/submit-package 2024-10-13 11:15:24 +09:00
natsoni
735ed87b78
Route submitpackage calls to core on esplora backends 2024-10-13 11:14:23 +09:00
natsoni
d1741a51c9
Add submit package option to tx push page 2024-10-12 17:38:48 +09:00
natsoni
9f0b3bd769
Add submitpackage endpoint 2024-10-12 17:38:37 +09:00
wiz
41088cca09
Merge pull request #5507 from mempool/nymkappa/faucet-unverified
[faucet] show unverified warning if no email provided
2024-10-12 17:10:53 +09:00
wiz
e92ffbd501
Merge branch 'master' into nymkappa/faucet-unverified 2024-10-12 17:09:07 +09:00
natsoni
93d9538845
Fix error formatting on core only backend 2024-10-12 15:56:38 +09:00
softsimon
ae46fcafb9
Merge pull request #5583 from mempool/natsoni/inscriptions-license
Add license to inscriptions.utils.ts
2024-10-10 20:56:02 +09:00
natsoni
69a994afd5
Add license to inscriptions.utils.ts 2024-10-10 20:53:19 +09:00
wiz
c6cc533baa
Merge pull request #5582 from mempool/simon/set-audit-start-heights-prod
Set audit start heights on prod
2024-10-10 20:46:10 +09:00
natsoni
dd0542bbe1
Store block first seen in db 2024-10-10 18:47:07 +09:00
softsimon
cdb4580c6d
Set audit start heights on prod 2024-10-10 18:01:35 +09:00
softsimon
fe4b39df80
Merge pull request #5483 from mempool/natsoni/handle-city-states
Handle city-states in geolocation component
2024-10-10 16:22:48 +09:00
wiz
1a7519dd00
Merge pull request #5576 from mempool/nymkappa/fix-simple-mode-amount-charged
[accelerator] fee delta matches what the user accepted to pay in frontend
2024-10-10 15:59:41 +09:00
softsimon
5116a27e8d
Merge pull request #5581 from mempool/natsoni/fix-timeline-again
Fix timespan on acceleration timeline
2024-10-10 10:23:41 +09:00
natsoni
73e8ba3e47
Fix timestamps on acceleration timeline 2024-10-09 20:52:23 +09:00
softsimon
6805b673fa
Merge pull request #5580 from mempool/natsoni/fix-frontend
Fix frontend build
2024-10-09 18:18:25 +09:00
natsoni
22236bdabe
Fix frontend build 2024-10-09 18:17:17 +09:00
softsimon
05f60cda56
Merge pull request #5578 from mempool/natsoni/fix-timeline
Fix wrong timespan on acceleration timeline
2024-10-09 17:52:51 +09:00
natsoni
c4004ba301
Clean up timeline code 2024-10-09 17:50:24 +09:00
natsoni
74b420c258
Use adjusted block time for difficulty and ETA calculation 2024-10-09 17:05:29 +09:00
natsoni
15b7e75b69
Fix wrong timespan in acc timeline 2024-10-09 16:33:19 +09:00
softsimon
70384d8d9f
Merge pull request #5577 from mempool/natsoni/fix-premine-amount
Fix rune premine amount
2024-10-08 21:17:13 +09:00
natsoni
2a27ee0c7c
Fix rune premine amount 2024-10-08 19:20:08 +09:00
nymkappa
933a204462
[accelerator] fee delta matches what the user accepted to pay in frontend 2024-10-08 18:37:03 +09:00
natsoni
6884830da6
Merge branch 'master' into natsoni/block-first-seen-audit 2024-10-08 15:04:46 +09:00
softsimon
24ec31acd9
Merge pull request #5569 from mempool/natsoni/ord
Add option to display runestones and inscriptions metadata
2024-10-08 13:21:43 +09:00
natsoni
1b2f1b38b4
undefined -> unknown 2024-10-08 13:09:19 +09:00
natsoni
3486c35f5e
50kb -> 100kb 2024-10-08 12:59:36 +09:00
natsoni
57a05c80a2
Move inscription type to utils 2024-10-08 12:53:18 +09:00
natsoni
1ddb8a39c9
Show text inscriptions up to 50kB 2024-10-08 12:50:56 +09:00
natsoni
0a61429176
Increase inscription max height 2024-10-08 12:41:14 +09:00
natsoni
e440c3f235
Fix edicts displaying 2024-10-08 12:40:25 +09:00
natsoni
177bbc83f3
Clean up etches fetching logic 2024-10-08 12:38:12 +09:00
Mononaut
040c067aac
fix rune edict wrong id type bug 2024-10-08 02:49:46 +00:00
Mononaut
15b3c88a1f
fix optional rune divisibility bug 2024-10-08 02:40:14 +00:00
natsoni
65f080d526
FIx error handling logic in ord-data 2024-10-08 11:24:17 +09:00
wiz
19347614bd
Merge pull request #5514 from mempool/nymkappa/refactor-pool-subscription
[refactor] remove useless mining_pool subscriptions
2024-10-08 11:13:08 +09:00
softsimon
3b9601a82e
Merge pull request #5575 from mempool/mononaut/minimal-runes
replace rune parsing libraries with minimal reimplementation
2024-10-08 11:10:54 +09:00
Mononaut
acae5a33b0
replace rune parsing dependencies with minimal reimplementation 2024-10-08 01:56:49 +00:00
natsoni
8b6db768cd
Decode inscription / rune data client-side 2024-10-07 20:26:02 +09:00
natsoni
4143a5f593
Add runestone protocol implementation 2024-10-07 20:03:10 +09:00
natsoni
d31c2665ee
Add inscriptions parsing code 2024-10-07 20:01:55 +09:00
softsimon
2142ae55d5
Merge pull request #5469 from mempool/nymkappa/configurable-pool-update
[mining] fix pools updater only running at start
2024-10-07 19:43:38 +09:00
softsimon
0c87a4e7f6
Merge branch 'master' into nymkappa/configurable-pool-update 2024-10-07 19:35:51 +09:00
softsimon
e6980a832b
Merge branch 'master' into mononaut/use-acceleration-websocket 2024-10-07 15:58:13 +09:00
softsimon
b08b2ce44a
Merge pull request #5574 from mempool/nymkappa/update-doc
update doc
2024-10-07 15:44:00 +09:00
nymkappa
d6b9e3118d
[refactor] remove useless mining_pool subscriptions 2024-10-07 15:41:29 +09:00
nymkappa
9b4c93c8ee
update doc 2024-10-07 15:35:52 +09:00
wiz
e59f5b8810
Merge pull request #5565 from mempool/nymkappa/update-doc
[accelerator] public accel history filter by miner unique id
2024-10-07 15:17:55 +09:00
softsimon
ddf1a300b6
Merge pull request #5573 from mempool/mononaut/fix-partial-utxo-chart
never show a utxo chart with missing data
2024-10-07 15:16:25 +09:00
Mononaut
8e223861d6
never show a utxo chart with missing data 2024-10-06 20:25:49 +00:00
softsimon
8808ff1a98
Merge pull request #5572 from mempool/dependabot/npm_and_yarn/frontend/rollup-4.24.0
Bump rollup from 4.13.0 to 4.24.0 in /frontend
2024-10-06 14:56:35 +09:00
dependabot[bot]
33a6ba04b6
Bump rollup from 4.13.0 to 4.24.0 in /frontend
Bumps [rollup](https://github.com/rollup/rollup) from 4.13.0 to 4.24.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.13.0...v4.24.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-06 05:46:06 +00:00
softsimon
d020858840
Merge pull request #5549 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.15.0
Bump cypress from 13.14.0 to 13.15.0 in /frontend
2024-10-06 14:44:50 +09:00
softsimon
5e0160a039
Merge pull request #5571 from mempool/natsoni/fix-block-page-loadig
Fix block page spinner loader
2024-10-06 13:40:22 +09:00
softsimon
2443bebae5
Merge pull request #5570 from mempool/natsoni/failed-canceled
Failed -> Canceled
2024-10-06 13:38:49 +09:00
natsoni
6fb68203bc
Fix block page spinner loader 2024-10-06 11:50:18 +09:00
natsoni
d7acfad3d6
Failed -> Canceled in accelerations list 2024-10-06 11:23:42 +09:00
softsimon
a700bd0ef1
Merge pull request #5568 from mempool/natsoni/gigasats
fix gigasats -> billion sats
2024-10-05 04:43:47 -06:00
natsoni
ae2a849257
fix gigasats -> billion sats 2024-10-05 19:34:41 +09:00
natsoni
1a75e3e317
Store block first seen time in block audits 2024-10-05 19:26:33 +09:00
softsimon
ba167c9cc2
Merge pull request #5566 from mempool/natsoni/fix-block-health-display
Avoid briefly showing incorrect health value
2024-10-05 02:38:11 -06:00
natsoni
3d27b7e7b4
Avoid briefly showing incorrect health value 2024-10-05 17:16:00 +09:00
nymkappa
c4f73b80da
[accelerator] public accel history filter by miner unique id 2024-10-05 16:19:19 +09:00
softsimon
76a1eb12a6
Merge pull request #5563 from mempool/natsoni/fix-block-health-display
Reset block audit on block navigation
2024-10-04 22:29:14 -06:00
natsoni
fe16f0dddc
Reset block audit on block navigation 2024-10-05 13:19:05 +09:00
natsoni
67295c1b9b
add debug.log path to backend config 2024-10-04 22:15:00 +09:00
wiz
0bd760d4d6
Merge pull request #5561 from mempool/nymkappa/fix-tests
fix tests
2024-10-03 16:11:07 +09:00
nymkappa
0f2340600c
fix tests 2024-10-03 15:48:27 +09:00
softsimon
72c9d02f88
Merge pull request #5558 from mempool/mononaut/handle-utxo-error
handle /utxos error on address page
2024-10-01 12:01:55 -07:00
wiz
43a42d356d
Enable RUST_GBT in backend by default 2024-10-02 04:00:33 +09:00
Mononaut
60adad8db3
handle /utxos error on address page 2024-09-29 09:30:09 +00:00
softsimon
5b73362e44
Merge pull request #5557 from mempool/mononaut/fix-effective-rate-bug
Don't clobber effective fee rates
2024-09-28 21:24:07 +04:00
Mononaut
517a37728c
Don't clobber effective fee rates 2024-09-28 16:34:13 +00:00
softsimon
8876bb8f43
Merge pull request #5556 from mempool/simon/remove-rocket-beta
remove rocket beta
2024-09-28 10:50:15 +04:00
softsimon
da2341dd00
remove rocket beta 2024-09-28 08:56:29 +04:00
softsimon
146935efaf
Merge pull request #5553 from mempool/mononaut/cors-expose-custom-header
expose custom x-total-count header
2024-09-28 01:39:37 +04:00
softsimon
775fcbab31
Merge pull request #5552 from mempool/nymkappa/satoshi-pipe-update
export bitcoinsatoshis pipe module, allow custom class for first part
2024-09-28 00:04:56 +04:00
softsimon
cb12e66a3b
Merge pull request #5554 from mempool/mononaut/fix-accel-paging
fix acceleration history paging w/ undefined total
2024-09-28 00:02:55 +04:00
Mononaut
ea08c0c950
fix acceleration history paging w/ undefined total 2024-09-27 16:09:12 +00:00
Mononaut
b26d26b14c
expose custom x-total-count header 2024-09-27 15:55:29 +00:00
nymkappa
2d7316942f
export bitcoinsatoshis pipe module, allow custom class for first part 2024-09-27 17:26:27 +02:00
wiz
676abf58fd
Merge pull request #5551 from mempool/mononaut/utxo-chart-navigation
fix utxo chart on-click navigation
2024-09-27 07:50:15 +09:00
Mononaut
1d5843a112
fix utxo chart on-click navigation 2024-09-26 22:14:44 +00:00
softsimon
9bfe1fb15e
Merge pull request #5550 from mempool/mononaut/truncate-miner-name
refactor miner name truncation
2024-09-26 23:59:12 +04:00
Mononaut
b29c4cf228
refactor miner name truncation 2024-09-26 17:18:49 +00:00
softsimon
1f84e1722f
Merge pull request #5539 from BitcoinMechanic/add-miner-name
Show miner name on block timeline
2024-09-26 21:11:18 +04:00
dependabot[bot]
2ad52e2c78
Bump cypress from 13.14.0 to 13.15.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.14.0 to 13.15.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.14.0...v13.15.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-26 02:37:00 +00:00
softsimon
758122db5e
Merge pull request #5548 from mempool/mononaut/utxo-chart-optimization
utxo chart optimization
2024-09-25 11:50:36 +08:00
Mononaut
83b6094174
optimize utxo graph layout algorithm, enable transitions 2024-09-25 00:03:15 +00:00
Stephan Oeste
7057b31c3c
Add testnet4 to install script 2024-09-24 20:04:33 +02:00
Mononaut
9091fc9210
add missing time.service.ts file 2024-09-24 15:55:23 +00:00
mononaut
d149c8bd24
Merge branch 'master' into mononaut/utxo-chart-colors 2024-09-24 09:39:06 -06:00
Mononaut
9984621e5e
refactor static time formatting into new service 2024-09-24 15:37:55 +00:00
softsimon
54a27ef89f
Merge pull request #5545 from mempool/natsoni/fix-negative-time
Don't show negative timespans on timeline
2024-09-24 17:07:43 +08:00
mononaut
81ddce27df
Merge branch 'master' into add-miner-name 2024-09-23 16:07:20 -06:00
BitcoinMechanic
e6dbde952e
Strip non-alphanumeric chars from miner names 2024-09-23 12:36:10 -07:00
Mononaut
be49f70b09
[accelerator] get acceleration updates over websocket 2024-09-23 17:17:28 +00:00
natsoni
2a9346f695
Don't show negative timespans on timeline 2024-09-23 14:47:57 +02:00
softsimon
05e88a25be
npm audit fix 2024-09-23 14:15:00 +08:00
softsimon
574a800520
Merge pull request #5542 from mempool/dependabot/npm_and_yarn/frontend/esbuild-0.24.0
Bump esbuild from 0.23.0 to 0.24.0 in /frontend
2024-09-23 13:44:14 +08:00
softsimon
92de208414
Merge branch 'master' into mononaut/utxo-chart-colors 2024-09-23 13:01:32 +08:00
softsimon
1b4bbc24ba
Merge pull request #5541 from mempool/mononaut/update-pool-pie
Update accelerating pie chart in real time
2024-09-23 12:57:07 +08:00
dependabot[bot]
0e5698955f
Bump esbuild from 0.23.0 to 0.24.0 in /frontend
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 02:09:59 +00:00
BitcoinMechanic
4220f99477
remove 'on'/UI changes per feedback 2024-09-22 14:46:53 -07:00
Mononaut
e144e139b7
Update accelerating pie chart in real time 2024-09-22 18:06:55 +00:00
Mononaut
06e699e52b
address utxo chart color by age & updates 2024-09-22 17:09:35 +00:00
softsimon
07a0850f99
Merge pull request #5437 from mempool/simon/use-sats
only use sats, not sat
2024-09-23 00:33:19 +08:00
softsimon
72a5f4a521
amount selector sat -> sats 2024-09-23 00:18:59 +08:00
softsimon
04605e10a5
only use sats, not sat 2024-09-23 00:15:12 +08:00
softsimon
407ce3c76d
Merge pull request #5491 from mempool/nymkappa/accel-bidboost-graph
[accelerator] make bid boost graph bar min height taller
2024-09-22 23:48:41 +08:00
softsimon
a99278320b
Merge pull request #5451 from mempool/mononaut/optimize-gbt-process-blocks
optimize processNewBlocks
2024-09-22 23:46:29 +08:00
softsimon
367ee68fe0
Merge branch 'master' into mononaut/optimize-gbt-process-blocks 2024-09-22 12:41:51 +08:00
softsimon
1038b4f908
Merge pull request #5538 from mempool/natsoni/fix-wrong-block-skeleton
Fix race condition between accelerations and block audit api calls
2024-09-22 12:39:19 +08:00
BitcoinMechanic
b90cd4c7e3
restore minerNames property on pool 2024-09-20 14:59:21 -07:00
BitcoinMechanic
25482b9a06
show miner name on block timeline 2024-09-20 14:31:31 -07:00
natsoni
e41829d5e0
Fix race condition between accelerations and block audit api calls 2024-09-20 16:24:33 +02:00
softsimon
156bf12034
Merge pull request #5521 from mempool/dependabot/npm_and_yarn/backend/multi-d66d039ac5
Bump serve-static and express in /backend
2024-09-20 16:12:48 +08:00
softsimon
fc1cdbac22
Merge pull request #5522 from mempool/dependabot/npm_and_yarn/frontend/multi-9423f4c335
Bump body-parser and express in /frontend
2024-09-20 16:05:32 +08:00
softsimon
5c839aced3
Merge pull request #5486 from mempool/natsoni/remove-da-offset
Remove difficulty adjustment block offset
2024-09-20 15:37:14 +08:00
softsimon
3345a60863
Merge pull request #5532 from mempool/natsoni/fix-accelerations-list
Fix accelerations list page navigation on first load
2024-09-20 01:11:40 +08:00
mononaut
36844f5b70
Merge pull request #5533 from mempool/natsoni/add-blocks-logo
Add logos to blocks and test transactions pages
2024-09-19 10:44:53 -06:00
mononaut
46d99db167
Merge branch 'master' into natsoni/add-blocks-logo 2024-09-19 10:44:38 -06:00
softsimon
76dcb0830a
Merge pull request #5529 from mempool/natsoni/footer-tm
"Be your own explorer" on non official mempool instance
2024-09-19 23:13:41 +08:00
natsoni
0b29b61e93
"Be your own explorer" on non official mempool instance 2024-09-19 17:07:31 +02:00
softsimon
f4425ed7fe
Merge pull request #5524 from mempool/simon/calculator-numeric-fix
Fix critical calculator inputmode
2024-09-19 22:53:24 +08:00
softsimon
7c02eab630
Merge pull request #5525 from mempool/mononaut/utxo-chart
Add utxo chart to address page
2024-09-19 22:51:49 +08:00
softsimon
8867ef9680
Merge pull request #5534 from mempool/natsoni/mining-1m
Only fetch 1m mining stats
2024-09-19 22:50:29 +08:00
softsimon
1048a0ea83
Merge pull request #5536 from mempool/natsoni/fix-timeline-tooltip-width
Wrap pool logos in timeline tooltip
2024-09-19 22:46:40 +08:00
softsimon
7b216f7ec7
Merge pull request #5535 from mempool/natsoni/fix-eta-error
Fix ETA calculation error
2024-09-19 22:41:25 +08:00
natsoni
32cc2f0c63
Blocks logo wraps before 'Test Transactions' text 2024-09-19 16:33:31 +02:00
natsoni
c6b0e5ff0e
Acceleration timeline tooltip: wrap pool logos 2024-09-19 16:08:39 +02:00
natsoni
68a580466f
Fix ETA calculation error 2024-09-19 15:17:24 +02:00
natsoni
bb06a66a03
Only fetch 1m mining stats 2024-09-19 14:59:34 +02:00
natsoni
ec6372464f
Add logos to blocks and test transactions pages 2024-09-19 14:38:37 +02:00
softsimon
c13b8029d3
Merge pull request #5527 from mempool/natsoni/hide-eta-replaced-tx
Pizza tracker: don't show ETA on replaced tx
2024-09-19 19:10:35 +08:00
softsimon
88e92b1b34
Merge pull request #5513 from mempool/nymkappa/fix-double-click
[accelerator] avoid duplicated accel request with double click
2024-09-19 17:46:15 +08:00
softsimon
b0fa3efbbb
Merge pull request #5526 from mempool/natsoni/fix-mobile-tx-push
Fix mobile routing to tx push and test pages
2024-09-19 17:44:33 +08:00
softsimon
0ccb5618f6
Merge pull request #5530 from mempool/mononaut/fix-acc-eta
Fix off-by-one error in multi-pool eta calculation
2024-09-19 01:28:43 +08:00
natsoni
556313a676
Fix accelerations list page navigation on fist load 2024-09-18 16:56:00 +02:00
softsimon
1fe08a9ecc
Merge pull request #5528 from mempool/natsoni/tracker-support-error
Show http error in pizza tracker
2024-09-18 22:33:48 +08:00
softsimon
a11116ff3a
Merge pull request #5531 from mempool/natsoni/accelerator-logo-width
Fix accelerator logo in trademark policy on mobile
2024-09-18 22:33:18 +08:00
natsoni
ede0ccfd2e
Fix accelerator logo width in trademark policy 2024-09-18 15:38:36 +02:00
Mononaut
b64caf8f4b
Fix off-by-one error in multi-pool eta calculation 2024-09-17 20:30:25 +00:00
natsoni
99290a7946
Show http error in pizza tracker 2024-09-17 15:08:03 +02:00
natsoni
2d9709a427
Pizza tracker: hide ETA on replaced tx 2024-09-17 14:56:25 +02:00
natsoni
a76d6c2949
Fix mobile routing to tx push and test pages 2024-09-17 14:50:44 +02:00
softsimon
d8cfc6e32d
Merge pull request #5471 from mempool/natsoni/hide-acc-checkout-on-accelerations
Avoid brief display of accelerator checkout on already accelerated txs
2024-09-15 16:07:58 +08:00
softsimon
9457032ab1
Merge branch 'master' into natsoni/hide-acc-checkout-on-accelerations 2024-09-14 23:12:43 +08:00
softsimon
74998e7f56
Merge pull request #5482 from mempool/natsoni/hide-acc-panel-on-acceleration
Hide accelerator panel if tx gets accelerated on another session
2024-09-14 20:15:39 +08:00
softsimon
db0f968749
Merge pull request #5481 from mempool/natsoni/fix-acceleration-flow-state
Reset acceleration flow state when leaving transaction
2024-09-14 17:52:50 +08:00
Mononaut
a1968e01e5
Add utxo chart to address page 2024-09-13 18:16:29 +00:00
softsimon
c7ab6b03fb
Fix critical calculator inputmode 2024-09-13 23:23:22 +08:00
softsimon
2b206a7bcc
Merge branch 'master' into natsoni/hide-acc-checkout-on-accelerations 2024-09-13 23:02:23 +08:00
softsimon
c4b90c2a18
Merge pull request #5485 from mempool/mononaut/paginated-accel-history
Handle paginated acceleration results
2024-09-13 22:56:57 +08:00
softsimon
2a7d5760e0
Merge branch 'master' into mononaut/paginated-accel-history 2024-09-13 22:16:28 +08:00
softsimon
c8719f1f1e
Merge pull request #5479 from mempool/mononaut/rbf-tracking-fixes
RBF tracking fixes
2024-09-13 22:11:27 +08:00
natsoni
d199c7746e
Merge branch 'master' into natsoni/hide-acc-checkout-on-accelerations 2024-09-13 11:57:20 +02:00
dependabot[bot]
67eb815992
Bump body-parser and express in /frontend
Bumps [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 09:10:42 +00:00
dependabot[bot]
4ccd3c8525
Bump serve-static and express in /backend
Bumps [serve-static](https://github.com/expressjs/serve-static) to 1.16.2 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `serve-static` from 1.15.0 to 1.16.2
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.15.0...v1.16.2)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: serve-static
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 09:10:33 +00:00
softsimon
fc5af24b68
Merge branch 'master' into mononaut/rbf-tracking-fixes 2024-09-13 17:10:12 +08:00
softsimon
b17b66a52f
Merge pull request #5476 from mempool/dependabot/npm_and_yarn/frontend/micromatch-4.0.8
Bump micromatch from 4.0.4 to 4.0.8 in /frontend
2024-09-13 17:09:53 +08:00
softsimon
819dedbc88
Merge pull request #5464 from mempool/natsoni/amount-selector
Add amount mode selector to footer
2024-09-13 17:03:24 +08:00
softsimon
8717051a06
Merge pull request #5472 from mempool/mononaut/json-errors
respect json Accept header in API error responses
2024-09-13 16:13:48 +08:00
nymkappa
3e78b636d6
[accelerator] avoid duplicated accel request with double click 2024-09-12 16:02:11 +02:00
Mononaut
7865574bd4
block summary indexing respect INDEXING_BLOCKS_AMOUNT 2024-09-11 21:48:26 +00:00
nymkappa
b3ca8840e5
Merge branch 'master' into nymkappa/faucet-unverified 2024-09-11 16:51:22 +02:00
softsimon
75316e60d0
Merge branch 'master' into mononaut/json-errors 2024-09-10 18:37:27 +04:00
softsimon
31469ad361
Merge pull request #5478 from mempool/natsoni/ineligible-for-acceleration
Ineligible transaction link to accelerator FAQ
2024-09-10 18:36:19 +04:00
nymkappa
a133ddf062
[faucet] show unverified warning if no email provided 2024-09-10 12:07:46 +02:00
wiz
485a58e453
Merge pull request #5503 from mempool/mononaut/axios-socket-hotfix-2
hotfix option 2 for axios breaking change to unix sockets
2024-09-09 16:54:28 +09:00
wiz
92090399cc
Merge pull request #5504 from mempool/revert-5502-mononaut/axios-socket-hotfix-1
Revert "hotfix option 1 for axios breaking change to unix sockets"
2024-09-09 16:54:12 +09:00
wiz
893c3cd87d
Revert "hotfix option 1 for axios breaking change to unix sockets" 2024-09-09 16:53:56 +09:00
wiz
c93159414c
Merge pull request #5502 from mempool/mononaut/axios-socket-hotfix-1
hotfix option 1 for axios breaking change to unix sockets
2024-09-09 16:42:23 +09:00
Mononaut
b2d4f4078f
alternate hotfix for broken socket support (rollback axios to 1.7.2) 2024-09-08 20:18:04 +00:00
Mononaut
be17e45785
hotfix for axios breaking change to unix sockets 2024-09-08 20:16:06 +00:00
wiz
dbe774cc64
ops: Clear all mempool frontend configs on build env reset 2024-09-09 02:45:16 +09:00
Mononaut
e513f05c09
Fix reorg to lower height on /monitoring status page 2024-09-05 20:55:48 +00:00
wiz
64223c4744
ops: Set blocksxor=0 in bitcoin.conf 2024-09-05 02:15:08 +09:00
wiz
07fd3d3409
ops: Bump some FreeBSD install packages 2024-09-04 22:26:08 +09:00
wiz
f7360433a1
Merge pull request #5497 from mempool/nymkappa/nofaucet-error-message
[faucet] add missing error message for suspicious twitter accounts
2024-09-04 21:06:47 +09:00
nymkappa
f6fac92180
[faucet] add missing error message for suspicious twitter accounts 2024-09-04 13:52:48 +02:00
wiz
82d1502bfa
Merge pull request #5487 from mempool/orangeusurf/about-enterprise-update
Update about page enterprise sponsors
2024-09-03 13:40:06 +09:00
orangesurf
8ab104d191
switch to alternate logo 2024-09-02 13:47:41 +02:00
orangesurf
263742132c
Merge branch 'master' into orangeusurf/about-enterprise-update 2024-09-02 12:28:52 +01:00
softsimon
e3c3f31ddb
Merge pull request #5494 from vostrnad/zero-multisig
Allow OP_0 in multisig scripts
2024-09-01 10:49:27 +04:00
wiz
70d1f52268
Merge pull request #5489 from mempool/mononaut/the-v3-standard 2024-09-01 02:02:21 +09:00
Vojtěch Strnad
e44f30d7a7 Allow OP_0 in multisig scripts 2024-08-31 14:31:55 +02:00
Mononaut
099d84a395
New standardness rules for v3 & anchor outputs, with activation height logic 2024-08-30 23:16:33 +00:00
Mononaut
12285465d9
Add support for anchor output type 2024-08-30 21:39:22 +00:00
natsoni
eab008c707
Ineligible transaction link to accelerator FAQ 2024-08-30 12:19:58 +02:00
nymkappa
0f1def5822
[accelerator] make bid boost graph bar min height taller 2024-08-29 20:53:40 +02:00
orangesurf
fad39e0bea
Update about page enterprise sponsors 2024-08-29 13:02:32 +02:00
natsoni
0a5a2c3c7e
Remove difficulty epoch block offset 2024-08-28 16:50:00 +02:00
Mononaut
b526ee0877
Handle paginated acceleration results 2024-08-28 14:47:42 +00:00
dependabot[bot]
98d98b2478
Bump micromatch from 4.0.4 to 4.0.8 in /frontend
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.4 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.4...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 05:01:52 +00:00
softsimon
3bea10ea35
Merge pull request #5484 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.14.0
Bump cypress from 13.13.0 to 13.14.0 in /frontend
2024-08-28 07:00:55 +02:00
dependabot[bot]
1ea45e9e96
Bump cypress from 13.13.0 to 13.14.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.13.0 to 13.14.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.13.0...v13.14.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 02:59:35 +00:00
natsoni
555425d97e
Handle city-states in geolocation component 2024-08-27 14:49:54 +02:00
natsoni
624b3473fc
Hide accelerator panel if tx gets accelerated on another session 2024-08-27 12:32:21 +02:00
natsoni
a3e61525fe
Reset acceleration flow state when leaving transaction 2024-08-27 11:42:13 +02:00
Mononaut
9e05060af4
fix tests 2024-08-27 00:17:17 +00:00
Mononaut
ee53597fe9
Resume RBF trees after restart 2024-08-26 23:43:29 +00:00
Mononaut
e362003746
Catch RBF replacements across mempool update boundaries 2024-08-26 23:43:15 +00:00
Mononaut
185eae00e9
Fix RBF tracking inconsistencies 2024-08-26 23:41:38 +00:00
softsimon
8c2d0e1d6c
Merge pull request #5445 from mempool/mononaut/persistent-goggles
Persist mempool block visualization between pages
2024-08-26 22:14:17 +02:00
softsimon
009fba3dd5
Merge branch 'master' into mononaut/persistent-goggles 2024-08-26 22:05:16 +02:00
softsimon
a0fc4861d4
Merge pull request #5460 from mempool/mononaut/v1-audit-improvements
v1 audit improvements
2024-08-26 21:38:37 +02:00
softsimon
62085581dd
Merge branch 'master' into mononaut/v1-audit-improvements 2024-08-26 18:45:00 +02:00
softsimon
05efa8c300
Merge pull request #5468 from mempool/dependabot/npm_and_yarn/frontend/elliptic-6.5.7
Bump elliptic from 6.5.4 to 6.5.7 in /frontend
2024-08-26 17:59:21 +02:00
softsimon
eee99a6407
Merge pull request #5477 from mempool/mononaut/readme-node-version
[docs] update READMEs to newer node version
2024-08-26 17:58:52 +02:00
Mononaut
98cee4a6cd
[docs] update READMEs to newer node version 2024-08-26 15:36:53 +00:00
dependabot[bot]
0302999806
Bump elliptic from 6.5.4 to 6.5.7 in /frontend
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.4 to 6.5.7.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.4...v6.5.7)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 14:54:51 +00:00
softsimon
1876d67e74
Merge pull request #5467 from mempool/dependabot/npm_and_yarn/backend/axios-1.7.4
Bump axios from 1.7.2 to 1.7.4 in /backend
2024-08-26 16:53:40 +02:00
softsimon
c0bb75e5b1
Merge pull request #5475 from mempool/dependabot/npm_and_yarn/frontend/tslib-2.7.0
Bump tslib from 2.6.2 to 2.7.0 in /frontend
2024-08-26 16:53:26 +02:00
dependabot[bot]
4059a902a1
Bump tslib from 2.6.2 to 2.7.0 in /frontend
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/v2.6.2...v2.7.0)

---
updated-dependencies:
- dependency-name: tslib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 12:42:46 +00:00
dependabot[bot]
4cc19a7235
Bump axios from 1.7.2 to 1.7.4 in /backend
Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.2...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 12:42:42 +00:00
wiz
c874d642c5
Bump version to 3.1.0-dev 2024-08-26 21:41:26 +09:00
wiz
f0af1703da
Release v3.0.0 2024-08-24 18:35:41 +09:00
Mononaut
b47e148677
respect json Accept header in API error responses 2024-08-22 19:51:28 +00:00
natsoni
d22743c4b8
Don't display accelerator checkout on already accelerated txs 2024-08-22 15:39:20 +02:00
nymkappa
6db4afe878
[mining] add POOLS_UPDATE_DELAY where needed 2024-08-20 14:31:07 +02:00
nymkappa
4596394100
[mining] pool updater is now self contained service 2024-08-20 12:07:20 +02:00
nymkappa
ae2ed8fdae
[mining] fix pools updater only running at start 2024-08-20 11:53:48 +02:00
softsimon
5452d7f524
pull from transifex 2024-08-20 09:32:56 +02:00
wiz
ff9e2456b9
ops: Tweak build script to support tags 2024-08-20 15:22:16 +09:00
wiz
4e581347c8
Bump version to v3.0.0-rc1 2024-08-20 12:06:11 +09:00
wiz
820777236e
Merge pull request #5465 from mempool/orangesurf/update-logos-2024-08-19
Add logo images and references to logos
2024-08-20 12:01:51 +09:00
wiz
beeb5eb08c
Merge pull request #5466 from mempool/mononaut/fix-about-layout
Fix about page layout
2024-08-20 10:50:04 +09:00
Mononaut
b78aca0282
Fix about page layout 2024-08-19 19:46:22 +00:00
orangesurf
9572f2d554
Add logo images and references to logos 2024-08-19 20:13:49 +02:00
natsoni
e59308c2f5
Fix global footer css 2024-08-19 18:21:01 +02:00
softsimon
ef13596b59
Merge pull request #5449 from mempool/mononaut/non-acc-effective-fee
fix mined acceleration detection logic on tx pages
2024-08-19 17:10:46 +02:00
natsoni
c7f48b4390
Add amount mode selector to footer 2024-08-19 16:29:34 +02:00
wiz
80da024bbb
Add hr locale to angular.json 2024-08-19 14:49:36 +09:00
natsoni
f75f85f914
Hide fee delta on accelerated tx mined by participating pool with 0 bid boost 2024-08-18 19:43:38 +02:00
natsoni
b3ac107b0b
clear feeDelta if a tx is mined by non-participating pool 2024-08-18 18:35:30 +02:00
softsimon
f8cedaa7a3
Merge pull request #5462 from mempool/natsoni/fix-console-error
Fix accelerated arrow not appearing
2024-08-18 15:47:02 +02:00
natsoni
72bb92dd8b
Merge branch 'master' into mononaut/non-acc-effective-fee 2024-08-18 14:27:48 +02:00
natsoni
e3c4e219f3
Fix accelerated arrow not appearing 2024-08-18 14:15:56 +02:00
wiz
aa3fa4478a
Merge pull request #5458 from mempool/mononaut/pool-pie-colors
update pool pie chart color scheme
2024-08-18 12:15:27 +09:00
Mononaut
c9171224e1
DB migration to fix bad v1 audits 2024-08-18 02:21:12 +00:00
Mononaut
248cef7718
Improve prioritized transaction detection algorithm 2024-08-18 02:21:05 +00:00
Mononaut
26c03eee88
update pool pie chart color scheme 2024-08-14 14:21:47 +00:00
softsimon
db10ab9aae
pull from transifex 2024-08-13 10:28:42 +02:00
wiz
2ee7b9531a
Merge pull request #5454 from mempool/simon/add-croatian
Add Croatian language
2024-08-13 13:36:00 +09:00
wiz
5f6af83944
Merge pull request #5453 from mempool/mononaut/acceleration-sparkles
acceleration sparkles
2024-08-13 13:33:25 +09:00
softsimon
8d2204a53f
Merge pull request #5457 from mempool/mononaut/flow-output-indices
flow diagram zero-indexed inputs & outputs
2024-08-12 23:04:34 +02:00
Mononaut
96bec279a9
flow diagram zero-indexed inputs & outputs 2024-08-12 14:54:51 +00:00
softsimon
5178ae43f6
Add Croatian language 2024-08-12 00:07:48 +02:00
softsimon
ca26154426
pull from transifex 2024-08-11 23:51:16 +02:00
Mononaut
021f0b32a1
sparklier sparkles 2024-08-11 20:52:26 +00:00
Mononaut
b8cfeb579b
make accelerations magical again 2024-08-11 20:38:54 +00:00
softsimon
fc5b99f93f
Merge pull request #5452 from mempool/mononaut/tx-v1-audit
Implement v1 audit in tx audit API
2024-08-11 00:18:09 +02:00
Mononaut
ce4b0ed0f3
Implement v1 audit in tx audit API 2024-08-10 21:57:31 +00:00
Mononaut
a31729b8b8
fix feeDelta display logic 2024-08-10 21:56:11 +00:00
Mononaut
fbf27560b3
optimize processNewBlocks 2024-08-10 13:53:49 +00:00
Mononaut
79e494150c
fix mined acceleration detection logic on tx pages 2024-08-09 14:44:51 +00:00
softsimon
b1a43abc0e
Merge pull request #5444 from mempool/natsoni/fix-pool-pie-position
Fix pool pie position on safari
2024-08-08 22:20:09 +02:00
softsimon
3e50a3c9e7
pull from transifex 2024-08-08 18:58:59 +02:00
Mononaut
104c7f4285
Persist mempool block visualization between pages 2024-08-08 13:12:31 +00:00
natsoni
132d6204c3
Fix pool pie position on safari 2024-08-08 11:23:56 +02:00
wiz
77c6ad5576
Merge pull request #5438 from mempool/natsoni/hide-fee-delta-on-confirmed
Hide fee delta on accelerated tx if bid boost is 0
2024-08-07 19:38:04 -04:00
wiz
4d35845c18
Merge pull request #5441 from mempool/simon/remove-testnet4-beta
remove testnet4 beta tag
2024-08-07 19:36:55 -04:00
wiz
3d8a4a85f7
Merge pull request #5433 from mempool/simon/remove-mempool-goggles-beta
remove mempool googles [beta] tag
2024-08-07 19:36:45 -04:00
wiz
1545347a45
Merge pull request #5443 from mempool/simon/fix-broken-sponsor-image-proxy
fix broken sponsor image proxy
2024-08-07 18:11:59 -04:00
softsimon
9facf28ba5
pull from transifex 2024-08-07 23:57:11 +02:00
softsimon
d6eb98561b
Merge pull request #5439 from mempool/natsoni/purple-acc-fee-rate
Consistent purple accelerated fee rate
2024-08-07 23:42:37 +02:00
softsimon
0f688e8347
fix broken sponsor image proxy 2024-08-07 23:41:53 +02:00
wiz
7f53741a7b
Merge pull request #5442 from mempool/simon/timesincepaid-sorry-time-increase
increasing time since paid sorry message
2024-08-07 17:19:11 -04:00
softsimon
d5672691e1
increasing time since paid sorry message 2024-08-07 22:06:22 +02:00
softsimon
e6049c707b
remove testnet4 beta tag 2024-08-07 22:03:47 +02:00
natsoni
91e74e769c
Purple accelerated fee rate everywhere 2024-08-07 14:19:59 +02:00
natsoni
7f252f06b7
Hide fee delta on accelerated tx with bidBoost=0 2024-08-07 11:11:31 +02:00
softsimon
1b9d3f669d
remove mempool googles [beta] tag 2024-08-07 00:30:20 +02:00
wiz
ef0ba9a77a
ops: Add mempool-update-repo script 2024-08-06 18:30:11 -04:00
wiz
15f10736e2
Merge pull request #5432 from mempool/simon/match-any-onion
match any onion
2024-08-06 18:26:31 -04:00
softsimon
924399df46
match any onion 2024-08-07 00:24:23 +02:00
wiz
cddff129b3
Merge pull request #5431 from mempool/simon/fix-services-onion
fix services onion url
2024-08-06 17:29:15 -04:00
softsimon
7c90e8ae06
fix services onion url 2024-08-06 23:27:59 +02:00
wiz
34d996c7cb
Merge pull request #5430 from mempool/natsoni/dynamically-show-oob-fee
Immediately show oob fee on accelerated transaction
2024-08-06 15:00:49 -04:00
wiz
641a2ae3ae
Remove testnet4 not-yet-finalized warning now that BIP is merged 2024-08-05 15:37:29 -04:00
natsoni
11a849ef28
Immediately show oob fee on accelerated transaction 2024-08-05 21:01:33 +02:00
wiz
7b0347e846
Bump version string to 3.0.0-beta 2024-08-05 14:55:59 -04:00
wiz
bb1352ed58
Merge pull request #5427 from mempool/mononaut/fix-other-liquid-migration
fix db migration 75 on liquid
2024-08-05 14:09:36 -04:00
wiz
fa6456b92c
Merge pull request #5422 from mempool/natsoni/purple-accelerated-rate
Purple accelerated fee rate
2024-08-05 14:09:14 -04:00
wiz
bfea19238b
Merge pull request #5420 from mempool/natsoni/add-tooltip-acc-fee
Add tooltip to acceleration fee
2024-08-05 14:04:42 -04:00
wiz
36b91cfdfd
Merge pull request #5421 from mempool/mononaut/rbf-tracker-redirect
Fix broken pizza rbf link to /tracker
2024-08-05 14:04:20 -04:00
wiz
7b56212064
Merge pull request #5425 from mempool/natsoni/clear-mining-cache-network-change
Clear mining service cache on network change
2024-08-05 14:03:14 -04:00
wiz
d4be3c2c4c
Merge pull request #5428 from mempool/mononaut/payment-method-click
[accelerator] fix click binding on payment method buttons
2024-08-05 14:02:51 -04:00
wiz
3a9f06f651
Merge pull request #5429 from mempool/mononaut/fix-block-unfurl-loading
Fix stray loading spinner in block unfurl
2024-08-05 14:02:34 -04:00
Mononaut
e652eb339d
Fix stray loading spinner in block unfurl 2024-08-05 17:08:44 +00:00
softsimon
96435c329f
Merge pull request #5426 from mempool/mononaut/fix-liquid-migration
fix liquid db migration
2024-08-05 18:47:26 +02:00
Mononaut
1c69613d65
[accelerator] fix click binding on payment method buttons 2024-08-05 16:15:53 +00:00
Mononaut
3707763e30
fix db migration 75 on liquid 2024-08-05 16:03:22 +00:00
Mononaut
b6ce8229f0
fix liquid db migration 2024-08-05 15:49:16 +00:00
natsoni
b62ae9b6f6
Clear mining service cache on network change 2024-08-05 15:45:39 +02:00
Mononaut
f61ace2f92
Fix broken pizza rbf link to /tracker 2024-08-05 10:31:01 +00:00
natsoni
2b572f2494
Purple accelerated fee rate 2024-08-05 12:20:49 +02:00
natsoni
c0e4c1efe1
Fix text wrap 2024-08-05 11:53:01 +02:00
natsoni
8078caaa89
Add tooltip to acceleration fee 2024-08-05 11:36:35 +02:00
wiz
5eb117165f
Revert "ops: Remove potentially dangerous env var in rust build process"
This reverts commit a2dcf0d545ac096de20eb361ba3a1c349edb6c93.
2024-08-04 21:19:44 -04:00
wiz
a2dcf0d545
ops: Remove potentially dangerous env var in rust build process 2024-08-04 21:06:36 -04:00
wiz
212d58f917
Change accelerate checkout redirect from /tracker/ to /tx/ 2024-08-04 20:52:49 -04:00
wiz
d1eec80afb
Delete redirect to /tracker/ for cash.app 2024-08-04 20:45:05 -04:00
wiz
05c6709926
Merge pull request #5417 from mempool/simon/hide-fiat-buttons-correctly
hide fiat buttons correctly
2024-08-04 19:45:07 -04:00
softsimon
f1a48db9ee
hide fiat buttons correctly 2024-08-05 01:43:58 +02:00
wiz
76ce43d289
Merge pull request #5416 from mempool/simon/enable-acc-button-enterprise
enable accelerator button on enterprise instances
2024-08-04 19:22:33 -04:00
softsimon
51f5b728f3
enable accelerator button on enterprise instances 2024-08-05 01:20:40 +02:00
wiz
8fa1863aff
Merge pull request #5415 from mempool/simon/fix-invalid-json-response-requestAcceleration
fix invalid json response from requestAcceleration
2024-08-04 19:12:06 -04:00
softsimon
e3d1d9c1c0
fix invalid json response from requestAcceleration 2024-08-05 01:11:18 +02:00
wiz
f2f8d91e10
Merge pull request #5410 from mempool/natsoni/show-oob-fee
Show oob fees on tx details
2024-08-04 19:02:20 -04:00
wiz
11ef090846
Merge pull request #5414 from mempool/simon/only-enable-fiat-prod-staging
only enable fiat on prod and staging
2024-08-04 19:01:54 -04:00
softsimon
5cacd2635e
only enable fiat on prod, staging and dev 2024-08-05 01:00:58 +02:00
softsimon
1b4780c25b
Merge pull request #5409 from mempool/natsoni/fix-truncated-link
Fix truncated link to not refresh full window
2024-08-05 00:16:15 +02:00
softsimon
5ea44f2e7d
Merge pull request #5408 from mempool/natsoni/pizza-tracker-fix-crash
Pizza tracker: handle transaction not yet in mempool
2024-08-04 23:39:39 +02:00
softsimon
261c794817
pull from transifex 2024-08-04 23:36:03 +02:00
natsoni
de9fae5cd7
Show oob fees on tx details 2024-08-04 17:07:38 +02:00
natsoni
439c52af30
Fix truncated link to not refresh full window 2024-08-04 14:36:42 +02:00
softsimon
4dbcd6ca18
pull from transifex 2024-08-04 10:18:18 +02:00
softsimon
2921c94520
Merge pull request #5354 from mempool/mononaut/v1-audits
v1 audits
2024-08-03 21:55:19 +02:00
softsimon
ab4a258be3
Merge pull request #5406 from mempool/simon/fix-mobile-rbf-test
fix mobile rbf test
2024-08-03 19:07:49 +02:00
softsimon
21b0d50947
fix mobile rbf test 2024-08-03 18:58:55 +02:00
softsimon
233ec112c2
Merge pull request #5405 from TechMiX/fix/more-accel-rtl-issues
fix: acceleration rtl layout issues
2024-08-03 18:24:22 +02:00
TechMiX
6f0a5c9b44 fix: accelerationn rtl layout issues 2024-08-03 14:39:50 +02:00
softsimon
2bc243b115
accel list i18n fixes 2024-08-03 00:26:37 +02:00
softsimon
154f8e65a7
accel status i18n fix 2024-08-03 00:20:38 +02:00
wiz
cc9855aa65
Merge pull request #5404 from mempool/nymkappa/square-loading
[square] use mirror to serve square.js and load it sooner
2024-08-02 17:52:44 -04:00
nymkappa
7b45d922bc
[square] i'm an idiot 2024-08-02 23:35:30 +02:00
nymkappa
9488ca50a3
[square] use mirror to serve square.js and load it sooner 2024-08-02 23:27:40 +02:00
wiz
9f559248cc
Merge pull request #5403 from mempool/nymkappa/square-loading
[square] retry web sdk faster
2024-08-02 17:24:00 -04:00
nymkappa
067aac4d06
[square] retry web sdk faster 2024-08-02 23:04:15 +02:00
wiz
37eb17cc22
Merge pull request #5402 from mempool/nymkappa/square-loading
[square] fix web sdk retry logic
2024-08-02 16:50:41 -04:00
nymkappa
c7382a1c6c
[square] fix web sdk retry logic 2024-08-02 22:48:04 +02:00
softsimon
f782693b26
Merge pull request #5401 from mempool/mononaut/acc-pie-colors
adjust pie colors to handle more pools
2024-08-02 21:40:36 +02:00
wiz
908988d06e
Merge pull request #5398 from mempool/natsoni/fix-accelerator-loader
Fix accelerator skeleton loader
2024-08-02 14:41:29 -04:00
wiz
a0c21e4120
Merge pull request #5395 from mempool/nymkappa/accel-status
[accelerator] fix accel status in widget
2024-08-02 14:25:54 -04:00
wiz
bd96cbd701
Merge pull request #5399 from mempool/natsoni/fix-mobile-tx-routing
Remove query param redirect on tx page
2024-08-02 14:23:54 -04:00
wiz
9cccdcf70f
Merge pull request #5400 from mempool/natsoni/pizza-tracker-loader
Align pizza tracker skeleton loader
2024-08-02 14:23:21 -04:00
natsoni
2489fc4902
Fix need to double click on previous to go back 2024-08-02 19:00:52 +02:00
natsoni
e378df4158
Fix pizza tracker crash on unseen transaction 2024-08-02 18:52:07 +02:00
Mononaut
fa5f758875
adjust pie colors to handle more pools 2024-08-02 16:44:36 +00:00
natsoni
a46f15e7ec
Align pizza tracker skeleton loader 2024-08-02 17:37:53 +02:00
natsoni
46ecd2a51f
Fix accelerator skeleton loader 2024-08-02 16:53:34 +02:00
softsimon
c1aaf2f61a
pull from transifex 2024-08-02 14:04:49 +02:00
Mononaut
d2b57c8d4f
added/prioritized dual audit status 2024-08-02 10:46:07 +00:00
softsimon
f27a5700fa
pull from transifex 2024-08-02 02:43:34 +02:00
nymkappa
17522cca6e
[accelerator] 2024-08-02 00:24:50 +02:00
nymkappa
3f2581886d
[accelerator] fix accel status in widget 2024-08-02 00:20:34 +02:00
wiz
c5beee3a40
ops: Fix nginx routing for /api/v1/accelerations 2024-08-01 17:04:00 -04:00
wiz
94e223e8da
Merge pull request #5010 from mempool/mononaut/tracker-tx-routing
Transparently redirect direct mobile tx visits to pizza tracker
2024-08-01 14:30:56 -04:00
wiz
416e1bb4cb
Merge pull request #5393 from mempool/mononaut/accelerate-anchor
[accelerator] add anchor element
2024-08-01 14:19:22 -04:00
wiz
564dc08509
Merge pull request #5392 from mempool/orangesurf/privacy-policy
Update PP
2024-08-01 14:19:01 -04:00
Mononaut
b9334c93f5
Handle accelerations in v1 audit 2024-08-01 14:07:19 +00:00
Mononaut
67761230e3
frontend support for v1 block audits 2024-08-01 14:07:19 +00:00
Mononaut
7cc01af631
Implement v1 block audits 2024-08-01 14:07:19 +00:00
Mononaut
96e2e6060b
Migrate audits from v0 to v1 2024-08-01 14:07:19 +00:00
Mononaut
0723778e7c
Update audit schema version 2024-08-01 14:07:19 +00:00
orangesurf
39d7e4ac3e
Merge branch 'master' into orangesurf/privacy-policy 2024-08-01 13:44:34 +02:00
softsimon
1869368a49
pull from transifex 2024-08-01 10:50:01 +02:00
orangesurf
b83f19f186
Merge branch 'master' into orangesurf/privacy-policy 2024-07-31 23:50:58 +02:00
Mononaut
b248aad6d9
[accelerator] add anchor element 2024-07-31 17:08:39 +00:00
softsimon
87c9f920c1
Merge pull request #5391 from mempool/natsoni/add-opacity-pools-logo
Set pool logos opacity to 0.3
2024-07-31 18:34:09 +02:00
orangesurf
ea0e339d60
Update PP 2024-07-31 16:02:26 +02:00
orangesurf
0a0b5e52fe
Update PP 2024-07-31 13:55:21 +02:00
natsoni
5314f35974
Make logos 0.3 opacity 2024-07-31 12:22:49 +02:00
softsimon
87d2f6cf90
Merge pull request #5389 from TechMiX/fix/acc-rtl-issues
fix: acceleration rtl issues
2024-07-31 11:16:29 +02:00
softsimon
4266bdcbb6
pull from transifex 2024-07-31 09:29:55 +02:00
softsimon
73e68534f1
Merge pull request #5390 from mempool/dependabot/npm_and_yarn/backend/babel/core-7.25.2
Bump @babel/core from 7.24.0 to 7.25.2 in /backend
2024-07-31 02:56:37 -04:00
dependabot[bot]
ee5b383a46
Bump @babel/core from 7.24.0 to 7.25.2 in /backend
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.24.0 to 7.25.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.2/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 02:27:25 +00:00
TechMiX
fa4b445dca fix acc rtl issues 2024-07-31 01:28:31 +02:00
softsimon
06eaadd517
pull from transifex 2024-07-30 16:17:21 -04:00
softsimon
ebdc1dbf6d
Merge pull request #5385 from mempool/mononaut/fix-ffee-detection
Fix effective fee rate detection on tx page
2024-07-30 16:13:21 -04:00
softsimon
184903670a
Merge pull request #5386 from mempool/natsoni/fix-timeline-tooltip
Fix missing accelerated fee rate in timeline tooltip
2024-07-30 14:49:06 -05:00
softsimon
878561244a
Merge pull request #5387 from mempool/natsoni/fix-timeline-centering
Fix accelerated time centering
2024-07-30 14:48:19 -05:00
softsimon
a0e9b33199
pull from i18n 2024-07-30 15:46:29 -04:00
natsoni
0a4513c8fb
Fix 'Just now' capitalization in timeline of mined transactions 2024-07-30 17:40:58 +02:00
softsimon
77b9277da5
pull from i18n 2024-07-30 10:38:05 -05:00
natsoni
009fac183f
Fix accelerated time centering 2024-07-30 17:31:34 +02:00
natsoni
83a6df4d04
Fix missing accelerated fee rate line 2024-07-30 17:22:57 +02:00
Mononaut
474d384b0c
fix wildcard routing clash 2024-07-30 14:48:47 +00:00
Mononaut
5870782abf
Fix effective fee rate detection on tx page 2024-07-30 11:49:52 +00:00
softsimon
fb335f62db
pull from i18n 2024-07-29 22:16:15 -05:00
softsimon
346ef0028d
Merge pull request #5384 from mempool/dependabot/npm_and_yarn/backend/redis-4.7.0
Bump redis from 4.6.6 to 4.7.0 in /backend
2024-07-29 21:21:43 -05:00
dependabot[bot]
916cae2a8f
Bump redis from 4.6.6 to 4.7.0 in /backend
Bumps [redis](https://github.com/redis/node-redis) from 4.6.6 to 4.7.0.
- [Release notes](https://github.com/redis/node-redis/releases)
- [Changelog](https://github.com/redis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/node-redis/compare/redis@4.6.6...redis@4.7.0)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 02:12:44 +00:00
softsimon
550e667a2f
Merge pull request #5383 from mempool/nymkappa/accel-history-list-update
[accelerator] use "mined" when accelerated tx is mined by non participating pool
2024-07-29 11:33:34 -05:00
softsimon
eb4ebf6786
pull from transifex 2024-07-29 11:09:12 -05:00
softsimon
7515348997
Merge pull request #5381 from TechMiX/hotfix/rtl-layout
fix: various rtl issues
2024-07-29 10:39:59 -05:00
nymkappa
41441bb958
[accelerator] use "mined" when accelerated tx is mined by non participating pool 2024-07-29 11:11:29 +02:00
softsimon
98c49918f7
Merge pull request #5382 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.11.0
Bump mysql2 from 3.10.0 to 3.11.0 in /backend
2024-07-28 21:14:52 -05:00
dependabot[bot]
5855e09663
Bump mysql2 from 3.10.0 to 3.11.0 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.10.0...v3.11.0)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 02:07:00 +00:00
softsimon
558b876d47
pull from transifex 2024-07-28 19:48:15 -05:00
TechMiX
fb63af5070 fix various rtl issues 2024-07-29 02:17:09 +02:00
wiz
d02a2ccf65
Merge pull request #5380 from mempool/simon/1w-1m
fixes crash with missing pool partner
2024-07-28 14:40:50 -05:00
softsimon
e3bb812203
fixes crash with missing pool partner
fixes #5379
2024-07-28 14:10:50 -05:00
softsimon
e3af4ea61c
pull from transifex 2024-07-28 13:20:58 -05:00
softsimon
7d10b32861
pull from transifex 2024-07-26 16:43:17 -05:00
wiz
adea897e93
Merge branch 'master' into mononaut/tracker-tx-routing 2024-07-26 11:29:31 -05:00
wiz
17ec50dba0
Merge pull request #5371 from mempool/natsoni/timeline-tooltip
Add tooltip to acceleration timeline
2024-07-26 11:12:15 -05:00
Mononaut
53a36d042f
Fix /tx redirect merge conflicts 2024-07-26 16:11:59 +00:00
softsimon
7531a53b2e
correct i18n 2024-07-26 11:06:36 -05:00
Mononaut
d59bc085e5
Redirect direct mobile tx visits to pizza tracker 2024-07-26 15:54:22 +00:00
wiz
5d37e08c64
Merge branch 'master' into natsoni/timeline-tooltip 2024-07-26 10:44:01 -05:00
wiz
b5d89b83fa
Merge pull request #5368 from mempool/nymkappa/google-pay
[accelerator] add support for Google Pay payment
2024-07-26 10:43:50 -05:00
nymkappa
1245673575
[accelerator] polish UI 2024-07-26 17:39:58 +02:00
softsimon
62a72755c7
pull from transifex 2024-07-26 10:25:29 -05:00
wiz
5b8ec8925a
Merge pull request #5373 from mempool/mononaut/no-405
[accelerator] remove dumb log request 405 response
2024-07-26 10:22:38 -05:00
softsimon
262866c15b
Merge pull request #5369 from mempool/nymkappa/getjwtemptynonofficial
[services] getJWT call returns nothing if non official
2024-07-26 06:36:21 -05:00
softsimon
aec7eb57c2
Merge pull request #5370 from mempool/natsoni/fix-loading-spinner
Fix loading spinner z-index
2024-07-26 05:10:25 -05:00
Mononaut
8d3b4733f5
[accelerator] remove dumb 405 log request response 2024-07-26 09:49:42 +00:00
nymkappa
3e4debdf7a
Merge branch 'master' into nymkappa/google-pay 2024-07-26 11:38:47 +02:00
nymkappa
b719b76999
Merge pull request #5372 from mempool/mononaut/google-play-minor-fixes
minor accelerator checkout fixes
2024-07-26 11:37:54 +02:00
Mononaut
6adbda5185
Fix accelerator checkout linting & type errors 2024-07-26 09:27:18 +00:00
natsoni
01311d0ba1
Add tooltip to timeline 2024-07-26 11:21:24 +02:00
Mononaut
6081daacef
[accelerator] add missing getters etc 2024-07-26 09:06:47 +00:00
natsoni
54c9970386
Merge branch 'master' into natsoni/timeline-tooltip 2024-07-26 11:04:17 +02:00
softsimon
1e4a599055
fix accelerations row height 2024-07-25 21:05:32 -05:00
softsimon
b051861d61
Merge pull request #5365 from mempool/natsoni/fix-mining-data
Get all pools in accelerations list
2024-07-25 21:03:52 -05:00
natsoni
3c7deafffd
Fix loading spinner z-index 2024-07-26 00:00:14 +02:00
nymkappa
845123fc63
[services] getJWT call returns nothing if non official 2024-07-25 23:04:53 +02:00
nymkappa
d3e3650cac
[accelerator] avoid premature square setup call 2024-07-25 21:49:48 +02:00
softsimon
008cc385da
pull from transifex 2024-07-25 13:01:37 -05:00
softsimon
817a6bef6e
Merge pull request #5367 from mempool/knorrium/change_default_var
Set the default value to the SERVICES_API variable
2024-07-25 12:59:40 -05:00
Felipe Knorr Kuhn
8dd8fe5fb1
Fix string value 2024-07-25 12:57:36 -05:00
softsimon
c734a81f08
pull from transifex 2024-07-25 12:27:32 -05:00
Felipe Knorr Kuhn
a0f4c260ab
Set the default URL for the backend 2024-07-25 12:20:01 -05:00
Felipe Knorr Kuhn
000a989055
Set the default value to the SERVICES_API variable 2024-07-25 11:29:17 -05:00
natsoni
90331e2c1b
Get all pools in accelerations list 2024-07-25 17:45:08 +02:00
wiz
78ac0137b3
Merge pull request #5350 from mempool/orangesurf/2024-07-19
Update webserver line
2024-07-25 10:21:53 -05:00
natsoni
3d9133c47e
Add fee delta to acceleration data 2024-07-25 16:52:10 +02:00
nymkappa
481859bc8f
[accelerator] add support for Google Pay payment 2024-07-25 15:54:24 +02:00
orangesurf
811feec145
Merge branch 'master' into orangesurf/2024-07-19 2024-07-25 18:47:27 +09:00
softsimon
b3e59c06e9
add new accelerator button config to sample 2024-07-25 04:07:18 -05:00
softsimon
67d44e3d6f
Merge pull request #5359 from mempool/natsoni/fix-loop-calling-transactionTimes
Prevent never ending loop of calls to transactionTimes
2024-07-25 03:38:06 -05:00
softsimon
ca4b1943a8
moving code block 2024-07-25 03:35:17 -05:00
natsoni
df0f244bd1
Prevent never ending loop of calls to transactionTimes 2024-07-25 00:53:13 +02:00
softsimon
fe1ad86885
Merge pull request #5362 from mempool/natsoni/more-data-acc-table
Add fee delta and pool name to acceleration list
2024-07-24 17:42:28 -05:00
natsoni
aee2454a98
Add pool name to acceleration list 2024-07-25 00:24:08 +02:00
softsimon
5c814d9c22
pending balance -> pending 2024-07-24 17:21:55 -05:00
wiz
2c5d7fbc9f
Merge pull request #5363 from mempool/nymkappa/apple-pay-hotfix
[accelerator] hide fiat payment method section if none available
2024-07-24 17:11:01 -05:00
nymkappa
570f7841ce
[accelerator] hide fiat payment method section if none available 2024-07-25 00:10:27 +02:00
wiz
117c066425
Merge pull request #5353 from mempool/nymkappa/apple-pay
[accelerator] add support for acceleration with apple pay
2024-07-24 17:01:23 -05:00
softsimon
96f9f66e7f
changing unconfirmed to pending balance/utxo 2024-07-24 16:56:30 -05:00
wiz
ce2742ff9c
Merge branch 'master' into nymkappa/apple-pay 2024-07-24 16:47:57 -05:00
softsimon
4547a2757c
Merge pull request #5351 from mempool/natsoni/fix-recursion-search
Fix recursion loop in search bar
2024-07-24 15:42:51 -05:00
nymkappa
4d44ee55fc
[accelerator] add missing getters for applepay 2024-07-24 22:20:52 +02:00
nymkappa
29875e0095
Merge branch 'master' into nymkappa/apple-pay 2024-07-24 22:04:44 +02:00
softsimon
bc498733fc
Merge pull request #5355 from mempool/natsoni/fix-blockchain-scroll
Fix unwanted blockchain scroll on screen resize
2024-07-24 11:44:36 -07:00
wiz
dc09e75783
Merge pull request #5361 from mempool/mononaut/fosscelerator
On-demand acceleration polling
2024-07-24 13:44:04 -05:00
wiz
544261eafe
ops: Add /api/v1/accelerations to nginx hot cache 2024-07-24 13:31:56 -05:00
softsimon
58c0c060d5
Merge pull request #5358 from mempool/natsoni/fix-miner-loading
Fix miner loading forever
2024-07-24 11:25:48 -07:00
Mononaut
af7a962a0b
[accelerator] accelerator_button config 2024-07-24 17:32:44 +00:00
Mononaut
7b3cc6372b
[accelerator] frontend on-demand polling support 2024-07-24 17:32:44 +00:00
Mononaut
b49a6c4cac
[accelerator] on-demand polling support 2024-07-24 17:32:43 +00:00
wiz
b0db348605
Merge pull request #5357 from mempool/nymkappa/update-api-key-header
[doc] update api key header
2024-07-24 12:27:03 -05:00
wiz
b1aa4f50bd
Change X-Mempool-Authorization to X-Mempool-Auth 2024-07-24 12:25:35 -05:00
orangesurf
301f1821ae
Merge branch 'master' into orangesurf/2024-07-19 2024-07-23 20:48:03 +09:00
natsoni
b9a053387f
Add txConfirmed subscription variable to fix miner loading forever 2024-07-23 11:44:50 +02:00
softsimon
82c271267a
extracting i18n's 2024-07-23 00:28:32 +08:00
softsimon
06affa60cc
Merge pull request #5352 from mempool/simon/replace-crypto-uuid-func
Fix crypto lib call crash with custom function
2024-07-22 22:38:05 +08:00
nymkappa
4ef4e5b98a
[doc] update api key header 2024-07-22 15:17:56 +02:00
wiz
6bc52dcc82
Merge pull request #5356 from mempool/simon/fix-payment-waiting-retry
fix btc payment waiting reply
2024-07-22 21:16:00 +09:00
softsimon
1f357408ac
fix btc payment waiting reply 2024-07-22 20:13:13 +08:00
natsoni
a7be59df3e
Fix buggy blockchain scroll on resize 2024-07-22 13:36:36 +02:00
orangesurf
82360f5525
Merge branch 'master' into orangesurf/2024-07-19 2024-07-22 17:08:47 +09:00
nymkappa
8762ccaa09
[accelerator] remove attempt to align fiat payment methods 2024-07-21 23:22:11 +02:00
nymkappa
3f7a24fb52
[accelerator] only show apple pay if available 2024-07-21 23:08:08 +02:00
nymkappa
09b09710e4
[accelerator] fix cashapp acceleration on mobile 2024-07-21 23:07:55 +02:00
nymkappa
08d3beed72
[accelerator] on mobile, autoscroll after selection cashapp or applepay 2024-07-21 22:38:49 +02:00
nymkappa
920f225e6c
[accelerator] add support for acceleration with apple pay 2024-07-21 22:17:47 +02:00
softsimon
9c2d010516
rename to insecureRandomUUID 2024-07-21 23:55:28 +08:00
softsimon
743c7e8bfb
Fix crypto lib call crash with custom function 2024-07-21 22:54:58 +08:00
softsimon
8116b50d50
fix spelling error 2024-07-21 20:34:20 +08:00
softsimon
df977926e2
Merge pull request #5349 from mempool/simon/add-fee-to-cpfp
Add fee to Cpfp API
2024-07-21 19:05:55 +08:00
softsimon
b0fac806d0
Merge pull request #4905 from mempool/mononaut/mini-miner-cpfp
Mini miner cpfp
2024-07-21 19:05:35 +08:00
Mononaut
398593828f
Implement CPFP reindexing using mini-miner method (not activated) 2024-07-20 12:08:52 +00:00
Mononaut
9aac0ddce7
Fix merge conflict 2024-07-20 12:08:52 +00:00
Mononaut
79eb9635c2
Fix cpfp vsize rounding & goggles bugs 2024-07-20 12:08:52 +00:00
Mononaut
41c373c39d
Mini-miner based block cpfp calculations 2024-07-20 12:08:52 +00:00
Mononaut
27374bd131
Refactor cpfp & single-block gbt code into mini-miner module 2024-07-20 12:08:52 +00:00
natsoni
8c07e3c31a
Fix recursion loop in search bar 2024-07-19 16:12:54 +02:00
orangesurf
84ba721407
Update webserver line 2024-07-19 11:48:47 +02:00
softsimon
cdaf42797f
Add fee to Cpfp API 2024-07-18 16:44:00 +08:00
wiz
0a116804e8
Merge pull request #5347 from mempool/junderw/fix-docker-aarch64
Bump Rust version to 1.79
2024-07-18 15:08:22 +09:00
junderw
68edf4306c
Bump Rust version to 1.79
Maintaining an old MSRV is not a priority for this project.
If you would like to keep an old MSRV active, please maintain your own patch/fork.
2024-07-18 01:07:05 +09:00
softsimon
61bbb95819
fix default docker unix socket path variable 2024-07-17 12:34:28 +08:00
softsimon
3fa32edf25
Merge pull request #5345 from mempool/dependabot/npm_and_yarn/frontend/fortawesome/fontawesome-common-types-6.6.0
Bump @fortawesome/fontawesome-common-types from 6.5.1 to 6.6.0 in /frontend
2024-07-17 11:48:05 +09:00
dependabot[bot]
db220d9dfd
Bump @fortawesome/fontawesome-common-types in /frontend
Bumps [@fortawesome/fontawesome-common-types](https://github.com/FortAwesome/Font-Awesome) from 6.5.1 to 6.6.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.1...6.6.0)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-common-types"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 02:47:44 +00:00
softsimon
bf61557879
Merge pull request #5344 from mempool/dependabot/npm_and_yarn/frontend/fortawesome/free-solid-svg-icons-6.6.0
Bump @fortawesome/free-solid-svg-icons from 6.5.1 to 6.6.0 in /frontend
2024-07-17 11:47:15 +09:00
dependabot[bot]
ebaf5cd304
Bump @fortawesome/free-solid-svg-icons from 6.5.1 to 6.6.0 in /frontend
Bumps [@fortawesome/free-solid-svg-icons](https://github.com/FortAwesome/Font-Awesome) from 6.5.1 to 6.6.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.1...6.6.0)

---
updated-dependencies:
- dependency-name: "@fortawesome/free-solid-svg-icons"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 02:47:02 +00:00
softsimon
51154d3954
Merge pull request #5343 from mempool/dependabot/npm_and_yarn/frontend/fortawesome/fontawesome-svg-core-6.6.0
Bump @fortawesome/fontawesome-svg-core from 6.5.1 to 6.6.0 in /frontend
2024-07-17 11:46:09 +09:00
dependabot[bot]
41b4b2eddf
Bump @fortawesome/fontawesome-svg-core from 6.5.1 to 6.6.0 in /frontend
Bumps [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) from 6.5.1 to 6.6.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.1...6.6.0)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-svg-core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-17 02:34:33 +00:00
softsimon
0dff7e82a3
Merge pull request #5341 from mempool/simon/retry-firstseen-onerror
retry firstseen on error
2024-07-15 02:03:20 +09:00
softsimon
9cba7ccf75
retry firstseen on error
fixes #5340
2024-07-14 20:44:34 +09:00
wiz
6177b97bd1
Merge pull request #5337 from mempool/nymkappa/invoice-check-http-code
[btcpay] handle new http code 204 when calling /payments/bitcoin/check
2024-07-14 20:12:23 +09:00
softsimon
f7f1a99486
Merge pull request #5339 from mempool/mononaut/fix-pizza-status
fix pizza status
2024-07-14 17:22:53 +09:00
Mononaut
6b955acf9e
[pizza] fix status icon layout w/ accelerator modal 2024-07-14 04:40:27 +00:00
Mononaut
530610add6
[pizza] fix trackerStage clobbered by ETA change 2024-07-14 04:39:46 +00:00
wiz
428f9369e2
Merge pull request #5338 from jlopp/jloppAgreement 2024-07-14 05:17:02 +09:00
softsimon
a9defb21bb
restore timeline lowercase time 2024-07-14 02:06:34 +09:00
nymkappa
680e9562a0
[btcpay] handle new http code 204 when calling /payments/bitcoin/check api 2024-07-13 21:07:13 +09:00
wiz
66c5c303b3
ops: Set HTTP CORS headers with caching in nginx for services 2024-07-13 20:20:15 +09:00
wiz
5a86c8c83a
ops: Set HTTP CORS headers in nginx for services 2024-07-13 19:56:17 +09:00
softsimon
725e9c0d95
restore timeline lowercase time 2024-07-13 19:36:27 +09:00
softsimon
74e59d6ea5
Merge pull request #5333 from mempool/natsoni/timeline-updates
Acceleration timeline refactor
2024-07-13 18:53:39 +09:00
natsoni
9ac45a6cc3
Clear interval on destroy and remove commented code 2024-07-13 18:45:18 +09:00
wiz
94d537daa6
Merge pull request #5330 from mempool/simon/block-preview-miner-tag-design
Block preview new miner tag design
2024-07-13 18:37:45 +09:00
wiz
30bc026c28
Merge pull request #5331 from mempool/mononaut/accelerated-cpfp
show cpfp toggle on pending accelerations
2024-07-13 18:37:23 +09:00
wiz
21942f8ab1
Merge pull request #5334 from mempool/natsoni/click-on-acceleration-graph
Allow to click on bid boost graph to go on block page
2024-07-13 18:36:47 +09:00
wiz
147f55fec3
Merge pull request #5335 from mempool/natsoni/fix-btc-amount-pool
Fix btc amount in mining dashboard
2024-07-13 18:36:04 +09:00
natsoni
e73f2cbdc1
Fix btc amount mining dashboard 2024-07-13 18:22:45 +09:00
softsimon
009e18b622
adjust lightning dashboard to be in line with new default dashboard 2024-07-13 18:18:56 +09:00
natsoni
5f20803e21
Allow to click on bid boost graph to go on block page 2024-07-13 18:16:41 +09:00
softsimon
832d16cf2d
Merge pull request #5332 from hans-crypto/html-quickfix
Html quickfix
2024-07-13 17:38:10 +09:00
natsoni
5e8b5e75d8
Fix accelerated fee update logic 2024-07-13 17:31:49 +09:00
Hans ❤️ Crypto
c5ef1011d8
Merge branch 'mempool:master' into html-quickfix 2024-07-13 10:23:28 +02:00
softsimon
6a14043641
Merge pull request #5094 from ordpool-space/hans-crypto-patch-1
Remove reference to bisq in unfurler
2024-07-13 17:09:21 +09:00
Mononaut
0f526f24cb
show cpfp toggle on pending accelerations 2024-07-13 07:59:59 +00:00
softsimon
4426bb10a9
Block preview new miner tag design 2024-07-13 16:48:03 +09:00
natsoni
18a7859cca
Merge branch 'master' into natsoni/timeline-updates 2024-07-13 16:25:14 +09:00
natsoni
349d491f7d
Refactor timeline but keep times 2024-07-13 16:21:56 +09:00
wiz
7556424f0b
Merge pull request #5328 from mempool/nymkappa/accel-dashboard-update
[accelerator] also show completed_provisional in accel dashboard
2024-07-13 16:03:16 +09:00
wiz
1d827a9724
Merge pull request #5329 from mempool/nymkappa/external-menu-link
[menu] link can be external
2024-07-13 16:01:10 +09:00
softsimon
f019dd67b3
update i18n from transifex 2024-07-13 14:38:27 +09:00
Jameson Lopp
8b27ac1bbf
add contributor agreement 2024-07-12 17:03:27 -04:00
nymkappa
b91774d50c
[menu] link can be external 2024-07-13 00:41:45 +09:00
nymkappa
22a5cd2de2
[accelerator] also show completed_provisional in accel dashboard 2024-07-12 23:45:41 +09:00
softsimon
e5489277c6
i18n fixes 2024-07-12 23:20:18 +09:00
softsimon
04b6bee8a1
Merge pull request #5327 from mempool/revert-5321-natsoni/fees-on-acc-timeline
Revert "Show accelerated fee rates on timeline"
2024-07-12 19:10:17 +09:00
softsimon
6cd8cf660b
Revert "Show accelerated fee rates on timeline" 2024-07-12 19:10:06 +09:00
wiz
1b6fd29c82
Merge pull request #5325 from mempool/mononaut/subnet-route-restrictions
Restrict accelerator routes to mainnet
2024-07-12 18:59:21 +09:00
softsimon
a31dae67a8
Merge pull request #5326 from mempool/revert-5323-natsoni/timeline-feedback
Revert "Add accelerated word to timeline"
2024-07-12 18:58:20 +09:00
softsimon
76e3053207
Revert "Add accelerated word to timeline" 2024-07-12 18:58:02 +09:00
Mononaut
985b7577e4
Restrict accelerator routes to mainnet 2024-07-12 09:29:21 +00:00
wiz
c748e5cda9
Merge pull request #5323 from mempool/natsoni/timeline-feedback 2024-07-12 18:12:27 +09:00
natsoni
a99f45cd47
Add accelerated word to timeline 2024-07-12 18:00:02 +09:00
softsimon
de1d7839b3
Merge pull request #5321 from mempool/natsoni/fees-on-acc-timeline
Show accelerated fee rates on timeline
2024-07-12 17:24:36 +09:00
natsoni
6aa3e38af2
Fix broken loader in accelerate fee rate line 2024-07-12 17:15:51 +09:00
softsimon
dca7df709b
Merge pull request #5305 from mempool/natsoni/avoid-fetching-full-audit
Avoid fetching full audit on tx page
2024-07-12 17:10:36 +09:00
softsimon
e40e9f7d11
Merge pull request #5319 from mempool/orangesurf/accelerator-api
Update Accelerator API documentation
2024-07-12 17:04:28 +09:00
softsimon
285bb357ba
Merge pull request #5317 from mempool/mononaut/coming-now
[accelerator] remove "coming soon" button state
2024-07-12 16:34:21 +09:00
natsoni
c3b9828d42
Move block audit cache to apiService 2024-07-12 16:00:51 +09:00
softsimon
871e590305
Merge pull request #5322 from mempool/natsoni/fix-accelerations-graph
Fix accelerations graph view more
2024-07-12 15:08:59 +09:00
softsimon
0e5a1abb2b
Merge pull request #5320 from mempool/mononaut/24h-acc-dash
Add 24h and all time views to accelerator dashboard
2024-07-12 15:02:46 +09:00
natsoni
5665c6e6ec
Fix accelerations graph view more 2024-07-12 14:20:05 +09:00
natsoni
06b696f0bb
Show fees rates on acceleration timeline 2024-07-12 01:58:20 +09:00
Mononaut
75ca963bd5
Add 24h and all time views to accelerator dashboard 2024-07-11 16:48:41 +00:00
orangesurf
3a6647eac0
Update Accelerator APIs 2024-07-11 18:12:23 +02:00
Mononaut
9ad6b925c8
[accelerator] remove "coming soon" button state 2024-07-11 12:27:31 +00:00
natsoni
17720b98c1
Avoid briefly displaying wrong accelerated fee rate on tx load 2024-07-11 20:38:38 +09:00
wiz
5bb3e930cc
Merge pull request #5313 from mempool/mononaut/enable-cashapp
[accelerator] enable cashapp
2024-07-11 20:28:43 +09:00
wiz
347bddc974
Merge pull request #5315 from mempool/hunicus/faq-update-accelerate
Update faq
2024-07-11 20:28:16 +09:00
hunicus
4eca8240db
Update accelerator faq mention for public availability 2024-07-11 18:18:13 +09:00
Mononaut
1c135b4c67
[accelerator] enable cashapp 2024-07-11 07:56:15 +00:00
softsimon
f24223ca06
Merge pull request #5312 from mempool/mononaut/fix-enterprise-import
Fix broken enterpriseService import
2024-07-11 15:06:28 +09:00
Mononaut
9748aa05cf
Fix broken enterpriseService import 2024-07-11 05:59:29 +00:00
wiz
1a5613bf65
Merge pull request #5311 from mempool/natsoni/accel-tx-fee-update
Update tx acceleration state on confirmation
2024-07-11 14:50:06 +09:00
wiz
e55e4e378a
Merge pull request #5310 from mempool/mononaut/acc-goal
accelerator goals
2024-07-11 01:21:15 +09:00
Mononaut
927eb98072
accelerator goals 2024-07-10 16:18:13 +00:00
natsoni
99ea1ad0a0
Avoid fetching full audit on tx page 2024-07-11 00:23:46 +09:00
softsimon
fed3012449
prevent goggles from becoming small or move with many filters activated 2024-07-10 23:26:34 +09:00
natsoni
bbff50527b
Don't show Accelerated on tx just mined by non-participating pool 2024-07-10 23:23:40 +09:00
natsoni
4470461a98
Add retry logic to acceleration data fetching on tx page 2024-07-10 23:22:57 +09:00
natsoni
645fd98c30
Show actual accelerated fee rate on newly mined tracked tx 2024-07-10 23:21:53 +09:00
softsimon
10de603ee7
use default link color for top up link 2024-07-10 23:16:28 +09:00
softsimon
685c1c9fb2
Merge pull request #5308 from mempool/revert-5306-mononaut/selected-block-pool
Revert "align block arrows & reposition selected block pool tag"
2024-07-10 21:51:17 +09:00
softsimon
d02a67766d
Revert "align block arrows & reposition selected block pool tag" 2024-07-10 21:51:04 +09:00
wiz
7721fde7b6
Merge pull request #5306 from mempool/mononaut/selected-block-pool
align block arrows & reposition selected block pool tag
2024-07-10 21:33:02 +09:00
wiz
aa10d1233c
Merge pull request #5304 from mempool/natsoni/fix-miner-tag-loading
Possibly fix miner tag loading on tracked transactions
2024-07-10 21:31:56 +09:00
orangesurf
ba79821aac
20240710 Update ToS and PP (#5307) 2024-07-10 21:29:02 +09:00
Mononaut
e054e1d5a3
align block arrows & reposition selected block pool tag 2024-07-10 08:15:29 +00:00
softsimon
565910f9f9
Merge pull request #5303 from mempool/mononaut/oob-8dp
always show out-of-band block fees to 8 decimal places
2024-07-10 13:24:53 +09:00
natsoni
2915be8fd6
Possibly fix miner tag loading on tracked transactions 2024-07-10 12:55:34 +09:00
Mononaut
ff25b8ff1e
always show out-of-band block fees to 8 decimal places 2024-07-10 03:51:51 +00:00
softsimon
2d03ab6346
make arrow position more consistent
fixes #5180
2024-07-10 12:49:16 +09:00
wiz
a530b70f9f
Merge pull request #5302 from mempool/simon/smaller-block-arrow
Smaller block arrow
2024-07-10 01:46:42 +09:00
softsimon
986d71d47f
Smaller block arrow 2024-07-10 01:44:15 +09:00
wiz
79f4720516
Merge pull request #5299 from mempool/mononaut/services-api-config
services api endpoint config
2024-07-09 23:51:53 +09:00
wiz
6135b1db10
Merge pull request #5300 from mempool/simon/pool-search-icons
Icons to pool search
2024-07-09 23:51:05 +09:00
wiz
4269077d4b
Merge pull request #5301 from mempool/natsoni/hide-standard-eta-timeline
Remove standard ETA from timeline
2024-07-09 23:50:47 +09:00
natsoni
da0df70ad2
Acc timeline: More similar color logic with RBF 2024-07-09 22:14:40 +09:00
softsimon
6253d3716d
Icons to pool search 2024-07-09 21:52:19 +09:00
Mononaut
614432426a
call services api directly, make endpoint configurable 2024-07-09 12:23:52 +00:00
softsimon
e51951c3ff
Merge pull request #5298 from svrgnty/master
add seconds to address and transaction views
2024-07-09 21:02:34 +09:00
natsoni
b38bf0f7b6
Hide standard ETA data until proper ETA calculation gets implemented 2024-07-09 20:50:47 +09:00
svrgnty
503de93094 add seconds to address and transaction views 2024-07-09 13:10:48 +02:00
natsoni
58f3169712
Faster, synced chevron animation 2024-07-09 18:48:58 +09:00
natsoni
53da6549e2
Remove unused CSS 2024-07-09 18:48:33 +09:00
wiz
65046c4cb8
Change blockstream/electrs to mempool/electrs in README 2024-07-09 18:03:41 +09:00
Mononaut
9416fd25f4
[accelerator] tidy up chevron animation 2024-07-09 08:58:03 +00:00
Mononaut
adde1a86e4
[accelerator] fast track chevrons animation 2024-07-09 08:57:09 +00:00
wiz
8a96669260
Merge pull request #5296 from mempool/mononaut/disable-services-proxy
[ops] disable node services api proxy on production
2024-07-09 15:38:38 +09:00
Mononaut
92434d41a4
[ops] disable services api proxy on production 2024-07-09 06:27:26 +00:00
softsimon
2c81ebb637
Merge pull request #5294 from mempool/mononaut/acc-fee-graph-fixes
[accelerator] improve rendering of acceleration fee rate graph
2024-07-09 01:01:27 +09:00
wiz
7735da96f2
Merge pull request #5293 from mempool/simon/block-mining-pool-logos
Block pool logos [Test]
2024-07-09 00:10:06 +09:00
softsimon
d914df20ba
updating miner tag on tx page 2024-07-09 00:01:20 +09:00
softsimon
852e2b2fa0
miner tag as texts instead of badges 2024-07-08 23:44:22 +09:00
Mononaut
9396a4bbae
[accelerator] improve rendering of acceleration fee rate graph 2024-07-08 14:36:38 +00:00
wiz
bf95938be8
Merge branch 'master' into simon/block-mining-pool-logos 2024-07-08 23:06:28 +09:00
wiz
8d2e7bef7a
Merge pull request #5287 from mempool/natsoni/acc-timeline-polish
Acceleration timeline polishing
2024-07-08 23:06:09 +09:00
wiz
6f31fb2a08
Merge branch 'master' into natsoni/acc-timeline-polish 2024-07-08 22:54:31 +09:00
wiz
34b5678199
Merge pull request #5292 from mempool/mononaut/high-fee-accelerations
[accelerator] hide modal for transactions near the top of the mempool
2024-07-08 22:53:53 +09:00
softsimon
432496d2a0
move logo into the badge 2024-07-08 22:53:03 +09:00
natsoni
23ee613414
Fix missing 'Mined' tag 2024-07-08 22:49:31 +09:00
softsimon
c391a532de
fix overflow 2024-07-08 22:29:49 +09:00
natsoni
cd56128bb6
Implement feedbacks on acceleration timeline 2024-07-08 22:17:18 +09:00
wiz
07370a8dc7
Merge branch 'master' into natsoni/acc-timeline-polish 2024-07-08 21:58:34 +09:00
natsoni
bf51e3e1c9
Show unaccelerated ETA in acceleration timeline 2024-07-08 21:53:41 +09:00
softsimon
eec6efcc22
Block pool logos 2024-07-08 21:45:57 +09:00
Hans ❤️ Crypto
64dd55b44b
Update block.component.html 2024-07-08 12:40:43 +02:00
Hans ❤️ Crypto
e2d2a8da26
Update block-transactions.component.html 2024-07-08 12:39:49 +02:00
Mononaut
487d82eccf
[accelerator] hide modal for transactions near the top of the mempool 2024-07-08 09:45:49 +00:00
softsimon
c43b567847
extracting i18n 2024-07-08 18:00:55 +09:00
wiz
5d9c846a8f
Merge pull request #5290 from mempool/mononaut/server-side-bids 2024-07-08 17:50:46 +09:00
wiz
cc30536857
Merge pull request #5291 from mempool/simon/acc-error-message-positioning 2024-07-08 17:49:00 +09:00
wiz
8625419417
Merge pull request #5288 from mempool/natsoni/fix-statistics-replication 2024-07-08 17:47:17 +09:00
natsoni
a9341821c5
Remove 211.fra from trusted servers list 2024-07-08 17:36:25 +09:00
softsimon
d074ff1d4c
Fix accelerator error message positioning 2024-07-08 16:38:38 +09:00
Mononaut
9837a69a1a
[accelerator] move bid option calculation to server side 2024-07-08 05:18:42 +00:00
softsimon
32eaf29aaa
fix i18n error rendering 2024-07-08 12:48:29 +09:00
softsimon
5316d1705a
pulling new i18n 2024-07-08 11:42:57 +09:00
softsimon
2fb735c430
adding missing i18n 2024-07-07 23:01:55 +09:00
natsoni
5001d553f3
Quick fix on statistics replication: filter out temporal outsiders 2024-07-07 22:35:34 +09:00
softsimon
663a09ea97
i18n extraction 2024-07-07 18:59:22 +09:00
softsimon
8afdd9a482
Merge pull request #5285 from mempool/mononaut/acc-timeout
[accelerator] error message after timeout
2024-07-07 18:58:28 +09:00
softsimon
fc12733132
Merge pull request #5286 from mempool/mononaut/accelerator-unavailable
[accelerator] handle temporarily unavailable state
2024-07-06 20:00:06 +09:00
Mononaut
0c200e090d
[accelerator] handle temporarily unavailable state 2024-07-06 10:48:37 +00:00
Mononaut
f4a9aeacc7
[accelerator] error message after timeout 2024-07-06 08:32:33 +00:00
softsimon
1a2487b740
Merge pull request #5284 from mempool/mononaut/zero-seconds
handle zero relative time seconds
2024-07-06 14:54:35 +09:00
Mononaut
3425bdd100
handle zero relative time seconds 2024-07-06 05:48:43 +00:00
softsimon
be72a26760
Merge pull request #5283 from mempool/natsoni/fix-liquid-blocks-page
Fix Liquid blocks page
2024-07-06 00:10:01 +09:00
softsimon
77cd07cc93
Merge pull request #5282 from mempool/mononaut/acc-error-msgs
[accelerator] proper error handling
2024-07-06 00:03:54 +09:00
Mononaut
0e122c15e2
[accelerator] handle estimate api fail 2024-07-05 13:53:03 +00:00
natsoni
2ec0e6634b
Fix Liquid blocks page 2024-07-05 22:51:39 +09:00
natsoni
a0992f6091
More accel timeline polish 2024-07-05 22:42:53 +09:00
Mononaut
b8820684c3
[accelerator] proper error handling 2024-07-05 10:42:46 +00:00
natsoni
7c08a104ce
remove rtl for now 2024-07-05 16:48:50 +09:00
natsoni
fb8bd4b194
Add i18n to acceleration timeline 2024-07-05 16:35:00 +09:00
softsimon
20d948c280
updating i18n 2024-07-05 16:32:26 +09:00
natsoni
1710ae0503
Improve step colors in timeline 2024-07-05 16:30:12 +09:00
softsimon
8735b62510
fix hide acceleration button overflow
fixes #5276
2024-07-05 16:22:28 +09:00
softsimon
4cd70941f7
Merge pull request #5277 from mempool/natsoni/acceleration-timeline
Acceleration timeline concept
2024-07-05 15:49:09 +09:00
softsimon
2773c21343
rename RBF history to timeline 2024-07-05 15:47:06 +09:00
wiz
54763fe5d6
Merge pull request #5281 from mempool/mononaut/enable-auto-pools
Rename AUTOMATIC_POOLS_UPDATE, set in prod
2024-07-05 15:43:00 +09:00
Mononaut
99b8a3cb3e
Rename AUTOMATIC_POOLS_UPDATE, set in prod 2024-07-05 05:58:14 +00:00
wiz
d15e2ada42
ops: Set HTTP expires header for warm cache mining APIs 2024-07-05 14:44:56 +09:00
softsimon
70548ed532
Merge pull request #5280 from mempool/natsoni/add-first-seen
Add first seen data to confirmed transactions
2024-07-05 14:23:47 +09:00
natsoni
c85e7b08c3
Add first seen data to confirmed transactions 2024-07-05 11:46:30 +09:00
natsoni
bdd51a0f4b
Merge branch 'master' into natsoni/acceleration-timeline 2024-07-04 20:55:45 +09:00
wiz
769bb6f1be
Merge pull request #5279 from mempool/natsoni/error-message-context
Add more context to error messages
2024-07-04 20:13:37 +09:00
wiz
2fc89f6a35
Merge pull request #5278 from mempool/natsoni/fix-keynav-events
Fix issue on key navigation logic
2024-07-04 20:13:07 +09:00
wiz
f8447c10d5
Merge pull request #5275 from mempool/simon/remove-layer-two
Remove Layer 2 divider
2024-07-04 20:12:36 +09:00
natsoni
3d4316cd44
Add more context to error messages 2024-07-04 19:38:27 +09:00
natsoni
6ed6f2e2cf
Fix key navigation logic in blocks-list and recent-pegs-list 2024-07-04 19:03:17 +09:00
softsimon
2b96c99fb3
Merge pull request #5274 from mempool/mononaut/stale-cpfp
Fix stale cpfp bug
2024-07-04 18:45:53 +09:00
natsoni
6b481d5a07
Add acceleration timeline 2024-07-04 18:22:39 +09:00
softsimon
cc77476756
Merge pull request #5272 from mempool/dependabot/npm_and_yarn/backend/ws-8.18.0
Bump ws from 8.17.1 to 8.18.0 in /backend
2024-07-04 18:01:17 +09:00
softsimon
736833b4f6
Remove Layer 2 divider 2024-07-04 17:58:40 +09:00
Mononaut
c37858fa54
Fix stale cpfp bug 2024-07-04 08:43:05 +00:00
wiz
fb44c1d8a8
Merge pull request #5273 from mempool/simon/hide-accelerator-graphs-non-mainnet
Hide accelerator charts on non-mainnet
2024-07-04 17:40:43 +09:00
natsoni
815dcbd4ce
Retrieve acceleration request time and first seen time 2024-07-04 16:54:03 +09:00
softsimon
3c6e18f198
Hide accelerator charts on non-mainnet
fixes #5265
2024-07-04 11:43:31 +09:00
dependabot[bot]
fa84283a01
Bump ws from 8.17.1 to 8.18.0 in /backend
Bumps [ws](https://github.com/websockets/ws) from 8.17.1 to 8.18.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.17.1...8.18.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-04 02:13:31 +00:00
softsimon
46c4d57367
updating german i18n 2024-07-04 00:49:22 +09:00
softsimon
7dfb3c452f
add some margin left to mining pie chart 2024-07-03 22:42:45 +09:00
softsimon
9be56badee
updating japanese 2024-07-03 22:37:42 +09:00
softsimon
bbdc9e4aa4
fix accelerator logo positioning 2024-07-03 22:02:27 +09:00
softsimon
a3e58d632e
add svg titles 2024-07-03 22:00:54 +09:00
wiz
df7e647523
Merge pull request #5271 from mempool/hunicus/add-logo-tm
Update trademark images
2024-07-03 21:47:41 +09:00
hunicus
c9edfa1826
Add logos to general info text section 2024-07-03 21:42:09 +09:00
hunicus
9ebb98b1b9
Revert horizontal logo change 2024-07-03 21:37:04 +09:00
softsimon
cc5ccd01e2
turn mempool accelerator logo into a link 2024-07-03 21:30:59 +09:00
softsimon
c34be2a334
fix malplaced details button 2024-07-03 21:18:33 +09:00
softsimon
1270a2d67a
Pull from transifex 2024-07-03 21:17:02 +09:00
hunicus
5a4b79b83e
Add accelerator & goggle logos to trademark-policy
Also update horizontal mempool.space logo to correct
font weight.
2024-07-03 21:07:02 +09:00
softsimon
2fc0079530
Accelerator mobile size 2024-07-03 20:50:02 +09:00
wiz
680d8504b6
Merge pull request #5268 from mempool/mononaut/paid-processing
accelerator success screen
2024-07-03 19:47:15 +09:00
wiz
89db3dc70e
Merge pull request #5269 from mempool/simon/mempool-goggles-logo
Update mempool goggles logo
2024-07-03 19:45:53 +09:00
wiz
9d6816132b
Merge pull request #5270 from mempool/simon/accelerate-logo-wip
Accelerate logo
2024-07-03 19:45:25 +09:00
softsimon
f496fc9653
Accelerate logo 2024-07-03 19:30:32 +09:00
softsimon
9318aa9a6a
Update mempool goggles logo 2024-07-03 19:17:18 +09:00
Mononaut
db3db49fbc
[accelerator] success confirmation screen 2024-07-03 18:16:50 +09:00
Mononaut
75ad6a2335
[accelerator] remove green success banner 2024-07-03 18:15:57 +09:00
softsimon
ec209bb618
new eta i18n key 2024-07-03 17:32:22 +09:00
softsimon
2b21ddd0b2
Merge pull request #5263 from mempool/simon/new-eta-label
New ETA label
2024-07-03 17:31:35 +09:00
softsimon
d0358f1551
Merge pull request #5262 from mempool/simon/accelerator-default-hide
Only default show accelerator on mempool space
2024-07-03 17:31:26 +09:00
softsimon
6ce1970ef4
Merge pull request #5260 from mempool/simon/tx-page-ui-jump
Fix accelerator ui jumps
2024-07-03 17:31:07 +09:00
softsimon
6597854b14
Fix accelerator ui jumps 2024-07-03 17:30:31 +09:00
softsimon
69cd054a97
Merge pull request #5267 from mempool/mononaut/fix-ln-invoice-flicker
fix ln invoice flicker
2024-07-03 17:29:43 +09:00
softsimon
0ea22961e8
fix i18n duplicate 2024-07-03 17:28:00 +09:00
Mononaut
1ce72e23a3
[accelerator] fix ln invoice flicker 2024-07-03 17:19:22 +09:00
softsimon
140c371c51
fix duplicate i18n 2024-07-03 16:24:45 +09:00
softsimon
39e55bb3f8
New ETA label 2024-07-03 15:59:54 +09:00
softsimon
5a9dde0807
Only default show accelerator on mempool space 2024-07-03 12:27:29 +09:00
softsimon
ae8b6043b2
Merge pull request #5261 from mempool/dependabot/npm_and_yarn/frontend/esbuild-0.23.0
Bump esbuild from 0.22.0 to 0.23.0 in /frontend
2024-07-03 11:54:56 +09:00
dependabot[bot]
b49618fbed
Bump esbuild from 0.22.0 to 0.23.0 in /frontend
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 02:29:29 +00:00
softsimon
46e8f6137c
Merge pull request #5259 from mempool/mononaut/fix-auth-refresh
fix auth refresh race condition
2024-07-02 22:11:34 +09:00
Mononaut
ec2ab174de
fix auth refresh race condition 2024-07-02 13:08:20 +00:00
wiz
4e18ff3329
Merge pull request #5258 from mempool/nymkappa/btcpayid
[btcpay] temp fix qr code accel
2024-07-02 22:04:24 +09:00
nymkappa
90a8ff47b7
[btcpay] temp fix qr code accel 2024-07-02 22:03:44 +09:00
wiz
c4f5aa1874
Merge pull request #5253 from mempool/natsoni/fix-accelerator-dashboard
Fix key navigation bug in accelerator dashboard
2024-07-02 21:43:36 +09:00
wiz
3c106a3c8f
Merge pull request #5254 from mempool/nymkappa/hide-accel-menu
[services] hide accelerator from user menu if not whitelisted
2024-07-02 21:43:26 +09:00
wiz
ec033a9eaf
Merge pull request #5257 from mempool/mononaut/more-accelerator-polish
more accelerator polish
2024-07-02 21:43:02 +09:00
softsimon
6b0496029c
Filter arrow key strokes 2024-07-02 21:42:11 +09:00
Mononaut
642bf86423
[accelerator] streamline payment method logic 2024-07-02 12:32:09 +00:00
Mononaut
3e07d6b684
[accelerator] disable for txs not in mempool 2024-07-02 12:32:08 +00:00
softsimon
3a94687548
Merge pull request #5248 from mempool/nymkappa/fix-btcpay-invoice-amount
[btcpay] cleanup invoice api
2024-07-02 21:32:01 +09:00
softsimon
8028d80ab8
Merge pull request #5256 from mempool/nymkappa/more-auth-fix
[auth] more auth fixes
2024-07-02 21:31:36 +09:00
softsimon
453bcffbbc
mandarin corrections 2024-07-02 21:23:43 +09:00
nymkappa
c6b2db9282
[auth] more auth fixes 2024-07-02 21:20:18 +09:00
nymkappa
00fb261124
[services] hide accelerator from user menu if not whitelisted 2024-07-02 20:43:37 +09:00
nymkappa
11113041bb
Merge branch 'master' into nymkappa/fix-btcpay-invoice-amount 2024-07-02 20:34:42 +09:00
softsimon
63cb6c3804
Merge pull request #5250 from mempool/nymkappa/accel-checkout-clear-error
[accelerator] clear error state when auth state changes
2024-07-02 18:26:05 +09:00
softsimon
2ff3d00bd7
Merge pull request #5249 from mempool/nymkappa/fix-auth-issue
[auth] catch auth error and return null
2024-07-02 18:23:12 +09:00
softsimon
f0a63aaba3
Merge pull request #5251 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.13.0
Bump cypress from 13.12.0 to 13.13.0 in /frontend
2024-07-02 18:22:05 +09:00
softsimon
44ef81fde0
Swedish, Chinese etc 2024-07-02 17:29:08 +09:00
softsimon
16caae8123
i18n fix 2024-07-02 17:11:50 +09:00
softsimon
5a897e56ab
i18n fix 2024-07-02 17:05:56 +09:00
softsimon
5715915850
add missing i18n 2024-07-02 16:46:49 +09:00
softsimon
53109aa50a
fixing i18n 2024-07-02 15:54:49 +09:00
softsimon
d52ca35cc0
i18n fixes 2024-07-02 15:32:03 +09:00
softsimon
d00f4245f8
i18n fixes 2024-07-02 15:15:59 +09:00
natsoni
4723ca88ec
Fix key navigation bug in accelerator dashboard 2024-07-02 15:04:54 +09:00
softsimon
e5d23e8076
Merge pull request #5252 from mempool/natsoni/fix-bech32
Fix bech32 regex and adapt tests
2024-07-02 14:33:53 +09:00
softsimon
2827dcd0ba
i18n fixes 2024-07-02 14:02:16 +09:00
natsoni
7d7f9b1665
Fix bech32 regex and adapt tests 2024-07-02 13:09:05 +09:00
dependabot[bot]
2eb9108046
Bump cypress from 13.12.0 to 13.13.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.12.0 to 13.13.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.12.0...v13.13.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 02:53:56 +00:00
nymkappa
b198528592
[accelerator] clear error state when auth state changes 2024-07-02 11:21:30 +09:00
nymkappa
7dcd952a40
[btcpay] cleanup invoice api 2024-07-02 11:12:20 +09:00
nymkappa
89a3b1c577
[auth] catch auth error and return null 2024-07-02 10:37:40 +09:00
softsimon
3dbbc83077
Updating i18n strings 2024-07-01 22:54:24 +09:00
softsimon
011a854a84
Merge pull request #5244 from mempool/nymkappa/refresh-checkout-state-logout
[accelerator] refresh checkout state logout
2024-07-01 19:08:07 +09:00
softsimon
6261f83e5e
Merge pull request #5246 from mempool/nymkappa/update-payment-method-handling
[accelerator] update payment method handling
2024-07-01 19:06:26 +09:00
softsimon
c4b45180dd
Merge pull request #5241 from vostrnad/baremultisig-labels
Fix missing bare multisig labels
2024-07-01 19:06:07 +09:00
nymkappa
69b40cf073
[accelerator] add new error message payment_method_not_allowed_out_of_bound 2024-07-01 18:30:40 +09:00
nymkappa
9ef79a268d
[accelerator] update payment method handling 2024-07-01 18:18:13 +09:00
softsimon
75c9e15e16
Merge branch 'master' into nymkappa/refresh-checkout-state-logout 2024-07-01 18:00:30 +09:00
softsimon
dfede7fe25
Merge pull request #5243 from mempool/mononaut/hybrid-accelerator-polish
Accelerator polish
2024-07-01 18:00:08 +09:00
softsimon
a86709d7b0
Merge pull request #5245 from mempool/mononaut/no-replaceable-inputs
don't accelerate txs with replaceable inputs
2024-07-01 17:07:42 +09:00
Mononaut
396eee3555
[accelerator] hide accelerate button for ineligible txs 2024-07-01 07:42:57 +00:00
Mononaut
5067c88642
[accelerator] check for high sigops 2024-07-01 07:39:28 +00:00
Mononaut
e35ac6e1a2
[accelerator] check for input replaceability 2024-07-01 07:28:25 +00:00
nymkappa
5b93c8e875
[accelerator] refresh auth state when logging out 2024-07-01 16:21:47 +09:00
Mononaut
c71a0afe1f
[accelerator] remember hide accelerator preference 2024-07-01 06:44:03 +00:00
nymkappa
2d12d2e5ef
[logout] fix redirection 2024-07-01 15:30:39 +09:00
Mononaut
23fa28567d
[accelerator] toggle button alignment 2024-07-01 06:19:29 +00:00
Mononaut
a624e82630
[accelerator] restore "wait" radio on pizza tracker 2024-07-01 06:19:11 +00:00
Mononaut
da4c2f5307
[accelerator] remove safety catch, always show checkout 2024-07-01 05:45:32 +00:00
nymkappa
b91f195955
[footer] refresh auth state in real time 2024-07-01 14:33:19 +09:00
Mononaut
69b346ab00
move CPFP panel above accelerator 2024-07-01 05:24:21 +00:00
Vojtěch Strnad
1c89a1a44e Fix missing bare multisig labels 2024-07-01 07:21:37 +02:00
Mononaut
3088befbf5
remove btcpay.svg 2024-07-01 05:18:19 +00:00
softsimon
7ed35b955d
Merge pull request #5239 from mempool/dependabot/docker/docker/frontend/node-20.15.0-buster-slim
Bump node from 20.14.0-buster-slim to 20.15.0-buster-slim in /docker/frontend
2024-07-01 12:59:19 +09:00
softsimon
e7e4b63fbc
Merge pull request #5238 from mempool/dependabot/docker/docker/backend/node-20.15.0-buster-slim
Bump node from 20.14.0-buster-slim to 20.15.0-buster-slim in /docker/backend
2024-07-01 12:59:08 +09:00
softsimon
723ac4cece
Merge pull request #5240 from mempool/dependabot/npm_and_yarn/frontend/esbuild-0.22.0
Bump esbuild from 0.21.1 to 0.22.0 in /frontend
2024-07-01 12:58:49 +09:00
dependabot[bot]
1a91f2b0a3
Bump esbuild from 0.21.1 to 0.22.0 in /frontend
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.21.1 to 0.22.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.1...v0.22.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 02:49:42 +00:00
softsimon
300bfd225b
Merge pull request #5207 from mempool/mononaut/pool-reindexing
Pool reindexing
2024-07-01 11:32:03 +09:00
mononaut
cf09669902
Merge branch 'master' into mononaut/pool-reindexing 2024-07-01 11:25:02 +09:00
dependabot[bot]
d5525ae324
Bump node in /docker/frontend
Bumps node from 20.14.0-buster-slim to 20.15.0-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 02:16:38 +00:00
dependabot[bot]
ff8b0a8d80
Bump node in /docker/backend
Bumps node from 20.14.0-buster-slim to 20.15.0-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 02:11:21 +00:00
softsimon
8fc5fdbde6
Merge pull request #5237 from vostrnad/p2tr-without-witness
Fix errors caused by P2TR inputs without witness data
2024-07-01 10:48:16 +09:00
Mononaut
27c70bd919
Also fix backend errors caused by P2TR inputs without witness data 2024-07-01 01:22:10 +00:00
Vojtěch Strnad
7432e6e29b Fix errors caused by P2TR inputs without witness data 2024-07-01 02:02:53 +02:00
wiz
a9c3637c7f
Merge pull request #5233 from mempool/mononaut/hybrid-acceleration-checkout
hybrid acceleration checkout
2024-07-01 00:27:53 +09:00
softsimon
de95dd9c77
removing margin causing table jump 2024-06-30 22:20:44 +09:00
Mononaut
da1e5c515e
[accelerator] use invoice amount 2024-06-30 12:44:32 +00:00
Mononaut
ce879152fd
[accelerator] don't scroll to btcpay invoice 2024-06-30 12:43:38 +00:00
Mononaut
d76490df0c
[accelerator] fresh invoice after changing bid 2024-06-30 12:43:31 +00:00
Mononaut
a80372f335
[accelerator] play sound on invoice paid 2024-06-30 12:43:26 +00:00
softsimon
102625b3ea
Merge pull request #5236 from mempool/mononaut/fix-weird-dust
Fix dust limit for undefined witness program outputs
2024-06-30 18:34:42 +09:00
softsimon
eb3c248acd
Add test transaction 2024-06-30 18:34:22 +09:00
Mononaut
9140bcb408
[accelerator] fix liquid 2024-06-30 08:58:39 +00:00
Mononaut
35d0e7fae7
[accelerator] rerefactor bitcoin-payment component 2024-06-30 08:39:32 +00:00
Mononaut
f114a8ca75
[accelerator] refactor bitcoin-payment component 2024-06-30 08:15:20 +00:00
Mononaut
0b663c1a77
[accelerator] fix loading spinner alignment 2024-06-30 07:41:25 +00:00
Mononaut
c494207469
[accelerator] match loading height to actual QR 2024-06-30 07:38:25 +00:00
Mononaut
ce31d0512c
[accelerator] improve btcpay QR codes 2024-06-30 07:32:04 +00:00
Mononaut
3ecc8ae8cf
[accelerator] ln qr 2024-06-30 07:17:15 +00:00
Mononaut
1e820a0fc8
[accelerator] soft enforce referrer 2024-06-30 06:56:55 +00:00
Mononaut
e3abdf4b4f
[accelerator] revert titles 2024-06-30 06:56:55 +00:00
Mononaut
caf7011df5
[accelerator] checkbox error hint 2024-06-30 06:56:54 +00:00
softsimon
7caad9fca9
Merge pull request #5234 from mempool/nymkappa/fix-bitcoin-rounding
[btcpay] fix displayed amount
2024-06-30 14:54:26 +09:00
Mononaut
84e1ac31c2
[accelerator] fix stray margin 2024-06-30 05:51:13 +00:00
Mononaut
3b4ac3b6b7
[accelerator] less muted text 2024-06-30 05:42:32 +00:00
Mononaut
cfe5da2276
[accelerator] streamline flow 2024-06-30 05:37:51 +00:00
Mononaut
110b7a934c
[accelerator] buttons 2024-06-30 04:57:00 +00:00
Mononaut
d059c5ca27
[accelerator] slim summary screen 2024-06-30 03:43:28 +00:00
Mononaut
bf37affe47
[accelerator] fiat limits 2024-06-30 03:23:09 +00:00
Mononaut
2798b43913
[accelerator] adjust h1 labels 2024-06-30 02:40:58 +00:00
Mononaut
425edb9b9f
Fix dust limit for undefined witness program outputs 2024-06-30 02:06:50 +00:00
Mononaut
f68c8cc621
[accelerator] restore scroll events, remove eta button 2024-06-30 01:46:11 +00:00
Mononaut
c5fc476834
[accelerator] no autoscroll to checkout 2024-06-29 09:21:39 +00:00
Mononaut
776404dbde
[accelerator] Pro for everyone 2024-06-29 09:17:08 +00:00
nymkappa
1067131120
[btcpay] fix displayed amount 2024-06-29 16:47:38 +09:00
Mononaut
6cf753ddaf
[accelerator] fix other missing button 2024-06-29 07:46:24 +00:00
Mononaut
277f8f7bfd
[accelerator] restore missing sparkles button 2024-06-29 07:45:10 +00:00
Mononaut
c249da7901
[accelerator] pizza tracker waitlisted & preview-only screens 2024-06-29 07:13:43 +00:00
Mononaut
3720d67666
[accelerator] waitlisted & preview-only screens 2024-06-29 07:04:08 +00:00
Mononaut
84d4eaa932
remove stray console.log 2024-06-29 06:08:58 +00:00
Mononaut
d62300ccff
[accelerator] add acceleration paid screen, fix end state 2024-06-29 06:06:11 +00:00
Mononaut
48bdae4e78
[accelerator] hide pizza tracker CTA when irrelevant 2024-06-29 04:11:02 +00:00
Mononaut
193c41cb81
Fix pizza tracker loading state 2024-06-29 04:10:47 +00:00
Mononaut
5872b2c46b
[accelerator] fix success/failure messages 2024-06-28 13:46:02 +00:00
Mononaut
e158c10688
[accelerator] fix duplicate invoice request 2024-06-28 13:46:02 +00:00
wiz
b4e46c3ff8
Merge branch 'master' into mononaut/hybrid-acceleration-checkout 2024-06-28 21:26:23 +09:00
nymkappa
254d962558
[accelerator] add new error message 2024-06-28 07:06:02 +00:00
Mononaut
c75afe20cd
More acceleration checkout refactoring 2024-06-28 07:05:57 +00:00
wiz
98e9d1a6c3
Merge pull request #5227 from mempool/hunicus/about-juggling
Juggle community integration listings
2024-06-28 15:45:39 +09:00
hunicus
c4577b8c09
Merge branch 'master' into hunicus/about-juggling 2024-06-28 15:36:00 +09:00
hunicus
95c4da51ed
Juggle community integration listings
Also add back bitcoin-s and remove mercury.

Signed-off-by: hunicus <93150691+hunicus@users.noreply.github.com>
2024-06-28 15:30:43 +09:00
softsimon
2e336d7ad1
Merge pull request #5231 from mempool/hunicus/about-foundry-logo
Update foundry logo on about page
2024-06-28 14:07:48 +09:00
hunicus
903ff1ea66
Update foundry logo on about page 2024-06-28 13:49:13 +09:00
softsimon
f02d8e0626
Merge pull request #5230 from mempool/simon/docs-root-network-support
Docs root network support
2024-06-28 11:43:05 +09:00
softsimon
ea04ea0048
Docs root network support 2024-06-28 11:28:41 +09:00
Mononaut
473da82caa
acceleration estimate payment methods field 2024-06-27 13:09:43 +00:00
Mononaut
415ad3de70
Merge simple & advanced acceleration checkout components 2024-06-27 13:09:39 +00:00
softsimon
d91c6bceed
Merge pull request #5226 from mempool/natsoni/fix-accel-pie-chart
Fix logic for pool pie chart position
2024-06-27 21:48:04 +09:00
softsimon
aa5355e93d
Merge pull request #5229 from rishkwal/rishkwal/fix-tx-base-route
Redirect user to `/` when user goes to `/tx` without any transaction `id`
2024-06-27 21:44:27 +09:00
softsimon
9672928da9
Adding missing TESTNET4_ENABLED to docker build 2024-06-27 19:19:28 +09:00
Rishabh
d189e70817
fix: redirect /tx/ routes to / 2024-06-27 15:11:00 +05:30
Mononaut
d7acd389bf
fix scrolljacking by #accelerate fragment 2024-06-27 09:07:24 +00:00
Mononaut
9fe44bd6ba
more simple acceleration UI adjustments 2024-06-27 09:07:24 +00:00
Mononaut
4445fe408b
Add simple mode checkout to main transaction page 2024-06-27 09:07:22 +00:00
nymkappa
790e76ab26
[accelerator] add payment methods assets 2024-06-27 09:05:50 +00:00
nymkappa
66a88b8422
[accelerator] accelerate with lightning 2024-06-27 09:05:49 +00:00
natsoni
bb91f9142e
Fix accel pool pie chart placement 2024-06-27 17:50:45 +09:00
softsimon
66f90cb0bd
Merge pull request #5225 from mempool/natsoni/fix-accel-preview-displaying
Fix acceleration preview showing with fragment on accel txs
2024-06-27 16:50:31 +09:00
softsimon
f1572f0038
Merge pull request #5222 from mempool/mononaut/partition-pool-pie
Show more detail in acceleration pools pie chart
2024-06-27 16:37:28 +09:00
natsoni
c3963d6a0d
Fix acceleration preview showing with fragment on accel txs 2024-06-27 16:32:20 +09:00
softsimon
1dd86df3e0
Merge pull request #5224 from mempool/hunicus/about-coldcard
Replace bitcoin-s with coldcard on about page
2024-06-27 16:02:47 +09:00
softsimon
c8d443bea7
Merge pull request #5216 from mempool/natsoni/align-acceleration-pie-chart
Align "Accelerated to / by" fields on mobile
2024-06-27 15:44:03 +09:00
hunicus
575fc737ca
Replace bitcoin-s with coldcard on about page 2024-06-27 15:34:53 +09:00
Mononaut
ebd4408b8d
Adjust acceleration pool pie labels 2024-06-27 06:19:43 +00:00
Mononaut
d6d8c85419
Show more detail in acceleration pools pie chart 2024-06-27 03:40:03 +00:00
softsimon
fbb409e17b
Merge pull request #5219 from mempool/simon/local-accelerator-estimates
Show accelerator estimates on local instances
2024-06-27 11:19:07 +09:00
softsimon
b6d03953b9
Show accelerator estimates on local instances 2024-06-26 21:42:30 +09:00
natsoni
d45104f7c9
Align acceleration pie chart 2024-06-26 18:03:14 +09:00
softsimon
d175c34e5b
Merge pull request #5211 from mempool/simon/simpler-advanced-acceleration
Simplify advanced acceleration
2024-06-26 17:42:11 +09:00
softsimon
2bf2440e3a
Merge pull request #5215 from mempool/mononaut/acceleration-preview-layout-tweaks
Minor style & layout tweaks for the acceleration preview
2024-06-26 17:41:33 +09:00
Mononaut
124c0acbe1
Minor layout tweaks for the acceleration preview 2024-06-26 08:18:39 +00:00
softsimon
69c5a2fb5a
Merge pull request #5214 from mempool/natsoni/rbf-list-loading
Show loading indicator on toggle in RBF list
2024-06-26 17:10:14 +09:00
softsimon
c4f08e0d41
Merge pull request #5213 from mempool/natsoni/accelerations-table-fixes
Add page in URL to accelerations table
2024-06-26 17:08:49 +09:00
natsoni
87ee14f189
Show loading indicator on toggle in RBF list 2024-06-26 16:12:21 +09:00
natsoni
122b4b05c4
Add pagination in URL to accelerations table 2024-06-26 15:37:39 +09:00
natsoni
09f7dddf14
Use url parameter instead of query parameter 2024-06-26 15:25:03 +09:00
softsimon
f7ad45939c
Hide surcharge row if zero 2024-06-26 15:08:00 +09:00
natsoni
7b6246a035
Fix loading state in blocks table issue 2024-06-26 14:20:49 +09:00
softsimon
a8d2138404
Simplify advanced acceleration 2024-06-26 12:30:34 +09:00
softsimon
0b608c96dd
Merge pull request #5212 from mempool/simon/fix-eta-loading-error
Fix ETA loading error
2024-06-26 12:29:22 +09:00
softsimon
a0402b92f9
Fix ETA loading error 2024-06-26 12:12:49 +09:00
softsimon
14e05b43c7
Merge pull request #5210 from mempool/natsoni/btc-unit-on-pool-page
Force amounts to BTC unit in pool page
2024-06-26 11:46:32 +09:00
natsoni
fc8f8abc7e
Add SEO title to Accelerations page 2024-06-26 11:42:22 +09:00
natsoni
a1f1b09c55
Fix loading indicator when changing page 2024-06-26 11:13:32 +09:00
natsoni
ad2d7af084
Force amounts to BTC unit in pool page 2024-06-26 10:48:17 +09:00
softsimon
9d3044efae
Merge pull request #5199 from mempool/mononaut/tracker-acceleration-eta
Add projected acceleration ETA to tracker page
2024-06-25 17:15:41 +09:00
wiz
bac21afa54
Merge pull request #5203 from mempool/simon/address-page-romanz-support
Romanz support for address page
2024-06-25 16:54:37 +09:00
softsimon
f98bb675e7
Merge pull request #5209 from mempool/mononaut/fix-type-error
Fix coinbase address type error
2024-06-25 11:25:29 +09:00
Mononaut
3e057f2db1
Fix coinbase address type error 2024-06-25 02:20:44 +00:00
softsimon
4fbdf92f0c
Merge pull request #5206 from mempool/simon/address-prefix-fixes
Fix address prefix for non esplora backend
2024-06-25 10:21:50 +09:00
softsimon
fd60940a08
Merge pull request #5167 from mempool/dependabot/npm_and_yarn/unfurler/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3 in /unfurler
2024-06-24 21:21:34 +09:00
Mononaut
c54bc5a4bb
Clear redis block cache on pool update 2024-06-24 12:07:52 +00:00
Mononaut
04559e7b98
Update README.md with new mining pool update behavior 2024-06-24 12:07:51 +00:00
Mononaut
255919f03f
Update pool instead of deleting blocks 2024-06-24 12:07:51 +00:00
softsimon
b92b5cdd87
Merge pull request #5205 from mempool/mononaut/index-cb-addresses
Add coinbase_addresses to extended blocks & table
2024-06-24 20:59:38 +09:00
Mononaut
03036bf59d
coinbase_addresses fixes 2024-06-24 11:51:12 +00:00
softsimon
563def45d8
Fix address prefix for non esplora backend 2024-06-24 18:27:30 +09:00
wiz
e4c9b67239
Merge pull request #5204 from mempool/simon/fix-tx-position-crash
Fix tx position frontend error
2024-06-24 17:26:34 +09:00
softsimon
38bf056b6d
Merge pull request #5187 from mempool/simon/websocket-reconnect-root-instance
Prevent websocket reconnect on custom root instances
2024-06-24 17:15:35 +09:00
softsimon
91ddf7ea98
Fix tx position crash 2024-06-24 17:10:33 +09:00
softsimon
a9a1ff68ab
Romanz support for address page 2024-06-24 16:25:29 +09:00
softsimon
dfc61f3991
Merge pull request #5202 from mempool/natsoni/round-24h-hashrate
Round 24h pools hashrate
2024-06-24 16:06:10 +09:00
Mononaut
f9d03b1bb4
Add coinbase_addresses to extended blocks & table 2024-06-24 06:15:01 +00:00
softsimon
868dac91c7
Merge pull request #5197 from mempool/simon/sha256-secure-context-workaround
Sha256 P2PK secure context workaround
2024-06-24 13:22:55 +09:00
natsoni
3c689e34b8
Round 24h pools hashrate 2024-06-24 13:22:47 +09:00
softsimon
835f16aab6
Merge pull request #5198 from mempool/natsoni/fix-confirmed-after
Fix "Confirmed after" transaction field
2024-06-24 11:53:50 +09:00
softsimon
2c2a6ee872
Merge pull request #5200 from mempool/mononaut/no-trailing-spaces
no trailing spaces
2024-06-24 11:19:40 +09:00
Mononaut
7d0720d55f
no trailing spaces 2024-06-24 02:16:59 +00:00
natsoni
c4dec53387
Fix confirmed after 55 years 2024-06-24 11:06:33 +09:00
Mononaut
517e82ec8b
Add projected acceleration ETA to tracker page 2024-06-24 02:06:22 +00:00
softsimon
0c72e1b6ed
Merge pull request #5195 from mempool/natsoni/hide-usd-on-non-mainnet
Address balance graph: hide usd on non-mainnet networks
2024-06-24 10:34:30 +09:00
softsimon
5d1877a275
Sha256 P2PK secure context workaround 2024-06-24 09:31:02 +09:00
natsoni
8a43ed1a61
Address balance graph: hide usd on non-mainnet networks 2024-06-23 22:35:00 +09:00
softsimon
61c9debcca
Merge pull request #5007 from mempool/nymkappa/prepaid-update-price
[accelerator] change default bid prepaid
2024-06-23 18:51:28 +09:00
wiz
172fb0bf41
Merge pull request #5178 from mempool/mononaut/fix-reorg-health-check
Recover from esplora failover after a reorg to lower height
2024-06-23 18:35:19 +09:00
wiz
eedfbacf01
Merge pull request #5147 from mempool/mononaut/accelerate-preview-hashrate-pie
Acceleration preview hashrate pie chart
2024-06-23 18:34:44 +09:00
Mononaut
396b7eb3d3
Add expected hashrate pie chart & eta to acceleration preview 2024-06-23 09:32:37 +00:00
Mononaut
05724b9d58
Integrate multi-pool ETA into pizza tracker 2024-06-23 09:31:16 +00:00
Mononaut
f67ae10684
Integrate multi-pool ETA into transaction page 2024-06-23 09:30:02 +00:00
Mononaut
e11ce14f81
hashrate is a number not a string 2024-06-23 09:30:02 +00:00
Mononaut
833418514e
Multi-pool ETA calculation 2024-06-23 09:30:01 +00:00
softsimon
6277813414
Merge pull request #5193 from mempool/mononaut/address-table-wrapping
Refactor address table to improve cell wrapping
2024-06-23 18:21:24 +09:00
softsimon
6936b97ba6
Merge pull request #5194 from mempool/simon/fix-stripped-mempool-transactions
Fix mempool transactions being stripped
2024-06-23 17:58:46 +09:00
softsimon
4dfabaf165
Fix mempool transactions being stripped
fixes #5150
2024-06-23 17:50:13 +09:00
softsimon
06f60df4cf
Fix tx page crash when accelerationHistory errors 2024-06-23 15:38:53 +09:00
Mononaut
29a8f6a09e
Refactor address table to improve cell wrapping 2024-06-23 03:17:33 +00:00
wiz
9394572ec3
Merge pull request #5190 from mempool/simon/address-page-updates
Address page ux updates
2024-06-22 17:53:00 +09:00
softsimon
8e521a2376
Add "confirmed" 2024-06-22 17:52:31 +09:00
softsimon
b227767fee
Address page ux updates 2024-06-22 17:34:27 +09:00
natsoni
1c1c93abfc
Fix websocket network change handling 2024-06-22 17:28:08 +09:00
softsimon
ec7c691044
Merge pull request #5189 from mempool/simon/twitter-to-x
Twitter -> X
2024-06-22 16:23:15 +09:00
softsimon
92e6df1295
Twitter -> X 2024-06-22 16:21:55 +09:00
softsimon
8b0015b3ff
Merge pull request #5153 from mempool/natsoni/address-history-chart-usd
Add USD to address balance history chart
2024-06-22 16:11:56 +09:00
softsimon
19ea077fe5
Merge branch 'master' into natsoni/address-history-chart-usd 2024-06-22 15:54:31 +09:00
softsimon
16502332fd
Merge pull request #5188 from mempool/natsoni/address-page-skeleton
Adapt address page skeleton
2024-06-22 15:53:37 +09:00
natsoni
7f2987f250
address page: adapt skeletons 2024-06-22 15:27:29 +09:00
natsoni
25e9741fc2
Set same start time for BTC and USD lines 2024-06-22 15:01:42 +09:00
softsimon
5be66f0b05
Merge pull request #5184 from mempool/mononaut/incoming-tx-scale
Always show clearing rate line on incoming tx chart
2024-06-22 14:57:31 +09:00
softsimon
a517c6c711
Prevent websocket reconnect on custom root instances 2024-06-22 14:55:59 +09:00
natsoni
43f35837da
Merge branch 'master' into natsoni/address-history-chart-usd 2024-06-22 14:36:56 +09:00
softsimon
f9101b381b
Merge pull request #5186 from mempool/mononaut/fix-hardcoded-median-weight
Fix hardcoded median weight units in calcEffectiveFeeStatistics
2024-06-22 14:18:58 +09:00
softsimon
6b84dc2be4
Merge branch 'master' into mononaut/fix-hardcoded-median-weight 2024-06-22 14:13:41 +09:00
softsimon
8082e1d1cf
Merge pull request #5185 from mempool/mononaut/rust-gbt-block-size
configurable block size & count in rust gbt
2024-06-22 14:11:44 +09:00
Mononaut
36bc1db195
Fix hardcoded median weight units in calcEffectiveFeeStatistics 2024-06-22 04:38:06 +00:00
Mononaut
fa9a8bdba8
rust gbt restore 4kWU reserve 2024-06-22 04:30:36 +00:00
Mononaut
b44b790e28
configurable block size & count in rust gbt 2024-06-22 04:10:32 +00:00
softsimon
cf8d179925
Merge pull request #5176 from mempool/mononaut/fix-monitoring-layout
Fix monitoring table layout & text wrapping
2024-06-22 12:58:53 +09:00
softsimon
32db01d353
Merge pull request #5183 from mempool/simon/fix-invalid-json-response-missing-da
Missing difficulty adjustment causes invalid json response
2024-06-22 12:53:37 +09:00
Mononaut
7c806b4b23
Always show clearing rate line on incoming tx chart 2024-06-22 01:58:46 +00:00
softsimon
c581be0e97
Missing da causes invalid json 2024-06-22 10:52:01 +09:00
softsimon
e1e4e79b68
Merge pull request #5182 from mempool/simon/goggles-unit-tests
Unit tests: nonstandard
2024-06-22 09:54:37 +09:00
softsimon
246ca593bb
Merge branch 'master' into simon/goggles-unit-tests 2024-06-22 09:43:35 +09:00
softsimon
136af78147
Merge pull request #5160 from mempool/mononaut/fix-nonstandard-label-bug
Fix incorrect non-standard label on reserved segwit output types
2024-06-22 09:32:06 +09:00
softsimon
da1ad1c316
Unit tests: nonstandard 2024-06-22 09:31:24 +09:00
softsimon
2e893e0aea
adding missing }, to proxy conf 2024-06-22 08:21:56 +09:00
softsimon
b41382dfee
Local dev accelerations proxy 2024-06-22 08:20:36 +09:00
softsimon
8d66374374
Merge pull request #5156 from mempool/simon/default-frontend-network-setting
Root frontend network setting
2024-06-22 07:56:13 +09:00
softsimon
c00d2f3763
Hack networkMatches 2024-06-21 19:32:25 +09:00
softsimon
e7cba13704
Add new frontend configs to docker 2024-06-21 19:09:35 +09:00
softsimon
55598e7974
Remove space between plus and amount 2024-06-21 18:38:37 +09:00
softsimon
bf81cc5ba9
Merge pull request #5159 from mempool/mononaut/handle-services-failures
Handle services backend failures in block component
2024-06-21 13:44:39 +09:00
Mononaut
c5b12e3bc3
split overview subscriptions in block component 2024-06-21 11:57:00 +09:00
softsimon
762c5aa718
Merge pull request #5169 from mempool/mononaut/core-gettxsforblock
Implement $getTxsForBlock for Core backends
2024-06-21 10:10:45 +09:00
softsimon
e95e64a443
Merge branch 'master' into mononaut/core-gettxsforblock 2024-06-21 08:03:34 +09:00
softsimon
d10fdaad46
Merge pull request #5177 from mempool/simon/deprecate-unique-pool-id
Deprecate pool_unique_id, fixing accelerations sync
2024-06-21 03:31:13 +09:00
Mononaut
5b554852bb
Recover from esplora failover after a reorg to lower height 2024-06-20 14:29:35 +00:00
softsimon
ff8fb3b24f
Merge pull request #5151 from mempool/mononaut/address-redesign-phase-1
Address page redesign phase 1
2024-06-20 17:51:48 +09:00
softsimon
1219526e2d
Disabling liquid test and fixing liquid overflow 2024-06-20 17:43:54 +09:00
softsimon
85006a5bec
some -> includes 2024-06-20 14:36:58 +09:00
softsimon
82e2f46eba
Merge pull request #5134 from mempool/natsoni/improve-conversions-price-service
Improve price conversions fetching from free API
2024-06-20 14:15:07 +09:00
softsimon
0719b20110
Deprecate pool_unique_id 2024-06-20 12:22:54 +09:00
Mononaut
25b510359f
Fix monitoring table layout & text wrapping 2024-06-20 03:09:54 +00:00
softsimon
02eb633d89
Merge pull request #5171 from mempool/nymkappa/fix-accel-dashboard-many-pending
[accelerator] always show last 6 completed accelerations in accel dashboard
2024-06-20 02:16:28 +09:00
nymkappa
522a473213
[accelerator] always show last 6 completed accelerations in accel dashboard 2024-06-19 17:32:16 +09:00
softsimon
bc583979c5
Merge pull request #5158 from mempool/dependabot/npm_and_yarn/frontend/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3 in /frontend
2024-06-19 16:04:44 +09:00
softsimon
3222e0efd2
Merge pull request #5170 from mackalex/fix-grammatical-errors
Small grammatical or typo fixes in backend README
2024-06-19 16:03:45 +09:00
Alex Makoviecki
f720c90c03
Small grammatical or typo fixes in backend README 2024-06-18 22:36:32 -07:00
Mononaut
1bf5047377
Implement $getTxsForBlock for Core backends 2024-06-19 03:15:23 +00:00
dependabot[bot]
bdeac877d2
Bump braces from 3.0.2 to 3.0.3 in /frontend
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 03:01:39 +00:00
dependabot[bot]
1bcacf53be
Bump braces from 3.0.2 to 3.0.3 in /unfurler
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 03:01:16 +00:00
softsimon
0c8d9daaec
Merge pull request #5165 from mempool/dependabot/npm_and_yarn/backend/ws-8.17.1
Bump ws from 8.17.0 to 8.17.1 in /backend
2024-06-19 12:00:46 +09:00
softsimon
307d3627a0
Merge pull request #5164 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.12.0
Bump cypress from 13.11.0 to 13.12.0 in /frontend
2024-06-19 12:00:30 +09:00
dependabot[bot]
db04c4663e
Bump ws from 8.17.0 to 8.17.1 in /backend
Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.17.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 02:27:59 +00:00
dependabot[bot]
a0a6a0da4f
Bump cypress from 13.11.0 to 13.12.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.11.0 to 13.12.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.11.0...v13.12.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 02:21:54 +00:00
natsoni
26968605cc
Display both BTC and USD in address history graph 2024-06-18 11:27:12 +02:00
wiz
ccd8412e6a
Merge pull request #5157 from mempool/nymkappa/grumpy
[about page] use grumpy guy instead of boring placeholder
2024-06-17 11:12:26 +09:00
Mononaut
272a2c8441
Fix incorrect non-standard label on reserved segwit output types 2024-06-16 22:25:40 +00:00
softsimon
2ee656a176
Renaming default to root network 2024-06-16 10:50:31 +02:00
Mononaut
5cecd9f8a7
Address page bigger QR button on mobile 2024-06-15 21:02:32 +00:00
softsimon
c0ec9f70c3
Fix dropdown visibility when using only 1 random network 2024-06-15 13:00:23 +02:00
nymkappa
84dae82e90
[about page] use grumpy guy instead of boring placeholder 2024-06-15 18:50:27 +09:00
softsimon
9dbf3b54fb
Electrs network routing fix 2024-06-15 05:18:35 +02:00
softsimon
ce46aae8cc
Default frontend network setting 2024-06-15 00:22:33 +02:00
Mononaut
fb621f9812
Address redesign liquid & layout fixes 2024-06-14 15:51:00 +00:00
natsoni
2156924d7e
Prevent address txs widget to send too many price requests 2024-06-12 20:02:54 +02:00
natsoni
60a30aaede
Allow to open transaction in new tab/page when click on address graph 2024-06-12 20:01:48 +02:00
Mononaut
7dfdb5553e
Address & script parsing refactor 2024-06-12 17:28:43 +00:00
natsoni
824bf5fc63
Fix price fetching causing race condition 2024-06-12 16:57:19 +02:00
natsoni
2b44055fc7
Add support for zooming in address balance graph 2024-06-12 13:17:39 +02:00
natsoni
7bef8653b1
Add support for USD in address history graph 2024-06-12 11:47:57 +02:00
Mononaut
3b419be341
Address details pending -> unconfirmed 2024-06-11 20:51:17 +00:00
Mononaut
331b54fe89
Address mouseover QR code 2024-06-10 23:22:10 +00:00
Mononaut
9514bb703b
Redesign top of address page 2024-06-10 23:04:37 +00:00
Mononaut
746a045c48
Refactor address page component with AddressStats class 2024-06-10 22:03:07 +00:00
softsimon
684ad9f0e6
Merge pull request #5062 from mempool/mononaut/configurable-tip-monitoring
Configurable threshold for esplora tip check
2024-06-10 00:52:50 +04:00
softsimon
24b5d4e971
Fix docker default value 2024-06-10 00:52:39 +04:00
softsimon
fda40cad48
Fix trailing comma 2024-06-10 00:47:40 +04:00
softsimon
2ce4b5604e
Merge pull request #5130 from mempool/dependabot/docker/docker/frontend/node-20.14.0-buster-slim
Bump node from 20.13.1-buster-slim to 20.14.0-buster-slim in /docker/frontend
2024-06-10 00:16:42 +04:00
softsimon
fb660e8477
Merge pull request #5129 from mempool/dependabot/docker/docker/frontend/nginx-1.27.0-alpine
Bump nginx from 1.26.0-alpine to 1.27.0-alpine in /docker/frontend
2024-06-10 00:16:34 +04:00
softsimon
621def712d
Merge pull request #5128 from mempool/dependabot/docker/docker/backend/node-20.14.0-buster-slim
Bump node from 20.13.1-buster-slim to 20.14.0-buster-slim in /docker/backend
2024-06-10 00:16:21 +04:00
softsimon
8382a27a7c
Merge pull request #5149 from mempool/mononaut/accurate-timestamps-hover
Accurate timestamps on hover
2024-06-10 00:16:07 +04:00
softsimon
b7d96a2a26
Merge pull request #5145 from mempool/natsoni/tapscript-toggle-show-more
Refactor "show all" toggle for long witnesses and witness scripts
2024-06-10 00:11:26 +04:00
Mononaut
3149199c8a
Accurate timestamps on hover 2024-06-08 23:28:44 +00:00
softsimon
0c3ef4eabc
Merge pull request #5139 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.11.0
Bump cypress from 13.10.0 to 13.11.0 in /frontend
2024-06-08 19:12:02 +04:00
wiz
fffcb5038f
Merge pull request #5136 from mempool/mononaut/research
research footer link
2024-06-07 11:49:51 +09:00
natsoni
77d42bfdbb
Don't render full input witness if user does not press "show all" 2024-06-06 17:53:20 +02:00
natsoni
f840ac951b
Add show all toggle for redeem scripts 2024-06-06 11:43:21 +02:00
wiz
22a48efd19
Merge pull request #5141 from mempool/nymkappa/liquid-fix
[liquid] don't fetch pools
2024-06-05 15:31:44 +09:00
nymkappa
fba3f7ec1c
[liquid] don't fetch pools 2024-06-05 08:28:01 +02:00
wiz
6b3005c49d
Merge pull request #5125 from mempool/mononaut/recent-address-chart
Make address chart prefer "recent" mode by default
2024-06-05 14:22:00 +09:00
wiz
17132ff047
Merge pull request #5120 from mempool/mononaut/multi-pool-eta
Multi-pool ETA
2024-06-05 14:21:34 +09:00
wiz
355fe58b43
Merge pull request #5137 from mempool/mononaut/pizza-replacement
Pizza tracker RBF support
2024-06-05 14:20:51 +09:00
wiz
604b0ba3e6
Merge pull request #5135 from mempool/mononaut/research-images
research images
2024-06-05 14:19:34 +09:00
dependabot[bot]
d016838356
Bump cypress from 13.10.0 to 13.11.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.10.0 to 13.11.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.10.0...v13.11.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 02:38:18 +00:00
Mononaut
f77582250f
Pizza tracker rbf tree traversal to find mined tx 2024-06-04 23:02:13 +00:00
Mononaut
976e505445
Pizza tracker handle RBF replacements 2024-06-04 22:45:43 +00:00
Mononaut
42c60fd991
Defer db access to fix failing tests 2024-06-04 20:57:40 +00:00
Mononaut
9a838c7269
Use estimated acceleration positions in frontend 2024-06-04 20:40:41 +00:00
Mononaut
f31b28251c
Estimate accelerated positions in partner mempools 2024-06-04 20:40:40 +00:00
Mononaut
ced1595d70
research footer link 2024-06-04 15:50:13 +00:00
Mononaut
0b0109d821
Research unfurler preview image 2024-06-04 15:25:04 +00:00
Mononaut
992da1e5d2
Research logo 2024-06-04 15:09:45 +00:00
natsoni
25c0eb62b2
More robust price service 2024-06-04 10:58:04 +02:00
wiz
9b9aaed757
Merge pull request #5132 from mempool/mononaut/coldcard-nfc
Experimental auto-push URL support
2024-06-04 12:04:25 +09:00
Mononaut
b699063153
Experimental auto-push URL support 2024-06-03 21:45:36 +00:00
wiz
6947e19ca9
ops: Tweak nginx cache config 2024-06-03 18:21:14 +09:00
dependabot[bot]
9d4bbe9317
Bump node in /docker/frontend
Bumps node from 20.13.1-buster-slim to 20.14.0-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 02:53:03 +00:00
dependabot[bot]
5575798cb6
Bump nginx from 1.26.0-alpine to 1.27.0-alpine in /docker/frontend
Bumps nginx from 1.26.0-alpine to 1.27.0-alpine.

---
updated-dependencies:
- dependency-name: nginx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 02:52:57 +00:00
dependabot[bot]
57cc53b64e
Bump node in /docker/backend
Bumps node from 20.13.1-buster-slim to 20.14.0-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 02:17:00 +00:00
softsimon
a0d3afb4d2
Merge pull request #5124 from mempool/natsoni/fix-lightning-search
Searchbar: wait for 3 characters before requesting lightning data
2024-06-01 14:22:19 +07:00
softsimon
67afda7dcf
Merge branch 'master' into natsoni/fix-lightning-search 2024-06-01 14:20:00 +07:00
softsimon
a56af00500
Merge pull request #5123 from mempool/natsoni/search-results-ordering
Improve search results ordering
2024-06-01 14:19:48 +07:00
softsimon
e3971af207
Merge pull request #5122 from mempool/natsoni/fix-pool-ranking
Fix pool ranking table
2024-06-01 14:17:50 +07:00
Mononaut
37725bb341
Make address graph prefer "recent" mode by default 2024-05-31 17:20:07 +00:00
natsoni
f17635193a
Fix pool ranking component update 2024-05-31 17:25:36 +02:00
softsimon
1c73dc59f9
Merge branch 'master' into natsoni/search-results-ordering 2024-05-31 22:18:43 +07:00
softsimon
3adbba2959
Merge branch 'master' into natsoni/fix-lightning-search 2024-05-31 21:20:31 +07:00
softsimon
ea1629fba8
Merge pull request #5121 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.10.0
Bump mysql2 from 3.9.7 to 3.10.0 in /backend
2024-05-31 21:20:02 +07:00
softsimon
87a4c087e5
Merge pull request #5118 from mempool/natsoni/fix-pool-page-update
Fix pool page update
2024-05-31 21:19:35 +07:00
softsimon
692edea1ce
Merge branch 'master' into natsoni/fix-pool-page-update 2024-05-31 21:17:09 +07:00
softsimon
11cfb8a783
Merge pull request #5117 from mempool/natsoni/pools-search
Add mining pools to search results
2024-05-31 21:16:46 +07:00
natsoni
0b953f21b0
Only query lightning search if more than 3 characters 2024-05-31 15:40:27 +02:00
natsoni
d5508872dd
Select lightning node by default in search results of public key 2024-05-31 15:08:58 +02:00
natsoni
321181d708
Update search results ordering 2024-05-31 13:52:37 +02:00
natsoni
f3bd50d4ab
Revert "Update search results ordering"
This reverts commit 00838ea94762fb81de0eebe0cec3c3035ae0e279.
2024-05-31 13:37:30 +02:00
dependabot[bot]
12a843c386
Bump mysql2 from 3.9.7 to 3.10.0 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.9.7 to 3.10.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.9.7...v3.10.0)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-31 02:34:09 +00:00
natsoni
21f91bcb6e
Fix pool page update on slug change 2024-05-30 17:58:28 +02:00
natsoni
d57bd56743
Use includes() instead of startsWith() to search for pool names 2024-05-30 15:08:20 +02:00
natsoni
08969592ea
Fix i18n for unknown pool search 2024-05-30 14:46:48 +02:00
wiz
f0437886ee
Merge pull request #5116 from mempool/simon/fix-undefined-group-channels 2024-05-30 18:29:53 +09:00
softsimon
cfedb5fd24
Fix for undefined LN group channels 2024-05-30 16:15:51 +07:00
wiz
a9ad892495
Merge pull request #5112 from mempool/mononaut/polish-acc-pie
Polish acceleration pie chart section
2024-05-30 17:58:58 +09:00
natsoni
00838ea947
Update search results ordering 2024-05-30 10:34:40 +02:00
natsoni
7761ea53c6
Add mining pools to search bar 2024-05-30 09:31:44 +02:00
softsimon
aeeb4af9ba
Merge pull request #5110 from mempool/natsoni/lift-up-blockchain-toggle
Slightly lift up blockchain toggle button
2024-05-29 16:21:45 +07:00
softsimon
9186f664da
Merge pull request #5109 from mempool/natsoni/fix-mining-graphs
Fix widget mining graphs
2024-05-29 15:58:56 +07:00
softsimon
83db2a3b72
Add margin to graph on pool ranking page 2024-05-29 15:58:39 +07:00
natsoni
3cfd54b4c5
Update mining dashboard graph heights 2024-05-29 10:27:45 +02:00
Mononaut
c6db016c99
Show hashrate pie chart immediately on acceleration 2024-05-28 21:33:09 +00:00
Mononaut
6f6a9ea1a4
Brighter purple pie chart 2024-05-28 21:07:36 +00:00
Mononaut
83246be962
Responsive active acceleration details 2024-05-28 21:06:58 +00:00
natsoni
dcd94d868a
Slightly lift up blockchain toggle button 2024-05-28 16:11:48 +02:00
natsoni
e9fc5c0433
Fix widget mining graphs 2024-05-28 16:11:06 +02:00
wiz
e281684ca4
Merge pull request #5107 from mempool/mononaut/acceleration-piechart-hotfix
Hotfix for acceleration pie chart section logic
2024-05-28 12:37:22 +09:00
Mononaut
6a915c0b88
Hotfix for acceleration pie chart section logic 2024-05-28 03:35:41 +00:00
wiz
078dc8d9a1
Merge pull request #5090 from mempool/mononaut/update-onbtc-preview-img
Update onbtc preview fallback image
2024-05-28 11:26:33 +09:00
wiz
232f81b906
Merge pull request #5017 from mempool/nymkappa/image-md5
[account] update profile image md5
2024-05-28 11:25:55 +09:00
wiz
8701119304
Merge pull request #5101 from mempool/natsoni/block-rewards-graph
Fees vs subsidy graph: add percentage mode
2024-05-28 11:23:57 +09:00
wiz
33c9f4a8dc
Merge pull request #5103 from mempool/mononaut/multi-pool-acc
inline acceleration hashrate pie chart
2024-05-28 11:23:25 +09:00
natsoni
0654872627
Fix graph legend update while load bug and remove unnecessary query 2024-05-27 16:49:29 +02:00
natsoni
cca798eeaa
Remove unnecessary filters in graph 2024-05-27 16:42:17 +02:00
Mononaut
1498db3b33
Backend support for multi-pool acceleration details 2024-05-26 20:47:36 +00:00
Mononaut
05b022dec8
multi-pool active accelerating details component 2024-05-26 20:39:35 +00:00
natsoni
6c6c18830c
Fees vs subsidy graph: add percentage mode 2024-05-25 12:32:38 +02:00
softsimon
46b5b26347
Merge pull request #5099 from mempool/natsoni/graphs-cleanup
Graphs loading indicators update
2024-05-25 12:36:40 +07:00
natsoni
bd5abf6592
Re-enable graph timespan controls while isLoading 2024-05-24 17:08:36 +02:00
natsoni
2c04896397
Graphs loading indicators update 2024-05-24 14:02:24 +02:00
softsimon
286fc8e9ad
Merge pull request #5042 from mempool/natsoni/statistics-replication
Add statistics to replication service
2024-05-24 14:35:30 +07:00
softsimon
52fa6a0f78
Merge pull request #5095 from mempool/mononaut/fix-local-acc-history
Fix local acceleration filter & reindex
2024-05-23 23:13:19 +07:00
softsimon
a53b587395
Merge pull request #5098 from mempool/natsoni/add-pool-health-check
Add check for pool addresses and regexes
2024-05-23 23:03:11 +07:00
softsimon
2341b1d79e
Merge pull request #5091 from mempool/mononaut/faucet-ui-changes
Requested changes to testnet4 faucet UI
2024-05-23 19:11:15 +07:00
natsoni
35215c7740
Add check for pool addresses and regexes 2024-05-23 11:30:30 +02:00
softsimon
e2080e5548
Merge pull request #5077 from mempool/dependabot/npm_and_yarn/frontend/frontend-angular-dependencies-ced88fd6cd
Bump ngx-echarts from 17.1.0 to 17.2.0 in /frontend in the frontend-angular-dependencies group
2024-05-23 01:23:08 +07:00
natsoni
60a07fb093
Improve statistics replication service 2024-05-22 18:10:52 +02:00
softsimon
28477cc433
Merge pull request #5085 from mempool/simon/refactor-block-page
Refactor block transactions
2024-05-22 22:36:48 +07:00
Mononaut
6bb2f06118
Faucet: clamp default amount to minimum 2024-05-22 15:28:15 +00:00
softsimon
68bab5b7b8
Merge pull request #5097 from mempool/dependabot/npm_and_yarn/backend/axios-1.7.2
Bump axios from 1.6.1 to 1.7.2 in /backend
2024-05-22 17:19:43 +07:00
dependabot[bot]
6bc7eec4e3
Bump ngx-echarts in /frontend in the frontend-angular-dependencies group
Bumps the frontend-angular-dependencies group in /frontend with 1 update: [ngx-echarts](https://github.com/xieziyu/ngx-echarts).


Updates `ngx-echarts` from 17.1.0 to 17.2.0
- [Release notes](https://github.com/xieziyu/ngx-echarts/releases)
- [Changelog](https://github.com/xieziyu/ngx-echarts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xieziyu/ngx-echarts/compare/v17.1.0...v17.2.0)

---
updated-dependencies:
- dependency-name: ngx-echarts
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-22 09:34:31 +00:00
softsimon
4364b5fb06
Merge pull request #5096 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.10.0
Bump cypress from 13.9.0 to 13.10.0 in /frontend
2024-05-22 16:33:04 +07:00
softsimon
86bc7b3f37
Pull from transifex 22/5 2024-05-22 16:32:45 +07:00
softsimon
ea0a4d1d67
Liquid gets block reward data from coinbase 2024-05-22 16:16:47 +07:00
softsimon
aa80fa550b
More refactoring based on feedback 2024-05-22 15:28:27 +07:00
dependabot[bot]
bdbe833e2a
---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-22 02:42:52 +00:00
dependabot[bot]
c1f338774a
---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-22 02:21:26 +00:00
Mononaut
e5ab8ab732
Update default faucet min, revalidate on change 2024-05-21 22:12:33 +00:00
Mononaut
ce204d03c6
Fix local acceleration filter & reindex 2024-05-21 21:47:18 +00:00
Hans ❤️ Crypto
0e37e85af6
Create hans-crypto.txt 2024-05-21 12:35:20 +02:00
natsoni
b0630de3cc
Merge branch 'master' into natsoni/statistics-replication 2024-05-21 11:35:26 +02:00
Hans ❤️ Crypto
4b3123b5ae
Remove reference to bisq in unfurler
not needed anymore
2024-05-21 09:00:05 +02:00
wiz
2ff2b78d26
Merge pull request #5087 from TheBlueMatt/patch-1
Update empty block explainer to remove nonsense information
2024-05-21 10:47:08 +09:00
Mononaut
35ff2c7225
Minor faucet UI refactor 2024-05-21 00:56:24 +00:00
Mononaut
69786d5b4b
Update onbtc preview fallback image 2024-05-20 23:48:53 +00:00
softsimon
3c3ab96164
Fix liquid testnet block test 2024-05-21 00:48:00 +07:00
softsimon
0c49c5313b
Scroll down block page in e2e tests 2024-05-21 00:01:40 +07:00
Matt Corallo
c5f6509a4c
Update empty block explainer to remove nonsense information
In #5061 it was suggested that the primary cause of empty blocks was due to ASICs taking some time to switch to new work, but this is not a possible reason for empty blocks - pools can mine empty or full blocks no matter how long ASICs do (or do not) take to switch to new work.

At some time T a new block is found, at some time T+1 a pool hears about this new block and desires to switch their miners to the new block. If the pool does a full block validation of the new block prior to sending new work (and updates their mempool), they can switch miners to the new work with transactions immediately. If, then, at time T+2 the ASIC finds a block based on the prior work it doesn't matter whether they were given transactions or not - the block is based on the previous tip and is just a fork.

Instead, the relevant question for empty blocks is whether the pool delays until they can fully validate the block and update their mempool (or in fact even *have* the block), selecting a first block template which contains transactions or not. #5061 tried to explain this away with an incredibly weak reference to bandwidth, but the cost of a merkle branch for a block with 4k transactions is only ~800 bytes of JSON'd hex, which shouldn't even push you into a second IP packet, let alone make for substantial bandwidth.

Its worth noting that it can take many seconds for block to make it from one pool to others, and can further take a second or two to validate a block even on fast hardware (in cases where Bitcoin Core decides to flush to disk due to cache fill), so it makes sense that you'll see empty blocks for some seconds after the previous block. @mononaut posted a chart convincingly demonstrating this - for the first few seconds after a previous block ~all blocks are empty blocks (strong evidence for spy mining or otherwise sending new work prior to updating the local mempool) and we see some dropoff of empty blocks therafter on a relatively expected distribution.

There are likely some empty blocks which are mined further past the previous block due to ASICs holding onto previous work, however the only reason those ASICs *have* previous work that is an empty block is because of spy mining or otherwise not tuning Bitcoin Core on the side of the pool to ensure they can update their mempool fast enough and get blocks fast enough to not need to send empty work at all.
2024-05-20 00:39:13 +00:00
softsimon
8bac2db12c
Fix 3rd party licenses link 2024-05-20 00:43:58 +07:00
nymkappa
0605e80d89
Merge branch 'master' into nymkappa/prepaid-update-price 2024-05-19 08:10:23 +02:00
softsimon
abad704fc6
Merge branch 'master' into simon/refactor-block-page 2024-05-19 11:53:54 +07:00
softsimon
d7459ba943
Merge pull request #5084 from mempool/nymkappa/testnet4-tests
[tests] testnet -> testnet4
2024-05-19 11:53:43 +07:00
wiz
ec7da01186
Fix broken TX link from faucet component 2024-05-19 09:59:56 +09:00
wiz
2ce1cc24b9
Merge pull request #5080 from mempool/nymkappa/faucet-polish
[faucet] polish code and UX - Move Twitter login component into FOSS
2024-05-19 08:25:08 +09:00
nymkappa
cb95423178
[tests] testnet -> testnet4 2024-05-18 20:52:45 +02:00
softsimon
a68c8d317c
Refactor block transactions 2024-05-19 00:39:33 +07:00
nymkappa
f58c2e6fe5
[faucet] add more error string 2024-05-18 18:56:02 +02:00
nymkappa
203e2904d6
[faucet] block coins request to faucet change address 2024-05-18 16:13:58 +02:00
nymkappa
38971d33a6
[faucet] handle new faucet status codes 2024-05-18 11:20:07 +02:00
nymkappa
83f3d07538
[faucet] only enable on mempool.space instance 2024-05-18 10:54:06 +02:00
nymkappa
9e844ffbbd
[faucet] disable pointer when not available, fix unsubscribe() 2024-05-18 10:43:19 +02:00
wiz
0497c750be
Merge pull request #5066 from mempool/mononaut/hide-t4-ln-graphs
Remove all lightning elements on unsupported networks
2024-05-18 07:19:35 +09:00
Mononaut
788caf05ce
Remove all lightning elements on unsupported networks 2024-05-17 22:02:16 +00:00
softsimon
db34ca6a5f
Merge pull request #5061 from BitcoinMechanic/update-empty-block-explainer
update empty block explainer, add contributor info
2024-05-18 01:45:55 +07:00
nymkappa
3bbdf6fb25
[faucet] improve feedback upon success 2024-05-17 20:45:39 +02:00
nymkappa
6b16b2d651
[faucet] polish code and UX - Move Twitter login component into FOSS 2024-05-17 20:32:43 +02:00
wiz
0279fe69d4
Fix footer links for Sign In / My Account 2024-05-17 17:54:06 +09:00
wiz
e1c47fddee
Merge pull request #5075 from mempool/mononaut/testnet4-faucet
Faucet
2024-05-17 17:40:24 +09:00
wiz
6b2b3459f7
Merge branch 'master' into update-empty-block-explainer 2024-05-17 15:43:53 +09:00
softsimon
1d91e76ec2
Merge pull request #5033 from mempool/natsoni/add-block-fee-graph
Add block fees vs subsidy bar graph
2024-05-17 11:47:58 +07:00
Mononaut
e8dbd777d0
Faucet arguments as query params 2024-05-16 21:17:39 +00:00
Mononaut
987def9baa
Improve faucet mobile layout 2024-05-16 21:10:15 +00:00
Mononaut
d9197e28be
Fix faucet 403 handling 2024-05-16 21:09:47 +00:00
Mononaut
72f4d811c1
Add missing websocket subscription to faucet component 2024-05-16 19:16:53 +00:00
Mononaut
f8144bd9a0
Fetch faucet address from services backend 2024-05-16 18:36:33 +00:00
BitcoinMechanic
d6d56688ea
Update api-docs.component.html
Tweak empty block explainer
2024-05-16 10:12:09 -07:00
softsimon
97817e770f
Merge pull request #5074 from mempool/mononaut/meta-slurper
Preserve site-specific meta title/descriptions/canonical urls
2024-05-16 23:19:03 +07:00
Mononaut
bbf8aed38f
Add faucet navbar item on official testnet4 2024-05-16 07:36:13 +00:00
Mononaut
ef5c8ddcdf
Add testnet4 faucet 2024-05-16 07:35:55 +00:00
Mononaut
69e1d6150d
Preserve site-specific meta title/descriptions 2024-05-15 20:57:29 +00:00
natsoni
86c3ef68e4
Graph: don't refresh data if timespan is 24h or 3d 2024-05-15 17:05:18 +02:00
natsoni
ec54ed6f94
Remove bar graph data update logic and fix mobile navigation 2024-05-15 13:07:32 +02:00
natsoni
c2a3ff4b67
Improve granularity when zoom in block fees bar graph 2024-05-14 20:31:25 +02:00
softsimon
cc9e4f2d43
Merge pull request #5073 from mempool/simon/fix-themeservice-not-loaded
Fix themeService not loaded
2024-05-14 22:26:52 +07:00
softsimon
4c62d54b6b
Fix themeService not loaded 2024-05-14 21:47:53 +07:00
softsimon
8bbc27dae5
Merge pull request #5072 from mempool/mononaut/fix-frontend-index-build
Fix index.html generation for custom frontend builds
2024-05-14 15:01:05 +07:00
Mononaut
2ffaeb50df
Fix index.html generation for custom frontend builds 2024-05-14 00:15:36 +00:00
wiz
12d212b89f
Merge pull request #5071 from mempool/mononaut/fix-customizejs-caching
Fix nginx caching for customize.js resource
2024-05-14 02:12:46 +09:00
Mononaut
1cdb38af0b
Fix nginx caching for customize.js resource 2024-05-13 16:57:14 +00:00
softsimon
947f55dda2
Merge pull request #5070 from mempool/dependabot/docker/docker/frontend/node-20.13.1-buster-slim
Bump node from 20.12.0-buster-slim to 20.13.1-buster-slim in /docker/frontend
2024-05-13 23:52:48 +07:00
softsimon
c52bde140f
Merge pull request #5069 from mempool/dependabot/docker/docker/backend/node-20.13.1-buster-slim
Bump node from 20.12.0-buster-slim to 20.13.1-buster-slim in /docker/backend
2024-05-13 23:52:34 +07:00
wiz
1663637ed9
ops: Keep non-mainnet networks' maxmempool at default size 2024-05-13 23:20:24 +09:00
wiz
d24217282b
ops: Fix wrong port in onbtc unfurler config 2024-05-13 20:58:57 +09:00
softsimon
b6a1547ce4
Merge pull request #5034 from mempool/natsoni/fix-unnecessary-load-more
Prevent address page to load more txs unnecessarily
2024-05-13 17:19:28 +07:00
softsimon
66f431d3d3
Force curly if-statements 2024-05-13 17:16:28 +07:00
softsimon
d02625eb0d
Merge branch 'master' into natsoni/fix-unnecessary-load-more 2024-05-13 17:09:50 +07:00
softsimon
a3ac9c31ed
Merge pull request #5067 from mempool/hunicus/bird-x
Replace twitter logo with x logo
2024-05-13 16:24:35 +07:00
softsimon
4729a87b39
Slight width reduction 2024-05-13 16:24:17 +07:00
BitcoinMechanic
16c154f39d
Update frontend/src/app/docs/api-docs/api-docs.component.html
Co-authored-by: mononaut <83316221+mononaut@users.noreply.github.com>
2024-05-12 23:05:55 -07:00
softsimon
fa98c73067
Merge pull request #5025 from mempool/hunicus/sv-about
Replace bisq with onbtc for about alliances
2024-05-13 10:12:49 +07:00
softsimon
d32de4fa06
Merge pull request #5068 from mempool/mononaut/handle-services-outage
Fix error handling for non-critical services API requests
2024-05-13 10:03:13 +07:00
dependabot[bot]
50ee7c07d1
Bump node in /docker/frontend
Bumps node from 20.12.0-buster-slim to 20.13.1-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 02:59:07 +00:00
dependabot[bot]
2ac041dc6c
Bump node in /docker/backend
Bumps node from 20.12.0-buster-slim to 20.13.1-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 02:44:50 +00:00
hunicus
4aac31332f
Merge branch 'master' into hunicus/sv-about 2024-05-13 06:23:22 +09:00
hunicus
9a6ac69983
Update onbtc image and url 2024-05-12 17:21:58 -04:00
Mononaut
c93aa4d82c
add catchError fallback for non-critical services API requests 2024-05-12 21:16:00 +00:00
hunicus
16fe1f3cec
Merge branch 'master' into hunicus/bird-x 2024-05-13 05:25:54 +09:00
natsoni
42d591bf4c
Block subsidy graph: add lower timeframes 2024-05-12 21:52:53 +02:00
wiz
2133356047
Merge pull request #5065 from mempool/mononaut/balance-widget-periods
Update balance widget 7d/30d intervals
2024-05-13 01:31:48 +09:00
Mononaut
d7b0923000
Update balance widget 7d/30d intervals 2024-05-12 16:27:57 +00:00
wiz
2fa33b749c
Update el salvador twitter handle again 2024-05-13 01:23:32 +09:00
wiz
90cc75479e
Merge pull request #5064 from mempool/mononaut/update-tos-onbtc
Update terms of service
2024-05-13 01:07:47 +09:00
wiz
e2eadd0433
Merge pull request #5063 from mempool/mononaut/fix-x-widget-handle
Fix x widget
2024-05-13 01:05:17 +09:00
Mononaut
1bd045582d
Update terms of service 2024-05-12 16:05:02 +00:00
Mononaut
c6e8885c94
fix x widget handle handling 2024-05-12 16:00:44 +00:00
wiz
5531d04f10
Change twitter timeline acct bitcoinofficesv to nayibbukele 2024-05-13 00:51:32 +09:00
wiz
85ff8521f7
ops: Update bitcoin.crontab for testnet4 2024-05-13 00:51:28 +09:00
wiz
3794ddfd3a
ops: Update bitcoin.conf for testnet4 2024-05-13 00:51:25 +09:00
Mononaut
568084e143
Configurable threshold for esplora tip check 2024-05-12 00:35:25 +00:00
BitcoinMechanic
64d979d5f9
update empty block explainer, add contributor info 2024-05-11 11:39:46 -07:00
natsoni
0ef76f3e64
Block subsidy graph back to timespan selection mode 2024-05-11 14:36:17 +02:00
softsimon
b8725ab13a
Merge pull request #5054 from mempool/mononaut/fix-statistics-graphs
Fix statistics graphs
2024-05-10 14:12:34 +07:00
wiz
6bf47f69eb
Merge pull request #5056 from mempool/mononaut/unfurl-descriptions
temporarily hardcode unfurl titles & descriptions
2024-05-10 06:13:25 +09:00
wiz
0192c2bffa
ops: Modify build script to build unfurlers last 2024-05-10 05:41:46 +09:00
Mononaut
91aa815d88
temporarily hardcode unfurl titles & descriptions 2024-05-09 20:01:13 +00:00
wiz
53a493c233
Merge branch 'master' into natsoni/add-block-fee-graph 2024-05-10 04:59:17 +09:00
wiz
dcdb9361e8
Merge pull request #5055 from mempool/mononaut/custom-build-html
Update custom sv html
2024-05-10 04:22:15 +09:00
Mononaut
89531d1703
Update custom sv html 2024-05-09 19:18:17 +00:00
wiz
8311e842bb
ops: Enable testnet4 in prod frontend configs 2024-05-10 04:02:35 +09:00
wiz
a492223369
Add warning that testnet4 may be reset at anytime 2024-05-10 03:57:25 +09:00
Mononaut
cd9e336165
Also fix stats on custom dashboard & tv view 2024-05-09 18:05:01 +00:00
Mononaut
5b2ecac1f6
Fix statistics graphs 2024-05-09 18:00:09 +00:00
wiz
d2f7864266
ops: Don't serve stale cache data for non-mainnet (2/2) 2024-05-10 01:14:51 +09:00
wiz
c9432aa0d1
Merge pull request #5053 from mempool/mononaut/unfurler-fixes-2
Fix unfurler resources build
2024-05-10 00:56:56 +09:00
Mononaut
eeb2bae9f3
Fix unfurler resources build 2024-05-09 15:55:03 +00:00
wiz
659ef0b6b9
ops: Don't serve stale cache data for non-mainnet 2024-05-10 00:44:53 +09:00
wiz
9b83ac29b7
Merge pull request #5050 from mempool/mononaut/t4-unfurls
Enable testnet4 unfurls
2024-05-09 23:42:39 +09:00
wiz
722b81623b
Merge pull request #5051 from mempool/mononaut/fix-onbtc-fallback-img
Fix onbtc unfurler fallback image
2024-05-09 23:42:26 +09:00
wiz
648dd5adb2
Merge pull request #5052 from mempool/mononaut/testnet3-banner
Update testnet3 banner
2024-05-09 23:42:11 +09:00
Mononaut
75e7bb3255
Update testnet3 banner 2024-05-08 20:46:55 +00:00
Mononaut
10fc4d27ad
Fix onbtc unfurler fallback image 2024-05-08 19:59:50 +00:00
Mononaut
ace422c0d5
Enable testnet4 unfurls 2024-05-08 19:58:57 +00:00
softsimon
b6682eed2a
Merge pull request #5048 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.9.0
Bump cypress from 13.8.0 to 13.9.0 in /frontend
2024-05-09 00:09:55 +07:00
softsimon
8080b8b56a
Remove Bukele theme option 2024-05-08 23:58:51 +07:00
softsimon
0e8d04e464
Merge pull request #5049 from mempool/natsoni/fix-navbar
Fix transparent navbar
2024-05-08 23:30:33 +07:00
natsoni
fc76146085
Fix transparent navbar 2024-05-08 18:25:29 +02:00
softsimon
4142413002
Merge pull request #5028 from mempool/mononaut/x-widget
Add x widget
2024-05-08 22:57:21 +07:00
softsimon
49e4855982
Merge branch 'master' into mononaut/x-widget 2024-05-08 22:56:03 +07:00
dependabot[bot]
65cad2025a
Bump cypress from 13.8.0 to 13.9.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.8.0 to 13.9.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/commits)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-08 15:29:38 +00:00
softsimon
64327b3d25
Merge pull request #5047 from mempool/dependabot/npm_and_yarn/frontend/esbuild-0.21.1
Bump esbuild from 0.20.2 to 0.21.1 in /frontend
2024-05-08 22:28:27 +07:00
wiz
54289368b1
Merge pull request #5027 from mempool/mononaut/tracker-logos
Add enterprise logos to pizza tracker header
2024-05-08 17:49:27 +09:00
softsimon
297c226fab
Merge branch 'master' into mononaut/tracker-logos 2024-05-08 10:06:47 +07:00
softsimon
7f5b5f487e
Merge pull request #5044 from mempool/mononaut/onbtc-imgs-themed
onbtc theme
2024-05-08 10:06:13 +07:00
softsimon
f2a6828015
Merge pull request #5045 from mempool/mononaut/fix-custom-dash-graph
Fix custom dashboard address graph
2024-05-08 10:01:31 +07:00
dependabot[bot]
45936805e9
Bump esbuild from 0.20.2 to 0.21.1 in /frontend
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.20.2 to 0.21.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.20.2...v0.21.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-08 02:17:49 +00:00
Mononaut
0fae0b21ad
Fix pizza tracker branding layout 2024-05-08 00:23:50 +00:00
Mononaut
9bd741b1d9
Add enterprise logos to pizza tracker header 2024-05-08 00:23:50 +00:00
Mononaut
c15393981d
Update onbtc fallback preview img 2024-05-08 00:22:54 +00:00
Mononaut
9495d7d2ea
Fix custom dashboard address graph 2024-05-08 00:17:35 +00:00
Mononaut
788a95b260
disable selector when forcing custom theme 2024-05-07 23:48:28 +00:00
Mononaut
4c697d0008
Update onbtc theme & branding 2024-05-07 23:48:23 +00:00
natsoni
463e66081c
CSS theme changes 2024-05-07 21:03:26 +00:00
natsoni
a7e501570c
Add El Salvador theme 2024-05-07 21:03:25 +00:00
natsoni
4a76cb083a
More css included in color themes 2024-05-07 21:03:24 +00:00
natsoni
6a767ce5c4
Make links color manageable with themes 2024-05-07 21:02:40 +00:00
natsoni
f2a7cddbb0
Enable statistics replication on prod 2024-05-07 16:31:03 +02:00
natsoni
f85f3a4eb5
Add statistics to replication service 2024-05-07 16:04:50 +02:00
wiz
0fcd132df4
Merge pull request #5041 from mempool/mononaut/unbork-orphan-cache
Don't get stuck fetching orphans
2024-05-07 17:55:37 +09:00
Mononaut
0990cfe072
Don't get stuck fetching orphans 2024-05-07 01:41:41 +00:00
hunicus
1312dd45e6
Replace twitter logo with x logo 2024-05-06 14:33:42 -04:00
wiz
d92bf14b50
Merge pull request #5040 from mempool/mononaut/testnet4
test
2024-05-07 02:50:37 +09:00
Mononaut
de8462e81e
testnet4 docs 2024-05-06 17:31:49 +00:00
Mononaut
15bd58c746
testnet4 beta tags 2024-05-06 17:31:16 +00:00
Mononaut
26da18810d
Hide lightning tab on testnet4 2024-05-06 16:48:39 +00:00
wiz
f80c99576b
ops: Update prod scripts for testnet4 2024-05-07 01:01:09 +09:00
Mononaut
1e5a55917c
Add testnet4 frontend support 2024-05-06 15:55:49 +00:00
softsimon
375e43c191
Merge pull request #5038 from mempool/mononaut/improve-deferred-mempool-animations
Improve deferred mempool visualization updates
2024-05-06 22:40:12 +07:00
softsimon
feab4d2a51
Merge pull request #5035 from mempool/mononaut/accelerator-websocket
Replace acceleration API polling with websocket
2024-05-06 20:57:41 +07:00
softsimon
73f0cdde7d
Merge pull request #5039 from mempool/dependabot/github_actions/dtolnay/rust-toolchain-d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
Bump dtolnay/rust-toolchain from bb45937a053e097f8591208d8e74c90db1873d07 to d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
2024-05-06 18:02:04 +07:00
softsimon
810c2cbde4
Merge pull request #5037 from mempool/nymkappa/node-socket
[lightning] apply #4991 at node creation as well
2024-05-06 17:59:40 +07:00
softsimon
a9ff9c3bc7
Merge pull request #5030 from TheBlueMatt/msrv-take-2
Restore MSRV to 1.63
2024-05-06 12:51:42 +07:00
dependabot[bot]
69faa1d493
Bump dtolnay/rust-toolchain
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from bb45937a053e097f8591208d8e74c90db1873d07 to d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](bb45937a05...d8352f6b1d)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 02:26:59 +00:00
natsoni
f16afe20be
Update data length limit in fees bar chart to 10k blocks at once 2024-05-05 15:24:03 +02:00
Mononaut
a29b29300e
Replace acceleration API polling with websocket 2024-05-04 17:23:20 +00:00
Mononaut
56a0d89b88
Improve deferred mempool visualization updates 2024-05-04 17:08:38 +00:00
natsoni
d0cba30543
Fix fees vs subsidy graph when blocks are not fully indexed 2024-05-04 18:29:52 +02:00
natsoni
6d595dcdb6
Fix graph menu styling 2024-05-04 16:56:02 +02:00
nymkappa
2e49ef38c9
[lightning] apply 4991 at node creation as well 2024-05-04 10:01:21 +02:00
softsimon
8ec5dd70e0
Merge pull request #5026 from mempool/mononaut/balance-graph-span-toggle
Polish address balance graph, add period toggle
2024-05-04 14:31:26 +07:00
softsimon
89363bfbff
Merge pull request #4815 from mempool/mononaut/testmempoolaccept
testmempoolaccept
2024-05-04 14:22:37 +07:00
softsimon
e45a03729b
Adding footer link 2024-05-04 14:19:26 +07:00
softsimon
395ef82ad4
Merge branch 'master' into mononaut/testmempoolaccept 2024-05-04 14:11:48 +07:00
softsimon
02f1b11ad6
Merge pull request #5021 from mempool/dependabot/docker/docker/frontend/nginx-1.26.0-alpine
Bump nginx from 1.25.4-alpine to 1.26.0-alpine in /docker/frontend
2024-05-04 14:11:17 +07:00
softsimon
c53fb9266c
Merge pull request #5023 from mempool/natsoni/block-view-fees-default
Change block display default mode to fees
2024-05-04 14:09:56 +07:00
softsimon
3d1edffd18
Merge pull request #5032 from mempool/mononaut/fix-mempool-animation-desync
Fix mempool animation desync
2024-05-04 14:08:42 +07:00
softsimon
24ea3199dd
Merge pull request #4598 from mempool/mononaut/mempool-delta-subscription
Feature: track-mempool websocket subscriptions
2024-05-04 13:47:29 +07:00
Mononaut
44116424b0
Reimplement mempool animation smoothing within viz component 2024-05-03 21:43:53 +00:00
Mononaut
a8868b5f0f
Simplify websocket mempool delta handling 2024-05-03 21:43:48 +00:00
Mononaut
5172f032e7
Add sequence number to track-mempool subscription messages 2024-05-03 16:31:56 +00:00
Mononaut
f8d30bf528
Add 'mempool delta' websocket subscriptions 2024-05-03 16:25:45 +00:00
natsoni
1c3e0bdd6a
Prevent address page to load more txs unnecessarily 2024-05-03 14:45:09 +02:00
natsoni
453a2224cd
Add block fees vs subsidy bar chart 2024-05-03 12:56:33 +02:00
natsoni
1b25a71d9f
Add accelerations category to graphs page 2024-05-03 11:53:33 +02:00
softsimon
ba27ff9c42
Merge pull request #5022 from mempool/dependabot/npm_and_yarn/backend/ws-8.17.0
Bump ws from 8.16.0 to 8.17.0 in /backend
2024-05-03 05:16:37 +07:00
softsimon
02878d6a58
Merge pull request #5029 from mempool/dependabot/npm_and_yarn/unfurler/ejs-3.1.10
Bump ejs from 3.1.9 to 3.1.10 in /unfurler
2024-05-03 05:15:15 +07:00
Matt Corallo
a676d23a54 Restore MSRV to 1.63
In trying to upgrade my mempool instance, I discovered I couldn't
build the latest mempool Rust code with my available Rust
toolchain.

It appears in #4612 the Rust MSRV was bumped without justification,
which is reverted here. Note that `Cargo.lock` updates here should
ensure the versions of dependent crates use the versions supported
by our MSRV.

Its possible that the dependency downgrades here break something,
but things appear to be running fine for me locally, so figured I'd
suggest this upstream.
2024-05-02 21:00:49 +00:00
dependabot[bot]
36f1f778c3
Bump ejs from 3.1.9 to 3.1.10 in /unfurler
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 18:34:47 +00:00
Mononaut
f83404421a
Add x widget 2024-05-01 23:59:02 +00:00
wiz
cd8abe5c06
ops: Tweak http port for onbtc unfurler instance 2024-05-02 00:53:14 +09:00
softsimon
471a2397c0
Add customize.js to .gitignore 2024-05-01 22:51:58 +07:00
hunicus
bf541f0898
Replace bisq with onbtc for about alliances 2024-04-29 22:39:10 -04:00
Mononaut
a582a3b0ed
Polish address balance graph, add period toggle 2024-04-29 21:03:09 +00:00
softsimon
20df70c449
Fix missing return on invalid params 2024-04-30 02:02:53 +07:00
wiz
af13b6c9f8
Merge pull request #5024 from mempool/mononaut/onbtc-siteid
Add onbtc site id
2024-04-30 01:33:36 +09:00
Mononaut
06ee82af0b
Add onbtc site id 2024-04-29 14:36:45 +00:00
natsoni
57b466d80f
Update block display default mode to fees 2024-04-29 11:54:28 +02:00
wiz
dbd4d152ce
Merge pull request #5020 from mempool/mononaut/custom-unfurls
custom unfurls
2024-04-29 17:37:11 +09:00
wiz
95f47409d8
Add onbtc frontend config, add onbtc backend to build script 2024-04-29 17:29:45 +09:00
wiz
ed64b72676
ops: Add onbtc frontend config 2024-04-29 17:20:35 +09:00
wiz
f9948055e4
ops: Update build/unfurler stuff for onbtc 2024-04-29 17:12:51 +09:00
dependabot[bot]
6ad709f93a
Bump ws from 8.16.0 to 8.17.0 in /backend
Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.16.0...8.17.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 02:16:33 +00:00
dependabot[bot]
f9498cf5a2
Bump nginx from 1.25.4-alpine to 1.26.0-alpine in /docker/frontend
Bumps nginx from 1.25.4-alpine to 1.26.0-alpine.

---
updated-dependencies:
- dependency-name: nginx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 02:06:21 +00:00
Mononaut
f5333c529c
Update unfurler routing, add fallback img 2024-04-28 16:18:35 +00:00
Mononaut
6b2cc23cd3
Add custom branding to unfurler previews 2024-04-28 16:18:16 +00:00
Mononaut
34329d04f0
favicons 2024-04-28 16:02:42 +00:00
Mononaut
701c283e97
Fix svg 2024-04-28 16:02:41 +00:00
Mononaut
f9fd589af2
Logo overrides, custom index.html 2024-04-28 16:02:41 +00:00
softsimon
0d9602693b
Correcting duplicate string 'Date' 2024-04-28 09:46:55 +07:00
softsimon
27be568eb5
Fix duplicate "sats" string 2024-04-28 09:43:35 +07:00
softsimon
8f06aea736
Extracting new i18n strings 2024-04-28 09:39:04 +07:00
wiz
65191538e2
Merge pull request #5016 from mempool/mononaut/customization
Customized frontend builds
2024-04-28 04:11:11 +09:00
nymkappa
8b1acbe13b
[account] update profile image md5 2024-04-27 14:49:06 +02:00
Mononaut
d49485c363
Update custom address widgets on new block transactions 2024-04-26 23:59:27 +00:00
Mononaut
1de028840e
Custom address widget title links 2024-04-26 20:06:34 +00:00
Mononaut
3f9fb68c5f
Fix mobile custom enterprise logo 2024-04-26 20:01:00 +00:00
Mononaut
33ef15511f
Check in missing address transactions widget component 2024-04-26 19:41:11 +00:00
Mononaut
139c384e97
Add address transactions widget 2024-04-26 19:17:28 +00:00
Mononaut
ccb27dbdb9
Address widget timespans 2024-04-26 19:17:27 +00:00
Mononaut
6eb21ffd24
check in svg 2024-04-26 19:17:27 +00:00
Mononaut
b9b3c8f78a
Custom branding 2024-04-26 19:17:27 +00:00
Mononaut
4f4215577a
Add custom dashboard component 2024-04-26 19:17:27 +00:00
Mononaut
ac0f56325b
Add customizable enterprise build 2024-04-26 19:17:27 +00:00
softsimon
fd8df2a035
Merge pull request #5015 from mempool/natsoni/add-toggle-sats
Add an option to display values as sats
2024-04-26 12:58:52 +07:00
softsimon
b4decb8f91
Merge pull request #5014 from mempool/natsoni/small-fixes-liquid-frontend
Minor changes on Liquid frontend
2024-04-26 12:07:07 +07:00
softsimon
836c1e002e
Merge pull request #4981 from mempool/natsoni/fix-tx-details-loading
Fix miner data loading in transaction details
2024-04-26 12:06:03 +07:00
softsimon
701701e13c
Merge pull request #5013 from mempool/natsoni/fix-liquid-footer
Remove Mining dashboard from Liquid footer
2024-04-26 11:54:36 +07:00
wiz
6accf8420f
Merge branch 'master' into nymkappa/prepaid-update-price 2024-04-25 02:24:42 +09:00
natsoni
ea5c3212d6
Add an option to display values as sats 2024-04-24 16:44:56 +02:00
natsoni
65705a8a1d
Fix Liquid UTXOs table color 2024-04-24 14:19:14 +02:00
natsoni
8310ad9f24
Fix gauge clickable pointer 2024-04-24 14:17:50 +02:00
natsoni
1a5c2c4d3a
Add a 5% tolerance for declaring a "unpeg event" 2024-04-24 14:17:40 +02:00
natsoni
cd689afaaa
Add config check to show mining dashboard in footer 2024-04-24 11:00:51 +02:00
softsimon
00e0eea60e
Merge pull request #5012 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.9.7
Bump mysql2 from 3.9.4 to 3.9.7 in /backend
2024-04-24 10:38:42 +07:00
softsimon
d89ba767f1
Merge pull request #5011 from mempool/mononaut/rbf-mobile-autoscroll-bug
Fix rbf autoscroll bug on mobile
2024-04-24 10:34:34 +07:00
dependabot[bot]
c4acc95b06
Bump mysql2 from 3.9.4 to 3.9.7 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.9.4 to 3.9.7.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.9.4...v3.9.7)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-23 23:11:18 +00:00
nymkappa
ed9f792d21
fix typo 2024-04-23 17:54:04 +02:00
Mononaut
31c008afa5
Fix rbf autoscroll bug on mobile 2024-04-22 21:52:48 +00:00
orangesurf
6e2c0bac43
Update accelerate-checkout.component.ts
Analysis suggests 1.5 would be a good starting point

https://gist.github.com/orangesurf/5f69da2ffbdd1b737be53789e1783b03
2024-04-22 20:18:40 +02:00
softsimon
a66920c51e
Merge pull request #5004 from mempool/natsoni/toggle-block-fees
Add block display mode toggle
2024-04-22 20:30:26 +07:00
softsimon
1c9e2b546b
Replacing setTimeouts with rxjs 2024-04-22 14:42:48 +07:00
nymkappa
9363004252
[accelerator] change default bid prepaid 2024-04-22 08:08:03 +02:00
softsimon
2297ff72f5
Merge pull request #5006 from mempool/knorrium/increase_language_selector_width
Knorrium/increase language selector width
2024-04-22 10:24:38 +07:00
Felipe Knorr Kuhn
fbaa39a300
Change only the selector width 2024-04-21 19:34:48 -07:00
Felipe Knorr Kuhn
bd2c15c6bb
Increase the language selector width to accomodate all languages 2024-04-21 18:48:44 -07:00
natsoni
a4d8f2db58
Add block display mode toggle button 2024-04-21 14:54:50 +02:00
Mononaut
2a43255802
testmempool accept more validation & switch to JSON array format 2024-04-21 10:05:58 +07:00
Mononaut
f3232b2d5c
Add Test Transactions page 2024-04-21 10:05:58 +07:00
Mononaut
c7cb7d1ac4
Add testmempoolaccept API endpoint 2024-04-21 10:05:57 +07:00
softsimon
bd5a23ff0d
Merge pull request #4997 from mempool/natsoni/fix-dropdown-focus
Fix dropdown menu navigation with arrow keys
2024-04-20 08:35:17 +07:00
natsoni
dd0c1eb74d
Fix dropdown menu arrow navigation 2024-04-20 00:57:59 +02:00
softsimon
9950ef16ce
Merge pull request #4995 from mempool/natsoni/fix-pagination-color
Fix table pagination colors on custom themes
2024-04-20 01:25:56 +07:00
softsimon
fed2c034ee
Merge pull request #4996 from mempool/nymkappa/update-doc
[doc] update accel doc
2024-04-20 00:47:03 +07:00
nymkappa
4944e3c257
[doc] update accel doc 2024-04-19 18:45:59 +02:00
natsoni
b865fa33f6
Fix table pagination colors 2024-04-19 17:08:19 +02:00
softsimon
bb44ed15da
Merge pull request #4991 from mempool/nymkappa/unique-node-addr
[lightning] unique sockets for ln nodes
2024-04-19 18:02:42 +07:00
softsimon
93919421ee
Merge pull request #4984 from mempool/natsoni/more-css
More css fixes
2024-04-19 16:24:25 +07:00
softsimon
8d1831129b
Merge pull request #4988 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.8.0
Bump cypress from 13.7.0 to 13.8.0 in /frontend
2024-04-19 16:23:30 +07:00
softsimon
5e6e2c037e
Merge pull request #4979 from mempool/natsoni/improve-tooltip-positioning
Fix cropped transaction tooltip in block overview on mobile
2024-04-19 16:23:10 +07:00
nymkappa
ddfceddc57
[lightning] unique sockets for ln nodes 2024-04-19 10:56:15 +02:00
softsimon
5b19ffd524
Pull from transifex 2024-04-19 14:53:32 +07:00
wiz
7422001ed5
Merge pull request #4990 from mempool/nymkappa/disable-topology-prod
[prod] disable LN TOPOLOGY_FOLDER by default
2024-04-19 16:27:16 +09:00
nymkappa
3b0ef48cdf
[prod] disable LN TOPOLOGY_FOLDER by default 2024-04-19 09:06:10 +02:00
wiz
d13875e3e7
Merge pull request #4989 from mempool/nymkappa/update-doc
[doc] update
2024-04-19 16:06:03 +09:00
nymkappa
6ebc7fab47
[doc] update to match accel history endpoint actual response 2024-04-19 08:55:21 +02:00
dependabot[bot]
9d931c1d13
Bump cypress from 13.7.0 to 13.8.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.7.0 to 13.8.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.7.0...v13.8.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 02:15:31 +00:00
softsimon
f86b6ac3de
Merge pull request #4985 from mempool/mononaut/fix-audit-bug
Fix audit blockIndex increment bug
2024-04-19 00:13:48 +07:00
natsoni
ce1124284e
Adapt more css for color theme 2024-04-18 16:18:38 +02:00
Mononaut
233f19d23d
Fix audit blockIndex increment bug 2024-04-18 13:27:33 +00:00
natsoni
89ef5fe33d
Fix tooltip text overflow in some languages 2024-04-18 11:09:28 +02:00
softsimon
7cd4345264
Merge pull request #4956 from henrialb/typo
Fix typo in docs
2024-04-18 11:59:57 +07:00
natsoni
bbaa5dafb9
Separate mining and audit subscriptions 2024-04-17 16:41:30 +02:00
wiz
cee1b39640
Merge pull request #4980 from mempool/mononaut/fix-acc-button-conditions 2024-04-17 04:06:27 +09:00
Mononaut
e388410e34
Re-add accelerate button on deep mempool txs 2024-04-16 18:52:13 +00:00
natsoni
c2d649d3f4
Improve tooltip position in block overview on mobile 2024-04-16 16:02:39 +02:00
wiz
d9dec44c8f
Merge pull request #4977 from mempool/nymkappa/fix-copy
[accelerator] fix pizza accel copy/eta
2024-04-16 21:14:56 +09:00
wiz
c94a3a98eb
Change "Settlement" to "Confirmation" 2024-04-16 21:14:45 +09:00
nymkappa
ec9b8359df
[accelerator] fix pizza accel copy/eta x2 2024-04-16 21:12:25 +09:00
nymkappa
3db89e3dee
[accelerator] fix pizza accel copy/eta 2024-04-16 21:09:30 +09:00
wiz
7f8dc74146
Merge pull request #4975 from mempool/nymkappa/mini-branch
[accelerator] polish pizza accel
2024-04-16 17:11:55 +09:00
wiz
83cea33727
Merge pull request #4969 from mempool/nymkappa/missing-accelerate-button-mobile
[accelerator] re-add missing accelerator button on mobile, set locati…
2024-04-16 17:02:25 +09:00
nymkappa
ada18a0413
[accelerator] fix redirects 2024-04-16 17:02:10 +09:00
nymkappa
96d85dcacd
[accelerator] polish pizza accel x2 2024-04-16 16:56:37 +09:00
nymkappa
64ba033602
[accelerator] polish pizza accel 2024-04-16 16:01:52 +09:00
nymkappa
26807e80db
Merge branch 'nymkappa/accel-summary-default' into nymkappa/mini-branch 2024-04-16 14:43:01 +09:00
nymkappa
e4f00285b3
Merge branch 'nymkappa/polish-accel' into nymkappa/mini-branch 2024-04-16 14:42:53 +09:00
nymkappa
d443e51d30
[accelerator] if eligible, show pizza accel summary by default 2024-04-16 11:45:04 +09:00
softsimon
b4352f5f25
Merge pull request #4972 from mempool/dependabot/github_actions/dtolnay/rust-toolchain-bb45937a053e097f8591208d8e74c90db1873d07
Bump dtolnay/rust-toolchain from dc6353516c68da0f06325f42ad880f76a5e77ec9 to bb45937a053e097f8591208d8e74c90db1873d07
2024-04-15 18:10:12 +07:00
softsimon
2c1b4a2547
Merge pull request #4955 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.9.4
Bump mysql2 from 3.9.1 to 3.9.4 in /backend
2024-04-15 18:09:56 +07:00
softsimon
b54685bed7
Merge pull request #4973 from mempool/natsoni/fix-dropdown-menu-color
Adapt dropdown menu color to theme
2024-04-15 18:02:54 +07:00
natsoni
9032d5ac11
Adapt dropdown menu color to theme 2024-04-15 12:35:15 +02:00
dependabot[bot]
942747a0be
Bump dtolnay/rust-toolchain
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from dc6353516c68da0f06325f42ad880f76a5e77ec9 to bb45937a053e097f8591208d8e74c90db1873d07.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](dc6353516c...bb45937a05)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 03:00:06 +00:00
nymkappa
fdd6463ac0
[ui] polish pizza accelerator 2024-04-14 16:29:56 +09:00
nymkappa
e9afc4ec0f
remove duplicated condition 2024-04-14 13:55:49 +09:00
nymkappa
dff811f615
[accelerator] re-add missing accelerator button on mobile, set location.hash when click on accelerate button 2024-04-14 13:54:25 +09:00
wiz
d1e382ddf7
Merge pull request #4967 from mempool/mononaut/fix-acc-fee-rate-again
Fix accelerated fee rate again
2024-04-14 13:20:06 +09:00
wiz
ccd460cf70
Merge pull request #4968 from mempool/mononaut/54-year-pizza
Fix first seen loading time in tx tracker
2024-04-14 13:18:56 +09:00
Mononaut
7b1ba912be
Fix first seen loading time in tx tracker 2024-04-14 03:49:26 +00:00
Mononaut
f3864c9100
Fix accelerated fee rate again 2024-04-14 03:21:24 +00:00
wiz
1082889b64
Merge pull request #4966 from mempool/nymkappa/fix-fee-paid
[accelerator] fix fee paid calculation
2024-04-14 00:20:42 +09:00
nymkappa
36839fdcb9
[accelerator] fix fee paid calculation 2024-04-14 00:19:14 +09:00
wiz
ebe54d47d8
Merge pull request #4965 from mempool/nymkappa/remove-prepaid-tx
[accelerator] remove simple mode from tx page
2024-04-14 00:15:02 +09:00
nymkappa
7219823847
[accelerator] remove simple mode from tx page 2024-04-14 00:10:15 +09:00
wiz
336fc7a64a
Merge pull request #4964 from mempool/mononaut/bitcoin-tracker
Add Bitcoin logo to tracker header
2024-04-13 23:20:46 +09:00
Mononaut
84f62f8025
Add Bitcoin logo to tracker page 2024-04-13 14:18:01 +00:00
wiz
6bd6dfec49
Merge pull request #4963 from mempool/nymkappa/accel-checkout
[accelerator] remove test code
2024-04-13 23:13:29 +09:00
nymkappa
a6e27f1312
Merge branch 'master' into nymkappa/accel-checkout 2024-04-13 23:13:02 +09:00
nymkappa
c913df837a
[accelerator] remove test code 2024-04-13 23:12:05 +09:00
wiz
42bd9811e3
Merge pull request #4962 from mempool/nymkappa/accel-checkout
[accelerator] polish prepaid accel UI
2024-04-13 23:09:03 +09:00
wiz
7fbf13fd9d
Merge pull request #4961 from mempool/mononaut/pizza-layout
Change tx tracker layout
2024-04-13 23:08:10 +09:00
nymkappa
fb086b5ad5
[accelerator] polish UI prepaid accel 2024-04-13 23:07:19 +09:00
Mononaut
d4f51979d4
Change tx tracker layout 2024-04-13 13:56:29 +00:00
wiz
aeb54f59f1
Merge pull request #4960 from mempool/mononaut/change-toppings
change pizza tracker toppings
2024-04-13 22:17:10 +09:00
Mononaut
5ca3b24527
Fix accelerate arrow, add accelerating status 2024-04-13 13:14:26 +00:00
Mononaut
88df2878cb
Add logo to tx tracker page, fix bugs 2024-04-13 12:26:30 +00:00
nymkappa
f601bbc499
Merge branch 'master' into nymkappa/accel-checkout 2024-04-13 21:13:11 +09:00
nymkappa
24e9ae6440
[accelerator] re-integrate square payment WIP 2024-04-13 20:53:19 +09:00
wiz
8c3f11622c
Merge pull request #4959 from mempool/mononaut/pizza
WIP (work-in-pizza)
2024-04-13 19:02:22 +09:00
Mononaut
da25ed431f
hijack /tx/ page for tracker users 2024-04-13 09:24:52 +00:00
Mononaut
ecc234a96a
Tracker bottom panel with status icon 2024-04-13 09:09:14 +00:00
Mononaut
29851537eb
Prototype accelerate checkout properties 2024-04-13 09:09:13 +00:00
nymkappa
5f2d7b32ae
[accelerator] concept accelerator a/b ctas 2024-04-13 09:09:13 +00:00
Mononaut
de00d49d7b
Basic tracker page structure 2024-04-13 09:09:09 +00:00
wiz
bafa0f50fc
Merge pull request #4958 from mempool/wiz/20240413-add-new-lightning-nodes
Add new VA1/FRA lightning nodes
2024-04-13 17:56:13 +09:00
wiz
80c75f9aeb
Add new FRA lightning nodes 2024-04-13 17:49:29 +09:00
wiz
407eba194d
Add new VA1 lightning nodes 2024-04-13 17:37:54 +09:00
Mononaut
2eac3e6555
Add pizza tracker component 2024-04-13 08:05:31 +00:00
Mononaut
61a308cbc6
Add simplified tracker blockchain component 2024-04-13 08:04:58 +00:00
nymkappa
49b9a6f53d
[accelerator] concept accelerator a/b ctas 2024-04-13 16:11:49 +09:00
wiz
db1cc0d0e1
Merge pull request #4953 from mempool/nymkappa/use-bid-boost-accel-list
[accelerator] use new bidBoost field
2024-04-13 14:59:33 +09:00
Henrique Albuquerque
f89bd5b972 Add contributor statement 2024-04-12 18:05:18 +01:00
Henrique Albuquerque
d94a8cb58c Fix typo 2024-04-12 17:59:31 +01:00
dependabot[bot]
faf79e85fd
Bump mysql2 from 3.9.1 to 3.9.4 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.9.1 to 3.9.4.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.9.1...v3.9.4)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 16:14:46 +00:00
softsimon
0d72e88c6a
Updated from transifex 2024-04-12 16:18:39 +09:00
Mononaut
786ec7fff1
Mobile transaction tracker page 2024-04-12 07:16:01 +00:00
softsimon
8df497e53d
Merge pull request #4954 from mempool/simon/convert-paid-currency-api
Convert v3 Currency api into v1
2024-04-12 16:07:50 +09:00
softsimon
1dd7a6ebac
Convert v3 api into v1 2024-04-12 15:59:33 +09:00
nymkappa
2c12e9f64b
[accelerator] use new bidBoost field 2024-04-12 15:12:25 +09:00
softsimon
9a77135d30
Merge pull request #4952 from mempool/simon/paid-currency-api
Paid currency api support
2024-04-12 14:42:56 +09:00
softsimon
f3b3b9b3f0
Adding new config to sample 2024-04-12 14:15:50 +09:00
softsimon
55c4d4d03d
Paid currency api support 2024-04-12 14:10:47 +09:00
softsimon
061d341d8b
Merge pull request #4949 from mempool/mononaut/delta-sequence
Add sequence number to mempool block updates
2024-04-12 00:30:30 +09:00
softsimon
1c29b8b260
Merge pull request #4950 from mempool/natsoni/fix-timestamp-datetime
Update prices table  'time' field to datetime
2024-04-11 21:07:26 +09:00
natsoni
79bfe9c866
Change time field to datetime 2024-04-11 17:56:34 +09:00
Mononaut
3e6d38656d
Add sequence number to mempool block updates 2024-04-11 08:11:45 +00:00
softsimon
5697486cea
Merge pull request #4947 from mempool/mononaut/hide-accelerate-panel-already
Hide accelerate panel if not needed
2024-04-11 15:54:55 +09:00
softsimon
df0da605e4
Merge pull request #4948 from mempool/mononaut/54-years
it hasn't been 54 years since this transaction was submitted
2024-04-11 15:54:39 +09:00
Mononaut
fa9aaf0423
Keep firstSeen loader, retry on fail 2024-04-11 06:03:14 +00:00
Mononaut
89de288fec
it hasn't been 54 years since this transaction was submitted 2024-04-11 04:02:25 +00:00
Mononaut
940003552b
Hide acceleration panel if tx is already accelerated 2024-04-10 11:14:13 +00:00
Mononaut
0660296b51
Disable accelerate button on successful submission 2024-04-10 11:14:13 +00:00
softsimon
affeb0a169
Merge pull request #4943 from mempool/nymkappa/fix-missing-qr-code
[accelerator] fix missing qr code
2024-04-10 19:15:04 +09:00
softsimon
2504653426
Merge pull request #4207 from mempool/mononaut/sipper
Proof-of-concept "sipper" lightweight pages for web crawlers
2024-04-10 18:29:42 +09:00
softsimon
b6a9ad67d3
Merge pull request #4946 from mempool/mononaut/acc-dash-vbytes
Switch success rate to total vsize
2024-04-10 18:12:48 +09:00
Mononaut
3d4741eac2
Fix acceleration skeleton loader titles 2024-04-10 09:03:31 +00:00
softsimon
5611f57e9e
Merge pull request #4945 from mempool/mononaut/acc-dash-times
Add timespan toggle to acceleration dashboard
2024-04-10 18:00:25 +09:00
softsimon
44027f5bc0
Pull from transifex 2024-04-10 17:02:35 +09:00
Mononaut
41b25a78e9
adjust accelerator dashboard mobile fields 2024-04-10 07:22:02 +00:00
Mononaut
e263f94765
Switch success rate for total vsize on acceleration dashboard 2024-04-10 06:52:54 +00:00
Mononaut
80c7754e48
Add timespan toggle to acceleration dashboard 2024-04-10 06:27:48 +00:00
softsimon
165340324c
Merge pull request #4944 from mempool/natsoni/more-css-fix
More css fixes
2024-04-10 15:15:47 +09:00
softsimon
735dddd604
Merge pull request #4941 from mempool/natsoni/polish-footer
Polish global footer
2024-04-10 15:03:13 +09:00
natsoni
3e3bd32705
Convert more css to variables 2024-04-10 14:41:19 +09:00
softsimon
f83025a9ff
Merge pull request #4939 from mempool/hunicus/natsoni-formatting
Make room for natsoni as project member
2024-04-10 14:40:10 +09:00
softsimon
ba6a7b58aa
Merge pull request #4942 from mempool/natsoni/fix-header-color-theme
Fix header color theme
2024-04-10 14:37:56 +09:00
nymkappa
fb8808ea59
[accelerator] fix redirect url, fix UX 2024-04-10 14:33:33 +09:00
nymkappa
73f241e9c3
Revert "Disable accelerate button after submission"
This reverts commit e55b1740db5d5d2ba9a15d201400abdad08787e7.
2024-04-10 13:53:21 +09:00
softsimon
317b1b6ac5
Merge pull request #4909 from mempool/nymkappa/unix-socket
[server] express server also listens on unix socket
2024-04-10 13:41:14 +09:00
natsoni
cabe629f17
Add icon color variable to color themes 2024-04-10 12:26:00 +09:00
natsoni
9f6521b987
Update navbar background color 2024-04-10 12:25:30 +09:00
hunicus
6daffe5b13
Make room for natsoni as project member 2024-04-10 11:39:25 +09:00
nymkappa
4c7f93d1ef
fix tests 2024-04-10 09:46:05 +09:00
natsoni
f81bbb93a5
Polish global footer 2024-04-09 20:55:14 +09:00
wiz
b0058e94ce
Merge pull request #4938 from mempool/nymkappa/accel-graph
[accelerator] show 1w accel graph by default
2024-04-09 20:17:51 +09:00
nymkappa
de069f704a
[accelerator] show 1w accel graph by default 2024-04-09 18:10:53 +09:00
wiz
bcb8493cd0
Merge pull request #4937 from mempool/mononaut/disable-acc-button
disable accelerate button after submission
2024-04-09 18:07:30 +09:00
Mononaut
e55b1740db
Disable accelerate button after submission 2024-04-09 08:31:24 +00:00
softsimon
df673b2a4e
Pull from transifex 2024-04-09 16:58:02 +09:00
wiz
a4753769d2
Merge pull request #4936 from mempool/natsoni/add-wiz-theme
Add wiz theme
2024-04-09 16:50:31 +09:00
wiz
be75a87e88
Merge pull request #4935 from mempool/mononaut/acc-rate-tooltips
Fix accelerated fee rate in mined block tooltips
2024-04-09 16:50:21 +09:00
nymkappa
0ac3ae1cb1
Update docker/backend/start.sh
Co-authored-by: softsimon <softsimon@users.noreply.github.com>
2024-04-09 16:50:04 +09:00
wiz
a5e1e95534
Fix capitalization of "wiz" theme 2024-04-09 16:49:41 +09:00
natsoni
7f6ab0b854
Add wiz theme 2024-04-09 16:43:02 +09:00
Mononaut
8420ecd380
Fix accelerated fee rate in mined block tooltips 2024-04-09 07:22:24 +00:00
softsimon
192fd09a00
Merge pull request #4933 from mempool/natsoni/fix-address-component-subscriptions
Fix subscription management in address component
2024-04-09 16:18:57 +09:00
softsimon
d9a59c6d1e
Accelerator i18n fixes 2024-04-09 16:15:26 +09:00
softsimon
69c3c3162c
Theme selector i18n fix 2024-04-09 16:08:58 +09:00
softsimon
61ba832dfd
Merge pull request #4932 from mempool/natsoni/remove-console-log
Remove console log
2024-04-09 15:17:34 +09:00
natsoni
f332bba468
Remove console log 2024-04-09 15:14:50 +09:00
nymkappa
ba8cca6ba5
Merge branch 'master' into nymkappa/unix-socket 2024-04-09 15:11:52 +09:00
nymkappa
7a098952c8
[server] disable unix socket listening by default 2024-04-09 15:11:40 +09:00
softsimon
347b74a55d
Theme elector width fix 2024-04-09 14:51:54 +09:00
wiz
d5b0adeeed
Merge pull request #4931 from mempool/nymkappa/additional-error-message
add additional error message
2024-04-09 14:50:05 +09:00
softsimon
d8c4d36d4b
Rename themes 2024-04-09 14:49:24 +09:00
nymkappa
aac32c5bff
add additional error message 2024-04-09 14:33:18 +09:00
softsimon
ff86e55622
Merge pull request #4916 from mempool/natsoni/high-contrast-theme
High contrast theme (duplicate)
2024-04-09 14:33:09 +09:00
wiz
894c4cb139
Merge pull request #4930 from mempool/mononaut/filter-acc
Filter accelerations for matching pool
2024-04-09 14:32:27 +09:00
softsimon
2792016383
Fix relative imports 2024-04-09 14:24:34 +09:00
wiz
46215871aa
Merge pull request #4928 from mempool/hunicus/bid-boost-link
Make bid boost widget link clickable on mobile
2024-04-09 14:24:28 +09:00
natsoni
cfc06be975
Fix subscription management in address component 2024-04-09 14:21:08 +09:00
natsoni
527589ac04
Merge branch 'master' into natsoni/high-contrast-theme 2024-04-09 12:13:11 +09:00
Mononaut
43845cda5c
Filter accelerations for matching pool 2024-04-09 00:08:50 +00:00
wiz
b74b8a8a5a
Merge pull request #4929 from mempool/mononaut/fix-acc-rate-labels
Fix accelerated rate labels
2024-04-08 23:13:20 +09:00
Mononaut
226c6d8432
More acceleration labelling fixes 2024-04-08 14:08:11 +00:00
Mononaut
9f79258dec
Fix accelerated/effective rate labelling 2024-04-08 13:45:05 +00:00
Mononaut
13bcc99095
Fix block summary data fields 2024-04-08 13:44:08 +00:00
hunicus
fef9b93a05
Merge branch 'master' into hunicus/bid-boost-link 2024-04-08 22:17:10 +09:00
hunicus
ccac3437cf
Make bid boost widget link clickable on mobile 2024-04-08 22:09:52 +09:00
wiz
e849a31668
Merge pull request #4926 from mempool/nymkappa/duplicated-accel
[accelerator] fix possible duplicated accel request call
2024-04-08 21:57:17 +09:00
nymkappa
88de5412f8
[accelerator] reset cashapp upon price update 2024-04-08 21:55:47 +09:00
wiz
d13c48d31d
Merge pull request #4925 from mempool/simon/fix-first-seen-skeleton
Fix first seen skeleton loader
2024-04-08 21:55:31 +09:00
softsimon
4c807866a3
Fix first seen skeleton loader 2024-04-08 21:44:29 +09:00
nymkappa
d7a4a95c05
[accelerator] avoid duplicated accel request 2024-04-08 21:43:06 +09:00
wiz
b35422ff9f
Merge pull request #4922 from mempool/mononaut/actually-fix-sticky-button
Actually fix sticky button
2024-04-08 21:32:28 +09:00
wiz
b6be5d71bb
Merge pull request #4923 from mempool/mononaut/wider-sticky-button
Slightly wider sticky button
2024-04-08 21:32:12 +09:00
wiz
4c5eddcf6d
Merge pull request #4924 from mempool/mononaut/fix-acc-fee-rate
Fix missing accelerated fee rate again
2024-04-08 21:31:27 +09:00
softsimon
51f0b75a64
Merge pull request #4917 from mempool/natsoni/fix-liquid-dropdown-position
Fix dropdown menu position in Liquid
2024-04-08 21:03:39 +09:00
softsimon
fe4648cd9e
Update frontend/src/app/components/liquid-master-page/liquid-master-page.component.scss 2024-04-08 21:03:25 +09:00
softsimon
03867ada49
Merge pull request #4887 from mempool/mononaut/local-acceleration-data
Local acceleration data
2024-04-08 20:43:46 +09:00
Mononaut
7959188c06
Fix missing accelerated fee rate again 2024-04-08 11:36:22 +00:00
Mononaut
11eaa0ca50
Fix NaN boost 2024-04-08 11:22:57 +00:00
Mononaut
dc6dba416a
Fix missing boost 2024-04-08 11:22:57 +00:00
Mononaut
c8e7cc773a
Always use local data for pending/historical accelerations 2024-04-08 11:22:57 +00:00
Mononaut
efe43329a1
Support PREFER_LOCAL for /accelerations(/history) 2024-04-08 11:22:56 +00:00
Mononaut
3f97c17af2
Fetch block accelerations by height instead of hash 2024-04-08 11:22:56 +00:00
Mononaut
91493e8769
Roll back local acceleration data on reorg 2024-04-08 11:22:56 +00:00
softsimon
5f36cb88ab
Merge pull request #4895 from mempool/hunicus/txacc-faq
Add note about accelerator waitlist to faq
2024-04-08 18:44:40 +09:00
Mononaut
a0ef635c92
Slightly wider sticky button 2024-04-08 09:36:45 +00:00
natsoni
d68904fec0
More contrast theme fixes 2024-04-08 18:32:59 +09:00
Mononaut
b679581cf2
Actually fix sticky button 2024-04-08 09:25:53 +00:00
softsimon
f7e6fa026d
Merge pull request #4921 from mempool/mononaut/fix-accel-highlight
Fix new acceleration visualization color change
2024-04-08 18:04:23 +09:00
softsimon
96f16f1f2e
Merge pull request #4914 from mempool/hunicus/why-no-confirm
Remove another faq reference to tx-acc
2024-04-08 18:01:34 +09:00
Mononaut
ad8fa8722f
Fix new acceleration color change 2024-04-08 09:00:51 +00:00
wiz
e477f09cd5
Merge pull request #4920 from mempool/mononaut/fix-tx-autoscroll
Fix tx autoscroll
2024-04-08 17:59:54 +09:00
Mononaut
be5eb9ef70
Fix tx autoscroll 2024-04-08 08:51:35 +00:00
wiz
b952642570
Update staging URLs for prod Square SDK load 2024-04-08 17:12:38 +09:00
wiz
47cc74a351
Merge pull request #4913 from mempool/mononaut/simple-acceleration-mode
Simplified acceleration mode for mobile
2024-04-08 17:06:20 +09:00
wiz
cff572a104
Merge branch 'master' into mononaut/simple-acceleration-mode 2024-04-08 17:05:51 +09:00
Mononaut
48e16e64c2
Simple mode redesign w/ sticky button 2024-04-08 08:05:22 +00:00
wiz
46172836f1
Merge pull request #4915 from mempool/simon/fix-mobile-initial-zoom
Fix initial zoom behavior on mobile
2024-04-08 16:13:18 +09:00
wiz
eacb72a05b
Merge pull request #4912 from mempool/mononaut/accelerated-fee-rates
Fix accelerated fee rates
2024-04-08 16:10:55 +09:00
softsimon
c1fefaab92
Pull from transifex 2024-04-08 16:01:26 +09:00
natsoni
f2f86457ee
Fix dropdown menu position in Liquid 2024-04-08 15:53:51 +09:00
natsoni
c251b5831b
Merge branch 'master' into natsoni/contrast-theme 2024-04-08 14:54:38 +09:00
softsimon
8c589d3000
Fix initial zoom behavior on mobile
fixes #4875
2024-04-08 14:54:33 +09:00
hunicus
ddc599f6b7
Remove another faq reference to tx-acc 2024-04-08 14:18:53 +09:00
hunicus
6822c3a04b
Merge branch 'master' into hunicus/txacc-faq 2024-04-08 14:00:00 +09:00
Mononaut
aa0c70bd44
Simplified acceleration mode for mobile 2024-04-08 04:58:56 +00:00
hunicus
94f649b345
Add condition for officialmempoolspace 2024-04-08 13:50:48 +09:00
Mononaut
5e07e9dceb
Fix accelerated fee rates 2024-04-08 03:03:26 +00:00
softsimon
91a8a8be34
Merge pull request #4911 from daweilv/master
fix(address): clicking on the Balance History chart within the /testnet/address/:id page would incorrectly navigate to /tx/:tx
2024-04-08 11:41:54 +09:00
natsoni
99e1890795
Fix footer to fit with theme selector 2024-04-08 10:50:59 +09:00
Metadavid
5583befbba
Update daweilv.txt 2024-04-07 21:42:36 +08:00
Metadavid
c637055859
Update daweilv.txt 2024-04-07 21:20:42 +08:00
Metadavid
c3acfb8781
Update address-graph.component.ts
fix(address): Clicking on the Balance History chart within the /testnet/address/:id page under testnet now navigates to /testnet/tx/:tx instead of /tx/:tx.
2024-04-07 21:04:23 +08:00
Metadavid
fd073a7043
Add files via upload 2024-04-07 21:03:20 +08:00
nymkappa
bed00fbd41
[server] express server also listens on unix socket 2024-04-07 18:39:37 +09:00
softsimon
501b79fdce
Italian and Spanish fineshed 2024-04-07 10:43:17 +09:00
softsimon
ed6af8f560
Merge pull request #4906 from mempool/mononaut/acceleration-harmony
Acceleration sound
2024-04-06 19:02:26 +09:00
Mononaut
32495736d4
such bright wow harmony 2024-04-06 09:58:07 +00:00
wiz
bff48b0a64
Merge pull request #4901 from mempool/nymkappa/clear-state
[accelerator] clear state after loading preview
2024-04-06 18:47:46 +09:00
softsimon
f6228240ba
Transifex pull 2024-04-06 18:04:39 +09:00
softsimon
215c8a7ff4
Merge pull request #4902 from mempool/mononaut/disappearing-effective-rates
Fix disappearing effective/accelerated fee rates
2024-04-06 18:00:07 +09:00
softsimon
0f217bd753
Merge pull request #4903 from mempool/mononaut/bright-purple
Don't apply age tint to accelerated txs
2024-04-06 17:39:24 +09:00
natsoni
7e920f4bae
Replace more hardcoded css 2024-04-06 17:14:53 +09:00
natsoni
cde3d878b1
Fix block overview graph on contrast theme 2024-04-06 15:59:42 +09:00
natsoni
621a6ea42d
Fix rbf tree fade out 2024-04-06 15:59:36 +09:00
natsoni
cfc3615e64
Fix global footer selector css 2024-04-06 15:59:30 +09:00
natsoni
2f8d0d90cd
Update theme-contrast.css 2024-04-06 15:59:26 +09:00
natsoni
c827953ca5
Fix remaining bugs from rebase 2024-04-06 15:59:07 +09:00
Mononaut
79dd263fb1
add high contrast theme 2024-04-06 15:56:53 +09:00
Mononaut
1ca05a029a
add theme selector to main dashboard 2024-04-06 15:56:22 +09:00
Mononaut
4c205eb09d
implement theme switching service 2024-04-06 15:55:47 +09:00
natsoni
ee92f6639a
convert to CSS variables 2024-04-06 15:54:55 +09:00
Mononaut
7721f16f9f
Don't apply age tint to accelerated txs 2024-04-06 03:44:58 +00:00
nymkappa
854222b8cc
[accelerator] clear state after loading preview 2024-04-06 12:32:33 +09:00
Mononaut
0bc86541c6
Fix disappearing effective/accelerated fee rates 2024-04-06 03:22:56 +00:00
softsimon
c45111333d
Fix space 2024-04-06 11:58:48 +09:00
softsimon
ba6fedc430
Merge pull request #4900 from mempool/nymkappa/fix-accel-preview-autoscroll
[accelerator] fix accel preview autoscroll
2024-04-05 21:06:57 +09:00
nymkappa
caa34fa8bb
[accelerator] fix accel preview autoscroll 2024-04-05 20:59:15 +09:00
softsimon
fa7c0ab58e
Pull from transifex 2024-04-05 20:46:37 +09:00
wiz
2543eb6861
Merge pull request #4899 from mempool/nymkappa/polish-button
[accelerator] fix label accelerate button
2024-04-05 20:45:27 +09:00
nymkappa
c4cf3363ee
[accelerator] fix label accelerate button 2024-04-05 20:39:43 +09:00
softsimon
98d4efd509
Merge pull request #4889 from mempool/mononaut/non-esplora-inscription-goggles
Add support for inscription goggles for non-esplora backends
2024-04-05 18:28:07 +09:00
softsimon
a99e65ee48
Merge branch 'master' into mononaut/non-esplora-inscription-goggles 2024-04-05 18:28:01 +09:00
wiz
3fd4d24c93
Merge pull request #4897 from mempool/nymkappa/fix-preview-loading
[accelerator] fix spinner loading
2024-04-05 18:23:38 +09:00
nymkappa
55a564a5a8
[accelerator] fix spinner loading 2024-04-05 17:52:07 +09:00
softsimon
04f6490eeb
Merge branch 'master' into mononaut/non-esplora-inscription-goggles 2024-04-05 17:48:55 +09:00
softsimon
b5026789d6
Merge pull request #4896 from mempool/nymkappa/fix-referrer
[accelator] fix referrer check
2024-04-05 17:38:47 +09:00
nymkappa
705e570cf5
[accelator] fix referrer check 2024-04-05 17:36:04 +09:00
softsimon
10a41fb0d1
Merge pull request #4804 from mempool/nymkappa/prepaid-acceleration
[accelerator] prepaid acceleration
2024-04-05 17:32:46 +09:00
hunicus
2a591646c3
Add note about accelerator waitlist to faq 2024-04-05 16:53:19 +09:00
softsimon
e55898b414
Merge pull request #4891 from mempool/mononaut/tx-details-stripes
Transaction details template refactor
2024-04-05 16:50:41 +09:00
Mononaut
2df476406d
Transaction details template refactor 2024-04-05 07:46:48 +00:00
softsimon
4a05b35f2b
Pulling from transifex 2024-04-05 16:46:23 +09:00
softsimon
3ad8e56c25
Accelerations i18n key fix 2024-04-05 16:30:26 +09:00
softsimon
c1704758fd
Merge pull request #4893 from mempool/simon/build-target-es2020
Set build target to es2020
2024-04-05 16:26:38 +09:00
softsimon
fe580f2b2b
Merge pull request #4894 from mempool/hunicus/esplora-docs
Switch blockstream/electrs for mempool/electrs in backend readme
2024-04-05 16:19:35 +09:00
hunicus
d82e482acc
Update readme: blockstream/electrs for mempool/electrs 2024-04-05 15:59:16 +09:00
softsimon
9d6142dc79
Merge pull request #4892 from mempool/hunicus/memsplora
Switch blockstream/electrs for mempool/electrs in faq
2024-04-05 15:57:14 +09:00
softsimon
2dec83735b
Set build target to es2020 2024-04-05 15:56:10 +09:00
softsimon
9f4204b815
Remove goggles i18n 2024-04-05 15:50:34 +09:00
hunicus
40f2c972d7
Update faq: blockstream/electrs for mempool/electrs 2024-04-05 15:50:15 +09:00
softsimon
eee2385d0d
Merge pull request #4886 from mempool/nymkappa/mempool-goggle-tm
[copy] add missing trademark to Mempool Goggles
2024-04-05 14:48:43 +09:00
softsimon
492c652157
Merge pull request #4885 from mempool/natsoni/fix-side-nav-on-rtl
Fix side panel for rtl languages
2024-04-05 14:47:36 +09:00
softsimon
af8e060dc6
A few goggles i18n 2024-04-05 12:37:17 +09:00
softsimon
6a19b9058f
Merge pull request #4888 from mempool/mononaut/tint
Goggles age tint by default
2024-04-05 12:36:24 +09:00
nymkappa
bcbd21b922
[acclerator] load square for prepaid acceleration 2024-04-05 11:16:48 +09:00
nymkappa
aac76d68b0
Merge branch 'master' into nymkappa/prepaid-acceleration 2024-04-05 11:14:16 +09:00
softsimon
25bb942e04
Fixing the other i18n 2024-04-04 21:55:14 +09:00
softsimon
8ac71f21d1
Updating i18n for accelerator preview 2024-04-04 21:48:16 +09:00
Mononaut
287559f028
Add support for inscription goggles for non-esplora backends 2024-04-04 12:32:03 +00:00
Mononaut
7fbb93cf41
Goggles age tint by default 2024-04-04 11:33:51 +00:00
nymkappa
7b76e93631
Update messages.ca.xlf 2024-04-04 18:26:38 +08:00
wiz
896c451c3e
Merge pull request #4884 from mempool/nymkappa/about-page 2024-04-04 19:18:48 +09:00
natsoni
0874386001
Fix side panel for rtl languages 2024-04-04 19:00:04 +09:00
nymkappa
ce6808b3c4
[copy] add missing trademark to Mempool Goggles 2024-04-04 18:01:01 +09:00
softsimon
40fa1c5acb
Some language string updates 2024-04-04 17:51:42 +09:00
nymkappa
7307990f6f
[about page] enable sponsors on self hosted 2024-04-04 17:36:37 +09:00
softsimon
5104da500e
Adding i18n to mempool goggles 2024-04-04 17:28:32 +09:00
softsimon
3a8c46bbed
Merge pull request #4837 from mempool/mononaut/goggles-age-filter
Goggles age filter
2024-04-04 16:47:34 +09:00
Mononaut
fc5312549d
Switch gradient toggle fee -> default 2024-04-04 07:42:31 +00:00
softsimon
c14e8797e2
Merge pull request #4879 from mempool/nymkappa/proxy-accel-endpoints
[accelerator] proxy acceleration api to prod
2024-04-04 16:20:27 +09:00
nymkappa
0f26940018
Merge branch 'master' into nymkappa/proxy-accel-endpoints 2024-04-04 16:01:17 +09:00
Mononaut
26227e2f3b
New opacity-based age Goggles 2024-04-04 06:57:38 +00:00
Mononaut
dcf78fab06
Block visualization color-by-age mode 2024-04-04 06:57:37 +00:00
softsimon
0813592a6d
Merge pull request #4882 from mempool/nymkappa/reset-pool-sha
[migration] reset mining pool sha to force refreshing
2024-04-04 15:20:04 +09:00
nymkappa
abdb27af3f
[migration] reset mining pool sha to force refreshing 2024-04-04 14:27:50 +09:00
nymkappa
b421be3315
[accelerator] also forward headers 2024-04-04 14:04:12 +09:00
softsimon
b74fbee069
Merge pull request #4881 from mempool/nymkappa/proxy-sponsors
[about page] proxy community sponsors apis to prod, small refactor
2024-04-04 14:02:00 +09:00
nymkappa
dab9357b40
[about page] proxy community sponsors apis to prod, small refactor 2024-04-04 13:56:39 +09:00
softsimon
ccd89604c0
Merge pull request #4856 from mempool/hunicus/docs-links-alignment
Fix api-docs anchor link vertical alignment
2024-04-04 13:54:53 +09:00
Felipe Knorr Kuhn
cd135b7171
Merge branch 'master' into nymkappa/proxy-accel-endpoints 2024-04-04 13:14:54 +09:00
softsimon
7e16d550b0
Merge pull request #4880 from mempool/knorrium/enable_fiat_price_again
Enable fiat price conversion again
2024-04-04 13:14:24 +09:00
nymkappa
404079ef4e
[accelerator] use config.MEMPOOL_SERVICES.API url 2024-04-04 13:10:32 +09:00
Felipe Knorr Kuhn
d13f78f046
Enable fiat price conversion again 2024-04-04 13:10:11 +09:00
nymkappa
60040c3914
[accelerator] proxy acceleration api to prod 2024-04-04 12:57:54 +09:00
softsimon
e408fbd8d6
Merge branch 'master' into hunicus/docs-links-alignment 2024-04-04 12:40:14 +09:00
softsimon
6931ecd468
Merge pull request #4878 from mempool/dependabot/npm_and_yarn/backend/multi-b37afcb6a9
Bump ws and @types/ws in /backend
2024-04-04 12:31:27 +09:00
dependabot[bot]
ed5d30ea5b
Bump ws and @types/ws in /backend
Bumps [ws](https://github.com/websockets/ws) and [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws). These dependencies needed to be updated together.

Updates `ws` from 8.13.0 to 8.16.0
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.13.0...8.16.0)

Updates `@types/ws` from 8.5.5 to 8.5.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/ws"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 02:49:18 +00:00
wiz
ead7613579
Merge pull request #4877 from mempool/nymkappa/truncate-hashrate-difficulty
[migration] re-index hashrates and difficulty_adjustments
2024-04-04 11:05:16 +09:00
wiz
ca0613ec17
Merge pull request #4876 from mempool/knorrium/change_default_replication_settings
Update default settings for Docker
2024-04-04 11:05:04 +09:00
nymkappa
727208ff84
[migration] re-index hashrates and difficulty_adjustments 2024-04-04 10:57:54 +09:00
Felipe Knorr Kuhn
53c3de2af5
Update default settings for Docker 2024-04-04 10:49:32 +09:00
softsimon
3f50d57ed1
Fix test broke due to i18n key change 2024-04-03 21:44:48 +09:00
softsimon
55f9d0f875
Merge branch 'master' into hunicus/docs-links-alignment 2024-04-03 18:57:46 +09:00
softsimon
37cb9b0fe8
Merge pull request #4872 from mempool/natsoni/fix-fiat-selector-sorting
Sort currency by ticker in fiat selector
2024-04-03 18:57:24 +09:00
softsimon
a3b5f79094
Merge pull request #4871 from mempool/natsoni/fix-liquid-testnet
Fix Liquid testnet broken blocks
2024-04-03 18:55:55 +09:00
softsimon
1b1ffa7109
Transifex pull 04-03 2024-04-03 18:47:16 +09:00
softsimon
2b3021c8fe
Merge pull request #4873 from mempool/simon/i18n-improvements-04-02
i18n corrections and merging
2024-04-03 18:18:29 +09:00
softsimon
0ccc47786d
Merge pull request #4874 from mempool/knorrium/fix_docker_for_rust
Fix the Docker workflow for the new Rust steps
2024-04-03 18:17:06 +09:00
softsimon
24366b929e
i18n corrections and merging 2024-04-03 18:13:42 +09:00
Felipe Knorr Kuhn
2cab2a7885
Read FD from the environment variables 2024-04-03 18:13:14 +09:00
Felipe Knorr Kuhn
4284038c4b
Fix error when deleting the missing @napi-rs folder 2024-04-03 18:12:51 +09:00
Felipe Knorr Kuhn
425d158777
Update Dockerfile to work with the new Rust steps 2024-04-03 18:12:26 +09:00
Felipe Knorr Kuhn
1a11b1813f
Add more build contexts for the backend and rust-gbt 2024-04-03 18:11:58 +09:00
wiz
85a86d4b06
ops: Add backend git hash check 2024-04-03 17:28:58 +09:00
natsoni
073578243c
Fix fiat selector sorting 2024-04-03 16:34:56 +09:00
wiz
69578f8086
Merge pull request #4820 from mempool/nymkappa/polish-enterprise-logo
[enterprise] polish enterprise logo
2024-04-03 16:17:37 +09:00
wiz
ec92f83a58
Merge pull request #4865 from mempool/mononaut/public-acceleration-config
Public acceleration config
2024-04-03 16:16:36 +09:00
wiz
37c0adbbfa
Merge pull request #4868 from mempool/natsoni/fix-global-footer
Fix footer position
2024-04-03 16:15:57 +09:00
natsoni
e9c40692a6
Fix network switch mechanism 2024-04-03 16:09:30 +09:00
softsimon
32383b0bc2
Merge pull request #4869 from mempool/knorrium/more_bisq_cleanup
Cleanup more bisq references
2024-04-03 14:01:53 +09:00
Felipe Knorr Kuhn
d2f912d15c
Remove leftover Bisq references from the GH workflow 2024-04-03 12:31:41 +09:00
Felipe Knorr Kuhn
c35c08b17a
Remove bisq references from the tests 2024-04-03 12:31:17 +09:00
natsoni
4efd0dda83
Push footer down when content is less than window height 2024-04-03 11:28:25 +09:00
wiz
e7f8bcf83b
ops: Update check script for elements electrs hash 2024-04-02 22:24:00 +09:00
wiz
08fa6d55b5
Merge pull request #4832 from mempool/dependabot/npm_and_yarn/frontend/express-4.19.2
Bump express from 4.18.2 to 4.19.2 in /frontend
2024-04-02 22:03:05 +09:00
Felipe Knorr Kuhn
995a26b944
Merge branch 'master' into nymkappa/prepaid-acceleration 2024-04-02 21:53:01 +09:00
Felipe Knorr Kuhn
3a2aad645b
Merge branch 'master' into mononaut/public-acceleration-config 2024-04-02 21:31:28 +09:00
Felipe Knorr Kuhn
2c655a08be
Merge branch 'master' into dependabot/npm_and_yarn/frontend/express-4.19.2 2024-04-02 21:13:34 +09:00
softsimon
bd359fdd31
Merge pull request #4859 from mempool/nymkappa/accel-copy
[accelerator] deposit -> top up
2024-04-02 21:12:47 +09:00
Felipe Knorr Kuhn
13216687dc
Merge branch 'master' into nymkappa/accel-copy 2024-04-02 21:03:41 +09:00
wiz
1bf4f9902e
Merge pull request #4862 from mempool/knorrium/fix_liquid_tests
Re-enable and fix Liquid tests
2024-04-02 21:02:42 +09:00
Felipe Knorr Kuhn
9908ec01aa
Merge branch 'master' into mononaut/public-acceleration-config 2024-04-02 20:53:01 +09:00
Felipe Knorr Kuhn
051533bb14
Merge branch 'master' into knorrium/fix_liquid_tests 2024-04-02 20:48:36 +09:00
Mononaut
3d900bdfe5
Enable PUBLIC_ACCELERATIONS in mainnet prod 2024-04-02 08:24:57 +00:00
Mononaut
b32cce1440
Restrict public acceleration APIs to mainnet 2024-04-02 08:23:38 +00:00
Mononaut
37aee77eb4
Add config for public acceleration data 2024-04-02 08:19:35 +00:00
softsimon
72b8ae2a55
Revert id change 2024-04-02 17:07:18 +09:00
Felipe Knorr Kuhn
3e3bed9aa4
Disable viewport tests for now 2024-04-02 16:54:02 +09:00
Felipe Knorr Kuhn
844a86f997
Merge branch 'master' into knorrium/fix_liquid_tests 2024-04-02 16:44:04 +09:00
Felipe Knorr Kuhn
468f17c76c
Add a few more Liquid testnet tests 2024-04-02 16:18:52 +09:00
softsimon
68a7a89fd6
Merge pull request #4864 from mempool/simon/update-i18n-04-02
Simon/update i18n 04 02
2024-04-02 16:06:07 +09:00
softsimon
931551a17f
New extract 2024-04-02 16:05:52 +09:00
softsimon
7b79384f27
Extracting i18n 2024-04-02 16:02:18 +09:00
softsimon
69568421f3
Merge pull request #4232 from mempool/hunicus/move-on-in-it
Fix mining dashboard meta description not showing
2024-04-02 15:58:07 +09:00
softsimon
7fab57193d
Merge pull request #4863 from mempool/mononaut/fix-block-page
Fix block audit cache bug
2024-04-02 15:32:58 +09:00
Mononaut
49146e1402
Fix mainnet blocks loading bug 2024-04-02 06:29:43 +00:00
hunicus
f28abd68f4
Merge branch 'master' into hunicus/move-on-in-it 2024-04-02 15:26:11 +09:00
Felipe Knorr Kuhn
4bb1320563
Re-enable and fix Liquid tests 2024-04-02 15:14:02 +09:00
dependabot[bot]
0a848f25a4
Bump express from 4.18.2 to 4.19.2 in /frontend
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 06:07:47 +00:00
wiz
83dbae3a70
Merge pull request #4786 from mempool/simon/remove-bisq
Removing Bisq
2024-04-02 15:06:23 +09:00
wiz
ce057bad20
ops: Bump NodeJS to v20.12.0 in start script 2024-04-02 14:58:55 +09:00
wiz
8bec0cacdb
ops: Remove bisq from start script 2024-04-02 14:58:21 +09:00
wiz
faa990a2c6
ops: Remove bisq from build script 2024-04-02 14:55:52 +09:00
wiz
872e4b4a17
Merge pull request #4855 from mempool/knorrium/fix_missing_assets
Run sync-assets-dev when building
2024-04-02 14:55:03 +09:00
softsimon
3e0c36e714
Merge pull request #4854 from mempool/natsoni/fix-network-errors
Fix frontend errors on block loading
2024-04-02 14:38:26 +09:00
softsimon
974eaeb02f
Merge branch 'master' into natsoni/fix-network-errors 2024-04-02 14:31:32 +09:00
softsimon
f833904d7b
Merge pull request #4858 from mempool/mononaut/better-audits
Betterer audits
2024-04-02 14:30:17 +09:00
Mononaut
96ba7d0656
Add draft sip tx page 2024-04-02 05:28:03 +00:00
Mononaut
6852319e4d
Improve sip API error handling 2024-04-02 05:26:27 +00:00
Mononaut
8bc1eaebc0
Sip set /block canonical url 2024-04-02 05:26:27 +00:00
Mononaut
eeefaa6374
Proof-of-concept "sipper" minimal pages for web crawlers 2024-04-02 05:26:24 +00:00
nymkappa
1bba1cfeb1
[accelerator] deposit -> top up 2024-04-02 11:35:03 +08:00
Mononaut
4a6641f544
revert reverting better audits PR 2024-04-02 02:02:38 +00:00
softsimon
c51159d275
Merge pull request #4836 from mempool/mononaut/first-seen-tooltip
Display first seen time on block visualisation tooltips
2024-04-01 22:49:46 +09:00
softsimon
d279ea3278
Merge pull request #4857 from mempool/revert-4852-mononaut/better-audits
Revert "Better audits"
2024-04-01 22:49:05 +09:00
softsimon
102cb96483
Revert "Better audits" 2024-04-01 22:48:46 +09:00
softsimon
10d4e5a600
Merge pull request #4852 from mempool/mononaut/better-audits
Better audits
2024-04-01 22:47:46 +09:00
softsimon
2048816c23
Merge pull request #4847 from mempool/dependabot/github_actions/dtolnay/rust-toolchain-dc6353516c68da0f06325f42ad880f76a5e77ec9
Bump dtolnay/rust-toolchain from be73d7920c329f220ce78e0234b8f96b7ae60248 to dc6353516c68da0f06325f42ad880f76a5e77ec9
2024-04-01 22:04:15 +09:00
Felipe Knorr Kuhn
8d2efd4d10
Merge branch 'master' into dependabot/github_actions/dtolnay/rust-toolchain-dc6353516c68da0f06325f42ad880f76a5e77ec9 2024-04-01 21:59:31 +09:00
softsimon
ecf1db0716
Merge pull request #4848 from mempool/mononaut/esplora-only-address-graph
Add backend type flag, disable address graphs for non-esplora
2024-04-01 19:11:54 +09:00
softsimon
1a3b8580e7
Merge branch 'master' into mononaut/esplora-only-address-graph 2024-04-01 19:10:18 +09:00
hunicus
fb6aec0afe
Merge branch 'master' into hunicus/docs-links-alignment 2024-04-01 19:06:18 +09:00
Felipe Knorr Kuhn
7063d9e113
Merge branch 'master' into knorrium/fix_missing_assets 2024-04-01 19:04:06 +09:00
Felipe Knorr Kuhn
0445c150a2
Run sync-assets-dev when building 2024-04-01 19:01:08 +09:00
wiz
cfb1e1d908
ops: Remove nginx config for bisq 2024-04-01 19:00:37 +09:00
natsoni
3f80dbc5ce
Fix random console errors on block loading 2024-04-01 18:53:50 +09:00
hunicus
b8a48314c1
Fix api-docs anchor link vertical alignment 2024-04-01 18:53:38 +09:00
softsimon
0090d36514
Merge branch 'master' into simon/remove-bisq 2024-04-01 18:52:56 +09:00
softsimon
bf22f4515f
Merge branch 'master' into mononaut/first-seen-tooltip 2024-04-01 18:44:52 +09:00
wiz
bf5d5b98cb
ops: Update check script for config.js URL 2024-04-01 18:44:41 +09:00
softsimon
df491d050d
Merge pull request #4851 from mempool/knorrium/docker_node_bump
Bump Docker images to node v20.12.0 LTS
2024-04-01 18:40:14 +09:00
softsimon
91267201bf
Merge pull request #4853 from mempool/natsoni/fix-liquid-peg-crash
Fix Liquid crash
2024-04-01 18:30:33 +09:00
natsoni
061abaa148
Fix Liquid crash 2024-04-01 18:21:43 +09:00
wiz
4132765027
Merge pull request #4819 from mempool/simon/angular-17
Angular 17
2024-04-01 18:14:17 +09:00
wiz
e64d1be6f0
Merge branch 'master' into simon/angular-17 2024-04-01 17:48:55 +09:00
Mononaut
03255dd077
Improve marginal fee rate detection 2024-04-01 08:42:23 +00:00
Mononaut
bd4e223aed
Add "prioritized" category to audits 2024-04-01 08:07:09 +00:00
wiz
964be2a6df
Don't use PATH in sync-assets.js 2024-04-01 16:53:49 +09:00
softsimon
cf00fa73c6
Correcting esbuild target and module 2024-04-01 16:16:40 +09:00
Felipe Knorr Kuhn
8956ef4b43
Bump Docker images to node v20.12.0 LTS 2024-04-01 16:14:26 +09:00
softsimon
5c3f256229
Bumping TS build target 2024-04-01 16:11:08 +09:00
wiz
56b9715fc5
ops: Upgrade NodeJS to v20.12 for Debian in prod installer 2024-04-01 16:05:31 +09:00
wiz
e3f7f08fb4
ops: Follow redirects to download AppleColorEmoji.ttf 2024-04-01 16:01:16 +09:00
wiz
cc63f20708
ops: Upgrade NodeJS to v20.12.0 in prod installer 2024-04-01 16:01:13 +09:00
Mononaut
93956d0ed4
Refactor first seen tooltip labels 2024-04-01 07:00:46 +00:00
softsimon
4a3aceadbf
Merge pull request #4849 from mempool/mononaut/backend-backend-info
Add backend mode to backend-info
2024-04-01 15:27:38 +09:00
Mononaut
9b456954b1
Change "first seen ... before" to "confirmed ... after" 2024-04-01 06:21:01 +00:00
Mononaut
855b20834e
Display first seen time on block visualiation tooltips 2024-04-01 06:21:01 +00:00
Mononaut
df72829fd2
Add backend mode to backend-info 2024-04-01 04:00:29 +00:00
Mononaut
855e25ccd2
Add backend type flag, disable address graphs for non-esplora 2024-04-01 03:49:56 +00:00
dependabot[bot]
150a7d9eeb
Bump dtolnay/rust-toolchain
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from be73d7920c329f220ce78e0234b8f96b7ae60248 to dc6353516c68da0f06325f42ad880f76a5e77ec9.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](be73d7920c...dc6353516c)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 02:45:31 +00:00
softsimon
1630d71e7b
Merge pull request #4840 from mempool/mononaut/multi-tx-tracking
Add track-txs websocket subscription
2024-03-31 18:51:00 +09:00
Mononaut
7deee5d5f2
Fix outspend tracking typo 2024-03-31 09:45:26 +00:00
softsimon
19dcc9d62d
Merge pull request #4842 from mempool/mononaut/halving-widget-fixes
Fix next block subsidy calculation
2024-03-31 18:04:57 +09:00
Mononaut
9270298374
Fix next block subsidy calculation 2024-03-31 08:53:09 +00:00
softsimon
1c862d57ea
Merge pull request #4841 from mempool/mononaut/fix-always-dirty
Clear cpfp dirty status
2024-03-31 17:16:36 +09:00
Mononaut
ac8fdd6405
Clear cpfp dirty status 2024-03-31 08:06:01 +00:00
Mononaut
c5300c950b
Add track-txs websocket subscription 2024-03-31 07:55:43 +00:00
softsimon
92b9c8f370
Merge pull request #4838 from mempool/mononaut/stop-excluding-accelerations
Don't exclude accelerated txs from fee graph & fee statistics
2024-03-31 16:09:37 +09:00
softsimon
7969d069b2
Merge pull request #4835 from mempool/natsoni/add-data-lightning-world-graph
Add node data to lightning world channels graph
2024-03-31 16:05:58 +09:00
Mononaut
7367991df1
Don't exclude accelerated txs from fee graph & fee statistics 2024-03-31 05:40:51 +00:00
softsimon
8f19a376fa
Merge pull request #4826 from mempool/mononaut/standardized-grid
Standardize the block visualization grid
2024-03-31 12:39:16 +09:00
softsimon
0b1296330b
Merge pull request #4817 from mempool/natsoni/fix-unnecessary-block-load
Fix unnecessary request of blocks on dashboard load
2024-03-31 12:37:02 +09:00
softsimon
6bebc76633
Fix websocket init test support 2024-03-31 12:26:13 +09:00
natsoni
6b8f08c6d7
Add node data to lightning world channels graph 2024-03-29 21:57:11 +09:00
softsimon
ba8d4ccc02
Merge pull request #4555 from mempool/mononaut/limit-gbt-input-redux
Limited GBT
2024-03-29 21:26:33 +09:00
softsimon
e9fe50a4bb
Merge pull request #4830 from mempool/dependabot/npm_and_yarn/unfurler/express-4.19.2
Bump express from 4.18.1 to 4.19.2 in /unfurler
2024-03-29 20:23:11 +09:00
softsimon
52a33d5a51
Merge pull request #4829 from mempool/natsoni/allow-show-block-fees-only
Add an option to always show the block fees on infinite blockchain
2024-03-29 17:04:11 +09:00
softsimon
66309813d5
Changing to async pipe 2024-03-29 16:30:55 +09:00
softsimon
5a57d220cb
Merge pull request #4834 from mempool/mononaut/fix-audit-tx-row
hide empty audit row in tx page details panel
2024-03-29 16:19:36 +09:00
Mononaut
cbcb61d3fa
hide empty audit row in tx page details panel 2024-03-29 06:51:56 +00:00
softsimon
3d0e16857a
Merge pull request #4833 from mempool/dependabot/npm_and_yarn/backend/express-4.19.2
Bump express from 4.18.2 to 4.19.2 in /backend
2024-03-29 15:40:11 +09:00
Mononaut
3732406ce8
Sanity checks for mempool visualization deltas 2024-03-29 03:52:21 +00:00
Mononaut
8f2e1de578
Limit GBT: fix on-demand CPFP calculation 2024-03-29 03:52:18 +00:00
Mononaut
07c76d084e
Limit GBT: handle accelerations beneath the purge rate 2024-03-29 03:51:48 +00:00
Mononaut
5411eb491f
Limit GBT: fix candidate set inconsistency 2024-03-29 03:51:48 +00:00
Mononaut
b10bd05207
Move max cpfp graph size to named const 2024-03-29 03:51:47 +00:00
Mononaut
0533953f54
Add LIMIT_GBT config 2024-03-29 03:51:47 +00:00
Mononaut
b3e07e0c22
Retire "getSimonTemplate" GBT option 2024-03-29 03:51:46 +00:00
Mononaut
62653086e9
Limit GBT - calculate purged tx cpfp on demand 2024-03-29 03:49:57 +00:00
Mononaut
e2d3bb4cc5
Use minfee node to limit gbt input size 2024-03-29 03:49:54 +00:00
dependabot[bot]
70bf31c397
Bump express from 4.18.2 to 4.19.2 in /backend
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 17:18:10 +00:00
natsoni
22d9a1cb8b
Keep block fees on infinite blockchain when leaving mining dashboard 2024-03-28 16:58:00 +09:00
Felipe Knorr Kuhn
6492aa6f4a
Merge branch 'master' into simon/angular-17 2024-03-28 16:46:43 +09:00
dependabot[bot]
c0a9a8b07a
Bump express from 4.18.1 to 4.19.2 in /unfurler
Bumps [express](https://github.com/expressjs/express) from 4.18.1 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.1...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 07:42:18 +00:00
softsimon
5c430e57a4
Merge pull request #4828 from mempool/natsoni/fix-blockchain-doc
Fix truncated blockchain in FAQ
2024-03-28 14:40:20 +09:00
softsimon
27b48b1874
Updating eslib build target 2024-03-28 12:24:31 +09:00
softsimon
33cddc6fba
Moving esbuild to dependency 2024-03-28 12:17:16 +09:00
natsoni
1e5b798af9
Fix for #4827 2024-03-27 19:00:24 +09:00
natsoni
f91fc6f026
Fix truncated blockchain in faq 2024-03-27 18:47:10 +09:00
Mononaut
82e115c009
Standardize the block visualization grid 2024-03-27 02:46:29 +00:00
softsimon
44cf63458f
Correct sample mempool services api url 2024-03-26 18:54:31 +09:00
softsimon
53aea3dcf6
Fix eslint errors 2024-03-26 18:13:02 +09:00
softsimon
7408a6f331
Add esbuild as dev dependency 2024-03-26 18:04:20 +09:00
softsimon
6e62e93bf6
Updating eslint 2024-03-26 17:51:54 +09:00
softsimon
8861aedea1
Merge pull request #4824 from mempool/natsoni/fix-hashrate-graph-scale
Set coherent units for hashrate and difficulty units on hashrate graph
2024-03-26 17:37:16 +09:00
softsimon
16f9593d2e
Merge pull request #4814 from mempool/natsoni/hide-featured-assets-testnet
Hide featured assets on Liquid testnet
2024-03-26 17:10:36 +09:00
softsimon
5537e79640
Merge branch 'master' into natsoni/hide-featured-assets-testnet 2024-03-26 17:07:36 +09:00
softsimon
1ea66595ea
Merge pull request #4822 from mempool/natsoni/add-pool-dominance-to-graph
Add pool dominance data to mining pool page
2024-03-26 17:01:40 +09:00
natsoni
fa2dd3c7cb
Set coherent units for hashrate and difficulty units on hashrate graph 2024-03-26 16:57:00 +09:00
softsimon
1e04afffa3
Update package.lock 2024-03-26 15:42:56 +09:00
softsimon
57cbf71915
Merge pull request #4821 from mempool/mononaut/accelerated-badge-fixes
Accelerated badge fixes
2024-03-26 14:46:52 +09:00
softsimon
78b1b1e561
Merge pull request #4823 from mempool/nymkappa/aggregated-acceleration-history-rounding
[accelerator] fix rounding issue
2024-03-26 14:40:37 +09:00
nymkappa
6fb2a3b39c
[accelerator] fix rounding issue 2024-03-26 14:38:57 +09:00
natsoni
cb866d8fa2
Add pool dominance data to mining pool page 2024-03-26 14:11:08 +09:00
softsimon
365c89d98f
Merge pull request #4818 from mempool/mononaut/halving-widget
Add halving countdown widget to main dashboard
2024-03-26 13:22:01 +09:00
nymkappa
f4b9301f55
[enterprise] polish enterprise logo 2024-03-26 11:36:20 +09:00
Mononaut
6afe12c1be
Fix duplicate accelerated badge on transaction page 2024-03-26 02:33:51 +00:00
Mononaut
952a61f8f2
Fix accelerated badge in block overview tooltip 2024-03-26 02:33:33 +00:00
softsimon
0825c7a6d6
Fixing SSR 2024-03-25 18:33:58 +09:00
Mononaut
0ece8bb2a6
Add halving countdown widget to main dashboard 2024-03-25 08:32:50 +00:00
natsoni
8822c0972f
Fix unnecessary request of blocks on dashboard load 2024-03-25 12:07:33 +09:00
softsimon
6310ef7f57
Upgrade to Angular 17 2024-03-24 16:22:05 +09:00
natsoni
d4749cfc82
Hide featured assets on liquid testnet 2024-03-24 15:41:18 +09:00
softsimon
60996a99f0
Removing Bisq 2024-03-23 18:03:49 +09:00
softsimon
1b21cd89a3
Merge pull request #4805 from mempool/mononaut/http-error-handling
http error handling
2024-03-23 18:03:24 +09:00
Mononaut
13fb75fec3
Extend http interceptor to normalize errors 2024-03-23 07:07:29 +00:00
Mononaut
484e032775
Reusable component & pipe for http error rendering 2024-03-23 07:07:24 +00:00
softsimon
21b3e4071c
Merge pull request #4812 from mempool/mononaut/tx-page-tags
Add Goggles filter badges to the transaction page
2024-03-23 15:56:25 +09:00
Mononaut
48b82329cb
Adjust transaction details table layout 2024-03-23 06:52:38 +00:00
Mononaut
00dcff50ee
Add Goggles filters tags to the transaction page 2024-03-23 06:08:40 +00:00
wiz
abbc8a134b
Merge pull request #4811 from mempool/nymkappa/hide-accel-subdomain
[accelerator] disable ui elements on subdomain
2024-03-23 14:43:18 +09:00
softsimon
4374e6e0eb
Merge pull request #4810 from mempool/mononaut/tx-tags
Show goggles badges on block overview tooltip
2024-03-23 14:10:30 +09:00
softsimon
15062b80d1
Removing goggles icon 2024-03-23 14:08:43 +09:00
softsimon
b4d0b75557
Merge pull request #4321 from mempool/mononaut/ssr
Angular Universal SSR
2024-03-22 20:01:30 +09:00
Mononaut
d6f1b51fa6
Show goggles badges on block overview tooltip 2024-03-22 10:05:59 +00:00
nymkappa
0a24a9ea7c
[accelerator] disable ui elements on subdomain 2024-03-22 17:51:13 +09:00
softsimon
e01df9ee32
Merge pull request #4809 from mempool/nymkappa/polish-menu
[menu] fix css
2024-03-22 17:37:08 +09:00
softsimon
3aa12c935b
Merge pull request #4806 from mempool/mononaut/address-chart-navigation
Add click navigation to balance history chart
2024-03-22 15:44:53 +09:00
Mononaut
6e2f17b3d2
SSR: Fix more merge/version conflicts 2024-03-22 05:41:58 +00:00
Mononaut
50e656b259
SSR: fix merge/version conflicts 2024-03-22 05:35:22 +00:00
Mononaut
48af95d722
SSR: placeholder bowtie diagram while loading 2024-03-22 05:35:22 +00:00
Mononaut
c926088136
SSR: Fix block viz loading indicators 2024-03-22 05:35:22 +00:00
Mononaut
b167848b9b
SSR: Fix initial state of lightning pages & graphs 2024-03-22 05:35:22 +00:00
Mononaut
99730d02ab
SSR: fix graph loading indicators 2024-03-22 05:35:22 +00:00
Mononaut
ed73c1e94c
SSR: fix clock page timeout 2024-03-22 05:35:22 +00:00
Mononaut
ab5ee5370a
SSR: solve block page initial state 2024-03-22 05:35:21 +00:00
Mononaut
4fbbff6614
SSR: fix transferstate block ordering 2024-03-22 05:35:21 +00:00
Mononaut
9cd33825bf
SSR: dirty hack to fix initial blockchain scroll 2024-03-22 05:35:21 +00:00
Mononaut
abd7f62b20
SSR: preserve transferstate api response headers 2024-03-22 05:35:21 +00:00
Mononaut
bcd337794a
SSR: fix mining dashboard initial layout 2024-03-22 05:35:21 +00:00
Mononaut
1ae5f05316
SSR: init latest replacements on server side 2024-03-22 05:35:20 +00:00
Mononaut
c5822b11a0
SSR zone macrotask utilities, solve tx page initial state 2024-03-22 05:35:20 +00:00
Mononaut
5b4132b551
SSR: fix incoming tx graph init state 2024-03-22 05:35:20 +00:00
Mononaut
29aaeef47b
Fix deprecated SSR state transfer imports 2024-03-22 05:35:20 +00:00
Mononaut
10e468d463
Fix hashrate difficulty SSR state dependency 2024-03-22 05:35:20 +00:00
Mononaut
6464f6d8bb
Exclude webgl block viz from SSR rendering 2024-03-22 05:35:20 +00:00
Mononaut
cfdbd93695
Fix SSR matchMedia shim 2024-03-22 05:35:19 +00:00
Mononaut
a2b9b0c89d
Exclude echarts from server-side rendering 2024-03-22 05:35:19 +00:00
Mononaut
e6fb93140c
Fix default mining pool img fallback behavior 2024-03-22 05:35:19 +00:00
Mononaut
4e26e1f196
SSR ResizeObserver shim 2024-03-22 05:35:19 +00:00
Mononaut
1bb625f06b
Cleaner SSR server routing 2024-03-22 05:35:19 +00:00
Mononaut
68b55db872
restore basic Angular Universal build 2024-03-22 05:35:19 +00:00
nymkappa
c47822cae7
[menu] fix css 2024-03-22 14:34:21 +09:00
softsimon
00a94f9e3c
Merge pull request #4799 from mempool/natsoni/blocks-table-url-pagination
Add page number to URL in blocks table
2024-03-22 14:24:56 +09:00
natsoni
adda511869
Refactor key navigation on recent pegs table 2024-03-22 13:48:01 +09:00
softsimon
1b971bfb05
Merge pull request #4807 from mempool/nymkappa/cleanup-lightning-code
[refactor] cleanup dead code
2024-03-22 09:39:40 +09:00
nymkappa
1eb52d8a35
[accelerator] fix redirection link 2024-03-21 19:08:48 +09:00
nymkappa
ea94dfcd6b
[refactor] cleanup dead code 2024-03-21 18:14:35 +09:00
Mononaut
3dd328475e
Add click navigation to balance history chart 2024-03-21 09:02:17 +00:00
softsimon
c18779b4e3
Refactoring debounce mechanism 2024-03-21 17:58:34 +09:00
nymkappa
8fee195577
[accelerator] prepaid acceleration 2024-03-21 16:44:07 +09:00
natsoni
5deb8c3149
Allow smooth key navigation in block table and pegs table 2024-03-21 16:24:16 +09:00
softsimon
78f03bd6d5
Merge pull request #4803 from mempool/mononaut/fix-address-chart-axis
Fix address chart y-axis labels
2024-03-21 15:47:50 +09:00
softsimon
5249fb1a8b
Merge pull request #4790 from mempool/natsoni/account-menu-overlay
Account menu overlays UI instead of pushing it
2024-03-21 14:50:48 +09:00
softsimon
4ce0497048
Improve select truncated strings 2024-03-21 14:05:44 +09:00
natsoni
393181f753
Set absolute menu in sticky header by @mononaut 2024-03-21 13:47:28 +09:00
softsimon
7f2d77a73b
Merge pull request #4793 from mempool/natsoni/fix-fiat-price-on-tesnet
Fix fiat price displayed on test networks
2024-03-21 12:08:18 +09:00
Mononaut
f8a1fc6aa2
Fix address chart y-axis labels 2024-03-21 02:56:20 +00:00
softsimon
7bf7d02a18
Merge pull request #4802 from mempool/natsoni/fix-bowtie-tooltip-bug
Fix bowtie tooltip bug
2024-03-21 11:31:18 +09:00
natsoni
7b6163cfee
Fix bowtie tooltip bug 2024-03-20 21:25:00 +09:00
softsimon
19b0c4e410
Merge pull request #4792 from mempool/mononaut/address-balance-graph
Add balance graph to address page
2024-03-20 19:08:43 +09:00
Mononaut
2c16dda7c0
Address chart support p2pks 2024-03-20 10:03:19 +00:00
Mononaut
82f1fa5110
Add balance graph to address page 2024-03-20 10:03:19 +00:00
natsoni
524619f48e
Add URL pagination and keyboard navigation to Liquid pegs list 2024-03-20 18:24:40 +09:00
natsoni
666165ebe9
Add key navigation support to blocks list 2024-03-20 15:10:51 +09:00
natsoni
6b9159b89c
Add URL pagination to block transaction list 2024-03-20 14:08:44 +09:00
softsimon
48d852fd49
Merge pull request #4798 from mempool/simon/flex-justified-navbar
Flex justified navbar
2024-03-20 13:07:00 +09:00
natsoni
f6dbe1e17f
Add page number to URL in blocks table 2024-03-20 13:02:56 +09:00
softsimon
fc5b2c050e
Flex justified navbar 2024-03-19 15:12:28 +09:00
softsimon
92d960a9cc
Merge pull request #4789 from mempool/hunicus/api-docs-unfurler
Add /docs/api unfurler image
2024-03-19 12:19:41 +09:00
softsimon
482493fef0
Merge pull request #4794 from mempool/natsoni/add-currency-frontend-config
Add missing ADDITIONAL_CURRENCIES flag in frontend config
2024-03-19 12:11:26 +09:00
natsoni
4e45993d41
Add missing additional currencies flag in frontend config 2024-03-19 12:07:25 +09:00
natsoni
8edd2b5802
Fix fiat price displayed on test networks 2024-03-19 11:58:50 +09:00
softsimon
e53254fb2d
Merge pull request #4791 from mempool/natsoni/update-doc-historical-price
Update doc for historical price endpoint
2024-03-19 11:53:01 +09:00
nymkappa
40663c79c0
Merge branch 'master' into natsoni/account-menu-overlay 2024-03-19 09:04:07 +09:00
natsoni
cca7c7e8e2
Update doc for historical price endpoint 2024-03-18 17:41:13 +09:00
natsoni
2c6f210e8e
Account menu overlays UI instead of pushing it 2024-03-18 16:49:33 +09:00
hunicus
82ba80dbb1
Add /docs/api unfurler image 2024-03-18 03:16:00 -04:00
softsimon
634b461bb5
Merge pull request #4787 from mempool/natsoni/fix-load-more-p2pk
Fix broken load more for P2PK address page
2024-03-18 15:27:39 +09:00
softsimon
f1b9a0f536
Merge pull request #4697 from mempool/dependabot/docker/docker/backend/node-20.11.1-buster-slim
Bump node from 20.8.0-buster-slim to 20.11.1-buster-slim in /docker/backend
2024-03-18 15:07:07 +09:00
softsimon
b7d9efebd1
Merge pull request #4785 from mempool/natsoni/bowtie-tooltip-price
Display more accurate price data on tx bowtie tooltip
2024-03-18 14:46:39 +09:00
softsimon
34d93abbf6
Merge pull request #4784 from mempool/simon/scss-flex-warning-fixes
Fixing scss flexbox warnings
2024-03-18 12:27:52 +09:00
softsimon
dbecb73f97
Merge pull request #4782 from mempool/nymkappa/no-block-accel-list
[accelerator] show ~ for pending accel in the block column
2024-03-18 11:47:24 +09:00
softsimon
9fa6d232d9
Merge pull request #4696 from mempool/dependabot/docker/docker/frontend/node-20.11.1-buster-slim
Bump node from 20.8.0-buster-slim to 20.11.1-buster-slim in /docker/frontend
2024-03-18 11:40:03 +09:00
softsimon
30c033b403
Merge pull request #4695 from mempool/dependabot/docker/docker/frontend/nginx-1.25.4-alpine
Bump nginx from 1.24.0-alpine to 1.25.4-alpine in /docker/frontend
2024-03-18 11:39:37 +09:00
softsimon
788d1de968
Merge pull request #4783 from mempool/mononaut/pool-acc-fees-mobile
Fix pool oob fees table mobile layout
2024-03-18 11:39:09 +09:00
natsoni
a04d685f1a
Change tooltip text "ago" -> "earlier" 2024-03-17 22:23:46 +09:00
natsoni
43232b9d0a
Fix broken load more for P2PK address page 2024-03-17 17:58:26 +09:00
softsimon
acd9c23180
Fixing scss flexbox warnings
fixes #4781
2024-03-17 17:08:07 +09:00
Mononaut
a8fa7dcb2a
Fix pool oob fees table mobile layout 2024-03-17 08:00:51 +00:00
natsoni
2dc6f6ff5a
Display more accurate price on prevout/spent outputs in bowtie tooltip 2024-03-17 16:25:36 +09:00
softsimon
df107d34b4
Fixing undefined error 2024-03-17 15:31:17 +09:00
nymkappa
2245109ae6
[accelerator] show ~ for pending accel in the block column 2024-03-17 10:12:17 +09:00
softsimon
1c76a6091a
Merge pull request #4778 from mempool/dependabot/npm_and_yarn/frontend/follow-redirects-1.15.6
Bump follow-redirects from 1.15.5 to 1.15.6 in /frontend
2024-03-16 17:23:59 +07:00
softsimon
29c0131edf
Merge pull request #4779 from mempool/dependabot/npm_and_yarn/backend/follow-redirects-1.15.6
Bump follow-redirects from 1.15.5 to 1.15.6 in /backend
2024-03-16 17:23:40 +07:00
wiz
c78a14c5fd
Merge pull request #4780 from mempool/mononaut/fix-acc-pool-fees
Fix pool page accelerator fees
2024-03-16 18:21:23 +09:00
wiz
1dd72418c1
Merge branch 'master' into mononaut/fix-acc-pool-fees 2024-03-16 18:19:08 +09:00
Mononaut
f54bdace61
Fix pool page accelerator fees 2024-03-16 09:16:58 +00:00
dependabot[bot]
5ac87c095f
Bump follow-redirects from 1.15.5 to 1.15.6 in /backend
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 09:13:17 +00:00
dependabot[bot]
2d8111a6e7
Bump follow-redirects from 1.15.5 to 1.15.6 in /frontend
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 09:13:14 +00:00
softsimon
d5cca2903c
Merge pull request #4770 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.7.0
Bump cypress from 13.6.2 to 13.7.0 in /frontend
2024-03-16 16:12:39 +07:00
wiz
d5e591c4af
Merge pull request #4773 from mempool/mononaut/simplify-recent-txs
Simplify recent transactions observable
2024-03-16 17:27:07 +09:00
wiz
b5fa44955f
Merge pull request #4775 from mempool/mononaut/oob-block-precision
Increase precision of out-of-band fees on the block page
2024-03-16 17:22:23 +09:00
wiz
9e1cf51e4a
Merge pull request #4776 from mempool/mononaut/fix-new-unfurls
Fix tx push unfurl preview
2024-03-16 17:21:58 +09:00
wiz
fd41dfc152
Merge pull request #4774 from mempool/mononaut/accelerator-audit-pools
Show accelerator audit totals on pools page
2024-03-16 17:20:49 +09:00
wiz
d03e7b2d46
Merge branch 'master' into mononaut/accelerator-audit-pools 2024-03-16 17:19:56 +09:00
wiz
d3c5cbde7f
Merge pull request #4771 from mempool/mononaut/update-bid-boost
Update acceleration audit to match latest bid boost version
2024-03-16 17:19:34 +09:00
wiz
dd7c8f2934
Merge pull request #4772 from mempool/mononaut/replacement-skeleton
Fix recent replacements skeleton loader
2024-03-16 17:19:18 +09:00
wiz
0b173296c4
Merge pull request #4768 from mempool/nymkappa/provisional-status
[accelerator] add provisional status
2024-03-16 17:17:54 +09:00
softsimon
81c8c8dafb
Merge pull request #4747 from mempool/natsoni/more-fiat-currencies
Use fx rates to add more currencies support and improve fiat prices
2024-03-16 10:31:47 +07:00
Mononaut
31d3566ed5
Fix tx push unfurl preview 2024-03-15 09:35:08 +00:00
Mononaut
fb852b73e9
Increase precision of out-of-band fees on the block page 2024-03-15 08:28:50 +00:00
Mononaut
a44219a3c3
Add out of band fees to pools page 2024-03-15 07:44:57 +00:00
Mononaut
120ffdb0f4
Simplify pool details table 2024-03-15 07:40:44 +00:00
nymkappa
8dbfa1c73c
Merge branch 'master' into nymkappa/provisional-status 2024-03-15 16:38:13 +09:00
Mononaut
8427127545
Simplify recent transactions observable 2024-03-15 06:05:52 +00:00
Mononaut
404892174d
Fix recent replacements skeleton loader 2024-03-15 05:33:23 +00:00
Mononaut
e171c7694c
Update acceleration audit to match latest bid boost version 2024-03-15 03:27:30 +00:00
natsoni
7bc6ef2516
Fix tx fee to display historical price 2024-03-14 13:08:15 +01:00
softsimon
0fcfc5e78d
Merge branch 'master' into natsoni/more-fiat-currencies 2024-03-14 16:23:26 +07:00
softsimon
c12e664b9a
Merge pull request #4769 from mempool/hunicus/the-the-preview
Move 'the' on the sponsor preview image
2024-03-14 16:09:50 +07:00
dependabot[bot]
8cb040eec6
Bump cypress from 13.6.2 to 13.7.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.6.2 to 13.7.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.6.2...v13.7.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-14 02:32:54 +00:00
natsoni
5ecb915c60
Fix db version conflicts 2024-03-13 11:09:30 +01:00
hunicus
ab93a45853
Move the on the sponsor preview image 2024-03-13 18:15:06 +09:00
natsoni
a95d17950f
Add fake entry for missing price data before 2010-07-19 2024-03-12 20:50:48 +01:00
nymkappa
860aac060c
[accelerator] add provisional status 2024-03-12 17:04:37 +09:00
wiz
023b2f7ae2
Tweak CSS color for OOB fees on block component 2024-03-12 16:46:47 +09:00
wiz
9a531b0a00
Fix SQL query for /api/v1/accelerations/block/:height for older blocks 2024-03-12 15:05:05 +09:00
wiz
0c4631359d
Merge pull request #4767 from mempool/hunicus/dot-space-previews
Add unfurler routes for /enterprise and /sponsor
2024-03-12 14:20:07 +09:00
wiz
fd04947ac0
Merge pull request #4766 from mempool/mononaut/past-acceleration-fees
Audit past acceleration fees
2024-03-12 14:19:18 +09:00
wiz
acdc5f92cd
Merge pull request #4757 from russeree/add-aduit-blocks-param
Add audit=[bool] param to /block/[hash] url
2024-03-12 14:18:13 +09:00
wiz
f0f1eb06bb
Remove stray console.log from #4757
Co-authored-by: mononaut <83316221+mononaut@users.noreply.github.com>
2024-03-12 14:17:57 +09:00
hunicus
fc1179f7bd
Merge branch 'master' into hunicus/dot-space-previews 2024-03-12 11:35:09 +09:00
hunicus
cbc0e44d64
Add unfurler routes for /enterprise and /sponsor 2024-03-12 11:33:30 +09:00
softsimon
f851e821b4
Merge pull request #4760 from mempool/junderw/rust-gbt-build-final
Refactor rust-gbt and destroy all issues and be happy for all eternity
2024-03-12 09:12:02 +07:00
hunicus
df51018599
Reorder unfurler routes to be alphabetic 2024-03-12 10:22:42 +09:00
Mononaut
11a4f4e6d9
Audit past acceleration data 2024-03-11 21:35:01 +00:00
natsoni
b99e5c4160
Populate historical fiat prices from latest to oldest 2024-03-11 18:02:30 +01:00
natsoni
91ec0c8382
Merge branch 'origin/HEAD' into natsoni/more-fiat-currencies and fix db version conflicts 2024-03-11 15:32:35 +01:00
natsoni
669cf59269
Set monthly granulary for fx rates 2024-03-11 15:27:43 +01:00
natsoni
8e158e1786
Fix lastHistoricalRun variable to be in seconds 2024-03-11 14:28:06 +01:00
wiz
93f547e446
Merge pull request #4764 from mempool/nymkappa/fix-mysql-query
fix mysql query
2024-03-11 19:32:27 +09:00
nymkappa
ece40c5e74
fix mysql query 2024-03-11 19:01:39 +09:00
wiz
0dff902151
Add unfurler page for /blocks and /tx/push 2024-03-11 17:54:51 +09:00
wiz
5ea4ef80b9
Fix typo in fix for database migration fail 2024-03-11 16:07:47 +09:00
wiz
d83f483898
Fix database migration fail 2024-03-11 16:03:08 +09:00
wiz
c5d382c351
Fix typo build error in unfurler 2024-03-11 15:55:32 +09:00
wiz
b50d747440
Add missing unfurler routes, rename images to match 2024-03-11 15:38:09 +09:00
wiz
e7fde2f872
Merge pull request #4759 from mempool/hunicus/add-preview-imgs
Add page-specific preview images
2024-03-11 14:51:49 +09:00
wiz
c4b47e1f1c
ops: Add mempool servers to elements.conf 2024-03-11 14:49:47 +09:00
wiz
3d61e57b00
Merge pull request #4761 from mempool/mononaut/fix-block-acc-fees
Fix block acceleration fees calculation & api bugs
2024-03-11 14:29:07 +09:00
junderw
92a5fc8159
Refactor rust-gbt 2024-03-11 02:09:37 +09:00
natsoni
a5099fed75
Add backend checks for enabling fiat prices and update config paths 2024-03-10 17:12:19 +01:00
natsoni
b11164005c
Add FIAT_PRICE category to backend config 2024-03-10 16:34:43 +01:00
Mononaut
a2b0dd3a23
Fix block acceleration fees calculation & api 2024-03-10 15:08:44 +00:00
hunicus
553c2131d9
Remove mempool.space signup preview image 2024-03-10 20:46:12 +09:00
hunicus
c590a623f0
Merge branch 'master' into hunicus/add-preview-imgs 2024-03-10 17:47:23 +09:00
hunicus
a81c0a3b0f
Add back old preview assets 2024-03-10 17:32:10 +09:00
hunicus
0f6b694fa9
Switch accelerator preview images 2024-03-10 17:28:14 +09:00
wiz
c55c298fb5
Merge pull request #4755 from mempool/nymkappa/sign-in-button
Update CTAs
2024-03-10 17:00:25 +09:00
wiz
ede3a121c7
Merge pull request #4758 from mempool/mononaut/accelerated-badge
Move accelerated badge into tx mining info field
2024-03-10 16:58:43 +09:00
softsimon
7bedb9488b
Merge pull request #4749 from mempool/mononaut/fake-p2wsh-goggles
Add fake p2wsh goggles
2024-03-10 10:24:23 +07:00
softsimon
6d3c429bf4
Fixing database migration conflict. 2024-03-10 10:09:18 +07:00
Mononaut
9a730b51d4
Add fake p2wsh goggles 2024-03-10 10:07:33 +07:00
hunicus
a7c450895b
Add preview assets for mempool.space 2024-03-10 11:11:40 +09:00
hunicus
a5f864fe35
Explicitly set mining and lightning preview images 2024-03-10 11:10:24 +09:00
hunicus
b41f196421
Add preview image: tos 2024-03-10 11:06:22 +09:00
hunicus
462c7f9c2c
Add preview image: trademark policy 2024-03-10 11:04:39 +09:00
hunicus
869aa7fea5
Add preview image: recent blocks 2024-03-10 10:59:44 +09:00
hunicus
5b1f3d7cbe
Add preview image: rbf 2024-03-10 10:59:44 +09:00
hunicus
60ad0b71c5
Add preview image: privacy policy 2024-03-10 10:59:43 +09:00
hunicus
68af577104
Update old preview images 2024-03-10 10:59:43 +09:00
hunicus
26be760692
Add preview image: faq 2024-03-10 10:27:10 +09:00
hunicus
a5b16cf129
Add preview image: broadcast tx 2024-03-10 10:26:57 +09:00
hunicus
a0e387efad
Add preview image: accelerator dashboard 2024-03-10 10:08:21 +09:00
hunicus
e26e08b426
Add preview image: about page 2024-03-10 09:54:00 +09:00
hunicus
d9d92f1915
Add service function for fixed preview images 2024-03-10 09:52:28 +09:00
hunicus
79f0ea74c8
Compress existing preview images 2024-03-10 09:37:58 +09:00
hunicus
d1c12f9f6e
Remove duplicate metadata tags
Some metadata was being set twice, because property and name
attributes for Twitter items were both being set.
2024-03-10 09:37:58 +09:00
hunicus
1b92c62353
Update default preview image location
Remove duplicate image, move to previews folder, and update
existing paths.
2024-03-10 08:23:16 +09:00
russeree
fffffffdb3
add audit=[bool] param to block hash url 2024-03-09 10:18:32 -08:00
Mononaut
2647e94bc8
Move accelerated badge into tx mining info field 2024-03-09 18:14:48 +00:00
natsoni
ccf1121f19
Fetch historical data based on timestamp and currency 2024-03-09 16:43:23 +01:00
natsoni
23076172e4
Merge branch 'master' into natsoni/more-fiat-currencies 2024-03-09 11:53:07 +01:00
nymkappa
52c4dd8bc3
[accelerator] preview cta points to mempool.space if not official build 2024-03-09 17:45:08 +09:00
softsimon
bfde456ca8
Only display docs enterprise upsell on official mempool 2024-03-09 15:38:16 +07:00
nymkappa
10819fda6d
[ui] disable sign in button in global footer 2024-03-09 17:33:38 +09:00
wiz
c3d90d573f
Merge pull request #4736 from mempool/mononaut/accelerator-audit-stats
Show accelerator audit total on block page
2024-03-09 13:52:39 +09:00
wiz
3c2ba74cb2
Merge pull request #4750 from mempool/nymkappa/fix-acceleration-apis
[accelerator] update dashboard and doc
2024-03-09 13:51:45 +09:00
wiz
0079e5d576
Merge pull request #4754 from mempool/nymkappa/min-accel-graph-bar-height
[accelerator] set accel graph bar min height
2024-03-09 13:51:23 +09:00
wiz
3f07026229
Merge pull request #4753 from mempool/mononaut/clockchain-pools
Hide mining pools on clock blockchain
2024-03-09 13:51:07 +09:00
wiz
ac971d17c7
Merge pull request #4748 from mempool/mononaut/transaction-mining-info
Display basic mining info on transaction page
2024-03-09 13:50:21 +09:00
wiz
00d8241dd7
Merge pull request #4752 from mempool/mononaut/loading-goggles
Fix stuck Goggles on websocket reconnect
2024-03-09 13:49:48 +09:00
wiz
d459e1fae3
Merge pull request #4746 from mempool/nymkappa/subdomain-cache-buster
[enterprise] implement subdomain logo cache buster
2024-03-09 13:49:17 +09:00
wiz
61b84e3957
Merge pull request #4751 from mempool/nymkappa/dynamic-timespan-selector-accel-graph
[accelerator] dynamically show timespan selector based on the oldest acceleration
2024-03-09 13:46:36 +09:00
softsimon
020194d37b
Merge pull request #4723 from mempool/natsoni/federation-utxos-expiry
Liquid dashboard: Filter for expired UTXOs - Match layout with main dashboard
2024-03-09 10:20:08 +07:00
nymkappa
1665b0d915
[accelerator] set accel graph bar min height 2024-03-09 09:24:25 +09:00
Mononaut
b606282fb4
Hide mining pools on clock blockchain 2024-03-08 19:16:09 +00:00
Mononaut
dde6719306
Fix stuck Goggles on websocket reconnect 2024-03-08 16:47:15 +00:00
Mononaut
7af185a919
Tx audit tags handle coinbase 2024-03-08 15:22:48 +00:00
Mononaut
c17b77fe31
Display basic mining info on transaction page 2024-03-08 15:22:47 +00:00
nymkappa
faa5887c3b
[accelerator] dynamically show timespan selector based on the oldest acceleration 2024-03-08 18:00:57 +09:00
softsimon
29bbb922c5
Merge pull request #4722 from mempool/dependabot/npm_and_yarn/frontend/es5-ext-0.10.64
Bump es5-ext from 0.10.53 to 0.10.64 in /frontend
2024-03-08 10:22:03 +07:00
dependabot[bot]
aac3b1aa5c
Bump es5-ext from 0.10.53 to 0.10.64 in /frontend
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.53 to 0.10.64.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.53...v0.10.64)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 03:21:24 +00:00
softsimon
e3bb7f73f9
Merge pull request #4702 from mempool/dependabot/npm_and_yarn/backend/ip-2.0.1
Bump ip from 2.0.0 to 2.0.1 in /backend
2024-03-08 10:20:09 +07:00
softsimon
c4ecc1626d
Merge pull request #4701 from mempool/dependabot/npm_and_yarn/frontend/ip-2.0.1
Bump ip from 2.0.0 to 2.0.1 in /frontend
2024-03-08 10:19:54 +07:00
nymkappa
007f424d15
[accelerator] update doc, split public/authenticated 2024-03-08 10:52:02 +09:00
nymkappa
1d56bfa9b8
[accelerator] remove query params for acceleration list 2024-03-08 10:33:23 +09:00
Mononaut
e7788133fa
Add missing null check in block accelerations subscription 2024-03-07 19:52:42 +00:00
Mononaut
7491fb512c
Show accelerator audit total on block page 2024-03-07 19:46:24 +00:00
natsoni
b043d698ca
Allow historical price api to return data of a single currency 2024-03-07 18:33:19 +01:00
natsoni
f121d16544
Add more fiat currencies using fx rates from FreeCurrencyAPI 2024-03-07 10:48:32 +01:00
natsoni
bfaddfc345
Add CURRENCY_API_KEY option to config files 2024-03-07 10:36:33 +01:00
nymkappa
f5e1e5f1a2
[enterprise] implement subdomain logo cache buster 2024-03-07 18:32:52 +09:00
natsoni
e8c5d478fa
Merge branch 'master' into natsoni/federation-utxos-expiry 2024-03-07 10:27:44 +01:00
wiz
1d877a746f
Merge pull request #4744 from mempool/mononaut/send-nodes
More status page polish
2024-03-07 18:06:05 +09:00
softsimon
82716b0037
Merge pull request #4745 from mempool/mononaut/missing-blocks
Fix missing mempool blocks
2024-03-07 12:15:19 +07:00
softsimon
b988f042cc
Merge pull request #4743 from mempool/junderw/reload-icons
Fix: Refresh Liquid icons every 15 seconds to match electrs.
2024-03-07 11:09:33 +07:00
softsimon
1df5c5df6d
Updating to match crontab update 2024-03-07 11:09:08 +07:00
Mononaut
3178d30f2a
Fix missing mempool blocks bug 2024-03-06 22:25:58 +00:00
Mononaut
be52fd4e46
More status page polish 2024-03-06 19:34:12 +00:00
junderw
11a6d81a17
Fix: Refresh Liquid icons every 15 seconds to match electrs. 2024-03-07 02:21:38 +09:00
wiz
31e320b2e2
ops: Update check git/md5 hash script 2024-03-06 17:37:27 +09:00
wiz
7f18d73443
Merge pull request #4689 from mempool/mononaut/wallet-balance
Add embeddable wallet balance page
2024-03-06 16:38:00 +09:00
wiz
30485e7483
Merge pull request #4397 from mempool/mononaut/tomahawk-timeouts
Improve timeout handling in esplora api health monitoring & logs
2024-03-06 16:34:20 +09:00
wiz
a2fb16c84c
Merge pull request #4144 from mempool/hunicus/enterprise-cta-docs
Add enterprise cta to docs
2024-03-06 16:33:38 +09:00
wiz
57a878403e
Merge branch 'master' into mononaut/wallet-balance 2024-03-06 16:29:10 +09:00
wiz
faa5475ab7
Merge branch 'master' into mononaut/tomahawk-timeouts 2024-03-06 16:24:35 +09:00
wiz
28d23d4304
Merge branch 'master' into hunicus/enterprise-cta-docs 2024-03-06 16:23:48 +09:00
wiz
cef80a36a9
Merge pull request #4655 from jamesblacklock/macos-docker-init
modify docker/init.sh for macOS compatibility
2024-03-06 16:20:49 +09:00
wiz
e0e997a3d1
Merge pull request #4549 from mempool/nymkappa/increase-mysql-pool
[database] increase default pool size to 100 connections
2024-03-06 16:19:53 +09:00
wiz
c4a11309fa
Merge pull request #4278 from mempool/knorrium/add_sync_check_script
ops: Add block height workflow
2024-03-06 16:18:46 +09:00
wiz
fa4caec73e
Merge pull request #4628 from mempool/simon/dashboard-miner-tags
Display pool tags on dashboard
2024-03-06 16:17:25 +09:00
wiz
965a135390
Merge pull request #4740 from mempool/mononaut/polish-nodes
Polish /nodes and /network pages
2024-03-06 16:14:32 +09:00
wiz
9e5fdbb64a
ops: Increase nginx proxy buffer sizes 2024-03-06 16:04:30 +09:00
Mononaut
71863e4f48
Polish /nodes and /network pages 2024-03-05 23:16:20 +00:00
dependabot[bot]
7cee1512a3
Bump ip from 2.0.0 to 2.0.1 in /backend
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 13:52:17 +00:00
wiz
c9b2ce3efb
Merge pull request #4737 from mempool/junderw/bump-rust-deps
Bump rust-gbt deps
2024-03-05 22:50:35 +09:00
junderw
0f1434e32d
Bump rust-gbt deps 2024-03-05 22:32:14 +09:00
wiz
acb60fa1bc
ops: Add check script to production folder 2024-03-05 21:44:54 +09:00
wiz
9e1fe71dc8
ops: Add MAX_TRACKED_ADDRESSES to prod configs 2024-03-05 20:48:39 +09:00
wiz
62e0cb2e57
Merge pull request #4734 from mempool/mononaut/tomahawk-status-page
Tomahawk status page
2024-03-05 20:09:40 +09:00
natsoni
198939da81
Minor typo and displaying fixes 2024-03-04 20:45:45 +01:00
natsoni
847b90f167
Fix db version conflicts 2024-03-04 20:32:38 +01:00
Mononaut
73e9c85ff1
Separate tomahawk nodes & network pages, misc fixes 2024-03-04 18:47:26 +00:00
Mononaut
5f3ca3a321
Disable tomahawk status on non-official instances 2024-03-04 18:47:26 +00:00
Mononaut
1518b3ccfb
Backend OFFICIAL config setting 2024-03-04 18:47:26 +00:00
Mononaut
5898143f66
Electrs server status page 2024-03-04 18:47:26 +00:00
Mononaut
f63f1b1773
Websocket subscription for fallback server health status 2024-03-04 18:47:24 +00:00
softsimon
8405e5ff07
Merge pull request #4718 from mempool/mononaut/accelerator-audit
Accelerator audit
2024-03-05 01:38:53 +07:00
Mononaut
f923ee4ede
Accelerator audit use datetime for added column 2024-03-04 16:32:43 +00:00
Mononaut
bd0de745e2
Add local acceleration info APIs 2024-03-04 16:29:29 +00:00
Mononaut
130bdac58c
Calculate & save acceleration bid boost rates 2024-03-04 16:29:28 +00:00
Mononaut
75578ac9fa
Improve timeout handling in esplora api health monitoring & logs 2024-03-04 15:22:29 +00:00
wiz
b9d46003f8
Merge pull request #4733 from mempool/mononaut/tooltip-fee-rate
Hide effective rate on tooltip where irrelevant
2024-03-04 22:31:01 +09:00
wiz
1fd07f6c9f
Merge pull request #4731 from mempool/nymkappa/accel-list-1y
[accelerator] acceleration list query 1y
2024-03-04 22:30:37 +09:00
wiz
5a5409fd1a
Merge pull request #4732 from mempool/nymkappa/fix-accel-chart
[accelerator] fix accel graph tooltip and time axis
2024-03-04 22:30:18 +09:00
softsimon
4bddb52db1
Merge pull request #4712 from mempool/mononaut/the-goggles-nonstandard
Add non-standard Goggles filter
2024-03-04 12:25:49 +07:00
natsoni
dc9bddc6b2
Remove checkbox for expired UTXOs and add new tab 2024-03-03 18:31:39 +01:00
Mononaut
8626846264
Hide effective rate on tooltip where irrelevant 2024-03-03 16:48:04 +00:00
Mononaut
eadbc139fa
Handle missing inner_redeemscript 2024-03-03 16:02:14 +00:00
Mononaut
882e8ec598
Check in missing script utility file 2024-03-03 16:02:14 +00:00
Mononaut
249c57f376
Add non-standard Goggles filter 2024-03-03 16:02:14 +00:00
nymkappa
f083aa37d6
[accelerator] fix xaxis type accel graph 2024-03-03 15:43:29 +01:00
nymkappa
c74ce7de83
[accelerator] fix tooltip timestamp accel graph 2024-03-03 15:40:31 +01:00
nymkappa
d4c01f6b1f
[accelerator] acceleration list query 1y 2024-03-03 07:57:36 +01:00
wiz
1deacb9996
Merge pull request #4729 from mempool/nymkappa/accel-stats-3m
[accelerator] fix accel bid boost history chart
2024-03-03 12:27:15 +09:00
nymkappa
8bd939b374
[accelerator] show 3m stats, fix accel fee chart 2024-03-01 12:53:29 +01:00
nymkappa
cda5448f13
[accelerator] fix accel bid boost chart height 2024-03-01 11:04:40 +01:00
softsimon
af6af2748c
Merge pull request #4715 from mempool/nymkappa/accel-dashboard-cleanup
[accelerator] improve acceleration list/dashboard
2024-03-01 10:17:22 +07:00
wiz
975588a862
Merge pull request #4725 from mempool/knorrium/tag_to_latest_again
Push the latest tag to Docker Hub again
2024-03-01 11:50:46 +09:00
Felipe Knorr Kuhn
093649136e
Push the latest tag to Docker Hub again 2024-02-29 18:42:29 -08:00
natsoni
84e91b2c90
Merge remote-tracking branch 'origin/master' into natsoni/federation-utxos-expiry 2024-02-29 14:59:41 +01:00
natsoni
ef209da774
Add expiry filter to Federation UTXOs table
Unify Liquid dashboard with mempool dashboard
2024-02-29 14:57:15 +01:00
wiz
018d4230e2
ops: Remove node207-214.tk7 from prod cluster configs 2024-02-29 19:33:39 +09:00
softsimon
6c66da5426
Merge pull request #4720 from mempool/dependabot/npm_and_yarn/backend/babel/core-7.24.0
Bump @babel/core from 7.23.2 to 7.24.0 in /backend
2024-02-29 17:20:18 +07:00
dependabot[bot]
4a6231c93c
Bump ip from 2.0.0 to 2.0.1 in /frontend
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-29 05:06:01 +00:00
softsimon
5b9b0d0968
Merge pull request #4694 from mempool/dependabot/npm_and_yarn/frontend/echarts-5.5.0
Bump echarts from 5.4.3 to 5.5.0 in /frontend
2024-02-29 12:05:10 +07:00
softsimon
ddf1bc0654
Merge pull request #4721 from mempool/simon/accel-tab-mainnet-only
Only display acceleration tab on mainnet
2024-02-29 11:55:08 +07:00
softsimon
419b40884a
Only display acceleration tab on mainnet
fixes #4719
2024-02-29 11:49:12 +07:00
dependabot[bot]
1f05e7b366
Bump @babel/core from 7.23.2 to 7.24.0 in /backend
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.2 to 7.24.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.0/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-29 02:32:53 +00:00
nymkappa
867e959430
[accelerator] /accelerator/stats -> /accelerator/accelerations/stats 2024-02-27 15:22:59 +01:00
nymkappa
3f8a4b5119
[accelerator] move accel stats into backend 2024-02-27 15:20:15 +01:00
nymkappa
cc06f85e73
Merge branch 'master' into nymkappa/accel-dashboard-cleanup 2024-02-27 12:42:19 +01:00
softsimon
a9d94bdafd
Merge pull request #4685 from mempool/mononaut/v3-filter
Add Goggles filter for nVersion=3
2024-02-27 15:44:13 +07:00
wiz
18b1805ff3
Merge pull request #4706 from mempool/natsoni/fix-liquid-dashboard-safari
Fix liquid dashboard css
2024-02-27 12:22:18 +09:00
wiz
4044ca3877
Merge pull request #4708 from mempool/mononaut/acceleration-goggles
Add Acceleration Goggles
2024-02-27 12:21:55 +09:00
wiz
66386f2bcc
Merge pull request #4709 from mempool/hunicus/txs-api-queryparam
Fix query parameter label in tx history api doc
2024-02-27 12:21:17 +09:00
wiz
d0bf26bcef
Merge pull request #4711 from mempool/nymkappa/update-doc
[doc] remove "estimated_fee" from accelerator endpoints
2024-02-27 12:20:54 +09:00
wiz
e918e1fdab
ops: Implement ACL for internal APIs 2024-02-27 11:46:14 +09:00
nymkappa
ab0c3eeab6
[accelerator] cap max width acceleration history list for now 2024-02-26 16:47:19 +01:00
nymkappa
e26fcff063
[accelerator] cleanup status 2024-02-26 16:40:22 +01:00
nymkappa
b3b65c59dc
[accelerator] improve dashboard responsiveness a bit 2024-02-26 16:23:00 +01:00
nymkappa
fbebfdae04
[accelerator] add pagination support in acceleration list 2024-02-26 15:54:10 +01:00
nymkappa
968a26d2cd
Merge branch 'master' into nymkappa/update-doc 2024-02-25 10:07:48 +01:00
wiz
43fde86e9d
Merge pull request #4710 from mempool/knorrium/update_node_matrix_20_21
Update node matrix to v20 and v21
2024-02-25 16:48:27 +09:00
wiz
587c7f6d59
ops: Kill nginx cache heater script on shutdown 2024-02-25 16:47:40 +09:00
Felipe Knorr Kuhn
f431ca742f
Update node matrix to v20 and v21 2024-02-24 23:40:36 -08:00
wiz
7e16c5e8c4
Tweak a few strings on Acceleration Summary screen 2024-02-25 16:18:43 +09:00
hunicus
8701ba8546
Fix query parameter label in tx history api doc 2024-02-25 01:17:46 -05:00
Mononaut
42912ff007
Add Acceleration Goggles 2024-02-24 20:37:41 +00:00
natsoni
6d8a72301c
Fix recent pegs table css 2024-02-22 15:14:47 +01:00
natsoni
1cdbde680c
Fix liquid dashboard on mobile view 2024-02-22 14:43:19 +01:00
wiz
ec21b3d06f
Merge pull request #4678 from mempool/knorrium/skip_latest_tagging
Temporarily disable tagging images as latest
2024-02-22 19:18:55 +09:00
wiz
e8e43c074b
Merge pull request #4704 from mempool/mononaut/matomo-events
matomo events
2024-02-22 19:18:27 +09:00
nymkappa
dc50b40b69
if matomo is undefined, don't try to use it 2024-02-22 11:07:50 +01:00
wiz
e41d6bc2e6
Merge pull request #4504 from mempool/orangesurf/trademark-updates-2
Move 3rd party licenses to footer
2024-02-22 17:45:27 +09:00
wiz
cb7938baa1
Merge branch 'master' into orangesurf/trademark-updates-2 2024-02-22 15:56:08 +09:00
wiz
4d6b62c7de
Merge pull request #4205 from mempool/mononaut/unfurl-fallback-no-cache
Unfurl fallback no-cache
2024-02-22 15:52:10 +09:00
wiz
7bf053afe5
Merge branch 'master' into mononaut/unfurl-fallback-no-cache 2024-02-22 15:51:57 +09:00
wiz
d8900d40c7
Merge pull request #4204 from mempool/mononaut/unfurl-symlink-fallbacks
Use symlink to avoid duplicate unfurler fallback images
2024-02-22 15:51:47 +09:00
wiz
841f18f481
Merge pull request #4687 from mempool/mononaut/testnet-expiry
Restore mempoolexpiry on test networks
2024-02-22 15:43:24 +09:00
wiz
b0d34d4e48
Merge branch 'master' into mononaut/matomo-events 2024-02-22 15:27:57 +09:00
Mononaut
c684834c42
matomo tx events 2024-02-21 23:15:31 +00:00
softsimon
46e989ab27
Merge pull request #4692 from mempool/natsoni/fix-goggles-z-index
Fix block visualisation tooltip z-index
2024-02-21 12:17:43 +07:00
softsimon
2c19e44fbf
Merge pull request #4690 from mempool/natsoni/fix-hardcoded-hashrate-unit
Fix hardcoded hashrate unit in pool ranking graph
2024-02-21 11:12:21 +07:00
softsimon
dab72f669d
Merge pull request #4700 from mempool/natsoni/lightning-pagination
Add pagination to Lightning nodes list and fix table overflow
2024-02-21 11:07:35 +07:00
softsimon
16537e8018
Merge pull request #4703 from mempool/mononaut/revert-halving-countdown
Revert reverted halving countdown widget
2024-02-21 11:05:52 +07:00
Mononaut
a3b713cc74
Revert reverted halving countdown widget 2024-02-20 23:12:41 +00:00
natsoni
17697e669a
Add pagination to Lightning nodes list and fix overflow 2024-02-19 17:08:07 +01:00
softsimon
035068a72e
Merge pull request #4632 from mempool/mononaut/redis-error-handling
Handle Redis errors and disconnects
2024-02-19 22:18:24 +07:00
softsimon
086ae6978a
Merge branch 'master' into mononaut/redis-error-handling 2024-02-19 21:21:05 +07:00
softsimon
951b946be9
Merge pull request #4699 from mempool/natsoni/fix-nodes-map-undefined-channels
Fix nodes map undefined channels count
2024-02-19 21:19:21 +07:00
natsoni
5fc2205b54
Fix nodes map undefined channels count 2024-02-19 11:57:43 +01:00
softsimon
18e412939d
Merge pull request #4698 from mempool/mononaut/bg-goggles-indexing
Continue other indexing tasks while Goggles classification runs
2024-02-19 12:29:46 +08:00
Mononaut
69dc21d232
Continue other indexing tasks while Goggles classification runs 2024-02-19 04:11:03 +00:00
dependabot[bot]
dbe66fd4d9
Bump node in /docker/backend
Bumps node from 20.8.0-buster-slim to 20.11.1-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 02:38:37 +00:00
dependabot[bot]
3041540283
Bump node in /docker/frontend
Bumps node from 20.8.0-buster-slim to 20.11.1-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 02:30:33 +00:00
dependabot[bot]
d982938366
Bump nginx from 1.24.0-alpine to 1.25.4-alpine in /docker/frontend
Bumps nginx from 1.24.0-alpine to 1.25.4-alpine.

---
updated-dependencies:
- dependency-name: nginx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 02:30:26 +00:00
dependabot[bot]
521d2fc650
Bump echarts from 5.4.3 to 5.5.0 in /frontend
Bumps [echarts](https://github.com/apache/echarts) from 5.4.3 to 5.5.0.
- [Release notes](https://github.com/apache/echarts/releases)
- [Commits](https://github.com/apache/echarts/compare/5.4.3...5.5.0)

---
updated-dependencies:
- dependency-name: echarts
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 02:25:26 +00:00
natsoni
ac250ebe6c
Add z-index to block overview tooltip component 2024-02-17 18:08:22 +01:00
natsoni
596aada169
Fix hardcoded hashrate unit in pool ranking graph 2024-02-16 09:59:37 +01:00
Mononaut
1f14cbfcaa
Fix websocket wallet balances, reposition logo 2024-02-16 06:07:04 +00:00
Mononaut
a7ce7121ee
add mempool logo to wallet widget 2024-02-16 02:50:16 +00:00
Mononaut
96a17f09a5
Add embeddable wallet balance page 2024-02-16 02:41:22 +00:00
nymkappa
c4df05b581
[doc] remove "estimated_fee" from accelerator endpoints 2024-02-15 17:33:38 +01:00
softsimon
7fb699a02b
Merge pull request #4680 from mempool/mononaut/sliding-difficulty
Project early difficulty adjustment with sliding window
2024-02-15 23:55:21 +08:00
Mononaut
e8fc1e8522
Always show estimated difficulty adjustment 2024-02-15 15:32:31 +00:00
softsimon
5f14b32a06
Merge branch 'master' into mononaut/sliding-difficulty 2024-02-15 22:57:21 +08:00
softsimon
e2d7c82553
Merge pull request #4673 from mempool/natsoni/liquid-dashboard-minor-fixes
Liquid Audit dashboard: requested changes
2024-02-15 17:13:20 +08:00
natsoni
7259a00c8d
Polish pegometer for varying screen width 2024-02-14 18:22:04 +01:00
Mononaut
7c6c1187bb
Restore mempoolexpiry on test networks 2024-02-14 15:13:00 +00:00
natsoni
9f4c351e3d
Minor logic change in dashboard component 2024-02-13 16:55:02 +01:00
softsimon
329c1330f4
Merge pull request #4686 from mempool/move-sponsor-boxes
Move sponsor boxes to subscriptions account panel
2024-02-13 21:26:51 +08:00
natsoni
d55d5db01d
Resolve conflicts in dashboard component 2024-02-13 09:47:45 +01:00
natsoni
55cd2f5678
Liquid dashboard: switch places of top graphs 2024-02-13 09:36:22 +01:00
natsoni
69747a0028
Migrate audit dashboard to main Liquid page 2024-02-13 00:59:28 +01:00
hunicus
45c1e05ebc
Move sponsor boxes to subscriptions account panel 2024-02-12 17:43:34 -05:00
Mononaut
8713d33d1a
Add Goggles filter for nVersion=3 2024-02-12 20:00:57 +00:00
softsimon
512f632475
Merge pull request #4676 from mempool/simon/log-mempool-on-new-blocks
Log mempool stats on new blocks
2024-02-12 23:07:49 +08:00
softsimon
6dedecad70
Merge pull request #4681 from mempool/mononaut/fix-log-stats-on-new-block
Fix statistics timespans
2024-02-12 18:55:48 +08:00
natsoni
99aa6c9ed3
Liquid: improve recent pegs pagination data query 2024-02-12 11:34:47 +01:00
Mononaut
d24d643d70
Fix statistics timespan for 2h and 24hr charts 2024-02-12 00:54:34 +00:00
Mononaut
000524691a
Project early difficulty from sliding window 2024-02-11 23:11:19 +00:00
Felipe Knorr Kuhn
290de43df0
Temporarily disable tagging images as latest 2024-02-11 13:10:08 -08:00
softsimon
cc2f42e814
Merge pull request #4672 from mempool/nymkappa/fix-username-not-showing
[auth] properly refresh user when `auth` object changes
2024-02-11 20:13:51 +08:00
softsimon
a40727b194
Merge pull request #4624 from mempool/nymkappa/api-key-rest
[doc] add accelerator rest api documentation
2024-02-11 20:02:41 +08:00
nymkappa
6933d3c395
Merge branch 'master' into nymkappa/fix-username-not-showing 2024-02-11 12:03:04 +01:00
nymkappa
4fc5a6197a
Merge branch 'master' into nymkappa/api-key-rest 2024-02-11 12:01:38 +01:00
nymkappa
fbabd93b5e
Update frontend/src/app/docs/api-docs/api-docs-data.ts
Co-authored-by: hunicus <93150691+hunicus@users.noreply.github.com>
2024-02-11 12:01:09 +01:00
softsimon
2c22200820
Log mempool stats on new blocks 2024-02-10 20:45:58 +08:00
softsimon
d921c3fdc2
Merge pull request #4670 from mempool/mononaut/optimize-mempool-websocket
Reduce the network size of mempool block websocket updates
2024-02-10 20:10:42 +08:00
nymkappa
a1bd84ea6d
[doc] separate private/public acceleration history endpoint title 2024-02-10 11:41:30 +01:00
nymkappa
740f9af9af
[doc] additional rest api doc for accelerator 2024-02-10 11:40:19 +01:00
nymkappa
be183ada0a
[doc] fix acceleration history endpoint detail 2024-02-10 10:56:19 +01:00
nymkappa
a2b01587b1
[auth] small refactor 2024-02-10 10:31:56 +01:00
nymkappa
5f698dfbbb
Merge branch 'master' into nymkappa/api-key-rest 2024-02-10 10:23:17 +01:00
softsimon
46f2509ca0
Merge branch 'master' into mononaut/optimize-mempool-websocket 2024-02-10 15:27:15 +08:00
wiz
8bd4a8a9ee
Merge pull request #4674 from mempool/mononaut/data-filter 2024-02-09 17:53:15 -05:00
wiz
e00bc86bd1
Merge pull request #4675 from mempool/mononaut/no-webgl 2024-02-09 17:52:54 -05:00
Mononaut
ade256efc7
Handle missing webgl on dashboards 2024-02-09 21:46:42 +00:00
natsoni
33ac4056d8
Display percent instead of ratio in stats 2024-02-09 18:59:24 +01:00
natsoni
4ef1df47a3
Fix addresses stat error 2024-02-09 18:46:34 +01:00
Mononaut
e23de97e0f
💩 => data 2024-02-09 17:42:20 +00:00
natsoni
346c024ddf
Change federation wallet stats to include utxos count 2024-02-09 16:26:59 +01:00
nymkappa
bb43599493
[auth] remove debug log 2024-02-09 15:53:20 +01:00
nymkappa
e6266ecedc
[auth] properly refresh user when auth object changes 2024-02-09 15:49:28 +01:00
softsimon
d4db628c3b
Merge pull request #4666 from mempool/mononaut/persistent-filters
Make dashboard filters persistent, add disjunctive filter mode
2024-02-09 21:31:09 +08:00
softsimon
1e56ac094c
Smaller mobile toggle buttons 2024-02-09 21:30:50 +08:00
Mononaut
ddee5f927c
Make dashboard filters persistent, add disjunctive filter mode 2024-02-09 21:30:50 +08:00
natsoni
42bd08c744
Minor fixes on Liquid dashboards 2024-02-09 14:26:34 +01:00
softsimon
dfbec0ceef
Merge pull request #4511 from mempool/nymkappa/fix-platinium-typo
[typo] platinium -> platinum
2024-02-09 20:46:19 +08:00
nymkappa
3b3081f884
Merge branch 'master' into nymkappa/api-key-rest 2024-02-09 12:51:30 +01:00
softsimon
925d51f40e
Merge pull request #4669 from mempool/mononaut/fix-dashboard-sizes
Fix mining/liquid dashboard widget heights
2024-02-09 14:11:43 +08:00
softsimon
b3dbe1215c
Adjusting Load more position to match other dashboards 2024-02-09 14:11:12 +08:00
softsimon
dd89c398cc
Merge pull request #4665 from mempool/natsoni/fix-liquid-dashboard-mobile
Fix Liquid dashboard layout on mobile view
2024-02-09 14:01:29 +08:00
Mononaut
7de4a03f1b
Fix mining/liquid dashboard widget heights 2024-02-08 22:50:47 +00:00
Mononaut
1121136a5e
Reduce the network size of mempool block websocket updates 2024-02-08 22:40:22 +00:00
natsoni
e5f0544cc2
Fix Liquid dashboard layout for mobile view 2024-02-08 18:32:07 +01:00
nymkappa
3456d2737a
Merge branch 'master' into nymkappa/fix-platinium-typo 2024-02-08 15:11:45 +01:00
softsimon
efdc83d4bb
Enabling Accelerator 2024-02-08 21:25:34 +08:00
softsimon
d745bf3f9e
Merge pull request #4664 from mempool/simon/liquid-mining-dashboard-heights
Fixed liquid and mining dashboard graph heights
2024-02-08 21:02:58 +08:00
softsimon
9d6231b6e5
New mining dashboard graph height 2024-02-08 21:01:24 +08:00
softsimon
fdad3d1fd5
Fixing new liquid dashboard height 2024-02-08 20:56:16 +08:00
wiz
1e3650594c
Merge pull request #4509 from mempool/nymkappa/mega-branch
[Mega branch] Various fixes and improvements
2024-02-08 07:55:25 -05:00
nymkappa
2dc2a22edb
Merge branch 'master' into nymkappa/mega-branch 2024-02-08 13:37:17 +01:00
softsimon
dcccc3c8a2
Merge pull request #4658 from mempool/natsoni/fix-undefined-block-fee
Blockchain component: display dash when feerate is undefined
2024-02-08 20:31:00 +08:00
wiz
49553b7bae
Merge pull request #4653 from mempool/mononaut/healthier-checks
Staggered esplora fallback health checks
2024-02-08 07:23:39 -05:00
softsimon
01e019245b
Merge pull request #4651 from mempool/natsoni/liquid-audit-improvements
Liquid audit dashboard: various improvements
2024-02-08 19:50:55 +08:00
softsimon
01066eae64
Merge pull request #4648 from mempool/natsoni/search-bar-confidential-addresses
Search bar: add Liquid confidential addresses to addresses regex
2024-02-08 19:45:08 +08:00
softsimon
b88d6bc7b7
Merge pull request #4659 from mempool/natsoni/fix-broken-blocks-skeleton
Fix broken skeleton loader of blocks-list
2024-02-08 18:34:00 +08:00
softsimon
a51d82bcfb
Merge branch 'master' into natsoni/fix-broken-blocks-skeleton 2024-02-08 16:22:06 +08:00
softsimon
999994c701
Merge pull request #4652 from mempool/mononaut/fix-address-scroll
Fix infinite address scroll
2024-02-08 16:14:05 +08:00
softsimon
0a7c91a4e9
Merge pull request #4663 from mempool/mononaut/dashboard-concept
New dashboard concept
2024-02-08 14:57:44 +08:00
softsimon
510dd91328
Changed to toggle buttons. Changed filters. 2024-02-08 14:52:31 +08:00
Mononaut
3ceb583127
Fix Goggles title alignment 2024-02-08 04:18:05 +00:00
Mononaut
d7be5a4737
Simple Goggle Toggles 2024-02-08 04:17:54 +00:00
Mononaut
3039481686
Change titles, adjust padding 2024-02-08 02:47:46 +00:00
Mononaut
f14cd5ee2b
Swap incoming vb chart and mempool stats 2024-02-08 00:37:16 +00:00
Mononaut
e268a6a033
Fix mining dashboard hashrate graph height 2024-02-08 00:03:34 +00:00
Mononaut
ca2c5d3628
Expand lightning dashboard widgets & improve responsiveness 2024-02-08 00:00:06 +00:00
Mononaut
ce7a007b62
Expand mining dashboard widgets & improve responsiveness 2024-02-07 23:26:06 +00:00
Mononaut
ba0a3d004d
Expand acceleration dashboard widgets & improve responsiveness 2024-02-07 21:40:22 +00:00
Mononaut
29e4a581e7
Add next block visualization to main dashboard, expand widgets 2024-02-07 21:39:39 +00:00
Mononaut
4f98a413d1
address scroll handle different page sizes 2024-02-07 20:23:35 +00:00
nymkappa
0ab1183048
Merge branch 'master' into nymkappa/mega-branch 2024-02-07 17:01:55 +01:00
James Blacklock
b8d635f257
Merge branch 'master' into macos-docker-init 2024-02-07 09:15:32 -05:00
natsoni
03d4375b17
Clean up blocks-list skeleton 2024-02-07 14:51:23 +01:00
softsimon
e86d0dc868
Merge pull request #4573 from mempool/dependabot/npm_and_yarn/backend/follow-redirects-1.15.5
Bump follow-redirects from 1.15.2 to 1.15.5 in /backend
2024-02-07 21:47:56 +08:00
softsimon
e9a7ea3623
Merge pull request #4650 from mempool/natsoni/add-liquid-peg-out-label
Add P2WSH Liquid peg out to input label
2024-02-07 20:09:48 +08:00
dependabot[bot]
1e568e5b4c
Bump follow-redirects from 1.15.2 to 1.15.5 in /backend
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.5.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.5)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 11:53:08 +00:00
softsimon
b56350dca1
Merge pull request #4633 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.9.1
Bump mysql2 from 3.7.0 to 3.9.1 in /backend
2024-02-07 19:52:24 +08:00
natsoni
20614213a7
Add skeleton to recent blocks on Liquid dashboard 2024-02-07 12:50:36 +01:00
softsimon
582eca1fdd
Merge branch 'master' into dependabot/npm_and_yarn/backend/mysql2-3.9.1 2024-02-07 19:47:41 +08:00
natsoni
df7f1cc86b
Blockchain component: display dash when feerate is undefined 2024-02-07 11:31:22 +01:00
softsimon
0acb797494
Merge pull request #4646 from mempool/knorrium/download_from_cdn
[sync-assets] More logging, add MEMPOOL_CDN and DRY_RUN options
2024-02-07 16:05:01 +08:00
Felipe Knorr Kuhn
195eeaa7b9
Merge branch 'master' into knorrium/download_from_cdn 2024-02-06 20:10:39 -08:00
James Blacklock
d04952b10b
Merge branch 'master' into macos-docker-init 2024-02-06 23:06:20 -05:00
softsimon
48c2317e20
Merge pull request #4654 from jamesblacklock/docker-bugfix-2
fix syntax error in mempool-config.json
2024-02-07 12:06:04 +08:00
Felipe Knorr Kuhn
95233f0ef3
Merge branch 'master' into docker-bugfix-2 2024-02-06 19:56:22 -08:00
softsimon
29c6efa9ed
Merge pull request #4657 from mempool/knorrium/validate_final_docker_json
Add a step to validate the JSON config generated for Docker
2024-02-07 11:55:42 +08:00
Felipe Knorr Kuhn
624cbf05c0
Add a step to validate the JSON config generated for Docker 2024-02-06 19:47:09 -08:00
James Blacklock
1547c2c477
fix syntax error in mempool-config.json 2024-02-06 22:13:10 -05:00
James Blacklock
df92f4d0aa
modify docker/init.sh for macOS compatibility 2024-02-06 21:36:14 -05:00
Mononaut
3959f52d19
Staggered esplora fallback health checks 2024-02-06 23:42:14 +00:00
Mononaut
dfdd286f75
Fix infinite address scroll 2024-02-06 21:50:29 +00:00
wiz
fea115bcbc
ops: Fix obvious bug in cache heater script 2024-02-06 14:03:44 -05:00
wiz
f004705896
ops: Add missing HTTP Expires header for fees API 2024-02-06 13:55:44 -05:00
wiz
87a613e4dc
ops: Fix broken nginx cache configuration 2024-02-06 13:53:03 -05:00
natsoni
b561648082
Add peg ins/out volume to stats components 2024-02-06 17:35:02 +01:00
natsoni
602c87bea0
Update peg-in/out links to open new page on click 2024-02-06 17:34:24 +01:00
natsoni
b453898b1d
Add glow effect to peg outs in progress 2024-02-06 17:34:04 +01:00
Felipe Knorr Kuhn
c4c886b584
Merge branch 'master' into knorrium/download_from_cdn 2024-02-06 07:44:00 -08:00
natsoni
517d36783f
Add P2WSH Liquid peg out to input label 2024-02-06 11:37:51 +01:00
nymkappa
f964888c47
Merge branch 'master' into nymkappa/mega-branch 2024-02-05 17:10:07 +01:00
natsoni
c58115a96c
Add confidential addresses in liquid address regex 2024-02-05 11:53:05 +01:00
natsoni
fc415372bf
Fix P2SH / P2PKH detection on Liquid address page 2024-02-05 11:22:14 +01:00
softsimon
47d221fd3b
Merge pull request #4647 from mempool/mononaut/better-coinjoin-goggles
Improve Goggles coinjoin detection
2024-02-05 18:13:12 +08:00
Mononaut
7e5e85c8b9
Improve Goggles coinjoin detection 2024-02-04 21:47:31 +00:00
Felipe Knorr Kuhn
9c72d1df3b
Sync assets from the mempool CDN 2024-02-04 09:18:50 -08:00
Felipe Knorr Kuhn
933bc47b44
Add DRY_RUN and MEMPOOL_CDN options 2024-02-04 09:17:42 -08:00
softsimon
a15729c38f
Merge pull request #4640 from mempool/fix-liquid-frontend-crash
Fix Liquid frontend crash
2024-02-04 23:38:32 +08:00
softsimon
229e122daf
Merge branch 'master' into fix-liquid-frontend-crash 2024-02-04 23:14:35 +08:00
softsimon
16846d526c
Merge pull request #4616 from mempool/natsee/liquid-audit-dashboard
Feature: Liquid Federation Audit Dashboard
2024-02-04 22:05:02 +08:00
natsoni
19a4c10860
Fix date alignment in utxos table 2024-02-04 14:57:04 +01:00
natsoni
ae38c3bf81
Update CLA for natsoni 2024-02-04 13:06:49 +01:00
natsoni
575c407098
Remove SQL transactions in federation utxos indexing 2024-02-04 13:03:41 +01:00
natsoni
03e4a21bce
Fix styling issue in peg and utxo widgets 2024-02-04 13:01:07 +01:00
natsoni
7bfc649042
Add seo title to pegs and utxos tables 2024-02-04 12:34:40 +01:00
Felipe Knorr Kuhn
e478fb2279
Merge branch 'master' into fix-liquid-frontend-crash 2024-02-03 09:17:53 -08:00
softsimon
9494d2fb0b
Merge pull request #4631 from mempool/mononaut/fix-null-err
Fix missing optional chain on bestDescendant access
2024-02-03 21:59:37 +08:00
softsimon
b44ec76130
Merge pull request #4637 from mempool/mononaut/summaries-indexing-error
More robust error handling and logging during summaries indexing
2024-02-03 20:39:09 +08:00
softsimon
dd7bd9e397
Merge pull request #4639 from mempool/mononaut/acc-data-catch
Fix error handling in acceleration data polling
2024-02-02 23:57:41 +08:00
Mononaut
0bf0d79ee4
Fix error handling in acceleration data polling 2024-02-02 15:31:10 +00:00
softsimon
788a8693ee
Merge pull request #4523 from jamesblacklock/docker-bugfix
fix bug in backend Docker `start.sh` script
2024-02-02 11:40:45 +08:00
natsee
163c0b6d78
Liquid peg outs address indexing: support for duplicates and minor fixes 2024-02-01 19:29:31 +01:00
natsee
7ab5b2a2b7
Add check for mempoolBlocks length in mempool subscription 2024-02-01 12:13:34 +01:00
nymkappa
f3fd70a846
Merge branch 'master' into nymkappa/mega-branch 2024-01-30 23:17:26 +01:00
James Blacklock
770b6dfd19
Merge branch 'master' into docker-bugfix 2024-01-30 15:50:03 -05:00
Mononaut
db8ba7c938
More robust error handling and logging during summaries indexing 2024-01-30 16:42:55 +00:00
wiz
e4d92c8fe0
Merge pull request #4629 from mempool/wiz/add-new-prod-servers
ops: Add new prod servers for fallback/replication
2024-01-30 10:18:10 -05:00
natsee
1e15428a63
Liquid Audit: fix i18n 2024-01-30 15:11:51 +01:00
natsee
f4de3a44e0
Liquid: Add address column in recent pegs table 2024-01-30 14:25:08 +01:00
natsee
e69ba7e884
Liquid Federation indexing: clean up logging 2024-01-30 11:55:59 +01:00
softsimon
b4906a5e8a
Merge pull request #4626 from mempool/mononaut/fix-pool-dominance
Fix pools dominance chart
2024-01-30 17:21:49 +07:00
natsee
73e6045549
Liquid: Add support for peg outs display 2024-01-30 11:11:30 +01:00
dependabot[bot]
5f3f483546
Bump mysql2 from 3.7.0 to 3.9.1 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.7.0 to 3.9.1.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.7.0...v3.9.1)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-30 02:07:07 +00:00
Mononaut
ba8ea7d0d1
Handle Redis errors and disconnects 2024-01-30 01:10:36 +00:00
Mononaut
e458196bff
Fix missing optional chain on bestDescendant access 2024-01-29 23:15:21 +00:00
Mononaut
2637636f27
Fix pool dominance sorting 2024-01-29 16:59:13 +00:00
natsee
639fc3dd5f
Liquid audit: Add recent pegs widget and table 2024-01-29 17:06:25 +01:00
natsee
451a61e5fc
Reformat UTXOs widget to Peg Ins widget 2024-01-29 12:22:47 +01:00
nymkappa
b2a130bb17
[doc] fix copy, formatting and hide accelerator doc title if non official instance 2024-01-29 11:45:14 +01:00
natsee
c39ca0270e
Fix elements_pegs bitcoinaddress field 2024-01-29 11:36:58 +01:00
natsee
b6e5a059c9
Liquid: minor changes on audit display 2024-01-29 11:06:51 +01:00
hunicus
a3055e20f4
Fix signet and testnet docs pages 2024-01-29 01:57:06 -05:00
wiz
3ac70b3860
ops: Add new prod servers for fallback/replication 2024-01-29 00:05:16 -05:00
natsee
71f73835da
Liquid Federation: filter out change UTXOs from table 2024-01-28 21:46:31 +01:00
natsee
59128c8ca0
Audit dashboard: merge utxos and addresses tables in same page 2024-01-28 20:07:41 +01:00
softsimon
08272c7f87
Display pool tags on dashboard 2024-01-29 01:50:46 +07:00
natsee
36d3734d55
Liquid Federation dashboard: minor changes 2024-01-28 18:26:00 +01:00
softsimon
c9c477c88f
Merge pull request #4622 from mempool/mononaut/beta-accelerator
Add beta tag to accelerator dashboard nav item
2024-01-28 17:39:51 +07:00
softsimon
8806b8332b
Merge pull request #4621 from mempool/mononaut/acceleration-list
Fix acceleration list css, move to /acceleration/list
2024-01-28 17:37:24 +07:00
softsimon
c7a38c78d2
Merge pull request #4619 from mempool/nymkappa/halving-widget
[mining] update halving widget to be more human readable
2024-01-28 17:31:05 +07:00
nymkappa
2d189ca3f6
Merge branch 'master' into nymkappa/halving-widget 2024-01-28 09:50:39 +01:00
softsimon
4b798730b1
Merge pull request #4623 from mempool/mononaut/goggles-index-config
Goggles indexing config & rate limit
2024-01-28 15:24:45 +07:00
Mononaut
bbb0aea0d1
Fix pools dominance chart 2024-01-27 22:25:42 +00:00
nymkappa
57c7df4f1c
Merge pull request #4625 from mempool/mononaut/double-time-units
dual-unit app-time halving countdown
2024-01-27 20:25:34 +01:00
Mononaut
87910a6eb7
Display halving countdown with double units 2024-01-27 19:11:43 +00:00
nymkappa
ea1b74dcef
[doc] add accelerator rest api documentation 2024-01-27 19:35:16 +01:00
Mononaut
09e38ac177
Goggles indexing config & rate limit 2024-01-27 18:22:58 +00:00
natsee
5b93d39d73
Fix duplicate api call to audit status 2024-01-27 19:19:14 +01:00
Mononaut
4e5ebabc54
Add beta tag to accelerator dashboard tab 2024-01-27 18:03:53 +00:00
Mononaut
a79e1aec1c
Fix acceleration list css, move to /acceleration/list 2024-01-27 16:45:18 +00:00
nymkappa
085d40a4e3
Merge branch 'master' into nymkappa/mega-branch 2024-01-27 16:27:25 +01:00
nymkappa
057abbb6c1
[mining] update halving widget to be more human readable 2024-01-27 16:16:32 +01:00
natsee
1a2844ffdf
Liquid dashboard: Fix double api call 2024-01-26 20:49:48 +01:00
natsee
7102a72f84
Remove beta tag to Liquid Federation Audit 2024-01-26 19:11:38 +01:00
natsee
87e328504f
Liquid: Fix audit updating conditions 2024-01-26 18:52:07 +01:00
softsimon
520e79aec4
Merge pull request #4615 from mempool/mononaut/halvenening
Fix halving fireworks
2024-01-26 23:56:18 +07:00
softsimon
ee6422c982
Merge pull request #4609 from afahrer/master
Channel search results showing up during TX search
2024-01-26 23:43:47 +07:00
wiz
e8ca8e7ec1
ops: Add redis to prod installer 2024-01-26 10:51:44 -05:00
wiz
b110f86b48
ops: Add new nginx hot cacher 2024-01-26 10:43:03 -05:00
wiz
5a7a78cddc
ops: Add new nginx hot cacher 2024-01-26 10:40:21 -05:00
wiz
c7862e19c2
ops: Add /api/v1/fees/recommended to warm cache 2024-01-26 10:26:42 -05:00
softsimon
3610908171
Update rust-gbt package lock version 2024-01-26 21:48:21 +07:00
softsimon
87c336734d
Merge pull request #4612 from mempool/mononaut/update-rust
Update rust-toolchain to 1.65
2024-01-26 21:45:40 +07:00
hunicus
89d805b500
Merge branch 'master' into hunicus/move-on-in-it 2024-01-26 08:40:40 -05:00
softsimon
bad3992397
Merge pull request #4505 from natsee/fix-overflow-pool-ranking
Fix overflow on mining pool ranking table
2024-01-26 16:13:29 +07:00
nymkappa
edb4c8d9ad
Merge branch 'master' into fix-overflow-pool-ranking 2024-01-25 22:33:29 +01:00
nymkappa
565a881f3b
Merge branch 'master' into nymkappa/mega-branch 2024-01-25 18:49:13 +01:00
natsee
d1d8f77b29
Fix eslint 2024-01-25 15:56:25 +01:00
natsee
c957692726
Merge branch 'natsee/liquid-federation-audit' into natsee/liquid-audit-dashboard 2024-01-25 15:22:47 +01:00
natsee
16f0830f2c
Fix conflict in database-migration 2024-01-25 15:19:46 +01:00
natsee
b6d2008e97
Merge branch 'master' into natsee/liquid-federation-audit 2024-01-25 15:17:51 +01:00
natsee
a6b584d964
Liquid: Federation Audit Dashboard 2024-01-25 15:08:15 +01:00
softsimon
e81d1e273a
Merge pull request #4550 from mempool/orangesurf/trademark0103
update trademarks
2024-01-25 15:46:12 +07:00
Mononaut
dbe7ebe530
Fix halving fireworks 2024-01-25 01:51:01 +00:00
Mononaut
4e007acd84
Update rust-toolchain to 1.65 2024-01-24 18:53:59 +00:00
softsimon
4fe745817c
Merge pull request #4137 from mempool/mononaut/multi-address-tracking
Multi address tracking
2024-01-24 23:14:00 +07:00
softsimon
09ce1bd458
Merge pull request #4608 from mempool/mononaut/goggle-index-bugfix
Fix version update & error handling in Goggles indexing
2024-01-24 23:08:31 +07:00
Mononaut
09a727c00d
Fix more Goggles indexing bugs 2024-01-24 12:18:42 +00:00
afahrer
f7f1eb067b
$ match. fix transaction starting with number 2024-01-23 22:56:17 -05:00
afahrer
74d94579f9
Channel search results showing up during TX search 2024-01-23 20:48:49 -05:00
orangesurf
885331fe4a
Remove space from footer 2024-01-23 18:34:43 +00:00
Mononaut
8ca2b2b5c0
Fix version update & error handling in Goggles indexing 2024-01-23 17:20:57 +00:00
softsimon
58f143f867
Merge pull request #4605 from mempool/mononaut/goggle-index
Goggle Indexing
2024-01-24 00:16:24 +07:00
softsimon
a19ffb884f
Fixing broken info-link 2024-01-24 00:15:10 +07:00
softsimon
2faca121d3
Merge pull request #4526 from mempool/mononaut/mined-goggles
Mined Goggles
2024-01-24 00:13:43 +07:00
softsimon
8f99d2ba58
Merge pull request #4604 from mempool/simon/clear-tx-cache
Clear txCache when switching network
2024-01-23 23:47:40 +07:00
nymkappa
585732e438
Merge branch 'master' into orangesurf/trademark0103 2024-01-23 17:32:58 +01:00
Mononaut
0cddfcfa64
Fix missing quotes on multi-address-tracking error msg 2024-01-23 14:04:15 +00:00
Mononaut
aa0948a154
Add multi-address-tracking limit config 2024-01-23 13:36:42 +00:00
Mononaut
8f7895cb2e
Track dropped txs in multi-address subscription 2024-01-23 13:36:42 +00:00
Mononaut
77a526b91c
Normalize scriptpubkeys to lowercase 2024-01-23 13:36:42 +00:00
Mononaut
ccd9642a01
Deduplicate address validation code 2024-01-23 13:36:41 +00:00
Mononaut
8642956dc2
Add track-scriptpubkeys websocket subscription 2024-01-23 13:36:41 +00:00
Mononaut
57c3861ca6
Support multi address websocket subscriptions 2024-01-23 13:36:41 +00:00
Mononaut
82920f621f
Fix Goggles indexing when summaries disabled 2024-01-23 13:33:59 +00:00
softsimon
de7db08ae3
Merge pull request #4601 from mempool/natsee/seach-bar-liquid-assets
Search bar: suggest Liquid assets
2024-01-23 20:07:06 +07:00
softsimon
431f60d9c0
Use current network name in search result 2024-01-23 18:56:32 +07:00
softsimon
da545dbcf1
Merge branch 'master' into natsee/seach-bar-liquid-assets 2024-01-23 17:14:26 +07:00
natsee
b7feb0d43d
Merge branch 'natsee/liquid-federation-audit' into natsee/liquid-audit-dashboard 2024-01-23 09:48:36 +01:00
natsee
cef060be2d
Only include count in federation address and UTXO queries 2024-01-23 09:46:15 +01:00
softsimon
c570cc1e73
Merge branch 'master' into simon/clear-tx-cache 2024-01-23 11:20:38 +07:00
softsimon
6339cc8d59
Merge pull request #4597 from mempool/knorrium/cache_assets_gha
Cache build assets to prevent rate limiting
2024-01-23 11:20:06 +07:00
Felipe Knorr Kuhn
fe079a72be
Clean up action 2024-01-22 20:06:27 -08:00
Felipe Knorr Kuhn
c789797d2d
Revert "Remove the download artifacts step"
This reverts commit 479007da5512637593e454b5098d823c0f3f8a47.
2024-01-22 20:05:20 -08:00
Felipe Knorr Kuhn
479007da55
Remove the download artifacts step 2024-01-22 19:56:45 -08:00
Mononaut
7405cf8336
Add block classification indexing 2024-01-23 01:44:19 +00:00
Felipe Knorr Kuhn
f955c1b0f4
Merge branch 'master' into knorrium/cache_assets_gha 2024-01-22 16:53:19 -08:00
Felipe Knorr Kuhn
99f7201ec5
Cache build assets to prevent rate limiting 2024-01-22 16:51:08 -08:00
Mononaut
0c9c79c86c
Enable goggles on supported mined block visualizations 2024-01-22 22:32:19 +00:00
Mononaut
1507003c19
Save goggle flags in audit templates & block summaries 2024-01-22 22:32:18 +00:00
softsimon
5ecdf1988e
Clear txCache when switching network
fixes #4603
2024-01-23 01:23:51 +07:00
softsimon
5b622c7786
Merge pull request #4589 from isghe/fix-copyright-2024
about: fix copyright 2024
2024-01-22 22:19:20 +07:00
natsee
392ea35d51
Skeleton audit dashboard 2024-01-22 16:03:55 +01:00
softsimon
552ba98de2
Pull from transifex 2024-01-22 21:30:03 +07:00
softsimon
7a2f8bcce2
Capitalizing title 2024-01-22 21:17:43 +07:00
softsimon
d53b5e4a68
Capitalizing title 2024-01-22 21:16:24 +07:00
softsimon
c2bd6419bb
Acceleration i18n fixes 2024-01-22 21:13:41 +07:00
natsee
8f7cd70882
Add throttleTime to avoid too frequent calls to backend 2024-01-22 14:19:01 +01:00
natsee
fa90eb84fc
Truncate elements_pegs and add primary key instead of drop/create 2024-01-22 13:59:11 +01:00
natsee
00613fe613
Liquid: suggest asset in search bar results 2024-01-22 11:45:07 +01:00
natsee
0663cc2cfa
Fix search bar result overflow 2024-01-22 11:29:41 +01:00
natsee
81a09e9dba
Add Liquid Peg-in column to Federation UTXOs list 2024-01-21 13:51:50 +01:00
natsee
cd713c61b3
Liquid: wip on Federation audit dashboard 2024-01-21 13:33:20 +01:00
natsee
752eba767a
Liquid: add BTC reserves to L-BTC widget and make it dynamic 2024-01-21 13:19:02 +01:00
natsee
de2842b62a
Add pegtxid and pegindex data to federation_txos table 2024-01-21 13:04:34 +01:00
orangesurf
a89af41c48
Update bisq-dashboard.component.ts
Switch from ® to &reg; for better compatibility
2024-01-21 11:20:11 +00:00
orangesurf
c751e10da8
Update seo.service.ts
Switch from ® to &reg; for better compatibility
2024-01-21 11:19:01 +00:00
orangesurf
2750f1789c
Update index.ts
Switch from ® to &reg; for better compatibility
2024-01-21 11:17:50 +00:00
orangesurf
aaf378ed42
Update index.liquid.html
Switch from ® to &reg; for better compatibility
2024-01-21 11:15:11 +00:00
orangesurf
bc5e03deb5
Update index.bisq.html
Switch from ® to &reg; for better compatibility
2024-01-21 11:13:55 +00:00
orangesurf
8759d49daf
Merge branch 'master' into orangesurf/trademark0103 2024-01-21 10:29:40 +00:00
natsee
4b10e32e73
Liquid: add indexing process of Federation utxos 2024-01-20 15:15:15 +01:00
softsimon
6671746fc5
Fixing i18n build error and extracting new i18n 2024-01-20 20:07:25 +07:00
wiz
10bb6caf97
ops: Fix elements crontab 2024-01-20 07:20:40 -05:00
wiz
b52946e6f5
ops: Fix bitcoin crontab 2024-01-20 07:20:18 -05:00
wiz
aac094b965
ops: Add VA1 nodes to bitcoin.conf peer list 2024-01-20 06:42:46 -05:00
softsimon
8ca14e7f19
Merge pull request #4488 from mempool/simon/acceleration-tab
Acceleration tab
2024-01-19 23:35:23 +07:00
softsimon
84182b2512
Merge pull request #4586 from mempool/mononaut/acceleration-tab-changes
Acceleration tab changes
2024-01-19 23:34:42 +07:00
softsimon
a45e4a6ec5
Merge pull request #4585 from mempool/mononaut/accelerator-dashboard-polish
Accelerator dashboard tweaks
2024-01-19 23:27:33 +07:00
Mononaut
a5eeaaa91a
AccDash: label transactions -> request 2024-01-19 14:40:11 +00:00
nymkappa
59e30027a5
Merge branch 'master' into nymkappa/mega-branch 2024-01-19 09:49:00 +01:00
softsimon
7fd8ae375c
Asset group title fix 2024-01-19 10:24:04 +07:00
softsimon
9e240e55ce
Default Liquid asset child should be /featured 2024-01-19 00:15:51 +07:00
Isidoro Ghezzi
d82a5281fc
about: fix copyright 2024
add contributors/isghe.txt

using contributors/wiz.txt as template
2024-01-18 16:56:08 +01:00
nymkappa
8054e2d79a
[accelerator] fix success rate stat value 2024-01-18 15:54:04 +01:00
softsimon
af7d437d09
Merge pull request #4584 from mempool/nymkappa/add-internal-routes-to-bitcoin-core
[bitcoin core] Add internal routes to bitcoin core
2024-01-18 20:20:59 +07:00
nymkappa
f6d7790512
[sponsors] allow setting up custom host for the sponsor component 2024-01-18 12:13:52 +01:00
softsimon
e373f36765
Merge pull request #4460 from natsee/lightning-dashboard-ownership
Add % ownership in capacity table (LN dashboard)
2024-01-18 16:41:21 +07:00
nymkappa
8cb49ba8e3
Merge branch 'master' into lightning-dashboard-ownership 2024-01-17 17:42:53 +01:00
Mononaut
d2270ffc26
Move acceleration tab icon, fix responsive issues 2024-01-15 23:39:51 +00:00
Mononaut
5009ca909c
AccDash: out-of-band fees -> bid boost 2024-01-15 22:52:42 +00:00
Mononaut
6a189c484a
AccDash: accelerated -> pending 2024-01-15 22:34:12 +00:00
nymkappa
ed9826b2d8
[bitcoin core] internal core api from camel case to kebab case 2024-01-15 16:12:58 +01:00
nymkappa
0225455784
Fix merge conflict with 2013dc6d8b05d1bed4ec855ec97720e24aec4986 2024-01-15 10:05:37 +01:00
nymkappa
ee721b3e1c
Merge branch 'master' into nymkappa/mega-branch 2024-01-15 10:01:38 +01:00
nymkappa
f161f7e8e2
[bitcoin core] fix getMempoolAncestors verbose param 2024-01-15 10:00:01 +01:00
nymkappa
b38bbb9513
[bitcoin core] add missing verbose params to bitcoin core internal routes 2024-01-15 09:59:35 +01:00
nymkappa
f095913538
[bitcoin core] add internal routes to bitcoin core rpc 2024-01-15 09:59:32 +01:00
softsimon
91fad7ff65
Merge pull request #4583 from mempool/mononaut/goggles-inscription-bug
Fix goggles inscription detection bug
2024-01-15 10:25:31 +07:00
Mononaut
00b8f001b0
Fix goggles inscription detection bug 2024-01-15 02:47:29 +00:00
softsimon
73d4ea75de
Merge pull request #4543 from natsee/cross-network-address-search
Search bar feature: network based regex and address matches
2024-01-14 18:38:50 +07:00
softsimon
0722c221c7
Minor adjustments 2024-01-14 18:27:30 +07:00
softsimon
693d8c4b3b
Merge pull request #4577 from mempool/translations_frontend-src-locale-messages-xlf--master_nb
Updates for file frontend/src/locale/messages.xlf in nb
2024-01-14 10:37:22 +07:00
softsimon
2e5bb000ab
Merge pull request #4579 from mempool/knorrium/add_seconds_to_block_list
Add seconds to block timestamp in the mining pool view and blocks list
2024-01-14 10:34:27 +07:00
softsimon
203e2040d7
Merge pull request #4572 from mempool/nymkappa/fix-footer
[footer] fix css
2024-01-14 10:32:49 +07:00
softsimon
a987983413
Merge pull request #4575 from mempool/simon/dashboard-more-skeleton-loaders
Adding dashboard skeleton loaders
2024-01-14 10:08:39 +07:00
softsimon
227c597cb6
Merge pull request #4578 from mempool/knorrium/add_seconds_to_block_view
Add seconds to the block view timestamp
2024-01-14 10:08:03 +07:00
Felipe Knorr Kuhn
a8442a3467
Add seconds to block timestamp in the mining pool view and blocks list 2024-01-13 18:11:13 -08:00
Felipe Knorr Kuhn
65236c7b08
Add seconds to the block view timestamp 2024-01-13 13:55:12 -08:00
transifex-integration[bot]
e4d7034d81
Translate frontend/src/locale/messages.xlf in nb
100% reviewed source file: 'frontend/src/locale/messages.xlf'
on 'nb'.
2024-01-13 16:57:03 +00:00
wiz
2ca6dc51da
ops: Increase nginx proxy_read_timeout to 2m 2024-01-13 12:22:38 +09:00
wiz
fdd14fd6dc
ops: Disable disk cache for production mainnet 2024-01-13 12:22:23 +09:00
softsimon
cafcb4f9a6
Merge pull request #4576 from mempool/knorrium/cypress_13_6_2
Update Cypress to v13.6.2
2024-01-13 09:08:45 +07:00
Felipe Knorr Kuhn
a06bf86b95
Update Cypress to v13.6.2 2024-01-12 13:06:11 -08:00
nymkappa
5c43c17261
Merge branch 'master' into lightning-dashboard-ownership 2024-01-12 18:45:45 +01:00
natsee
3b8de5057c
Check env flags before cross network address search 2024-01-12 18:04:49 +01:00
natsee
0ec40eafb4
Remove hard-coded timestamp for regexes 2024-01-12 17:21:07 +01:00
natsee
9a7e22806d
Merge branch 'master' into cross-network-address-search 2024-01-12 17:05:57 +01:00
softsimon
d546f2eba5
Merge pull request #4574 from mempool/dependabot/npm_and_yarn/frontend/follow-redirects-1.15.5
Bump follow-redirects from 1.15.3 to 1.15.5 in /frontend
2024-01-12 22:42:27 +07:00
softsimon
46fdb5b30d
Adding dashboard skeleton loaders 2024-01-12 18:08:57 +07:00
dependabot[bot]
a23088458b
Bump follow-redirects from 1.15.3 to 1.15.5 in /frontend
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.5.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.5)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 10:21:43 +00:00
softsimon
b86b38398e
Merge pull request #4558 from mempool/dependabot/npm_and_yarn/frontend/cypress-fail-on-console-error-5.1.0
Bump cypress-fail-on-console-error from 5.0.0 to 5.1.0 in /frontend
2024-01-12 17:20:43 +07:00
softsimon
600cbae739
Merge pull request #4557 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.7.0
Bump mysql2 from 3.6.0 to 3.7.0 in /backend
2024-01-12 17:19:52 +07:00
nymkappa
7f62a0f9b5
[footer] fix css RTL issues 2024-01-12 10:50:41 +01:00
softsimon
978e0bff24
Merge pull request #4534 from natsee/fix-search-result-duplicate-address
Fix duplicate address in search results
2024-01-12 15:43:53 +07:00
softsimon
5291828e6a
Merge branch 'master' into fix-search-result-duplicate-address 2024-01-12 15:39:38 +07:00
softsimon
ecb696661e
Merge pull request #4570 from mempool/mononaut/sigop-faqs
Add sigop related FAQ entries
2024-01-12 09:54:20 +07:00
softsimon
e9a67adf4f
Adding links to FAQ sections from TX page 2024-01-12 09:50:33 +07:00
nymkappa
5389d19850
[footer] fix css 2024-01-11 16:26:09 +01:00
Mononaut
439177a78f
Add sigop related FAQ entries 2024-01-10 22:07:01 +00:00
dependabot[bot]
367f70c3b3
Bump mysql2 from 3.6.0 to 3.7.0 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 14:40:20 +00:00
softsimon
6553de53b8
Merge pull request #4566 from mempool/mononaut/rust-clean
Clean rust-gbt directory before build
2024-01-10 21:39:34 +07:00
Mononaut
8336a00aea
Clean rust-gbt directory before build 2024-01-10 14:32:37 +00:00
softsimon
f694d5333a
Merge pull request #4561 from mempool/mononaut/fix-prices
Fix bad coinbase price url, switch to median prices
2024-01-10 11:21:11 +07:00
softsimon
aad288c0d9
Merge pull request #4554 from mempool/mononaut/unmineable-txs
Handle unmineable transactions in GBT implementations
2024-01-10 00:18:41 +07:00
Mononaut
30d58d9971
Restore GBT result size sanity check 2024-01-09 17:08:25 +00:00
Mononaut
89d37f0058
Fix unmineable tx handling 2024-01-09 16:26:05 +00:00
softsimon
7cd0c4f352
Merge pull request #4530 from natsee/update-docs-api
Add endpoints to docs api
2024-01-09 23:07:02 +07:00
softsimon
7de3d789b3
Merge branch 'master' into update-docs-api 2024-01-09 22:58:16 +07:00
softsimon
f9dfb3b2b1
Merge pull request #4556 from mempool/mononaut/smooth-mempool-blocks
Smooth out irregular mempool block updates
2024-01-09 11:16:25 +07:00
softsimon
17427b7970
Merge pull request #4560 from mempool/mononaut/fee-sanity
Additional fee recommendation sanity checks
2024-01-09 10:41:52 +07:00
softsimon
6da4f34656
Merge pull request #4542 from mempool/mononaut/unsub-track-block
unsubscribe from mempool block tracking
2024-01-09 08:46:15 +07:00
Mononaut
0230f95001
Fix bad coinbase price url, switch to median prices 2024-01-08 22:39:51 +00:00
Mononaut
d5c5ae0e09
Additional fee recommendation sanity checks 2024-01-08 16:33:19 +00:00
Mononaut
fc8eca4c26
Handle stale smoothed mempool block updates 2024-01-08 14:42:00 +00:00
dependabot[bot]
9485dfe2ce
Bump cypress-fail-on-console-error from 5.0.0 to 5.1.0 in /frontend
Bumps [cypress-fail-on-console-error](https://github.com/nils-hoyer/cypress-fail-on-console-error) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/nils-hoyer/cypress-fail-on-console-error/releases)
- [Commits](https://github.com/nils-hoyer/cypress-fail-on-console-error/compare/5.0.0...5.1.0)

---
updated-dependencies:
- dependency-name: cypress-fail-on-console-error
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 02:48:43 +00:00
Mononaut
5f66a95402
Smooth out irregular mempool block updates 2024-01-07 18:02:11 +00:00
Mononaut
d665d2a12c
Handle unmineable transactions in GBT implementations 2024-01-06 04:20:19 +00:00
James Blacklock
5f1180118a
Merge branch 'master' into docker-bugfix 2024-01-04 12:10:31 -05:00
softsimon
f7e7072dbc
Merge pull request #4548 from natsee/liquid-missing-featured-route
[Liquid] Fix missing assets/featured route
2024-01-04 17:14:12 +07:00
orangesurf
a0d0650e2a
update trademarks 2024-01-03 19:09:59 +01:00
nymkappa
64f6775c68
[database] increase default pool size to 100 connections 2024-01-03 15:12:11 +01:00
natsee
f73350f7d6
[Liquid] Fix missing assets/featured route 2024-01-03 14:21:11 +01:00
natsee
bfdab0ac48
Merge branch 'master' into cross-network-address-search 2024-01-03 13:37:16 +01:00
natsee
b9776263dc
Exclude date and timestamp results for non-bitcoin networks 2024-01-03 13:36:33 +01:00
softsimon
56dce6b28c
Merge pull request #4527 from natsee/fix-faq-nav-bar-overflow
Fix faq nav bar overflow
2024-01-03 11:28:53 +07:00
Mononaut
c1785993a8
Fix websocket subscription logging 2024-01-02 16:26:57 +00:00
softsimon
0c956be136
Merge pull request #4545 from mempool/simon/block-view-accel-flag-check-fix
Acceleration flag check on block/tx view
2024-01-02 23:18:55 +07:00
softsimon
a498f9205b
Fix error on transaction page when acceleration is disabled 2024-01-02 11:25:50 +07:00
softsimon
09041c50ef
Acceleration flag check on block view 2024-01-02 10:35:52 +07:00
natsee
dd31d5a665
Fix E2E error: change regex address minimum length 2024-01-01 14:52:02 +01:00
natsee
3e1b85e32c
Add search addresses from cross networks feature 2024-01-01 13:54:37 +01:00
Mononaut
51bfffbf0e
unsubscribe from mempool block tracking 2024-01-01 12:01:53 +00:00
wiz
9b6e60bfba
ops: Add production/redis.conf 2024-01-01 08:03:34 +09:00
wiz
8492007a48
Merge pull request #4541 from mempool/mononaut/optimize-new-block-ws
Optimize websocket updates on new block
2024-01-01 07:48:35 +09:00
natsee
bd34d71d8b
Update regexes in regex.utils.ts 2023-12-31 23:46:06 +01:00
Mononaut
23ececca95
Optimize websocket updates on new block 2023-12-31 18:07:39 +00:00
wiz
fb61fddcc4
Merge pull request #4512 from mempool/simon/acceleration-sounds
Acceleration sounds
2023-12-31 04:22:33 +09:00
wiz
24ec12e7a1
Merge pull request #4517 from mempool/orangesurf/goggles
Mempool Goggles™
2023-12-31 04:22:17 +09:00
wiz
681f9a1c69
ops: Enable redis for production mainnet 2023-12-31 03:39:23 +09:00
wiz
fab82551cf
Remove old GPLv3 license file, rename AGPLv3 license to COPYING 2023-12-31 03:22:14 +09:00
natsee
6cea6ceb7e
Merge branch 'upstream/master' into search-bar-network-regex 2023-12-30 19:18:49 +01:00
softsimon
118eef6f0c
Merge pull request #4537 from mempool/mononaut/acc-preview-highlight
Highlight accelerations in block previews & non-audit mode
2023-12-30 10:39:57 +07:00
softsimon
626f95d802
Merge pull request #4521 from mempool/mononaut/responsive-acceleration-dash
Fix widget responsiveness on acceleration dashboard
2023-12-29 23:29:56 +07:00
Mononaut
ab3ce5ece0
Highlight accelerations in blocks in previews & non-audit mode 2023-12-29 14:13:13 +00:00
natsee
d2a5adbd9d
Fix duplicate address field in search results 2023-12-28 15:34:36 +01:00
natsee
93b074edf0
Add endpoints to docs api 2023-12-27 18:50:41 +01:00
softsimon
577b1a9f66
Merge pull request #4525 from mempool/mononaut/nogl-fee-chart
Fix missing mempool fee chart when webgl disabled
2023-12-27 13:15:35 +07:00
softsimon
d9c28643f4
Merge pull request #4091 from dni/dni-patch-1
Update liquid-master-page.component.html
2023-12-27 13:11:34 +07:00
James Blacklock
3f305207f9
Merge branch 'master' into docker-bugfix 2023-12-25 03:27:26 -05:00
softsimon
2fb3e4e4e5
Merge pull request #4516 from natsee/toggle-expand-rbf-history
Expand toggle for RBF history view
2023-12-23 15:19:19 +07:00
natsee
40f2d553e2
Fix faq nav bar overflow 2023-12-22 10:39:40 +01:00
James Blacklock
8e9a187a15
Merge branch 'master' into docker-bugfix 2023-12-21 13:02:25 -05:00
Mononaut
0370cc896c
Fix missing mempool fee chart when webgl disabled 2023-12-21 13:06:52 +00:00
softsimon
d6291ecd52
Merge pull request #4519 from Start9Labs/update/start9
update startOS info
2023-12-21 15:22:49 +07:00
softsimon
9d82926d6f
Merge pull request #4518 from pedromvpg/master
Dot the i's on liquid logo
2023-12-21 15:20:46 +07:00
James Blacklock
cd964d37e8
fix bug in backend Docker start.sh script 2023-12-20 17:03:06 -05:00
James Blacklock
ec4c418c22
sign contributor agreement 2023-12-20 17:02:12 -05:00
wiz
07f9410d45
ops: Fix elements unix socket path 2023-12-21 05:05:59 +09:00
Mononaut
c3675d5b1c
Fix widget responsiveness on acceleration dashboard 2023-12-20 18:30:19 +00:00
natsee
f471541907
Fix fade out on RBF history 2023-12-20 16:30:15 +01:00
Matt Hill
4f3852bbba
One more 2023-12-19 21:49:52 -07:00
Matt Hill
fc36e04dc0
update start9 os and icon 2023-12-19 08:20:21 -07:00
natsee
7f488f5b01
Fade out the bottom of collapsed rbf history 2023-12-19 14:40:37 +01:00
softsimon
1d74a99d2f
Update frontend/src/app/components/transaction/transaction.component.ts
Co-authored-by: mononaut <83316221+mononaut@users.noreply.github.com>
2023-12-19 13:17:26 +07:00
Pedro
bd07773b8d Dot the i's on liquid logo 2023-12-18 12:05:05 +00:00
orangesurf
59f8a7199c
Fix space 2023-12-18 09:35:14 +00:00
orangesurf
03b78015ba
Remove redundant semicolons 2023-12-18 09:22:28 +00:00
orangesurf
f72683dc19
Add Mempool Goggles TM 2023-12-18 09:18:55 +00:00
natsee
75b3bc6249
Expand toggle for RBF history view 2023-12-17 20:26:34 +01:00
softsimon
f915ff3f91
Merge pull request #4487 from mempool/nymkappa/hashrate-indexing-message
[mining] show proper message when we have less than 2 weeks worth of mining pool hashrate data
2023-12-17 21:33:18 +07:00
softsimon
01131360c2
Merge branch 'master' into nymkappa/hashrate-indexing-message 2023-12-17 21:31:59 +07:00
softsimon
30da419fb4
Merge pull request #4515 from mempool/mononaut/faster-goggles
Faster goggles
2023-12-17 18:44:39 +07:00
softsimon
e8c48f6f23
Merge branch 'master' into mononaut/faster-goggles 2023-12-17 18:08:41 +07:00
softsimon
ca7167870a
Merge pull request #4510 from mempool/mononaut/smooth-goggle-transition
Smoother goggles color change transition
2023-12-17 18:08:28 +07:00
softsimon
7bdb2f41a5
Merge branch 'master' into mononaut/smooth-goggle-transition 2023-12-17 18:06:54 +07:00
softsimon
3e505d37c9
Merge pull request #4506 from mempool/mononaut/goggles
Mempool Goggles icon, tooltip, FAQ
2023-12-17 18:06:26 +07:00
Mononaut
78857102f8
Move goggles icon inside generic svg-images component 2023-12-17 10:57:00 +00:00
Mononaut
8dbf879c37
Add Goggles FAQ entry 2023-12-17 10:56:42 +00:00
Mononaut
bc89fd5b7c
Goggles icon, beta tag and info tooltip 2023-12-17 10:56:42 +00:00
Mononaut
a8fd2ac9dc
Preserve tx replacement flag 2023-12-17 10:45:26 +00:00
Mononaut
c2f52ac1f3
Avoid repeated tx classification work 2023-12-17 09:57:15 +00:00
softsimon
472a86ffd4
Merge pull request #4391 from 0xBEEFCAF3/patch-1
fix: incorrect `HTTP_PORT` docker compose field in docker README.md
2023-12-17 16:55:13 +07:00
softsimon
21ad37dbec
Merge pull request #4143 from mempool/hunicus/readme-enterprise
Add links to enterprise page in readmes
2023-12-17 11:37:36 +07:00
softsimon
10a50ac49f
Merge pull request #3794 from mempool/mononaut/liquid-default-block-weight
Restore liquid max block weight to defaults
2023-12-17 11:36:36 +07:00
softsimon
b49e01bf64
Merge pull request #4502 from natsee/bugfix-search-block-number
Search result: do not offer "Go to" if block height > chain tip
2023-12-17 10:50:10 +07:00
softsimon
cc54538937
Merge pull request #4508 from natsee/show-clipboard-blockhash
Show blockhash copy button in block component
2023-12-17 10:22:45 +07:00
softsimon
6014469513
Acceleration sounds 2023-12-15 23:09:24 +07:00
nymkappa
9e88f5ecf8
[typo] platinium -> platinum 2023-12-15 16:58:10 +01:00
nymkappa
041f4f6695
Merge branch 'nymkappa/remove-services-version' into nymkappa/mega-branch 2023-12-15 16:16:12 +01:00
nymkappa
70ca75ac12
Merge branch 'nymkappa/subscription-tag' into nymkappa/mega-branch 2023-12-15 16:16:06 +01:00
Mononaut
b3a68a0db2
Smoother goggles color change transition 2023-12-15 15:05:43 +00:00
wiz
99b57bbec0
Merge pull request #4497 from mempool/simon/acceleration-preview-loader
Acceleration preview loader
2023-12-15 23:39:58 +09:00
natsee
eae044cf66
Show blockhash copy button in block component 2023-12-15 15:38:02 +01:00
nymkappa
8238edb721
[menu] show og rank and active subscription in menu 2023-12-15 14:48:17 +01:00
natsee
0ac0a56ae5
Fix overflow on mining pool ranking table 2023-12-15 12:22:08 +01:00
orangesurf
445d600633
Changes following feedback 2023-12-15 10:37:16 +00:00
wiz
e4751a8274
Merge pull request #4503 from mempool/orangesurf/trademark-updates-2 2023-12-15 19:16:46 +09:00
orangesurf
100936e551
Changes following feedback 2023-12-15 10:04:04 +00:00
softsimon
acff9782cb
Merge pull request #4501 from takuabonn/bugfix/4475
update to use cachedRequest
2023-12-15 14:15:07 +07:00
softsimon
b9c60b0820
Merge pull request #4500 from mempool/mononaut/block-viz-filters
Projected block filters
2023-12-15 09:04:19 +07:00
Mononaut
2e531413fa
Disable filter UI on mined blocks 2023-12-14 18:09:04 +00:00
natsee
3eb6241c98
Delete variables and use observables in top nodes components 2023-12-14 16:09:54 +01:00
Mononaut
16b9ca6c40
Fix CI unit test circular dependency 2023-12-14 13:30:19 +00:00
natsee
b0c02b16ff
Search result: do not offer Go to block 2023-12-14 12:49:11 +01:00
Mononaut
512589dc79
Add fake pubkey filter 2023-12-14 11:29:44 +00:00
natsee
464cffb5c1
Add LN statistics interface 2023-12-14 12:22:00 +01:00
Mononaut
ce195c9133
Fix ECDSA DER signature detection 2023-12-13 16:15:55 +00:00
takuabonn
1fb3de9dc3
update contributors 2023-12-14 01:10:28 +09:00
takuabonn
7cb58ed988
update to use cachedRequest 2023-12-14 00:47:11 +09:00
natsee
97053ab5cf
Update contributor agreement file 2023-12-13 15:13:01 +01:00
ncois
39c5792e6f
Include % ownership in statistics table on LN dashboard and on ranking pages 2023-12-13 15:08:34 +01:00
Mononaut
c019355c9f
Adapt block filter UI for small screens 2023-12-13 11:29:10 +00:00
Mononaut
5777561744
Tidy up block filter code, disable multisig flag 2023-12-13 11:04:45 +00:00
Mononaut
24dbe5d4ee
Add block viz filter UI 2023-12-13 11:00:49 +00:00
Mononaut
e12f43e741
Add sighash filter flags 2023-12-13 10:59:56 +00:00
Mononaut
173bc127cb
Block viz filters proof of concept 2023-12-13 10:59:56 +00:00
wiz
14e440da6b
Merge pull request #4499 from mempool/wiz/license-change-agpl-only
Change dual-licensed GPLv3/AGPLv3 to AGPLv3 only
2023-12-13 19:36:52 +09:00
wiz
93c61f5ed3
Change dual-licensed GPLv3/AGPLv3 to AGPLv3 only 2023-12-13 17:46:51 +09:00
wiz
7a77e86ab2
Merge pull request #4485 from mempool/orangesurf/trademark-updates
Add latest registered trademark information
2023-12-13 17:42:01 +09:00
nymkappa
2013dc6d8b
[refactoring] move servics related api calls to its own service 2023-12-12 17:24:58 +01:00
softsimon
d3f7190b7f
Acceleration preview loader 2023-12-12 20:49:08 +07:00
nymkappa
590188fe6d
[footer] remove services version number 2023-12-12 09:17:46 +01:00
nymkappa
38479db5ca
Merge branch 'master' into nymkappa/twitter-handle 2023-12-12 09:10:38 +01:00
nymkappa
ed215aa4cd
[menu] only add space after @ username if username already contains @ 2023-12-12 09:07:27 +01:00
wiz
df55497747
Merge branch 'master' into orangesurf/trademark-updates 2023-12-12 15:50:56 +09:00
softsimon
6d5a723ff4
Merge pull request #4491 from mempool/dependabot/github_actions/dtolnay/rust-toolchain-be73d7920c329f220ce78e0234b8f96b7ae60248
Bump dtolnay/rust-toolchain from f361669954a8ecfc00a3443f35f9ac8e610ffc06 to be73d7920c329f220ce78e0234b8f96b7ae60248
2023-12-12 09:11:58 +07:00
orangesurf
9f6f210c38
Merge branch 'master' into orangesurf/trademark-updates 2023-12-11 16:43:45 +00:00
orangesurf
cb1d9753c8
Changes following feedback 2023-12-11 15:26:17 +00:00
dependabot[bot]
05259e9f81
Bump dtolnay/rust-toolchain
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from f361669954a8ecfc00a3443f35f9ac8e610ffc06 to be73d7920c329f220ce78e0234b8f96b7ae60248.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](f361669954...be73d7920c)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 02:42:17 +00:00
softsimon
e5df1571da
Acceleration tab 2023-12-09 22:33:02 +07:00
Armin Sabouri
88d2a3a50d
sign CLA for 0xBEEFCAF3 2023-12-08 17:25:02 -05:00
Armin Sabouri
a4810b8be0
fix: incorrect HTTP_PORT docker compose field in docker README.md
The override is [BACKEND_HTTP_PORT defined here](59c513f2a5/docker/backend/start.sh (L7))
2023-12-08 17:25:02 -05:00
nymkappa
5ac432556b
[mining] show proper message when we have less than 2 weeks worth of mining pool hashrate data 2023-12-08 17:00:36 +01:00
softsimon
f03acce324
Merge pull request #4483 from TechMiX/hotfix/rtlIssues
fix: RTL issues related to sidenav and global footer
2023-12-08 21:21:57 +07:00
wiz
aff8f2c41f
Merge branch 'master' into hotfix/rtlIssues 2023-12-08 23:16:59 +09:00
wiz
88f617611f
Merge pull request #4220 from mempool/mononaut/accelerator-dashboard
Accelerator dashboard
2023-12-08 22:26:54 +09:00
Mononaut
2cddc5fdd8
accelerations: not yet 2023-12-08 13:23:51 +00:00
orangesurf
d38381af8b
Changes following feedback 2023-12-08 13:08:43 +00:00
Mononaut
aff44d90d5
Rerefactor acceleration dashboard 2023-12-08 13:08:16 +00:00
Mononaut
42f6f0c122
Redesign accelerator dashboard 2023-12-08 13:08:16 +00:00
Mononaut
8599876b26
Refactor accelerator dashboard 2023-12-08 13:08:16 +00:00
Mononaut
e34ee3a34d
Fix rebase issues 2023-12-08 13:08:15 +00:00
Mononaut
47de84f03a
Accelerator dashboard widget titles: latest -> recent 2023-12-08 13:08:15 +00:00
Mononaut
f071d5e76a
Accelerator dashboard fix success criteria 2023-12-08 13:08:15 +00:00
Mononaut
5a55ba2d28
Accelerator dashboard pending widget, fee delta fiat values 2023-12-08 13:08:15 +00:00
Mononaut
2efd474357
Fix accelerator dashboard widget page link css 2023-12-08 13:08:15 +00:00
Mononaut
472a76560f
Tidy acceleration dashboard, add missing fields 2023-12-08 13:08:14 +00:00
Mononaut
f26b630aab
Fix acceleration dashboard merge issues 2023-12-08 13:08:14 +00:00
Mononaut
b0e73466fa
Show mining blockchain blocks on accelerator dashboard 2023-12-08 13:08:14 +00:00
Mononaut
7019e6ec03
Add acceleration fees graph 2023-12-08 13:08:14 +00:00
Mononaut
f409c67125
update acceleration dashboard to match actual API format 2023-12-08 13:08:13 +00:00
Mononaut
6cf40489e5
tidy up acceleration dashboard 2023-12-08 13:08:13 +00:00
Mononaut
14ad0c8ecb
Add more acceleration stats 2023-12-08 13:08:13 +00:00
Mononaut
f86645b50c
Add latest block accelerations list 2023-12-08 13:08:13 +00:00
Mononaut
f23bcec10d
Add acceleration fees graph 2023-12-08 13:08:13 +00:00
Mononaut
6f97a2ef74
Add accelerator dashboard 2023-12-08 13:08:13 +00:00
Mononaut
42a3a380d5
widgetify block fee rates chart 2023-12-08 13:08:12 +00:00
TechMiX
bbcc683a3c fix: use empty sidenav when service is disabled 2023-12-08 14:06:34 +01:00
TechMiX
9406103ed1 fix: adjust the blockchain container with menu in rtl mode 2023-12-07 22:49:51 +01:00
TechMiX
dc06387347 fix: rtl issues related to sidenav and global footer 2023-12-07 20:52:11 +01:00
orangesurf
5a2da751fa
Remove TM & R from logo names 2023-12-07 09:55:12 +00:00
orangesurf
83db6f6428
Update License, about page and trademark policy with new registered trademarks 2023-12-07 09:28:36 +00:00
wiz
4169e1053f
Merge pull request #4482 from mempool/mononaut/fix-negative-accel-rate
Fix negative accelerated fee rate, simplify fee rate table
2023-12-07 01:50:12 +09:00
wiz
a46e779d0c
Merge branch 'master' into mononaut/fix-negative-accel-rate 2023-12-06 23:56:12 +09:00
Mononaut
51102004bb
Fix negative accelerated fee rate, simplify fee rate table 2023-12-06 14:50:26 +00:00
wiz
08e9142d57
Merge pull request #4481 from mempool/mononaut/improve-acceleration-tracking
Improve acceleration tracking
2023-12-06 22:42:00 +09:00
Mononaut
b7c4cd43fc
Better error handling for accelerations update request 2023-12-06 12:09:46 +00:00
Mononaut
08a35b85a8
Fix current accelerations update race condition 2023-12-06 12:09:28 +00:00
wiz
51a28b2e01
Merge pull request #4480 from mempool/mononaut/mined-acceleration-info
Show accelerated fee rates for mined transactions
2023-12-05 23:00:15 +09:00
Mononaut
966adf5963
Show accelerated fee rates on mined tx pages 2023-12-05 13:48:38 +00:00
wiz
ae7b17c4fd
Merge pull request #4478 from mempool/mononaut/accelerated-badge
Accelerated tx audit badge
2023-12-05 17:36:52 +09:00
Mononaut
5b4bc9fe19
Accelerated tx audit badge 2023-12-05 08:33:57 +00:00
wiz
89eb7ec90b
ops: Enable accelerator in production config 2023-12-05 05:29:18 +09:00
wiz
a646c5f22f
Merge pull request #4390 from ncois/tooltip-overflow-bug
Fix tooltip overflow by increasing width
2023-12-04 23:44:44 +09:00
wiz
c345f2164b
Merge pull request #4462 from ncois/search-block-datetime
Search a block by date and timestamp
2023-12-04 23:44:19 +09:00
wiz
9791ee018d
Merge pull request #4466 from ncois/pool-hashrate-format
Pool chart hashrate format in power of ten
2023-12-04 23:44:06 +09:00
wiz
7c83b85e3e
Merge pull request #4476 from mempool/nymkappa/fix-waitlist-message
[accel preview] only show waitlist message if logged in
2023-12-04 23:43:50 +09:00
nymkappa
63942af720
wait list -> waitlist @softsimon 2023-12-04 23:30:22 +09:00
nymkappa
4da5910e0b
[accel preview] only show waitlist message if logged in 2023-12-04 23:23:51 +09:00
wiz
025788e78c
Merge pull request #4471 from mempool/nymkappa/fix-one-bug-add-two-more
Various fixes and improvements
2023-12-04 22:51:41 +09:00
nymkappa
88a9524064
Merge branch 'master' into pool-hashrate-format 2023-12-04 21:34:43 +09:00
ncois
c216e849e6
Add more precision to hashrate graphs 2023-12-04 09:56:56 +01:00
nymkappa
c86768edc9
[about] fix merge conflict #4425 2023-12-04 16:59:29 +09:00
nymkappa
4283d30ce0
Merge branch 'master' into search-block-datetime 2023-12-04 13:09:58 +09:00
nymkappa
e2eeaebfc7
Merge branch 'master' into nymkappa/fix-one-bug-add-two-more 2023-12-04 10:47:49 +09:00
softsimon
90d87aaaca
Merge pull request #4472 from mempool/simon/upgrading-fontawesome
Upgrading fontawesome
2023-12-03 18:17:33 +09:00
softsimon
b2e9275ad9
Upgrading fontawesome 2023-12-03 17:34:31 +09:00
nymkappa
181e816c1a
Merge branch 'nymkappa/about-page-empty-anchor' into nymkappa/fix-one-bug-add-two-more 2023-12-03 15:17:04 +09:00
softsimon
758ca4e93a
Merge pull request #4233 from mempool/hunicus/enterprise-abs
Make enterprise links not relative
2023-12-03 14:09:25 +09:00
softsimon
a33f915c7a
Merge pull request #4438 from mempool/mononaut/refactor-difficulty-reindexing
Refactor difficulty reindexing to process blocks in height order
2023-12-03 13:15:01 +09:00
softsimon
75c6d006ff
Merge pull request #4433 from mempool/mononaut/dismiss-acceleration-preview
Make the acceleration preview dismissable
2023-12-02 18:19:46 +09:00
softsimon
1fe983a299
Merge pull request #4468 from mempool/mononaut/fix-liquid-fee-rounding
Fix liquid recommended fee rounding
2023-12-02 15:05:13 +09:00
Mononaut
cd8e3e2604
Fix liquid fee rounding 2023-12-02 03:20:09 +00:00
wiz
dfc4309d9e
Merge pull request #4465 from mempool/mononaut/fix-liquid-minfee
Fix Liquid minfee defaults
2023-12-01 21:52:25 +09:00
ncois
0a70273456
Pool chart: show power of ten of hashrate on desktop 2023-12-01 12:57:30 +01:00
softsimon
62c9a88235
Merge pull request #4448 from mempool/nymkappa/accel-preview-logged-in
[accelerator] show wait list message in preview when logged in with no access
2023-12-01 18:37:05 +09:00
Mononaut
851e07b50b
Fix liquid minfee defaults 2023-12-01 18:12:59 +09:00
wiz
e1bbec074b
Merge pull request #4457 from mempool/mononaut/matomo-path
matomo path
2023-12-01 17:54:06 +09:00
Mononaut
9fcafeeeb0
Switch to toggle-style acceleration dismiss button 2023-12-01 14:55:19 +09:00
Mononaut
e986cfd30b
Make the acceleration preview dismissable 2023-12-01 14:21:05 +09:00
ncois
2584a1f2b0
Add date and timestamp search option 2023-11-30 20:05:25 +01:00
softsimon
1c92394563
Merge pull request #4449 from mempool/nymkappa/translation-typo
Fix some SEO strings
2023-11-30 18:33:05 +09:00
softsimon
36398ca57a
Updating messages.xlf 2023-11-30 18:29:06 +09:00
softsimon
6b978f9262
Merge pull request #3706 from mempool/mononaut/reconnect-dead-websocket
reconnect websocket after closed by server
2023-11-30 18:26:18 +09:00
softsimon
12cf130c00
Merge branch 'master' into mononaut/reconnect-dead-websocket 2023-11-30 17:57:19 +09:00
softsimon
ba933a81c3
Merge pull request #3704 from mempool/mononaut/handle-websocket-errors
Disconnect websocket clients on error
2023-11-30 17:56:58 +09:00
Mononaut
7de7081d67
matomo path 2023-11-30 17:35:26 +09:00
nymkappa
6b933c202f
Update nodes-rankings-dashboard.component.ts 2023-11-30 17:22:22 +09:00
softsimon
f1525b7df5
Merge pull request #4445 from mempool/dependabot/npm_and_yarn/frontend/fortawesome/fontawesome-svg-core-6.5.0
Bump @fortawesome/fontawesome-svg-core from 6.4.0 to 6.5.0 in /frontend
2023-11-30 17:05:19 +09:00
wiz
62c4af1a0c
Merge pull request #4455 from mempool/mononaut/fix-matomo-fix
Fix matomo again
2023-11-30 15:49:00 +09:00
Mononaut
4ac98bc483
Fix matomo again 2023-11-30 15:46:58 +09:00
softsimon
ed07daebca
Merge branch 'master' into mononaut/handle-websocket-errors 2023-11-30 15:18:16 +09:00
wiz
f8bbf7783c
Merge pull request #4443 from mempool/nymkappa/debug-add-context
[log] create more general error
2023-11-30 14:53:51 +09:00
softsimon
fac2fab16a
Merge pull request #4437 from mempool/simon/remove-audit-beta
Remove block audit beta-tag
2023-11-30 14:50:57 +09:00
wiz
76de4e34d8
Merge pull request #4425 from mempool/mononaut/fix-matomo
fix matomo bug
2023-11-30 14:40:26 +09:00
softsimon
6109f25aa9
Merge pull request #4452 from ncois/tx-ui-overflow
Fix overflow on transaction page
2023-11-30 14:36:15 +09:00
softsimon
86303175e9
Merge pull request #4451 from ncois/format-difficulty-chart
Difficulty adjustment chart: format the hashrate and difficulty
2023-11-30 14:27:39 +09:00
nymkappa
a670131f40
Merge branch 'master' into tooltip-overflow-bug 2023-11-30 11:54:16 +09:00
ncois
c5ce3167f3
Fix overflow on transaction page 2023-11-29 15:27:45 +01:00
ncois
9913254a5c
Difficulty value: remove rounding 2023-11-29 11:16:48 +01:00
ncois
fbb4ba39c2
Mining chart: show hashrate power of ten on desktop 2023-11-29 11:08:38 +01:00
nymkappa
22bf0fe928
Re-apply fix from https://github.com/mempool/mempool/pull/4419/files#diff-9daf43654b4e0bb2c925b6396c6e3a7e1b117bd854fe9c46290f025bfe0a762eR285 2023-11-29 18:03:23 +09:00
nymkappa
3b30765070
Revert unnecessary changes 2023-11-29 18:00:07 +09:00
nymkappa
63fde7d0b6
Merge branch 'master' into nymkappa/about-page-sponsors-component 2023-11-29 17:57:54 +09:00
softsimon
cf338970bf
Merge pull request #4450 from mempool/translations_frontend-src-locale-messages-xlf--master_fr
Updates for file frontend/src/locale/messages.xlf in fr
2023-11-29 16:35:27 +09:00
Mononaut
08e046ea2a
fix matomo bug 2023-11-29 16:17:07 +09:00
transifex-integration[bot]
5697710c23
Translate frontend/src/locale/messages.xlf in fr
100% reviewed source file: 'frontend/src/locale/messages.xlf'
on 'fr'.
2023-11-29 07:00:03 +00:00
nymkappa
b9e050e24b
Fix small typo in lightning node ranking dashboard seo 2023-11-29 15:59:15 +09:00
nymkappa
ff819673e5
Fix "and" chain in lightning dashboard seo 2023-11-29 15:56:35 +09:00
nymkappa
2e2801a4ab
Add missing txid in seo tx preview 2023-11-29 15:51:35 +09:00
nymkappa
f52b17ca7a
Add missing space in seo address preview 2023-11-29 15:28:14 +09:00
softsimon
3d25235705
Merge pull request #4439 from mempool/mononaut/fix-ln-search-suggestions
Fix spurious ln channel typeahead matches
2023-11-29 15:24:34 +09:00
nymkappa
2cbc6783a4
[accelerator] show wait list message in preview when logged in with no access 2023-11-29 15:02:48 +09:00
dependabot[bot]
406bf5d3b7
Bump @fortawesome/fontawesome-svg-core from 6.4.0 to 6.5.0 in /frontend
Bumps [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.4.0...6.5.0)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-svg-core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-29 02:48:50 +00:00
nymkappa
f5bf883de9
[about] fix auto scroll to chad/whale 2023-11-28 18:05:18 +09:00
nymkappa
c06cade1ca
[log] create more general error 2023-11-28 17:13:52 +09:00
softsimon
c23a872887
Updating german i18n 2023-11-28 14:42:25 +09:00
softsimon
cd5a51098b
Merge pull request #4419 from mempool/nymkappa/fix-about-page-ctas
[about page] fix wrapping perk
2023-11-26 18:24:58 +09:00
Mononaut
0b449347c1
Fix spurious ln channel typeahead matches 2023-11-26 09:22:44 +00:00
softsimon
d3f8876818
Merge pull request #4424 from mempool/nymkappa/channel-map-larger
[lightning] enlarge channel map
2023-11-26 18:09:31 +09:00
softsimon
d2da81e039
Remove block audit beta-tag 2023-11-26 17:21:13 +09:00
Mononaut
66d88abdc5
Refactor difficulty reindexing to process blocks in height order 2023-11-26 08:17:30 +00:00
softsimon
be2b9a9c2e
Merge pull request #4436 from mempool/simon/pull-from-transifex-11-25
Pull from transifex 11/25
2023-11-26 17:01:10 +09:00
softsimon
63ba273dbe
Pull from transifex 11/25 2023-11-26 17:00:46 +09:00
softsimon
8ae4c75c1a
Fixing one last i18n string 2023-11-26 16:59:45 +09:00
softsimon
1cece1037a
Disclaimer i18n fix 2023-11-26 16:29:20 +09:00
softsimon
478873302c
Merging another duplicate i18n string 2023-11-26 16:20:57 +09:00
softsimon
3cff01b21e
Merging another duplicate i18n string 2023-11-26 16:20:46 +09:00
softsimon
f67848b043
Merging another duplicate i18n string 2023-11-26 16:10:18 +09:00
softsimon
f0c88ff6cc
Fix duplicate recent block i18n 2023-11-26 16:03:53 +09:00
softsimon
da5adc3e4e
Merge pull request #4435 from mempool/simon/more-i18n-fixes3
More i18n fixes (3)
2023-11-26 15:49:02 +09:00
softsimon
bebd2ea028
More i18n fixes (3) 2023-11-26 15:48:44 +09:00
softsimon
e7e25e1632
Merge pull request #4432 from mempool/simon/more-i18n-fixes-etc
RBF i18n fixes
2023-11-25 20:46:19 +09:00
softsimon
c4130fd5b9
RBF i18n fixes 2023-11-25 20:45:59 +09:00
softsimon
dcad18b297
Merge pull request #4431 from mempool/simon/seo-description-fixes
Fixing titles and merging more i18n duplicates
2023-11-25 20:31:56 +09:00
softsimon
d380aad98c
Fixing titles and merging more i18n duplicates 2023-11-25 20:31:29 +09:00
Mononaut
85c9c79699
reconnect websocket after closed by server 2023-11-25 11:25:07 +00:00
softsimon
107e0be59f
Merge pull request #4428 from mempool/simon/i18n-fixes-231125
Updating and correcting i18n strings
2023-11-25 18:12:17 +09:00
softsimon
e654170d0b
Updating and correcting i18n strings 2023-11-25 18:05:08 +09:00
Mononaut
652100f774
More verbose websocket error logs 2023-11-25 09:02:27 +00:00
Mononaut
0f04f751e1
Disconnect websocket clients on error 2023-11-25 08:27:17 +00:00
wiz
d3055dab54
Merge pull request #4157 from mempool/hunicus/bimi-svg
Add bimi svg
2023-11-25 16:29:29 +09:00
ncois
643402c046
Merge branch 'mempool:master' into tooltip-overflow-bug 2023-11-24 13:28:42 +01:00
nymkappa
e95d5a7982
[lightning] enlarge channel map 2023-11-24 18:14:16 +09:00
nymkappa
3103ef15e5
[about page] move CTA sponsors box into a sub component 2023-11-24 11:13:12 +09:00
wiz
5d5e9e8219
Legal: update Privacy Policy 20231123 2023-11-23 22:23:06 +09:00
wiz
99fd4500e4
Fix broken sponsor links on About page 2023-11-23 21:50:27 +09:00
nymkappa
69081ed647
[about page] fix wrapping perk 2023-11-23 21:07:21 +09:00
softsimon
c8bcd4f04f
Merge pull request #4415 from mempool/nymkappa/fix-css-testnet
[ui] only load empty sidebar in foss mainnet
2023-11-23 18:56:43 +09:00
nymkappa
7f4fd83ad2
[ui] fix testnets padding 2023-11-23 18:40:25 +09:00
softsimon
70722dfc9c
Merge pull request #4414 from mempool/nymkappa/fix-waitlist-message-preview
[accelerator] fix preview UX on mobile when there is an error/warning
2023-11-23 17:42:19 +09:00
softsimon
407b4c53a6
Merge pull request #4403 from mempool/mononaut/empty-mempool-block-health
Fix health score when mempool was empty
2023-11-23 17:25:06 +09:00
nymkappa
c11551de7b
[accelerator] fix preview UX on mobile when there is an error/warning 2023-11-23 17:00:57 +09:00
softsimon
2d5964b81e
Merge pull request #4413 from mempool/nymkappa/polish-accel-preview
[accelerator] small align tweak
2023-11-23 15:51:07 +09:00
nymkappa
98e3c7b9cf
[accelerator] small align tweak 2023-11-23 15:47:28 +09:00
softsimon
2de57a8074
Merge pull request #4412 from mempool/nymkappa/polish-accel-preview
[accelerator] fix preview text wrap not working on safari/firefox + polish accelerator preview
2023-11-23 15:39:24 +09:00
nymkappa
8badacf123
[accelerator] fix preview text wrap not working on safari/firefox
[accelerator] polish accelerator preview
2023-11-23 14:54:50 +09:00
softsimon
40b387a1e0
Merge pull request #4411 from mempool/nymkappa/fix-menu-css
[menu] force background color when menu is open
2023-11-23 13:31:11 +09:00
nymkappa
e5d2788736
[menu] force background color when menu is open 2023-11-23 10:45:16 +09:00
ncois
f57436f511
Merge branch 'master' into tooltip-overflow-bug 2023-11-22 12:14:03 +01:00
Mononaut
75cc844676
actually fix empty mempool health score 2023-11-22 19:53:22 +09:00
wiz
5d05dd7089
Merge pull request #4410 from mempool/simon/accelerate-button-height
Accelerate button height align fix
2023-11-22 19:51:49 +09:00
softsimon
35e108aa1c
Accelerate button height fix 2023-11-22 19:37:44 +09:00
softsimon
3f06b38767
Merge pull request #4408 from mempool/mononaut/restore-calculator
Restore the calculator
2023-11-22 18:19:39 +09:00
Mononaut
9844c3d275
Restore the calculator 2023-11-22 18:13:41 +09:00
wiz
04eeb19bb9
Fix string in community sponsor CTA button box 2023-11-22 17:56:56 +09:00
wiz
671540af78
Merge pull request #4407 from mempool/mononaut/8chain
Standalone multi-block view page
2023-11-22 17:54:38 +09:00
Mononaut
1a732f18fc
Remove font, update 8 block defaults, fix deprecated css 2023-11-22 17:47:51 +09:00
Mononaut
729fb3bb9d
Move standalone blocks page to /view/blocks 2023-11-22 17:47:51 +09:00
Mononaut
fc56f273d4
Simplify 8chain block info 2023-11-22 17:47:51 +09:00
Mononaut
642be969a3
Add more block info, reduce font size 2023-11-22 17:47:50 +09:00
Mononaut
d69cdacd5e
Add numBlocks param 2023-11-22 17:47:50 +09:00
Mononaut
ec8fc53dcb
eight blocks 2023-11-22 17:47:49 +09:00
wiz
108d1762d6
Merge pull request #4404 from mempool/simon/truncate-text-link-fix
Fixes truncated links
2023-11-22 17:17:51 +09:00
wiz
879039ca8c
Merge pull request #4406 from mempool/wiz/update-privacy-policy
Update our Privacy Policy for new backend
2023-11-22 17:16:38 +09:00
wiz
047d1463e7
Add missing <br> tag in privacy poilicy 2023-11-22 17:15:39 +09:00
wiz
8fc60fa086
Merge pull request #4405 from mempool/mononaut/simplify-acceleration-preview
simplify acceleration preview summary
2023-11-22 17:12:26 +09:00
wiz
bce68ee37f
Merge branch 'master' into wiz/update-privacy-policy 2023-11-22 17:09:14 +09:00
wiz
2f25c128c1
Merge pull request #4395 from mempool/hunicus/about-sponsor-link
Change sponsor cta on about page
2023-11-22 17:06:55 +09:00
wiz
a76a600d3f
Tweak community sponsor word 2023-11-22 17:06:02 +09:00
wiz
afdb419beb
Update our Privacy Policy for new backend 2023-11-22 16:55:40 +09:00
Mononaut
8bd2aa3dd3
simplify acceleration preview summary 2023-11-22 16:38:58 +09:00
hunicus
a3f2c42b8e
Replace vip events with early accelerator 2023-11-22 16:31:24 +09:00
softsimon
dbcd900056
Fixes truncated links 2023-11-22 16:22:41 +09:00
softsimon
5a6d6fae41
Merge pull request #4401 from mempool/mononaut/menu-footer-align-bug
Fix truncated hidden text layout flow bug
2023-11-22 15:35:26 +09:00
softsimon
6bb666ba5e
Merge pull request #4402 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.6.0
Bump cypress from 13.5.0 to 13.6.0 in /frontend
2023-11-22 14:47:49 +09:00
Mononaut
8dc80eadf3
Fix health score when mempool was empty 2023-11-22 13:10:53 +09:00
softsimon
505532f812
Merge pull request #4396 from mempool/mononaut/graph-tooltip-fixes
Fix mempool graph tooltip width & vb precision
2023-11-22 12:21:03 +09:00
dependabot[bot]
89eb02dad0
Bump cypress from 13.5.0 to 13.6.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.5.0 to 13.6.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.5.0...v13.6.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 02:21:44 +00:00
Mononaut
94a7b710c5
Fix truncated hidden text layout flow bug 2023-11-22 11:15:00 +09:00
softsimon
1e01f88c15
Merge pull request #4398 from mempool/mononaut/fix-left-margin
Fix negative left margin on master page
2023-11-21 20:41:38 +09:00
Mononaut
d471616a24
Fix negative left margin on master page 2023-11-21 20:29:41 +09:00
hunicus
9b8f70a0ae
Change alignment and copy 2023-11-21 18:00:22 +09:00
Mononaut
ab079e9372
Fix mempool graph tooltip width & vb precision 2023-11-21 16:36:46 +09:00
hunicus
b77a16233b
Change sponsor cta on about page 2023-11-21 14:56:53 +09:00
wiz
894075493b
ops: Fix mempool backend config for liquid socket paths 2023-11-20 23:28:37 +09:00
wiz
954512cd8e
Merge pull request #4303 from mempool/nymkappa/mega-branch
[Accelerator] Mega branch
2023-11-20 22:41:23 +09:00
nymkappa
deaf6ad6a5
[enterprise] fix api endpoints urls 2023-11-20 19:12:56 +09:00
nymkappa
98443b48ba
Merge remote-tracking branch 'origin/nymkappa/mega-branch' into nymkappa/mega-branch 2023-11-20 17:16:44 +09:00
nymkappa
a7dc8793c2
[about page] un-hide sponsors buttons 2023-11-20 17:16:27 +09:00
wiz
84b8e5d472
Merge branch 'master' into nymkappa/mega-branch 2023-11-20 17:15:01 +09:00
ncois
1eb425897e
Adjust the width of the incoming tx tooltip for 2h timeframe 2023-11-19 16:42:09 +01:00
softsimon
e768072799
Merge pull request #4388 from mempool/mononaut/rbf-cache-load-logs
More verbose RBF cache check logs
2023-11-19 17:34:00 +09:00
nymkappa
206706180f
[accelerator] fix confirmation message when accelerating 2023-11-19 17:23:46 +09:00
nymkappa
0e3b3a0e00
[accelerator] fix message when trying to accelerate 2023-11-19 17:16:05 +09:00
wiz
28733c1e97
Merge branch 'master' into nymkappa/mega-branch 2023-11-19 16:07:03 +09:00
softsimon
7e74a26de2
Merge pull request #4257 from mempool/nymkappa/sticky-header-non-bitcoin
Sticky header non bitcoin
2023-11-19 15:27:52 +09:00
nymkappa
6d920e0ed3
[accelerator] hide accelerate banner 2023-11-18 18:36:17 +09:00
nymkappa
88e5f8a6af
remove upgrade link when feature not available 2023-11-18 17:15:04 +09:00
nymkappa
ae82ac8368
Merge remote-tracking branch 'origin/nymkappa/mega-branch' into nymkappa/mega-branch 2023-11-18 15:21:01 +09:00
nymkappa
15cba58144
/image -> /images 2023-11-18 15:20:53 +09:00
wiz
2c820f1cc0
ops: Rewrite nginx config for new services API endpoints 2023-11-18 15:09:02 +09:00
wiz
4070492584
ops: Set nginx to ignore Pragma header for no-cache endpoints 2023-11-18 13:22:17 +09:00
wiz
82a43e25e0
ops: Set nginx no-cache headers for /api/v1/services/auth 2023-11-18 12:40:39 +09:00
wiz
5e45d8f3bc
ops: Set nginx no-cache headers for /api/v1/services/account 2023-11-18 12:20:18 +09:00
wiz
e5709235f3
Merge branch 'master' into nymkappa/mega-branch 2023-11-18 11:30:35 +09:00
ncois
9d0bfdfa88
Increase tooltip width in mempool graphs 2023-11-17 13:47:28 +01:00
softsimon
59c513f2a5
Merge pull request #4389 from ncois/fix-p2pk-balance
Fix P2PK balance display in address page (duplicate)
2023-11-17 20:49:02 +09:00
ncois
76a07315f3 Fix P2PK balance display in address page 2023-11-17 09:52:48 +01:00
softsimon
5723f167df
Merge pull request #4386 from mempool/mononaut/fix-electrum-p2pk
Fix electrum p2pk/scripthash format
2023-11-17 17:31:22 +09:00
Mononaut
6ac328c979
More verbose RBF cache check logs 2023-11-17 07:06:44 +00:00
softsimon
85e52d24c3
Merge pull request #4382 from shubhamkmr04/shubham/Change-ZEUS-logo
Change ZEUS Logo
2023-11-17 15:29:13 +09:00
Mononaut
7717c15666
Fix electrum p2pk/scripthash format 2023-11-17 03:49:31 +00:00
softsimon
61d7fd490a
Merge pull request #4385 from mempool/mononaut/memory-usage-precision
Round memory usage to 3 significant figures
2023-11-17 11:48:44 +09:00
Mononaut
ccf952983b
Round memory usage to 3sf 2023-11-17 02:22:57 +00:00
Shubham Kumar
602d7ce207
Merge branch 'master' into shubham/Change-ZEUS-logo 2023-11-16 12:42:19 +05:30
nymkappa
64a51803c4
Merge branch 'master' into nymkappa/mega-branch 2023-11-16 16:10:55 +09:00
shubham
a63e68e9e3
Change ZEUS Logo 2023-11-16 12:38:54 +05:30
softsimon
d4d17fa167
Merge pull request #4371 from mempool/nymkappa/outliers-toggle
[graph] add toggle to show/hide outliers in transaction vBytes per second graph
2023-11-16 14:59:50 +09:00
nymkappa
4cd8d70de5
cleanup if/else 2023-11-15 18:47:56 +09:00
nymkappa
dc26c6f105
[graph] don't change yaxis scale if no outliers - save state in localstorage 2023-11-15 18:46:33 +09:00
nymkappa
365954f5b4
Merge pull request #4304 from mempool/nymkappa/new-enterprise-launch
Prepare enterprise only launch
2023-11-15 18:24:48 +09:00
nymkappa
ff38073280
Merge branch 'nymkappa/mega-branch' into nymkappa/new-enterprise-launch 2023-11-15 18:22:37 +09:00
nymkappa
eeebfde33c
Merge branch 'master' into nymkappa/mega-branch 2023-11-15 18:22:27 +09:00
softsimon
fa12233667
Merge pull request #4381 from mempool/mononaut/acc-preview-min-height
Minimum acceleration preview bar height
2023-11-15 18:22:05 +09:00
nymkappa
19477c4ee3
Merge branch 'master' into mononaut/acc-preview-min-height 2023-11-15 18:18:42 +09:00
nymkappa
e4b56bac88
Merge branch 'nymkappa/mega-branch' into nymkappa/new-enterprise-launch 2023-11-15 18:18:01 +09:00
nymkappa
d390fa8671
Merge branch 'master' into nymkappa/mega-branch 2023-11-15 18:17:48 +09:00
softsimon
f9f9c62608
Merge pull request #4374 from mempool/nymkappa/fix-hybrid-build-routing
[frontend] export MasterPageComponent for re-use in hybrid build
2023-11-15 18:02:25 +09:00
Mononaut
d9966143c1
Minimum acceleration preview bar height 2023-11-15 08:49:22 +00:00
nymkappa
57ab82ae7a
Merge branch 'nymkappa/mega-branch' into nymkappa/new-enterprise-launch 2023-11-15 17:23:42 +09:00
nymkappa
756f6d8abe
[frontend] export MasterPageComponent for re-use in hybrid build 2023-11-15 17:09:54 +09:00
softsimon
f0840a51d9
Merge pull request #4379 from mempool/mononaut/reduce-batch-sizes
Configurable mempool/electrs batch sizes
2023-11-15 16:56:35 +09:00
softsimon
eac8f8c2c6
Merge pull request #4368 from mempool/simon/truncate-selection
Make search and select work for truncated text
2023-11-15 16:25:17 +09:00
Mononaut
20f61fc6a0
Round batch sizes up 2023-11-15 06:58:00 +00:00
Mononaut
6454892d48
Use mempool/txs max_txs parameter 2023-11-15 06:57:31 +00:00
Mononaut
35d7c55c1d
Configurable esplora batch sizes 2023-11-15 06:12:15 +00:00
softsimon
86fe6a802b
Fixing mobile overflow 2023-11-15 15:07:14 +09:00
softsimon
d4568b631d
Make search and select work for truncated text
fixes #4367
2023-11-15 14:39:23 +09:00
nymkappa
2d30c0b588
[graph] use echart echart yaxis max property instead of modifying the data itself 2023-11-15 14:08:44 +09:00
wiz
1aea3fcac5
Merge pull request #4378 from mempool/mononaut/tomahawk-logs-fix
Set fallback server out-of-sync when unreachable
2023-11-14 19:27:13 +09:00
Mononaut
5cfd599018
Set fallback server out-of-symc when unreachable 2023-11-14 10:17:02 +00:00
wiz
d8f2462ff0
Merge pull request #4377 from mempool/mononaut/tomahawk-logs
🥩🙂🪵📝
2023-11-14 19:10:41 +09:00
Mononaut
85091e1f3a
🥩🙂🪵📝 2023-11-14 09:55:02 +00:00
softsimon
3a8d19062f
Merge pull request #4271 from mempool/mononaut/refactor-task-scheduler
Refactor indexer scheduling to avoid accumulating identical tasks
2023-11-14 18:13:48 +09:00
wiz
6913946079
ops: Upgrade mariadb to 10.11.x 2023-11-14 17:46:52 +09:00
wiz
fdd18317f9
ops: Kill node before sh in stop script 2023-11-14 17:46:42 +09:00
softsimon
a7c64c0df3
Merge branch 'master' into mononaut/refactor-task-scheduler 2023-11-14 17:17:55 +09:00
softsimon
f2fb2f98f1
Merge pull request #4375 from mempool/mononaut/db-error-log-levels
Support different log levels for database query error messages
2023-11-14 17:17:31 +09:00
Mononaut
7aad664112
Support different log levels for database query error messages 2023-11-14 07:59:24 +00:00
nymkappa
fa040ca19f
[frontend] export MasterPageComponent for re-use in hybrid build 2023-11-14 15:53:37 +09:00
Mononaut
00887bc24b
Refactor indexer scheduling to avoid accumulating identical tasks 2023-11-14 06:30:22 +00:00
softsimon
ab8b557e73
Merge pull request #4373 from mempool/mononaut/fix-silent-db-exceptions
Fix silently unhandled database exceptions
2023-11-14 15:27:52 +09:00
Mononaut
5c0a59d2f6
handle unknown query types in db error log 2023-11-14 06:13:06 +00:00
Mononaut
29cbdf6cd5
handle null query in error log 2023-11-14 05:52:27 +00:00
Mononaut
08b68ef8ba
handle exception in db transaction rollback 2023-11-14 05:33:48 +00:00
Mononaut
1ae34e069c
Fix silently unhandled database exceptions 2023-11-14 05:11:51 +00:00
softsimon
5bad829afc
Merge pull request #4316 from starius/taproot-channels
[lightning] add taproot-channels to node features
2023-11-14 13:54:31 +09:00
softsimon
562cd5683a
Merge branch 'master' into taproot-channels 2023-11-14 13:41:44 +09:00
nymkappa
cbf2395009
Merge branch 'master' into nymkappa/mega-branch 2023-11-14 11:12:11 +09:00
nymkappa
c393483590
[graph] add toggle to show/hide outliers in transaction vBytes per second graph 2023-11-14 10:51:51 +09:00
wiz
cbe1ec4e72
Merge pull request #4356 from mempool/mononaut/fix-pid-lock
Recover from stale PID file
2023-11-13 22:19:43 +09:00
Mononaut
c6a92083a8
Fix pid parsing on release lock 2023-11-13 07:54:11 +00:00
Mononaut
8c4b488251
handle SIGHUP exit code 2023-11-13 07:54:11 +00:00
Mononaut
3639dcc92a
Recover from stale PID file 2023-11-13 07:54:11 +00:00
wiz
28113d1141
Merge pull request #4163 from mempool/mononaut/fast-forensics
Fast lightning forensics
2023-11-13 14:54:20 +09:00
softsimon
12b49abfdd
Merge pull request #4258 from mempool/mononaut/esplora-sigops
Sigops everywhere
2023-11-13 14:32:23 +09:00
wiz
68e0dfe736
Merge branch 'master' into mononaut/fast-forensics 2023-11-13 14:24:08 +09:00
Mononaut
29299e622e
Calculate sigops in /api/v1/tx/:txid for mined txs 2023-11-13 03:44:35 +00:00
Mononaut
4ac0a6dad2
Display sigops on all transactions 2023-11-13 03:44:35 +00:00
Mononaut
a510b4992c
Fix condition to add mempool data to loaded cache txs 2023-11-13 03:44:35 +00:00
Mononaut
72e19f674a
Clear Liquid sigops 2023-11-13 03:44:34 +00:00
Mononaut
ea2a7e7505
Use sigops from mempool/electrs, fix the nodejs sigop calculation 2023-11-13 03:44:34 +00:00
wiz
74a2cedc7a
Merge pull request #4101 from mempool/mononaut/faster-rbf-load
use bulk /txs endpoint to check cached rbf tx status
2023-11-12 19:10:53 +09:00
wiz
c0a481acbe
Reduce /internal/txs RBF cache query chunk size to 250 2023-11-12 19:09:36 +09:00
Mononaut
5998b54fec
more logs, reduce request chunk sizes 2023-11-12 09:23:37 +00:00
wiz
a2f6ea7b3a
Merge branch 'master' into mononaut/faster-rbf-load 2023-11-12 17:41:30 +09:00
wiz
6a877c2a2e
Merge pull request #4158 from mempool/junderw/fix-paths
Nginx: Ignore all internal-api paths
2023-11-12 17:40:34 +09:00
wiz
ee90a96d22
Merge branch 'master' into junderw/fix-paths 2023-11-12 17:22:39 +09:00
softsimon
4ea7989aec
Merge pull request #4364 from mempool/mononaut/fix-incoming-tx-chart
restore incoming tx clearance line, smooth moving avg
2023-11-12 17:13:53 +09:00
Mononaut
fc52514c31
restore incoming tx clearance line, smooth moving avg 2023-11-12 07:59:06 +00:00
Mononaut
b9217da453
Change internal API prefix to "internal" 2023-11-12 07:08:21 +00:00
Mononaut
70badaf461
Speed up $scanForClosedChannels, use internal outspends apis 2023-11-12 07:08:20 +00:00
Mononaut
995acb238d
Refactor forensics batching, speed up opened channel forensics 2023-11-12 07:08:20 +00:00
Mononaut
5bee54a2bf
Use new bulk endpoints to speed up forensics 2023-11-12 07:08:19 +00:00
Mononaut
7ec7ae7b95
Remove old batched outspends API 2023-11-12 07:03:28 +00:00
Mononaut
09f208484a
Add electrsApiService cachedRequest function, switch outspends 2023-11-12 07:03:28 +00:00
Mononaut
8aa51c4e80
Batch esplora outspends requests 2023-11-12 07:03:28 +00:00
Mononaut
823f06451c
Send correct tx conf status in websocket msgs 2023-11-12 07:03:27 +00:00
Mononaut
9d60c39aeb
Resolve rbf cache merge conflicts 2023-11-12 06:19:46 +00:00
Mononaut
031e14f302
Update internal getRawTransactions to use new prefix 2023-11-12 05:37:39 +00:00
Mononaut
156b5d0b3c
Update bulk /txs to use new failover router, internal-api path 2023-11-12 05:37:39 +00:00
Mononaut
38909cfc42
use bulk /txs endpoint to check cached rbf tx status 2023-11-12 05:37:37 +00:00
softsimon
3de779ea13
Merge pull request #4255 from mempool/mononaut/confirmed-tx-status
Send correct tx conf status in websocket msgs
2023-11-12 14:34:12 +09:00
Mononaut
2339a0771e
Use internal /block/:hash/txs endpoint 2023-11-12 05:04:41 +00:00
junderw
4972f00a96
Add internal endpoint blocking to all Nginx configs 2023-11-12 05:04:41 +00:00
Jonathan Underwood
502a1c021e
Add suggestions from wiz
Co-authored-by: wiz <j@wiz.biz>
2023-11-12 05:04:41 +00:00
Mononaut
d16773bfa0
Switch backend to use internal-api paths 2023-11-12 05:04:41 +00:00
junderw
511b827bf5
Nginx: Ignore all internal-api paths 2023-11-12 05:04:40 +00:00
softsimon
90634c4343
Merge branch 'master' into mononaut/confirmed-tx-status 2023-11-12 13:48:35 +09:00
softsimon
1e69f3b331
Merge pull request #4246 from mempool/dependabot/npm_and_yarn/frontend/mock-socket-9.3.1
Bump mock-socket from 9.2.1 to 9.3.1 in /frontend
2023-11-11 18:42:53 +09:00
dependabot[bot]
4273276422
Bump mock-socket from 9.2.1 to 9.3.1 in /frontend
Bumps [mock-socket](https://github.com/thoov/mock-socket) from 9.2.1 to 9.3.1.
- [Release notes](https://github.com/thoov/mock-socket/releases)
- [Changelog](https://github.com/thoov/mock-socket/blob/master/CHANGELOG.md)
- [Commits](https://github.com/thoov/mock-socket/commits)

---
updated-dependencies:
- dependency-name: mock-socket
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-11 09:37:11 +00:00
softsimon
fd25713746
Merge pull request #4318 from mempool/mononaut/more-dp-fees
Improve precision of fee distribution chart labels
2023-11-11 18:36:26 +09:00
Mononaut
37605d5732
Improve fee distribution legibility on small screens 2023-11-11 08:57:55 +00:00
softsimon
df2967d576
Merge pull request #4353 from mempool/dependabot/npm_and_yarn/frontend/frontend-angular-dependencies-f2c2dc5ad6
Bump the frontend-angular-dependencies group in /frontend with 1 update
2023-11-11 17:57:32 +09:00
dependabot[bot]
9ab85ab799
Bump the frontend-angular-dependencies group in /frontend with 1 update
Bumps the frontend-angular-dependencies group in /frontend with 1 update: [ngx-echarts](https://github.com/xieziyu/ngx-echarts).

- [Release notes](https://github.com/xieziyu/ngx-echarts/releases)
- [Commits](https://github.com/xieziyu/ngx-echarts/commits)

---
updated-dependencies:
- dependency-name: ngx-echarts
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-11 08:39:56 +00:00
softsimon
1b6f039341
Merge pull request #4289 from mempool/dependabot/npm_and_yarn/frontend/get-func-name-2.0.2
Bump get-func-name from 2.0.0 to 2.0.2 in /frontend
2023-11-11 17:38:47 +09:00
dependabot[bot]
0abf4f415f
Bump get-func-name from 2.0.0 to 2.0.2 in /frontend
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-11 08:29:45 +00:00
Mononaut
b5a5f0f608
Add small margin above fee distribution graph 2023-11-11 08:24:58 +00:00
Mononaut
ffd2685922
Display fee distribution labels to 3 sig figs 2023-11-11 08:24:57 +00:00
softsimon
9845567c2f
Merge pull request #4361 from mempool/mononaut/fix-double-outspend-request
ApiService caching layer
2023-11-11 17:07:31 +09:00
Mononaut
6740ab61f3
Reduce outspend API cache expiry to 250ms 2023-11-11 07:46:25 +00:00
Mononaut
3f0c3c1952
Add apiService cachedRequest function, apply to outspends requests 2023-11-11 07:16:59 +00:00
softsimon
7142d69dda
Merge pull request #4319 from mempool/mononaut/fix-stale-rbf-cache
Fix rbf tree leak, clean up stale trees in Redis
2023-11-11 15:17:13 +09:00
Mononaut
e3e248d601
Convert RBF disk cache data to match new format 2023-11-11 05:52:37 +00:00
softsimon
a0a4ae611c
Merge pull request #2846 from antonilol/cookie
Add Bitcoin Core RPC cookie authentication option
2023-11-11 13:16:35 +09:00
Mononaut
0e420d8196
Fix rbf tree leak, clean up stale trees in Redis 2023-11-11 04:05:56 +00:00
softsimon
06d1bbdf03
Merge branch 'master' into cookie 2023-11-11 12:57:49 +09:00
softsimon
87b034fa8c
Merge pull request #4292 from mempool/mononaut/hide-arrow-on-replace
Hide the blockchain arrow when transaction is replaced
2023-11-11 12:17:54 +09:00
softsimon
874d2b371d
Merge branch 'master' into mononaut/hide-arrow-on-replace 2023-11-11 11:57:03 +09:00
softsimon
6134376964
Merge pull request #4347 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.5.0
Bump cypress from 13.3.0 to 13.5.0 in /frontend
2023-11-11 11:56:46 +09:00
softsimon
eba5560caa
Merge pull request #4348 from mempool/dependabot/npm_and_yarn/backend/axios-1.6.1
Bump axios from 1.5.0 to 1.6.1 in /backend
2023-11-11 11:56:34 +09:00
dependabot[bot]
e08665dee5
Bump cypress from 13.3.0 to 13.5.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.3.0 to 13.5.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.3.0...v13.5.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-11 02:47:53 +00:00
softsimon
b8b341431a
Merge pull request #4354 from mempool/mononaut/rerebundle
Better code-splitting
2023-11-10 16:40:36 +09:00
softsimon
9e6072c371
Merge branch 'master' into mononaut/confirmed-tx-status 2023-11-10 14:49:24 +09:00
Mononaut
af7b9c0dc8
Adjust webpack chunk preloading strategy 2023-11-10 05:36:19 +00:00
softsimon
1e3babe714
Merge pull request #4254 from mempool/mononaut/failover-timeout-config
Add REQUEST_TIMEOUT and FALLBACK_TIMEOUT esplora config options
2023-11-10 14:27:25 +09:00
softsimon
a663cca3d0
Merge branch 'master' into mononaut/failover-timeout-config 2023-11-10 14:09:43 +09:00
softsimon
3580d060ce
Merge pull request #4274 from mempool/mononaut/fix-faq-blockchain
Fix faq blockchain positioning
2023-11-10 13:53:15 +09:00
softsimon
31ead371dc
Merge branch 'master' into mononaut/fix-faq-blockchain 2023-11-10 13:49:58 +09:00
softsimon
897cd7edeb
Merge pull request #3571 from mempool/nymkappa/tx-overflow
Fix transaction amount overflow
2023-11-10 12:56:40 +09:00
softsimon
683b72387b
Merge branch 'master' into nymkappa/tx-overflow 2023-11-10 12:47:52 +09:00
Mononaut
db8ed5b705
Split liquid, lightning & mainnet graphs 2023-11-10 03:21:25 +00:00
Mononaut
80bf2f9ebd
Split master page components & deduplicate main routes 2023-11-10 03:20:59 +00:00
Mononaut
854a9dd057
Split legal page components into separate modules 2023-11-10 03:20:59 +00:00
Mononaut
ae02ff5b0d
Split About component into separate module 2023-11-10 03:20:59 +00:00
Mononaut
0cf898a19f
Split transaction components into separate module 2023-11-10 03:20:57 +00:00
Mononaut
b5a8687b6a
Split Block component into separate module 2023-11-10 03:20:32 +00:00
wiz
27077dcd6c
Merge pull request #4280 from mempool/mononaut/standalone-visualizations
Standalone block visualizations
2023-11-09 20:06:28 +09:00
wiz
80ecf77270
Merge branch 'master' into mononaut/standalone-visualizations 2023-11-09 19:52:32 +09:00
wiz
8d6225d6c5
Merge pull request #4309 from mempool/knorrium/unfurler_config
Configurable unfurler config
2023-11-09 19:50:58 +09:00
wiz
8dcd372b99
Merge pull request #4312 from mempool/mononaut/fix-group-channel-count
Fix node group map channel count
2023-11-09 19:26:08 +09:00
wiz
c4d37392dc
Merge branch 'master' into mononaut/fix-group-channel-count 2023-11-09 18:46:41 +09:00
wiz
4ed3b65d12
Merge pull request #4323 from mempool/mononaut/hide-mempool-count-line
Hide mempool graph count line by default
2023-11-09 18:46:33 +09:00
wiz
86458927d6
Merge branch 'master' into mononaut/hide-mempool-count-line 2023-11-09 18:38:11 +09:00
wiz
49f189f257
Merge pull request #4343 from erikarvstedt/add-distro-nix-bitcoin
README: add `nix-bitcoin` to node distros
2023-11-09 18:37:20 +09:00
softsimon
9cc0aaeac2
Merge pull request #4345 from mempool/mononaut/rebundle
Shake the echarts tree
2023-11-09 18:25:26 +09:00
wiz
2df99ef7ed
Merge branch 'master' into mononaut/rebundle 2023-11-09 18:06:19 +09:00
softsimon
450bda7d04
Merge pull request #4328 from mempool/mononaut/purging-min-fee
Enforce purging rate minimum on recommended fees
2023-11-09 14:58:48 +09:00
dependabot[bot]
d18b8881d0
Bump axios from 1.5.0 to 1.6.1 in /backend
Bumps [axios](https://github.com/axios/axios) from 1.5.0 to 1.6.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.5.0...v1.6.1)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-09 02:16:55 +00:00
wiz
1b3ceed707
Merge pull request #4325 from fanquake/bitcoin_core_25_1
Upgrade bitcoin core to v25.1
2023-11-09 01:39:01 +09:00
Mononaut
a33dc74c88
Shake the echarts tree 2023-11-07 23:35:33 +00:00
softsimon
79fb0a34dc
Merge pull request #4331 from mempool/dependabot/npm_and_yarn/frontend/browserify-sign-4.2.2
Bump browserify-sign from 4.2.1 to 4.2.2 in /frontend
2023-11-07 11:46:35 +09:00
softsimon
40f79e64b3
Merge pull request #4329 from mempool/dependabot/npm_and_yarn/backend/crypto-js-4.2.0
Bump crypto-js from 4.1.1 to 4.2.0 in /backend
2023-11-07 11:46:17 +09:00
dependabot[bot]
5f034d34b3
Bump browserify-sign from 4.2.1 to 4.2.2 in /frontend
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 01:45:30 +00:00
softsimon
6d336c010c
Merge pull request #4322 from mempool/dependabot/npm_and_yarn/frontend/babel/traverse-7.23.2
Bump @babel/traverse from 7.22.8 to 7.23.2 in /frontend
2023-11-07 10:44:36 +09:00
dependabot[bot]
14c87e2f03
Bump crypto-js from 4.1.1 to 4.2.0 in /backend
Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0.
- [Commits](https://github.com/brix/crypto-js/compare/4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: crypto-js
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 01:44:00 +00:00
softsimon
6ef15bddcd
Merge pull request #4314 from mempool/dependabot/npm_and_yarn/backend/babel/core-7.23.2
Bump @babel/core from 7.21.4 to 7.23.2 in /backend
2023-11-07 10:43:03 +09:00
softsimon
fbc6c078ef
Merge pull request #4302 from mempool/simon/liquid-blocks-api
Fix block pagination for liquid
2023-11-07 10:42:26 +09:00
softsimon
717601342f
Merge pull request #4327 from mempool/orangesurf/primal-logo
Add primal.net logo to footer
2023-11-07 10:41:45 +09:00
Erik Arvstedt
939fe951d4
README: add nix-bitcoin to node distros 2023-11-05 13:47:23 +01:00
nymkappa
a9a3623539
Merge pull request #4341 from mempool/nymkappa/hide-accelerate-cta-loading
[accelerator] hide cta while the tx page is loading
2023-11-02 10:21:46 +09:00
nymkappa
27966ad8ec
[accelerator] hide cta while the tx page is loading 2023-11-02 10:21:15 +09:00
nymkappa
5d1ebc6d31
Merge pull request #4340 from mempool/nymkappa/fix-search-align-issue
[CSS] fix search align issue when hamburger icon is showing
2023-11-01 17:49:26 +09:00
nymkappa
a68c2a2be6
[css] fix search bar align issue when hamburger icon is showing 2023-11-01 17:47:20 +09:00
softsimon
7145856d98
Merge pull request #4326 from TKone7/patch-1
Fix memory cache cleanup logic
2023-10-30 20:51:42 +08:00
softsimon
f305dba50c
Merge pull request #4332 from mempool/mononaut/fix-docker-pid-config
Fix stray comma in docker backend config
2023-10-29 15:55:47 +08:00
Mononaut
5523c77a04
Fix stray , in docker backend config 2023-10-28 21:06:33 +00:00
Mononaut
83fde600f1
Enforce purging rate minimum on recommended fees 2023-10-25 17:46:04 +00:00
orangesurf
d7c60d9b11
Merge pull request #4324 from orangesurf/master
Add primal.net logo to footer
2023-10-23 19:14:08 +01:00
TKone7
4ca273c8c1
Agree to Contributor License Agreement 2023-10-23 15:56:07 +02:00
TKone7
59a92d0363
Fix cleanup logic
Keep only cache entries with an expiry in the future.
2023-10-23 15:49:34 +02:00
fanquake
26f5776d6d
Upgrade bitcoin core to v25.1 2023-10-23 14:44:21 +01:00
fanquake
abee175f4f
contrib: add fanquake CLA 2023-10-23 14:44:21 +01:00
orangesurf
9ca41a7608
Merge branch 'master' into master 2023-10-22 17:25:20 +01:00
Mononaut
6efeeb1d64
Hide mempool count line by default 2023-10-20 15:10:40 +00:00
Boris Nagaev
2bc3352785
[lightning] add taproot-channels to node features
Update from https://github.com/lightningnetwork/lnd/blob/master/lnwire/features.go
2023-10-20 04:49:14 +02:00
Boris Nagaev
50460d4025
contributer license 2023-10-20 04:48:34 +02:00
dependabot[bot]
1bc02fd216
Bump @babel/traverse from 7.22.8 to 7.23.2 in /frontend
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.8 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 11:23:40 +00:00
softsimon
413941f5ac
Merge pull request #4154 from mempool/mononaut/record-purge-rates
Record purging rate in statistics
2023-10-15 00:25:10 +07:00
softsimon
68854d56cc
Merge branch 'master' into mononaut/record-purge-rates 2023-10-14 15:07:03 +07:00
softsimon
a78376a1c5
Merge pull request #4217 from mempool/mononaut/pid-file
Implement pid file & checks
2023-10-14 15:06:14 +07:00
softsimon
a95f1e583d
Merge pull request #3923 from pfoytik/pfoytik/incomingTxMA
added moving average to Transactions vBytes per second (vB/s)
2023-10-13 17:40:41 +07:00
dependabot[bot]
0783507821
Bump @babel/core from 7.21.4 to 7.23.2 in /backend
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.21.4 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/@babel/core@7.23.2/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 02:38:59 +00:00
Peter
76621464f1
ma vbytes 2023-10-11 08:09:06 -04:00
Felipe Knorr Kuhn
e9e507af69
Fix default config path 2023-10-10 19:53:57 -07:00
Mononaut
af3d6eccfb
Fix node group map channel count 2023-10-11 01:09:10 +00:00
orangesurf
21ede8671d
Update global-footer.component.html 2023-10-09 19:01:48 +00:00
orangesurf
e27cf33981 Improve footer formatting for small screens 2023-10-08 17:52:03 +01:00
orangesurf
02c892aa07
Merge branch 'mempool:master' into master 2023-10-08 17:39:47 +01:00
Felipe Knorr Kuhn
a35c8be25c
Configurable unfurler config 2023-10-08 09:03:22 -07:00
wiz
5302b27d55
Merge pull request #4307 from fubz/fubz/electrs-crontab 2023-10-07 09:22:36 +09:00
fubz
5b357eb6b5 fix: configure crontab for electrs single script 2023-10-06 12:48:46 -04:00
nymkappa
7d3f82eca0
[footer] remove "Sign-up" label 2023-10-05 11:16:01 +02:00
nymkappa
20026f974f
Merge remote-tracking branch 'origin/nymkappa/accel-button' into nymkappa/mega-branch 2023-10-04 12:11:10 +02:00
nymkappa
3d964fcdfa
Merge branch 'nymkappa/about-page-profile-image' into nymkappa/mega-branch 2023-10-04 12:11:05 +02:00
nymkappa
9e8b2957d0
Merge branch 'nymkappa/menu' into nymkappa/mega-branch 2023-10-04 12:10:58 +02:00
nymkappa
c04e92a686
Merge branch 'nymkappa/accelerate-preview-login-cta' into nymkappa/mega-branch 2023-10-04 12:10:46 +02:00
nymkappa
2dd6dd9233
Merge branch 'nymkappa/polish-accelerate-cta' into nymkappa/mega-branch 2023-10-04 12:10:39 +02:00
nymkappa
e9b72776ed
Merge remote-tracking branch 'origin/nymkappa/fix-menu-scroll' into nymkappa/mega-branch 2023-10-04 12:10:28 +02:00
nymkappa
23df1f012c
Merge remote-tracking branch 'origin/nymkappa/sticky-header-non-bitcoin' into nymkappa/mega-branch 2023-10-04 12:10:17 +02:00
softsimon
10be2c8176
Fix block pagination for liquid 2023-10-04 01:41:49 +04:00
softsimon
e25e99456c
Merge pull request #4033 from mempool/nymkappa/no-db-blocks-list
[block list] improve block list when db = false
2023-10-03 20:59:53 +04:00
softsimon
e6236d8cfd
Merge branch 'master' into nymkappa/no-db-blocks-list 2023-10-02 21:53:44 +04:00
Mononaut
75c50416f5
Fix PID docker config 2023-10-01 16:43:21 +01:00
Mononaut
0808640ec0
Check database enabled before releasing PID lock file 2023-10-01 16:38:45 +01:00
Mononaut
7dad00523f
Implement pid file & checks 2023-10-01 16:37:28 +01:00
softsimon
63a4810b11
Merge pull request #4299 from mempool/knorrium/update_node_matrix
Reduce the test matrix to node v18 and v20
2023-10-01 12:24:22 +04:00
softsimon
0e69f28e58
Merge pull request #4290 from mempool/dependabot/npm_and_yarn/frontend/cypress-13.3.0
Bump cypress from 13.2.0 to 13.3.0 in /frontend
2023-10-01 12:24:09 +04:00
Felipe Knorr Kuhn
77f8999f1e
Merge branch 'master' into knorrium/update_node_matrix 2023-09-30 08:59:25 -07:00
Felipe Knorr Kuhn
0e4e0bff78
Reduce the test matrix to node v18 and v20 2023-09-30 08:57:57 -07:00
Felipe Knorr Kuhn
504840c15a
Merge branch 'master' into dependabot/npm_and_yarn/frontend/cypress-13.3.0 2023-09-30 08:48:00 -07:00
wiz
b7919afd2f
Merge pull request #4294 from mempool/knorrium/docker_updates
Docker updates
2023-09-30 18:53:17 +09:00
Felipe Knorr Kuhn
7c09dd1b70
Set REDIS as disabled by default 2023-09-29 22:14:29 -07:00
Felipe Knorr Kuhn
679e967241
Add missing ACCELERATOR variable 2023-09-29 20:14:40 -07:00
Felipe Knorr Kuhn
f21a31ce86
Remove x86 2023-09-29 19:32:38 -07:00
Felipe Knorr Kuhn
003f3cf8b1
Replace armv7 with x86 2023-09-29 19:30:56 -07:00
Felipe Knorr Kuhn
3ec8a6955c
Update Docker GHA 2023-09-29 19:23:38 -07:00
Felipe Knorr Kuhn
fba4759ba1
Update node base images to 20.8.0 2023-09-29 19:16:06 -07:00
Felipe Knorr Kuhn
ea2f39b18a
Update mariadb base image 2023-09-29 19:04:54 -07:00
Felipe Knorr Kuhn
ad77b3a6c9
Update the frontend base and ngnix images 2023-09-29 19:04:37 -07:00
Felipe Knorr Kuhn
097db4edcd
Update backend base images 2023-09-29 19:03:53 -07:00
Felipe Knorr Kuhn
e9e2c2f7b5
Remove unused files 2023-09-29 19:03:29 -07:00
Mononaut
420fbf3d6f
Hide the blockchain arrow when transaction is replaced 2023-09-29 00:02:01 +01:00
dependabot[bot]
7a1cd0ff6a
Bump cypress from 13.2.0 to 13.3.0 in /frontend
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.2.0 to 13.3.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.2.0...v13.3.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-28 02:23:46 +00:00
wiz
f83fed62ce
Merge pull request #4286 from mempool/wiz/bump-nodejs-v20.7.0
Bump NodeJS version to v20.7.0
2023-09-27 14:39:04 +09:00
wiz
72fdcb749f
Bump NodeJS version to v20.7.0 2023-09-27 14:23:07 +09:00
wiz
21a78e37d1
Merge pull request #4112 from Emzy/ops/nginx-buffer-size
Fixing proxy_buffer_size error nginx.conf
2023-09-27 12:10:42 +09:00
wiz
feed25b641
Merge branch 'master' into ops/nginx-buffer-size 2023-09-27 12:10:25 +09:00
softsimon
5e95d8d6ce
Merge pull request #4281 from mempool/nymkappa/fix-blockchain-width-liquid
[ui] don't add 120px to blockchain component on liquid
2023-09-26 00:28:48 +04:00
orangesurf
6de8cbe9b9 Add primal.net logo to footer 2023-09-25 19:57:52 +01:00
softsimon
9cf2db77b4
Merge pull request #4279 from mempool/knorrium/hardened_sync_assets
Fixes to sync-assets
2023-09-24 22:40:33 +04:00
Felipe Knorr Kuhn
372fb38722
Skip syncing Liquid assets if BASE_MODULE is not set to liquid 2023-09-24 10:31:14 -07:00
Felipe Knorr Kuhn
c35f8a3f08
Add SKIP_SYNC and verbosity from previous PR 2023-09-23 15:39:00 -07:00
Mononaut
6773af92ed
Add standalone mempool block visualization page 2023-09-23 23:09:11 +01:00
Felipe Knorr Kuhn
4ed629a8ea
Minor improvements to sync-assets 2023-09-23 14:43:54 -07:00
Felipe Knorr Kuhn
67b2aa2ff0
Add trailing slash to the sync-assets script 2023-09-23 14:42:54 -07:00
Mononaut
72750267d0
Enable navigation from standalone block page 2023-09-23 22:26:21 +01:00
Felipe Knorr Kuhn
24b3ca559d
Add block delta to the logs 2023-09-23 13:32:12 -07:00
Felipe Knorr Kuhn
5edd83d496
Merge branch 'master' into knorrium/add_sync_check_script 2023-09-23 13:20:42 -07:00
softsimon
36dc5e9a9b
Merge pull request #4215 from mempool/dependabot/npm_and_yarn/backend/axios-1.5.0
Bump axios from 1.4.0 to 1.5.0 in /backend
2023-09-24 00:02:02 +04:00
Felipe Knorr Kuhn
693b845c45
Add block height workflow 2023-09-23 11:57:20 -07:00
dependabot[bot]
928d3282a2
Bump axios from 1.4.0 to 1.5.0 in /backend
Bumps [axios](https://github.com/axios/axios) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-23 15:20:54 +00:00
softsimon
a567f44b3c
Merge pull request #4276 from mempool/knorrium/print_backend_sha_workflow
ops: Add workflow to print the backend info on all servers
2023-09-23 19:20:34 +04:00
softsimon
363b9f5be2
Merge pull request #4275 from mempool/knorrium/update_cypress_deps
Update Cypress to v13 and other test deps
2023-09-23 19:20:05 +04:00
Felipe Knorr Kuhn
52725df296
Add workflow to run the backend info script 2023-09-23 07:58:09 -07:00
Felipe Knorr Kuhn
e3cd7dbf34
Add script to print the backend info on all servers 2023-09-23 07:57:49 -07:00
Felipe Knorr Kuhn
593e72f905
Update Cypress to v13 and other test deps 2023-09-22 18:51:29 -07:00
Mononaut
80afcae645
Fix faq blockchain positioning 2023-09-23 00:40:47 +01:00
Mononaut
f3fc774c2d
Add standalone block visualization page 2023-09-21 21:57:54 +01:00
softsimon
8c2d72ad58
Merge branch 'master' into nymkappa/no-db-blocks-list 2023-09-21 20:45:26 +04:00
softsimon
d0696628b2
Merge pull request #4200 from mempool/mononaut/canonical-blocks
Update canonical link with block hash
2023-09-21 12:45:21 +04:00
Mononaut
368ab1dc66
Update canonical link with block hash 2023-09-21 12:31:38 +04:00
softsimon
b6f66a6a28
Merge pull request #4236 from mempool/mononaut/mempool-count-graph
Add mempool transaction count line to graph
2023-09-20 20:26:25 +04:00
softsimon
bda361cf57
Merge pull request #4269 from mempool/mononaut/reduce-blockchain-jumping
Reduce blockchain jumping
2023-09-20 18:20:34 +04:00
Mononaut
1a6a0c12ec
Fix blockchain scroll jumping 2023-09-20 03:55:06 +00:00
Mononaut
b645ad3fd8
Reduce thrashing while initializing blockchain scroll position 2023-09-19 22:55:57 +00:00
wiz
b979594a04
Merge pull request #4262 from mempool/wiz/add-va1-mempoolspace-lightning-nodes
Add VA1 mempool.space lightning node pubkeys
2023-09-18 17:43:40 -04:00
wiz
6aceb898df
Merge pull request #4248 from orangesurf/master
Add orangesurf contributor declaration & update trademark to registered trademark
2023-09-18 17:27:50 -04:00
Mononaut
c80201e3db
hide mempool count line before start of data 2023-09-18 21:13:11 +00:00
Mononaut
ef5d2606b7
Add missing count data to longer statistics timespans 2023-09-18 21:07:24 +00:00
softsimon
1e648a2dce
Merge pull request #4265 from mempool/nymkappa/fix-js-error-when-no-geolocation
[lightning] fix js error when there is no geolocation available
2023-09-18 17:23:23 +04:00
softsimon
11058b469c
Merge pull request #4209 from mempool/mononaut/address-page-rbf
Notify address page of removed transactions
2023-09-18 17:04:31 +04:00
nymkappa
e79c32010d
[lightning] fix js error when there is no geolocation available 2023-09-18 09:44:22 +02:00
wiz
5e4742e51b
Merge branch 'master' into master 2023-09-18 00:51:38 -04:00
wiz
38d30d23e5
Add VA1 mempool.space lightning node pubkeys 2023-09-17 20:57:47 -04:00
wiz
47dd2cbd5d
ops: Add VA1 servers to prod config 2023-09-17 19:56:33 -04:00
nymkappa
6b8db33a9c
[ui] don't add 120px to blockchain component on liquid 2023-09-15 17:11:52 +02:00
nymkappa
14a41b3108
[bisq] sticky header 2023-09-15 16:05:10 +02:00
nymkappa
81d1a809d2
[liquid] sticky header 2023-09-15 16:02:39 +02:00
Mononaut
441b505aa3
Send correct tx conf status in websocket msgs 2023-09-14 23:27:40 +00:00
Mononaut
9b17c16325
Notify address page of removed transactions 2023-09-14 23:25:21 +00:00
Mononaut
c1f0eac8f8
Add REQUEST_TIMEOUT and FALLBACK_TIMEOUT esplora config options 2023-09-14 22:57:37 +00:00
softsimon
83c285e17d
Merge pull request #4199 from mempool/mononaut/fix-diff-skeleton-mouseover
Fix js error on mouseover on difficulty skeleton
2023-09-13 13:26:10 +04:00
softsimon
5fabf892ba
Merge branch 'master' into mononaut/fix-diff-skeleton-mouseover 2023-09-13 13:22:19 +04:00
nymkappa
a000438277
[UI] menu username ellipsis 2023-09-13 09:30:11 +02:00
nymkappa
e3fffd8fb2
[UI] fix menu scroll issue 2023-09-13 09:21:31 +02:00
orangesurf
0ba4e98f52 Replace other instances of tm use for The Mempool Open Source Project 2023-09-12 19:55:00 +01:00
orangesurf
a1b75c3772 Update to reflect registered trademark 2023-09-12 19:45:18 +01:00
orangesurf
0712195de4 Add orangesurf contributor declaration 2023-09-12 19:29:33 +01:00
nymkappa
a133fa8d41
Merge branch 'master' into nymkappa/tx-overflow 2023-09-12 15:12:27 +02:00
nymkappa
4d6c5a7ce7
Merge branch 'master' into nymkappa/no-db-blocks-list 2023-09-12 15:11:59 +02:00
nymkappa
5dfd1a495e
Merge branch 'master' into nymkappa/about-page-profile-image 2023-09-12 14:34:34 +02:00
nymkappa
a463fc289f
Merge branch 'master' into nymkappa/menu 2023-09-12 14:34:28 +02:00
nymkappa
a8e6d9b4b9
Merge branch 'master' into nymkappa/accelerate-preview-login-cta 2023-09-12 14:34:22 +02:00
nymkappa
9ed7e80c44
fix typo post merge 2023-09-12 14:15:29 +02:00
nymkappa
596d55e413
Merge branch 'master' into nymkappa/accel-button 2023-09-12 14:05:56 +02:00
Mononaut
71d4aa9ddd
Add mempool count line to graph 2023-09-08 01:35:02 +09:00
hunicus
fc2df35a42
Merge branch 'master' into hunicus/enterprise-cta-docs 2023-09-07 02:30:12 +09:00
hunicus
d02838fb59
Implement enterprise cta in docs [mobile] 2023-09-07 02:26:41 +09:00
hunicus
572f6bdbac
Fix mining dashboard meta description not showing 2023-09-06 22:42:58 +09:00
hunicus
42a222338b
Add missing meta descriptions 2023-09-06 22:42:33 +09:00
hunicus
d630e7217a
Make enterprise links not relative 2023-09-06 01:42:19 +09:00
nymkappa
0e1a9d8619
[accelerator] blinking cta, polish accel preview 2023-09-03 16:05:12 +03:00
nymkappa
d09668aaa6
[accelerator] login CTA with redirection 2023-09-03 12:20:30 +03:00
wiz
827b0f6ad1
ops: Make install script wait longer for mysql to start 2023-08-31 16:52:56 +09:00
wiz
e8d85613b4
Merge pull request #4224 from mempool/mononaut/failover-timeout
Bump failover timeout to 5s
2023-08-31 02:38:10 +09:00
wiz
ce3b599bab
ops: Add /api/v1/services route for new backend 2023-08-31 02:36:22 +09:00
Mononaut
47a7564cfc
Bump failover timeout to 5s 2023-08-31 02:25:28 +09:00
wiz
93aa08b60d
Merge branch 'master' into nymkappa/menu 2023-08-31 02:02:50 +09:00
nymkappa
4664e55513
[footer] fix positioning when menu component is not loaded 2023-08-30 18:58:21 +02:00
wiz
7744146ef7
Merge pull request #4188 from mempool/nymkappa/menu
User menu + integrated accelerator if available
2023-08-31 01:55:52 +09:00
wiz
9cb72cff31
Set apple-mobile-web-app-capable to yes 2023-08-31 01:35:10 +09:00
nymkappa
98119b3e54
Merge remote-tracking branch 'origin/nymkappa/menu' into nymkappa/menu 2023-08-30 18:32:56 +02:00
nymkappa
f5a3e78cbe
[css] fix spacing at the top x2 2023-08-30 18:32:14 +02:00
wiz
515d2656e7
Set apple-mobile-web-app-status-bar-style to black 2023-08-31 01:23:07 +09:00
wiz
339a21caaa
Merge branch 'master' into nymkappa/menu 2023-08-31 01:01:00 +09:00
wiz
a7c0d33de8
Merge pull request #4219 from mempool/mononaut/accelerator-preview-concept
Accelerator preview concept
2023-08-31 00:58:24 +09:00
Mononaut
d1ef1afc9c
Fix default min/max/default userbid 2023-08-31 00:32:54 +09:00
wiz
bf4a1fcd7a
Merge pull request #4221 from hunicus/add-meta-descriptions
Add meta descriptions
2023-08-31 00:29:46 +09:00
Mononaut
d6044331e1
Hide balance unless insufficient for max cost 2023-08-31 00:15:09 +09:00
wiz
9fdb164b64
Merge branch 'master' into add-meta-descriptions 2023-08-31 00:09:57 +09:00
hunicus
d691bf2714
Add meta titles+descriptions to pages missing them 2023-08-30 23:59:51 +09:00
hunicus
cd366177ba
Add meta descriptions for mempool and liquid 2023-08-30 21:10:59 +09:00
hunicus
6312884234
Add meta descriptions for bisq 2023-08-30 20:47:57 +09:00
hunicus
d1f26f0491
Add meta descriptions to docs page
Also move all meta tag setting to ngDoCheck()
because page titles were not updating when
user switched docs tabs.
2023-08-30 20:47:57 +09:00
Mononaut
ed12e30517
Hide fee diagram on mobile 2023-08-30 17:16:39 +09:00
Mononaut
cb363aca23
Simplify acceleration quote 2023-08-30 16:55:24 +09:00
Mononaut
c753a8e92a
Accelerator fee diagram concept 2023-08-30 16:55:24 +09:00
nymkappa
c44276027c
[auto scroll] fix documention anchor scrolling 2023-08-29 15:51:17 +02:00
nymkappa
91fbd0864b
[css] fix footer position 2023-08-29 14:34:56 +02:00
nymkappa
c2c4047ffd
[css] fix spacing at the top 2023-08-29 14:19:02 +02:00
nymkappa
9427ba96a2
Merge branch 'master' into nymkappa/menu 2023-08-29 10:53:09 +02:00
nymkappa
7c11f0a3da
[tx] fix eta css 2023-08-29 10:50:13 +02:00
softsimon
6780ba82d0
Merge pull request #4213 from mempool/mononaut/live-cpfp-updates
Send cpfp/effective fee rate changes to subscribed websocket clients
2023-08-29 10:17:33 +02:00
softsimon
6d643604d0
Merge branch 'master' into mononaut/live-cpfp-updates 2023-08-29 10:12:55 +02:00
nymkappa
7ae4b451e4
[auth] remove auto logout when imageMd5 no in localstorage 2023-08-29 09:31:18 +02:00
nymkappa
bbd1f088d1
[footer] only show cta if official && ACCELERATOR 2023-08-28 16:20:30 +02:00
nymkappa
3060aecddb
[status badge] reposition a bit higher 2023-08-28 15:57:06 +02:00
nymkappa
7a765cecd9
[footer] only show cta if official 2023-08-28 15:41:45 +02:00
nymkappa
03e9592c79
Merge pull request #4216 from mempool/mononaut/fix-menu-blockchain-offset
Fix bad blockchain offset after services -> dash
2023-08-28 10:56:18 +02:00
Mononaut
c7b89f31dd
Fix bad blockchain offset after services -> dash 2023-08-28 17:42:32 +09:00
nymkappa
899b230760
Merge remote-tracking branch 'origin/nymkappa/menu' into nymkappa/menu 2023-08-28 10:24:52 +02:00
nymkappa
d787ef99c4
[typo] the Mempool Accelerator -> Mempool Accelerator 2023-08-28 10:24:44 +02:00
wiz
043ab008db
Merge branch 'master' into nymkappa/menu 2023-08-28 16:43:03 +09:00
nymkappa
4abc4e96a8
[typo] satss -> sats 2023-08-28 09:34:50 +02:00
nymkappa
7fd8790750
[auth] fix blinking profile picture 2023-08-28 09:29:13 +02:00
nymkappa
8ba4a7b421
[ui] polish x2 2023-08-27 19:17:03 +02:00
nymkappa
78ea9cbd16
[ui] polish x1 2023-08-27 12:52:58 +02:00
softsimon
727937b8ae
Merge pull request #4135 from mempool/hunicus/citadel-link
Change citadel link on about page
2023-08-27 11:42:52 +02:00
nymkappa
5f4add3e22
[tx] fix css when accel not available 2023-08-27 09:07:47 +02:00
wiz
c4f8afbaf7
Merge pull request #4195 from mempool/junderw/rusttoolchain 2023-08-27 13:19:15 +09:00
Mononaut
528877f43f
Send cpfp/effective fee rate changes to subscribed ws clients 2023-08-27 00:30:55 +09:00
nymkappa
a3d61fa525
[accelerator] show payment preview when not logged in 2023-08-26 15:07:05 +02:00
nymkappa
c0308fbc0d
Merge branch 'master' into nymkappa/menu 2023-08-26 14:01:07 +02:00
softsimon
24696d0408
Merge pull request #4183 from mempool/mononaut/attitude-adjustment
Don't overload core with mempool tx requests
2023-08-26 12:28:26 +02:00
nymkappa
b9838fda8d
Merge branch 'master' into mononaut/attitude-adjustment 2023-08-26 11:48:21 +02:00
nymkappa
726bd51abb
[debug] update versioning print 2023-08-26 11:27:45 +02:00
nymkappa
1fe08d1234
[accelerator] fix overflow in tx page integrated accel 2023-08-26 10:05:04 +02:00
nymkappa
1ca136fa75
Merge pull request #4212 from mempool/nymkappa/accelerate-preview
Nymkappa/accelerate preview
2023-08-26 09:53:29 +02:00
nymkappa
fcecbe4967
[tx] integrated accelerator 2023-08-26 09:52:55 +02:00
hunicus
d42a3f74ec
Add description to index html and seo service 2023-08-26 14:18:55 +09:00
wiz
dc44f1b618
ops: Fix WebGL for unfurler 2023-08-26 04:40:12 +09:00
wiz
0fde6dd908
ops: Bump prod NodeJS version to v20.5.1 2023-08-25 23:34:50 +09:00
wiz
4eb494baec
ops: Increase FreeBSD bitcoin node shutdown timeout to 600 2023-08-25 23:29:03 +09:00
wiz
c1b2f1f2c7
ops: Disable tor in prod install script 2023-08-25 23:24:51 +09:00
wiz
a6d2887847
Merge branch 'master' into nymkappa/menu 2023-08-25 23:13:32 +09:00
nymkappa
f9895a492c
Merge branch 'nymkappa/menu' into nymkappa/accelerate-preview 2023-08-24 18:23:30 +02:00
nymkappa
ac56f70f6f
Merge pull request #4176 from mempool/nymkappa/fix-eta
[tx] fix eta css with accelerate button
2023-08-24 18:21:27 +02:00
Mononaut
f295392dca
Record purging rate in statistics 2023-08-24 22:04:41 +09:00
nymkappa
c89e283c8e
[tx] start adding acceleration preview 2023-08-24 14:17:31 +02:00
nymkappa
3aa938a94b
Merge pull request #4202 from mempool/mononaut/dynamic-width-chain
Dynamic width chain
2023-08-24 10:42:46 +02:00
Mononaut
20fff97804
restore window resize listener 2023-08-24 17:28:21 +09:00
Mononaut
d1f7026804
hambuger 2023-08-24 17:28:19 +09:00
Mononaut
2da31c4d4a
Slide blockchain to compensate for menu 2023-08-24 17:27:31 +09:00
Mononaut
975ba653a2
Dynamically resize blockchain to fit container 2023-08-24 17:27:31 +09:00
softsimon
f12fabe030
Merge pull request #4206 from mempool/dependabot/npm_and_yarn/frontend/frontend-angular-dependencies-f1c021e5b3
Bump the frontend-angular-dependencies group in /frontend with 12 updates
2023-08-24 10:17:12 +02:00
dependabot[bot]
25d75efa09
Bump the frontend-angular-dependencies group
Bumps the frontend-angular-dependencies group in /frontend with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [@angular-devkit/build-angular](https://github.com/angular/angular-cli) | `16.1.4` | `16.2.0` |
| [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) | `16.1.5` | `16.2.2` |
| [@angular/cli](https://github.com/angular/angular-cli) | `16.1.4` | `16.2.0` |
| [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) | `16.1.5` | `16.2.2` |
| [@angular/compiler](https://github.com/angular/angular/tree/HEAD/packages/compiler) | `16.1.5` | `16.2.2` |
| [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) | `16.1.5` | `16.2.2` |
| [@angular/forms](https://github.com/angular/angular/tree/HEAD/packages/forms) | `16.1.5` | `16.2.2` |
| [@angular/localize](https://github.com/angular/angular) | `16.1.5` | `16.2.2` |
| [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) | `16.1.5` | `16.2.2` |
| [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) | `16.1.5` | `16.2.2` |
| [@angular/platform-server](https://github.com/angular/angular/tree/HEAD/packages/platform-server) | `16.1.5` | `16.2.2` |
| [@angular/router](https://github.com/angular/angular/tree/HEAD/packages/router) | `16.1.5` | `16.2.2` |


Updates `@angular-devkit/build-angular` from 16.1.4 to 16.2.0
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/16.1.4...16.2.0)

Updates `@angular/animations` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/animations)

Updates `@angular/cli` from 16.1.4 to 16.2.0
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/16.1.4...16.2.0)

Updates `@angular/common` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/common)

Updates `@angular/compiler` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/compiler)

Updates `@angular/core` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/core)

Updates `@angular/forms` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/forms)

Updates `@angular/localize` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/compare/16.1.5...16.2.2)

Updates `@angular/platform-browser` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/platform-browser)

Updates `@angular/platform-browser-dynamic` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/platform-browser-dynamic)

Updates `@angular/platform-server` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/platform-server)

Updates `@angular/router` from 16.1.5 to 16.2.2
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/16.2.2/packages/router)

---
updated-dependencies:
- dependency-name: "@angular-devkit/build-angular"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/animations"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/cli"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/common"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/compiler"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/forms"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/localize"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/platform-browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/platform-browser-dynamic"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/platform-server"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
- dependency-name: "@angular/router"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-angular-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-24 02:53:59 +00:00
nymkappa
c8100712e8
[footer] polish breakpoints in /services/* 2023-08-23 16:17:07 +02:00
nymkappa
a7b2c39f51
[footer] re-add missing tagline 2023-08-23 15:02:36 +02:00
nymkappa
3d9fa5076b
Merge remote-tracking branch 'origin/nymkappa/menu' into nymkappa/menu 2023-08-23 14:40:29 +02:00
nymkappa
9fa715e403
[footer] re-add main CTA with better design 2023-08-23 14:40:16 +02:00
nymkappa
9ee11b64e9
[menu] disable hamburger icon when not logged in 2023-08-23 14:39:58 +02:00
nymkappa
8c90d4ba98
Merge branch 'master' into nymkappa/menu 2023-08-23 12:21:23 +02:00
nymkappa
b333c211f7
[menu] fix non clickable hamburger when logged out 2023-08-23 11:50:47 +02:00
Mononaut
ab8386adea
Set no-cache on unfurl failure fallback response 2023-08-23 02:10:57 +09:00
wiz
b180fe694f
ops: Tweak nginx config for gone paths and render expires 2023-08-23 01:09:11 +09:00
Mononaut
b7474b29e4
Use symlink to avoid duplicate fallback images 2023-08-23 00:34:55 +09:00
wiz
6c7d33f681
Merge pull request #4203 from mempool/mononaut/fix-unfurl-fallbacks
Fix unfurl fallback img routes
2023-08-23 00:31:48 +09:00
Mononaut
6946bc9da9
Fix unfurl fallback img routes 2023-08-23 00:11:24 +09:00
nymkappa
8fb566858f
[css] make sure <main> cannot be larger than viewport 2023-08-22 15:44:32 +02:00
nymkappa
379e1470fd
[menu] fix menu close trigger, fix menu scroll on mobile safari 2023-08-22 14:59:23 +02:00
nymkappa
c5f0608b46
[debug] footer version same color, inline version in about page 2023-08-22 14:51:05 +02:00
wiz
063d7e96a1
Merge pull request #4198 from mempool/mononaut/unfurler-fixes
More unfurler fixes
2023-08-22 20:26:03 +09:00
nymkappa
7544357826
[ui] redesign UX for navbar using sticky 2023-08-22 08:35:10 +02:00
nymkappa
5005817529
[ui] tweak profile image 2023-08-21 23:18:55 +02:00
nymkappa
bfc3fbe397
[ui] hide the navbar on scroll 2023-08-21 22:19:05 +02:00
nymkappa
30be7e0f7a
[ui] redesign UX for navbar 2023-08-21 22:08:25 +02:00
junderw
18eb6600b0
Fix README to include workaround for legacy versions of npm 2023-08-21 12:53:20 -07:00
junderw
88c0d04c18
Match CI toolchain with rust-toolchain 2023-08-21 12:53:20 -07:00
Mononaut
8ea7bb907c
Fix js error on mouseover on difficulty skeleton 2023-08-22 02:40:00 +09:00
Mononaut
0d2df72621
Proxy unfurler resources to local instance 2023-08-22 02:16:46 +09:00
Mononaut
91c0a3e689
More unfurler logging 2023-08-22 02:16:36 +09:00
junderw
b595002c25
Revert "Add a missing [workspace] tag in rust-gbt Cargo to build in git"
This reverts commit fadc46f3b5a9a61ece9f9872e8de74b7a77c1f19.
2023-08-21 10:01:40 -07:00
Mononaut
9ba7ab9975
More robust webgl handling 2023-08-22 00:07:44 +09:00
softsimon
7674bee5ad
Animating menu 2023-08-21 17:06:12 +02:00
nymkappa
0ee28a335f
[header] show anon image if user did not set a picture (to improve later) 2023-08-21 17:04:17 +02:00
nymkappa
285485c69e
[about page] /api/v1/about-page -> /api/v1/services/sponsors 2023-08-21 15:27:55 +02:00
nymkappa
b8222bff43
[auth] fix auth not being cleared after logout 2023-08-21 15:01:31 +02:00
nymkappa
3321ae0f1f
[debug] always show git hashes in footer 2023-08-21 11:36:40 +02:00
nymkappa
4010047344
Merge remote-tracking branch 'origin/nymkappa/menu' into nymkappa/menu 2023-08-21 11:20:20 +02:00
nymkappa
ce290a449c
[debug] show more git hashes in about and footer 2023-08-21 11:19:54 +02:00
Jonathan Underwood
b9c151f549
Update rust-toolchain 2023-08-21 17:47:58 +09:00
nymkappa
2ff3e4acb9
Merge branch 'master' into nymkappa/menu 2023-08-21 09:14:24 +02:00
wiz
ead32a4a65
Merge pull request #4194 from TheBlueMatt/msrv
Drop MSRV to 1.63
2023-08-21 16:06:13 +09:00
nymkappa
a1e2d2fd74
[debug] SERVICES -> GIT_COMMIT_HASH_MEMPOOL_SPACE in env 2023-08-21 08:57:27 +02:00
Matt Corallo
122a721d7a sign cla 2023-08-21 05:04:33 +00:00
Matt Corallo
6088fffc09 Drop MSRV to 1.63
Debian bookworm ships with 1.63, and since the change is trivial,
there's little reason to not support people running mempool on
Debian.
2023-08-21 04:03:37 +00:00
Matt Corallo
fadc46f3b5 Add a missing [workspace] tag in rust-gbt Cargo to build in git
If cargo detects its being run in a git tree, it looks for a
top-level `Cargo.toml`. When failing to find one, it errors out,
saying "current package believes it's in a workspace when it's not."

Instead, we add a `[workspace]` tag to let cargo know that rust-gbt
is not, in fact, in a rust workspace.
2023-08-21 04:00:52 +00:00
nymkappa
e82b43e340
[footer] fix footer sizing in /services 2023-08-20 22:54:12 +02:00
nymkappa
22886cb32d
[debug] show services backend version in /services global footer, show services global frontend build in /about 2023-08-20 22:53:33 +02:00
nymkappa
ef554ad67b
Merge branch 'master' into nymkappa/menu 2023-08-20 08:21:38 +02:00
nymkappa
b64b6fb3c7
[menu] fix json.parse on missing auth in localstorage 2023-08-20 08:11:55 +02:00
wiz
8e73e76312
ops: Tweak proxy_cache_valid time for unfurler/slurper cache 2023-08-20 02:36:34 +09:00
wiz
9d978ead6d
ops: Set expires headers for unfurler/slurper responses 2023-08-20 00:01:22 +09:00
wiz
655eb31107
ops: Tweak nginx cache valid time for unfurler/slurper 2023-08-19 23:27:08 +09:00
wiz
15bd7bc068
Merge pull request #4187 from mempool/mononaut/unfurler-debugging
Unfurler debugging
2023-08-19 23:23:53 +09:00
wiz
65847547b9
ops: Tweak nginx cache for slurper 2023-08-19 23:23:28 +09:00
Mononaut
ed9d31686e
Add cluster/tab to unfurler logs 2023-08-19 21:07:10 +09:00
Mononaut
7f2a459575
Fix SSR puppeteer page initialization 2023-08-19 21:05:28 +09:00
Mononaut
126e87a746
More more verbose unfurler logs 2023-08-19 19:35:52 +09:00
Mononaut
2819cea509
Reduce core mempool tx sync to 8 concurrent requests 2023-08-19 19:02:30 +09:00
junderw
2a8a403da7
Use p-limit to limit concurrent requests 2023-08-19 18:53:32 +09:00
Mononaut
3bda5537d7
More verbose unfurler logs 2023-08-19 18:50:57 +09:00
Mononaut
df8b6cd53c
Fix unfurler resource proxying 2023-08-19 18:40:11 +09:00
Mononaut
e4fcadf39b
More verbose comments on $getMempoolTransactionsExtended 2023-08-19 04:47:19 +09:00
nymkappa
c4f2f4ca66
[menu] handle logout without reload, show signin in sidebar when not logged in 2023-08-18 18:33:09 +02:00
nymkappa
0c1221dc07
[menu] only show on official mainnet with accelerator enabled 2023-08-18 18:12:45 +02:00
nymkappa
d1c9e8b56e
[menu] show username at the top of the menu 2023-08-18 18:04:40 +02:00
Mononaut
1b2122cd35
Don't overload core with mempool tx requests 2023-08-19 01:02:27 +09:00
nymkappa
5aff2c74e6
[menu] show hamburger when logged out, fix menu scrolling on small screen 2023-08-18 17:56:07 +02:00
softsimon
f36ee36576
Merge pull request #4180 from mempool/junderw/fix-nbits-calculations
Fix: calcBitsDifference regtest fix
2023-08-18 17:27:25 +02:00
junderw
08a09bf371
Fix: calcBitsDifference regtest fix 2023-08-17 23:57:20 -07:00
nymkappa
1bdbb1b908
[menu] logout is a special item 2023-08-17 22:13:06 +02:00
wiz
f1f97320df
ops: Fix install script crash for removed electrs-start-liquidtestnet 2023-08-18 03:51:09 +09:00
softsimon
52cc3022c6
Merge pull request #4146 from mempool/mononaut/fix-mempool-blocks-stacking
Fix stacked mempool blocks layout & width
2023-08-17 19:17:19 +02:00
nymkappa
91e3943a74
[menu] call services api to fetch user menu 2023-08-17 18:59:27 +02:00
nymkappa
23b871631a
[menu] write menu component with hardcoded values 2023-08-17 18:51:39 +02:00
wiz
e975bacaa1
Merge branch 'master' into mononaut/fix-mempool-blocks-stacking 2023-08-17 23:21:00 +09:00
nymkappa
ab911d5c9e
[tx] fix eta css with accelerate button 2023-08-17 14:28:33 +02:00
wiz
2c9e20dd87
ops: Always start xorg for unfurler even if no GPU detected 2023-08-17 18:38:17 +09:00
wiz
487d5de0ef
Merge pull request #4152 from mempool/mononaut/unfurler-mode-headers
Select unfurl mode with route prefix
2023-08-17 16:48:26 +09:00
wiz
1653f003bc
Merge branch 'master' into mononaut/unfurler-mode-headers 2023-08-17 16:39:30 +09:00
softsimon
21ea6f82fc
Merge pull request #4134 from mempool/knorrium/dependabot_frontend_groups
Add frontend dependency groups to dependabot
2023-08-17 06:22:11 +02:00
softsimon
ca682d5879
Merge pull request #4164 from mempool/knorrium/fix_docker_start
Fix Docker start script and unit test
2023-08-17 06:20:39 +02:00
Felipe Knorr Kuhn
cd3b11407b
Merge branch 'master' into knorrium/dependabot_frontend_groups 2023-08-16 21:15:28 -07:00
Felipe Knorr Kuhn
004208e9c8
Fix linting 2023-08-16 16:16:04 -07:00
Felipe Knorr Kuhn
44d2ea1263
Fix Docker config unit test to work with array values 2023-08-16 16:08:45 -07:00
Felipe Knorr Kuhn
27797b8f1d
Add missing ESPLORA FALLBACK vars to the start script 2023-08-16 16:08:01 -07:00
Felipe Knorr Kuhn
9aedccdb32
Remove trailing comma on the Docker JSON 2023-08-16 16:07:27 -07:00
Mononaut
b1e1601ccf
Switch unfurl proxy header to url prefix 2023-08-16 21:55:03 +09:00
hunicus
1dd66e6695
Add bimi svg 2023-08-16 12:43:36 +09:00
wiz
681d4bffd7
Merge branch 'master' into mononaut/unfurler-mode-headers 2023-08-16 04:07:35 +09:00
wiz
8f2a2d1c81
ops: Add delay before warm cache loop begins 2023-08-16 04:03:17 +09:00
wiz
0bfd01e732
ops: Add unfurl/slurp queries to nginx warm cache script 2023-08-16 03:51:10 +09:00
wiz
83a92a7e3a
ops: Add nginx config for /unfurler and /slurper prefixes 2023-08-16 03:27:09 +09:00
softsimon
dbdbe29281
Merge pull request #4153 from mempool/hunicus/rm-luminex
Remove luminex from about page
2023-08-14 21:30:44 +01:00
hunicus
a2f67990b5
Remove luminex from about page 2023-08-15 04:24:34 +09:00
Mononaut
5511795fbb
Fix mempool slide on page change 2023-08-14 19:34:31 +09:00
Mononaut
13f6f9f9e5
Select unfurl mode with X-Unfurl-Type header 2023-08-14 18:05:09 +09:00
Mononaut
8c21d106fc
Fix stacked mempool blocks layout & width 2023-08-14 02:37:46 +09:00
wiz
e9165e5dd8
Merge pull request #4107 from mempool/mononaut/unfurler-fixes
Quick fixes for unfurler/seo renderer
2023-08-13 15:40:22 +09:00
hunicus
0a918b8fa8
Add enterprise note to backend readme 2023-08-13 13:04:58 +09:00
hunicus
102579baa9
Add enterprise note to production readme 2023-08-13 13:00:47 +09:00
hunicus
b3f90e2981
Add mempool enterprise note to top-level readme 2023-08-13 12:55:14 +09:00
wiz
2e8a9c75ee
Merge pull request #4138 from mempool/mononaut/accelerate-mainnet-only
Hide accelerate CTA on non-mainnet networks
2023-08-12 17:19:46 +09:00
hunicus
a23881e62c
Implement enterprise cta in docs [desktop] 2023-08-11 17:11:05 +09:00
Mononaut
e8e245cc75
Hide accelerate CTA on non-mainnet networks 2023-08-10 20:27:49 +09:00
nymkappa
6199216c54
use new services api to fetch chads profile image as well 2023-08-10 18:08:30 +09:00
nymkappa
b988a4c526
use new services api to fetch chad/whale profile image 2023-08-10 18:01:05 +09:00
hunicus
45ba50e82c
Change citadel link on about page 2023-08-10 16:26:07 +09:00
wiz
b6da116dfc
Merge branch 'master' into mononaut/unfurler-fixes 2023-08-10 16:02:48 +09:00
wiz
a9e92d0593
Merge pull request #4121 from mempool/hunicus/footer-refinement-exp
Refine footer design/layout
2023-08-10 16:02:20 +09:00
wiz
db90e77a32
Merge branch 'master' into hunicus/footer-refinement-exp 2023-08-10 15:51:07 +09:00
Felipe Knorr Kuhn
c2cad416e2
Add frontend dependency groups to dependabot 2023-08-09 22:33:59 -07:00
wiz
7191ca6915
Merge pull request #4133 from mempool/knorrium/dependabot_tweak 2023-08-10 13:59:19 +09:00
Felipe Knorr Kuhn
fb3cb127b0
Set dependabot to fix the package.json file in addition to the lock file 2023-08-09 21:51:11 -07:00
wiz
9f007d78f8
ops: Fix fonts config from installer 2023-08-09 23:44:03 +09:00
wiz
c5bdcec164
ops: Add delay before starting bitcoind/elementsd/electrs 2023-08-09 23:43:49 +09:00
hunicus
d4f9600ff1
Make footer refinements responsive 2023-08-09 16:42:16 +09:00
softsimon
8b260ce21c
Merge pull request #4108 from mempool/simon/disable-historical-testnets
Handle historical price API calls when using any testnet
2023-08-09 10:51:58 +04:00
nymkappa
89be841e64
[accelerator] hide accelerate button if already accelerating 2023-08-08 17:10:59 +09:00
Stephan Oeste
fc73dcc344
Fixing proxy_buffer_size error nginx.conf 2023-08-07 20:08:30 +02:00
softsimon
8d7c04bcda
Merge pull request #4111 from mempool/nymkappa/mining-pool-api
[mining] add /api/v1/pools API to list mining pools
2023-08-07 14:33:58 +09:00
nymkappa
e4c17e5011
[mining] add /api/v1/mining/pools API to list mining pools 2023-08-07 12:16:01 +09:00
softsimon
b03c3745a2
Merge pull request #4110 from mempool/knorrium/backend_unit_test_tweaks
Backend unit test tweaks
2023-08-07 12:14:01 +09:00
softsimon
41eecfa7df
Merge pull request #4095 from mempool/mononaut/refactor-address-tracking
Refactor websocket address tracking
2023-08-07 12:13:07 +09:00
Mononaut
38e9021e8c
simplify scriptpubkey tracking 2023-08-07 10:43:42 +09:00
Felipe Knorr Kuhn
adc46b6ae5
Update Github workflow to run with the CI flag 2023-08-06 08:01:28 -07:00
Felipe Knorr Kuhn
8912bac0ac
Add test:ci task 2023-08-06 08:00:49 -07:00
Felipe Knorr Kuhn
e4fca3c2b7
Log verbose Docker checks only when running on CI 2023-08-06 08:00:30 -07:00
hunicus
2855fff702
Make basic footer refinement
TODO: responsiveness
2023-08-06 16:16:16 +09:00
Mononaut
8dbf9f29cf
Send unfurler fallback imgs directly 2023-08-06 15:49:11 +09:00
softsimon
cbebbd40f1
Handle price API in the frontend when testnet 2023-08-06 15:41:57 +09:00
Mononaut
9aa778e44e
reboot unfurler periodically 2023-08-06 13:47:38 +09:00
Mononaut
6fc645a454
Remove unfurler soft404 debug spam 2023-08-06 13:47:20 +09:00
softsimon
b977c4332f
Merge pull request #4076 from mempool/knorrium/update_cypress_deps
Update Cypress deps
2023-08-06 13:06:46 +09:00
Felipe Knorr Kuhn
a79e214a6a
Merge branch 'master' into knorrium/update_cypress_deps 2023-08-05 14:24:24 -07:00
wiz
6f11defea2
Merge pull request #4103 from mempool/ops/enable-prod-replication
Enable audit replication for production
2023-08-05 22:10:10 +09:00
wiz
53ba48de9f
ops: Enable replication for production 2023-08-05 21:57:43 +09:00
wiz
3fb097bfff
Merge pull request #4099 from mempool/mononaut/esplora-failover
new health-check based esplora failover mechanism
2023-08-05 20:59:30 +09:00
Mononaut
9138c3b676
always switch back to local if available 2023-08-05 20:39:02 +09:00
softsimon
2ceafcacc6
Disable historical prices on testnets 2023-08-05 20:29:00 +09:00
Mononaut
85935d8f90
allow protocol, port & path in fallback urls 2023-08-05 20:06:19 +09:00
Mononaut
ae5e1e6d29
Fix failover debug prints 2023-08-05 19:55:33 +09:00
softsimon
bcfc704f7a
Merge pull request #4102 from mempool/hunicus/footer-space
Add space below logo in footer
2023-08-05 19:37:41 +09:00
Mononaut
e512feef74
Add debug prints, fix POST request 2023-08-05 19:25:00 +09:00
softsimon
b11e31e54b
Merge branch 'master' into knorrium/update_cypress_deps 2023-08-05 19:13:19 +09:00
hunicus
b1ed05e95e
Add space below logo in footer 2023-08-05 19:06:25 +09:00
Mononaut
2095f90262
new health-check based esplora failover mechanism 2023-08-05 19:02:46 +09:00
wiz
794a4ded9c
Merge pull request #3169 from mempool/mononaut/seo-ssr
dynamically render search crawler requests
2023-08-05 18:34:45 +09:00
wiz
cf4f779e59
Merge remote-tracking branch 'origin/master' into mononaut/seo-ssr 2023-08-05 18:23:12 +09:00
softsimon
c1c69d7272
Merge pull request #4096 from mempool/mononaut/speed-up-rbf-detection
Speed up RBF detection
2023-08-05 17:37:50 +09:00
softsimon
a4e7219214
Adding RBF tests 2023-08-05 17:20:07 +09:00
softsimon
af8e5b60ee
Merge pull request #4098 from mempool/fix/liquid-bits-calc
Fix: Difficulty calculations for Liquid networks must be NaN
2023-08-05 17:10:08 +09:00
Jonathan Underwood
6ff7a59bfb
Merge branch 'master' into fix/liquid-bits-calc 2023-08-05 00:00:02 -07:00
softsimon
95341806c3
Merge pull request #4100 from mempool/feat/rust-build-revert
Feature: Build Rust during build script AND install
2023-08-05 15:58:16 +09:00
junderw
e994aac162
Feature: Build Rust during build script AND install 2023-08-04 23:40:10 -07:00
junderw
ea926660fe
Fix: Difficulty calculations for Liquid networks must be NaN 2023-08-04 20:42:14 -07:00
nymkappa
223f6df371
fix 'large' class trigger 2023-08-05 10:52:11 +09:00
nymkappa
869a879676
Merge branch 'master' into nymkappa/tx-overflow 2023-08-05 10:10:01 +09:00
nymkappa
5959c426f3
Merge branch 'master' into nymkappa/tx-overflow 2023-08-05 10:09:22 +09:00
Felipe Knorr Kuhn
33a6f81265
Merge branch 'master' into knorrium/update_cypress_deps 2023-08-04 08:51:00 -07:00
Felipe Knorr Kuhn
367bcbda83
Update cypress action to node 18 2023-08-04 08:40:15 -07:00
Felipe Knorr Kuhn
e3114144e1
Tweak imports again 2023-08-04 08:36:05 -07:00
Felipe Knorr Kuhn
da4f891e2f
Use full path for import 2023-08-04 08:23:29 -07:00
Felipe Knorr Kuhn
e4a43fcca5
Update tsconfig for the tests 2023-08-04 08:19:19 -07:00
Mononaut
3ec676ca90
Speed up RBF detection 2023-08-04 19:11:49 +09:00
softsimon
9da9c2750d
Merge pull request #4064 from mempool/mononaut/better-mobile-difficulty-tooltip
Improve difficulty tooltip display on mobile
2023-08-04 18:41:07 +09:00
softsimon
d2641cc927
Merge pull request #4085 from mempool/mononaut/fast-mempool-sync
use bulk mempool post api to batch mempool update requests
2023-08-04 17:26:01 +09:00
softsimon
b026f5a481
Removing console log 2023-08-04 15:55:22 +09:00
softsimon
45ddab519d
Merge pull request #4093 from mempool/fix/packaging-rust-gbt
Fix: Rust-GBT packaging needs fixing
2023-08-04 15:52:20 +09:00
junderw
0535e8c5f9
Fix: Rust-GBT packaging needs fixing 2023-08-04 15:45:34 +09:00
softsimon
b4ec69ce7a
Merge pull request #4058 from mempool/mononaut/prices-api
Current fiat prices API
2023-08-04 15:39:35 +09:00
wiz
989e4832cc
Merge pull request #3995 from mempool/mononaut/acceleration-viz
Acceleration visualization
2023-08-04 15:34:02 +09:00
softsimon
0d777c24c5
Merge pull request #4090 from mempool/mononaut/missing-latest-replacements
resume tracking subscriptions after websocket reconnect
2023-08-04 15:33:33 +09:00
mononaut
101de3bac7
Fix PRICE_UPDATES_PER_HOUR docker default
Co-authored-by: nymkappa <9780671+nymkappa@users.noreply.github.com>
2023-08-04 15:23:55 +09:00
wiz
c3f83f74ce
Merge branch 'master' into mononaut/acceleration-viz 2023-08-04 15:10:02 +09:00
wiz
39e36936bc
Merge pull request #3795 from mempool/nymkappa/accelerator-soft-launch
[accelerator] prepare soft launch
2023-08-04 14:31:39 +09:00
nymkappa
11248821c5
hide sponsor buttons 2023-08-04 14:30:40 +09:00
Mononaut
3074d814e7
precompute address transactions for websocket msg loop 2023-08-04 13:59:49 +09:00
softsimon
22aa45f055
Merge pull request #4094 from mempool/dependabot/npm_and_yarn/backend/mysql2-3.6.0
Bump mysql2 from 3.5.2 to 3.6.0 in /backend
2023-08-04 13:56:27 +09:00
softsimon
07f95acc29
Base expiry on update frequency 2023-08-04 13:26:19 +09:00
softsimon
2892bfa1d8
Fixing cycle reset at top of the hour 2023-08-04 13:23:09 +09:00
dependabot[bot]
356ab9c6ae
Bump mysql2 from 3.5.2 to 3.6.0 in /backend
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.5.2 to 3.6.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.5.2...v3.6.0)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 02:40:58 +00:00
nymkappa
851d030878
[about] re-enable two sponsor buttons 2023-08-04 10:23:15 +09:00
dni ⚡
f7ec5ca82e
Update liquid-master-page.component.html
ngIf for BISQ_ENABLED was missing
2023-08-03 17:47:30 +02:00
softsimon
813f3dc09d
Updating config sample 2023-08-03 18:26:24 +09:00
softsimon
172c77328b
Changing setting to per hour 2023-08-03 18:22:52 +09:00
softsimon
b213f43a91
Erasing unused PRICE_DATA_SERVER from readme 2023-08-03 17:43:03 +09:00
softsimon
284d39baa8
Update price at least every hour 2023-08-03 17:43:02 +09:00
softsimon
af4d0b4d3f
Allow priceUpdater to run without storing to database 2023-08-03 17:43:02 +09:00
softsimon
83a487ecae
Setting fixture to fixed number 2023-08-03 17:43:02 +09:00
softsimon
bcb3b39bd8
Updating start.sh and README 2023-08-03 17:43:02 +09:00
softsimon
ae59f95ba9
Refactoring price update config. Fixing last price time. 2023-08-03 17:43:02 +09:00
softsimon
b2d4000b2d
Update backend/src/api/prices/prices.routes.ts 2023-08-03 17:43:02 +09:00
softsimon
864d9239ce
Update backend/src/__fixtures__/mempool-config.template.json 2023-08-03 17:43:02 +09:00
Mononaut
09c23b1241
configurable price update frequency 2023-08-03 17:43:02 +09:00
Mononaut
22665f149b
add /prices api endpoint 2023-08-03 17:43:01 +09:00
nymkappa
683d775c7e
Merge branch 'master' into nymkappa/no-db-blocks-list 2023-08-03 16:50:19 +09:00
Mononaut
cb5b96485c
resume tracking subscriptions after websocket reconnect 2023-08-03 16:17:17 +09:00
nymkappa
4ee703325a
[footer] polish cta using update footer with logo 2023-08-03 16:12:59 +09:00
Mononaut
3d6a8a501d
limit mouse events to difficulty bar 2023-08-03 15:51:09 +09:00
nymkappa
0111d8806b
Merge branch 'mononaut/acceleration-viz' into nymkappa/accelerator-soft-launch 2023-08-03 15:43:28 +09:00
Mononaut
d06fe83bd9
Improve difficulty tooltip display on mobile 2023-08-03 15:36:36 +09:00
nymkappa
8936273aeb
Merge branch 'master' into mononaut/acceleration-viz 2023-08-03 15:28:56 +09:00
nymkappa
99a60ab22a
add ACCELERATOR frontend setting 2023-08-03 15:20:48 +09:00
nymkappa
7ec5d8265f
toggle header visibility in master page component 2023-08-03 15:20:48 +09:00
nymkappa
1458e89f3a
[footer] main cta points to /accelerator 2023-08-03 15:20:48 +09:00
nymkappa
5846862d55
[footer] dynamic CTA button based on login status 2023-08-03 15:20:48 +09:00
nymkappa
727d170c9c
[tx] add accel shortcut into transaction component 2023-08-03 15:20:47 +09:00
nymkappa
6c2c62ba2e
[lightning] claim your node button 2023-08-03 15:20:47 +09:00
nymkappa
f2ae858097
[sponsors] show profile by tiers on about page 2023-08-03 15:20:19 +09:00
nymkappa
d236d89717
[mining] send pool unique id in /pools API 2023-08-03 15:08:14 +09:00
softsimon
cac2a984ab
Merge pull request #4089 from andrewtoth/andrewtoth/sig
Accept CLA
2023-08-03 12:59:18 +09:00
andrewtoth
e0b2ffa527
Accept CLA 2023-08-03 03:46:15 +00:00
softsimon
2c7919ace6
Merge pull request #4065 from mempool/mononaut/log-scale-fee-graph
Use log10 scale for projected block fee graph
2023-08-02 18:35:46 +09:00
wiz
e9cd41722b
Merge pull request #4081 from mempool/mononaut/fix-null-coinbase-fee
fix null coinbase fees in block summary
2023-08-02 16:05:09 +09:00
Mononaut
ca0c6b5e6e
use bulk mempool/txs post api to batch mempool update requests 2023-08-02 15:05:27 +09:00
softsimon
b1d5ba890f
Merge pull request #4084 from mempool/hunicus/30-footer-yacht
Show tool list when no other networks available in footer
2023-08-02 14:44:19 +09:00
softsimon
9373fb3dd1
Minor ngIf else template optimization 2023-08-02 14:34:59 +09:00
softsimon
f8ca53fdf0
Merge pull request #4078 from mempool/fix/difficulty-calc
Fix: Use bits to calculate difficulty instead of floating points
2023-08-02 13:08:55 +09:00
hunicus
ddd5baf44e Show tool list when no other networks available 2023-08-02 12:46:59 +09:00
mononaut
b365ad3ba4
Merge branch 'master' into fix/difficulty-calc 2023-08-02 11:00:32 +09:00
softsimon
63993b01aa
Merge pull request #4083 from mempool/mononaut/fix-partial-index-difficulty
fix partially indexed difficulty bug
2023-08-01 18:49:45 +09:00
Mononaut
ab784cede2
fix partially indexed difficulty bug 2023-08-01 18:41:48 +09:00
wiz
648a732352
Merge pull request #3853 from mempool/hunicus/accelerate-disclaimer
Replace disclaimer text regarding tx acceleration
2023-08-01 18:36:41 +09:00
wiz
e5b8b73077
Merge pull request #4080 from mempool/hunicus/30-footer
Add graphic to footer + simplify left footer column
2023-08-01 18:34:17 +09:00
hunicus
8fe78fa12b
Improve conditions for showing network links 2023-08-01 18:08:49 +09:00
hunicus
f166cb7974
Remove commented/inactive social links 2023-08-01 17:54:09 +09:00
hunicus
d3532eb734
Improve show conditions for explore links 2023-08-01 17:54:09 +09:00
hunicus
4cb379bb0f
Change more networks to networks 2023-08-01 17:54:09 +09:00
hunicus
316028fe66
Add space below tagline 2023-08-01 17:54:09 +09:00
Mononaut
543357f1db
fix null coinbase fees in block summary 2023-08-01 17:33:03 +09:00
wiz
c93f52f3a8
Merge branch 'master' into hunicus/30-footer 2023-08-01 16:54:48 +09:00
junderw
9bf334a22d
Fix: Use bits to calculate difficulty instead of floating points 2023-08-01 00:52:45 -07:00
softsimon
22e57ae95c
Merge pull request #4079 from mempool/simon/mempool-break-poll-limit
Base mempool break limit of current poll rate
2023-08-01 16:00:42 +09:00
hunicus
a1af41804a
Implement wiz footer suggestions 2023-08-01 16:00:16 +09:00
softsimon
b0080a5859
Base mempool break limit of current poll rate 2023-08-01 15:55:03 +09:00
wiz
5c36692799
Merge pull request #3973 from mempool/ops/move-electrs-scripts-to-electrs-repo
ops: Move electrs scripts to mempool/electrs repo
2023-08-01 15:38:46 +09:00
wiz
97877053bf
Merge pull request #4068 from mempool/mononaut/electrs-blocks
Get blocks from electrs again
2023-08-01 15:33:13 +09:00
softsimon
f9a44a5fbb
Merge pull request #4074 from mempool/fix_rust_gbt_typo
Fix rust gbt docker  typo
2023-08-01 14:14:56 +09:00
softsimon
6b5bcaa279
Merge pull request #4077 from bguillaumat/patch-1
Add bguillaumat.txt to contributors
2023-08-01 14:07:18 +09:00
wiz
8c396978a8
Merge branch 'master' into mononaut/electrs-blocks 2023-08-01 13:54:05 +09:00
wiz
a51d2a6aec
Merge pull request #4071 from mempool/mononaut/fast-indexing
Fast indexing
2023-08-01 13:53:56 +09:00
Mononaut
a863c17408
Fix difficulty indexing db queries to return bits 2023-08-01 13:28:56 +09:00
Mononaut
0924bb6ac0
Use bits to detect difficulty adjustments, not difficulty 2023-08-01 13:28:56 +09:00
Mononaut
910e67ff36
Get blocks from electrs again 2023-08-01 13:28:56 +09:00
Bastien Guillaumat
aa17f8203c
Add bguillaumat.txt to contributors 2023-08-01 03:13:58 +02:00
Felipe Knorr Kuhn
a23cd5ad29
Update Cypress deps 2023-07-31 14:44:59 -07:00
Felipe Knorr Kuhn
b7b6548cce
Fix RUST GBT Docker override 2023-07-31 14:11:31 -07:00
Felipe Knorr Kuhn
17f1cb8648
Fix config unit test that was returning early 2023-07-31 14:10:49 -07:00
softsimon
d5dca95fbe
Merge pull request #4072 from mempool/simon/electrum-scripthash-fix
Fix scripthash lookup for Electrum*
2023-07-31 21:10:59 +09:00
softsimon
bed7c1b283
Fix scripthash lookup for Electrum* 2023-07-31 18:29:40 +09:00
Mononaut
0d25ef0b5b
Get block txs from esplora, index CPFP together with summaries 2023-07-31 18:13:16 +09:00
Mononaut
6b7d8d95f7
reduce mempool poll rate while indexing 2023-07-31 18:13:16 +09:00
Mononaut
bafc0bd9cf
fix indexing log prints 2023-07-31 18:13:11 +09:00
softsimon
7a87f74b22
Merge pull request #4070 from mempool/mononaut/redis-fixes
Misc Redis fixes
2023-07-31 17:28:54 +09:00
Mononaut
49db63d888
Faster Redis tx deletion, fix debug log level 2023-07-31 16:38:18 +09:00
Mononaut
363fc1b00b
Get blocks from electrs again 2023-07-31 15:39:02 +09:00
wiz
36a26fc2ce
Merge pull request #4063 from mempool/mononaut/simple-redis
Simple Redis
2023-07-31 15:34:08 +09:00
softsimon
73b71c4914
Fixing docker config and tests 2023-07-31 14:28:56 +09:00
Mononaut
dcfab218fb
Improve Redis logging 2023-07-31 12:21:28 +09:00
Mononaut
c79a597c96
switch from redis-json to simple key-value redis entries 2023-07-31 12:16:37 +09:00
Mononaut
a393f42b5e
strip non-essential data from redis cache txs 2023-07-31 12:16:36 +09:00
Mononaut
6ac58f2da7
store redis mempool in sharded json object 2023-07-31 12:16:36 +09:00
Mononaut
a9f8bbbcce
Add network and schema versioning to redis cache 2023-07-31 12:16:34 +09:00
Mononaut
d65bddd30b
Add transactions to Redis cache in manageable batches 2023-07-31 12:16:34 +09:00
Mononaut
b6cb539470
Fix redis feature merge conflicts 2023-07-31 12:16:34 +09:00
Mononaut
aea2b1ec6b
Add RBF data to Redis cache 2023-07-31 12:16:33 +09:00
Mononaut
5138f9a254
Implement Redis cache for block and mempool data 2023-07-31 12:16:33 +09:00
wiz
8cfa4ef1a1
Merge pull request #4066 from mempool/wiz/update-preview-image
Remove text from mempool.space preview image
2023-07-31 11:24:17 +09:00
wiz
16401044f6
Remove text from mempool.space preview image 2023-07-31 11:16:43 +09:00
wiz
c88b7ddc77
ops: Use TK7 for unfurler 2023-07-31 11:12:54 +09:00
Mononaut
945a8ce92e
Use log10 scale for projected block fee graph 2023-07-30 18:56:57 +09:00
softsimon
8b012a96f3
Merge pull request #4034 from mempool/mononaut/mobile-difficulty-tooltips
Fix difficulty tooltip position
2023-07-30 14:26:36 +09:00
softsimon
8b6bb54efb
Merge pull request #4062 from fiatjaf/patch-1
Create fiatjaf.txt
2023-07-29 23:52:32 +09:00
fiatjaf_
2670589293
Create fiatjaf.txt 2023-07-29 09:27:12 -03:00
softsimon
91eef1c4d9
Merge pull request #4061 from rishkwal/master
rishkwal contributor license agreement added
2023-07-29 21:14:02 +09:00
Rishabh
562a5f6878
rishkwal contributor license agreement added 2023-07-29 15:54:34 +05:30
softsimon
5c20fd71e1
Merge pull request #3905 from mempool/hunicus/msop-r
Update mosp strings from tm to r
2023-07-29 18:34:31 +09:00
softsimon
adf093eca5
Merge pull request #4026 from mempool/nymkappa/charts-landscape-mobile
[graphs] fix min height in mobile landscape
2023-07-29 18:11:33 +09:00
softsimon
d14d286f24
Merge pull request #4057 from dni/patch-1
[BUG]: Update frontend entrypoint.sh
2023-07-29 17:50:58 +09:00
softsimon
ecd80aad6a
Merge pull request #4056 from mempool/mononaut/compressed-p2pk
Add support for compressed p2pk addresses
2023-07-29 17:48:26 +09:00
softsimon
1b248c24f1
Merge pull request #4050 from mempool/mononaut/retry-block-txs
Handle failures while fetching block transactions
2023-07-29 17:12:34 +09:00
softsimon
f35f630695
Merge pull request #4060 from Czino/add-contributor-license-agreement
Add contributor license agreement
2023-07-29 17:09:30 +09:00
softsimon
8172ec9245
Merge pull request #4053 from mempool/nymkappa/pool-logo
[mining] use .slug to load pool logo
2023-07-29 17:07:06 +09:00
softsimon
14c86b84b8
Merge pull request #4059 from mempool/mononaut/connection-state
fix websocket connection state observable
2023-07-29 17:05:17 +09:00
Czino
1f8f40011a
Update date 2023-07-29 09:57:40 +02:00
Czino
2719be9075
Add contributor license agreement 2023-07-29 09:53:47 +02:00
Mononaut
354c119e99
fix websocket connection state observable 2023-07-29 15:22:15 +09:00
nymkappa
f8faccd502
Merge branch 'master' into mononaut/acceleration-viz 2023-07-29 13:51:49 +09:00
dni ⚡
cc27c0159e
[BUG]: Update frontend entrypoint.sh
Typo of variable LIQUID_ENABLED
2023-07-28 23:04:44 +02:00
wiz
b1bdb52851
ops: Fix a classic typo in mempool clear protection log print 2023-07-28 23:40:06 +09:00
softsimon
d52e2cd585
Merge pull request #4054 from mempool/mononaut/mined-address-txs
Show new mined transactions on the address page
2023-07-28 20:43:22 +09:00
Mononaut
2c613195cc
Add support for compressed p2pk addresses 2023-07-28 19:17:52 +09:00
wiz
1ca99e9967
Merge branch 'master' into hunicus/msop-r 2023-07-28 17:29:25 +09:00
softsimon
f9ddc3cc5f
Merge pull request #4049 from mempool/mononaut/p2pk-websocket-subscription
Support p2pk track-address websocket subscriptions
2023-07-28 17:03:24 +09:00
Mononaut
63ccecf410
remove unused calcScriptHash function 2023-07-28 16:14:28 +09:00
Mononaut
5b2470955d
track p2pk addresses by scriptpubkey not scripthash 2023-07-28 16:09:39 +09:00
Mononaut
74b87b6006
Support p2pk track-address websocket subscriptions 2023-07-28 16:09:39 +09:00
Mononaut
9b65fbd98c
Show new mined transactions on the address page 2023-07-28 15:56:55 +09:00
nymkappa
3f3f0db2f2
[mining] use .slug to load pool logo 2023-07-28 13:45:04 +09:00
nymkappa
48e3be875d
Merge branch 'master' into nymkappa/no-db-blocks-list 2023-07-28 09:37:55 +09:00
nymkappa
c993ee51cc
Merge branch 'master' into nymkappa/charts-landscape-mobile 2023-07-28 09:37:45 +09:00
softsimon
395f47516a
Merge pull request #4048 from mempool/mononaut/fix-key-event-leak
Fix key navigation subscription leak
2023-07-27 17:20:30 +09:00
Mononaut
589adb95c3
remove stray debugging log 2023-07-27 14:49:21 +09:00
Mononaut
1fd5b975f1
Handle failures while fetching block transactions 2023-07-27 11:45:16 +09:00
nymkappa
67cff804a6
/accelerations -> /accelerator/accelerations 2023-07-26 15:08:35 +09:00
Mononaut
cde4af5930
fix mismatched use of gbt implementations 2023-07-26 15:08:35 +09:00
Mononaut
928a8be846
fix pool-dependent accelerated audit handling 2023-07-26 15:08:34 +09:00
Mononaut
7c641544b2
check in missing rust-gbt file 2023-07-26 15:08:34 +09:00
Mononaut
2a2aee21fb
fix audit highlightning and fee ranges 2023-07-26 15:08:34 +09:00
Mononaut
3838d947b1
fix tests 2023-07-26 15:08:34 +09:00
Mononaut
ffc2b6c53c
Add acceleration support to rust gbt 2023-07-26 15:08:34 +09:00
Mononaut
6494f890fe
include per-tx pools in /accelerations endpoint 2023-07-26 15:08:34 +09:00
Mononaut
ba54bc9d15
support for acceleration mempool blocks animation 2023-07-26 15:08:33 +09:00
Mononaut
083bfdba06
Refactor accelerated audits 2023-07-26 15:08:33 +09:00
Mononaut
20b3ceab1e
Implement accelerations API & config setting 2023-07-26 15:08:33 +09:00
Mononaut
c246db1cf9
Refactor acceleration tracking 2023-07-26 15:08:33 +09:00
Mononaut
aa24f6a84d
use accelerated rates for block templates & show in viz 2023-07-26 15:08:33 +09:00
Mononaut
e489f713eb
include accelerated tx data in block audits 2023-07-26 15:08:26 +09:00
softsimon
7edd40246c
Merge branch 'master' into nymkappa/charts-landscape-mobile 2023-07-25 21:37:35 +09:00
Mononaut
e15c0c6c7a
Fix key navigation subscription leak 2023-07-25 21:18:19 +09:00
softsimon
a13c424869
Merge pull request #4046 from mempool/mononaut/audit-exclude-conflicts
Exclude all conflicting transactions from audit score
2023-07-25 20:22:37 +09:00
softsimon
8ee9f52634
Merge pull request #4028 from mempool/nymkappa/search-autofocus
[search bar] only autofocus when in `/`, `/mining` and `/lightning`
2023-07-25 18:19:17 +09:00
softsimon
b58abe4779
Merge pull request #4045 from mempool/mononaut/fast-blocks
Faster blocks
2023-07-25 16:07:52 +09:00
nymkappa
6d5be78dd0
[search bar] use afterviewinit instead of afterviewchecked 2023-07-25 15:03:39 +09:00
softsimon
07b0f24cf1
Update frontend/src/app/shared/pipes/bytes-pipe/utils.ts 2023-07-25 14:26:43 +09:00
Mononaut
d7b874ac49
Exclude all conflicting transactions from audit score 2023-07-25 14:17:02 +09:00
nymkappa
0a0978f7d7
Merge branch 'master' into nymkappa/search-autofocus 2023-07-25 13:31:15 +09:00
Mononaut
25925751eb
refactor $getTransactionsExtended to optimise API requests 2023-07-25 12:09:13 +09:00
Mononaut
0ebfd6f017
Fetch block txs from mempool/electrs in bulk 2023-07-25 10:27:43 +09:00
wiz
81d1c0a4d5
Merge pull request #4043 from mempool/mononaut/mempool-sync-status
Mempool inSync status
2023-07-24 19:39:17 +09:00
Mononaut
36fe5627c7
fix mempool sync skeleton loaders on Core backend 2023-07-24 17:49:34 +09:00
nymkappa
9e43dadad8
Merge branch 'master' into nymkappa/search-autofocus 2023-07-24 17:28:47 +09:00
Mononaut
2d463326e0
fix gbt mempool size mismatch bug 2023-07-24 17:22:38 +09:00
Mononaut
a6edfcc272
show mempool skeleton while not inSync 2023-07-24 16:22:35 +09:00
Mononaut
de4265a6d1
More conservative mempool inSync status 2023-07-24 16:22:22 +09:00
softsimon
dc43a81899
Merge pull request #4035 from mempool/mononaut/lightning-balance-bars
Lightning channel balance progress bars
2023-07-24 16:22:20 +09:00
Mononaut
e59c961f25
Add electrs sync progress updates 2023-07-24 14:59:51 +09:00
Mononaut
db715a1dba
Switch to batch mempool/txs/:txid endpoint 2023-07-24 14:44:43 +09:00
Mononaut
202d4122b4
load mempool txs in bulk from esplora 2023-07-24 14:44:42 +09:00
nymkappa
f62f2341f4
Merge branch 'master' into nymkappa/search-autofocus 2023-07-24 13:39:17 +09:00
softsimon
e2fdacfddd
Merge pull request #4041 from mempool/simon/sanitize-lightning-channel-id
Sanitize channel id search
2023-07-24 13:26:20 +09:00
softsimon
c84a444f79
Merge pull request #4039 from mempool/mononaut/fix-sigops
Fix missing sigops
2023-07-24 13:26:13 +09:00
softsimon
ee2d8f8c5a
Sanitize channel id search 2023-07-24 13:21:06 +09:00
nymkappa
7db391d762
[search bar] add missing autofocus on lightning dashboard 2023-07-24 11:51:15 +09:00
nymkappa
da4a20cb85
[search bar] dont auto focus if touch screen 2023-07-24 11:35:46 +09:00
Mononaut
44f2217a68
Fix typo which skips sigop calculation 2023-07-24 10:49:29 +09:00
nymkappa
6ce3c1d75d
[search bar] auto focus only in dashboards 2023-07-24 10:18:00 +09:00
wiz
caa8cfbc0e
Another hotfix for CLN crash 2023-07-23 22:35:32 +09:00
wiz
02f361af73
Hotfix for CLN crash 2023-07-23 22:21:53 +09:00
Mononaut
a1e05c0c37
Lightning channel balance progress bars 2023-07-23 18:00:24 +09:00
Mononaut
05affa5ad4
Fix difficulty tooltip position 2023-07-23 16:19:48 +09:00
softsimon
5e91af168b
Merge pull request #4027 from mempool/mononaut/p2pk
Support P2PK address types
2023-07-23 15:06:04 +09:00
softsimon
ae183210e0
Updating pubkey width on mobile and desktop 2023-07-23 14:43:43 +09:00
Mononaut
56127dce6a
Add P2PK support to search bar 2023-07-23 14:05:04 +09:00
Mononaut
0376467e6c
highlight matching P2PK inputs 2023-07-23 14:01:31 +09:00
Mononaut
48b55eed46
improve script hex parsing validation 2023-07-23 14:01:31 +09:00
Mononaut
0ce043cca9
Fix esplora error messages 2023-07-23 14:01:31 +09:00
Mononaut
65dbafd2ec
Support P2PK address types 2023-07-23 14:01:31 +09:00
nymkappa
597073c9b6
[block list] re-enable block fee if !auditAvailable in widget 2023-07-23 12:18:21 +09:00
nymkappa
d7ac326f92
[block list] improve block list when db = false 2023-07-23 12:02:04 +09:00
softsimon
3f36a30d1d
Merge pull request #4031 from knorrium/es2022_fixes
Es2022 fixes
2023-07-23 11:56:04 +09:00
softsimon
b021746e9e
Merge pull request #4030 from mempool/fix/CI-Rust
Use more reliable Github Action for Rust toolchain install
2023-07-23 11:50:00 +09:00
junderw
975ec772fa
Use more reliable Github Action for Rust toolchain install. 2023-07-22 19:41:36 -07:00
Felipe Knorr Kuhn
442a4ff6e0
Fix tsconfig settigns for ES2022 2023-07-23 11:06:21 +09:00
Felipe Knorr Kuhn
cea218b81a
Reset the supported browsers list 2023-07-23 11:05:49 +09:00
nymkappa
7970df27ad
[graphs] fix min height in mobile landscape 2023-07-22 17:42:02 +09:00
softsimon
a24d2ce547
Merge pull request #4021 from mempool/mononaut/blockchain-scroll
apply blockchain scroll offset as soon as element is ready
2023-07-22 14:32:42 +09:00
softsimon
95707de8ec
Merge pull request #4013 from mempool/simon/css-fix-fa-icons
Fix some icon css color changes
2023-07-22 13:53:55 +09:00
softsimon
eb37066d5d
Merge pull request #4024 from devinbileck/patch-1
Accept CLA
2023-07-22 13:53:45 +09:00
Devin Bileck
f0983844c1
Accept CLA 2023-07-21 15:13:10 -07:00
softsimon
a0bd4e0f63
Merge branch 'master' into mononaut/blockchain-scroll 2023-07-21 21:12:11 +09:00
softsimon
141ab8076f
Merge pull request #4014 from mempool/mononaut/fix-blocks-list
Fix blocks list observable
2023-07-21 21:12:03 +09:00
softsimon
267f3d4877
Merge pull request #4020 from knorrium/fix_rate_limiting
Fix rate limiting when syncing assets on CI
2023-07-21 21:11:41 +09:00
softsimon
460a41644d
Merge pull request #4015 from pedromvpg/patch-1
sign contributor agreement
2023-07-21 21:04:31 +09:00
Felipe Knorr Kuhn
ca69d19bf7
Use the GITHUB_SECRET to authenticate with the API
Fix the environment variable

Add extra logging when using the authentication

Use the GITHUB_TOKEN on the frontend build step
2023-07-21 18:14:32 +09:00
Mononaut
d91fa5c6ef
null => of([]) 2023-07-21 18:10:13 +09:00
wiz
3610aa2e20
Merge pull request #3999 from mempool/mononaut/fix-liquid-fees
Fix fee handling on Liquid
2023-07-21 17:49:48 +09:00
wiz
7a6da07a61
Merge branch 'master' into mononaut/fix-liquid-fees 2023-07-21 17:38:47 +09:00
Mononaut
0f77fb88bf
handle missing block.extras on liquid 2023-07-21 17:18:45 +09:00
Mononaut
1bd19e1d8d
apply blockchain scroll offset when element is ready 2023-07-21 17:10:58 +09:00
Felipe Knorr Kuhn
61eeb82694 Expose the GITHUB_SECRET to the frontend build step 2023-07-21 17:09:57 +09:00
softsimon
135adfecbd
Merge pull request #3934 from mempool/junderw/fix-armv7-docker
Fix backend docker build for armv7
2023-07-21 10:19:20 +09:00
softsimon
20b2017908
Merge pull request #4016 from knorrium/tweak_dependabot
Tweak dependabot settings
2023-07-21 10:18:58 +09:00
Felipe Knorr Kuhn
b1345038bd
Tweak dependabot settings 2023-07-20 18:09:36 -07:00
Felipe Knorr Kuhn
7ba627e243
Merge branch 'master' into junderw/fix-armv7-docker 2023-07-20 17:31:17 -07:00
Pedro
6b453ef018
sign contributor agreement 2023-07-20 17:24:13 +01:00
Mononaut
943dc6f5e6
Fix blocks list observable 2023-07-20 17:30:26 +09:00
softsimon
4192869593
Fix some icon css color changes 2023-07-20 16:02:04 +09:00
softsimon
e066bb1e9d
Merge pull request #4002 from mempool/nymkappa/mining-pool-summary
[mining] add missing empty td at the bottom of pool ranking
2023-07-20 15:10:32 +09:00
softsimon
6cdc97848f
Merge pull request #3773 from mempool/nymkappa/search-bar-align
[search bar] fix alignment issue
2023-07-20 14:59:54 +09:00
nymkappa
ade7908229
[mining] add missing empty col at the bottom of pool ranking 2023-07-20 10:36:26 +09:00
nymkappa
9a2ab7fe21
[search bar] chrome - fix flex-auto 2023-07-20 09:57:04 +09:00
softsimon
213800f563
Merge error fix 2023-07-19 16:46:02 +09:00
junderw
2c59992d3f
Fix E2E error 2023-07-19 16:28:06 +09:00
Mononaut
87e39b8389
Fix liquid blockchain bar 2023-07-19 16:24:05 +09:00
junderw
d825143b35
Search for full address in separate network if matches 2023-07-19 16:15:43 +09:00
junderw
3d900a3849
Fix: Prevent regex clash with channel IDs 2023-07-19 16:10:25 +09:00
junderw
0a51b752e6
Improve types and add liquidtestnet for regex 2023-07-19 16:10:25 +09:00
junderw
c0d3f295ee
Finished Regex portion 2023-07-19 16:10:24 +09:00
junderw
1339b98281
Feature: Readable RegExp constructor 2023-07-19 16:09:15 +09:00
softsimon
bc508b6621
Merge pull request #3949 from knorrium/node_v20_to_matrix
Add node v20 to the test matrix
2023-07-19 15:56:31 +09:00
Mononaut
709783280a
Fix liquid fees & remove minimum fee rate 2023-07-19 15:42:02 +09:00
softsimon
09b7c4021a
Merge branch 'master' into nymkappa/tx-overflow 2023-07-19 15:18:23 +09:00
softsimon
f9aa1b5b35
Merge pull request #3194 from mempool/hunicus/manual-deployment-enterprise
Specify manual deployment support for enterprise sponsors
2023-07-19 14:25:02 +09:00
softsimon
2fffd8b43c
Merge branch 'master' into hunicus/manual-deployment-enterprise 2023-07-19 14:19:03 +09:00
softsimon
741571a93a
Merge pull request #3607 from mempool/nymkappa/clip-label-overflow
Clip overflowing labels in pool component on mobile
2023-07-19 14:05:31 +09:00
softsimon
07a424e6f1
Merge pull request #3997 from mempool/mononaut/liquid-latest-blocks
restore latest blocks on liquid
2023-07-19 14:03:58 +09:00
Mononaut
943d05f680
restore latest blocks on liquid 2023-07-19 12:09:46 +09:00
softsimon
57aa2c69ac
Merge branch 'master' into nymkappa/clip-label-overflow 2023-07-19 11:31:01 +09:00
softsimon
61e28a33e0
Merge pull request #3996 from mempool/simon/zero-zat-minimum-fee-fix
Fix for 0 sat minimum fee
2023-07-19 11:15:53 +09:00
softsimon
4055128d7f
Fix for 0 sat minimum fee 2023-07-19 11:06:28 +09:00
Felipe Knorr Kuhn
7c29e51bbb
Merge branch 'master' into junderw/fix-armv7-docker 2023-07-18 14:30:20 -07:00
softsimon
fabd420586
Merge branch 'master' into node_v20_to_matrix 2023-07-18 18:56:00 +09:00
softsimon
a12316f4dc
Updating default mining pool icon 2023-07-18 18:16:21 +09:00
softsimon
548611f13a
Merge branch 'master' into nymkappa/search-bar-align 2023-07-18 18:02:44 +09:00
softsimon
3397edecb4
Merge pull request #3659 from nothing0012/zz/add-cla
Add cla
2023-07-18 17:42:00 +09:00
softsimon
b041a145b1
Merge pull request #3654 from learntheropes/patch-1
sign cla
2023-07-18 17:41:49 +09:00
softsimon
7046c3d6c3
Merge pull request #3935 from mempool/mononaut/lightning-justice
Add lightning justice page
2023-07-18 17:24:26 +09:00
softsimon
67f58a4491
Sorting by closing date descending 2023-07-18 17:19:14 +09:00
softsimon
d74e4b1876
Replacing loading text with spinner 2023-07-18 17:15:54 +09:00
softsimon
e757b74c87
Merge pull request #3990 from mempool/simon/removing-unused-fullrbf-code
Removing unused rbf frontend code
2023-07-18 17:06:01 +09:00
wiz
4b41730636
Merge branch 'master' into mononaut/lightning-justice 2023-07-18 16:49:49 +09:00
wiz
23ecf9cf41
Merge pull request #3993 from mempool/simon/backend-deps-18-07
Bumping backend deps
2023-07-18 16:19:28 +09:00
wiz
f8cfa35552
Merge pull request #3965 from mempool/nymkappa/network-switch-align
[network selection] fix some align issues
2023-07-18 15:53:41 +09:00
wiz
c1d0e802d9
Merge branch 'master' into nymkappa/network-switch-align 2023-07-18 15:40:57 +09:00
softsimon
bde7fad1c4
Bumping backend deps 2023-07-18 15:36:30 +09:00
softsimon
8007f5a3d3
Merge pull request #3992 from mempool/simon/angular-16
Angular 16
2023-07-18 15:10:49 +09:00
softsimon
83f955e469
Merge pull request #3969 from mempool/mononaut/ancestors-undefined
Fix tx.ancestors undefined bug
2023-07-18 15:10:17 +09:00
nymkappa
29c53a7852
[search bar] fix alignment issue 2023-07-18 15:01:30 +09:00
softsimon
3825a1c359
Trying downgrading cypress wait 2023-07-18 13:45:24 +09:00
softsimon
ac82a25fa2
Angular 16 2023-07-18 13:38:33 +09:00
softsimon
85e071049c
Removing unused rbf frontend code 2023-07-18 11:42:13 +09:00
softsimon
ae22b7b444
Merge pull request #3989 from mempool/mononaut/fullrbf-list-toggle
Remove frontend FULL_RBF_ENABLED flag
2023-07-18 11:36:46 +09:00
softsimon
9aba4d4357
Merge pull request #3988 from mempool/mononaut/clock-width-fix
Fix clock horizontal scroll bug
2023-07-18 11:03:11 +09:00
Mononaut
17866f80bd
Remove frontend FULL_RBF_ENABLED flag 2023-07-18 11:01:35 +09:00
Mononaut
5e46176c4e
Fix clock horizontal scroll bug 2023-07-18 10:52:47 +09:00
Felipe Knorr Kuhn
69c54d7207
Merge branch 'master' into node_v20_to_matrix 2023-07-17 15:53:34 -07:00
wiz
2d4bc9dbd6
ops: Move electrs scripts to mempool/electrs repo 2023-07-16 17:50:36 +09:00
Mononaut
b6a6fcd4e2
Fix tx.ancestors undefined bug 2023-07-16 12:53:55 +09:00
nymkappa
cda6567c4c
[network selector] fix rtl issue 2023-07-15 16:50:18 +09:00
nymkappa
a372b479b4
[network selector] improve align 2023-07-15 16:26:25 +09:00
softsimon
05f85c5201
Merge branch 'master' into nymkappa/clip-label-overflow 2023-07-12 10:57:11 +09:00
Felipe Knorr Kuhn
2570357bec
Add node v20 to the test matrix 2023-07-11 00:21:00 -07:00
Mononaut
4ba552fe1b
Add basic lightning justice page 2023-07-09 03:03:35 -04:00
junderw
ec918d57b2
Fix backend docker build for armv7 2023-07-08 23:03:03 -07:00
hunicus
c89b15fdbc
Update mosp strings from tm to r 2023-06-27 12:37:04 -04:00
Antoni Spaanderman
0d69ad43ab
fix config issues 2023-06-18 20:34:56 +02:00
Antoni Spaanderman
dc491a5984
change default cookie path to /bitcoin/.cookie 2023-06-18 19:16:09 +02:00
Antoni Spaanderman
e9386ec003
Add Bitcoin Core RPC cookie authentication option 2023-06-18 19:16:07 +02:00
hunicus
ce950d63cb
Replace disclaimer text regarding tx acceleration 2023-06-12 07:07:15 -04:00
Mononaut
125b9e4525
Restore liquid max block weight to defaults 2023-05-24 15:49:35 -04:00
nymkappa
6ac1a43d44
Merge branch 'master' into nymkappa/tx-overflow 2023-04-22 20:11:45 +02:00
nymkappa
99af881cdd
Merge branch 'master' into nymkappa/clip-label-overflow 2023-04-22 20:10:27 +02:00
Giovanni La Perna
71935e29c8
Update and rename giovannilaperna.txt to learntheropes.txt
change github username
2023-04-08 11:19:04 +02:00
Rex
123b853205
Add cla 2023-04-08 11:43:26 +08:00
Giovanni La Perna
bad73c1805
Create giovannilaperna.txt 2023-04-07 01:04:23 +02:00
nymkappa
3db1486bfb
Fix transaction amount overflow 2023-03-29 17:32:39 +09:00
nymkappa
7ab373ecac
Clip overflowing labels in pool component on mobile 2023-03-29 15:09:38 +09:00
hunicus
6cc2f20638
Use href for enterprise links 2023-03-12 04:39:57 -04:00
wiz
730c1ae2d7
Merge branch 'master' into hunicus/manual-deployment-enterprise 2023-03-12 16:57:49 +09:00
Mononaut
105cccf9b0
convert soft 404s to hard 404s in unfurler ssr 2023-03-09 02:34:21 -06:00
Mononaut
2f3e498906
fix canonical/meta tags in unfurler 2023-03-09 00:26:28 -06:00
Mononaut
82a808529b
clean up unfurler meta html template 2023-03-08 01:47:35 -06:00
Mononaut
477f3bd70a
add applebot & bingbot to seo user-agent detection 2023-03-08 01:11:54 -06:00
wiz
a874cdfb56
Merge branch 'master' into mononaut/seo-ssr 2023-03-08 15:29:18 +09:00
hunicus
f493da4eac Generalize faq from linux to any server 2023-03-04 18:24:02 +09:00
hunicus
e7ad857cc9 Specify manual deployment support for enterprise sponsors [readme] 2023-03-04 18:24:02 +09:00
hunicus
f968faeaf9 Specify manual deployment support for enterprise sponsors [faq] 2023-03-04 18:24:02 +09:00
Felipe Knorr Kuhn
c3c44713ef
Merge branch 'master' into mononaut/seo-ssr 2023-03-02 23:53:40 -08:00
mononaut
f6cae729a7
revert capitalization in title tag
Co-authored-by: wiz <j@wiz.biz>
2023-02-28 18:40:59 -06:00
Mononaut
b1e32ed55f
Fix googlebot user-agent detection 2023-02-27 10:48:13 -06:00
Mononaut
2f27d9279d
extend unfurler to dynamically render search crawler requests 2023-02-26 10:56:32 -06:00
1063 changed files with 293710 additions and 141044 deletions

View File

@ -1,24 +1,42 @@
version: 2
updates:
- package-ecosystem: npm
versioning-strategy: increase
directory: "/backend"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
update-types:
["version-update:semver-major", "version-update:semver-patch"]
allow:
- dependency-type: "production"
- package-ecosystem: npm
directory: "/frontend"
versioning-strategy: increase
groups:
frontend-angular-dependencies:
patterns:
- "@angular*"
- "@ng-*"
- "ngx-*"
frontend-jest-dependencies:
patterns:
- "@types/jest"
- "jest"
frontend-eslint-dependencies:
patterns:
- "@typescript-eslint*"
- "eslint"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
update-types:
["version-update:semver-major", "version-update:semver-patch"]
allow:
- dependency-type: "production"
@ -28,7 +46,8 @@ updates:
interval: weekly
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
update-types:
["version-update:semver-major", "version-update:semver-patch"]
- package-ecosystem: docker
directory: "/docker/frontend"
@ -36,7 +55,8 @@ updates:
interval: weekly
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
update-types:
["version-update:semver-major", "version-update:semver-patch"]
- package-ecosystem: "github-actions"
directory: "/"
@ -44,4 +64,5 @@ updates:
interval: weekly
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
update-types:
["version-update:semver-major", "version-update:semver-patch"]

View File

@ -9,7 +9,7 @@ jobs:
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
strategy:
matrix:
node: ["16", "17", "18"]
node: ["20", "21"]
flavor: ["dev", "prod"]
fail-fast: false
runs-on: "ubuntu-latest"
@ -27,10 +27,17 @@ jobs:
node-version: ${{ matrix.node }}
registry-url: "https://registry.npmjs.org"
- name: Install 1.70.x Rust toolchain
uses: actions-rs/toolchain@v1
- name: Read rust-toolchain file from repository
id: gettoolchain
run: echo "::set-output name=toolchain::$(cat ./rust/gbt/rust-toolchain)"
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}
- name: Install ${{ steps.gettoolchain.outputs.toolchain }} Rust toolchain
# Latest version available on this commit is 1.71.1
# Commit date is Aug 3, 2023
uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
with:
toolchain: 1.70
toolchain: ${{ steps.gettoolchain.outputs.toolchain }}
- name: Install
if: ${{ matrix.flavor == 'dev'}}
@ -49,18 +56,111 @@ jobs:
- name: Unit Tests
if: ${{ matrix.flavor == 'dev'}}
run: npm run test
run: npm run test:ci
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
- name: Build
run: npm run build
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
cache:
name: "Cache assets for builds"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: assets
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: "https://registry.npmjs.org"
- name: Install (Prod dependencies only)
run: npm ci --omit=dev --omit=optional
working-directory: assets/frontend
- name: Restore cached mining pool assets
continue-on-error: true
id: cache-mining-pool-restore
uses: actions/cache/restore@v4
with:
path: |
mining-pool-assets.zip
key: mining-pool-assets-cache
- name: Restore promo video assets
continue-on-error: true
id: cache-promo-video-restore
uses: actions/cache/restore@v4
with:
path: |
promo-video-assets.zip
key: promo-video-assets-cache
- name: Unzip assets before building (src/resources)
continue-on-error: true
run: unzip -o mining-pool-assets.zip -d assets/frontend/src/resources/mining-pools
- name: Unzip assets before building (src/resources)
continue-on-error: true
run: unzip -o promo-video-assets.zip -d assets/frontend/src/resources/promo-video
# - name: Unzip assets before building (dist)
# continue-on-error: true
# run: unzip assets.zip -d assets/frontend/dist/mempool/browser/resources
- name: Sync-assets
run: npm run sync-assets-dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MEMPOOL_CDN: 1
VERBOSE: 1
working-directory: assets/frontend
- name: Zip mining-pool assets
run: zip -jrq mining-pool-assets.zip assets/frontend/src/resources/mining-pools/*
- name: Zip promo-video assets
run: zip -jrq promo-video-assets.zip assets/frontend/src/resources/promo-video/*
- name: Upload mining pool assets as artifact
uses: actions/upload-artifact@v4
with:
name: mining-pool-assets
path: mining-pool-assets.zip
- name: Upload promo video assets as artifact
uses: actions/upload-artifact@v4
with:
name: promo-video-assets
path: promo-video-assets.zip
- name: Save mining pool assets cache
id: cache-mining-pool-save
uses: actions/cache/save@v4
with:
path: |
mining-pool-assets.zip
key: mining-pool-assets-cache
- name: Save promo video assets cache
id: cache-promo-video-save
uses: actions/cache/save@v4
with:
path: |
promo-video-assets.zip
key: promo-video-assets-cache
frontend:
needs: cache
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
strategy:
matrix:
node: ["16", "17", "18"]
node: ["20", "21"]
flavor: ["dev", "prod"]
fail-fast: false
runs-on: "ubuntu-latest"
@ -96,6 +196,211 @@ jobs:
# - name: Test
# run: npm run test
- name: Restore cached mining pool assets
continue-on-error: true
id: cache-mining-pool-restore
uses: actions/cache/restore@v4
with:
path: |
mining-pool-assets.zip
key: mining-pool-assets-cache
- name: Restore promo video assets
continue-on-error: true
id: cache-promo-video-restore
uses: actions/cache/restore@v4
with:
path: |
promo-video-assets.zip
key: promo-video-assets-cache
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: mining-pool-assets
- name: Unzip assets before building (src/resources)
run: unzip -o mining-pool-assets.zip -d ${{ matrix.node }}/${{ matrix.flavor }}/frontend/src/resources/mining-pools
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: promo-video-assets
- name: Unzip assets before building (src/resources)
run: unzip -o promo-video-assets.zip -d ${{ matrix.node }}/${{ matrix.flavor }}/frontend/src/resources/promo-video
# - name: Unzip assets before building (dist)
# run: unzip assets.zip -d ${{ matrix.node }}/${{ matrix.flavor }}/frontend/dist/mempool/browser/resources
- name: Display resulting source tree
run: ls -R
- name: Build
run: npm run build
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MEMPOOL_CDN: 1
VERBOSE: 1
e2e:
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
runs-on: "ubuntu-latest"
needs: frontend
strategy:
fail-fast: false
matrix:
module: ["mempool", "liquid", "testnet4"]
name: E2E tests for ${{ matrix.module }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{ matrix.module }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json
- name: Restore cached mining pool assets
continue-on-error: true
id: cache-mining-pool-restore
uses: actions/cache/restore@v4
with:
path: |
mining-pool-assets.zip
key: mining-pool-assets-cache
- name: Restore cached promo video assets
continue-on-error: true
id: cache-promo-video-restore
uses: actions/cache/restore@v4
with:
path: |
promo-video-assets.zip
key: promo-video-assets-cache
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: mining-pool-assets
- name: Unzip assets before building (src/resources)
run: unzip -o mining-pool-assets.zip -d ${{ matrix.module }}/frontend/src/resources/mining-pools
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: promo-video-assets
- name: Unzip assets before building (src/resources)
run: unzip -o promo-video-assets.zip -d ${{ matrix.module }}/frontend/src/resources/promo-video
# mempool
- name: Chrome browser tests (${{ matrix.module }})
if: ${{ matrix.module == 'mempool' }}
uses: cypress-io/github-action@v5
with:
tag: ${{ github.event_name }}
working-directory: ${{ matrix.module }}/frontend
build: npm run config:defaults:${{ matrix.module }}
start: npm run start:local-staging
wait-on: "http://localhost:4200"
wait-on-timeout: 120
record: true
parallel: true
spec: |
cypress/e2e/mainnet/*.spec.ts
cypress/e2e/signet/*.spec.ts
group: Tests on Chrome (${{ matrix.module }})
browser: "chrome"
ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}"
env:
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
# liquid
- name: Chrome browser tests (${{ matrix.module }})
if: ${{ matrix.module == 'liquid' }}
uses: cypress-io/github-action@v5
with:
tag: ${{ github.event_name }}
working-directory: ${{ matrix.module }}/frontend
build: npm run config:defaults:${{ matrix.module }}
start: npm run start:local-staging
wait-on: "http://localhost:4200"
wait-on-timeout: 120
record: true
parallel: true
spec: |
cypress/e2e/liquid/liquid.spec.ts
cypress/e2e/liquidtestnet/liquidtestnet.spec.ts
group: Tests on Chrome (${{ matrix.module }})
browser: "chrome"
ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}"
env:
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
# testnet
- name: Chrome browser tests (${{ matrix.module }})
if: ${{ matrix.module == 'testnet4' }}
uses: cypress-io/github-action@v5
with:
tag: ${{ github.event_name }}
working-directory: ${{ matrix.module }}/frontend
build: npm run config:defaults:mempool
start: npm run start:local-staging
wait-on: "http://localhost:4200"
wait-on-timeout: 120
record: true
parallel: true
spec: |
cypress/e2e/testnet4/*.spec.ts
group: Tests on Chrome (${{ matrix.module }})
browser: "chrome"
ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}"
env:
CYPRESS_REROUTE_TESTNET: true
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
validate_docker_json:
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
runs-on: "ubuntu-latest"
name: Validate generated backend Docker JSON
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: docker
- name: Install jq
run: sudo apt-get install jq -y
- name: Create new start script to run on CI
run: |
sed '$d' start.sh > start_ci.sh
working-directory: docker/docker/backend
- name: Run the script to generate the sample JSON
run: |
sh start_ci.sh
working-directory: docker/docker/backend
- name: Validate JSON syntax
run: |
cat mempool-config.json | jq
working-directory: docker/docker/backend

View File

@ -1,64 +0,0 @@
name: Cypress Tests
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize]
jobs:
cypress:
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
module: ["mempool", "liquid", "bisq"]
include:
- module: "mempool"
spec: |
cypress/e2e/mainnet/*.spec.ts
cypress/e2e/signet/*.spec.ts
cypress/e2e/testnet/*.spec.ts
- module: "liquid"
spec: |
cypress/e2e/liquid/liquid.spec.ts
cypress/e2e/liquidtestnet/liquidtestnet.spec.ts
- module: "bisq"
spec: |
cypress/e2e/bisq/bisq.spec.ts
name: E2E tests for ${{ matrix.module }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{ matrix.module }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.15.0
cache: "npm"
cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json
- name: Chrome browser tests (${{ matrix.module }})
uses: cypress-io/github-action@v5
with:
tag: ${{ github.event_name }}
working-directory: ${{ matrix.module }}/frontend
build: npm run config:defaults:${{ matrix.module }}
start: npm run start:local-staging
wait-on: "http://localhost:4200"
wait-on-timeout: 120
record: true
parallel: true
spec: ${{ matrix.spec }}
group: Tests on Chrome (${{ matrix.module }})
browser: "chrome"
ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}"
env:
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}

View File

@ -0,0 +1,19 @@
name: 'Check if servers are in sync'
on: [workflow_dispatch]
jobs:
print-backend-sha:
runs-on: 'ubuntu-latest'
name: Get block height
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: repo
- name: Run script
working-directory: repo
run: |
chmod +x ./scripts/get_block_tip_height.sh
sh ./scripts/get_block_tip_height.sh

19
.github/workflows/get_backend_hash.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: 'Print backend hashes'
on: [workflow_dispatch]
jobs:
print-backend-sha:
runs-on: 'ubuntu-latest'
name: Print backend hashes
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: repo
- name: Run script
working-directory: repo
run: |
chmod +x ./scripts/get_backend_hash.sh
sh ./scripts/get_backend_hash.sh

View File

@ -68,17 +68,17 @@ jobs:
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Init repo for Dockerization
run: docker/init.sh "$TAG"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
id: qemu
- name: Setup Docker buildx action
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
id: buildx
- name: Available platforms
@ -98,8 +98,10 @@ jobs:
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--platform linux/amd64,linux/arm64 \
--tag ${{ secrets.DOCKER_HUB_USER }}/${{ matrix.service }}:$TAG \
--tag ${{ secrets.DOCKER_HUB_USER }}/${{ matrix.service }}:latest \
--build-context rustgbt=./rust \
--build-context backend=./backend \
--output "type=registry" ./${{ matrix.service }}/ \
--build-arg commitHash=$SHORT_SHA

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ backend/mempool-config.json
frontend/src/resources/config.template.js
frontend/src/resources/config.js
target
docker/backend/start_ci.sh

2
.nvmrc
View File

@ -1 +1 @@
v16.16.0
v20.8.0

View File

@ -1,8 +0,0 @@
[workspace]
members = [
"./backend/rust-gbt",
]
[profile.release]
lto = true
codegen-units = 1

View File

@ -1,47 +0,0 @@
# If you see pwd_unknown showing up check permissions
PWD ?= pwd_unknown
# DATABASE DEPLOY FOLDER CONFIG - default ./data
ifeq ($(data),)
DATA := data
export DATA
else
DATA := $(data)
export DATA
endif
.PHONY: help
help:
@echo ''
@echo ''
@echo ' Usage: make [COMMAND]'
@echo ''
@echo ' make all # build init mempool and electrs'
@echo ' make init # setup some useful configs'
@echo ' make mempool # build q dockerized mempool.space'
@echo ' make electrs # build a docker electrs image'
@echo ''
.PHONY: init
init:
@echo ''
mkdir -p $(DATA) $(DATA)/mysql $(DATA)/mysql/data
#REF: https://github.com/mempool/mempool/blob/master/docker/README.md
cat docker/docker-compose.yml > docker-compose.yml
cat backend/mempool-config.sample.json > backend/mempool-config.json
.PHONY: mempool
mempool: init
@echo ''
docker-compose up --force-recreate --always-recreate-deps
@echo ''
.PHONY: electrs
electrum:
#REF: https://hub.docker.com/r/beli/electrum
@echo ''
docker build -f docker/electrum/Dockerfile .
@echo ''
.PHONY: all
all: init
make mempool
#######################
-include Makefile

37
LICENSE
View File

@ -1,29 +1,30 @@
The Mempool Open Source Project
Copyright (c) 2019-2023 The Mempool Open Source Project Developers
The Mempool Open Source Project®
Copyright (c) 2019-2024 Mempool Space K.K. and other shadowy super-coders
This program is free software; you can redistribute it and/or modify it under
the terms of (at your option) either:
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License or any later version
approved by a proxy statement published on <https://mempool.space/about>.
1) the GNU Affero General Public License as published by the Free Software
Foundation, either version 3 of the License or any later version approved by a
proxy statement published on <https://mempool.space/about>; or
However, this copyright license does not include an implied right or license
to use any trademarks, service marks, logos, or trade names of Mempool Space K.K.
or any other contributor to The Mempool Open Source Project.
2) the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License or any later version approved by a
proxy statement published on <https://mempool.space/about>.
The Mempool Open Source Project®, Mempool Accelerator™, Mempool Enterprise®,
Mempool Liquidity™, mempool.space®, Be your own explorer™, Explore the full
Bitcoin ecosystem™, Mempool Goggles™, the mempool Logo, the mempool Square Logo,
the mempool block visualization Logo, the mempool Blocks Logo, the mempool
transaction Logo, the mempool Blocks 3 | 2 Logo, the mempool research Logo,
the mempool.space Vertical Logo, and the mempool.space Horizontal Logo are
registered trademarks or trademarks of Mempool Space K.K in Japan,
the United States, and/or other countries.
However, this copyright license does not include an implied right or license to
use our trademarks: The Mempool Open Source Project™, mempool.space™, the
mempool Logo™, the mempool.space Vertical Logo™, the mempool.space Horizontal
Logo™, the mempool Square Logo™, and the mempool Blocks logo™ are registered
trademarks or trademarks of Mempool Space K.K in Japan, the United States,
and/or other countries. See our full Trademark Policy and Guidelines for more
details, published on <https://mempool.space/trademark-policy>.
See our full Trademark Policy and Guidelines for more details, published on
<https://mempool.space/trademark-policy>.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the full license terms for more details.
You should have received a copy of both the GNU Affero General Public License
and the GNU General Public License along with this program. If not, see
<http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,675 +0,0 @@
### GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
### Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom
to share and change all versions of a program--to make sure it remains
free software for all its users. We, the Free Software Foundation, use
the GNU General Public License for most of our software; it applies
also to any other work released this way by its authors. You can apply
it to your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you
have certain responsibilities if you distribute copies of the
software, or if you modify it: responsibilities to respect the freedom
of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so. This is fundamentally incompatible with the
aim of protecting users' freedom to change the software. The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products. If such problems arise substantially in
other domains, we stand ready to extend this provision to those
domains in future versions of the GPL, as needed to protect the
freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish
to avoid the special danger that patents applied to a free program
could make it effectively proprietary. To prevent this, the GPL
assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS
#### 0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a "modified version" of
the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
An interactive user interface displays "Appropriate Legal Notices" to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
#### 1. Source Code.
The "source code" for a work means the preferred form of the work for
making modifications to it. "Object code" means any non-source form of
a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same
work.
#### 2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10 makes
it unnecessary.
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
#### 4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
#### 5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
- a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
- b) The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in section 4
to "keep intact all notices".
- c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
- d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
#### 6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:
- a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
- b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.
- c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
- d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
- e) Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the general
public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
"normally used" refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
#### 7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:
- a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
- b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
- c) Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
- d) Limiting the use for publicity purposes of names of licensors
or authors of the material; or
- e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
- f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions
of it) with contractual assumptions of liability to the recipient,
for any liability that these contractual assumptions directly
impose on those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
#### 8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
#### 9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
#### 10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
#### 11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
#### 12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree to
terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
#### 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
#### 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions
of the GNU General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in
detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU General Public
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that numbered version or
of any later version published by the Free Software Foundation. If the
Program does not specify a version number of the GNU General Public
License, you may choose any version ever published by the Free
Software Foundation.
If the Program specifies that a proxy can decide which future versions
of the GNU General Public License can be used, that proxy's public
statement of acceptance of a version permanently authorizes you to
choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
#### 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
#### 16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#### 17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively state
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper
mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands \`show w' and \`show c' should show the
appropriate parts of the General Public License. Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".
You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. For more information on this, and how to apply and follow
the GNU GPL, see <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your
program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
GNU Lesser General Public License instead of this License. But first,
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1 +0,0 @@
# For additional configs/scripting

View File

@ -1,4 +1,4 @@
# The Mempool Open Source Project [![mempool](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/ry4br7/master&style=flat-square)](https://dashboard.cypress.io/projects/ry4br7/runs)
# The Mempool Open Source Project® [![mempool](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/ry4br7/master&style=flat-square)](https://dashboard.cypress.io/projects/ry4br7/runs)
https://user-images.githubusercontent.com/93150691/226236121-375ea64f-b4a1-4cc0-8fad-a6fb33226840.mp4
@ -12,7 +12,9 @@ It is an open-source project developed and operated for the benefit of the Bitco
Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server.
**Most people should use a one-click install method.** Other install methods are meant for developers and others with experience managing servers.
Most people should use a <a href="#one-click-installation">one-click install method</a>.
Other install methods are meant for developers and others with experience managing servers. If you want support for your own production instance of Mempool, or if you'd like to have your own instance of Mempool run by the mempool.space team on their own global ISP infrastructure—check out <a href="https://mempool.space/enterprise" target="_blank">Mempool Enterprise®</a>.
<a id="one-click-installation"></a>
## One-Click Installation
@ -22,7 +24,8 @@ Mempool can be conveniently installed on the following full-node distros:
- [RaspiBlitz](https://github.com/rootzoll/raspiblitz)
- [RoninDojo](https://code.samourai.io/ronindojo/RoninDojo)
- [myNode](https://github.com/mynodebtc/mynode)
- [Start9](https://github.com/Start9Labs/embassy-os)
- [StartOS](https://github.com/Start9Labs/start-os)
- [nix-bitcoin](https://github.com/fort-nix/nix-bitcoin/blob/a1eacce6768ca4894f365af8f79be5bbd594e1c3/examples/configuration.nix#L129)
**We highly recommend you deploy your own Mempool instance this way.** No matter which option you pick, you'll be able to get your own fully-sovereign instance of Mempool up quickly without needing to fiddle with any settings.

1
backend/.dockerignore Normal file
View File

@ -0,0 +1 @@
Dockerfile

View File

@ -20,6 +20,7 @@
"@typescript-eslint/no-this-alias": 1,
"@typescript-eslint/no-var-requires": 1,
"@typescript-eslint/explicit-function-return-type": 1,
"@typescript-eslint/no-unused-vars": 1,
"no-console": 1,
"no-constant-condition": 1,
"no-dupe-else-if": 1,
@ -32,6 +33,8 @@
"prefer-rest-params": 1,
"quotes": [1, "single", { "allowTemplateLiterals": true }],
"semi": 1,
"eqeqeq": 1
"curly": [1, "all"],
"eqeqeq": 1,
"no-trailing-spaces": 1
}
}

12
backend/.gitignore vendored
View File

@ -7,6 +7,12 @@ mempool-config.json
pools.json
icons.json
# docker
Dockerfile
GeoIP
start.sh
wait-for-it.sh
# compiled output
/dist
/tmp
@ -45,3 +51,9 @@ testem.log
#System Files
.DS_Store
Thumbs.db
# package folder (npm run package output)
/package
# Rust GBT folder (We build externally first)
/rust-gbt

View File

@ -2,7 +2,7 @@
These instructions are mostly intended for developers.
If you choose to use these instructions for a production setup, be aware that you will still probably need to do additional configuration for your specific OS, environment, use-case, etc. We do our best here to provide a good starting point, but only proceed if you know what you're doing. Mempool does not provide support for custom setups.
If you choose to use these instructions for a production setup, be aware that you will still probably need to do additional configuration for your specific OS, environment, use-case, etc. We do our best here to provide a good starting point, but only proceed if you know what you're doing. Mempool only provides support for custom setups to project sponsors through [Mempool Enterprise®](https://mempool.space/enterprise).
See other ways to set up Mempool on [the main README](/../../#installation-methods).
@ -77,7 +77,7 @@ Query OK, 0 rows affected (0.00 sec)
#### Build
_Make sure to use Node.js 16.10 and npm 7._
_Make sure to use Node.js 20.x and npm 9.x or newer_
_The build process requires [Rust](https://www.rust-lang.org/tools/install) to be installed._
@ -85,7 +85,7 @@ Install dependencies with `npm` and build the backend:
```
cd backend
npm install
npm install --no-install-links # npm@9.4.2 and later can omit the --no-install-links
npm run build
```
@ -103,7 +103,7 @@ In particular, make sure:
- the correct Bitcoin Core RPC credentials are specified in `CORE_RPC`
- the correct `BACKEND` is specified in `MEMPOOL`:
- "electrum" if you're using [romanz/electrs](https://github.com/romanz/electrs) or [cculianu/Fulcrum](https://github.com/cculianu/Fulcrum)
- "esplora" if you're using [Blockstream/electrs](https://github.com/Blockstream/electrs)
- "esplora" if you're using [mempool/electrs](https://github.com/mempool/electrs)
- "none" if you're not using any Electrum Server
### 6. Run Mempool Backend
@ -181,7 +181,7 @@ Create a new wallet, if needed:
bitcoin-cli -regtest createwallet test
```
Load wallet (this command may take a while if you have lot of UTXOs):
Load wallet (this command may take a while if you have a lot of UTXOs):
```
bitcoin-cli -regtest loadwallet test
```
@ -229,13 +229,13 @@ Generate block at regular interval (every 10 seconds in this example):
### Mining pools update
By default, mining pools will be not automatically updated regularly (`config.MEMPOOL.AUTOMATIC_BLOCK_REINDEXING` is set to `false`).
By default, mining pools will be not automatically updated regularly (`config.MEMPOOL.AUTOMATIC_POOLS_UPDATE` is set to `false`).
To manually update your mining pools, you can use the `--update-pools` command line flag when you run the nodejs backend. For example `npm run start --update-pools`. This will trigger the mining pools update and automatically re-index appropriate blocks.
You can enabled the automatic mining pools update by settings `config.MEMPOOL.AUTOMATIC_BLOCK_REINDEXING` to `true` in your `mempool-config.json`.
You can enable the automatic mining pools update by settings `config.MEMPOOL.AUTOMATIC_POOLS_UPDATE` to `true` in your `mempool-config.json`.
When a `coinbase tag` or `coinbase address` change is detected, all blocks tagged to the `unknown` mining pools (starting from height 130635) will be deleted from the `blocks` table. Additionaly, all blocks which were tagged to the pool which has been updated will also be deleted from the `blocks` table. Of course, those blocks will be automatically reindexed.
When a `coinbase tag` or `coinbase address` change is detected, pool assignments for all relevant blocks (tagged to that pool or the `unknown` mining pool, starting from height 130635) are updated using the new criteria.
### Re-index tables

View File

@ -7,7 +7,7 @@ const config: Config.InitialOptions = {
automock: false,
collectCoverage: true,
collectCoverageFrom: ["./src/**/**.ts"],
coverageProvider: "babel",
coverageProvider: "v8",
coverageThreshold: {
global: {
lines: 1

View File

@ -1,5 +1,6 @@
{
"MEMPOOL": {
"OFFICIAL": false,
"NETWORK": "mainnet",
"BACKEND": "electrum",
"ENABLED": true,
@ -8,6 +9,7 @@
"API_URL_PREFIX": "/api/v1/",
"POLL_RATE_MS": 2000,
"CACHE_DIR": "./cache",
"CACHE_ENABLED": true,
"CLEAR_PROTECTION_MINUTES": 20,
"RECOMMENDED_FEE_PERCENTILE": 50,
"BLOCK_WEIGHT_UNITS": 4000000,
@ -15,30 +17,37 @@
"MEMPOOL_BLOCKS_AMOUNT": 8,
"INDEXING_BLOCKS_AMOUNT": 11000,
"BLOCKS_SUMMARIES_INDEXING": false,
"GOGGLES_INDEXING": false,
"USE_SECOND_NODE_FOR_MINFEE": false,
"EXTERNAL_ASSETS": [],
"EXTERNAL_MAX_RETRY": 1,
"EXTERNAL_RETRY_INTERVAL": 0,
"USER_AGENT": "mempool",
"STDOUT_LOG_MIN_PRIORITY": "debug",
"AUTOMATIC_BLOCK_REINDEXING": false,
"AUTOMATIC_POOLS_UPDATE": false,
"POOLS_JSON_URL": "https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json",
"POOLS_JSON_TREE_URL": "https://api.github.com/repos/mempool/mining-pools/git/trees/master",
"POOLS_UPDATE_DELAY": 604800,
"AUDIT": false,
"ADVANCED_GBT_AUDIT": false,
"ADVANCED_GBT_MEMPOOL": false,
"RUST_GBT": false,
"RUST_GBT": true,
"LIMIT_GBT": false,
"CPFP_INDEXING": false,
"DISK_CACHE_BLOCK_INTERVAL": 6,
"MAX_PUSH_TX_SIZE_WEIGHT": 4000000,
"ALLOW_UNREACHABLE": true
"ALLOW_UNREACHABLE": true,
"PRICE_UPDATES_PER_HOUR": 1,
"MAX_TRACKED_ADDRESSES": 100,
"UNIX_SOCKET_PATH": ""
},
"CORE_RPC": {
"HOST": "127.0.0.1",
"PORT": 8332,
"USERNAME": "mempool",
"PASSWORD": "mempool",
"TIMEOUT": 60000
"TIMEOUT": 60000,
"COOKIE": false,
"COOKIE_PATH": "/path/to/bitcoin/.cookie",
"DEBUG_LOG_PATH": "/path/to/bitcoin/debug.log"
},
"ELECTRUM": {
"HOST": "127.0.0.1",
@ -48,14 +57,21 @@
"ESPLORA": {
"REST_API_URL": "http://127.0.0.1:3000",
"UNIX_SOCKET_PATH": "/tmp/esplora-bitcoin-mainnet",
"RETRY_UNIX_SOCKET_AFTER": 30000
"BATCH_QUERY_BASE_SIZE": 1000,
"RETRY_UNIX_SOCKET_AFTER": 30000,
"REQUEST_TIMEOUT": 10000,
"FALLBACK_TIMEOUT": 5000,
"FALLBACK": [],
"MAX_BEHIND_TIP": 2
},
"SECOND_CORE_RPC": {
"HOST": "127.0.0.1",
"PORT": 8332,
"USERNAME": "mempool",
"PASSWORD": "mempool",
"TIMEOUT": 60000
"TIMEOUT": 60000,
"COOKIE": false,
"COOKIE_PATH": "/path/to/bitcoin/.cookie"
},
"DATABASE": {
"ENABLED": true,
@ -65,7 +81,8 @@
"DATABASE": "mempool",
"USERNAME": "mempool",
"PASSWORD": "mempool",
"TIMEOUT": 180000
"TIMEOUT": 180000,
"PID_DIR": ""
},
"SYSLOG": {
"ENABLED": true,
@ -84,10 +101,6 @@
"GEOLITE2_ASN": "/usr/local/share/GeoIP/GeoLite2-ASN.mmdb",
"GEOIP2_ISP": "/usr/local/share/GeoIP/GeoIP2-ISP.mmdb"
},
"BISQ": {
"ENABLED": false,
"DATA_PATH": "/bisq/statsnode-data/btc_mainnet/db"
},
"LIGHTNING": {
"ENABLED": false,
"BACKEND": "lnd",
@ -114,27 +127,41 @@
"USERNAME": "",
"PASSWORD": ""
},
"PRICE_DATA_SERVER": {
"TOR_URL": "http://wizpriceje6q5tdrxkyiazsgu7irquiqjy2dptezqhrtu7l2qelqktid.onion/getAllMarketPrices",
"CLEARNET_URL": "https://price.bisq.wiz.biz/getAllMarketPrices"
},
"EXTERNAL_DATA_SERVER": {
"MEMPOOL_API": "https://mempool.space/api/v1",
"MEMPOOL_ONION": "http://mempoolhqx4isw62xs7abwphsq7ldayuidyx2v2oethdhhj6mlo2r6ad.onion/api/v1",
"LIQUID_API": "https://liquid.network/api/v1",
"LIQUID_ONION": "http://liquidmom47f6s3m53ebfxn47p76a6tlnxib3wp6deux7wuzotdr6cyd.onion/api/v1",
"BISQ_URL": "https://bisq.markets/api",
"BISQ_ONION": "http://bisqmktse2cabavbr2xjq7xw3h6g5ottemo5rolfcwt6aly6tp5fdryd.onion/api"
"LIQUID_ONION": "http://liquidmom47f6s3m53ebfxn47p76a6tlnxib3wp6deux7wuzotdr6cyd.onion/api/v1"
},
"REDIS": {
"ENABLED": false,
"UNIX_SOCKET_PATH": "/tmp/redis.sock",
"BATCH_QUERY_BASE_SIZE": 5000
},
"REPLICATION": {
"ENABLED": false,
"AUDIT": false,
"AUDIT_START_HEIGHT": 774000,
"STATISTICS": false,
"STATISTICS_START_TIME": 1481932800,
"SERVERS": [
"list",
"of",
"trusted",
"servers"
]
},
"MEMPOOL_SERVICES": {
"API": "https://mempool.space/api/v1/services",
"ACCELERATIONS": false
},
"STRATUM": {
"ENABLED": false,
"API": "http://localhost:1234"
},
"FIAT_PRICE": {
"ENABLED": true,
"PAID": false,
"API_KEY": "your-api-key-from-freecurrencyapi.com"
}
}

17
backend/npm_package.sh Executable file
View File

@ -0,0 +1,17 @@
#/bin/sh
set -e
# Remove previous dist folder
rm -rf dist
# Build new dist folder
npm run build
# Remove previous package folder
rm -rf package
# Move JS and deps
mv dist package
cp -R node_modules package
# Remove symlink for rust-gbt and insert real folder
rm package/node_modules/rust-gbt
cp -R rust-gbt package/node_modules
# Clean up deps
npm run package-rm-build-deps

View File

@ -0,0 +1,9 @@
#/bin/sh
set -e
# Cleaning up inside the node_modules folder
cd package/node_modules
rm -rf \
typescript \
@typescript-eslint \
@napi-rs

1772
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "mempool-backend",
"version": "3.0.0-dev",
"version": "3.1.0-dev",
"description": "Bitcoin mempool visualizer and blockchain explorer backend",
"license": "GNU Affero General Public License v3.0",
"homepage": "https://mempool.space",
@ -22,51 +22,50 @@
"main": "index.ts",
"scripts": {
"tsc": "./node_modules/typescript/bin/tsc -p tsconfig.build.json",
"build": "npm run build-rust && npm run tsc && npm run create-resources",
"build": "npm run tsc && npm run create-resources",
"clean": "rm -rf ./dist/ ./node_modules/ ./package/ ./rust-gbt/",
"create-resources": "cp ./src/tasks/price-feeds/mtgox-weekly.json ./dist/tasks && node dist/api/fetch-version.js",
"package": "npm run build && rm -rf package && mv dist package && mv node_modules package && mv rust-gbt package && npm run package-rm-build-deps",
"package-rm-build-deps": "(cd package/node_modules; rm -r typescript @typescript-eslint @napi-rs ../rust-gbt/target ../rust-gbt/node_modules ../rust-gbt/src)",
"package": "./npm_package.sh",
"package-rm-build-deps": "./npm_package_rm_build_deps.sh",
"preinstall": "cd ../rust/gbt && npm run build-release && npm run to-backend",
"start": "node --max-old-space-size=2048 dist/index.js",
"start-production": "node --max-old-space-size=16384 dist/index.js",
"reindex-updated-pools": "npm run start-production --update-pools",
"reindex-all-blocks": "npm run start-production --update-pools --reindex-blocks",
"test": "./node_modules/.bin/jest --coverage",
"test:ci": "CI=true ./node_modules/.bin/jest --coverage",
"lint": "./node_modules/.bin/eslint . --ext .ts",
"lint:fix": "./node_modules/.bin/eslint . --ext .ts --fix",
"prettier": "./node_modules/.bin/prettier --write \"src/**/*.{js,ts}\"",
"build-rust": "cd rust-gbt && npm install"
"prettier": "./node_modules/.bin/prettier --write \"src/**/*.{js,ts}\""
},
"dependencies": {
"@babel/core": "^7.21.3",
"@mempool/electrum-client": "1.1.9",
"@types/node": "^18.15.3",
"axios": "~0.27.2",
"bitcoinjs-lib": "~6.1.0",
"crypto-js": "~4.1.1",
"express": "~4.18.2",
"maxmind": "~4.3.8",
"mysql2": "~3.2.0",
"node-worker-threads-pool": "~1.5.1",
"axios": "1.7.2",
"bitcoinjs-lib": "~6.1.3",
"crypto-js": "~4.2.0",
"express": "~4.21.1",
"maxmind": "~4.3.11",
"mysql2": "~3.12.0",
"rust-gbt": "file:./rust-gbt",
"redis": "^4.7.0",
"socks-proxy-agent": "~7.0.0",
"typescript": "~4.7.4",
"ws": "~8.13.0"
"typescript": "~4.9.3",
"ws": "~8.18.0"
},
"devDependencies": {
"@babel/core": "^7.21.3",
"@babel/code-frame": "^7.18.6",
"@types/compression": "^1.7.2",
"@types/crypto-js": "^4.1.1",
"@types/express": "^4.17.15",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.0",
"@types/ws": "~8.5.4",
"@types/ws": "~8.5.10",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-config-prettier": "^8.8.0",
"jest": "^29.5.0",
"prettier": "^2.8.4",
"ts-jest": "^29.0.5",
"prettier": "^3.0.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1"
}
}

View File

@ -1,45 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export interface ThreadTransaction {
uid: number
order: number
fee: number
weight: number
sigops: number
effectiveFeePerVsize: number
inputs: Array<number>
}
export class GbtGenerator {
constructor()
/**
* # Errors
*
* Rejects if the thread panics or if the Mutex is poisoned.
*/
make(mempool: Array<ThreadTransaction>, maxUid: number): Promise<GbtResult>
/**
* # Errors
*
* Rejects if the thread panics or if the Mutex is poisoned.
*/
update(newTxs: Array<ThreadTransaction>, removeTxs: Array<number>, maxUid: number): Promise<GbtResult>
}
/**
* The result from calling the gbt function.
*
* This tuple contains the following:
* blocks: A 2D Vector of transaction IDs (u32), the inner Vecs each represent a block.
* block_weights: A Vector of total weights per block.
* clusters: A 2D Vector of transaction IDs representing clusters of dependent mempool transactions
* rates: A Vector of tuples containing transaction IDs (u32) and effective fee per vsize (f64)
*/
export class GbtResult {
blocks: Array<Array<number>>
blockWeights: Array<number>
clusters: Array<Array<number>>
rates: Array<Array<number>>
constructor(blocks: Array<Array<number>>, blockWeights: Array<number>, clusters: Array<Array<number>>, rates: Array<Array<number>>)
}

View File

@ -1,258 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/* prettier-ignore */
/* auto-generated by NAPI-RS */
const { existsSync, readFileSync } = require('fs')
const { join } = require('path')
const { platform, arch } = process
let nativeBinding = null
let localFileExisted = false
let loadError = null
function isMusl() {
// For Node 10
if (!process.report || typeof process.report.getReport !== 'function') {
try {
const lddPath = require('child_process').execSync('which ldd').toString().trim()
return readFileSync(lddPath, 'utf8').includes('musl')
} catch (e) {
return true
}
} else {
const { glibcVersionRuntime } = process.report.getReport().header
return !glibcVersionRuntime
}
}
switch (platform) {
case 'android':
switch (arch) {
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'gbt.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./gbt.android-arm64.node')
} else {
nativeBinding = require('gbt-android-arm64')
}
} catch (e) {
loadError = e
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'gbt.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./gbt.android-arm-eabi.node')
} else {
nativeBinding = require('gbt-android-arm-eabi')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Android ${arch}`)
}
break
case 'win32':
switch (arch) {
case 'x64':
localFileExisted = existsSync(
join(__dirname, 'gbt.win32-x64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.win32-x64-msvc.node')
} else {
nativeBinding = require('gbt-win32-x64-msvc')
}
} catch (e) {
loadError = e
}
break
case 'ia32':
localFileExisted = existsSync(
join(__dirname, 'gbt.win32-ia32-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.win32-ia32-msvc.node')
} else {
nativeBinding = require('gbt-win32-ia32-msvc')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'gbt.win32-arm64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.win32-arm64-msvc.node')
} else {
nativeBinding = require('gbt-win32-arm64-msvc')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Windows: ${arch}`)
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'gbt.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./gbt.darwin-universal.node')
} else {
nativeBinding = require('gbt-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'gbt.darwin-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./gbt.darwin-x64.node')
} else {
nativeBinding = require('gbt-darwin-x64')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'gbt.darwin-arm64.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.darwin-arm64.node')
} else {
nativeBinding = require('gbt-darwin-arm64')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on macOS: ${arch}`)
}
break
case 'freebsd':
if (arch !== 'x64') {
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'gbt.freebsd-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./gbt.freebsd-x64.node')
} else {
nativeBinding = require('gbt-freebsd-x64')
}
} catch (e) {
loadError = e
}
break
case 'linux':
switch (arch) {
case 'x64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'gbt.linux-x64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.linux-x64-musl.node')
} else {
nativeBinding = require('gbt-linux-x64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'gbt.linux-x64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.linux-x64-gnu.node')
} else {
nativeBinding = require('gbt-linux-x64-gnu')
}
} catch (e) {
loadError = e
}
}
break
case 'arm64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'gbt.linux-arm64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.linux-arm64-musl.node')
} else {
nativeBinding = require('gbt-linux-arm64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'gbt.linux-arm64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.linux-arm64-gnu.node')
} else {
nativeBinding = require('gbt-linux-arm64-gnu')
}
} catch (e) {
loadError = e
}
}
break
case 'arm':
localFileExisted = existsSync(
join(__dirname, 'gbt.linux-arm-gnueabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./gbt.linux-arm-gnueabihf.node')
} else {
nativeBinding = require('gbt-linux-arm-gnueabihf')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Linux: ${arch}`)
}
break
default:
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
}
if (!nativeBinding) {
if (loadError) {
throw loadError
}
throw new Error(`Failed to load native binding`)
}
const { GbtGenerator, GbtResult } = nativeBinding
module.exports.GbtGenerator = GbtGenerator
module.exports.GbtResult = GbtResult

View File

@ -1,34 +0,0 @@
{
"name": "gbt",
"version": "3.0.0-dev",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gbt",
"version": "3.0.0-dev",
"hasInstallScript": true,
"dependencies": {
"@napi-rs/cli": "^2.16.1"
},
"engines": {
"node": ">= 12"
}
},
"node_modules/@napi-rs/cli": {
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-2.16.1.tgz",
"integrity": "sha512-L0Gr5iEQIDEbvWdDr1HUaBOxBSHL1VZhWSk1oryawoT8qJIY+KGfLFelU+Qma64ivCPbxYpkfPoKYVG3rcoGIA==",
"bin": {
"napi": "scripts/index.js"
},
"engines": {
"node": ">= 10"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/Brooooooklyn"
}
}
}
}

View File

@ -1,33 +0,0 @@
{
"name": "gbt",
"version": "3.0.0-dev",
"description": "An inefficient re-implementation of the getBlockTemplate algorithm in Rust",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform",
"build-debug": "npm run build",
"build-release": "npm run build -- --release --strip",
"install": "npm run build-release",
"prepublishOnly": "napi prepublish -t npm",
"test": "cargo test"
},
"author": "mononaut",
"napi": {
"name": "gbt",
"triples": {
"defaults": false,
"additional": [
"x86_64-unknown-linux-gnu",
"x86_64-unknown-freebsd"
]
}
},
"dependencies": {
"@napi-rs/cli": "^2.16.1"
},
"engines": {
"node": ">= 12"
}
}

View File

@ -1,15 +1,19 @@
{
"MEMPOOL": {
"ENABLED": true,
"OFFICIAL": false,
"NETWORK": "__MEMPOOL_NETWORK__",
"BACKEND": "__MEMPOOL_BACKEND__",
"BLOCKS_SUMMARIES_INDEXING": true,
"GOGGLES_INDEXING": false,
"HTTP_PORT": 1,
"UNIX_SOCKET_PATH": "/mempool/socket/mempool-bitcoin-mainnet",
"SPAWN_CLUSTER_PROCS": 2,
"API_URL_PREFIX": "__MEMPOOL_API_URL_PREFIX__",
"AUTOMATIC_BLOCK_REINDEXING": false,
"AUTOMATIC_POOLS_UPDATE": false,
"POLL_RATE_MS": 3,
"CACHE_DIR": "__MEMPOOL_CACHE_DIR__",
"CACHE_ENABLED": true,
"CLEAR_PROTECTION_MINUTES": 4,
"RECOMMENDED_FEE_PERCENTILE": 5,
"BLOCK_WEIGHT_UNITS": 6,
@ -22,24 +26,29 @@
"USER_AGENT": "__MEMPOOL_USER_AGENT__",
"STDOUT_LOG_MIN_PRIORITY": "__MEMPOOL_STDOUT_LOG_MIN_PRIORITY__",
"INDEXING_BLOCKS_AMOUNT": 14,
"POOLS_JSON_TREE_URL": "__POOLS_JSON_TREE_URL__",
"POOLS_JSON_URL": "__POOLS_JSON_URL__",
"POOLS_JSON_TREE_URL": "__MEMPOOL_POOLS_JSON_TREE_URL__",
"POOLS_JSON_URL": "__MEMPOOL_POOLS_JSON_URL__",
"POOLS_UPDATE_DELAY": 604800,
"AUDIT": true,
"ADVANCED_GBT_AUDIT": true,
"ADVANCED_GBT_MEMPOOL": true,
"RUST_GBT": false,
"LIMIT_GBT": false,
"CPFP_INDEXING": true,
"MAX_BLOCKS_BULK_QUERY": 999,
"DISK_CACHE_BLOCK_INTERVAL": 999,
"MAX_PUSH_TX_SIZE_WEIGHT": 4000000,
"ALLOW_UNREACHABLE": true
"ALLOW_UNREACHABLE": true,
"PRICE_UPDATES_PER_HOUR": 1,
"MAX_TRACKED_ADDRESSES": 1
},
"CORE_RPC": {
"HOST": "__CORE_RPC_HOST__",
"PORT": 15,
"USERNAME": "__CORE_RPC_USERNAME__",
"PASSWORD": "__CORE_RPC_PASSWORD__",
"TIMEOUT": 1000
"TIMEOUT": 1000,
"COOKIE": false,
"COOKIE_PATH": "__CORE_RPC_COOKIE_PATH__",
"DEBUG_LOG_PATH": "__CORE_RPC_DEBUG_LOG_PATH__"
},
"ELECTRUM": {
"HOST": "__ELECTRUM_HOST__",
@ -49,14 +58,21 @@
"ESPLORA": {
"REST_API_URL": "__ESPLORA_REST_API_URL__",
"UNIX_SOCKET_PATH": "__ESPLORA_UNIX_SOCKET_PATH__",
"RETRY_UNIX_SOCKET_AFTER": 888
"BATCH_QUERY_BASE_SIZE": 1000,
"RETRY_UNIX_SOCKET_AFTER": 888,
"REQUEST_TIMEOUT": 10000,
"FALLBACK_TIMEOUT": 5000,
"FALLBACK": [],
"MAX_BEHIND_TIP": 2
},
"SECOND_CORE_RPC": {
"HOST": "__SECOND_CORE_RPC_HOST__",
"PORT": 17,
"USERNAME": "__SECOND_CORE_RPC_USERNAME__",
"PASSWORD": "__SECOND_CORE_RPC_PASSWORD__",
"TIMEOUT": 2000
"TIMEOUT": 2000,
"COOKIE": false,
"COOKIE_PATH": "__SECOND_CORE_RPC_COOKIE_PATH__"
},
"DATABASE": {
"ENABLED": false,
@ -66,7 +82,9 @@
"DATABASE": "__DATABASE_DATABASE__",
"USERNAME": "__DATABASE_USERNAME__",
"PASSWORD": "__DATABASE_PASSWORD__",
"TIMEOUT": 3000
"PID_DIR": "__DATABASE_PID_FILE__",
"TIMEOUT": 3000,
"POOL_SIZE": 100
},
"SYSLOG": {
"ENABLED": false,
@ -79,10 +97,6 @@
"ENABLED": false,
"TX_PER_SECOND_SAMPLE_PERIOD": 20
},
"BISQ": {
"ENABLED": true,
"DATA_PATH": "__BISQ_DATA_PATH__"
},
"SOCKS5PROXY": {
"ENABLED": true,
"USE_ONION": true,
@ -91,17 +105,11 @@
"USERNAME": "__SOCKS5PROXY_USERNAME__",
"PASSWORD": "__SOCKS5PROXY_PASSWORD__"
},
"PRICE_DATA_SERVER": {
"TOR_URL": "__PRICE_DATA_SERVER_TOR_URL__",
"CLEARNET_URL": "__PRICE_DATA_SERVER_CLEARNET_URL__"
},
"EXTERNAL_DATA_SERVER": {
"MEMPOOL_API": "__EXTERNAL_DATA_SERVER_MEMPOOL_API__",
"MEMPOOL_ONION": "__EXTERNAL_DATA_SERVER_MEMPOOL_ONION__",
"LIQUID_API": "__EXTERNAL_DATA_SERVER_LIQUID_API__",
"LIQUID_ONION": "__EXTERNAL_DATA_SERVER_LIQUID_ONION__",
"BISQ_URL": "__EXTERNAL_DATA_SERVER_BISQ_URL__",
"BISQ_ONION": "__EXTERNAL_DATA_SERVER_BISQ_ONION__"
"LIQUID_ONION": "__EXTERNAL_DATA_SERVER_LIQUID_ONION__"
},
"LIGHTNING": {
"ENABLED": true,
@ -126,6 +134,26 @@
"ENABLED": false,
"AUDIT": false,
"AUDIT_START_HEIGHT": 774000,
"STATISTICS": false,
"STATISTICS_START_TIME": 1481932800,
"SERVERS": []
},
"MEMPOOL_SERVICES": {
"API": "",
"ACCELERATIONS": false
},
"REDIS": {
"ENABLED": false,
"UNIX_SOCKET_PATH": "/tmp/redis.sock",
"BATCH_QUERY_BASE_SIZE": 5000
},
"FIAT_PRICE": {
"ENABLED": true,
"PAID": false,
"API_KEY": "__MEMPOOL_CURRENCY_API_KEY__"
},
"STRATUM": {
"ENABLED": false,
"API": "http://localhost:1234"
}
}

View File

@ -0,0 +1,40 @@
import { Common } from '../../api/common';
import { MempoolTransactionExtended, TransactionExtended } from '../../mempool.interfaces';
const randomTransactions = require('./test-data/transactions-random.json');
const replacedTransactions = require('./test-data/transactions-replaced.json');
const rbfTransactions = require('./test-data/transactions-rbfs.json');
const nonStandardTransactions = require('./test-data/non-standard-txs.json');
describe('Common', () => {
describe('RBF', () => {
const newTransactions = rbfTransactions.concat(randomTransactions);
test('should detect RBF transactions with fast method', () => {
const result: { [txid: string]: { replaced: MempoolTransactionExtended[], replacedBy: TransactionExtended }} = Common.findRbfTransactions(newTransactions, replacedTransactions);
expect(Object.values(result).length).toEqual(2);
expect(result).toHaveProperty('7219d95161f3718335991ac6d967d24eedec370908c9879bb1e192e6d797d0a6');
expect(result).toHaveProperty('5387881d695d4564d397026dc5f740f816f8390b4b2c5ec8c20309122712a875');
});
test('should detect RBF transactions with scalable method', () => {
const result: { [txid: string]: { replaced: MempoolTransactionExtended[], replacedBy: TransactionExtended }} = Common.findRbfTransactions(newTransactions, replacedTransactions, true);
expect(Object.values(result).length).toEqual(2);
expect(result).toHaveProperty('7219d95161f3718335991ac6d967d24eedec370908c9879bb1e192e6d797d0a6');
expect(result).toHaveProperty('5387881d695d4564d397026dc5f740f816f8390b4b2c5ec8c20309122712a875');
});
});
describe('Mempool Goggles', () => {
test('should detect nonstandard transactions', () => {
nonStandardTransactions.forEach((tx) => {
expect(Common.isNonStandard(tx)).toEqual(true);
});
});
test('should not misclassify as nonstandard transactions', () => {
randomTransactions.forEach((tx) => {
expect(Common.isNonStandard(tx)).toEqual(false);
});
});
});
});

View File

@ -1,4 +1,8 @@
import { calcDifficultyAdjustment, DifficultyAdjustment } from '../../api/difficulty-adjustment';
import {
calcBitsDifference,
calcDifficultyAdjustment,
DifficultyAdjustment,
} from '../../api/difficulty-adjustment';
describe('Mempool Difficulty Adjustment', () => {
test('should calculate Difficulty Adjustments properly', () => {
@ -7,9 +11,35 @@ describe('Mempool Difficulty Adjustment', () => {
};
const vectors = [
[ // Vector 1
[ // Vector 1 (normal adjustment)
[ // Inputs
dt('2024-02-02T15:42:06.000Z'), // Last DA time (in seconds)
dt('2024-02-08T14:43:05.000Z'), // timestamp of 504 blocks ago (in seconds)
dt('2024-02-11T22:43:01.000Z'), // Current time (now) (in seconds)
830027, // Current block height
7.333505241141637, // Previous retarget % (Passed through)
'mainnet', // Network (if testnet, next value is non-zero)
0, // Latest block timestamp in seconds (only used if difficulty already locked in)
],
{ // Expected Result
progressPercent: 71.97420634920636,
difficultyChange: 8.512745140778843,
estimatedRetargetDate: 1708004001715,
remainingBlocks: 565,
remainingTime: 312620715,
previousRetarget: 7.333505241141637,
previousTime: 1706888526,
nextRetargetHeight: 830592,
timeAvg: 553311,
adjustedTimeAvg: 553311,
timeOffset: 0,
expectedBlocks: 1338.0916666666667,
},
],
[ // Vector 2 (within quarter-epoch overlap)
[ // Inputs
dt('2022-08-18T11:07:00.000Z'), // Last DA time (in seconds)
dt('2022-08-16T03:16:54.000Z'), // timestamp of 504 blocks ago (in seconds)
dt('2022-08-19T14:03:53.000Z'), // Current time (now) (in seconds)
750134, // Current block height
0.6280047707459726, // Previous retarget % (Passed through)
@ -18,21 +48,23 @@ describe('Mempool Difficulty Adjustment', () => {
],
{ // Expected Result
progressPercent: 9.027777777777777,
difficultyChange: 13.180707740199772,
estimatedRetargetDate: 1661895424692,
difficultyChange: 1.0420538959004633,
estimatedRetargetDate: 1662009048328,
remainingBlocks: 1834,
remainingTime: 977591692,
remainingTime: 1091215328,
previousRetarget: 0.6280047707459726,
previousTime: 1660820820,
nextRetargetHeight: 751968,
timeAvg: 533038,
adjustedTimeAvg: 594992,
timeOffset: 0,
expectedBlocks: 161.68833333333333,
},
],
[ // Vector 2 (testnet)
[ // Vector 3 (testnet)
[ // Inputs
dt('2022-08-18T11:07:00.000Z'), // Last DA time (in seconds)
dt('2022-08-16T03:16:54.000Z'), // timestamp of 504 blocks ago (in seconds)
dt('2022-08-19T14:03:53.000Z'), // Current time (now) (in seconds)
750134, // Current block height
0.6280047707459726, // Previous retarget % (Passed through)
@ -41,22 +73,24 @@ describe('Mempool Difficulty Adjustment', () => {
],
{ // Expected Result is same other than timeOffset
progressPercent: 9.027777777777777,
difficultyChange: 13.180707740199772,
estimatedRetargetDate: 1661895424692,
difficultyChange: 1.0420538959004633,
estimatedRetargetDate: 1662009048328,
remainingBlocks: 1834,
remainingTime: 977591692,
remainingTime: 1091215328,
previousTime: 1660820820,
previousRetarget: 0.6280047707459726,
nextRetargetHeight: 751968,
timeAvg: 533038,
adjustedTimeAvg: 594992,
timeOffset: -667000, // 11 min 7 seconds since last block (testnet only)
// If we add time avg to abs(timeOffset) it makes exactly 1200000 ms, or 20 minutes
expectedBlocks: 161.68833333333333,
},
],
[ // Vector 3 (mainnet lock-in (epoch ending 788255))
[ // Vector 4 (mainnet lock-in (epoch ending 788255))
[ // Inputs
dt('2023-04-20T09:57:33.000Z'), // Last DA time (in seconds)
dt('2022-08-16T03:16:54.000Z'), // timestamp of 504 blocks ago (in seconds)
dt('2023-05-04T14:54:09.000Z'), // Current time (now) (in seconds)
788255, // Current block height
1.7220298879531821, // Previous retarget % (Passed through)
@ -73,17 +107,60 @@ describe('Mempool Difficulty Adjustment', () => {
previousTime: 1681984653,
nextRetargetHeight: 788256,
timeAvg: 609129,
adjustedTimeAvg: 609129,
timeOffset: 0,
expectedBlocks: 2045.66,
},
],
] as [[number, number, number, number, string, number], DifficultyAdjustment][];
] as [[number, number, number, number, number, string, number], DifficultyAdjustment][];
for (const vector of vectors) {
const result = calcDifficultyAdjustment(...vector[0]);
// previousRetarget is passed through untouched
expect(result.previousRetarget).toStrictEqual(vector[0][3]);
expect(result.previousRetarget).toStrictEqual(vector[0][4]);
expect(result).toStrictEqual(vector[1]);
}
});
test('should calculate Difficulty change from bits fields of two blocks', () => {
// Check same exponent + check min max for output
expect(calcBitsDifference(0x1d000200, 0x1d000100)).toEqual(100);
expect(calcBitsDifference(0x1d000400, 0x1d000100)).toEqual(300);
expect(calcBitsDifference(0x1d000800, 0x1d000100)).toEqual(300); // Actually 700
expect(calcBitsDifference(0x1d000100, 0x1d000200)).toEqual(-50);
expect(calcBitsDifference(0x1d000100, 0x1d000400)).toEqual(-75);
expect(calcBitsDifference(0x1d000100, 0x1d000800)).toEqual(-75); // Actually -87.5
// Check new higher exponent
expect(calcBitsDifference(0x1c000200, 0x1d000001)).toEqual(100);
expect(calcBitsDifference(0x1c000400, 0x1d000001)).toEqual(300);
expect(calcBitsDifference(0x1c000800, 0x1d000001)).toEqual(300);
expect(calcBitsDifference(0x1c000100, 0x1d000002)).toEqual(-50);
expect(calcBitsDifference(0x1c000100, 0x1d000004)).toEqual(-75);
expect(calcBitsDifference(0x1c000100, 0x1d000008)).toEqual(-75);
// Check new lower exponent
expect(calcBitsDifference(0x1d000002, 0x1c000100)).toEqual(100);
expect(calcBitsDifference(0x1d000004, 0x1c000100)).toEqual(300);
expect(calcBitsDifference(0x1d000008, 0x1c000100)).toEqual(300);
expect(calcBitsDifference(0x1d000001, 0x1c000200)).toEqual(-50);
expect(calcBitsDifference(0x1d000001, 0x1c000400)).toEqual(-75);
expect(calcBitsDifference(0x1d000001, 0x1c000800)).toEqual(-75);
// Check error when exponents are too far apart
expect(() => calcBitsDifference(0x1d000001, 0x1a000800)).toThrow(
/Impossible exponent difference/
);
// Check invalid inputs
expect(() => calcBitsDifference(0x7f000001, 0x1a000800)).toThrow(
/Invalid bits/
);
expect(() => calcBitsDifference(0, 0x1a000800)).toThrow(/Invalid bits/);
expect(() => calcBitsDifference(100.2783, 0x1a000800)).toThrow(
/Invalid bits/
);
expect(() => calcBitsDifference(0x00800000, 0x1a000800)).toThrow(
/Invalid bits/
);
expect(() => calcBitsDifference(0x1c000000, 0x1a000800)).toThrow(
/Invalid bits/
);
});
});

View File

@ -0,0 +1,52 @@
[
{
"txid": "50136231cb7eeeffb17fc41d1cca213426abe5bf3760e3d6421cad0c0edad367",
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "c7f86fb7b830124057475b282809f3474ef3565daa3de0b599980fb9e84ab019",
"vout": 4217,
"prevout": {
"scriptpubkey": "001466197b5eadd8067ec194a457e1044b6d1fbdd3b3",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 66197b5eadd8067ec194a457e1044b6d1fbdd3b3",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qvcvhkh4dmqr8asv553t7zpztd50mm5ang4na33",
"value": 106
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"3043021f2af6060a142c6cfd7428adad6a50745d2424813d7ced5c0bbcca85e70de1be022021440ca1c8c3ed49ecd1b64dca6911adcd430c5d3dd60d77ffe0072953999f5b01",
"02ead5c34e3d2c506574b562f857576e11380b6ba15d9f0ad7b7303fdaa9c1513d"
],
"is_coinbase": false,
"sequence": 4294967295
}
],
"vout": [
{
"scriptpubkey": "6a023a29",
"scriptpubkey_asm": "OP_RETURN OP_PUSHBYTES_2 3a29",
"scriptpubkey_type": "op_return",
"value": 0
},
{
"scriptpubkey": "6a036d7648",
"scriptpubkey_asm": "OP_RETURN OP_PUSHBYTES_3 6d7648",
"scriptpubkey_type": "op_return",
"value": 0
}
],
"size": 186,
"weight": 420,
"sigops": 1,
"fee": 106,
"status": {
"confirmed": true,
"block_height": 836361,
"block_hash": "0000000000000000000341cc26cda4af82cd25f7063c448772228cbf2836915b",
"block_time": 1711448028
}
}
]

View File

@ -0,0 +1,600 @@
[
{
"txid": "13f007241d78e8b0b4e57d2ae3fd37bcfe3226534d7cadeba5a549860d960db0",
"version": 2,
"locktime": 0,
"vin": [
{
"txid": "cb8f206f4e88bec97107089f3e9e61d50cde53d4541992ae19759b71103cf75c",
"vout": 0,
"prevout": {
"scriptpubkey": "0014fd6d15ff832c12f1ff04a5ccd5039f7227b260bd",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 fd6d15ff832c12f1ff04a5ccd5039f7227b260bd",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1ql4k3tlur9sf0rlcy5hxd2qulwgnmyc9akehvth",
"value": 610677
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304302205c430b36ebd2bb327951d83440af1f58f127871b2baada4c4dde2bc0b6721f56021f3445099f1a40e35baeda32e8e3727b505ffba0d882b11f498c7762f4184e9901",
"0236b5edd4fbbcfb045960e42ec8a9968944084785932e32940e8cd2583b37da67"
],
"is_coinbase": false,
"sequence": 2147483648
}
],
"vout": [
{
"scriptpubkey": "76a9149d32ef812385f3811634e0c0117dd153a5de10a488ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 9d32ef812385f3811634e0c0117dd153a5de10a4 OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1FLC7Bag7okAkKPCyZbgZZg3Hh1EuGZ5Rd",
"value": 344697
},
{
"scriptpubkey": "00147dee8a7a38abbfb00dbfba365c8d6712934cc491",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 7dee8a7a38abbfb00dbfba365c8d6712934cc491",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q0hhg573c4wlmqrdlhgm9ert8z2f5e3y3lf9hvx",
"value": 265396
}
],
"size": 224,
"weight": 572,
"fee": 584,
"status": {
"confirmed": false
},
"order": 2953680397,
"vsize": 143,
"adjustedVsize": 143,
"sigops": 5,
"feePerVsize": 4.083916083916084,
"adjustedFeePerVsize": 4.083916083916084,
"effectiveFeePerVsize": 4.083916083916084,
"firstSeen": 1691222538,
"uid": 526973,
"inputs": [
526728
],
"position": {
"block": 7,
"vsize": 21429708.5
},
"bestDescendant": null,
"cpfpChecked": true
},
{
"txid": "8e89b20f8a7fadb0e4cdbe57a00eee224f5076bac5387fc276916724e7c4a16a",
"version": 2,
"locktime": 800571,
"vin": [
{
"txid": "35e16762459539f3a8e52c5dee6a9ccaa9e9268efed33aa2c6e1b7805e849f24",
"vout": 0,
"prevout": {
"scriptpubkey": "0014d4f16ef275b3e1c4a4ecbef55a164933e0f6460f",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 d4f16ef275b3e1c4a4ecbef55a164933e0f6460f",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q6nckaun4k0suff8vhm6459jfx0s0v3s0ff4ukl",
"value": 1528924
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"3044022019008b26e885bb43da25a11ffac147a057722072eedb68411f114f6e7eb82ebc02201b618264bb97756b88fc3bbc365b73044ac18b33b1067e31cfd5bcd0f50ed2c701",
"039b71145070bd3e8af28e27fa577f2e12ab6bb4e212d3eeaef08b4bc39e8cbc13"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "67c27ed0f767526234bcd5f795a31fab8ec4d0251bf12c68f2746951f4110d90",
"vout": 3,
"prevout": {
"scriptpubkey": "0014a7c3d613b321375054b2ac9b6114367bc034ad6f",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 a7c3d613b321375054b2ac9b6114367bc034ad6f",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q5lpavyanyym4q49j4jdkz9pk00qrftt0yqzvk3",
"value": 436523
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304402204e67285fc656bc45ed082499b076d5dba2fa21d0d7e64a0ae52b19d69a11760002200f037d81ee540b74397844513b72b08ed92b06db76bd20b08f7a0a3b36ab13d501",
"02a3ebae85f0225b6fbb5ff060afce683a4683507a57544605a29ee7d287e591b4"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "21c38fb9a2521e438c614f53b19ddd7a5594bcc4b77480e762fd4b702fad3374",
"vout": 1,
"prevout": {
"scriptpubkey": "00149660e34ef88106536c816c037b5b28dd64a812e2",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 9660e34ef88106536c816c037b5b28dd64a812e2",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qjeswxnhcsyr9xmypdsphkkegm4j2syhztgzxv4",
"value": 758149
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"3044022021b556f0aa99329076bcc435338aceaf534963efcab306931b1b2b0461e16e0c02203a78942a3745c4da656bddfd8cf16b85dc04d652904e88682127cdd9ca63339001",
"0298963be4a8f66aca9fcf1c6dc95547aeaa82347543190c91e094c2321142b9f0"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "aa998dbae65240a7386bf7d468459551d99c3de8e2f9057ff5f2d38e17daf788",
"vout": 0,
"prevout": {
"scriptpubkey": "00147bb7413a39943b21ded98ad5e6ad7a222d273e17",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 7bb7413a39943b21ded98ad5e6ad7a222d273e17",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q0wm5zw3ejsajrhke3t27dtt6ygkjw0sh9lltg6",
"value": 1067200
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304402205e2269f7d4ee0513b34354c38e920aef2dabac6f4350afb2dd105ff3ee43ae7b02202870322f2cb85cb0b2b0e38152f018bfff271dc3ec5aed0515854d0b259aaf3d01",
"03b87320cf3263a644a0d3f89c1b4a7304d9dfda9eb8c891560716abcb73e88b99"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "230253d195d779d4688ba16993985cd27b2e7a687d8b889b3bc63f19ece36f20",
"vout": 0,
"prevout": {
"scriptpubkey": "001439647bd997819d12dfc72b0fb9ff9ffcb84946f8",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 39647bd997819d12dfc72b0fb9ff9ffcb84946f8",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q89j8hkvhsxw39h789v8mnlulljuyj3hc9zve97",
"value": 361950
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304402204f7ca868bb9b92a07fecdc6b9dd56e4e1d007ca1405952f98ed6bc416345b5f2022055320a97791417abf6628fcf6513ac5785b06c630f854d8595e96ea06c3841d301",
"03a3ffe8e3ef2eea129b227e9658164bae0a6d21c17da6de9973ba34d9e04b21a0"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "670771e265a0b62dbd3c1fec2b865177eaf0bafd0ae49dd40a1c9fcd9a847a81",
"vout": 0,
"prevout": {
"scriptpubkey": "0014d45d1b0022c7387e42c5452ced561bdb8fd4b521",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 d45d1b0022c7387e42c5452ced561bdb8fd4b521",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q63w3kqpzcuu8usk9g5kw64smmw8afdfpxmc2m0",
"value": 453275
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"3044022071312921800441903b2099e723add8702dd0f92ec11526ff87acf6967ec64cbd02203deabe7ed56d5daaa9a95c5a607b1ab705ff1c46bc6984a6dca120e63a91768601",
"0257302ac8d9c4c8f9b1744f19bb432359326b9cc7bdddeeab9202749a6d92be58"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "0af82159eee2b69242f2ff032636e410b67ec1ace52e55fb0d20ed814cd64803",
"vout": 0,
"prevout": {
"scriptpubkey": "001459e4d6bfefc6b45f955a69c4aeca26348e9d54ed",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 59e4d6bfefc6b45f955a69c4aeca26348e9d54ed",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qt8jdd0l0c669l926d8z2aj3xxj8f648dtyn7tc",
"value": 439961
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"3044022027540322e92c23c5513aa2587e7feb56a8ce82f879269d6b3cbd425634b44f8e022045572dee7262b02130bfe32d8aa8abbfaa64e101abfc819bba5380c78876692d01",
"03fe02262d87f4a5289d3dd66e3d9a74cd49fa1cad0249284a7451896a827249a5"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "68cf9c784870a4f888f044755f7ce318557f652461db8ef887d279672f186018",
"vout": 0,
"prevout": {
"scriptpubkey": "001454822b2d5d52597a78b630921cf439a41e32f2f9",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 54822b2d5d52597a78b630921cf439a41e32f2f9",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q2jpzkt2a2fvh579kxzfpeape5s0r9uhewhl5n4",
"value": 227639
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304402203ad511d6a8730748b8828bc38897d360451adf620ebdc1d229c08c097c80bef202202f50c793d95b5200cf2258e03896a3be7720df0eb3b8c810c86db74341a7e83e01",
"0294992e9f4546e6e119741f908411ae531e9d1ff732d69b4dff8172aaf2a4b216"
],
"is_coinbase": false,
"sequence": 4294967293
},
{
"txid": "793f01dfdb19bf41f958fd917c16d9c4dd5d5e1a5c0434bfdb367212659d1b5b",
"vout": 0,
"prevout": {
"scriptpubkey": "0014f54edf8ae647b5300e2674523254e923d93d169f",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 f54edf8ae647b5300e2674523254e923d93d169f",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q748dlzhxg76nqr3xw3fry48fy0vn695lvhlkxv",
"value": 227070
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304402206e807ab616f4f2887ba703ae744d856142d9aca8128698419bbb67fb4fad8177022060fc65c7cd66baa88ad1e1d317a6edd5f6cb52fe8bff6e5405ffa1acf9d945d901",
"02a0ad0167c6e9edf62677404d74d3b80ea276e47e758ffaa6ca17bd65ac79f7aa"
],
"is_coinbase": false,
"sequence": 4294967293
}
],
"vout": [
{
"scriptpubkey": "00148a5c45ccfc29d209940d94525e2edb7743a1ad8a",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 8a5c45ccfc29d209940d94525e2edb7743a1ad8a",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q3fwytn8u98fqn9qdj3f9utkmwap6rtv2ym33zm",
"value": 5500000
}
],
"size": 1375,
"weight": 2605,
"fee": 691,
"status": {
"confirmed": false
},
"order": 1788986599,
"vsize": 651,
"adjustedVsize": 651.25,
"sigops": 9,
"feePerVsize": 1.0610364683301343,
"adjustedFeePerVsize": 1.0610364683301343,
"effectiveFeePerVsize": 1.0610364683301343,
"firstSeen": 1691163298,
"uid": 120494,
"inputs": [],
"position": {
"block": 7,
"vsize": 93780091.5
},
"bestDescendant": null,
"cpfpChecked": true
},
{
"txid": "20b984492b5264162a4c92c9a34bc7fa08b67d669de7b4c5982ad3cb28aaecf6",
"version": 2,
"locktime": 0,
"vin": [
{
"txid": "3adda6afd547193793c248e667c2b7dbf26d705003de65e3a25e5be698286aef",
"vout": 2,
"prevout": {
"scriptpubkey": "0014989cf12774fc705609610c7b9419f2d1c4807644",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 989cf12774fc705609610c7b9419f2d1c4807644",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qnzw0zfm5l3c9vztpp3aegx0j68zgqajyffr2r6",
"value": 27619
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304402205d7f1e0d928982645c2bcc4c730c4545c382d6520c2a14eebc71594702cd06b302200511d452ce51c79017536f50acb115eefe7c04506ad12b9307d2b5d56b999beb01",
"03716cb4f0430fe69c596a12c6680c55803150645989b406772838d548cde7cca5"
],
"is_coinbase": false,
"sequence": 4294967295
}
],
"vout": [
{
"scriptpubkey": "6a5d0614c0a2331441",
"scriptpubkey_asm": "OP_RETURN OP_PUSHNUM_13 OP_PUSHBYTES_6 14c0a2331441",
"scriptpubkey_type": "op_return",
"value": 0
},
{
"scriptpubkey": "5114d71c6c3ea7ba7e6ee477a0bfd82c20c78997882c",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_20 d71c6c3ea7ba7e6ee477a0bfd82c20c78997882c",
"scriptpubkey_type": "unknown",
"scriptpubkey_address": "bc1p6uwxc048hflxaerh5zlastpqc7ye0zpvq7gq2a",
"value": 546
},
{
"scriptpubkey": "0014989cf12774fc705609610c7b9419f2d1c4807644",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 989cf12774fc705609610c7b9419f2d1c4807644",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qnzw0zfm5l3c9vztpp3aegx0j68zgqajyffr2r6",
"value": 23073
}
],
"size": 240,
"weight": 633,
"sigops": 1,
"fee": 4000,
"status": {
"confirmed": true,
"block_height": 848136,
"block_hash": "00000000000000000002c69c7a3010fcd596c0c7451c23e7cd1f5e19ebf8ee6d",
"block_time": 1718517071
}
},
{
"txid": "b10c0000004da5a9d1d9b4ae32e09f0b3e62d21a5cce5428d4ad714fb444eb5d",
"version": 1,
"locktime": 1231006505,
"vin": [
{
"txid": "d46a24962c1d7bd6e87d80570c6a53413eaf30d7fde7f52347f13645ae53969b",
"vout": 0,
"prevout": {
"scriptpubkey": "41049434a2dd7c5b82df88f578f8d7fd14e8d36513aaa9c003eb5bd6cb56065e44b7e0227139e8a8e68e7de0a4ed32b8c90edc9673b8a7ea541b52f2a22196f7b8cfac",
"scriptpubkey_asm": "OP_PUSHBYTES_65 049434a2dd7c5b82df88f578f8d7fd14e8d36513aaa9c003eb5bd6cb56065e44b7e0227139e8a8e68e7de0a4ed32b8c90edc9673b8a7ea541b52f2a22196f7b8cf OP_CHECKSIG",
"scriptpubkey_type": "p2pk",
"value": 6102
},
"scriptsig": "473044022004f027ae0b19bb7a7aa8fcdf135f1da769d087342020359ef4099a9f0f0ba4ec02206a83a9b78df3fed89a3b6052e69963e1fb08d8f6d17d945e43b51b5214aa41e601",
"scriptsig_asm": "OP_PUSHBYTES_71 3044022004f027ae0b19bb7a7aa8fcdf135f1da769d087342020359ef4099a9f0f0ba4ec02206a83a9b78df3fed89a3b6052e69963e1fb08d8f6d17d945e43b51b5214aa41e601",
"is_coinbase": false,
"sequence": 20090103
},
{
"txid": "cb9b47ac04023b29fb633a8ef04af351ac9fd74c57c9a2163f683516274767e3",
"vout": 0,
"prevout": {
"scriptpubkey": "76a914bbb1f7d0f7e15ac088af9bafe25aaac1a59832d088ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 bbb1f7d0f7e15ac088af9bafe25aaac1a59832d0 OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1J7SZJry7CX4zWdH3P8E8UJjZrhcLEjJ39",
"value": 1913
},
"scriptsig": "46304302204dc2939be89ab6626457fff40aec2cc4e6213e64bcb4d2c43bf6b49358ff638c021f33d2f8fdf6d54a2c82bb7cddc62becc2cbbaca6fd7f3ec927ea975f29ad8510221028b98707adfd6f468d56c1a6067a6f0c7fef43afbacad45384017f8be93a18d40",
"scriptsig_asm": "OP_PUSHBYTES_70 304302204dc2939be89ab6626457fff40aec2cc4e6213e64bcb4d2c43bf6b49358ff638c021f33d2f8fdf6d54a2c82bb7cddc62becc2cbbaca6fd7f3ec927ea975f29ad85102 OP_PUSHBYTES_33 028b98707adfd6f468d56c1a6067a6f0c7fef43afbacad45384017f8be93a18d40",
"is_coinbase": false,
"sequence": 20081031
},
{
"txid": "cb9b47ac04023b29fb633a8ef04af351ac9fd74c57c9a2163f683516274767e3",
"vout": 1,
"prevout": {
"scriptpubkey": "52210304e708d258a632ffb128a62ecf5eebd1904e505497d031619513afc8bca7858f2102b9dc03f1133e7cbc7eb311631acc2dbda908fb0f0fae095da2f4dd427f51308a4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f53ae",
"scriptpubkey_asm": "OP_PUSHNUM_2 OP_PUSHBYTES_33 0304e708d258a632ffb128a62ecf5eebd1904e505497d031619513afc8bca7858f OP_PUSHBYTES_33 02b9dc03f1133e7cbc7eb311631acc2dbda908fb0f0fae095da2f4dd427f51308a OP_PUSHBYTES_65 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_PUSHNUM_3 OP_CHECKMULTISIG",
"scriptpubkey_type": "multisig",
"value": 1971
},
"scriptsig": "00453042021e4f6ff73d7b304a5cbf3bb7738abb5f81a4af6335962134ce27a1cc45fec702201b95e3acb7db93257b20651cdcb79af66bf0bb86a8ae5b4e0a5df4e3f86787e2033b303802153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63021f34793e2878497561e7616291ebdda3024b681cdacc8b863b5b0804cd30c2a481",
"scriptsig_asm": "OP_0 OP_PUSHBYTES_69 3042021e4f6ff73d7b304a5cbf3bb7738abb5f81a4af6335962134ce27a1cc45fec702201b95e3acb7db93257b20651cdcb79af66bf0bb86a8ae5b4e0a5df4e3f86787e203 OP_PUSHBYTES_59 303802153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63021f34793e2878497561e7616291ebdda3024b681cdacc8b863b5b0804cd30c2a481",
"is_coinbase": false,
"sequence": 19750504
},
{
"txid": "45e1cb33599acb071810ccc801b71bd7610865f5b899492946ab1bfbcb61cad6",
"vout": 0,
"prevout": {
"scriptpubkey": "a91419f0b86f61606c6eb51b217698ca7e8bff1e398b87",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 19f0b86f61606c6eb51b217698ca7e8bff1e398b OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "344BBtYkhaCXgA7oYSXASUfh4bFieiponG",
"value": 2140
},
"scriptsig": "00443041021d1313459a48bd1d0628eec635495f793e970729684394f9b814d2b24012022050be6d9918444e283da0136884f8311ec465d0fed2f8d24b75a8485ebdc13aea013a303702153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63021e78644ba72eab69fefb5fe50700671bfb91dda699f72ffbb325edc6a3c4ef8239303602153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63021d2c2db104e70720c39af43b6ba3edd930c26e0818aa59ff9c886281d8ba834ced532103e0a220d36f6f7ed5f3f58c279d055707c454135baf18fd00d798fec3cb52dfbc2103cf689db9313b9f7fc0b984dd9cac750be76041b392919b06f6bf94813da34cd421027f8af2eb6e904deddaa60d5af393d430575eb35e4dfd942a8a5882734b078906410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a34104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c55ae",
"scriptsig_asm": "OP_0 OP_PUSHBYTES_68 3041021d1313459a48bd1d0628eec635495f793e970729684394f9b814d2b24012022050be6d9918444e283da0136884f8311ec465d0fed2f8d24b75a8485ebdc13aea01 OP_PUSHBYTES_58 303702153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63021e78644ba72eab69fefb5fe50700671bfb91dda699f72ffbb325edc6a3c4ef82 OP_PUSHBYTES_57 303602153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63021d2c2db104e70720c39af43b6ba3edd930c26e0818aa59ff9c886281d8ba83 OP_PUSHDATA1 532103e0a220d36f6f7ed5f3f58c279d055707c454135baf18fd00d798fec3cb52dfbc2103cf689db9313b9f7fc0b984dd9cac750be76041b392919b06f6bf94813da34cd421027f8af2eb6e904deddaa60d5af393d430575eb35e4dfd942a8a5882734b078906410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a34104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c55ae",
"is_coinbase": false,
"sequence": 16,
"inner_redeemscript_asm": "OP_PUSHNUM_3 OP_PUSHBYTES_33 03e0a220d36f6f7ed5f3f58c279d055707c454135baf18fd00d798fec3cb52dfbc OP_PUSHBYTES_33 03cf689db9313b9f7fc0b984dd9cac750be76041b392919b06f6bf94813da34cd4 OP_PUSHBYTES_33 027f8af2eb6e904deddaa60d5af393d430575eb35e4dfd942a8a5882734b078906 OP_PUSHBYTES_65 0411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3 OP_PUSHBYTES_65 04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_PUSHNUM_5 OP_CHECKMULTISIG"
},
{
"txid": "cb9b47ac04023b29fb633a8ef04af351ac9fd74c57c9a2163f683516274767e3",
"vout": 2,
"prevout": {
"scriptpubkey": "a9143b13a1f71c20c799d86bb624b3898c826d6c82da87",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 3b13a1f71c20c799d86bb624b3898c826d6c82da OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "375PJxsKRtAq4WoS6u82jvgZW94R8Wx3iH",
"value": 5139
},
"scriptsig": "1600149b27f072e4b972927c445d1946162a550b0914d8",
"scriptsig_asm": "OP_PUSHBYTES_22 00149b27f072e4b972927c445d1946162a550b0914d8",
"witness": [
"3040021c23902a01d4c5cff2c33c8bdb778a5aadea78a9a0d6d4db60aaa0fba1022069237d9dbf2db8cff9c260ba71250493682d01a746f4a45c5c7ea386e56d2bc902",
"0240187acd3e2fd3d8e1acffefa85907b6550730c24f78dfd3301c829fc4daf3cc"
],
"is_coinbase": false,
"sequence": 141,
"inner_redeemscript_asm": "OP_0 OP_PUSHBYTES_20 9b27f072e4b972927c445d1946162a550b0914d8"
},
{
"txid": "cb9b47ac04023b29fb633a8ef04af351ac9fd74c57c9a2163f683516274767e3",
"vout": 3,
"prevout": {
"scriptpubkey": "a914a3c0698f2300c7b2e8107d4c9c988e642110039087",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 a3c0698f2300c7b2e8107d4c9c988e6421100390 OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "3GcrZrbUuvE4UtUdSbKTXcRnTqmfMdyMAC",
"value": 3220
},
"scriptsig": "220020a18160de7291554f349c7d5cbee4ab97fb542e94cf302ce8d7e9747e4188ca75",
"scriptsig_asm": "OP_PUSHBYTES_34 0020a18160de7291554f349c7d5cbee4ab97fb542e94cf302ce8d7e9747e4188ca75",
"witness": [
"303f021c65aee6696e80be6e14545cfd64b44f17b0514c150eefdb090c0f0bd9021f3fef4aa95c252a225622aba99e4d5af5a6fe40d177acd593e64cf2f8557ccc03",
"03b55c6f0749e0f3e2caeca05f68e3699f1b3c62a550730f704985a6a9aae437a1",
"76a914db865fd920959506111079995f1e4017b489bfe38763ac6721024d560f7f5d28aae5e1a8aa2b7ba615d7fc48e4ea27e5d27336e6a8f5fa0f5c8c7c820120876475527c2103443e8834fa7d79d7b5e95e0e9d0847f6b03ac3ea977979858b4104947fca87ca52ae67a91446c3747322b220fdb925c9802f0e949c1feab99988ac6868"
],
"is_coinbase": false,
"sequence": 3735928559,
"inner_redeemscript_asm": "OP_0 OP_PUSHBYTES_32 a18160de7291554f349c7d5cbee4ab97fb542e94cf302ce8d7e9747e4188ca75",
"inner_witnessscript_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 db865fd920959506111079995f1e4017b489bfe3 OP_EQUAL OP_IF OP_CHECKSIG OP_ELSE OP_PUSHBYTES_33 024d560f7f5d28aae5e1a8aa2b7ba615d7fc48e4ea27e5d27336e6a8f5fa0f5c8c OP_SWAP OP_SIZE OP_PUSHBYTES_1 20 OP_EQUAL OP_NOTIF OP_DROP OP_PUSHNUM_2 OP_SWAP OP_PUSHBYTES_33 03443e8834fa7d79d7b5e95e0e9d0847f6b03ac3ea977979858b4104947fca87ca OP_PUSHNUM_2 OP_CHECKMULTISIG OP_ELSE OP_HASH160 OP_PUSHBYTES_20 46c3747322b220fdb925c9802f0e949c1feab999 OP_EQUALVERIFY OP_CHECKSIG OP_ENDIF OP_ENDIF"
},
{
"txid": "cb9b47ac04023b29fb633a8ef04af351ac9fd74c57c9a2163f683516274767e3",
"vout": 4,
"prevout": {
"scriptpubkey": "0014c0ca6e754e65d3ba59112d7abc33e500c00ecfa7",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 c0ca6e754e65d3ba59112d7abc33e500c00ecfa7",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qcr9xua2wvhfm5kg394atcvl9qrqqana8rrmy8h",
"value": 17144
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"303e021c11f60486afd0f5d6573603fb2076ef2f676455b92ada257d2f25558a021e317719c946f951d49bf4df4285a618629cd9e554fcbf787c319a0c4dd22601",
"032467f24cc31664f0cf34ff8d5cbb590888ddc1dcfec724a32ae3dd5338b8508e"
],
"is_coinbase": false,
"sequence": 21000000
},
{
"txid": "637db3928a8fb1b22b81f92dc738ee7637e5b172d650363d0b327429578bd001",
"vout": 0,
"prevout": {
"scriptpubkey": "0020a9530a167fcada672c142ee636dcd171796e69ef8e37aa1f77f35c58edd7a357",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_32 a9530a167fcada672c142ee636dcd171796e69ef8e37aa1f77f35c58edd7a357",
"scriptpubkey_type": "v0_p2wsh",
"scriptpubkey_address": "bc1q49fs59nletdxwtq59mnrdhx3w9uku6003cm658mh7dw93mwh5dts2w2kht",
"value": 8149
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"303d021c32f9454db85cb1a4ca63a9883d4347c5e13f3654e884ae44e9efa3c8021d62f07fe452c06b084bc3e09afd3aac4039136549a465533bc1ca66967902",
"01",
"632102fd6db4de50399b2aa086edb23f8e140bbc823d6651e024a0eb871288068789cd67012ab27521034134a2bb35c3f83dab2489d96160741888b8b5589bb694dea6e7bc24486e9c6f68ac"
],
"is_coinbase": false,
"sequence": 4190024921,
"inner_witnessscript_asm": "OP_IF OP_PUSHBYTES_33 02fd6db4de50399b2aa086edb23f8e140bbc823d6651e024a0eb871288068789cd OP_ELSE OP_PUSHBYTES_1 2a OP_CSV OP_DROP OP_PUSHBYTES_33 034134a2bb35c3f83dab2489d96160741888b8b5589bb694dea6e7bc24486e9c6f OP_ENDIF OP_CHECKSIG"
},
{
"txid": "0020db02df125062ebae5bacd189ebff22577b2817c1872be79a0d3ba3982c41",
"vout": 0,
"prevout": {
"scriptpubkey": "512071212ded0ff4c9b1b0c505d8012772e2dbe98a3cae7168377b950fb6b866a849",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_32 71212ded0ff4c9b1b0c505d8012772e2dbe98a3cae7168377b950fb6b866a849",
"scriptpubkey_type": "v1_p2tr",
"scriptpubkey_address": "bc1pwysjmmg07nymrvx9qhvqzfmjutd7nz3u4ecksdmmj58mdwrx4pysq6m68g",
"value": 9001
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"d822f203827852998cad370232e8c57294540a5da51107fa26cf466bdd2b8b0b3d161999cc80aed8de7386a2bd5d5313aea159a231cc26fa53aaa702b7fa21ed"
],
"is_coinbase": false,
"sequence": 341
},
{
"txid": "795741ecf9c431b14b1c8d2dd017d3978fd4f6452e91edf416f31ef9971206b4",
"vout": 0,
"prevout": {
"scriptpubkey": "512089ac120a490eee88db5588112f95f88093284c814f07c3ad943a7faefba2271a",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_32 89ac120a490eee88db5588112f95f88093284c814f07c3ad943a7faefba2271a",
"scriptpubkey_type": "v1_p2tr",
"scriptpubkey_address": "bc1p3xkpyzjfpmhg3k643qgjl90cszfjsnypfuru8tv58fl6a7azyudqkcu66k",
"value": 19953
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"fe6eb715dceffefc067fdc787d250a9a9116682d216f6356ea38fc1f112bd74995faa90315e81981d2c2260b7eaca3c41a16b280362980f0d8faf4c05ebb82c5",
"e34ad0ad33885a473831f8ba8d9339123cb19d0e642e156d8e0d6e2ab2691aedb30e55a35637a806927225e1aa72223d41e59f92c6579b819e7d331a7ada9d2e01",
"2a4861fb4cb951c791bf6c93859ef65abccd90034f91b9b77abb918e13b6fce75d5fa3e2d2f6eeeae105315178c2cb9db2ef238fe89b282f691c06db43bc71ca02",
"fc97bb2be673c3bf388aaf58178ef14d354caf83c92aca8ef1831d619b8511e928f4f5fdea3962067b11e7cecfe094cd0f66a4ea9af9ec836d70d18f2b37df0281",
"a5781a0adaa80ab7f7f164172dd1a1cb127e523daa0d6949aba074a15c589f12dfb8183182afec9230cb7947b7422a4abc1bb78173550d66274ea19f6c9dd92c82",
"",
"",
"205f4237bd7dae576b34abc8a9c6fa4f0e4787c04234ca963e9e96c8f9b67b56d1ac205f4237bd7f93c69403a30c6b641f27ccf5201090152fcf1596474221307831c3ba205ac8ff25ce63564963d1148b84627f614af1f3c77d7caa23adc61264fa5e4996ba20b210c83e6f5b3f866837112d023d9ae8da2a6412168d54968ab87860ab970690ba20d3ee3b7a8b8149122b3c886330b3241538ba4b935c4040f4a73ddab917241bc5ba20cdfabb9d0e5c8f09a83f19e36e100d8f5e882f1b60aa60dacd9e6d072c117bc0ba20aab038c238e95fb54cdd0a6705dc1b1f8d135a9e9b20ab9c7ff96eef0e9bf545ba559c",
"c0b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f5534a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33bf4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e166f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48dd5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb46829a3efd3ef04f9153d47a990bd7b048a4b2d213daaa5fb8ed670fb85f13bdbcf54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713d29c9c0e8e4d2a9790922af73f0b8d51f0bd4bb19940d9cf910ead8fbe85bc9bbb41a757f405890fb0f5856228e23b715702d714d59bf2b1feb70d8b2b4e3e089fdbcf0ef9d8d00f66e47917f67cc5d78aec1ac786e2abb8d2facb4e4790aad6cc455ae816e6cdafdb58d54e35d4f46d860047458eacf1c7405dc634631c570d8d31992805518fd62daa3bdd2a5c4fd2cd3054c9b3dca1d78055e9528cff6adc8f907925d2ebe48765103e6845c06f1f2bb77c6adc1cc002865865eb5cfd5c1cb10c007c60e14f9d087e0291d4d0c7869697c6681d979c6639dbd960792b4d4133e794d097969002ee05d336686fc03c9e15a597c1b9827669460fac9879903637777defed8717c581b4c0509329550e344bdc14ac38f71fc050096887e535c8fd456524104a6674693c29946543f8a0befccce5a352bda55ec8559fc630f5f37393096d97bfee8660f4100ffd61874d62f9a65de9fb6acf740c4c386990ef7373be398c4bdc43709db7398106609eea2a7841aaf3a4fa2000dc18184faa2a7eb5a2af5845a8d3796308ff9840e567b14cf6bb158ff26c999e6f9a1f5448f9aa"
],
"is_coinbase": false,
"sequence": 342,
"inner_witnessscript_asm": "OP_PUSHBYTES_32 5f4237bd7dae576b34abc8a9c6fa4f0e4787c04234ca963e9e96c8f9b67b56d1 OP_CHECKSIG OP_PUSHBYTES_32 5f4237bd7f93c69403a30c6b641f27ccf5201090152fcf1596474221307831c3 OP_CHECKSIGADD OP_PUSHBYTES_32 5ac8ff25ce63564963d1148b84627f614af1f3c77d7caa23adc61264fa5e4996 OP_CHECKSIGADD OP_PUSHBYTES_32 b210c83e6f5b3f866837112d023d9ae8da2a6412168d54968ab87860ab970690 OP_CHECKSIGADD OP_PUSHBYTES_32 d3ee3b7a8b8149122b3c886330b3241538ba4b935c4040f4a73ddab917241bc5 OP_CHECKSIGADD OP_PUSHBYTES_32 cdfabb9d0e5c8f09a83f19e36e100d8f5e882f1b60aa60dacd9e6d072c117bc0 OP_CHECKSIGADD OP_PUSHBYTES_32 aab038c238e95fb54cdd0a6705dc1b1f8d135a9e9b20ab9c7ff96eef0e9bf545 OP_CHECKSIGADD OP_PUSHNUM_5 OP_NUMEQUAL"
}
],
"vout": [
{
"scriptpubkey": "210261542eb020b36c1da48e2e607b90a8c1f2ccdbd06eaf5fb4bb0d7cc34293d32aac",
"scriptpubkey_asm": "OP_PUSHBYTES_33 0261542eb020b36c1da48e2e607b90a8c1f2ccdbd06eaf5fb4bb0d7cc34293d32a OP_CHECKSIG",
"scriptpubkey_type": "p2pk",
"value": 576
},
{
"scriptpubkey": "76a9140240539af6c68431e4ce9cc5ef464f12c1741b3c88ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 0240539af6c68431e4ce9cc5ef464f12c1741b3c OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1CuQsdrcgcmPvugo3NqEwh1kDcpeEnuFC",
"value": 546
},
{
"scriptpubkey": "5121028b45a50f795be0413680036665d17a3eca099648ea80637bc3a70a7d2b52ae2851ae",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_33 028b45a50f795be0413680036665d17a3eca099648ea80637bc3a70a7d2b52ae28 OP_PUSHNUM_1 OP_CHECKMULTISIG",
"scriptpubkey_type": "multisig",
"value": 582
},
{
"scriptpubkey": "a91449ed2c96e33b6134408af8484508bcc3248c8dbd87",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 49ed2c96e33b6134408af8484508bcc3248c8dbd OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "38RuNhSiZiftB6WVnStu5aUz6jXtCDXQZk",
"value": 540
},
{
"scriptpubkey": "0014c8e51cf6891c0a2101aecea8cd5ce9bbbfaf7bba",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 c8e51cf6891c0a2101aecea8cd5ce9bbbfaf7bba",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qerj3ea5frs9zzqdwe65v6h8fhwl677a6s0hxhf",
"value": 294
},
{
"scriptpubkey": "0020c485bbb80c4be276e77eac3a983a391cc8b1a1b5f160995a36c3dff18296385a",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_32 c485bbb80c4be276e77eac3a983a391cc8b1a1b5f160995a36c3dff18296385a",
"scriptpubkey_type": "v0_p2wsh",
"scriptpubkey_address": "bc1qcjzmhwqvf038dem74safsw3ernytrgd479sfjk3kc00lrq5k8pdqczl83q",
"value": 330
},
{
"scriptpubkey": "5120a7a42b268957a06c9de4d7260f1df392ce4d6e7b743f5adc27415ce2afceb3b9",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_32 a7a42b268957a06c9de4d7260f1df392ce4d6e7b743f5adc27415ce2afceb3b9",
"scriptpubkey_type": "v1_p2tr",
"scriptpubkey_address": "bc1p57jzkf5f27sxe80y6unq780njt8y6mnmwsl44hp8g9ww9t7wkwusv7av76",
"value": 330
},
{
"scriptpubkey": "51024e73",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_2 4e73",
"scriptpubkey_type": "unknown",
"scriptpubkey_address": "bc1pfeessrawgf",
"value": 240
},
{
"scriptpubkey": "6a224e6f7420796f757220696e707574732c206e6f7420796f7572206f7574707574732e005152535455565758595a5b5c5d5e5f60",
"scriptpubkey_asm": "OP_RETURN OP_PUSHBYTES_34 4e6f7420796f757220696e707574732c206e6f7420796f7572206f7574707574732e OP_0 OP_PUSHNUM_1 OP_PUSHNUM_2 OP_PUSHNUM_3 OP_PUSHNUM_4 OP_PUSHNUM_5 OP_PUSHNUM_6 OP_PUSHNUM_7 OP_PUSHNUM_8 OP_PUSHNUM_9 OP_PUSHNUM_10 OP_PUSHNUM_11 OP_PUSHNUM_12 OP_PUSHNUM_13 OP_PUSHNUM_14 OP_PUSHNUM_15 OP_PUSHNUM_16",
"scriptpubkey_type": "op_return",
"value": 0
}
],
"size": 3500,
"weight": 8186,
"sigops": 115,
"fee": 71294,
"status": {
"confirmed": true,
"block_height": 850000,
"block_hash": "00000000000000000002a0b5db2a7f8d9087464c2586b546be7bce8eb53b8187",
"block_time": 1719689674
}
}
]

View File

@ -0,0 +1,121 @@
[
{
"txid": "7219d95161f3718335991ac6d967d24eedec370908c9879bb1e192e6d797d0a6",
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "d863deb706de5a611028f7547e16ea81d7819e44beb640fb30a9ba30c585140f",
"vout": 0,
"prevout": {
"scriptpubkey": "76a914cd5b6566b455d043558829f6932edaae5d8f0ad388ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 cd5b6566b455d043558829f6932edaae5d8f0ad3 OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1Kiq1dyVBzYLWGrBPWjChvKyzB2H95x5RJ",
"value": 799995000
},
"scriptsig": "483045022100aeeddfb9785c5a4b70e90d0445785c68b7a44e28853441134a70ddc4da39527602203dfe1ec1a377aaacb64ae65c7c944caf1398d2dc063f712251b4cf696d44d3cb01210314338e3e191aea3ac9e9292611faeedf0379bbe62c30fd76c7450722a1ac47c6",
"scriptsig_asm": "OP_PUSHBYTES_72 3045022100aeeddfb9785c5a4b70e90d0445785c68b7a44e28853441134a70ddc4da39527602203dfe1ec1a377aaacb64ae65c7c944caf1398d2dc063f712251b4cf696d44d3cb01 OP_PUSHBYTES_33 0314338e3e191aea3ac9e9292611faeedf0379bbe62c30fd76c7450722a1ac47c6",
"is_coinbase": false,
"sequence": 4294967293
}
],
"vout": [
{
"scriptpubkey": "6a4c5058325b8669baa9259e082f064005bc92274b559337ac317798f5d76f2d0577ed5a96042fce8c33d841b6c47a99f9597000ab04a10b34cd419fc19784d9e36f1a33fd7b000c3bce00b6000c1d1e00614b",
"scriptpubkey_asm": "OP_RETURN OP_PUSHDATA1 58325b8669baa9259e082f064005bc92274b559337ac317798f5d76f2d0577ed5a96042fce8c33d841b6c47a99f9597000ab04a10b34cd419fc19784d9e36f1a33fd7b000c3bce00b6000c1d1e00614b",
"scriptpubkey_type": "op_return",
"value": 0
},
{
"scriptpubkey": "a9144890aae025c84cb72a9730b49ca12595d6f6088d87",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 4890aae025c84cb72a9730b49ca12595d6f6088d OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "38Jht2bzmJL4EwoFvvyFzejhfEb4J7KxLb",
"value": 155000
},
{
"scriptpubkey": "76a91486e7dad6617303942a448b7f8afe9653e5624a5e88ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 86e7dad6617303942a448b7f8afe9653e5624a5e OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1DJKJGApgX4W8BSQ8FRPLqX78UaCskT4r2",
"value": 155000
},
{
"scriptpubkey": "76a914cd5b6566b455d043558829f6932edaae5d8f0ad388ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 cd5b6566b455d043558829f6932edaae5d8f0ad3 OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1Kiq1dyVBzYLWGrBPWjChvKyzB2H95x5RJ",
"value": 799675549
}
],
"size": 350,
"weight": 1400,
"fee": 9451,
"status": {
"confirmed": false
},
"order": 2798688215,
"vsize": 350,
"adjustedVsize": 350,
"sigops": 8,
"feePerVsize": 27.002857142857142,
"adjustedFeePerVsize": 27.002857142857142,
"effectiveFeePerVsize": 27.002857142857142,
"firstSeen": 1691218536,
"uid": 513598,
"inputs": [],
"position": {
"block": 0,
"vsize": 22166
},
"bestDescendant": null,
"cpfpChecked": true
},
{
"txid": "5387881d695d4564d397026dc5f740f816f8390b4b2c5ec8c20309122712a875",
"version": 2,
"locktime": 0,
"vin": [
{
"txid": "b50225a04a1d6fbbfa7a2122bc0580396f614027b3957f476229633576f06130",
"vout": 0,
"prevout": {
"scriptpubkey": "0014a24f913f8a9c30a4c302c2c78f2fd7addb08fd07",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 a24f913f8a9c30a4c302c2c78f2fd7addb08fd07",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q5f8ez0u2nsc2fsczctrc7t7h4hds3lg82ewqhz",
"value": 612917
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"3045022100a0c23953ace5d022b7a6d45d1ae1730bf20a4d594bb5d4fa7aa80e4881b44d320220008f9b144805bb91995fc0f452a56e09f4ad16fa149d71ae9b5d57c742e8e2cc01",
"03dc2c7b687019b40a68d713322675206cc266e34e5340ec982c13ff0222c3b2b6"
],
"is_coinbase": false,
"sequence": 2147483649
}
],
"vout": [
{
"scriptpubkey": "0014199a98f9589364ffe5ef5bbae45ce5dfcbb873bd",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 199a98f9589364ffe5ef5bbae45ce5dfcbb873bd",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qrxdf372cjdj0le00twawgh89ml9msuaau62gk4",
"value": 611909
}
],
"size": 192,
"weight": 438,
"fee": 1008,
"status": {
"confirmed": false
},
"bestDescendant": null,
"descendants": null,
"adjustedFeePerVsize": 10.2283,
"sigops": 1,
"adjustedVsize": 109.5
}
]

View File

@ -0,0 +1,139 @@
[
{
"txid": "008592364e21c1e3d62ba9538ac78a81779897b52100af5707ab063df98964f2",
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "d863deb706de5a611028f7547e16ea81d7819e44beb640fb30a9ba30c585140f",
"vout": 0,
"prevout": {
"scriptpubkey": "76a914cd5b6566b455d043558829f6932edaae5d8f0ad388ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 cd5b6566b455d043558829f6932edaae5d8f0ad3 OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1Kiq1dyVBzYLWGrBPWjChvKyzB2H95x5RJ",
"value": 799995000
},
"scriptsig": "483045022100c1fb331d155a7d299a0451d14fa1122b328e0e239afc9ba8dc2aff449ddc5a3a02201c1e19030d1efa432f5069cd369d7ad09a67f68501345e4db35f7b799605f55601210314338e3e191aea3ac9e9292611faeedf0379bbe62c30fd76c7450722a1ac47c6",
"scriptsig_asm": "OP_PUSHBYTES_72 3045022100c1fb331d155a7d299a0451d14fa1122b328e0e239afc9ba8dc2aff449ddc5a3a02201c1e19030d1efa432f5069cd369d7ad09a67f68501345e4db35f7b799605f55601 OP_PUSHBYTES_33 0314338e3e191aea3ac9e9292611faeedf0379bbe62c30fd76c7450722a1ac47c6",
"is_coinbase": false,
"sequence": 4294967293
}
],
"vout": [
{
"scriptpubkey": "6a4c5058325b78064160b631b5a15d9078d99c0db066449fb4c59bbfa4d987ba906e2990088b2fce8c33d841b6c47a99f9597000ab04a10b34cd419fc19784d9e36f1a33fd7b000c3bce00b6000c1d1e00614b",
"scriptpubkey_asm": "OP_RETURN OP_PUSHDATA1 58325b78064160b631b5a15d9078d99c0db066449fb4c59bbfa4d987ba906e2990088b2fce8c33d841b6c47a99f9597000ab04a10b34cd419fc19784d9e36f1a33fd7b000c3bce00b6000c1d1e00614b",
"scriptpubkey_type": "op_return",
"value": 0
},
{
"scriptpubkey": "a9144890aae025c84cb72a9730b49ca12595d6f6088d87",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 4890aae025c84cb72a9730b49ca12595d6f6088d OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "38Jht2bzmJL4EwoFvvyFzejhfEb4J7KxLb",
"value": 155000
},
{
"scriptpubkey": "76a91486e7dad6617303942a448b7f8afe9653e5624a5e88ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 86e7dad6617303942a448b7f8afe9653e5624a5e OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1DJKJGApgX4W8BSQ8FRPLqX78UaCskT4r2",
"value": 155000
},
{
"scriptpubkey": "76a914cd5b6566b455d043558829f6932edaae5d8f0ad388ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 cd5b6566b455d043558829f6932edaae5d8f0ad3 OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1Kiq1dyVBzYLWGrBPWjChvKyzB2H95x5RJ",
"value": 799676250
}
],
"size": 350,
"weight": 1400,
"fee": 8750,
"status": {
"confirmed": false
},
"order": 4066675193,
"vsize": 350,
"adjustedVsize": 350,
"sigops": 8,
"feePerVsize": 25,
"adjustedFeePerVsize": 25,
"effectiveFeePerVsize": 25,
"firstSeen": 1691218516,
"uid": 512584,
"inputs": [],
"position": {
"block": 0,
"vsize": 13846
},
"bestDescendant": null,
"cpfpChecked": true
},
{
"txid": "b7981a624e4261c11f1246314d41e74be56af82eb557bcd054a5e0f94c023668",
"version": 2,
"locktime": 0,
"vin": [
{
"txid": "b50225a04a1d6fbbfa7a2122bc0580396f614027b3957f476229633576f06130",
"vout": 0,
"prevout": {
"scriptpubkey": "0014a24f913f8a9c30a4c302c2c78f2fd7addb08fd07",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 a24f913f8a9c30a4c302c2c78f2fd7addb08fd07",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1q5f8ez0u2nsc2fsczctrc7t7h4hds3lg82ewqhz",
"value": 612917
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"304402204dd10f14afa41bc76d8278140ff1ec3d3f87f2c207bbb5418cc76dab30d7f6a402207877cc9c6a2c724b6ea7a1c24ac00022469f194fd1a4bd8030bbca1787d3f5f301",
"03dc2c7b687019b40a68d713322675206cc266e34e5340ec982c13ff0222c3b2b6"
],
"is_coinbase": false,
"sequence": 2147483648
}
],
"vout": [
{
"scriptpubkey": "76a9149d32ef812385f3811634e0c0117dd153a5de10a488ac",
"scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 9d32ef812385f3811634e0c0117dd153a5de10a4 OP_EQUALVERIFY OP_CHECKSIG",
"scriptpubkey_type": "p2pkh",
"scriptpubkey_address": "1FLC7Bag7okAkKPCyZbgZZg3Hh1EuGZ5Rd",
"value": 344697
},
{
"scriptpubkey": "00144c2671336ca8761863b4c68d64d4672491fec1b9",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 4c2671336ca8761863b4c68d64d4672491fec1b9",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qfsn8zvmv4pmpsca5c6xkf4r8yjglasdesrawcx",
"value": 267636
}
],
"size": 225,
"weight": 573,
"fee": 584,
"status": {
"confirmed": false
},
"order": 1748369996,
"vsize": 143,
"adjustedVsize": 143.25,
"sigops": 5,
"feePerVsize": 4.076788830715532,
"adjustedFeePerVsize": 4.076788830715532,
"effectiveFeePerVsize": 4.076788830715532,
"firstSeen": 1691222376,
"uid": 526515,
"inputs": [],
"position": {
"block": 7,
"vsize": 22021095.5
},
"bestDescendant": null,
"cpfpChecked": true
}
]

View File

@ -14,15 +14,19 @@ describe('Mempool Backend Config', () => {
expect(config.MEMPOOL).toStrictEqual({
ENABLED: true,
OFFICIAL: false,
NETWORK: 'mainnet',
BACKEND: 'none',
BLOCKS_SUMMARIES_INDEXING: false,
GOGGLES_INDEXING: false,
HTTP_PORT: 8999,
UNIX_SOCKET_PATH: '',
SPAWN_CLUSTER_PROCS: 0,
API_URL_PREFIX: '/api/v1/',
AUTOMATIC_BLOCK_REINDEXING: false,
AUTOMATIC_POOLS_UPDATE: false,
POLL_RATE_MS: 2000,
CACHE_DIR: './cache',
CACHE_ENABLED: true,
CLEAR_PROTECTION_MINUTES: 20,
RECOMMENDED_FEE_PERCENTILE: 50,
BLOCK_WEIGHT_UNITS: 4000000,
@ -37,27 +41,41 @@ describe('Mempool Backend Config', () => {
STDOUT_LOG_MIN_PRIORITY: 'debug',
POOLS_JSON_TREE_URL: 'https://api.github.com/repos/mempool/mining-pools/git/trees/master',
POOLS_JSON_URL: 'https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json',
POOLS_UPDATE_DELAY: 604800,
AUDIT: false,
ADVANCED_GBT_AUDIT: false,
ADVANCED_GBT_MEMPOOL: false,
RUST_GBT: false,
RUST_GBT: true,
LIMIT_GBT: false,
CPFP_INDEXING: false,
MAX_BLOCKS_BULK_QUERY: 0,
DISK_CACHE_BLOCK_INTERVAL: 6,
MAX_PUSH_TX_SIZE_WEIGHT: 400000,
ALLOW_UNREACHABLE: true,
PRICE_UPDATES_PER_HOUR: 1,
MAX_TRACKED_ADDRESSES: 1,
});
expect(config.ELECTRUM).toStrictEqual({ HOST: '127.0.0.1', PORT: 3306, TLS_ENABLED: true });
expect(config.ESPLORA).toStrictEqual({ REST_API_URL: 'http://127.0.0.1:3000', UNIX_SOCKET_PATH: null, RETRY_UNIX_SOCKET_AFTER: 30000 });
expect(config.ESPLORA).toStrictEqual({
REST_API_URL: 'http://127.0.0.1:3000',
UNIX_SOCKET_PATH: null,
BATCH_QUERY_BASE_SIZE: 1000,
RETRY_UNIX_SOCKET_AFTER: 30000,
REQUEST_TIMEOUT: 10000,
FALLBACK_TIMEOUT: 5000,
FALLBACK: [],
MAX_BEHIND_TIP: 2,
});
expect(config.CORE_RPC).toStrictEqual({
HOST: '127.0.0.1',
PORT: 8332,
USERNAME: 'mempool',
PASSWORD: 'mempool',
TIMEOUT: 60000
TIMEOUT: 60000,
COOKIE: false,
COOKIE_PATH: '/bitcoin/.cookie',
DEBUG_LOG_PATH: '',
});
expect(config.SECOND_CORE_RPC).toStrictEqual({
@ -65,7 +83,9 @@ describe('Mempool Backend Config', () => {
PORT: 8332,
USERNAME: 'mempool',
PASSWORD: 'mempool',
TIMEOUT: 60000
TIMEOUT: 60000,
COOKIE: false,
COOKIE_PATH: '/bitcoin/.cookie'
});
expect(config.DATABASE).toStrictEqual({
@ -77,6 +97,8 @@ describe('Mempool Backend Config', () => {
USERNAME: 'mempool',
PASSWORD: 'mempool',
TIMEOUT: 180000,
PID_DIR: '',
POOL_SIZE: 100,
});
expect(config.SYSLOG).toStrictEqual({
@ -89,8 +111,6 @@ describe('Mempool Backend Config', () => {
expect(config.STATISTICS).toStrictEqual({ ENABLED: true, TX_PER_SECOND_SAMPLE_PERIOD: 150 });
expect(config.BISQ).toStrictEqual({ ENABLED: false, DATA_PATH: '/bisq/statsnode-data/btc_mainnet/db' });
expect(config.SOCKS5PROXY).toStrictEqual({
ENABLED: false,
USE_ONION: true,
@ -100,18 +120,11 @@ describe('Mempool Backend Config', () => {
PASSWORD: ''
});
expect(config.PRICE_DATA_SERVER).toStrictEqual({
TOR_URL: 'http://wizpriceje6q5tdrxkyiazsgu7irquiqjy2dptezqhrtu7l2qelqktid.onion/getAllMarketPrices',
CLEARNET_URL: 'https://price.bisq.wiz.biz/getAllMarketPrices'
});
expect(config.EXTERNAL_DATA_SERVER).toStrictEqual({
MEMPOOL_API: 'https://mempool.space/api/v1',
MEMPOOL_ONION: 'http://mempoolhqx4isw62xs7abwphsq7ldayuidyx2v2oethdhhj6mlo2r6ad.onion/api/v1',
LIQUID_API: 'https://liquid.network/api/v1',
LIQUID_ONION: 'http://liquidmom47f6s3m53ebfxn47p76a6tlnxib3wp6deux7wuzotdr6cyd.onion/api/v1',
BISQ_URL: 'https://bisq.markets/api',
BISQ_ONION: 'http://bisqmktse2cabavbr2xjq7xw3h6g5ottemo5rolfcwt6aly6tp5fdryd.onion/api'
LIQUID_ONION: 'http://liquidmom47f6s3m53ebfxn47p76a6tlnxib3wp6deux7wuzotdr6cyd.onion/api/v1'
});
expect(config.MAXMIND).toStrictEqual({
@ -125,8 +138,32 @@ describe('Mempool Backend Config', () => {
ENABLED: false,
AUDIT: false,
AUDIT_START_HEIGHT: 774000,
STATISTICS: false,
STATISTICS_START_TIME: 1481932800,
SERVERS: []
});
expect(config.MEMPOOL_SERVICES).toStrictEqual({
API: "",
ACCELERATIONS: false,
});
expect(config.REDIS).toStrictEqual({
ENABLED: false,
UNIX_SOCKET_PATH: '',
BATCH_QUERY_BASE_SIZE: 5000,
});
expect(config.FIAT_PRICE).toStrictEqual({
ENABLED: true,
PAID: false,
API_KEY: '',
});
expect(config.STRATUM).toStrictEqual({
ENABLED: false,
API: 'http://localhost:1234',
});
});
});
@ -153,13 +190,13 @@ describe('Mempool Backend Config', () => {
expect(config.STATISTICS).toStrictEqual(fixture.STATISTICS);
expect(config.BISQ).toStrictEqual(fixture.BISQ);
expect(config.SOCKS5PROXY).toStrictEqual(fixture.SOCKS5PROXY);
expect(config.PRICE_DATA_SERVER).toStrictEqual(fixture.PRICE_DATA_SERVER);
expect(config.EXTERNAL_DATA_SERVER).toStrictEqual(fixture.EXTERNAL_DATA_SERVER);
expect(config.MEMPOOL_SERVICES).toStrictEqual(fixture.MEMPOOL_SERVICES);
expect(config.REDIS).toStrictEqual(fixture.REDIS);
});
});
@ -172,41 +209,50 @@ describe('Mempool Backend Config', () => {
for (const [key, value] of Object.entries(jsonObj)) {
// We have a few cases where we can't follow the pattern
if (root === 'MEMPOOL' && key === 'HTTP_PORT') {
console.log('skipping check for MEMPOOL_HTTP_PORT');
return;
}
switch (typeof value) {
case 'object': {
if (Array.isArray(value)) {
return;
} else {
parseJson(value, key);
}
break;
if (process.env.CI) {
console.log('skipping check for MEMPOOL_HTTP_PORT');
}
default: {
continue;
}
if (root) {
//The flattened string, i.e, __MEMPOOL_ENABLED__
const replaceStr = `${root ? '__' + root + '_' : '__'}${key}__`;
//The string used as the environment variable, i.e, MEMPOOL_ENABLED
const envVarStr = `${root ? root : ''}_${key}`;
let defaultEntry;
//The string used as the default value, to be checked as a regex, i.e, __MEMPOOL_ENABLED__=${MEMPOOL_ENABLED:=(.*)}
const defaultEntry = replaceStr + '=' + '\\${' + envVarStr + ':=(.*)' + '}';
console.log(`looking for ${defaultEntry} in the start.sh script`);
const re = new RegExp(defaultEntry);
expect(startSh).toMatch(re);
if (Array.isArray(value)) {
defaultEntry = `${replaceStr}=\${${envVarStr}:=[]}`;
if (process.env.CI) {
console.log(`looking for ${defaultEntry} in the start.sh script`);
}
//Regex matching does not work with the array values
expect(startSh).toContain(defaultEntry);
} else {
defaultEntry = replaceStr + '=' + '\\${' + envVarStr + ':=(.*)' + '}';
if (process.env.CI) {
console.log(`looking for ${defaultEntry} in the start.sh script`);
}
const re = new RegExp(defaultEntry);
expect(startSh).toMatch(re);
}
//The string that actually replaces the values in the config file
const sedStr = 'sed -i "s!' + replaceStr + '!${' + replaceStr + '}!g" mempool-config.json';
console.log(`looking for ${sedStr} in the start.sh script`);
if (process.env.CI) {
console.log(`looking for ${sedStr} in the start.sh script`);
}
expect(startSh).toContain(sedStr);
break;
}
else {
parseJson(value, key);
}
}
}
parseJson(fixture);
});
});

View File

@ -1,5 +1,5 @@
import fs from 'fs';
import { GbtGenerator, ThreadTransaction } from '../../../rust-gbt';
import { GbtGenerator, ThreadTransaction } from 'rust-gbt';
import path from 'path';
const baseline = require('./test-data/target-template.json');
@ -13,9 +13,9 @@ const vectorBuffer: Buffer = fs.readFileSync(path.join(__dirname, './', './test-
describe('Rust GBT', () => {
test('should produce the same template as getBlockTemplate from Bitcoin Core', async () => {
const rustGbt = new GbtGenerator();
const rustGbt = new GbtGenerator(4_000_000, 8);
const { mempool, maxUid } = mempoolFromArrayBuffer(vectorBuffer.buffer);
const result = await rustGbt.make(mempool, maxUid);
const result = await rustGbt.make(mempool, [], maxUid);
const blocks: [string, number][][] = result.blocks.map(block => {
return block.map(uid => [vectorUidMap.get(uid) || 'missing', uid]);

View File

@ -0,0 +1,87 @@
import { Application } from "express";
import config from "../config";
import axios from "axios";
import logger from "../logger";
class AboutRoutes {
public initRoutes(app: Application) {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'donations', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/donations`, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'donations/images/:id', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/donations/images/${req.params.id}`, {
responseType: 'stream', timeout: 10000
});
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'contributors', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/contributors`, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'contributors/images/:id', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/contributors/images/${req.params.id}`, {
responseType: 'stream', timeout: 10000
});
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'translators', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/translators`, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'translators/images/:id', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/translators/images/${req.params.id}`, {
responseType: 'stream', timeout: 10000
});
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'services/sponsors', async (req, res) => {
const url = `${config.MEMPOOL_SERVICES.API}/${req.originalUrl.replace('/api/v1/services/', '')}`;
try {
const response = await axios.get(url, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
logger.err(`Unable to fetch sponsors from ${url}. ${e}`, 'About Page');
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'services/account/images/:username/:md5', async (req, res) => {
const url = `${config.MEMPOOL_SERVICES.API}/${req.originalUrl.replace('/api/v1/services/', '')}`;
try {
const response = await axios.get(url, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
logger.err(`Unable to fetch sponsor profile image from ${url}. ${e}`, 'About Page');
res.status(500).end();
}
})
;
}
}
export default new AboutRoutes();

View File

@ -0,0 +1,84 @@
import { Application, Request, Response } from 'express';
import config from '../../config';
import axios from 'axios';
import logger from '../../logger';
import mempool from '../mempool';
import AccelerationRepository from '../../repositories/AccelerationRepository';
class AccelerationRoutes {
private tag = 'Accelerator';
public initRoutes(app: Application): void {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'services/accelerator/accelerations', this.$getAcceleratorAccelerations.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'services/accelerator/accelerations/history', this.$getAcceleratorAccelerationsHistory.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'services/accelerator/accelerations/history/aggregated', this.$getAcceleratorAccelerationsHistoryAggregated.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'services/accelerator/accelerations/stats', this.$getAcceleratorAccelerationsStats.bind(this))
.post(config.MEMPOOL.API_URL_PREFIX + 'services/accelerator/estimate', this.$getAcceleratorEstimate.bind(this))
;
}
private async $getAcceleratorAccelerations(req: Request, res: Response): Promise<void> {
const accelerations = mempool.getAccelerations();
res.status(200).send(Object.values(accelerations));
}
private async $getAcceleratorAccelerationsHistory(req: Request, res: Response): Promise<void> {
const history = await AccelerationRepository.$getAccelerationInfo(null, req.query.blockHeight ? parseInt(req.query.blockHeight as string, 10) : null);
res.status(200).send(history.map(accel => ({
txid: accel.txid,
added: accel.added,
status: 'completed',
effectiveFee: accel.effective_fee,
effectiveVsize: accel.effective_vsize,
boostRate: accel.boost_rate,
boostCost: accel.boost_cost,
blockHeight: accel.height,
pools: [accel.pool],
})));
}
private async $getAcceleratorAccelerationsHistoryAggregated(req: Request, res: Response): Promise<void> {
const url = `${config.MEMPOOL_SERVICES.API}/${req.originalUrl.replace('/api/v1/services/', '')}`;
try {
const response = await axios.get(url, { responseType: 'stream', timeout: 10000 });
for (const key in response.headers) {
res.setHeader(key, response.headers[key]);
}
response.data.pipe(res);
} catch (e) {
logger.err(`Unable to get aggregated acceleration history from ${url} in $getAcceleratorAccelerationsHistoryAggregated(), ${e}`, this.tag);
res.status(500).end();
}
}
private async $getAcceleratorAccelerationsStats(req: Request, res: Response): Promise<void> {
const url = `${config.MEMPOOL_SERVICES.API}/${req.originalUrl.replace('/api/v1/services/', '')}`;
try {
const response = await axios.get(url, { responseType: 'stream', timeout: 10000 });
for (const key in response.headers) {
res.setHeader(key, response.headers[key]);
}
response.data.pipe(res);
} catch (e) {
logger.err(`Unable to get acceleration stats from ${url} in $getAcceleratorAccelerationsStats(), ${e}`, this.tag);
res.status(500).end();
}
}
private async $getAcceleratorEstimate(req: Request, res: Response): Promise<void> {
const url = `${config.MEMPOOL_SERVICES.API}/${req.originalUrl.replace('/api/v1/services/', '')}`;
try {
const response = await axios.post(url, req.body, { responseType: 'stream', timeout: 10000 });
for (const key in response.headers) {
res.setHeader(key, response.headers[key]);
}
response.data.pipe(res);
} catch (e) {
logger.err(`Unable to get acceleration estimate from ${url} in $getAcceleratorEstimate(), ${e}`, this.tag);
res.status(500).end();
}
}
}
export default new AccelerationRoutes();

View File

@ -0,0 +1,244 @@
import logger from '../../logger';
import { MempoolTransactionExtended } from '../../mempool.interfaces';
import { GraphTx, getSameBlockRelatives, initializeRelatives, makeBlockTemplate, mempoolComparator, removeAncestors, setAncestorScores } from '../mini-miner';
const BLOCK_WEIGHT_UNITS = 4_000_000;
const MAX_RELATIVE_GRAPH_SIZE = 200;
const BID_BOOST_WINDOW = 40_000;
const BID_BOOST_MIN_OFFSET = 10_000;
const BID_BOOST_MAX_OFFSET = 400_000;
export type Acceleration = {
txid: string;
max_bid: number;
};
interface TxSummary {
txid: string; // txid of the current transaction
effectiveVsize: number; // Total vsize of the dependency tree
effectiveFee: number; // Total fee of the dependency tree in sats
ancestorCount: number; // Number of ancestors
}
export interface AccelerationInfo {
txSummary: TxSummary;
targetFeeRate: number; // target fee rate (recommended next block fee, or median fee for mined block)
nextBlockFee: number; // fee in sats required to be in the next block (using recommended next block fee, or median fee for mined block)
cost: number; // additional cost to accelerate ((cost + txSummary.effectiveFee) / txSummary.effectiveVsize) >= targetFeeRate
}
class AccelerationCosts {
/**
* Takes a list of accelerations and verbose block data
* Returns the "fair" boost rate to charge accelerations
*
* @param accelerationsx
* @param verboseBlock
*/
public calculateBoostRate(accelerations: Acceleration[], blockTxs: MempoolTransactionExtended[]): number {
// Run GBT ourselves to calculate accurate effective fee rates
// the list of transactions comes from a mined block, so we already know everything fits within consensus limits
const template = makeBlockTemplate(blockTxs, accelerations, 1, Infinity, Infinity);
// initialize working maps for fast tx lookups
const accMap = {};
const txMap = {};
for (const acceleration of accelerations) {
accMap[acceleration.txid] = acceleration;
}
for (const tx of template) {
txMap[tx.txid] = tx;
}
// Identify and exclude accelerated and otherwise prioritized transactions
const excludeMap = {};
let totalWeight = 0;
let minAcceleratedPackage = Infinity;
let lastEffectiveRate = 0;
// Iterate over the mined template from bottom to top.
// Transactions should appear in ascending order of mining priority.
for (const blockTx of [...blockTxs].reverse()) {
const txid = blockTx.txid;
const tx = txMap[txid];
totalWeight += tx.weight;
const isAccelerated = accMap[txid] != null;
// If a cluster has a in-band effective fee rate than the previous cluster,
// it must have been prioritized out-of-band (in order to have a higher mining priority)
// so exclude from the analysis.
const isPrioritized = tx.effectiveFeePerVsize < lastEffectiveRate;
if (isPrioritized || isAccelerated) {
let packageWeight = 0;
// exclude this whole CPFP cluster
for (const clusterTxid of tx.cluster) {
packageWeight += txMap[clusterTxid].weight;
if (!excludeMap[clusterTxid]) {
excludeMap[clusterTxid] = true;
}
}
// keep track of the smallest accelerated CPFP cluster for later
if (isAccelerated) {
minAcceleratedPackage = Math.min(minAcceleratedPackage, packageWeight);
}
}
if (!isPrioritized) {
if (!isAccelerated) {
lastEffectiveRate = tx.effectiveFeePerVsize;
}
}
}
// The Bid Boost Rate is calculated by disregarding the bottom X weight units of the block,
// where X is the larger of BID_BOOST_MIN_OFFSET or the smallest accelerated package weight (the "offset"),
// then taking the average fee rate of the following BID_BOOST_WINDOW weight units
// (ignoring accelerated transactions and their ancestors).
//
// Transactions within the offset might pay less than the fair rate due to bin-packing effects
// But the average rate paid by the next chunk of non-accelerated transactions provides a good
// upper bound on the "next best rate" of alternatives to including the accelerated transactions
// (since, if there were any better options, they would have been included instead)
const spareWeight = BLOCK_WEIGHT_UNITS - totalWeight;
const windowOffset = Math.min(Math.max(minAcceleratedPackage, BID_BOOST_MIN_OFFSET, spareWeight), BID_BOOST_MAX_OFFSET);
const leftBound = windowOffset;
const rightBound = windowOffset + BID_BOOST_WINDOW;
let totalFeeInWindow = 0;
let totalWeightInWindow = Math.max(0, spareWeight - leftBound);
let txIndex = blockTxs.length - 1;
for (let offset = spareWeight; offset < BLOCK_WEIGHT_UNITS && txIndex >= 0; txIndex--) {
const txid = blockTxs[txIndex].txid;
const tx = txMap[txid];
if (excludeMap[txid]) {
// skip prioritized transactions and their ancestors
continue;
}
const left = offset;
const right = offset + tx.weight;
offset += tx.weight;
if (right < leftBound) {
// not within window yet
continue;
}
if (left > rightBound) {
// past window
break;
}
// count fees for weight units within the window
const overlapLeft = Math.max(leftBound, left);
const overlapRight = Math.min(rightBound, right);
const overlapUnits = overlapRight - overlapLeft;
totalFeeInWindow += (tx.effectiveFeePerVsize * (overlapUnits / 4));
totalWeightInWindow += overlapUnits;
}
if (totalWeightInWindow < BID_BOOST_WINDOW) {
// not enough un-prioritized transactions to calculate a fair rate
// just charge everyone their max bids
return Infinity;
}
// Divide the total fee by the size of the BID_BOOST_WINDOW in vbytes
const averageRate = totalFeeInWindow / (BID_BOOST_WINDOW / 4);
return averageRate;
}
/**
* Takes an accelerated mined txid and a target rate
* Returns the total vsize, fees and acceleration cost (in sats) of the tx and all same-block ancestors
*
* @param txid
* @param medianFeeRate
*/
public getAccelerationInfo(tx: MempoolTransactionExtended, targetFeeRate: number, transactions: MempoolTransactionExtended[]): AccelerationInfo {
// Get same-block transaction ancestors
const allRelatives = getSameBlockRelatives(tx, transactions);
const relativesMap = initializeRelatives(allRelatives);
const rootTx = relativesMap.get(tx.txid) as GraphTx;
// Calculate cost to boost
return this.calculateAccelerationAncestors(rootTx, relativesMap, targetFeeRate);
}
/**
* Given a root transaction, a list of in-mempool ancestors, and a target fee rate,
* Calculate the minimum set of transactions to fee-bump, their total vsize + fees
*
* @param tx
* @param ancestors
*/
private calculateAccelerationAncestors(tx: GraphTx, relatives: Map<string, GraphTx>, targetFeeRate: number): AccelerationInfo {
// add root tx to the ancestor map
relatives.set(tx.txid, tx);
// Check for high-sigop transactions (not supported)
relatives.forEach(entry => {
if (entry.vsize > Math.ceil(entry.weight / 4)) {
throw new Error(`high_sigop_tx`);
}
});
// Initialize individual & ancestor fee rates
relatives.forEach(entry => setAncestorScores(entry));
// Sort by descending ancestor score
let sortedRelatives = Array.from(relatives.values()).sort(mempoolComparator);
let includedInCluster: Map<string, GraphTx> | null = null;
// While highest score >= targetFeeRate
let maxIterations = MAX_RELATIVE_GRAPH_SIZE;
while (sortedRelatives.length && sortedRelatives[0].score && sortedRelatives[0].score >= targetFeeRate && maxIterations > 0) {
maxIterations--;
// Grab the highest scoring entry
const best = sortedRelatives.shift();
if (best) {
const cluster = new Map<string, GraphTx>(best.ancestors?.entries() || []);
if (best.ancestors.has(tx.txid)) {
includedInCluster = cluster;
}
cluster.set(best.txid, best);
// Remove this cluster (it already pays over the target rate, so doesn't need to be boosted)
// and update scores, ancestor totals and dependencies for the survivors
removeAncestors(cluster, relatives);
// re-sort
sortedRelatives = Array.from(relatives.values()).sort(mempoolComparator);
}
}
// sanity check for infinite loops / too many ancestors (should never happen)
if (maxIterations <= 0) {
logger.warn(`acceleration dependency calculation failed: calculateAccelerationAncestors loop exceeded ${MAX_RELATIVE_GRAPH_SIZE} iterations, unable to proceed`);
throw new Error('invalid_tx_dependencies');
}
let totalFee = tx.fees.ancestor;
// transaction is already CPFP-d above the target rate by some descendant
if (includedInCluster) {
let clusterSize = 0;
let clusterFee = 0;
includedInCluster.forEach(entry => {
clusterSize += entry.vsize;
clusterFee += entry.fees.base;
});
const clusterRate = clusterFee / clusterSize;
totalFee = Math.ceil(tx.ancestorsize * clusterRate);
}
// Whatever remains in the accelerated tx's dependencies needs to be boosted to the targetFeeRate
// Cost = (totalVsize * targetFeeRate) - totalFee
return {
txSummary: {
txid: tx.txid,
effectiveVsize: tx.ancestorsize,
effectiveFee: totalFee,
ancestorCount: tx.ancestorcount,
},
cost: Math.max(0, Math.ceil(tx.ancestorsize * targetFeeRate) - totalFee),
targetFeeRate,
nextBlockFee: Math.ceil(tx.ancestorsize * targetFeeRate),
};
}
}
export default new AccelerationCosts;

View File

@ -2,22 +2,28 @@ import config from '../config';
import logger from '../logger';
import { MempoolTransactionExtended, MempoolBlockWithTransactions } from '../mempool.interfaces';
import rbfCache from './rbf-cache';
import transactionUtils from './transaction-utils';
const PROPAGATION_MARGIN = 180; // in seconds, time since a transaction is first seen after which it is assumed to have propagated to all miners
class Audit {
auditBlock(transactions: MempoolTransactionExtended[], projectedBlocks: MempoolBlockWithTransactions[], mempool: { [txId: string]: MempoolTransactionExtended })
: { censored: string[], added: string[], fresh: string[], sigop: string[], fullrbf: string[], score: number, similarity: number } {
auditBlock(height: number, transactions: MempoolTransactionExtended[], projectedBlocks: MempoolBlockWithTransactions[], mempool: { [txId: string]: MempoolTransactionExtended })
: { unseen: string[], censored: string[], added: string[], prioritized: string[], fresh: string[], sigop: string[], fullrbf: string[], accelerated: string[], score: number, similarity: number } {
if (!projectedBlocks?.[0]?.transactionIds || !mempool) {
return { censored: [], added: [], fresh: [], sigop: [], fullrbf: [], score: 0, similarity: 1 };
return { unseen: [], censored: [], added: [], prioritized: [], fresh: [], sigop: [], fullrbf: [], accelerated: [], score: 1, similarity: 1 };
}
const matches: string[] = []; // present in both mined block and template
const added: string[] = []; // present in mined block, not in template
const unseen: string[] = []; // present in the mined block, not in our mempool
let prioritized: string[] = []; // higher in the block than would be expected by in-band feerate alone
let deprioritized: string[] = []; // lower in the block than would be expected by in-band feerate alone
const fresh: string[] = []; // missing, but firstSeen or lastBoosted within PROPAGATION_MARGIN
const fullrbf: string[] = []; // either missing or present, and part of a fullrbf replacement
const rbf: string[] = []; // either missing or present, and either part of a full-rbf replacement, or a conflict with the mined block
const accelerated: string[] = []; // prioritized by the mempool accelerator
const isCensored = {}; // missing, without excuse
const isDisplaced = {};
const isAccelerated = {};
let displacedWeight = 0;
let matchedWeight = 0;
let projectedWeight = 0;
@ -28,6 +34,10 @@ class Audit {
const now = Math.round((Date.now() / 1000));
for (const tx of transactions) {
inBlock[tx.txid] = tx;
if (mempool[tx.txid] && mempool[tx.txid].acceleration) {
accelerated.push(tx.txid);
isAccelerated[tx.txid] = true;
}
}
// coinbase is always expected
if (transactions[0]) {
@ -36,8 +46,9 @@ class Audit {
// look for transactions that were expected in the template, but missing from the mined block
for (const txid of projectedBlocks[0].transactionIds) {
if (!inBlock[txid]) {
if (rbfCache.isFullRbf(txid)) {
fullrbf.push(txid);
// allow missing transactions which either belong to a full rbf tree, or conflict with any transaction in the mined block
if (rbfCache.has(txid) && (rbfCache.isFullRbf(txid) || rbfCache.anyInSameTree(txid, (tx) => inBlock[tx.txid]))) {
rbf.push(txid);
} else if (mempool[txid]?.firstSeen != null && (now - (mempool[txid]?.firstSeen || 0)) <= PROPAGATION_MARGIN) {
// tx is recent, may have reached the miner too late for inclusion
fresh.push(txid);
@ -63,20 +74,23 @@ class Audit {
// we can expect an honest miner to include 'displaced' transactions in place of recent arrivals and censored txs
// these displaced transactions should occupy the first N weight units of the next projected block
let displacedWeightRemaining = displacedWeight;
let displacedWeightRemaining = displacedWeight + 4000;
let index = 0;
let lastFeeRate = Infinity;
let failures = 0;
while (projectedBlocks[1] && index < projectedBlocks[1].transactionIds.length && failures < 500) {
const txid = projectedBlocks[1].transactionIds[index];
let blockIndex = 1;
while (projectedBlocks[blockIndex] && failures < 500) {
const txid = projectedBlocks[blockIndex].transactionIds[index];
const tx = mempool[txid];
if (tx) {
const fits = (tx.weight - displacedWeightRemaining) < 4000;
const feeMatches = tx.effectiveFeePerVsize >= lastFeeRate;
// 0.005 margin of error for any remaining vsize rounding issues
const feeMatches = tx.effectiveFeePerVsize >= (lastFeeRate - 0.005);
if (fits || feeMatches) {
isDisplaced[txid] = true;
if (fits) {
lastFeeRate = Math.min(lastFeeRate, tx.effectiveFeePerVsize);
// (tx.effectiveFeePerVsize * tx.vsize) / Math.ceil(tx.vsize) attempts to correct for vsize rounding in the simple non-CPFP case
lastFeeRate = Math.min(lastFeeRate, (tx.effectiveFeePerVsize * tx.vsize) / Math.ceil(tx.vsize));
}
if (tx.firstSeen == null || (now - (tx?.firstSeen || 0)) > PROPAGATION_MARGIN) {
displacedWeightRemaining -= tx.weight;
@ -89,6 +103,10 @@ class Audit {
logger.warn('projected transaction missing from mempool cache');
}
index++;
if (index >= projectedBlocks[blockIndex].transactionIds.length) {
index = 0;
blockIndex++;
}
}
// mark unexpected transactions in the mined block as 'added'
@ -98,16 +116,27 @@ class Audit {
if (inTemplate[tx.txid]) {
matches.push(tx.txid);
} else {
if (rbfCache.isFullRbf(tx.txid)) {
fullrbf.push(tx.txid);
} else if (!isDisplaced[tx.txid]) {
added.push(tx.txid);
if (rbfCache.has(tx.txid)) {
rbf.push(tx.txid);
if (!mempool[tx.txid] && !rbfCache.getReplacedBy(tx.txid)) {
unseen.push(tx.txid);
}
} else {
if (mempool[tx.txid]) {
if (isDisplaced[tx.txid]) {
added.push(tx.txid);
}
} else {
unseen.push(tx.txid);
}
}
overflowWeight += tx.weight;
}
totalWeight += tx.weight;
}
({ prioritized, deprioritized } = transactionUtils.identifyPrioritizedTransactions(transactions, 'effectiveFeePerVsize'));
// transactions missing from near the end of our template are probably not being censored
let overflowWeightRemaining = overflowWeight - (config.MEMPOOL.BLOCK_WEIGHT_UNITS - totalWeight);
let maxOverflowRate = 0;
@ -139,15 +168,23 @@ class Audit {
const numCensored = Object.keys(isCensored).length;
const numMatches = matches.length - 1; // adjust for coinbase tx
const score = numMatches > 0 ? (numMatches / (numMatches + numCensored)) : 0;
let score = 0;
if (numMatches <= 0 && numCensored <= 0) {
score = 1;
} else if (numMatches > 0) {
score = (numMatches / (numMatches + numCensored));
}
const similarity = projectedWeight ? matchedWeight / projectedWeight : 1;
return {
unseen,
censored: Object.keys(isCensored),
added,
prioritized,
fresh,
sigop: [],
fullrbf,
fullrbf: rbf,
accelerated,
score,
similarity,
};

View File

@ -9,8 +9,8 @@ class BackendInfo {
constructor() {
// This file is created by ./fetch-version.ts during building
const versionFile = path.join(__dirname, 'version.json')
var versionInfo;
const versionFile = path.join(__dirname, 'version.json');
let versionInfo;
if (fs.existsSync(versionFile)) {
versionInfo = JSON.parse(fs.readFileSync(versionFile).toString());
} else {
@ -24,7 +24,8 @@ class BackendInfo {
hostname: os.hostname(),
version: versionInfo.version,
gitCommit: versionInfo.gitCommit,
lightning: config.LIGHTNING.ENABLED
lightning: config.LIGHTNING.ENABLED,
backend: config.MEMPOOL.BACKEND,
};
}
@ -32,7 +33,7 @@ class BackendInfo {
return this.backendInfo;
}
public getShortCommitHash() {
public getShortCommitHash(): string {
return this.backendInfo.gitCommit.slice(0, 7);
}
}

View File

@ -1,381 +0,0 @@
import { Application, Request, Response } from 'express';
import config from '../../config';
import { RequiredSpec } from '../../mempool.interfaces';
import bisq from './bisq';
import { MarketsApiError } from './interfaces';
import marketsApi from './markets-api';
class BisqRoutes {
public initRoutes(app: Application) {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/stats', this.getBisqStats)
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/tx/:txId', this.getBisqTransaction)
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/block/:hash', this.getBisqBlock)
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/blocks/tip/height', this.getBisqTip)
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/blocks/:index/:length', this.getBisqBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/address/:address', this.getBisqAddress)
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/txs/:index/:length', this.getBisqTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/currencies', this.getBisqMarketCurrencies.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/depth', this.getBisqMarketDepth.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/hloc', this.getBisqMarketHloc.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/markets', this.getBisqMarketMarkets.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/offers', this.getBisqMarketOffers.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/ticker', this.getBisqMarketTicker.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/trades', this.getBisqMarketTrades.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/volumes', this.getBisqMarketVolumes.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'bisq/markets/volumes/7d', this.getBisqMarketVolumes7d.bind(this))
;
}
private getBisqStats(req: Request, res: Response) {
const result = bisq.getStats();
res.json(result);
}
private getBisqTip(req: Request, res: Response) {
const result = bisq.getLatestBlockHeight();
res.type('text/plain');
res.send(result.toString());
}
private getBisqTransaction(req: Request, res: Response) {
const result = bisq.getTransaction(req.params.txId);
if (result) {
res.json(result);
} else {
res.status(404).send('Bisq transaction not found');
}
}
private getBisqTransactions(req: Request, res: Response) {
const types: string[] = [];
req.query.types = req.query.types || [];
if (!Array.isArray(req.query.types)) {
res.status(500).send('Types is not an array');
return;
}
for (const _type in req.query.types) {
if (typeof req.query.types[_type] === 'string') {
types.push(req.query.types[_type].toString());
}
}
const index = parseInt(req.params.index, 10) || 0;
const length = parseInt(req.params.length, 10) > 100 ? 100 : parseInt(req.params.length, 10) || 25;
const [transactions, count] = bisq.getTransactions(index, length, types);
res.header('X-Total-Count', count.toString());
res.json(transactions);
}
private getBisqBlock(req: Request, res: Response) {
const result = bisq.getBlock(req.params.hash);
if (result) {
res.json(result);
} else {
res.status(404).send('Bisq block not found');
}
}
private getBisqBlocks(req: Request, res: Response) {
const index = parseInt(req.params.index, 10) || 0;
const length = parseInt(req.params.length, 10) > 100 ? 100 : parseInt(req.params.length, 10) || 25;
const [transactions, count] = bisq.getBlocks(index, length);
res.header('X-Total-Count', count.toString());
res.json(transactions);
}
private getBisqAddress(req: Request, res: Response) {
const result = bisq.getAddress(req.params.address.substr(1));
if (result) {
res.json(result);
} else {
res.status(404).send('Bisq address not found');
}
}
private getBisqMarketCurrencies(req: Request, res: Response) {
const constraints: RequiredSpec = {
'type': {
required: false,
types: ['crypto', 'fiat', 'all']
},
};
const p = this.parseRequestParameters(req.query, constraints);
if (p.error) {
res.status(400).json(this.getBisqMarketErrorResponse(p.error));
return;
}
const result = marketsApi.getCurrencies(p.type);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketCurrencies error'));
}
}
private getBisqMarketDepth(req: Request, res: Response) {
const constraints: RequiredSpec = {
'market': {
required: true,
types: ['@string']
},
};
const p = this.parseRequestParameters(req.query, constraints);
if (p.error) {
res.status(400).json(this.getBisqMarketErrorResponse(p.error));
return;
}
const result = marketsApi.getDepth(p.market);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketDepth error'));
}
}
private getBisqMarketMarkets(req: Request, res: Response) {
const result = marketsApi.getMarkets();
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketMarkets error'));
}
}
private getBisqMarketTrades(req: Request, res: Response) {
const constraints: RequiredSpec = {
'market': {
required: true,
types: ['@string']
},
'timestamp_from': {
required: false,
types: ['@number']
},
'timestamp_to': {
required: false,
types: ['@number']
},
'trade_id_to': {
required: false,
types: ['@string']
},
'trade_id_from': {
required: false,
types: ['@string']
},
'direction': {
required: false,
types: ['buy', 'sell']
},
'limit': {
required: false,
types: ['@number']
},
'sort': {
required: false,
types: ['asc', 'desc']
}
};
const p = this.parseRequestParameters(req.query, constraints);
if (p.error) {
res.status(400).json(this.getBisqMarketErrorResponse(p.error));
return;
}
const result = marketsApi.getTrades(p.market, p.timestamp_from,
p.timestamp_to, p.trade_id_from, p.trade_id_to, p.direction, p.limit, p.sort);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketTrades error'));
}
}
private getBisqMarketOffers(req: Request, res: Response) {
const constraints: RequiredSpec = {
'market': {
required: true,
types: ['@string']
},
'direction': {
required: false,
types: ['buy', 'sell']
},
};
const p = this.parseRequestParameters(req.query, constraints);
if (p.error) {
res.status(400).json(this.getBisqMarketErrorResponse(p.error));
return;
}
const result = marketsApi.getOffers(p.market, p.direction);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketOffers error'));
}
}
private getBisqMarketVolumes(req: Request, res: Response) {
const constraints: RequiredSpec = {
'market': {
required: false,
types: ['@string']
},
'interval': {
required: false,
types: ['minute', 'half_hour', 'hour', 'half_day', 'day', 'week', 'month', 'year', 'auto']
},
'timestamp_from': {
required: false,
types: ['@number']
},
'timestamp_to': {
required: false,
types: ['@number']
},
'milliseconds': {
required: false,
types: ['@boolean']
},
'timestamp': {
required: false,
types: ['no', 'yes']
},
};
const p = this.parseRequestParameters(req.query, constraints);
if (p.error) {
res.status(400).json(this.getBisqMarketErrorResponse(p.error));
return;
}
const result = marketsApi.getVolumes(p.market, p.timestamp_from, p.timestamp_to, p.interval, p.milliseconds, p.timestamp);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketVolumes error'));
}
}
private getBisqMarketHloc(req: Request, res: Response) {
const constraints: RequiredSpec = {
'market': {
required: true,
types: ['@string']
},
'interval': {
required: false,
types: ['minute', 'half_hour', 'hour', 'half_day', 'day', 'week', 'month', 'year', 'auto']
},
'timestamp_from': {
required: false,
types: ['@number']
},
'timestamp_to': {
required: false,
types: ['@number']
},
'milliseconds': {
required: false,
types: ['@boolean']
},
'timestamp': {
required: false,
types: ['no', 'yes']
},
};
const p = this.parseRequestParameters(req.query, constraints);
if (p.error) {
res.status(400).json(this.getBisqMarketErrorResponse(p.error));
return;
}
const result = marketsApi.getHloc(p.market, p.interval, p.timestamp_from, p.timestamp_to, p.milliseconds, p.timestamp);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketHloc error'));
}
}
private getBisqMarketTicker(req: Request, res: Response) {
const constraints: RequiredSpec = {
'market': {
required: false,
types: ['@string']
},
};
const p = this.parseRequestParameters(req.query, constraints);
if (p.error) {
res.status(400).json(this.getBisqMarketErrorResponse(p.error));
return;
}
const result = marketsApi.getTicker(p.market);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketTicker error'));
}
}
private getBisqMarketVolumes7d(req: Request, res: Response) {
const result = marketsApi.getVolumesByTime(604800);
if (result) {
res.json(result);
} else {
res.status(500).json(this.getBisqMarketErrorResponse('getBisqMarketVolumes7d error'));
}
}
private parseRequestParameters(requestParams: object, params: RequiredSpec): { [name: string]: any; } {
const final = {};
for (const i in params) {
if (params.hasOwnProperty(i)) {
if (params[i].required && requestParams[i] === undefined) {
return { error: i + ' parameter missing'};
}
if (typeof requestParams[i] === 'string') {
const str = (requestParams[i] || '').toString().toLowerCase();
if (params[i].types.indexOf('@number') > -1) {
const number = parseInt((str).toString(), 10);
final[i] = number;
} else if (params[i].types.indexOf('@string') > -1) {
final[i] = str;
} else if (params[i].types.indexOf('@boolean') > -1) {
final[i] = str === 'true' || str === 'yes';
} else if (params[i].types.indexOf(str) > -1) {
final[i] = str;
} else {
return { error: i + ' parameter invalid'};
}
} else if (typeof requestParams[i] === 'number') {
final[i] = requestParams[i];
}
}
}
return final;
}
private getBisqMarketErrorResponse(message: string): MarketsApiError {
return {
'success': 0,
'error': message
};
}
}
export default new BisqRoutes;

View File

@ -1,364 +0,0 @@
import config from '../../config';
import * as fs from 'fs';
import axios, { AxiosResponse } from 'axios';
import * as http from 'http';
import * as https from 'https';
import { SocksProxyAgent } from 'socks-proxy-agent';
import { BisqBlocks, BisqBlock, BisqTransaction, BisqStats, BisqTrade } from './interfaces';
import { Common } from '../common';
import { BlockExtended } from '../../mempool.interfaces';
import { StaticPool } from 'node-worker-threads-pool';
import backendInfo from '../backend-info';
import logger from '../../logger';
class Bisq {
private static BLOCKS_JSON_FILE_PATH = config.BISQ.DATA_PATH + '/json/all/blocks.json';
private latestBlockHeight = 0;
private blocks: BisqBlock[] = [];
private allBlocks: BisqBlock[] = [];
private transactions: BisqTransaction[] = [];
private transactionIndex: { [txId: string]: BisqTransaction } = {};
private blockIndex: { [hash: string]: BisqBlock } = {};
private addressIndex: { [address: string]: BisqTransaction[] } = {};
private stats: BisqStats = {
minted: 0,
burnt: 0,
addresses: 0,
unspent_txos: 0,
spent_txos: 0,
};
private price: number = 0;
private priceUpdateCallbackFunction: ((price: number) => void) | undefined;
private topDirectoryWatcher: fs.FSWatcher | undefined;
private subdirectoryWatcher: fs.FSWatcher | undefined;
private jsonParsePool = new StaticPool({
size: 4,
task: (blob: string) => JSON.parse(blob),
});
constructor() {}
startBisqService(): void {
try {
this.checkForBisqDataFolder();
} catch (e) {
logger.info('Retrying to start bisq service in 3 minutes');
setTimeout(this.startBisqService.bind(this), 180000);
return;
}
this.loadBisqDumpFile();
setInterval(this.updatePrice.bind(this), 1000 * 60 * 60);
this.updatePrice();
this.startTopDirectoryWatcher();
this.startSubDirectoryWatcher();
}
handleNewBitcoinBlock(block: BlockExtended): void {
if (block.height - 10 > this.latestBlockHeight && this.latestBlockHeight !== 0) {
logger.warn(`Bitcoin block height (#${block.height}) has diverged from the latest Bisq block height (#${this.latestBlockHeight}). Restarting watchers...`);
this.startTopDirectoryWatcher();
this.startSubDirectoryWatcher();
}
}
getTransaction(txId: string): BisqTransaction | undefined {
return this.transactionIndex[txId];
}
getTransactions(start: number, length: number, types: string[]): [BisqTransaction[], number] {
let transactions = this.transactions;
if (types.length) {
transactions = transactions.filter((tx) => types.indexOf(tx.txType) > -1);
}
return [transactions.slice(start, length + start), transactions.length];
}
getBlock(hash: string): BisqBlock | undefined {
return this.blockIndex[hash];
}
getAddress(hash: string): BisqTransaction[] {
return this.addressIndex[hash];
}
getBlocks(start: number, length: number): [BisqBlock[], number] {
return [this.blocks.slice(start, length + start), this.blocks.length];
}
getStats(): BisqStats {
return this.stats;
}
setPriceCallbackFunction(fn: (price: number) => void) {
this.priceUpdateCallbackFunction = fn;
}
getLatestBlockHeight(): number {
return this.latestBlockHeight;
}
private checkForBisqDataFolder() {
if (!fs.existsSync(Bisq.BLOCKS_JSON_FILE_PATH)) {
logger.warn(Bisq.BLOCKS_JSON_FILE_PATH + ` doesn't exist. Make sure Bisq is running and the config is correct before starting the server.`);
throw new Error(`Cannot load BISQ ${Bisq.BLOCKS_JSON_FILE_PATH} file`);
}
}
private startTopDirectoryWatcher() {
if (this.topDirectoryWatcher) {
this.topDirectoryWatcher.close();
}
let fsWait: NodeJS.Timeout | null = null;
this.topDirectoryWatcher = fs.watch(config.BISQ.DATA_PATH + '/json', () => {
if (fsWait) {
clearTimeout(fsWait);
}
if (this.subdirectoryWatcher) {
this.subdirectoryWatcher.close();
}
fsWait = setTimeout(() => {
logger.debug(`Bisq restart detected. Resetting both watchers in 3 minutes.`);
setTimeout(() => {
this.startTopDirectoryWatcher();
this.startSubDirectoryWatcher();
this.loadBisqDumpFile();
}, 180000);
}, 15000);
});
}
private startSubDirectoryWatcher() {
if (this.subdirectoryWatcher) {
this.subdirectoryWatcher.close();
}
if (!fs.existsSync(Bisq.BLOCKS_JSON_FILE_PATH)) {
logger.warn(Bisq.BLOCKS_JSON_FILE_PATH + ` doesn't exist. Trying to restart sub directory watcher again in 3 minutes.`);
setTimeout(() => this.startSubDirectoryWatcher(), 180000);
return;
}
let fsWait: NodeJS.Timeout | null = null;
this.subdirectoryWatcher = fs.watch(config.BISQ.DATA_PATH + '/json/all', () => {
if (fsWait) {
clearTimeout(fsWait);
}
fsWait = setTimeout(() => {
logger.debug(`Change detected in the Bisq data folder.`);
this.loadBisqDumpFile();
}, 2000);
});
}
private async updatePrice() {
type axiosOptions = {
headers: {
'User-Agent': string
};
timeout: number;
httpAgent?: http.Agent;
httpsAgent?: https.Agent;
}
const setDelay = (secs: number = 1): Promise<void> => new Promise(resolve => setTimeout(() => resolve(), secs * 1000));
const BISQ_URL = (config.SOCKS5PROXY.ENABLED === true) && (config.SOCKS5PROXY.USE_ONION === true) ? config.EXTERNAL_DATA_SERVER.BISQ_ONION : config.EXTERNAL_DATA_SERVER.BISQ_URL;
const isHTTP = (new URL(BISQ_URL).protocol.split(':')[0] === 'http') ? true : false;
const axiosOptions: axiosOptions = {
headers: {
'User-Agent': (config.MEMPOOL.USER_AGENT === 'mempool') ? `mempool/v${backendInfo.getBackendInfo().version}` : `${config.MEMPOOL.USER_AGENT}`
},
timeout: config.SOCKS5PROXY.ENABLED ? 30000 : 10000
};
let retry = 0;
while(retry < config.MEMPOOL.EXTERNAL_MAX_RETRY) {
try {
if (config.SOCKS5PROXY.ENABLED) {
const socksOptions: any = {
agentOptions: {
keepAlive: true,
},
hostname: config.SOCKS5PROXY.HOST,
port: config.SOCKS5PROXY.PORT
};
if (config.SOCKS5PROXY.USERNAME && config.SOCKS5PROXY.PASSWORD) {
socksOptions.username = config.SOCKS5PROXY.USERNAME;
socksOptions.password = config.SOCKS5PROXY.PASSWORD;
} else {
// Retry with different tor circuits https://stackoverflow.com/a/64960234
socksOptions.username = `circuit${retry}`;
}
// Handle proxy agent for onion addresses
if (isHTTP) {
axiosOptions.httpAgent = new SocksProxyAgent(socksOptions);
} else {
axiosOptions.httpsAgent = new SocksProxyAgent(socksOptions);
}
}
const data: AxiosResponse = await axios.get(`${BISQ_URL}/trades/?market=bsq_btc`, axiosOptions);
if (data.statusText === 'error' || !data.data) {
throw new Error(`Could not fetch data from Bisq market, Error: ${data.status}`);
}
const prices: number[] = [];
data.data.forEach((trade) => {
prices.push(parseFloat(trade.price) * 100000000);
});
prices.sort((a, b) => a - b);
this.price = Common.median(prices);
if (this.priceUpdateCallbackFunction) {
this.priceUpdateCallbackFunction(this.price);
}
logger.debug('Successfully updated Bisq market price');
break;
} catch (e) {
logger.err('Error updating Bisq market price: ' + (e instanceof Error ? e.message : e));
await setDelay(config.MEMPOOL.EXTERNAL_RETRY_INTERVAL);
retry++;
}
}
}
private async loadBisqDumpFile(): Promise<void> {
this.allBlocks = [];
try {
await this.loadData();
this.buildIndex();
this.calculateStats();
} catch (e) {
logger.info('Cannot load bisq dump file because: ' + (e instanceof Error ? e.message : e));
}
}
private buildIndex() {
const start = new Date().getTime();
this.transactions = [];
this.transactionIndex = {};
this.addressIndex = {};
this.allBlocks.forEach((block) => {
/* Build block index */
if (!this.blockIndex[block.hash]) {
this.blockIndex[block.hash] = block;
}
/* Build transactions index */
block.txs.forEach((tx) => {
this.transactions.push(tx);
this.transactionIndex[tx.id] = tx;
});
});
/* Build address index */
this.transactions.forEach((tx) => {
tx.inputs.forEach((input) => {
if (!this.addressIndex[input.address]) {
this.addressIndex[input.address] = [];
}
if (this.addressIndex[input.address].indexOf(tx) === -1) {
this.addressIndex[input.address].push(tx);
}
});
tx.outputs.forEach((output) => {
if (!this.addressIndex[output.address]) {
this.addressIndex[output.address] = [];
}
if (this.addressIndex[output.address].indexOf(tx) === -1) {
this.addressIndex[output.address].push(tx);
}
});
});
const time = new Date().getTime() - start;
logger.debug('Bisq data index rebuilt in ' + time + ' ms');
}
private calculateStats() {
let minted = 0;
let burned = 0;
let unspent = 0;
let spent = 0;
this.transactions.forEach((tx) => {
tx.outputs.forEach((output) => {
if (output.opReturn) {
return;
}
if (output.txOutputType === 'GENESIS_OUTPUT' || output.txOutputType === 'ISSUANCE_CANDIDATE_OUTPUT' && output.isVerified) {
minted += output.bsqAmount;
}
if (output.isUnspent) {
unspent++;
} else {
spent++;
}
});
burned += tx['burntFee'];
});
this.stats = {
addresses: Object.keys(this.addressIndex).length,
minted: minted / 100,
burnt: burned / 100,
spent_txos: spent,
unspent_txos: unspent,
};
}
private async loadData(): Promise<any> {
if (!fs.existsSync(Bisq.BLOCKS_JSON_FILE_PATH)) {
throw new Error(Bisq.BLOCKS_JSON_FILE_PATH + ` doesn't exist`);
}
const readline = require('readline');
const events = require('events');
const rl = readline.createInterface({
input: fs.createReadStream(Bisq.BLOCKS_JSON_FILE_PATH),
crlfDelay: Infinity
});
let blockBuffer = '';
let readingBlock = false;
let lineCount = 1;
const start = new Date().getTime();
logger.debug('Processing Bisq data dump...');
rl.on('line', (line) => {
if (lineCount === 2) {
line = line.replace(' "chainHeight": ', '');
this.latestBlockHeight = parseInt(line, 10);
}
if (line === ' {') {
readingBlock = true;
} else if (line === ' },') {
blockBuffer += '}';
try {
const block: BisqBlock = JSON.parse(blockBuffer);
this.allBlocks.push(block);
readingBlock = false;
blockBuffer = '';
} catch (e) {
logger.debug(blockBuffer);
throw Error(`Unable to parse Bisq data dump at line ${lineCount}` + (e instanceof Error ? e.message : e));
}
}
if (readingBlock === true) {
blockBuffer += line;
}
++lineCount;
});
await events.once(rl, 'close');
this.allBlocks.reverse();
this.blocks = this.allBlocks.filter((block) => block.txs.length > 0);
const time = new Date().getTime() - start;
logger.debug('Bisq dump processed in ' + time + ' ms');
}
}
export default new Bisq();

View File

@ -1,258 +0,0 @@
export interface BisqBlocks {
chainHeight: number;
blocks: BisqBlock[];
}
export interface BisqBlock {
height: number;
time: number;
hash: string;
previousBlockHash: string;
txs: BisqTransaction[];
}
export interface BisqTransaction {
txVersion: string;
id: string;
blockHeight: number;
blockHash: string;
time: number;
inputs: BisqInput[];
outputs: BisqOutput[];
txType: string;
txTypeDisplayString: string;
burntFee: number;
invalidatedBsq: number;
unlockBlockHeight: number;
}
export interface BisqStats {
minted: number;
burnt: number;
addresses: number;
unspent_txos: number;
spent_txos: number;
}
interface BisqInput {
spendingTxOutputIndex: number;
spendingTxId: string;
bsqAmount: number;
isVerified: boolean;
address: string;
time: number;
}
interface BisqOutput {
txVersion: string;
txId: string;
index: number;
bsqAmount: number;
btcAmount: number;
height: number;
isVerified: boolean;
burntFee: number;
invalidatedBsq: number;
address: string;
scriptPubKey: BisqScriptPubKey;
time: any;
txType: string;
txTypeDisplayString: string;
txOutputType: string;
txOutputTypeDisplayString: string;
lockTime: number;
isUnspent: boolean;
spentInfo: SpentInfo;
opReturn?: string;
}
interface BisqScriptPubKey {
addresses: string[];
asm: string;
hex: string;
reqSigs?: number;
type: string;
}
interface SpentInfo {
height: number;
inputIndex: number;
txId: string;
}
export interface BisqTrade {
direction: string;
price: string;
amount: string;
volume: string;
payment_method: string;
trade_id: string;
trade_date: number;
market?: string;
}
export interface Currencies { [txid: string]: Currency; }
export interface Currency {
code: string;
name: string;
precision: number;
_type: string;
}
export interface Depth { [market: string]: Market; }
interface Market {
'buys': string[];
'sells': string[];
}
export interface HighLowOpenClose {
period_start: number | string;
open: string;
high: string;
low: string;
close: string;
volume_left: string;
volume_right: string;
avg: string;
}
export interface Markets { [txid: string]: Pair; }
interface Pair {
pair: string;
lname: string;
rname: string;
lsymbol: string;
rsymbol: string;
lprecision: number;
rprecision: number;
ltype: string;
rtype: string;
name: string;
}
export interface Offers { [market: string]: OffersMarket; }
interface OffersMarket {
buys: Offer[] | null;
sells: Offer[] | null;
}
export interface OffersData {
direction: string;
currencyCode: string;
minAmount: number;
amount: number;
price: number;
date: number;
useMarketBasedPrice: boolean;
marketPriceMargin: number;
paymentMethod: string;
id: string;
currencyPair: string;
primaryMarketDirection: string;
priceDisplayString: string;
primaryMarketAmountDisplayString: string;
primaryMarketMinAmountDisplayString: string;
primaryMarketVolumeDisplayString: string;
primaryMarketMinVolumeDisplayString: string;
primaryMarketPrice: number;
primaryMarketAmount: number;
primaryMarketMinAmount: number;
primaryMarketVolume: number;
primaryMarketMinVolume: number;
}
export interface Offer {
offer_id: string;
offer_date: number;
direction: string;
min_amount: string;
amount: string;
price: string;
volume: string;
payment_method: string;
offer_fee_txid: any;
}
export interface Tickers { [market: string]: Ticker | null; }
export interface Ticker {
last: string;
high: string;
low: string;
volume_left: string;
volume_right: string;
buy: string | null;
sell: string | null;
}
export interface Trade {
direction: string;
price: string;
amount: string;
volume: string;
payment_method: string;
trade_id: string;
trade_date: number;
}
export interface TradesData {
currency: string;
direction: string;
tradePrice: number;
tradeAmount: number;
tradeDate: number;
paymentMethod: string;
offerDate: number;
useMarketBasedPrice: boolean;
marketPriceMargin: number;
offerAmount: number;
offerMinAmount: number;
offerId: string;
depositTxId?: string;
currencyPair: string;
primaryMarketDirection: string;
primaryMarketTradePrice: number;
primaryMarketTradeAmount: number;
primaryMarketTradeVolume: number;
_market: string;
_tradePriceStr: string;
_tradeAmountStr: string;
_tradeVolumeStr: string;
_offerAmountStr: string;
_tradePrice: number;
_tradeAmount: number;
_tradeVolume: number;
_offerAmount: number;
}
export interface MarketVolume {
period_start: number;
num_trades: number;
volume: string;
}
export interface MarketsApiError {
success: number;
error: string;
}
export type Interval = 'minute' | 'half_hour' | 'hour' | 'half_day' | 'day' | 'week' | 'month' | 'year' | 'auto';
export interface SummarizedIntervals { [market: string]: SummarizedInterval; }
export interface SummarizedInterval {
'period_start': number;
'open': number;
'close': number;
'high': number;
'low': number;
'avg': number;
'volume_right': number;
'volume_left': number;
}

View File

@ -1,679 +0,0 @@
import { Currencies, OffersData, TradesData, Depth, Currency, Interval, HighLowOpenClose,
Markets, Offers, Offer, BisqTrade, MarketVolume, Tickers, Ticker, SummarizedIntervals, SummarizedInterval } from './interfaces';
const strtotime = require('./strtotime');
class BisqMarketsApi {
private cryptoCurrencyData: Currency[] = [];
private fiatCurrencyData: Currency[] = [];
private activeCryptoCurrencyData: Currency[] = [];
private activeFiatCurrencyData: Currency[] = [];
private offersData: OffersData[] = [];
private tradesData: TradesData[] = [];
private fiatCurrenciesIndexed: { [code: string]: true } = {};
private allCurrenciesIndexed: { [code: string]: Currency } = {};
private tradeDataByMarket: { [market: string]: TradesData[] } = {};
private tickersCache: Ticker | Tickers | null = null;
constructor() { }
setOffersData(offers: OffersData[]) {
this.offersData = offers;
}
setTradesData(trades: TradesData[]) {
this.tradesData = trades;
this.tradeDataByMarket = {};
this.tradesData.forEach((trade) => {
trade._market = trade.currencyPair.toLowerCase().replace('/', '_');
if (!this.tradeDataByMarket[trade._market]) {
this.tradeDataByMarket[trade._market] = [];
}
this.tradeDataByMarket[trade._market].push(trade);
});
}
setCurrencyData(cryptoCurrency: Currency[], fiatCurrency: Currency[], activeCryptoCurrency: Currency[], activeFiatCurrency: Currency[]) {
this.cryptoCurrencyData = cryptoCurrency,
this.fiatCurrencyData = fiatCurrency,
this.activeCryptoCurrencyData = activeCryptoCurrency,
this.activeFiatCurrencyData = activeFiatCurrency;
this.fiatCurrenciesIndexed = {};
this.allCurrenciesIndexed = {};
this.fiatCurrencyData.forEach((currency) => {
currency._type = 'fiat';
this.fiatCurrenciesIndexed[currency.code] = true;
this.allCurrenciesIndexed[currency.code] = currency;
});
this.cryptoCurrencyData.forEach((currency) => {
currency._type = 'crypto';
this.allCurrenciesIndexed[currency.code] = currency;
});
}
updateCache() {
this.tickersCache = null;
this.tickersCache = this.getTicker();
}
getCurrencies(
type: 'crypto' | 'fiat' | 'active' | 'all' = 'all',
): Currencies {
let currencies: Currency[];
switch (type) {
case 'fiat':
currencies = this.fiatCurrencyData;
break;
case 'crypto':
currencies = this.cryptoCurrencyData;
break;
case 'active':
currencies = this.activeCryptoCurrencyData.concat(this.activeFiatCurrencyData);
break;
case 'all':
default:
currencies = this.cryptoCurrencyData.concat(this.fiatCurrencyData);
}
const result = {};
currencies.forEach((currency) => {
result[currency.code] = currency;
});
return result;
}
getDepth(
market: string,
): Depth {
const currencyPair = market.replace('_', '/').toUpperCase();
const buys = this.offersData
.filter((offer) => offer.currencyPair === currencyPair && offer.primaryMarketDirection === 'BUY')
.map((offer) => offer.price)
.sort((a, b) => b - a)
.map((price) => this.intToBtc(price));
const sells = this.offersData
.filter((offer) => offer.currencyPair === currencyPair && offer.primaryMarketDirection === 'SELL')
.map((offer) => offer.price)
.sort((a, b) => a - b)
.map((price) => this.intToBtc(price));
const result = {};
result[market] = {
'buys': buys,
'sells': sells,
};
return result;
}
getOffers(
market: string,
direction?: 'buy' | 'sell',
): Offers {
const currencyPair = market.replace('_', '/').toUpperCase();
let buys: Offer[] | null = null;
let sells: Offer[] | null = null;
if (!direction || direction === 'buy') {
buys = this.offersData
.filter((offer) => offer.currencyPair === currencyPair && offer.primaryMarketDirection === 'BUY')
.sort((a, b) => b.price - a.price)
.map((offer) => this.offerDataToOffer(offer, market));
}
if (!direction || direction === 'sell') {
sells = this.offersData
.filter((offer) => offer.currencyPair === currencyPair && offer.primaryMarketDirection === 'SELL')
.sort((a, b) => a.price - b.price)
.map((offer) => this.offerDataToOffer(offer, market));
}
const result: Offers = {};
result[market] = {
'buys': buys,
'sells': sells,
};
return result;
}
getMarkets(): Markets {
const allCurrencies = this.getCurrencies();
const activeCurrencies = this.getCurrencies('active');
const markets = {};
for (const currency of Object.keys(activeCurrencies)) {
if (allCurrencies[currency].code === 'BTC') {
continue;
}
const isFiat = allCurrencies[currency]._type === 'fiat';
const pmarketname = allCurrencies['BTC']['name'];
const lsymbol = isFiat ? 'BTC' : currency;
const rsymbol = isFiat ? currency : 'BTC';
const lname = isFiat ? pmarketname : allCurrencies[currency].name;
const rname = isFiat ? allCurrencies[currency].name : pmarketname;
const ltype = isFiat ? 'crypto' : allCurrencies[currency]._type;
const rtype = isFiat ? 'fiat' : 'crypto';
const lprecision = 8;
const rprecision = isFiat ? 2 : 8;
const pair = lsymbol.toLowerCase() + '_' + rsymbol.toLowerCase();
markets[pair] = {
'pair': pair,
'lname': lname,
'rname': rname,
'lsymbol': lsymbol,
'rsymbol': rsymbol,
'lprecision': lprecision,
'rprecision': rprecision,
'ltype': ltype,
'rtype': rtype,
'name': lname + '/' + rname,
};
}
return markets;
}
getTrades(
market: string,
timestamp_from?: number,
timestamp_to?: number,
trade_id_from?: string,
trade_id_to?: string,
direction?: 'buy' | 'sell',
limit: number = 100,
sort: 'asc' | 'desc' = 'desc',
): BisqTrade[] {
limit = Math.min(limit, 2000);
const _market = market === 'all' ? undefined : market;
if (!timestamp_from) {
timestamp_from = new Date('2016-01-01').getTime() / 1000;
}
if (!timestamp_to) {
timestamp_to = new Date().getTime() / 1000;
}
const matches = this.getTradesByCriteria(_market, timestamp_to, timestamp_from,
trade_id_to, trade_id_from, direction, sort, limit, false);
if (sort === 'asc') {
matches.sort((a, b) => a.tradeDate - b.tradeDate);
} else {
matches.sort((a, b) => b.tradeDate - a.tradeDate);
}
return matches.map((trade) => {
const bsqTrade: BisqTrade = {
direction: trade.primaryMarketDirection,
price: trade._tradePriceStr,
amount: trade._tradeAmountStr,
volume: trade._tradeVolumeStr,
payment_method: trade.paymentMethod,
trade_id: trade.offerId,
trade_date: trade.tradeDate,
};
if (market === 'all') {
bsqTrade.market = trade._market;
}
return bsqTrade;
});
}
getVolumes(
market?: string,
timestamp_from?: number,
timestamp_to?: number,
interval: Interval = 'auto',
milliseconds?: boolean,
timestamp: 'no' | 'yes' = 'yes',
): MarketVolume[] {
if (milliseconds) {
timestamp_from = timestamp_from ? timestamp_from / 1000 : timestamp_from;
timestamp_to = timestamp_to ? timestamp_to / 1000 : timestamp_to;
}
if (!timestamp_from) {
timestamp_from = new Date('2016-01-01').getTime() / 1000;
}
if (!timestamp_to) {
timestamp_to = new Date().getTime() / 1000;
}
const trades = this.getTradesByCriteria(market, timestamp_to, timestamp_from,
undefined, undefined, undefined, 'asc', Number.MAX_SAFE_INTEGER);
if (interval === 'auto') {
const range = timestamp_to - timestamp_from;
interval = this.getIntervalFromRange(range);
}
const intervals: any = {};
const marketVolumes: MarketVolume[] = [];
for (const trade of trades) {
const traded_at = trade['tradeDate'] / 1000;
const interval_start = this.intervalStart(traded_at, interval);
if (!intervals[interval_start]) {
intervals[interval_start] = {
'volume': 0,
'num_trades': 0,
};
}
const period = intervals[interval_start];
period['period_start'] = interval_start;
period['volume'] += this.fiatCurrenciesIndexed[trade.currency] ? trade._tradeAmount : trade._tradeVolume;
period['num_trades']++;
}
for (const p in intervals) {
if (intervals.hasOwnProperty(p)) {
const period = intervals[p];
marketVolumes.push({
period_start: timestamp === 'no' ? new Date(period['period_start'] * 1000).toISOString() : period['period_start'],
num_trades: period['num_trades'],
volume: this.intToBtc(period['volume']),
});
}
}
return marketVolumes;
}
getTicker(
market?: string,
): Tickers | Ticker | null {
if (market) {
return this.getTickerFromMarket(market);
}
if (this.tickersCache) {
return this.tickersCache;
}
const allMarkets = this.getMarkets();
const tickers = {};
for (const m in allMarkets) {
if (allMarkets.hasOwnProperty(m)) {
tickers[allMarkets[m].pair] = this.getTickerFromMarket(allMarkets[m].pair);
}
}
return tickers;
}
getTickerFromMarket(market: string): Ticker | null {
let ticker: Ticker;
const timestamp_from = strtotime('-24 hour');
const timestamp_to = new Date().getTime() / 1000;
const trades = this.getTradesByCriteria(market, timestamp_to, timestamp_from,
undefined, undefined, undefined, 'asc', Number.MAX_SAFE_INTEGER);
const periods: SummarizedInterval[] = Object.values(this.getTradesSummarized(trades, timestamp_from));
const allCurrencies = this.getCurrencies();
const currencyRight = allCurrencies[market.split('_')[1].toUpperCase()];
if (periods[0]) {
ticker = {
'last': this.intToBtc(periods[0].close),
'high': this.intToBtc(periods[0].high),
'low': this.intToBtc(periods[0].low),
'volume_left': this.intToBtc(periods[0].volume_left),
'volume_right': this.intToBtc(periods[0].volume_right),
'buy': null,
'sell': null,
};
} else {
const lastTrade = this.tradeDataByMarket[market];
if (!lastTrade) {
return null;
}
const tradePrice = lastTrade[0].primaryMarketTradePrice * Math.pow(10, 8 - currencyRight.precision);
const lastTradePrice = this.intToBtc(tradePrice);
ticker = {
'last': lastTradePrice,
'high': lastTradePrice,
'low': lastTradePrice,
'volume_left': '0',
'volume_right': '0',
'buy': null,
'sell': null,
};
}
const timestampFromMilli = timestamp_from * 1000;
const timestampToMilli = timestamp_to * 1000;
const currencyPair = market.replace('_', '/').toUpperCase();
const offersData = this.offersData.slice().sort((a, b) => a.price - b.price);
const buy = offersData.find((offer) => offer.currencyPair === currencyPair
&& offer.primaryMarketDirection === 'BUY'
&& offer.date >= timestampFromMilli
&& offer.date <= timestampToMilli
);
const sell = offersData.find((offer) => offer.currencyPair === currencyPair
&& offer.primaryMarketDirection === 'SELL'
&& offer.date >= timestampFromMilli
&& offer.date <= timestampToMilli
);
if (buy) {
ticker.buy = this.intToBtc(buy.primaryMarketPrice * Math.pow(10, 8 - currencyRight.precision));
}
if (sell) {
ticker.sell = this.intToBtc(sell.primaryMarketPrice * Math.pow(10, 8 - currencyRight.precision));
}
return ticker;
}
getHloc(
market: string,
interval: Interval = 'auto',
timestamp_from?: number,
timestamp_to?: number,
milliseconds?: boolean,
timestamp: 'no' | 'yes' = 'yes',
): HighLowOpenClose[] {
if (milliseconds) {
timestamp_from = timestamp_from ? timestamp_from / 1000 : timestamp_from;
timestamp_to = timestamp_to ? timestamp_to / 1000 : timestamp_to;
}
if (!timestamp_from) {
timestamp_from = new Date('2016-01-01').getTime() / 1000;
}
if (!timestamp_to) {
timestamp_to = new Date().getTime() / 1000;
}
const trades = this.getTradesByCriteria(market, timestamp_to, timestamp_from,
undefined, undefined, undefined, 'asc', Number.MAX_SAFE_INTEGER);
if (interval === 'auto') {
const range = timestamp_to - timestamp_from;
interval = this.getIntervalFromRange(range);
}
const intervals = this.getTradesSummarized(trades, timestamp_from, interval);
const hloc: HighLowOpenClose[] = [];
for (const p in intervals) {
if (intervals.hasOwnProperty(p)) {
const period = intervals[p];
hloc.push({
period_start: timestamp === 'no' ? new Date(period['period_start'] * 1000).toISOString() : period['period_start'],
open: this.intToBtc(period['open']),
close: this.intToBtc(period['close']),
high: this.intToBtc(period['high']),
low: this.intToBtc(period['low']),
avg: this.intToBtc(period['avg']),
volume_right: this.intToBtc(period['volume_right']),
volume_left: this.intToBtc(period['volume_left']),
});
}
}
return hloc;
}
private getIntervalFromRange(range: number): Interval {
// two days range loads minute data
if (range <= 3600) {
// up to one hour range loads minutely data
return 'minute';
} else if (range <= 1 * 24 * 3600) {
// up to one day range loads half-hourly data
return 'half_hour';
} else if (range <= 3 * 24 * 3600) {
// up to 3 day range loads hourly data
return 'hour';
} else if (range <= 7 * 24 * 3600) {
// up to 7 day range loads half-daily data
return 'half_day';
} else if (range <= 60 * 24 * 3600) {
// up to 2 month range loads daily data
return 'day';
} else if (range <= 12 * 31 * 24 * 3600) {
// up to one year range loads weekly data
return 'week';
} else if (range <= 12 * 31 * 24 * 3600) {
// up to 5 year range loads monthly data
return 'month';
} else {
// greater range loads yearly data
return 'year';
}
}
getVolumesByTime(time: number): MarketVolume[] {
const timestamp_from = new Date().getTime() / 1000 - time;
const timestamp_to = new Date().getTime() / 1000;
const trades = this.getTradesByCriteria(undefined, timestamp_to, timestamp_from,
undefined, undefined, undefined, 'asc', Number.MAX_SAFE_INTEGER);
const markets: any = {};
for (const trade of trades) {
if (!markets[trade._market]) {
markets[trade._market] = {
'volume': 0,
'num_trades': 0,
};
}
markets[trade._market]['volume'] += this.fiatCurrenciesIndexed[trade.currency] ? trade._tradeAmount : trade._tradeVolume;
markets[trade._market]['num_trades']++;
}
return markets;
}
private getTradesSummarized(trades: TradesData[], timestamp_from: number, interval?: string): SummarizedIntervals {
const intervals: any = {};
const intervals_prices: any = {};
for (const trade of trades) {
const traded_at = trade.tradeDate / 1000;
const interval_start = !interval ? timestamp_from : this.intervalStart(traded_at, interval);
if (!intervals[interval_start]) {
intervals[interval_start] = {
'open': 0,
'close': 0,
'high': 0,
'low': 0,
'avg': 0,
'volume_right': 0,
'volume_left': 0,
};
intervals_prices[interval_start] = [];
}
const period = intervals[interval_start];
const price = trade._tradePrice;
if (!intervals_prices[interval_start]['leftvol']) {
intervals_prices[interval_start]['leftvol'] = [];
}
if (!intervals_prices[interval_start]['rightvol']) {
intervals_prices[interval_start]['rightvol'] = [];
}
intervals_prices[interval_start]['leftvol'].push(trade._tradeAmount);
intervals_prices[interval_start]['rightvol'].push(trade._tradeVolume);
if (price) {
const plow = period['low'];
period['period_start'] = interval_start;
period['open'] = period['open'] || price;
period['close'] = price;
period['high'] = price > period['high'] ? price : period['high'];
period['low'] = (plow && price > plow) ? period['low'] : price;
period['avg'] = intervals_prices[interval_start]['rightvol'].reduce((p: number, c: number) => c + p, 0)
/ intervals_prices[interval_start]['leftvol'].reduce((c: number, p: number) => c + p, 0) * 100000000;
period['volume_left'] += trade._tradeAmount;
period['volume_right'] += trade._tradeVolume;
}
}
return intervals;
}
private getTradesByCriteria(
market: string | undefined,
timestamp_to: number,
timestamp_from: number,
trade_id_to: string | undefined,
trade_id_from: string | undefined,
direction: 'buy' | 'sell' | undefined,
sort: string,
limit: number,
integerAmounts: boolean = true,
): TradesData[] {
let trade_id_from_ts: number | null = null;
let trade_id_to_ts: number | null = null;
const allCurrencies = this.getCurrencies();
const timestampFromMilli = timestamp_from * 1000;
const timestampToMilli = timestamp_to * 1000;
// note: the offer_id_from/to depends on iterating over trades in
// descending chronological order.
const tradesDataSorted = this.tradesData.slice();
if (sort === 'asc') {
tradesDataSorted.reverse();
}
let matches: TradesData[] = [];
for (const trade of tradesDataSorted) {
if (trade_id_from === trade.offerId) {
trade_id_from_ts = trade.tradeDate;
}
if (trade_id_to === trade.offerId) {
trade_id_to_ts = trade.tradeDate;
}
if (trade_id_to && trade_id_to_ts === null) {
continue;
}
if (trade_id_from && trade_id_from_ts != null && trade_id_from_ts !== trade.tradeDate) {
continue;
}
if (market && market !== trade._market) {
continue;
}
if (timestampFromMilli && timestampFromMilli > trade.tradeDate) {
continue;
}
if (timestampToMilli && timestampToMilli < trade.tradeDate) {
continue;
}
if (direction && direction !== trade.direction.toLowerCase()) {
continue;
}
// Filter out bogus trades with BTC/BTC or XXX/XXX market.
// See github issue: https://github.com/bitsquare/bitsquare/issues/883
const currencyPairs = trade.currencyPair.split('/');
if (currencyPairs[0] === currencyPairs[1]) {
continue;
}
const currencyLeft = allCurrencies[currencyPairs[0]];
const currencyRight = allCurrencies[currencyPairs[1]];
if (!currencyLeft || !currencyRight) {
continue;
}
const tradePrice = trade.primaryMarketTradePrice * Math.pow(10, 8 - currencyRight.precision);
const tradeAmount = trade.primaryMarketTradeAmount * Math.pow(10, 8 - currencyLeft.precision);
const tradeVolume = trade.primaryMarketTradeVolume * Math.pow(10, 8 - currencyRight.precision);
if (integerAmounts) {
trade._tradePrice = tradePrice;
trade._tradeAmount = tradeAmount;
trade._tradeVolume = tradeVolume;
trade._offerAmount = trade.offerAmount;
} else {
trade._tradePriceStr = this.intToBtc(tradePrice);
trade._tradeAmountStr = this.intToBtc(tradeAmount);
trade._tradeVolumeStr = this.intToBtc(tradeVolume);
trade._offerAmountStr = this.intToBtc(trade.offerAmount);
}
matches.push(trade);
if (matches.length >= limit) {
break;
}
}
if ((trade_id_from && !trade_id_from_ts) || (trade_id_to && !trade_id_to_ts)) {
matches = [];
}
return matches;
}
private intervalStart(ts: number, interval: string): number {
switch (interval) {
case 'minute':
return (ts - (ts % 60));
case '10_minute':
return (ts - (ts % 600));
case 'half_hour':
return (ts - (ts % 1800));
case 'hour':
return (ts - (ts % 3600));
case 'half_day':
return (ts - (ts % (3600 * 12)));
case 'day':
return strtotime('midnight today', ts);
case 'week':
return strtotime('midnight sunday last week', ts);
case 'month':
return strtotime('midnight first day of this month', ts);
case 'year':
return strtotime('midnight first day of january', ts);
default:
throw new Error('Unsupported interval: ' + interval);
}
}
private offerDataToOffer(offer: OffersData, market: string): Offer {
const currencyPairs = market.split('_');
const currencyRight = this.allCurrenciesIndexed[currencyPairs[1].toUpperCase()];
const currencyLeft = this.allCurrenciesIndexed[currencyPairs[0].toUpperCase()];
const price = offer['primaryMarketPrice'] * Math.pow( 10, 8 - currencyRight['precision']);
const amount = offer['primaryMarketAmount'] * Math.pow( 10, 8 - currencyLeft['precision']);
const volume = offer['primaryMarketVolume'] * Math.pow( 10, 8 - currencyRight['precision']);
return {
offer_id: offer.id,
offer_date: offer.date,
direction: offer.primaryMarketDirection,
min_amount: this.intToBtc(offer.minAmount),
amount: this.intToBtc(amount),
price: this.intToBtc(price),
volume: this.intToBtc(volume),
payment_method: offer.paymentMethod,
offer_fee_txid: null,
};
}
private intToBtc(val: number): string {
return (val / 100000000).toFixed(8);
}
}
export default new BisqMarketsApi();

View File

@ -1,137 +0,0 @@
import config from '../../config';
import * as fs from 'fs';
import { OffersData as OffersData, TradesData, Currency } from './interfaces';
import bisqMarket from './markets-api';
import logger from '../../logger';
class Bisq {
private static FOLDER_WATCH_CHANGE_DETECTION_DEBOUNCE = 4000;
private static MARKET_JSON_PATH = config.BISQ.DATA_PATH;
private static MARKET_JSON_FILE_PATHS = {
activeCryptoCurrency: '/active_crypto_currency_list.json',
activeFiatCurrency: '/active_fiat_currency_list.json',
cryptoCurrency: '/crypto_currency_list.json',
fiatCurrency: '/fiat_currency_list.json',
offers: '/offers_statistics.json',
trades: '/trade_statistics.json',
};
private cryptoCurrencyLastMtime = new Date('2016-01-01');
private fiatCurrencyLastMtime = new Date('2016-01-01');
private offersLastMtime = new Date('2016-01-01');
private tradesLastMtime = new Date('2016-01-01');
private subdirectoryWatcher: fs.FSWatcher | undefined;
constructor() {}
startBisqService(): void {
try {
this.checkForBisqDataFolder();
} catch (e) {
logger.info('Retrying to start bisq service (markets) in 3 minutes');
setTimeout(this.startBisqService.bind(this), 180000);
return;
}
this.loadBisqDumpFile();
this.startBisqDirectoryWatcher();
}
private checkForBisqDataFolder() {
if (!fs.existsSync(Bisq.MARKET_JSON_PATH + Bisq.MARKET_JSON_FILE_PATHS.cryptoCurrency)) {
logger.err(Bisq.MARKET_JSON_PATH + Bisq.MARKET_JSON_FILE_PATHS.cryptoCurrency + ` doesn't exist. Make sure Bisq is running and the config is correct before starting the server.`);
throw new Error(`Cannot load BISQ ${Bisq.MARKET_JSON_FILE_PATHS.cryptoCurrency} file`);
}
}
private startBisqDirectoryWatcher() {
if (this.subdirectoryWatcher) {
this.subdirectoryWatcher.close();
}
if (!fs.existsSync(Bisq.MARKET_JSON_PATH + Bisq.MARKET_JSON_FILE_PATHS.cryptoCurrency)) {
logger.warn(Bisq.MARKET_JSON_PATH + Bisq.MARKET_JSON_FILE_PATHS.cryptoCurrency + ` doesn't exist. Trying to restart sub directory watcher again in 3 minutes.`);
setTimeout(() => this.startBisqDirectoryWatcher(), 180000);
return;
}
let fsWait: NodeJS.Timeout | null = null;
this.subdirectoryWatcher = fs.watch(Bisq.MARKET_JSON_PATH, () => {
if (fsWait) {
clearTimeout(fsWait);
}
fsWait = setTimeout(() => {
logger.debug(`Change detected in the Bisq market data folder.`);
this.loadBisqDumpFile();
}, Bisq.FOLDER_WATCH_CHANGE_DETECTION_DEBOUNCE);
});
}
private async loadBisqDumpFile(): Promise<void> {
const start = new Date().getTime();
try {
let marketsDataUpdated = false;
const cryptoMtime = this.getFileMtime(Bisq.MARKET_JSON_FILE_PATHS.cryptoCurrency);
const fiatMtime = this.getFileMtime(Bisq.MARKET_JSON_FILE_PATHS.fiatCurrency);
if (cryptoMtime > this.cryptoCurrencyLastMtime || fiatMtime > this.fiatCurrencyLastMtime) {
const cryptoCurrencyData = await this.loadData<Currency[]>(Bisq.MARKET_JSON_FILE_PATHS.cryptoCurrency);
const fiatCurrencyData = await this.loadData<Currency[]>(Bisq.MARKET_JSON_FILE_PATHS.fiatCurrency);
const activeCryptoCurrencyData = await this.loadData<Currency[]>(Bisq.MARKET_JSON_FILE_PATHS.activeCryptoCurrency);
const activeFiatCurrencyData = await this.loadData<Currency[]>(Bisq.MARKET_JSON_FILE_PATHS.activeFiatCurrency);
logger.debug('Updating Bisq Market Currency Data');
bisqMarket.setCurrencyData(cryptoCurrencyData, fiatCurrencyData, activeCryptoCurrencyData, activeFiatCurrencyData);
if (cryptoMtime > this.cryptoCurrencyLastMtime) {
this.cryptoCurrencyLastMtime = cryptoMtime;
}
if (fiatMtime > this.fiatCurrencyLastMtime) {
this.fiatCurrencyLastMtime = fiatMtime;
}
marketsDataUpdated = true;
}
const offersMtime = this.getFileMtime(Bisq.MARKET_JSON_FILE_PATHS.offers);
if (offersMtime > this.offersLastMtime) {
const offersData = await this.loadData<OffersData[]>(Bisq.MARKET_JSON_FILE_PATHS.offers);
logger.debug('Updating Bisq Market Offers Data');
bisqMarket.setOffersData(offersData);
this.offersLastMtime = offersMtime;
marketsDataUpdated = true;
}
const tradesMtime = this.getFileMtime(Bisq.MARKET_JSON_FILE_PATHS.trades);
if (tradesMtime > this.tradesLastMtime) {
const tradesData = await this.loadData<TradesData[]>(Bisq.MARKET_JSON_FILE_PATHS.trades);
logger.debug('Updating Bisq Market Trades Data');
bisqMarket.setTradesData(tradesData);
this.tradesLastMtime = tradesMtime;
marketsDataUpdated = true;
}
if (marketsDataUpdated) {
bisqMarket.updateCache();
const time = new Date().getTime() - start;
logger.debug('Bisq market data updated in ' + time + ' ms');
}
} catch (e) {
logger.err('loadBisqMarketDataDumpFile() error.' + (e instanceof Error ? e.message : e));
}
}
private getFileMtime(path: string): Date {
const stats = fs.statSync(Bisq.MARKET_JSON_PATH + path);
return stats.mtime;
}
private loadData<T>(path: string): Promise<T> {
return new Promise((resolve, reject) => {
fs.readFile(Bisq.MARKET_JSON_PATH + path, 'utf8', (err, data) => {
if (err) {
reject(err);
}
try {
const parsedData = JSON.parse(data);
resolve(parsedData);
} catch (e) {
reject('JSON parse error (' + path + ')');
}
});
});
}
}
export default new Bisq();

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,17 @@
import { IBitcoinApi, SubmitPackageResult, TestMempoolAcceptResult } from './bitcoin-api.interface';
import { IEsploraApi } from './esplora-api.interface';
export interface AbstractBitcoinApi {
$getRawMempool(): Promise<IEsploraApi.Transaction['txid'][]>;
$getRawTransaction(txId: string, skipConversion?: boolean, addPrevout?: boolean, lazyPrevouts?: boolean): Promise<IEsploraApi.Transaction>;
$getRawTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]>;
$getMempoolTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]>;
$getAllMempoolTransactions(lastTxid?: string, max_txs?: number);
$getTransactionHex(txId: string): Promise<string>;
$getBlockHeightTip(): Promise<number>;
$getBlockHashTip(): Promise<string>;
$getTxIdsForBlock(hash: string): Promise<string[]>;
$getTxsForBlock(hash: string): Promise<IEsploraApi.Transaction[]>;
$getBlockHash(height: number): Promise<string>;
$getBlockHeader(hash: string): Promise<string>;
$getBlock(hash: string): Promise<IEsploraApi.Block>;
@ -14,10 +19,21 @@ export interface AbstractBitcoinApi {
$getAddress(address: string): Promise<IEsploraApi.Address>;
$getAddressTransactions(address: string, lastSeenTxId: string): Promise<IEsploraApi.Transaction[]>;
$getAddressPrefix(prefix: string): string[];
$getScriptHash(scripthash: string): Promise<IEsploraApi.ScriptHash>;
$getScriptHashTransactions(address: string, lastSeenTxId: string): Promise<IEsploraApi.Transaction[]>;
$sendRawTransaction(rawTransaction: string): Promise<string>;
$testMempoolAccept(rawTransactions: string[], maxfeerate?: number): Promise<TestMempoolAcceptResult[]>;
$submitPackage(rawTransactions: string[], maxfeerate?: number, maxburnamount?: number): Promise<SubmitPackageResult>;
$getOutspend(txId: string, vout: number): Promise<IEsploraApi.Outspend>;
$getOutspends(txId: string): Promise<IEsploraApi.Outspend[]>;
$getBatchedOutspends(txId: string[]): Promise<IEsploraApi.Outspend[][]>;
$getBatchedOutspendsInternal(txId: string[]): Promise<IEsploraApi.Outspend[][]>;
$getOutSpendsByOutpoint(outpoints: { txid: string, vout: number }[]): Promise<IEsploraApi.Outspend[]>;
$getCoinbaseTx(blockhash: string): Promise<IEsploraApi.Transaction>;
$getAddressTransactionSummary(address: string): Promise<IEsploraApi.AddressTxSummary[]>;
startHealthChecks(): void;
getHealthStatus(): HealthCheckHost[];
}
export interface BitcoinRpcCredentials {
host: string;
@ -25,4 +41,17 @@ export interface BitcoinRpcCredentials {
user: string;
pass: string;
timeout: number;
cookie?: string;
}
export interface HealthCheckHost {
host: string;
active: boolean;
rtt: number;
latestHeight: number;
socket: boolean;
outOfSync: boolean;
unreachable: boolean;
checked: boolean;
lastChecked: number;
}

View File

@ -106,6 +106,7 @@ export namespace IBitcoinApi {
address?: string; // (string) bitcoin address
addresses?: string[]; // (string) bitcoin addresses
pegout_chain?: string; // (string) Elements peg-out chain
pegout_address?: string; // (string) Elements peg-out address
pegout_addresses?: string[]; // (string) Elements peg-out addresses
};
}
@ -204,3 +205,34 @@ export namespace IBitcoinApi {
"utxo_size_inc": number;
}
}
export interface TestMempoolAcceptResult {
txid: string,
wtxid: string,
allowed?: boolean,
vsize?: number,
fees?: {
base: number,
"effective-feerate": number,
"effective-includes": string[],
},
['reject-reason']?: string,
}
export interface SubmitPackageResult {
package_msg: string;
"tx-results": { [wtxid: string]: TxResult };
"replaced-transactions"?: string[];
}
export interface TxResult {
txid: string;
"other-wtxid"?: string;
vsize?: number;
fees?: {
base: number;
"effective-feerate"?: number;
"effective-includes"?: string[];
};
error?: string;
}

View File

@ -1,10 +1,11 @@
import * as bitcoinjs from 'bitcoinjs-lib';
import { AbstractBitcoinApi } from './bitcoin-api-abstract-factory';
import { IBitcoinApi } from './bitcoin-api.interface';
import { AbstractBitcoinApi, HealthCheckHost } from './bitcoin-api-abstract-factory';
import { IBitcoinApi, SubmitPackageResult, TestMempoolAcceptResult } from './bitcoin-api.interface';
import { IEsploraApi } from './esplora-api.interface';
import blocks from '../blocks';
import mempool from '../mempool';
import { TransactionExtended } from '../../mempool.interfaces';
import transactionUtils from '../transaction-utils';
class BitcoinApi implements AbstractBitcoinApi {
private rawMempoolCache: IBitcoinApi.RawMempool | null = null;
@ -59,9 +60,38 @@ class BitcoinApi implements AbstractBitcoinApi {
});
}
$getTransactionHex(txId: string): Promise<string> {
return this.$getRawTransaction(txId, true)
.then((tx) => tx.hex || '');
async $getRawTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]> {
const txs: IEsploraApi.Transaction[] = [];
for (const txid of txids) {
try {
const tx = await this.$getRawTransaction(txid, false, true);
txs.push(tx);
} catch (err) {
// skip failures
}
}
return txs;
}
$getMempoolTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]> {
throw new Error('Method getMempoolTransactions not supported by the Bitcoin RPC API.');
}
$getAllMempoolTransactions(lastTxid?: string, max_txs?: number): Promise<IEsploraApi.Transaction[]> {
throw new Error('Method getAllMempoolTransactions not supported by the Bitcoin RPC API.');
}
async $getTransactionHex(txId: string): Promise<string> {
const txInMempool = mempool.getMempool()[txId];
if (txInMempool && txInMempool.hex) {
return txInMempool.hex;
}
return this.bitcoindClient.getRawTransaction(txId, true)
.then((transaction: IBitcoinApi.Transaction) => {
return transaction.hex;
});
}
$getBlockHeightTip(): Promise<number> {
@ -77,6 +107,16 @@ class BitcoinApi implements AbstractBitcoinApi {
.then((rpcBlock: IBitcoinApi.Block) => rpcBlock.tx);
}
async $getTxsForBlock(hash: string): Promise<IEsploraApi.Transaction[]> {
const verboseBlock: IBitcoinApi.VerboseBlock = await this.bitcoindClient.getBlock(hash, 2);
const transactions: IEsploraApi.Transaction[] = [];
for (const tx of verboseBlock.tx) {
const converted = await this.$convertTransaction(tx, true);
transactions.push(converted);
}
return transactions;
}
$getRawBlock(hash: string): Promise<Buffer> {
return this.bitcoindClient.getBlock(hash, 0)
.then((raw: string) => Buffer.from(raw, "hex"));
@ -108,6 +148,14 @@ class BitcoinApi implements AbstractBitcoinApi {
throw new Error('Method getAddressTransactions not supported by the Bitcoin RPC API.');
}
$getScriptHash(scripthash: string): Promise<IEsploraApi.ScriptHash> {
throw new Error('Method getScriptHash not supported by the Bitcoin RPC API.');
}
$getScriptHashTransactions(scripthash: string, lastSeenTxId: string): Promise<IEsploraApi.Transaction[]> {
throw new Error('Method getScriptHashTransactions not supported by the Bitcoin RPC API.');
}
$getRawMempool(): Promise<IEsploraApi.Transaction['txid'][]> {
return this.bitcoindClient.getRawMemPool();
}
@ -117,13 +165,21 @@ class BitcoinApi implements AbstractBitcoinApi {
const mp = mempool.getMempool();
for (const tx in mp) {
for (const vout of mp[tx].vout) {
if (vout.scriptpubkey_address.indexOf(prefix) === 0) {
if (vout.scriptpubkey_address?.indexOf(prefix) === 0) {
found[vout.scriptpubkey_address] = '';
if (Object.keys(found).length >= 10) {
return Object.keys(found);
}
}
}
for (const vin of mp[tx].vin) {
if (vin.prevout?.scriptpubkey_address?.indexOf(prefix) === 0) {
found[vin.prevout?.scriptpubkey_address] = '';
if (Object.keys(found).length >= 10) {
return Object.keys(found);
}
}
}
}
return Object.keys(found);
}
@ -132,6 +188,18 @@ class BitcoinApi implements AbstractBitcoinApi {
return this.bitcoindClient.sendRawTransaction(rawTransaction);
}
async $testMempoolAccept(rawTransactions: string[], maxfeerate?: number): Promise<TestMempoolAcceptResult[]> {
if (rawTransactions.length) {
return this.bitcoindClient.testMempoolAccept(rawTransactions, maxfeerate ?? undefined);
} else {
return [];
}
}
$submitPackage(rawTransactions: string[], maxfeerate?: number, maxburnamount?: number): Promise<SubmitPackageResult> {
return this.bitcoindClient.submitPackage(rawTransactions, maxfeerate ?? undefined, maxburnamount ?? undefined);
}
async $getOutspend(txId: string, vout: number): Promise<IEsploraApi.Outspend> {
const txOut = await this.bitcoindClient.getTxOut(txId, vout, false);
return {
@ -169,6 +237,28 @@ class BitcoinApi implements AbstractBitcoinApi {
return outspends;
}
async $getBatchedOutspendsInternal(txId: string[]): Promise<IEsploraApi.Outspend[][]> {
return this.$getBatchedOutspends(txId);
}
async $getOutSpendsByOutpoint(outpoints: { txid: string, vout: number }[]): Promise<IEsploraApi.Outspend[]> {
const outspends: IEsploraApi.Outspend[] = [];
for (const outpoint of outpoints) {
const outspend = await this.$getOutspend(outpoint.txid, outpoint.vout);
outspends.push(outspend);
}
return outspends;
}
async $getCoinbaseTx(blockhash: string): Promise<IEsploraApi.Transaction> {
const txids = await this.$getTxIdsForBlock(blockhash);
return this.$getRawTransaction(txids[0]);
}
async $getAddressTransactionSummary(address: string): Promise<IEsploraApi.AddressTxSummary[]> {
throw new Error('Method getAddressTransactionSummary not supported by the Bitcoin RPC API.');
}
$getEstimatedHashrate(blockHeight: number): Promise<number> {
// 120 is the default block span in Core
return this.bitcoindClient.getNetworkHashPs(120, blockHeight);
@ -193,7 +283,7 @@ class BitcoinApi implements AbstractBitcoinApi {
scriptpubkey: vout.scriptPubKey.hex,
scriptpubkey_address: vout.scriptPubKey && vout.scriptPubKey.address ? vout.scriptPubKey.address
: vout.scriptPubKey.addresses ? vout.scriptPubKey.addresses[0] : '',
scriptpubkey_asm: vout.scriptPubKey.asm ? this.convertScriptSigAsm(vout.scriptPubKey.hex) : '',
scriptpubkey_asm: vout.scriptPubKey.asm ? transactionUtils.convertScriptSigAsm(vout.scriptPubKey.hex) : '',
scriptpubkey_type: this.translateScriptPubKeyType(vout.scriptPubKey.type),
};
});
@ -203,7 +293,7 @@ class BitcoinApi implements AbstractBitcoinApi {
is_coinbase: !!vin.coinbase,
prevout: null,
scriptsig: vin.scriptSig && vin.scriptSig.hex || vin.coinbase || '',
scriptsig_asm: vin.scriptSig && this.convertScriptSigAsm(vin.scriptSig.hex) || '',
scriptsig_asm: vin.scriptSig && transactionUtils.convertScriptSigAsm(vin.scriptSig.hex) || '',
sequence: vin.sequence,
txid: vin.txid || '',
vout: vin.vout || 0,
@ -241,6 +331,7 @@ class BitcoinApi implements AbstractBitcoinApi {
'witness_v1_taproot': 'v1_p2tr',
'nonstandard': 'nonstandard',
'multisig': 'multisig',
'anchor': 'anchor',
'nulldata': 'op_return'
};
@ -275,7 +366,7 @@ class BitcoinApi implements AbstractBitcoinApi {
}
const innerTx = await this.$getRawTransaction(vin.txid, false, false);
vin.prevout = innerTx.vout[vin.vout];
this.addInnerScriptsToVin(vin);
transactionUtils.addInnerScriptsToVin(vin);
}
return transaction;
}
@ -314,7 +405,7 @@ class BitcoinApi implements AbstractBitcoinApi {
}
const innerTx = await this.$getRawTransaction(transaction.vin[i].txid, false, false);
transaction.vin[i].prevout = innerTx.vout[transaction.vin[i].vout];
this.addInnerScriptsToVin(transaction.vin[i]);
transactionUtils.addInnerScriptsToVin(transaction.vin[i]);
totalIn += innerTx.vout[transaction.vin[i].vout].value;
}
if (lazyPrevouts && transaction.vin.length > 12) {
@ -326,122 +417,11 @@ class BitcoinApi implements AbstractBitcoinApi {
return transaction;
}
private convertScriptSigAsm(hex: string): string {
const buf = Buffer.from(hex, 'hex');
public startHealthChecks(): void {};
const b: string[] = [];
let i = 0;
while (i < buf.length) {
const op = buf[i];
if (op >= 0x01 && op <= 0x4e) {
i++;
let push: number;
if (op === 0x4c) {
push = buf.readUInt8(i);
b.push('OP_PUSHDATA1');
i += 1;
} else if (op === 0x4d) {
push = buf.readUInt16LE(i);
b.push('OP_PUSHDATA2');
i += 2;
} else if (op === 0x4e) {
push = buf.readUInt32LE(i);
b.push('OP_PUSHDATA4');
i += 4;
} else {
push = op;
b.push('OP_PUSHBYTES_' + push);
}
const data = buf.slice(i, i + push);
if (data.length !== push) {
break;
}
b.push(data.toString('hex'));
i += data.length;
} else {
if (op === 0x00) {
b.push('OP_0');
} else if (op === 0x4f) {
b.push('OP_PUSHNUM_NEG1');
} else if (op === 0xb1) {
b.push('OP_CLTV');
} else if (op === 0xb2) {
b.push('OP_CSV');
} else if (op === 0xba) {
b.push('OP_CHECKSIGADD');
} else {
const opcode = bitcoinjs.script.toASM([ op ]);
if (opcode && op < 0xfd) {
if (/^OP_(\d+)$/.test(opcode)) {
b.push(opcode.replace(/^OP_(\d+)$/, 'OP_PUSHNUM_$1'));
} else {
b.push(opcode);
}
} else {
b.push('OP_RETURN_' + op);
}
}
i += 1;
}
}
return b.join(' ');
public getHealthStatus() {
return [];
}
private addInnerScriptsToVin(vin: IEsploraApi.Vin): void {
if (!vin.prevout) {
return;
}
if (vin.prevout.scriptpubkey_type === 'p2sh') {
const redeemScript = vin.scriptsig_asm.split(' ').reverse()[0];
vin.inner_redeemscript_asm = this.convertScriptSigAsm(redeemScript);
if (vin.witness && vin.witness.length > 2) {
const witnessScript = vin.witness[vin.witness.length - 1];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
}
if (vin.prevout.scriptpubkey_type === 'v0_p2wsh' && vin.witness) {
const witnessScript = vin.witness[vin.witness.length - 1];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
if (vin.prevout.scriptpubkey_type === 'v1_p2tr' && vin.witness) {
const witnessScript = this.witnessToP2TRScript(vin.witness);
if (witnessScript !== null) {
vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
}
}
/**
* This function must only be called when we know the witness we are parsing
* is a taproot witness.
* @param witness An array of hex strings that represents the witness stack of
* the input.
* @returns null if the witness is not a script spend, and the hex string of
* the script item if it is a script spend.
*/
private witnessToP2TRScript(witness: string[]): string | null {
if (witness.length < 2) return null;
// Note: see BIP341 for parsing details of witness stack
// If there are at least two witness elements, and the first byte of the
// last element is 0x50, this last element is called annex a and
// is removed from the witness stack.
const hasAnnex = witness[witness.length - 1].substring(0, 2) === '50';
// If there are at least two witness elements left, script path spending is used.
// Call the second-to-last stack element s, the script.
// (Note: this phrasing from BIP341 assumes we've *removed* the annex from the stack)
if (hasAnnex && witness.length < 3) return null;
const positionOfScript = hasAnnex ? witness.length - 3 : witness.length - 2;
return witness[positionOfScript];
}
}
export default BitcoinApi;

View File

@ -8,6 +8,7 @@ const nodeRpcCredentials: BitcoinRpcCredentials = {
user: config.CORE_RPC.USERNAME,
pass: config.CORE_RPC.PASSWORD,
timeout: config.CORE_RPC.TIMEOUT,
cookie: config.CORE_RPC.COOKIE ? config.CORE_RPC.COOKIE_PATH : undefined,
};
export default new bitcoin.Client(nodeRpcCredentials);

View File

@ -0,0 +1,254 @@
import { Application, NextFunction, Request, Response } from 'express';
import logger from '../../logger';
import bitcoinClient from './bitcoin-client';
import config from '../../config';
const BLOCKHASH_REGEX = /^[a-f0-9]{64}$/i;
const TXID_REGEX = /^[a-f0-9]{64}$/i;
const RAW_TX_REGEX = /^[a-f0-9]{2,}$/i;
/**
* Define a set of routes used by the accelerator server
* Those routes are not designed to be public
*/
class BitcoinBackendRoutes {
private static tag = 'BitcoinBackendRoutes';
public initRoutes(app: Application): void {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'get-mempool-entry', this.disableCache, this.$getMempoolEntry)
.post(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'decode-raw-transaction', this.disableCache, this.$decodeRawTransaction)
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'get-raw-transaction', this.disableCache, this.$getRawTransaction)
.post(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'send-raw-transaction', this.disableCache, this.$sendRawTransaction)
.post(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'test-mempool-accept', this.disableCache, this.$testMempoolAccept)
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'get-mempool-ancestors', this.disableCache, this.$getMempoolAncestors)
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'get-block', this.disableCache, this.$getBlock)
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'get-block-hash', this.disableCache, this.$getBlockHash)
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/bitcoin-core/' + 'get-block-count', this.disableCache, this.$getBlockCount)
;
}
/**
* Disable caching for bitcoin core routes
*
* @param req
* @param res
* @param next
*/
private disableCache(req: Request, res: Response, next: NextFunction): void {
res.setHeader('Pragma', 'no-cache');
res.setHeader('Cache-control', 'private, no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0');
res.setHeader('expires', -1);
next();
}
/**
* Exeption handler to return proper details to the accelerator server
*
* @param e
* @param fnName
* @param res
*/
private static handleException(e: any, fnName: string, res: Response): void {
if (typeof(e.code) === 'number') {
res.status(400).send(JSON.stringify(e, ['code']));
} else {
const err = `unknown exception in ${fnName}`;
logger.err(err, BitcoinBackendRoutes.tag);
res.status(500).send(err);
}
}
private async $getMempoolEntry(req: Request, res: Response): Promise<void> {
const txid = req.query.txid;
try {
if (typeof(txid) !== 'string' || txid.length !== 64 || !TXID_REGEX.test(txid)) {
res.status(400).send(`invalid param txid. must be 64 hexadecimal characters`);
return;
}
const mempoolEntry = await bitcoinClient.getMempoolEntry(txid);
if (!mempoolEntry) {
res.status(404).send();
return;
}
res.status(200).send(mempoolEntry);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'getMempoolEntry', res);
}
}
private async $decodeRawTransaction(req: Request, res: Response): Promise<void> {
const rawTx = req.body.rawTx;
try {
if (typeof(rawTx) !== 'string' || !RAW_TX_REGEX.test(rawTx)) {
res.status(400).send(`invalid param rawTx. must be a string of hexadecimal characters`);
return;
}
const decodedTx = await bitcoinClient.decodeRawTransaction(rawTx);
if (!decodedTx) {
res.status(400).send(`unable to decode rawTx`);
return;
}
res.status(200).send(decodedTx);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'decodeRawTransaction', res);
}
}
private async $getRawTransaction(req: Request, res: Response): Promise<void> {
const txid = req.query.txid;
const verbose = req.query.verbose;
try {
if (typeof(txid) !== 'string' || txid.length !== 64 || !TXID_REGEX.test(txid)) {
res.status(400).send(`invalid param txid. must be 64 hexadecimal characters`);
return;
}
if (typeof(verbose) !== 'string') {
res.status(400).send(`invalid param verbose. must be a string representing an integer`);
return;
}
const verboseNumber = parseInt(verbose, 10);
if (typeof(verboseNumber) !== 'number') {
res.status(400).send(`invalid param verbose. must be a valid integer`);
return;
}
const decodedTx = await bitcoinClient.getRawTransaction(txid, verboseNumber);
if (!decodedTx) {
res.status(400).send(`unable to get raw transaction`);
return;
}
res.status(200).send(decodedTx);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'decodeRawTransaction', res);
}
}
private async $sendRawTransaction(req: Request, res: Response): Promise<void> {
const rawTx = req.body.rawTx;
try {
if (typeof(rawTx) !== 'string' || !RAW_TX_REGEX.test(rawTx)) {
res.status(400).send(`invalid param rawTx. must be a string of hexadecimal characters`);
return;
}
const txHex = await bitcoinClient.sendRawTransaction(rawTx);
if (!txHex) {
res.status(400).send(`unable to send rawTx`);
return;
}
res.status(200).send(txHex);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'sendRawTransaction', res);
}
}
private async $testMempoolAccept(req: Request, res: Response): Promise<void> {
const rawTxs = req.body.rawTxs;
try {
if (typeof(rawTxs) !== 'object' || !Array.isArray(rawTxs) || rawTxs.some((tx) => typeof(tx) !== 'string' || !RAW_TX_REGEX.test(tx))) {
res.status(400).send(`invalid param rawTxs. must be an array of strings of hexadecimal characters`);
return;
}
const txHex = await bitcoinClient.testMempoolAccept(rawTxs);
if (typeof(txHex) !== 'object' || txHex.length === 0) {
res.status(400).send(`testmempoolaccept failed for raw txs, got an empty result`);
return;
}
res.status(200).send(txHex);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'testMempoolAccept', res);
}
}
private async $getMempoolAncestors(req: Request, res: Response): Promise<void> {
const txid = req.query.txid;
const verbose = req.query.verbose;
try {
if (typeof(txid) !== 'string' || txid.length !== 64 || !TXID_REGEX.test(txid)) {
res.status(400).send(`invalid param txid. must be 64 hexadecimal characters`);
return;
}
if (typeof(verbose) !== 'string' || (verbose !== 'true' && verbose !== 'false')) {
res.status(400).send(`invalid param verbose. must be a string ('true' | 'false')`);
return;
}
const ancestors = await bitcoinClient.getMempoolAncestors(txid, verbose === 'true' ? true : false);
if (!ancestors) {
res.status(400).send(`unable to get mempool ancestors`);
return;
}
res.status(200).send(ancestors);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'getMempoolAncestors', res);
}
}
private async $getBlock(req: Request, res: Response): Promise<void> {
const blockHash = req.query.hash;
const verbosity = req.query.verbosity;
try {
if (typeof(blockHash) !== 'string' || blockHash.length !== 64 || !BLOCKHASH_REGEX.test(blockHash)) {
res.status(400).send(`invalid param blockHash. must be 64 hexadecimal characters`);
return;
}
if (typeof(verbosity) !== 'string') {
res.status(400).send(`invalid param verbosity. must be a string representing an integer`);
return;
}
const verbosityNumber = parseInt(verbosity, 10);
if (typeof(verbosityNumber) !== 'number') {
res.status(400).send(`invalid param verbosity. must be a valid integer`);
return;
}
const block = await bitcoinClient.getBlock(blockHash, verbosityNumber);
if (!block) {
res.status(400).send(`unable to get block`);
return;
}
res.status(200).send(block);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'getBlock', res);
}
}
private async $getBlockHash(req: Request, res: Response): Promise<void> {
const blockHeight = req.query.height;
try {
if (typeof(blockHeight) !== 'string') {
res.status(400).send(`invalid param blockHeight, must be a string representing an integer`);
return;
}
const blockHeightNumber = parseInt(blockHeight, 10);
if (typeof(blockHeightNumber) !== 'number') {
res.status(400).send(`invalid param blockHeight. must be a valid integer`);
return;
}
const block = await bitcoinClient.getBlockHash(blockHeightNumber);
if (!block) {
res.status(400).send(`unable to get block hash`);
return;
}
res.status(200).send(block);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'getBlockHash', res);
}
}
private async $getBlockCount(req: Request, res: Response): Promise<void> {
try {
const count = await bitcoinClient.getBlockCount();
if (!count) {
res.status(400).send(`unable to get block count`);
return;
}
res.status(200).send(`${count}`);
} catch (e: any) {
BitcoinBackendRoutes.handleException(e, 'getBlockCount', res);
}
}
}
export default new BitcoinBackendRoutes;

View File

@ -8,6 +8,7 @@ const nodeRpcCredentials: BitcoinRpcCredentials = {
user: config.SECOND_CORE_RPC.USERNAME,
pass: config.SECOND_CORE_RPC.PASSWORD,
timeout: config.SECOND_CORE_RPC.TIMEOUT,
cookie: config.SECOND_CORE_RPC.COOKIE ? config.SECOND_CORE_RPC.COOKIE_PATH : undefined,
};
export default new bitcoin.Client(nodeRpcCredentials);

View File

@ -6,7 +6,7 @@ import websocketHandler from '../websocket-handler';
import mempool from '../mempool';
import feeApi from '../fee-api';
import mempoolBlocks from '../mempool-blocks';
import bitcoinApi, { bitcoinCoreApi } from './bitcoin-api-factory';
import bitcoinApi from './bitcoin-api-factory';
import { Common } from '../common';
import backendInfo from '../backend-info';
import transactionUtils from '../transaction-utils';
@ -19,12 +19,19 @@ import bitcoinClient from './bitcoin-client';
import difficultyAdjustment from '../difficulty-adjustment';
import transactionRepository from '../../repositories/TransactionRepository';
import rbfCache from '../rbf-cache';
import { calculateMempoolTxCpfp } from '../cpfp';
import { handleError } from '../../utils/api';
import poolsUpdater from '../../tasks/pools-updater';
const TXID_REGEX = /^[a-f0-9]{64}$/i;
const BLOCK_HASH_REGEX = /^[a-f0-9]{64}$/i;
const ADDRESS_REGEX = /^[a-z0-9]{2,120}$/i;
const SCRIPT_HASH_REGEX = /^([a-f0-9]{2})+$/i;
class BitcoinRoutes {
public initRoutes(app: Application) {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'transaction-times', this.getTransactionTimes)
.get(config.MEMPOOL.API_URL_PREFIX + 'outspends', this.$getBatchedOutspends)
.get(config.MEMPOOL.API_URL_PREFIX + 'cpfp/:txId', this.$getCpfpInfo)
.get(config.MEMPOOL.API_URL_PREFIX + 'difficulty-adjustment', this.getDifficultyChange)
.get(config.MEMPOOL.API_URL_PREFIX + 'fees/recommended', this.getRecommendedFees)
@ -37,69 +44,23 @@ class BitcoinRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'replacements', this.getRbfReplacements)
.get(config.MEMPOOL.API_URL_PREFIX + 'fullrbf/replacements', this.getFullRbfReplacements)
.post(config.MEMPOOL.API_URL_PREFIX + 'tx/push', this.$postTransactionForm)
.get(config.MEMPOOL.API_URL_PREFIX + 'donations', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/donations`, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'donations/images/:id', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/donations/images/${req.params.id}`, {
responseType: 'stream', timeout: 10000
});
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'contributors', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/contributors`, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'contributors/images/:id', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/contributors/images/${req.params.id}`, {
responseType: 'stream', timeout: 10000
});
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'translators', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/translators`, { responseType: 'stream', timeout: 10000 });
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'translators/images/:id', async (req, res) => {
try {
const response = await axios.get(`${config.EXTERNAL_DATA_SERVER.MEMPOOL_API}/translators/images/${req.params.id}`, {
responseType: 'stream', timeout: 10000
});
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks', this.getBlocks.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/:height', this.getBlocks.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash', this.getBlock)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/summary', this.getStrippedBlockTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/tx/:txid/summary', this.getStrippedBlockTransaction)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/audit-summary', this.getBlockAuditSummary)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/tx/:txid/audit', this.$getBlockTxAuditSummary)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/tip/height', this.getBlockTipHeight)
.post(config.MEMPOOL.API_URL_PREFIX + 'psbt/addparents', this.postPsbtCompletion)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks-bulk/:from', this.getBlocksByBulk.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks-bulk/:from/:to', this.getBlocksByBulk.bind(this))
// Temporarily add txs/package endpoint for all backends until esplora supports it
.post(config.MEMPOOL.API_URL_PREFIX + 'txs/package', this.$submitPackage)
// Internal routes
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/blocks/definition/list', this.getBlockDefinitionHashes)
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/blocks/definition/current', this.getCurrentBlockDefinitionHash)
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/blocks/:definitionHash', this.getBlocksByDefinitionHash)
;
if (config.MEMPOOL.BACKEND !== 'esplora') {
@ -109,9 +70,11 @@ class BitcoinRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'mempool/recent', this.getRecentMempoolTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId', this.getTransaction)
.post(config.MEMPOOL.API_URL_PREFIX + 'tx', this.$postTransaction)
.post(config.MEMPOOL.API_URL_PREFIX + 'txs/test', this.$testTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/hex', this.getRawTransaction)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/status', this.getTransactionStatus)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/outspends', this.getTransactionOutspends)
.get(config.MEMPOOL.API_URL_PREFIX + 'txs/outspends', this.$getBatchedOutspends)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/header', this.getBlockHeader)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/tip/hash', this.getBlockTipHash)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/raw', this.getRawBlock)
@ -121,6 +84,10 @@ class BitcoinRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'block-height/:height', this.getBlockHeight)
.get(config.MEMPOOL.API_URL_PREFIX + 'address/:address', this.getAddress)
.get(config.MEMPOOL.API_URL_PREFIX + 'address/:address/txs', this.getAddressTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'address/:address/txs/summary', this.getAddressTransactionSummary)
.get(config.MEMPOOL.API_URL_PREFIX + 'scripthash/:scripthash', this.getScriptHash)
.get(config.MEMPOOL.API_URL_PREFIX + 'scripthash/:scripthash/txs', this.getScriptHashTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'scripthash/:scripthash/txs/summary', this.getScriptHashTransactionSummary)
.get(config.MEMPOOL.API_URL_PREFIX + 'address-prefix/:prefix', this.getAddressPrefix)
;
}
@ -133,7 +100,7 @@ class BitcoinRoutes {
res.set('Content-Type', 'application/json');
res.send(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get init data');
}
}
@ -152,19 +119,22 @@ class BitcoinRoutes {
const result = mempoolBlocks.getMempoolBlocks();
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get mempool blocks');
}
}
private getTransactionTimes(req: Request, res: Response) {
if (!Array.isArray(req.query.txId)) {
res.status(500).send('Not an array');
handleError(req, res, 500, 'Not an array');
return;
}
const txIds: string[] = [];
for (const _txId in req.query.txId) {
if (typeof req.query.txId[_txId] === 'string') {
txIds.push(req.query.txId[_txId].toString());
const txid = req.query.txId[_txId].toString();
if (TXID_REGEX.test(txid)) {
txIds.push(txid);
}
}
}
@ -172,33 +142,33 @@ class BitcoinRoutes {
res.json(times);
}
private async $getBatchedOutspends(req: Request, res: Response) {
if (!Array.isArray(req.query.txId)) {
res.status(500).send('Not an array');
private async $getBatchedOutspends(req: Request, res: Response): Promise<IEsploraApi.Outspend[][] | void> {
const txids_csv = req.query.txids;
if (!txids_csv || typeof txids_csv !== 'string') {
handleError(req, res, 500, 'Invalid txids format');
return;
}
if (req.query.txId.length > 50) {
res.status(400).send('Too many txids requested');
const txids = txids_csv.split(',');
if (txids.length > 50) {
handleError(req, res, 400, 'Too many txids requested');
return;
}
const txIds: string[] = [];
for (const _txId in req.query.txId) {
if (typeof req.query.txId[_txId] === 'string') {
txIds.push(req.query.txId[_txId].toString());
}
if (txids.some((txid) => !TXID_REGEX.test(txid))) {
handleError(req, res, 400, 'Invalid txids format');
return;
}
try {
const batchedOutspends = await bitcoinApi.$getBatchedOutspends(txIds);
const batchedOutspends = await bitcoinApi.$getBatchedOutspends(txids);
res.json(batchedOutspends);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get batched outspends');
}
}
private async $getCpfpInfo(req: Request, res: Response) {
if (!/^[a-fA-F0-9]{64}$/.test(req.params.txId)) {
res.status(501).send(`Invalid transaction ID.`);
if (!TXID_REGEX.test(req.params.txId)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
@ -211,12 +181,17 @@ class BitcoinRoutes {
descendants: tx.descendants || null,
effectiveFeePerVsize: tx.effectiveFeePerVsize || null,
sigops: tx.sigops,
fee: tx.fee,
adjustedVsize: tx.adjustedVsize,
acceleration: tx.acceleration,
acceleratedBy: tx.acceleratedBy || undefined,
acceleratedAt: tx.acceleratedAt || undefined,
feeDelta: tx.feeDelta || undefined,
});
return;
}
const cpfpInfo = Common.setRelativesAndGetCpfpInfo(tx, mempool.getMempool());
const cpfpInfo = calculateMempoolTxCpfp(tx, mempool.getMempool());
res.json(cpfpInfo);
return;
@ -226,7 +201,7 @@ class BitcoinRoutes {
try {
cpfpInfo = await transactionRepository.$getCpfpInfo(req.params.txId);
} catch (e) {
res.status(500).send('failed to get CPFP info');
handleError(req, res, 500, 'Failed to get CPFP info');
return;
}
}
@ -247,19 +222,29 @@ class BitcoinRoutes {
}
private async getTransaction(req: Request, res: Response) {
if (!TXID_REGEX.test(req.params.txId)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const transaction = await transactionUtils.$getTransactionExtended(req.params.txId, true);
const transaction = await transactionUtils.$getTransactionExtended(req.params.txId, true, false, false, true);
res.json(transaction);
} catch (e) {
let statusCode = 500;
if (e instanceof Error && e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
statusCode = 404;
handleError(req, res, statusCode, 'No such mempool or blockchain transaction');
return;
}
res.status(statusCode).send(e instanceof Error ? e.message : e);
handleError(req, res, statusCode, 'Failed to get transaction');
}
}
private async getRawTransaction(req: Request, res: Response) {
if (!TXID_REGEX.test(req.params.txId)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const transaction: IEsploraApi.Transaction = await bitcoinApi.$getRawTransaction(req.params.txId, true);
res.setHeader('content-type', 'text/plain');
@ -268,8 +253,10 @@ class BitcoinRoutes {
let statusCode = 500;
if (e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
statusCode = 404;
handleError(req, res, statusCode, 'No such mempool or blockchain transaction');
return;
}
res.status(statusCode).send(e instanceof Error ? e.message : e);
handleError(req, res, statusCode, 'Failed to get raw transaction');
}
}
@ -330,18 +317,22 @@ class BitcoinRoutes {
// Not modified
// 422 Unprocessable Entity
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422
res.status(422).send(`Psbt had no missing nonWitnessUtxos.`);
handleError(req, res, 422, `Psbt had no missing nonWitnessUtxos.`);
}
} catch (e: any) {
if (e instanceof Error && new RegExp(notFoundError).test(e.message)) {
res.status(404).send(e.message);
handleError(req, res, 404, notFoundError);
} else {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to process PSBT');
}
}
}
private async getTransactionStatus(req: Request, res: Response) {
if (!TXID_REGEX.test(req.params.txId)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const transaction = await transactionUtils.$getTransactionExtended(req.params.txId, true);
res.json(transaction.status);
@ -349,22 +340,54 @@ class BitcoinRoutes {
let statusCode = 500;
if (e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
statusCode = 404;
handleError(req, res, statusCode, 'No such mempool or blockchain transaction');
return;
}
res.status(statusCode).send(e instanceof Error ? e.message : e);
handleError(req, res, statusCode, 'Failed to get transaction status');
}
}
private async getStrippedBlockTransactions(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
try {
const transactions = await blocks.$getStrippedBlockTransactions(req.params.hash);
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24 * 30).toUTCString());
res.json(transactions);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block summary');
}
}
private async getStrippedBlockTransaction(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
if (!TXID_REGEX.test(req.params.txid)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const transaction = await blocks.$getSingleTxFromSummary(req.params.hash, req.params.txid);
if (!transaction) {
handleError(req, res, 404, `Transaction not found in summary`);
return;
}
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24 * 30).toUTCString());
res.json(transaction);
} catch (e) {
handleError(req, res, 500, 'Failed to get transaction from summary');
}
}
private async getBlock(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
try {
const block = await blocks.$getBlock(req.params.hash);
@ -376,37 +399,69 @@ class BitcoinRoutes {
} else if (blockAge > 30 * day) {
cacheDuration = 10 * day;
} else {
cacheDuration = 600
cacheDuration = 600;
}
res.setHeader('Expires', new Date(Date.now() + 1000 * cacheDuration).toUTCString());
res.json(block);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block');
}
}
private async getBlockHeader(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
try {
const blockHeader = await bitcoinApi.$getBlockHeader(req.params.hash);
res.setHeader('content-type', 'text/plain');
res.send(blockHeader);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block header');
}
}
private async getBlockAuditSummary(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
try {
const auditSummary = await blocks.$getBlockAuditSummary(req.params.hash);
if (auditSummary) {
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24 * 30).toUTCString());
res.json(auditSummary);
} else {
return res.status(404).send(`audit not available`);
handleError(req, res, 404, `Audit not available`);
return;
}
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block audit summary');
}
}
private async $getBlockTxAuditSummary(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
if (!TXID_REGEX.test(req.params.txid)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const auditSummary = await blocks.$getBlockTxAuditSummary(req.params.hash, req.params.txid);
if (auditSummary) {
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24 * 30).toUTCString());
res.json(auditSummary);
} else {
handleError(req, res, 404, `Transaction audit not available`);
return;
}
} catch (e) {
handleError(req, res, 500, 'Failed to get transaction audit summary');
}
}
@ -416,46 +471,53 @@ class BitcoinRoutes {
const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10);
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(await blocks.$getBlocks(height, 15));
} else { // Liquid, Bisq
} else { // Liquid
return await this.getLegacyBlocks(req, res);
}
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get blocks');
}
}
private async getBlocksByBulk(req: Request, res: Response) {
try {
if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false) { // Liquid, Bisq - Not implemented
return res.status(404).send(`This API is only available for Bitcoin networks`);
if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false) { // Liquid - Not implemented
handleError(req, res, 404, `This API is only available for Bitcoin networks`);
return;
}
if (config.MEMPOOL.MAX_BLOCKS_BULK_QUERY <= 0) {
return res.status(404).send(`This API is disabled. Set config.MEMPOOL.MAX_BLOCKS_BULK_QUERY to a positive number to enable it.`);
handleError(req, res, 404, `This API is disabled. Set config.MEMPOOL.MAX_BLOCKS_BULK_QUERY to a positive number to enable it.`);
return;
}
if (!Common.indexingEnabled()) {
return res.status(404).send(`Indexing is required for this API`);
handleError(req, res, 404, `Indexing is required for this API`);
return;
}
const from = parseInt(req.params.from, 10);
if (!req.params.from || from < 0) {
return res.status(400).send(`Parameter 'from' must be a block height (integer)`);
handleError(req, res, 400, `Parameter 'from' must be a block height (integer)`);
return;
}
const to = req.params.to === undefined ? await bitcoinApi.$getBlockHeightTip() : parseInt(req.params.to, 10);
if (to < 0) {
return res.status(400).send(`Parameter 'to' must be a block height (integer)`);
handleError(req, res, 400, `Parameter 'to' must be a block height (integer)`);
return;
}
if (from > to) {
return res.status(400).send(`Parameter 'to' must be a higher block height than 'from'`);
handleError(req, res, 400, `Parameter 'to' must be a higher block height than 'from'`);
return;
}
if ((to - from + 1) > config.MEMPOOL.MAX_BLOCKS_BULK_QUERY) {
return res.status(400).send(`You can only query ${config.MEMPOOL.MAX_BLOCKS_BULK_QUERY} blocks at once.`);
handleError(req, res, 400, `You can only query ${config.MEMPOOL.MAX_BLOCKS_BULK_QUERY} blocks at once.`);
return;
}
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(await blocks.$getBlocksBetweenHeight(from, to));
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get blocks');
}
}
@ -475,13 +537,13 @@ class BitcoinRoutes {
}
let nextHash = startFromHash;
for (let i = 0; i < 10 && nextHash; i++) {
for (let i = 0; i < 15 && nextHash; i++) {
const localBlock = blocks.getBlocks().find((b) => b.id === nextHash);
if (localBlock) {
returnBlocks.push(localBlock);
nextHash = localBlock.previousblockhash;
} else {
const block = await bitcoinCoreApi.$getBlock(nextHash);
const block = await bitcoinApi.$getBlock(nextHash);
returnBlocks.push(block);
nextHash = block.previousblockhash;
}
@ -490,11 +552,15 @@ class BitcoinRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(returnBlocks);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get blocks');
}
}
private async getBlockTransactions(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
try {
loadingIndicators.setProgress('blocktxs-' + req.params.hash, 0);
@ -515,7 +581,7 @@ class BitcoinRoutes {
res.json(transactions);
} catch (e) {
loadingIndicators.setProgress('blocktxs-' + req.params.hash, 100);
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block transactions');
}
}
@ -524,13 +590,17 @@ class BitcoinRoutes {
const blockHash = await bitcoinApi.$getBlockHash(parseInt(req.params.height, 10));
res.send(blockHash);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block at height');
}
}
private async getAddress(req: Request, res: Response) {
if (config.MEMPOOL.BACKEND === 'none') {
res.status(405).send('Address lookups cannot be used with bitcoind as backend.');
handleError(req, res, 405, 'Address lookups cannot be used with bitcoind as backend.');
return;
}
if (!ADDRESS_REGEX.test(req.params.address)) {
handleError(req, res, 501, `Invalid address`);
return;
}
@ -539,15 +609,20 @@ class BitcoinRoutes {
res.json(addressData);
} catch (e) {
if (e instanceof Error && e.message && (e.message.indexOf('too long') > 0 || e.message.indexOf('confirmed status') > 0)) {
return res.status(413).send(e instanceof Error ? e.message : e);
handleError(req, res, 413, e.message);
return;
}
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get address');
}
}
private async getAddressTransactions(req: Request, res: Response): Promise<void> {
if (config.MEMPOOL.BACKEND === 'none') {
res.status(405).send('Address lookups cannot be used with bitcoind as backend.');
handleError(req, res, 405, 'Address lookups cannot be used with bitcoind as backend.');
return;
}
if (!ADDRESS_REGEX.test(req.params.address)) {
handleError(req, res, 501, `Invalid address`);
return;
}
@ -560,19 +635,85 @@ class BitcoinRoutes {
res.json(transactions);
} catch (e) {
if (e instanceof Error && e.message && (e.message.indexOf('too long') > 0 || e.message.indexOf('confirmed status') > 0)) {
res.status(413).send(e instanceof Error ? e.message : e);
handleError(req, res, 413, e.message);
return;
}
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get address transactions');
}
}
private async getAddressTransactionSummary(req: Request, res: Response): Promise<void> {
if (config.MEMPOOL.BACKEND !== 'esplora') {
handleError(req, res, 405, 'Address summary lookups require mempool/electrs backend.');
return;
}
}
private async getScriptHash(req: Request, res: Response) {
if (config.MEMPOOL.BACKEND === 'none') {
handleError(req, res, 405, 'Address lookups cannot be used with bitcoind as backend.');
return;
}
if (!SCRIPT_HASH_REGEX.test(req.params.scripthash)) {
handleError(req, res, 501, `Invalid scripthash`);
return;
}
try {
// electrum expects scripthashes in little-endian
const electrumScripthash = req.params.scripthash.match(/../g)?.reverse().join('') ?? '';
const addressData = await bitcoinApi.$getScriptHash(electrumScripthash);
res.json(addressData);
} catch (e) {
if (e instanceof Error && e.message && (e.message.indexOf('too long') > 0 || e.message.indexOf('confirmed status') > 0)) {
handleError(req, res, 413, e.message);
return;
}
handleError(req, res, 500, 'Failed to get script hash');
}
}
private async getScriptHashTransactions(req: Request, res: Response): Promise<void> {
if (config.MEMPOOL.BACKEND === 'none') {
handleError(req, res, 405, 'Address lookups cannot be used with bitcoind as backend.');
return;
}
if (!SCRIPT_HASH_REGEX.test(req.params.scripthash)) {
handleError(req, res, 501, `Invalid scripthash`);
return;
}
try {
// electrum expects scripthashes in little-endian
const electrumScripthash = req.params.scripthash.match(/../g)?.reverse().join('') ?? '';
let lastTxId: string = '';
if (req.query.after_txid && typeof req.query.after_txid === 'string') {
lastTxId = req.query.after_txid;
}
const transactions = await bitcoinApi.$getScriptHashTransactions(electrumScripthash, lastTxId);
res.json(transactions);
} catch (e) {
if (e instanceof Error && e.message && (e.message.indexOf('too long') > 0 || e.message.indexOf('confirmed status') > 0)) {
handleError(req, res, 413, e.message);
return;
}
handleError(req, res, 500, 'Failed to get script hash transactions');
}
}
private async getScriptHashTransactionSummary(req: Request, res: Response): Promise<void> {
if (config.MEMPOOL.BACKEND !== 'esplora') {
handleError(req, res, 405, 'Scripthash summary lookups require mempool/electrs backend.');
return;
}
}
private async getAddressPrefix(req: Request, res: Response) {
try {
const blockHash = await bitcoinApi.$getAddressPrefix(req.params.prefix);
res.send(blockHash);
const addressPrefix = await bitcoinApi.$getAddressPrefix(req.params.prefix);
res.send(addressPrefix);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get address prefix');
}
}
@ -599,7 +740,53 @@ class BitcoinRoutes {
const rawMempool = await bitcoinApi.$getRawMempool();
res.send(rawMempool);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, e instanceof Error ? e.message : e);
}
}
private async getBlockDefinitionHashes(req: Request, res: Response): Promise<void> {
try {
const result = await blocks.$getBlockDefinitionHashes();
if (!result) {
handleError(req, res, 503, `Service Temporarily Unavailable`);
return;
}
res.setHeader('content-type', 'application/json');
res.send(result);
} catch (e) {
handleError(req, res, 500, e instanceof Error ? e.message : e);
}
}
private async getCurrentBlockDefinitionHash(req: Request, res: Response): Promise<void> {
try {
const currentSha = await poolsUpdater.getShaFromDb();
if (!currentSha) {
handleError(req, res, 503, `Service Temporarily Unavailable`);
return;
}
res.setHeader('content-type', 'text/plain');
res.send(currentSha);
} catch (e) {
handleError(req, res, 500, e instanceof Error ? e.message : e);
}
}
private async getBlocksByDefinitionHash(req: Request, res: Response): Promise<void> {
try {
if (typeof(req.params.definitionHash) !== 'string') {
res.status(400).send('Parameter "hash" must be a valid string');
return;
}
const blocksHash = await blocks.$getBlocksByDefinitionHash(req.params.definitionHash as string);
if (!blocksHash) {
handleError(req, res, 503, `Service Temporarily Unavailable`);
return;
}
res.setHeader('content-type', 'application/json');
res.send(blocksHash);
} catch (e) {
handleError(req, res, 500, e instanceof Error ? e.message : e);
}
}
@ -607,12 +794,13 @@ class BitcoinRoutes {
try {
const result = blocks.getCurrentBlockHeight();
if (!result) {
return res.status(503).send(`Service Temporarily Unavailable`);
handleError(req, res, 503, `Service Temporarily Unavailable`);
return;
}
res.setHeader('content-type', 'text/plain');
res.send(result.toString());
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get height at tip');
}
}
@ -622,39 +810,55 @@ class BitcoinRoutes {
res.setHeader('content-type', 'text/plain');
res.send(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get hash at tip');
}
}
private async getRawBlock(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
try {
const result = await bitcoinApi.$getRawBlock(req.params.hash);
res.setHeader('content-type', 'application/octet-stream');
res.send(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get raw block');
}
}
private async getTxIdsForBlock(req: Request, res: Response) {
if (!BLOCK_HASH_REGEX.test(req.params.hash)) {
handleError(req, res, 501, `Invalid block hash`);
return;
}
try {
const result = await bitcoinApi.$getTxIdsForBlock(req.params.hash);
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get txids for block');
}
}
private async validateAddress(req: Request, res: Response) {
if (!ADDRESS_REGEX.test(req.params.address)) {
handleError(req, res, 501, `Invalid address`);
return;
}
try {
const result = await bitcoinClient.validateAddress(req.params.address);
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to validate address');
}
}
private async getRbfHistory(req: Request, res: Response) {
if (!TXID_REGEX.test(req.params.txId)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const replacements = rbfCache.getRbfTree(req.params.txId) || null;
const replaces = rbfCache.getReplaces(req.params.txId) || null;
@ -663,7 +867,7 @@ class BitcoinRoutes {
replaces
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get rbf history');
}
}
@ -672,7 +876,7 @@ class BitcoinRoutes {
const result = rbfCache.getRbfTrees(false);
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get rbf trees');
}
}
@ -681,11 +885,15 @@ class BitcoinRoutes {
const result = rbfCache.getRbfTrees(true);
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get full rbf replacements');
}
}
private async getCachedTx(req: Request, res: Response) {
if (!TXID_REGEX.test(req.params.txId)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const result = rbfCache.getTx(req.params.txId);
if (result) {
@ -694,16 +902,20 @@ class BitcoinRoutes {
res.status(204).send();
}
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get cached tx');
}
}
private async getTransactionOutspends(req: Request, res: Response) {
if (!TXID_REGEX.test(req.params.txId)) {
handleError(req, res, 501, `Invalid transaction ID`);
return;
}
try {
const result = await bitcoinApi.$getOutspends(req.params.txId);
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get transaction outspends');
}
}
@ -713,10 +925,10 @@ class BitcoinRoutes {
if (da) {
res.json(da);
} else {
res.status(503).send(`Service Temporarily Unavailable`);
handleError(req, res, 503, `Service Temporarily Unavailable`);
}
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get difficulty change');
}
}
@ -727,8 +939,8 @@ class BitcoinRoutes {
const txIdResult = await bitcoinApi.$sendRawTransaction(rawTx);
res.send(txIdResult);
} catch (e: any) {
res.status(400).send(e.message && e.code ? 'sendrawtransaction RPC error: ' + JSON.stringify({ code: e.code, message: e.message })
: (e.message || 'Error'));
handleError(req, res, 400, (e.message && e.code) ? 'sendrawtransaction RPC error: ' + JSON.stringify({ code: e.code })
: 'Failed to send raw transaction');
}
}
@ -739,8 +951,33 @@ class BitcoinRoutes {
const txIdResult = await bitcoinClient.sendRawTransaction(txHex);
res.send(txIdResult);
} catch (e: any) {
res.status(400).send(e.message && e.code ? 'sendrawtransaction RPC error: ' + JSON.stringify({ code: e.code, message: e.message })
: (e.message || 'Error'));
handleError(req, res, 400, (e.message && e.code) ? 'sendrawtransaction RPC error: ' + JSON.stringify({ code: e.code })
: 'Failed to send raw transaction');
}
}
private async $testTransactions(req: Request, res: Response) {
try {
const rawTxs = Common.getTransactionsFromRequest(req);
const maxfeerate = parseFloat(req.query.maxfeerate as string);
const result = await bitcoinApi.$testMempoolAccept(rawTxs, maxfeerate);
res.send(result);
} catch (e: any) {
handleError(req, res, 400, (e.message && e.code) ? 'testmempoolaccept RPC error: ' + JSON.stringify({ code: e.code })
: 'Failed to test transactions');
}
}
private async $submitPackage(req: Request, res: Response) {
try {
const rawTxs = Common.getTransactionsFromRequest(req);
const maxfeerate = parseFloat(req.query.maxfeerate as string);
const maxburnamount = parseFloat(req.query.maxburnamount as string);
const result = await bitcoinClient.submitPackage(rawTxs, maxfeerate ?? undefined, maxburnamount ?? undefined);
res.send(result);
} catch (e: any) {
handleError(req, res, 400, (e.message && e.code) ? 'submitpackage RPC error: ' + JSON.stringify({ code: e.code })
: 'Failed to submit package');
}
}

View File

@ -126,6 +126,77 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
}
}
async $getScriptHash(scripthash: string): Promise<IEsploraApi.ScriptHash> {
try {
const balance = await this.electrumClient.blockchainScripthash_getBalance(scripthash);
let history = memoryCache.get<IElectrumApi.ScriptHashHistory[]>('Scripthash_getHistory', scripthash);
if (!history) {
history = await this.electrumClient.blockchainScripthash_getHistory(scripthash);
memoryCache.set('Scripthash_getHistory', scripthash, history, 2);
}
const unconfirmed = history ? history.filter((h) => h.fee).length : 0;
return {
'scripthash': scripthash,
'chain_stats': {
'funded_txo_count': 0,
'funded_txo_sum': balance.confirmed ? balance.confirmed : 0,
'spent_txo_count': 0,
'spent_txo_sum': balance.confirmed < 0 ? balance.confirmed : 0,
'tx_count': (history?.length || 0) - unconfirmed,
},
'mempool_stats': {
'funded_txo_count': 0,
'funded_txo_sum': balance.unconfirmed > 0 ? balance.unconfirmed : 0,
'spent_txo_count': 0,
'spent_txo_sum': balance.unconfirmed < 0 ? -balance.unconfirmed : 0,
'tx_count': unconfirmed,
},
'electrum': true,
};
} catch (e: any) {
throw new Error(typeof e === 'string' ? e : e && e.message || e);
}
}
async $getScriptHashTransactions(scripthash: string, lastSeenTxId?: string): Promise<IEsploraApi.Transaction[]> {
try {
loadingIndicators.setProgress('address-' + scripthash, 0);
const transactions: IEsploraApi.Transaction[] = [];
let history = memoryCache.get<IElectrumApi.ScriptHashHistory[]>('Scripthash_getHistory', scripthash);
if (!history) {
history = await this.electrumClient.blockchainScripthash_getHistory(scripthash);
memoryCache.set('Scripthash_getHistory', scripthash, history, 2);
}
if (!history) {
throw new Error('failed to get scripthash history');
}
history.sort((a, b) => (b.height || 9999999) - (a.height || 9999999));
let startingIndex = 0;
if (lastSeenTxId) {
const pos = history.findIndex((historicalTx) => historicalTx.tx_hash === lastSeenTxId);
if (pos) {
startingIndex = pos + 1;
}
}
const endIndex = Math.min(startingIndex + 10, history.length);
for (let i = startingIndex; i < endIndex; i++) {
const tx = await this.$getRawTransaction(history[i].tx_hash, false, true);
transactions.push(tx);
loadingIndicators.setProgress('address-' + scripthash, (i + 1) / endIndex * 100);
}
return transactions;
} catch (e: any) {
loadingIndicators.setProgress('address-' + scripthash, 100);
throw new Error(typeof e === 'string' ? e : e && e.message || e);
}
}
private $getScriptHashBalance(scriptHash: string): Promise<IElectrumApi.ScriptHashBalance> {
return this.electrumClient.blockchainScripthash_getBalance(this.encodeScriptHash(scriptHash));
}

View File

@ -6,6 +6,7 @@ export namespace IEsploraApi {
size: number;
weight: number;
fee: number;
sigops?: number;
vin: Vin[];
vout: Vout[];
status: Status;
@ -53,7 +54,7 @@ export namespace IEsploraApi {
scriptpubkey: string;
scriptpubkey_asm: string;
scriptpubkey_type: string;
scriptpubkey_address: string;
scriptpubkey_address?: string;
value: number;
// Elements
valuecommitment?: number;
@ -99,6 +100,13 @@ export namespace IEsploraApi {
electrum?: boolean;
}
export interface ScriptHash {
scripthash: string;
chain_stats: ChainStats;
mempool_stats: MempoolStats;
electrum?: boolean;
}
export interface ChainStats {
funded_txo_count: number;
funded_txo_sum: number;
@ -171,4 +179,11 @@ export namespace IEsploraApi {
burn_count: number;
}
export interface AddressTxSummary {
txid: string;
value: number;
height: number;
time: number;
tx_position?: number;
}
}

View File

@ -1,115 +1,406 @@
import config from '../../config';
import axios, { AxiosRequestConfig } from 'axios';
import axios, { isAxiosError } from 'axios';
import http from 'http';
import { AbstractBitcoinApi } from './bitcoin-api-abstract-factory';
import { AbstractBitcoinApi, HealthCheckHost } from './bitcoin-api-abstract-factory';
import { IEsploraApi } from './esplora-api.interface';
import logger from '../../logger';
import { Common } from '../common';
import { SubmitPackageResult, TestMempoolAcceptResult } from './bitcoin-api.interface';
import os from 'os';
interface FailoverHost {
host: string,
rtts: number[],
rtt: number,
timedOut?: boolean,
failures: number,
latestHeight?: number,
socket?: boolean,
outOfSync?: boolean,
unreachable?: boolean,
preferred?: boolean,
checked: boolean,
lastChecked?: number,
publicDomain: string,
hashes: {
frontend?: string,
backend?: string,
electrs?: string,
lastUpdated: number,
}
}
const axiosConnection = axios.create({
httpAgent: new http.Agent({ keepAlive: true, })
});
class ElectrsApi implements AbstractBitcoinApi {
private axiosConfigWithUnixSocket: AxiosRequestConfig = config.ESPLORA.UNIX_SOCKET_PATH ? {
socketPath: config.ESPLORA.UNIX_SOCKET_PATH,
timeout: 10000,
} : {
timeout: 10000,
};
private axiosConfigTcpSocketOnly: AxiosRequestConfig = {
timeout: 10000,
};
unixSocketRetryTimeout;
activeAxiosConfig;
class FailoverRouter {
activeHost: FailoverHost;
fallbackHost: FailoverHost;
maxSlippage: number = config.ESPLORA.MAX_BEHIND_TIP ?? 2;
maxHeight: number = 0;
hosts: FailoverHost[];
multihost: boolean;
gitHashInterval: number = 600000; // 10 minutes
pollInterval: number = 60000; // 1 minute
pollTimer: NodeJS.Timeout | null = null;
pollConnection = axios.create();
localHostname: string = 'localhost';
requestConnection = axios.create({
httpAgent: new http.Agent({ keepAlive: true })
});
constructor() {
this.activeAxiosConfig = this.axiosConfigWithUnixSocket;
try {
this.localHostname = os.hostname();
} catch (e) {
logger.warn('Failed to set local hostname, using "localhost"');
}
// setup list of hosts
this.hosts = (config.ESPLORA.FALLBACK || []).map(domain => {
return {
host: domain,
checked: false,
rtts: [],
rtt: Infinity,
failures: 0,
publicDomain: 'https://' + this.extractPublicDomain(domain),
hashes: {
lastUpdated: 0,
},
};
});
this.activeHost = {
host: config.ESPLORA.UNIX_SOCKET_PATH || config.ESPLORA.REST_API_URL,
rtts: [],
rtt: 0,
failures: 0,
socket: !!config.ESPLORA.UNIX_SOCKET_PATH,
preferred: true,
checked: false,
publicDomain: `http://${this.localHostname}`,
hashes: {
lastUpdated: 0,
},
};
this.fallbackHost = this.activeHost;
this.hosts.unshift(this.activeHost);
this.multihost = this.hosts.length > 1;
}
fallbackToTcpSocket() {
if (!this.unixSocketRetryTimeout) {
logger.err(`Unable to connect to esplora unix socket. Falling back to tcp socket. Retrying unix socket in ${config.ESPLORA.RETRY_UNIX_SOCKET_AFTER / 1000} seconds`);
// Retry the unix socket after a few seconds
this.unixSocketRetryTimeout = setTimeout(() => {
logger.info(`Retrying to use unix socket for esplora now (applied for the next query)`);
this.activeAxiosConfig = this.axiosConfigWithUnixSocket;
this.unixSocketRetryTimeout = undefined;
}, config.ESPLORA.RETRY_UNIX_SOCKET_AFTER);
public startHealthChecks(): void {
// use axios interceptors to measure request rtt
this.pollConnection.interceptors.request.use((config) => {
config['meta'] = { startTime: Date.now() };
return config;
});
this.pollConnection.interceptors.response.use((response) => {
response.config['meta'].rtt = Date.now() - response.config['meta'].startTime;
return response;
});
if (this.multihost) {
this.pollHosts();
}
}
// start polling hosts to measure availability & rtt
private async pollHosts(): Promise<void> {
if (this.pollTimer) {
clearTimeout(this.pollTimer);
}
// Use the TCP socket (reach a different esplora instance through nginx)
this.activeAxiosConfig = this.axiosConfigTcpSocketOnly;
const start = Date.now();
// update rtts & sync status
for (const host of this.hosts) {
try {
const result = await (host.socket
? this.pollConnection.get<number>('/blocks/tip/height', { socketPath: host.host, timeout: config.ESPLORA.FALLBACK_TIMEOUT })
: this.pollConnection.get<number>(host.host + '/blocks/tip/height', { timeout: config.ESPLORA.FALLBACK_TIMEOUT })
);
if (result) {
const height = result.data;
host.latestHeight = height;
this.maxHeight = Math.max(height || 0, ...this.hosts.map(h => (!(h.unreachable || h.timedOut || h.outOfSync) ? h.latestHeight || 0 : 0)));
const rtt = result.config['meta'].rtt;
host.rtts.unshift(rtt);
host.rtts.slice(0, 5);
host.rtt = host.rtts.reduce((acc, l) => acc + l, 0) / host.rtts.length;
if (height == null || isNaN(height) || (this.maxHeight - height > this.maxSlippage)) {
host.outOfSync = true;
} else {
host.outOfSync = false;
}
host.unreachable = false;
// update esplora git hash using the x-powered-by header from the height check
const poweredBy = result.headers['x-powered-by'];
if (poweredBy) {
const match = poweredBy.match(/([a-fA-F0-9]{5,40})/);
if (match && match[1]?.length) {
host.hashes.electrs = match[1];
}
}
// Check front and backend git hashes less often
if (Date.now() - host.hashes.lastUpdated > this.gitHashInterval) {
await Promise.all([
this.$updateFrontendGitHash(host),
this.$updateBackendGitHash(host)
]);
host.hashes.lastUpdated = Date.now();
}
} else {
host.outOfSync = true;
host.unreachable = true;
host.rtts = [];
host.rtt = Infinity;
}
host.timedOut = false;
} catch (e) {
host.outOfSync = true;
host.unreachable = true;
host.rtts = [];
host.rtt = Infinity;
if (isAxiosError(e) && (e.code === 'ECONNABORTED' || e.code === 'ETIMEDOUT')) {
host.timedOut = true;
} else {
host.timedOut = false;
}
}
host.checked = true;
host.lastChecked = Date.now();
const rankOrder = this.sortHosts();
// switch if the current host is out of sync or significantly slower than the next best alternative
if (this.activeHost.outOfSync || this.activeHost.unreachable || (this.activeHost !== rankOrder[0] && rankOrder[0].preferred) || (!this.activeHost.preferred && this.activeHost.rtt > (rankOrder[0].rtt * 2) + 50)) {
if (this.activeHost.unreachable) {
logger.warn(`🚨🚨🚨 Unable to reach ${this.activeHost.host}, failing over to next best alternative 🚨🚨🚨`);
} else if (this.activeHost.outOfSync) {
logger.warn(`🚨🚨🚨 ${this.activeHost.host} has fallen behind, failing over to next best alternative 🚨🚨🚨`);
} else {
logger.debug(`🛠️ ${this.activeHost.host} is no longer the best esplora host 🛠️`);
}
this.electHost();
}
await Common.sleep$(50);
}
const rankOrder = this.updateFallback();
logger.debug(`Tomahawk ranking:\n${rankOrder.map((host, index) => this.formatRanking(index, host, this.activeHost, this.maxHeight)).join('\n')}`);
const elapsed = Date.now() - start;
this.pollTimer = setTimeout(() => { this.pollHosts(); }, Math.max(1, this.pollInterval - elapsed));
}
$queryWrapper<T>(url, responseType = 'json'): Promise<T> {
return axiosConnection.get<T>(url, { ...this.activeAxiosConfig, responseType: responseType })
.then((response) => response.data)
private formatRanking(index: number, host: FailoverHost, active: FailoverHost, maxHeight: number): string {
const heightStatus = !host.checked ? '⏳' : (host.outOfSync ? '🚫' : (host.latestHeight && host.latestHeight < maxHeight ? '🟧' : '✅'));
return `${host === active ? '⭐️' : ' '} ${host.rtt < Infinity ? Math.round(host.rtt).toString().padStart(5, ' ') + 'ms' : (host.timedOut ? ' ⌛️💥 ' : ' - ')} ${!host.checked ? '⏳' : (host.unreachable ? '🔥' : '✅')} | block: ${host.latestHeight || '??????'} ${heightStatus} | ${host.host} ${host === active ? '⭐️' : ' '}`;
}
private updateFallback(): FailoverHost[] {
const rankOrder = this.sortHosts();
if (rankOrder.length > 1 && rankOrder[0] === this.activeHost) {
this.fallbackHost = rankOrder[1];
} else {
this.fallbackHost = rankOrder[0];
}
return rankOrder;
}
// sort hosts by connection quality, and update default fallback
public sortHosts(): FailoverHost[] {
// sort by connection quality
return this.hosts.slice().sort((a, b) => {
if ((a.unreachable || a.outOfSync) === (b.unreachable || b.outOfSync)) {
if (a.preferred === b.preferred) {
// lower rtt is best
return a.rtt - b.rtt;
} else { // unless we have a preferred host
return a.preferred ? -1 : 1;
}
} else { // or the host is out of sync
return (a.unreachable || a.outOfSync) ? 1 : -1;
}
});
}
// depose the active host and choose the next best replacement
private electHost(): void {
this.activeHost.failures = 0;
const rankOrder = this.sortHosts();
this.activeHost = rankOrder[0];
logger.warn(`Switching esplora host to ${this.activeHost.host}`);
}
private addFailure(host: FailoverHost): FailoverHost {
host.failures++;
if (host.failures > 5 && this.multihost) {
logger.warn(`🚨🚨🚨 Too many esplora failures on ${this.activeHost.host}, falling back to next best alternative 🚨🚨🚨`);
this.activeHost.unreachable = true;
this.electHost();
return this.activeHost;
} else {
return this.fallbackHost;
}
}
// methods for retrieving git hashes by host
private async $updateFrontendGitHash(host: FailoverHost): Promise<void> {
try {
const url = `${host.publicDomain}/resources/config.js`;
const response = await this.pollConnection.get<string>(url, { timeout: config.ESPLORA.FALLBACK_TIMEOUT });
const match = response.data.match(/GIT_COMMIT_HASH\s*=\s*['"](.*?)['"]/);
if (match && match[1]?.length) {
host.hashes.frontend = match[1];
}
} catch (e) {
// failed to get frontend build hash - do nothing
}
}
private async $updateBackendGitHash(host: FailoverHost): Promise<void> {
try {
const url = `${host.publicDomain}/api/v1/backend-info`;
const response = await this.pollConnection.get<any>(url, { timeout: config.ESPLORA.FALLBACK_TIMEOUT });
if (response.data?.gitCommit) {
host.hashes.backend = response.data.gitCommit;
}
} catch (e) {
// failed to get backend build hash - do nothing
}
}
// returns the public mempool domain corresponding to an esplora server url
// (a bit of a hack to avoid manually specifying frontend & backend URLs for each esplora server)
private extractPublicDomain(url: string): string {
// force the url to start with a valid protocol
const urlWithProtocol = url.startsWith('http') ? url : `https://${url}`;
// parse as URL and extract the hostname
try {
const parsed = new URL(urlWithProtocol);
return parsed.hostname;
} catch (e) {
// fallback to the original url
return url;
}
}
private async $query<T>(method: 'get'| 'post', path, data: any, responseType = 'json', host = this.activeHost, retry: boolean = true): Promise<T> {
let axiosConfig;
let url;
if (host.socket) {
axiosConfig = { socketPath: host.host, timeout: config.ESPLORA.REQUEST_TIMEOUT, responseType };
url = path;
} else {
axiosConfig = { timeout: config.ESPLORA.REQUEST_TIMEOUT, responseType };
url = host.host + path;
}
if (data?.params) {
axiosConfig.params = data.params;
}
return (method === 'post'
? this.requestConnection.post<T>(url, data, axiosConfig)
: this.requestConnection.get<T>(url, axiosConfig)
).then((response) => { host.failures = Math.max(0, host.failures - 1); return response.data; })
.catch((e) => {
if (e?.code === 'ECONNREFUSED') {
this.fallbackToTcpSocket();
let fallbackHost = this.fallbackHost;
if (e?.response?.status !== 404) {
logger.warn(`esplora request failed ${e?.response?.status} ${host.host}${path}`);
logger.warn(e instanceof Error ? e.message : e);
fallbackHost = this.addFailure(host);
}
if (retry && e?.code === 'ECONNREFUSED' && this.multihost) {
// Retry immediately
return axiosConnection.get<T>(url, this.activeAxiosConfig)
.then((response) => response.data)
.catch((e) => {
logger.warn(`Cannot query esplora through the unix socket nor the tcp socket. Exception ${e}`);
throw e;
});
return this.$query(method, path, data, responseType, fallbackHost, false);
} else {
throw e;
}
});
}
public async $get<T>(path, responseType = 'json', params: any = null): Promise<T> {
return this.$query<T>('get', path, params ? { params } : null, responseType);
}
public async $post<T>(path, data: any, responseType = 'json'): Promise<T> {
return this.$query<T>('post', path, data, responseType);
}
}
class ElectrsApi implements AbstractBitcoinApi {
private failoverRouter = new FailoverRouter();
$getRawMempool(): Promise<IEsploraApi.Transaction['txid'][]> {
return this.$queryWrapper<IEsploraApi.Transaction['txid'][]>(config.ESPLORA.REST_API_URL + '/mempool/txids');
return this.failoverRouter.$get<IEsploraApi.Transaction['txid'][]>('/mempool/txids');
}
$getRawTransaction(txId: string): Promise<IEsploraApi.Transaction> {
return this.$queryWrapper<IEsploraApi.Transaction>(config.ESPLORA.REST_API_URL + '/tx/' + txId);
return this.failoverRouter.$get<IEsploraApi.Transaction>('/tx/' + txId);
}
async $getRawTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]> {
return this.failoverRouter.$post<IEsploraApi.Transaction[]>('/internal/txs', txids, 'json');
}
async $getMempoolTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]> {
return this.failoverRouter.$post<IEsploraApi.Transaction[]>('/internal/mempool/txs', txids, 'json');
}
async $getAllMempoolTransactions(lastSeenTxid?: string, max_txs?: number): Promise<IEsploraApi.Transaction[]> {
return this.failoverRouter.$get<IEsploraApi.Transaction[]>('/internal/mempool/txs' + (lastSeenTxid ? '/' + lastSeenTxid : ''), 'json', max_txs ? { max_txs } : null);
}
$getTransactionHex(txId: string): Promise<string> {
return this.$queryWrapper<string>(config.ESPLORA.REST_API_URL + '/tx/' + txId + '/hex');
return this.failoverRouter.$get<string>('/tx/' + txId + '/hex');
}
$getBlockHeightTip(): Promise<number> {
return this.$queryWrapper<number>(config.ESPLORA.REST_API_URL + '/blocks/tip/height');
return this.failoverRouter.$get<number>('/blocks/tip/height');
}
$getBlockHashTip(): Promise<string> {
return this.$queryWrapper<string>(config.ESPLORA.REST_API_URL + '/blocks/tip/hash');
return this.failoverRouter.$get<string>('/blocks/tip/hash');
}
$getTxIdsForBlock(hash: string): Promise<string[]> {
return this.$queryWrapper<string[]>(config.ESPLORA.REST_API_URL + '/block/' + hash + '/txids');
return this.failoverRouter.$get<string[]>('/block/' + hash + '/txids');
}
$getTxsForBlock(hash: string): Promise<IEsploraApi.Transaction[]> {
return this.failoverRouter.$get<IEsploraApi.Transaction[]>('/internal/block/' + hash + '/txs');
}
$getBlockHash(height: number): Promise<string> {
return this.$queryWrapper<string>(config.ESPLORA.REST_API_URL + '/block-height/' + height);
return this.failoverRouter.$get<string>('/block-height/' + height);
}
$getBlockHeader(hash: string): Promise<string> {
return this.$queryWrapper<string>(config.ESPLORA.REST_API_URL + '/block/' + hash + '/header');
return this.failoverRouter.$get<string>('/block/' + hash + '/header');
}
$getBlock(hash: string): Promise<IEsploraApi.Block> {
return this.$queryWrapper<IEsploraApi.Block>(config.ESPLORA.REST_API_URL + '/block/' + hash);
return this.failoverRouter.$get<IEsploraApi.Block>('/block/' + hash);
}
$getRawBlock(hash: string): Promise<Buffer> {
return this.$queryWrapper<any>(config.ESPLORA.REST_API_URL + '/block/' + hash + "/raw", 'arraybuffer')
return this.failoverRouter.$get<any>('/block/' + hash + '/raw', 'arraybuffer')
.then((response) => { return Buffer.from(response.data); });
}
$getAddress(address: string): Promise<IEsploraApi.Address> {
throw new Error('Method getAddress not implemented.');
return this.failoverRouter.$get<IEsploraApi.Address>('/address/' + address);
}
$getAddressTransactions(address: string, txId?: string): Promise<IEsploraApi.Transaction[]> {
throw new Error('Method getAddressTransactions not implemented.');
}
$getScriptHash(scripthash: string): Promise<IEsploraApi.ScriptHash> {
throw new Error('Method getScriptHash not implemented.');
}
$getScriptHashTransactions(scripthash: string, txId?: string): Promise<IEsploraApi.Transaction[]> {
throw new Error('Method getScriptHashTransactions not implemented.');
}
$getAddressPrefix(prefix: string): string[] {
throw new Error('Method not implemented.');
}
@ -118,21 +409,64 @@ class ElectrsApi implements AbstractBitcoinApi {
throw new Error('Method not implemented.');
}
$testMempoolAccept(rawTransactions: string[], maxfeerate?: number): Promise<TestMempoolAcceptResult[]> {
throw new Error('Method not implemented.');
}
$submitPackage(rawTransactions: string[]): Promise<SubmitPackageResult> {
throw new Error('Method not implemented.');
}
$getOutspend(txId: string, vout: number): Promise<IEsploraApi.Outspend> {
return this.$queryWrapper<IEsploraApi.Outspend>(config.ESPLORA.REST_API_URL + '/tx/' + txId + '/outspend/' + vout);
return this.failoverRouter.$get<IEsploraApi.Outspend>('/tx/' + txId + '/outspend/' + vout);
}
$getOutspends(txId: string): Promise<IEsploraApi.Outspend[]> {
return this.$queryWrapper<IEsploraApi.Outspend[]>(config.ESPLORA.REST_API_URL + '/tx/' + txId + '/outspends');
return this.failoverRouter.$get<IEsploraApi.Outspend[]>('/tx/' + txId + '/outspends');
}
async $getBatchedOutspends(txId: string[]): Promise<IEsploraApi.Outspend[][]> {
const outspends: IEsploraApi.Outspend[][] = [];
for (const tx of txId) {
const outspend = await this.$getOutspends(tx);
outspends.push(outspend);
async $getBatchedOutspends(txids: string[]): Promise<IEsploraApi.Outspend[][]> {
throw new Error('Method not implemented.');
}
async $getBatchedOutspendsInternal(txids: string[]): Promise<IEsploraApi.Outspend[][]> {
return this.failoverRouter.$post<IEsploraApi.Outspend[][]>('/internal/txs/outspends/by-txid', txids, 'json');
}
async $getOutSpendsByOutpoint(outpoints: { txid: string, vout: number }[]): Promise<IEsploraApi.Outspend[]> {
return this.failoverRouter.$post<IEsploraApi.Outspend[]>('/internal/txs/outspends/by-outpoint', outpoints.map(out => `${out.txid}:${out.vout}`), 'json');
}
async $getCoinbaseTx(blockhash: string): Promise<IEsploraApi.Transaction> {
const txid = await this.failoverRouter.$get<string>(`/block/${blockhash}/txid/0`);
return this.failoverRouter.$get<IEsploraApi.Transaction>('/tx/' + txid);
}
async $getAddressTransactionSummary(address: string): Promise<IEsploraApi.AddressTxSummary[]> {
return this.failoverRouter.$get<IEsploraApi.AddressTxSummary[]>('/address/' + address + '/txs/summary');
}
public startHealthChecks(): void {
this.failoverRouter.startHealthChecks();
}
public getHealthStatus(): HealthCheckHost[] {
if (config.MEMPOOL.OFFICIAL) {
return this.failoverRouter.sortHosts().map(host => ({
host: host.host,
active: host === this.failoverRouter.activeHost,
rtt: host.rtt,
latestHeight: host.latestHeight || 0,
socket: !!host.socket,
outOfSync: !!host.outOfSync,
unreachable: !!host.unreachable,
checked: !!host.checked,
lastChecked: host.lastChecked || 0,
hashes: host.hashes,
}));
} else {
return [];
}
return outspends;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -12,32 +12,68 @@ export interface OrphanedBlock {
height: number;
hash: string;
status: 'valid-fork' | 'valid-headers' | 'headers-only';
prevhash: string;
}
class ChainTips {
private chainTips: ChainTip[] = [];
private orphanedBlocks: OrphanedBlock[] = [];
private orphanedBlocks: { [hash: string]: OrphanedBlock } = {};
private blockCache: { [hash: string]: OrphanedBlock } = {};
private orphansByHeight: { [height: number]: OrphanedBlock[] } = {};
public async updateOrphanedBlocks(): Promise<void> {
try {
this.chainTips = await bitcoinClient.getChainTips();
this.orphanedBlocks = [];
const start = Date.now();
const breakAt = start + 10000;
let newOrphans = 0;
this.orphanedBlocks = {};
for (const chain of this.chainTips) {
if (chain.status === 'valid-fork' || chain.status === 'valid-headers') {
let block = await bitcoinClient.getBlock(chain.hash);
while (block && block.confirmations === -1) {
this.orphanedBlocks.push({
height: block.height,
hash: block.hash,
status: chain.status
});
block = await bitcoinClient.getBlock(block.previousblockhash);
const orphans: OrphanedBlock[] = [];
let hash = chain.hash;
do {
let orphan = this.blockCache[hash];
if (!orphan) {
const block = await bitcoinClient.getBlock(hash);
if (block && block.confirmations === -1) {
newOrphans++;
orphan = {
height: block.height,
hash: block.hash,
status: chain.status,
prevhash: block.previousblockhash,
};
this.blockCache[hash] = orphan;
}
}
if (orphan) {
orphans.push(orphan);
}
hash = orphan?.prevhash;
} while (hash && (Date.now() < breakAt));
for (const orphan of orphans) {
this.orphanedBlocks[orphan.hash] = orphan;
}
}
if (Date.now() >= breakAt) {
logger.debug(`Breaking orphaned blocks updater after 10s, will continue next block`);
break;
}
}
logger.debug(`Updated orphaned blocks cache. Found ${this.orphanedBlocks.length} orphaned blocks`);
this.orphansByHeight = {};
const allOrphans = Object.values(this.orphanedBlocks);
for (const orphan of allOrphans) {
if (!this.orphansByHeight[orphan.height]) {
this.orphansByHeight[orphan.height] = [];
}
this.orphansByHeight[orphan.height].push(orphan);
}
logger.debug(`Updated orphaned blocks cache. Fetched ${newOrphans} new orphaned blocks. Total ${allOrphans.length}`);
} catch (e) {
logger.err(`Cannot get fetch orphaned blocks. Reason: ${e instanceof Error ? e.message : e}`);
}
@ -48,13 +84,7 @@ class ChainTips {
return [];
}
const orphans: OrphanedBlock[] = [];
for (const block of this.orphanedBlocks) {
if (block.height === height) {
orphans.push(block);
}
}
return orphans;
return this.orphansByHeight[height] || [];
}
}

View File

@ -1,9 +1,29 @@
import * as bitcoinjs from 'bitcoinjs-lib';
import { Request } from 'express';
import { Ancestor, CpfpInfo, CpfpSummary, CpfpCluster, EffectiveFeeStats, MempoolBlockWithTransactions, TransactionExtended, MempoolTransactionExtended, TransactionStripped, WorkingEffectiveFeeStats } from '../mempool.interfaces';
import { EffectiveFeeStats, MempoolBlockWithTransactions, TransactionExtended, MempoolTransactionExtended, TransactionStripped, WorkingEffectiveFeeStats, TransactionClassified, TransactionFlags } from '../mempool.interfaces';
import config from '../config';
import { NodeSocket } from '../repositories/NodesSocketsRepository';
import { isIP } from 'net';
import transactionUtils from './transaction-utils';
import { isPoint } from '../utils/secp256k1';
import logger from '../logger';
import { getVarIntLength, opcodes, parseMultisigScript } from '../utils/bitcoin-script';
// Bitcoin Core default policy settings
const MAX_STANDARD_TX_WEIGHT = 400_000;
const MAX_BLOCK_SIGOPS_COST = 80_000;
const MAX_STANDARD_TX_SIGOPS_COST = (MAX_BLOCK_SIGOPS_COST / 5);
const MIN_STANDARD_TX_NONWITNESS_SIZE = 65;
const MAX_P2SH_SIGOPS = 15;
const MAX_STANDARD_P2WSH_STACK_ITEMS = 100;
const MAX_STANDARD_P2WSH_STACK_ITEM_SIZE = 80;
const MAX_STANDARD_TAPSCRIPT_STACK_ITEM_SIZE = 80;
const MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600;
const MAX_STANDARD_SCRIPTSIG_SIZE = 1650;
const DUST_RELAY_TX_FEE = 3;
const MAX_OP_RETURN_RELAY = 83;
const DEFAULT_PERMIT_BAREMULTISIG = true;
export class Common {
static nativeAssetId = config.MEMPOOL.NETWORK === 'liquidtestnet' ?
'144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49'
@ -59,10 +79,12 @@ export class Common {
return arr;
}
static findRbfTransactions(added: MempoolTransactionExtended[], deleted: MempoolTransactionExtended[]): { [txid: string]: MempoolTransactionExtended[] } {
const matches: { [txid: string]: MempoolTransactionExtended[] } = {};
added
.forEach((addedTx) => {
static findRbfTransactions(added: MempoolTransactionExtended[], deleted: MempoolTransactionExtended[], forceScalable = false): { [txid: string]: { replaced: MempoolTransactionExtended[], replacedBy: TransactionExtended }} {
const matches: { [txid: string]: { replaced: MempoolTransactionExtended[], replacedBy: TransactionExtended }} = {};
// For small N, a naive nested loop is extremely fast, but it doesn't scale
if (added.length < 1000 && deleted.length < 50 && !forceScalable) {
added.forEach((addedTx) => {
const foundMatches = deleted.filter((deletedTx) => {
// The new tx must, absolutely speaking, pay at least as much fee as the replaced tx.
return addedTx.fee > deletedTx.fee
@ -73,9 +95,40 @@ export class Common {
addedTx.vin.some((vin) => vin.txid === deletedVin.txid && vin.vout === deletedVin.vout));
});
if (foundMatches?.length) {
matches[addedTx.txid] = foundMatches;
matches[addedTx.txid] = { replaced: [...new Set(foundMatches)], replacedBy: addedTx };
}
});
} else {
// for large N, build a lookup table of prevouts we can check in ~constant time
const deletedSpendMap: { [txid: string]: { [vout: number]: MempoolTransactionExtended } } = {};
for (const tx of deleted) {
for (const vin of tx.vin) {
if (!deletedSpendMap[vin.txid]) {
deletedSpendMap[vin.txid] = {};
}
deletedSpendMap[vin.txid][vin.vout] = tx;
}
}
for (const addedTx of added) {
const foundMatches = new Set<MempoolTransactionExtended>();
for (const vin of addedTx.vin) {
const deletedTx = deletedSpendMap[vin.txid]?.[vin.vout];
if (deletedTx && deletedTx.txid !== addedTx.txid
// The new tx must, absolutely speaking, pay at least as much fee as the replaced tx.
&& addedTx.fee > deletedTx.fee
// The new transaction must pay more fee per kB than the replaced tx.
&& addedTx.adjustedFeePerVsize > deletedTx.adjustedFeePerVsize
) {
foundMatches.add(deletedTx);
}
if (foundMatches.size) {
matches[addedTx.txid] = { replaced: [...foundMatches], replacedBy: addedTx };
}
}
}
}
return matches;
}
@ -85,17 +138,17 @@ export class Common {
const replaced: Set<MempoolTransactionExtended> = new Set();
for (let i = 0; i < tx.vin.length; i++) {
const vin = tx.vin[i];
const match = spendMap.get(`${vin.txid}:${vin.vout}`);
const key = `${vin.txid}:${vin.vout}`;
const match = spendMap.get(key);
if (match && match.txid !== tx.txid) {
replaced.add(match);
// remove this tx from the spendMap
// prevents the same tx being replaced more than once
for (const replacedVin of match.vin) {
const key = `${replacedVin.txid}:${replacedVin.vout}`;
spendMap.delete(key);
const replacedKey = `${replacedVin.txid}:${replacedVin.vout}`;
spendMap.delete(replacedKey);
}
}
const key = `${vin.txid}:${vin.vout}`;
spendMap.delete(key);
}
if (replaced.size) {
@ -105,18 +158,498 @@ export class Common {
return matches;
}
static setSchnorrSighashFlags(flags: bigint, witness: string[]): bigint {
// no witness items
if (!witness?.length) {
return flags;
}
const hasAnnex = witness.length > 1 && witness[witness.length - 1].startsWith('50');
if (witness?.length === (hasAnnex ? 2 : 1)) {
// keypath spend, signature is the only witness item
if (witness[0].length === 130) {
flags |= this.setSighashFlags(flags, witness[0]);
} else {
flags |= TransactionFlags.sighash_default;
}
} else {
// scriptpath spend, all items except for the script, control block and annex could be signatures
for (let i = 0; i < witness.length - (hasAnnex ? 3 : 2); i++) {
// handle probable signatures
if (witness[i].length === 130) {
flags |= this.setSighashFlags(flags, witness[i]);
} else if (witness[i].length === 128) {
flags |= TransactionFlags.sighash_default;
}
}
}
return flags;
}
static isDERSig(w: string): boolean {
// heuristic to detect probable DER signatures
return (w.length >= 18
&& w.startsWith('30') // minimum DER signature length is 8 bytes + sighash flag (see https://mempool.space/testnet/tx/c6c232a36395fa338da458b86ff1327395a9afc28c5d2daa4273e410089fd433)
&& ['01', '02', '03', '81', '82', '83'].includes(w.slice(-2)) // signature must end with a valid sighash flag
&& (w.length === (2 * parseInt(w.slice(2, 4), 16)) + 6) // second byte encodes the combined length of the R and S components
);
}
/**
* Validates most standardness rules
*
* returns true early if any standardness rule is violated, otherwise false
* (except for non-mandatory-script-verify-flag and p2sh script evaluation rules which are *not* enforced)
*
* As standardness rules change, we'll need to apply the rules in force *at the time* to older blocks.
* For now, just pull out individual rules into versioned functions where necessary.
*/
static isNonStandard(tx: TransactionExtended, height?: number): boolean {
// version
if (this.isNonStandardVersion(tx, height)) {
return true;
}
// tx-size
if (tx.weight > MAX_STANDARD_TX_WEIGHT) {
return true;
}
// tx-size-small
if (this.getNonWitnessSize(tx) < MIN_STANDARD_TX_NONWITNESS_SIZE) {
return true;
}
// bad-txns-too-many-sigops
if (tx.sigops && tx.sigops > MAX_STANDARD_TX_SIGOPS_COST) {
return true;
}
// input validation
for (const vin of tx.vin) {
if (vin.is_coinbase) {
// standardness rules don't apply to coinbase transactions
return false;
}
// scriptsig-size
if ((vin.scriptsig.length / 2) > MAX_STANDARD_SCRIPTSIG_SIZE) {
return true;
}
// scriptsig-not-pushonly
if (vin.scriptsig_asm) {
for (const op of vin.scriptsig_asm.split(' ')) {
if (opcodes[op] && opcodes[op] > opcodes['OP_16']) {
return true;
}
}
}
// bad-txns-nonstandard-inputs
if (vin.prevout?.scriptpubkey_type === 'p2sh') {
// TODO: evaluate script (https://github.com/bitcoin/bitcoin/blob/1ac627c485a43e50a9a49baddce186ee3ad4daad/src/policy/policy.cpp#L177)
// countScriptSigops returns the witness-scaled sigops, so divide by 4 before comparison with MAX_P2SH_SIGOPS
const sigops = (transactionUtils.countScriptSigops(vin.inner_redeemscript_asm) / 4);
if (sigops > MAX_P2SH_SIGOPS) {
return true;
}
} else if (['unknown', 'provably_unspendable', 'empty'].includes(vin.prevout?.scriptpubkey_type || '')) {
return true;
} else if (this.isNonStandardAnchor(tx, height)) {
return true;
}
// TODO: bad-witness-nonstandard
}
// output validation
let opreturnCount = 0;
for (const vout of tx.vout) {
// scriptpubkey
if (['nonstandard', 'provably_unspendable', 'empty'].includes(vout.scriptpubkey_type)) {
// (non-standard output type)
return true;
} else if (vout.scriptpubkey_type === 'unknown') {
// undefined segwit version/length combinations are actually standard in outputs
// https://github.com/bitcoin/bitcoin/blob/2c79abc7ad4850e9e3ba32a04c530155cda7f980/src/script/interpreter.cpp#L1950-L1951
if (vout.scriptpubkey.startsWith('00') || !this.isWitnessProgram(vout.scriptpubkey)) {
return true;
}
} else if (vout.scriptpubkey_type === 'multisig') {
if (!DEFAULT_PERMIT_BAREMULTISIG) {
// bare-multisig
return true;
}
const mOfN = parseMultisigScript(vout.scriptpubkey_asm);
if (!mOfN || mOfN.n < 1 || mOfN.n > 3 || mOfN.m < 1 || mOfN.m > mOfN.n) {
// (non-standard bare multisig threshold)
return true;
}
} else if (vout.scriptpubkey_type === 'op_return') {
opreturnCount++;
if ((vout.scriptpubkey.length / 2) > MAX_OP_RETURN_RELAY) {
// over default datacarrier limit
return true;
}
}
// dust
// (we could probably hardcode this for the different output types...)
if (vout.scriptpubkey_type !== 'op_return') {
let dustSize = (vout.scriptpubkey.length / 2);
// add varint length overhead
dustSize += getVarIntLength(dustSize);
// add value size
dustSize += 8;
if (Common.isWitnessProgram(vout.scriptpubkey)) {
dustSize += 67;
} else {
dustSize += 148;
}
if (vout.value < (dustSize * DUST_RELAY_TX_FEE)) {
// under minimum output size
return true;
}
}
}
// multi-op-return
if (opreturnCount > 1) {
return true;
}
// TODO: non-mandatory-script-verify-flag
return false;
}
// A witness program is any valid scriptpubkey that consists of a 1-byte push opcode
// followed by a data push between 2 and 40 bytes.
// https://github.com/bitcoin/bitcoin/blob/2c79abc7ad4850e9e3ba32a04c530155cda7f980/src/script/script.cpp#L224-L240
static isWitnessProgram(scriptpubkey: string): false | { version: number, program: string } {
if (scriptpubkey.length < 8 || scriptpubkey.length > 84) {
return false;
}
const version = parseInt(scriptpubkey.slice(0,2), 16);
if (version !== 0 && version < 0x51 || version > 0x60) {
return false;
}
const push = parseInt(scriptpubkey.slice(2,4), 16);
if (push + 2 === (scriptpubkey.length / 2)) {
return {
version: version ? version - 0x50 : 0,
program: scriptpubkey.slice(4),
};
}
return false;
}
// Individual versioned standardness rules
static V3_STANDARDNESS_ACTIVATION_HEIGHT = {
'testnet4': 42_000,
'testnet': 2_900_000,
'signet': 211_000,
'': 863_500,
};
static isNonStandardVersion(tx: TransactionExtended, height?: number): boolean {
let TX_MAX_STANDARD_VERSION = 3;
if (
height != null
&& this.V3_STANDARDNESS_ACTIVATION_HEIGHT[config.MEMPOOL.NETWORK]
&& height <= this.V3_STANDARDNESS_ACTIVATION_HEIGHT[config.MEMPOOL.NETWORK]
) {
// V3 transactions were non-standard to spend before v28.x (scheduled for 2024/09/30 https://github.com/bitcoin/bitcoin/issues/29891)
TX_MAX_STANDARD_VERSION = 2;
}
if (tx.version > TX_MAX_STANDARD_VERSION) {
return true;
}
return false;
}
static ANCHOR_STANDARDNESS_ACTIVATION_HEIGHT = {
'testnet4': 42_000,
'testnet': 2_900_000,
'signet': 211_000,
'': 863_500,
};
static isNonStandardAnchor(tx: TransactionExtended, height?: number): boolean {
if (
height != null
&& this.ANCHOR_STANDARDNESS_ACTIVATION_HEIGHT[config.MEMPOOL.NETWORK]
&& height <= this.ANCHOR_STANDARDNESS_ACTIVATION_HEIGHT[config.MEMPOOL.NETWORK]
) {
// anchor outputs were non-standard to spend before v28.x (scheduled for 2024/09/30 https://github.com/bitcoin/bitcoin/issues/29891)
return true;
}
return false;
}
static getNonWitnessSize(tx: TransactionExtended): number {
let weight = tx.weight;
let hasWitness = false;
for (const vin of tx.vin) {
if (vin.witness?.length) {
hasWitness = true;
// witness count
weight -= getVarIntLength(vin.witness.length);
for (const witness of vin.witness) {
// witness item size + content
weight -= getVarIntLength(witness.length / 2) + (witness.length / 2);
}
}
}
if (hasWitness) {
// marker & segwit flag
weight -= 2;
}
return Math.ceil(weight / 4);
}
static setSegwitSighashFlags(flags: bigint, witness: string[]): bigint {
for (const w of witness) {
if (this.isDERSig(w)) {
flags |= this.setSighashFlags(flags, w);
}
}
return flags;
}
static setLegacySighashFlags(flags: bigint, scriptsig_asm: string): bigint {
for (const item of scriptsig_asm.split(' ')) {
// skip op_codes
if (item.startsWith('OP_')) {
continue;
}
// check pushed data
if (this.isDERSig(item)) {
flags |= this.setSighashFlags(flags, item);
}
}
return flags;
}
static setSighashFlags(flags: bigint, signature: string): bigint {
switch(signature.slice(-2)) {
case '01': return flags | TransactionFlags.sighash_all;
case '02': return flags | TransactionFlags.sighash_none;
case '03': return flags | TransactionFlags.sighash_single;
case '81': return flags | TransactionFlags.sighash_all | TransactionFlags.sighash_acp;
case '82': return flags | TransactionFlags.sighash_none | TransactionFlags.sighash_acp;
case '83': return flags | TransactionFlags.sighash_single | TransactionFlags.sighash_acp;
default: return flags | TransactionFlags.sighash_default; // taproot only
}
}
static isBurnKey(pubkey: string): boolean {
return [
'022222222222222222222222222222222222222222222222222222222222222222',
'033333333333333333333333333333333333333333333333333333333333333333',
'020202020202020202020202020202020202020202020202020202020202020202',
'030303030303030303030303030303030303030303030303030303030303030303',
].includes(pubkey);
}
static isInscription(vin, flags): bigint {
// in taproot, if the last witness item begins with 0x50, it's an annex
const hasAnnex = vin.witness?.[vin.witness.length - 1].startsWith('50');
// script spends have more than one witness item, not counting the annex (if present)
if (vin.witness.length > (hasAnnex ? 2 : 1)) {
// the script itself is the second-to-last witness item, not counting the annex
const asm = vin.inner_witnessscript_asm || transactionUtils.convertScriptSigAsm(vin.witness[vin.witness.length - (hasAnnex ? 3 : 2)]);
// inscriptions smuggle data within an 'OP_0 OP_IF ... OP_ENDIF' envelope
if (asm?.includes('OP_0 OP_IF')) {
flags |= TransactionFlags.inscription;
}
}
return flags;
}
static getTransactionFlags(tx: TransactionExtended, height?: number): number {
let flags = tx.flags ? BigInt(tx.flags) : 0n;
// Update variable flags (CPFP, RBF)
flags &= ~TransactionFlags.cpfp_child;
if (tx.ancestors?.length) {
flags |= TransactionFlags.cpfp_child;
}
flags &= ~TransactionFlags.cpfp_parent;
if (tx.descendants?.length) {
flags |= TransactionFlags.cpfp_parent;
}
flags &= ~TransactionFlags.replacement;
if (tx.replacement) {
flags |= TransactionFlags.replacement;
}
// Already processed static flags, no need to do it again
if (tx.flags) {
return Number(flags);
}
// Process static flags
if (tx.version === 1) {
flags |= TransactionFlags.v1;
} else if (tx.version === 2) {
flags |= TransactionFlags.v2;
} else if (tx.version === 3) {
flags |= TransactionFlags.v3;
}
const reusedInputAddresses: { [address: string ]: number } = {};
const reusedOutputAddresses: { [address: string ]: number } = {};
const inValues = {};
const outValues = {};
let rbf = false;
for (const vin of tx.vin) {
if (vin.sequence < 0xfffffffe) {
rbf = true;
}
if (vin.prevout?.scriptpubkey_type) {
switch (vin.prevout?.scriptpubkey_type) {
case 'p2pk': flags |= TransactionFlags.p2pk; break;
case 'multisig': flags |= TransactionFlags.p2ms; break;
case 'p2pkh': flags |= TransactionFlags.p2pkh; break;
case 'p2sh': flags |= TransactionFlags.p2sh; break;
case 'v0_p2wpkh': flags |= TransactionFlags.p2wpkh; break;
case 'v0_p2wsh': flags |= TransactionFlags.p2wsh; break;
case 'v1_p2tr': {
flags |= TransactionFlags.p2tr;
if (vin.witness?.length) {
flags = Common.isInscription(vin, flags);
}
} break;
}
} else {
// no prevouts, optimistically check witness-bearing inputs
if (vin.witness?.length >= 2) {
try {
flags = Common.isInscription(vin, flags);
} catch {
// witness script parsing will fail if this isn't really a taproot output
}
}
}
// sighash flags
if (vin.prevout?.scriptpubkey_type === 'v1_p2tr') {
flags |= this.setSchnorrSighashFlags(flags, vin.witness);
} else if (vin.witness) {
flags |= this.setSegwitSighashFlags(flags, vin.witness);
} else if (vin.scriptsig?.length) {
flags |= this.setLegacySighashFlags(flags, vin.scriptsig_asm || transactionUtils.convertScriptSigAsm(vin.scriptsig));
}
if (vin.prevout?.scriptpubkey_address) {
reusedInputAddresses[vin.prevout?.scriptpubkey_address] = (reusedInputAddresses[vin.prevout?.scriptpubkey_address] || 0) + 1;
}
inValues[vin.prevout?.value || Math.random()] = (inValues[vin.prevout?.value || Math.random()] || 0) + 1;
}
if (rbf) {
flags |= TransactionFlags.rbf;
} else {
flags |= TransactionFlags.no_rbf;
}
let hasFakePubkey = false;
let P2WSHCount = 0;
let olgaSize = 0;
for (const vout of tx.vout) {
switch (vout.scriptpubkey_type) {
case 'p2pk': {
flags |= TransactionFlags.p2pk;
// detect fake pubkey (i.e. not a valid DER point on the secp256k1 curve)
hasFakePubkey = hasFakePubkey || !isPoint(vout.scriptpubkey?.slice(2, -2));
} break;
case 'multisig': {
flags |= TransactionFlags.p2ms;
// detect fake pubkeys (i.e. not valid DER points on the secp256k1 curve)
const asm = vout.scriptpubkey_asm || transactionUtils.convertScriptSigAsm(vout.scriptpubkey);
for (const key of (asm?.split(' ') || [])) {
if (!hasFakePubkey && !key.startsWith('OP_')) {
hasFakePubkey = hasFakePubkey || this.isBurnKey(key) || !isPoint(key);
}
}
} break;
case 'p2pkh': flags |= TransactionFlags.p2pkh; break;
case 'p2sh': flags |= TransactionFlags.p2sh; break;
case 'v0_p2wpkh': flags |= TransactionFlags.p2wpkh; break;
case 'v0_p2wsh': flags |= TransactionFlags.p2wsh; break;
case 'v1_p2tr': flags |= TransactionFlags.p2tr; break;
case 'op_return': flags |= TransactionFlags.op_return; break;
}
if (vout.scriptpubkey_address) {
reusedOutputAddresses[vout.scriptpubkey_address] = (reusedOutputAddresses[vout.scriptpubkey_address] || 0) + 1;
}
if (vout.scriptpubkey_type === 'v0_p2wsh') {
if (!P2WSHCount) {
olgaSize = parseInt(vout.scriptpubkey.slice(4, 8), 16);
}
P2WSHCount++;
if (P2WSHCount === Math.ceil((olgaSize + 2) / 32)) {
const nullBytes = (P2WSHCount * 32) - olgaSize - 2;
if (vout.scriptpubkey.endsWith(''.padEnd(nullBytes * 2, '0'))) {
flags |= TransactionFlags.fake_scripthash;
}
}
} else {
P2WSHCount = 0;
}
outValues[vout.value || Math.random()] = (outValues[vout.value || Math.random()] || 0) + 1;
}
if (hasFakePubkey) {
flags |= TransactionFlags.fake_pubkey;
}
// fast but bad heuristic to detect possible coinjoins
// (at least 5 inputs and 5 outputs, less than half of which are unique amounts, with no address reuse)
const addressReuse = Object.keys(reusedOutputAddresses).reduce((acc, key) => Math.max(acc, (reusedInputAddresses[key] || 0) + (reusedOutputAddresses[key] || 0)), 0) > 1;
if (!addressReuse && tx.vin.length >= 5 && tx.vout.length >= 5 && (Object.keys(inValues).length + Object.keys(outValues).length) <= (tx.vin.length + tx.vout.length) / 2 ) {
flags |= TransactionFlags.coinjoin;
}
// more than 5:1 input:output ratio
if (tx.vin.length / tx.vout.length >= 5) {
flags |= TransactionFlags.consolidation;
}
// less than 1:5 input:output ratio
if (tx.vin.length / tx.vout.length <= 0.2) {
flags |= TransactionFlags.batch_payout;
}
if (this.isNonStandard(tx, height)) {
flags |= TransactionFlags.nonstandard;
}
return Number(flags);
}
static classifyTransaction(tx: TransactionExtended, height?: number): TransactionClassified {
let flags = 0;
try {
flags = Common.getTransactionFlags(tx, height);
} catch (e) {
logger.warn('Failed to add classification flags to transaction: ' + (e instanceof Error ? e.message : e));
}
tx.flags = flags;
return {
...Common.stripTransaction(tx),
flags,
};
}
static classifyTransactions(txs: TransactionExtended[], height?: number): TransactionClassified[] {
return txs.map(tx => Common.classifyTransaction(tx, height));
}
static stripTransaction(tx: TransactionExtended): TransactionStripped {
return {
txid: tx.txid,
fee: tx.fee,
fee: tx.fee || 0,
vsize: tx.weight / 4,
value: tx.vout.reduce((acc, vout) => acc + (vout.value ? vout.value : 0), 0),
acc: tx.acceleration || undefined,
rate: tx.effectiveFeePerVsize,
time: tx.firstSeen || undefined,
};
}
static stripTransactions(txs: TransactionExtended[]): TransactionStripped[] {
return txs.map(this.stripTransaction);
return txs.map(Common.stripTransaction);
}
static sleep$(ms: number): Promise<void> {
@ -134,69 +667,6 @@ export class Common {
}
}
static setRelativesAndGetCpfpInfo(tx: MempoolTransactionExtended, memPool: { [txid: string]: MempoolTransactionExtended }): CpfpInfo {
const parents = this.findAllParents(tx, memPool);
const lowerFeeParents = parents.filter((parent) => parent.adjustedFeePerVsize < tx.effectiveFeePerVsize);
let totalWeight = (tx.adjustedVsize * 4) + lowerFeeParents.reduce((prev, val) => prev + (val.adjustedVsize * 4), 0);
let totalFees = tx.fee + lowerFeeParents.reduce((prev, val) => prev + val.fee, 0);
tx.ancestors = parents
.map((t) => {
return {
txid: t.txid,
weight: (t.adjustedVsize * 4),
fee: t.fee,
};
});
// Add high (high fee) decendant weight and fees
if (tx.bestDescendant) {
totalWeight += tx.bestDescendant.weight;
totalFees += tx.bestDescendant.fee;
}
tx.effectiveFeePerVsize = Math.max(0, totalFees / (totalWeight / 4));
tx.cpfpChecked = true;
return {
ancestors: tx.ancestors,
bestDescendant: tx.bestDescendant || null,
};
}
private static findAllParents(tx: MempoolTransactionExtended, memPool: { [txid: string]: MempoolTransactionExtended }): MempoolTransactionExtended[] {
let parents: MempoolTransactionExtended[] = [];
tx.vin.forEach((parent) => {
if (parents.find((p) => p.txid === parent.txid)) {
return;
}
const parentTx = memPool[parent.txid];
if (parentTx) {
if (tx.bestDescendant && tx.bestDescendant.fee / (tx.bestDescendant.weight / 4) > parentTx.adjustedFeePerVsize) {
if (parentTx.bestDescendant && parentTx.bestDescendant.fee < tx.fee + tx.bestDescendant.fee) {
parentTx.bestDescendant = {
weight: (tx.adjustedVsize * 4) + tx.bestDescendant.weight,
fee: tx.fee + tx.bestDescendant.fee,
txid: tx.txid,
};
}
} else if (tx.adjustedFeePerVsize > parentTx.adjustedFeePerVsize) {
parentTx.bestDescendant = {
weight: (tx.adjustedVsize * 4),
fee: tx.fee,
txid: tx.txid
};
}
parents.push(parentTx);
parents = parents.concat(this.findAllParents(parentTx, memPool));
}
});
return parents;
}
// calculates the ratio of matched transactions to projected transactions by weight
static getSimilarity(projectedBlock: MempoolBlockWithTransactions, transactions: TransactionExtended[]): number {
let matchedWeight = 0;
@ -252,6 +722,13 @@ export class Common {
);
}
static gogglesIndexingEnabled(): boolean {
return (
Common.blocksSummariesIndexingEnabled() &&
config.MEMPOOL.GOGGLES_INDEXING === true
);
}
static cpfpIndexingEnabled(): boolean {
return (
Common.indexingEnabled() &&
@ -379,97 +856,17 @@ export class Common {
}
}
static calculateCpfp(height: number, transactions: TransactionExtended[]): CpfpSummary {
const clusters: CpfpCluster[] = []; // list of all cpfp clusters in this block
const clusterMap: { [txid: string]: CpfpCluster } = {}; // map transactions to their cpfp cluster
let clusterTxs: TransactionExtended[] = []; // working list of elements of the current cluster
let ancestors: { [txid: string]: boolean } = {}; // working set of ancestors of the current cluster root
const txMap = {};
// initialize the txMap
for (const tx of transactions) {
txMap[tx.txid] = tx;
}
// reverse pass to identify CPFP clusters
for (let i = transactions.length - 1; i >= 0; i--) {
const tx = transactions[i];
if (!ancestors[tx.txid]) {
let totalFee = 0;
let totalVSize = 0;
clusterTxs.forEach(tx => {
totalFee += tx?.fee || 0;
totalVSize += (tx.weight / 4);
});
const effectiveFeePerVsize = totalFee / totalVSize;
let cluster: CpfpCluster;
if (clusterTxs.length > 1) {
cluster = {
root: clusterTxs[0].txid,
height,
txs: clusterTxs.map(tx => { return { txid: tx.txid, weight: tx.weight, fee: tx.fee || 0 }; }),
effectiveFeePerVsize,
};
clusters.push(cluster);
}
clusterTxs.forEach(tx => {
txMap[tx.txid].effectiveFeePerVsize = effectiveFeePerVsize;
if (cluster) {
clusterMap[tx.txid] = cluster;
}
});
// reset working vars
clusterTxs = [];
ancestors = {};
}
clusterTxs.push(tx);
tx.vin.forEach(vin => {
ancestors[vin.txid] = true;
});
}
// forward pass to enforce ancestor rate caps
for (const tx of transactions) {
let minAncestorRate = tx.effectiveFeePerVsize;
for (const vin of tx.vin) {
if (txMap[vin.txid]?.effectiveFeePerVsize) {
minAncestorRate = Math.min(minAncestorRate, txMap[vin.txid].effectiveFeePerVsize);
}
}
// check rounded values to skip cases with almost identical fees
const roundedMinAncestorRate = Math.ceil(minAncestorRate);
const roundedEffectiveFeeRate = Math.floor(tx.effectiveFeePerVsize);
if (roundedMinAncestorRate < roundedEffectiveFeeRate) {
tx.effectiveFeePerVsize = minAncestorRate;
if (!clusterMap[tx.txid]) {
// add a single-tx cluster to record the dependent rate
const cluster = {
root: tx.txid,
height,
txs: [{ txid: tx.txid, weight: tx.weight, fee: tx.fee || 0 }],
effectiveFeePerVsize: minAncestorRate,
};
clusterMap[tx.txid] = cluster;
clusters.push(cluster);
} else {
// update the existing cluster with the dependent rate
clusterMap[tx.txid].effectiveFeePerVsize = minAncestorRate;
}
}
}
return {
transactions,
clusters,
};
}
static calcEffectiveFeeStatistics(transactions: { weight: number, fee: number, effectiveFeePerVsize?: number, txid: string }[]): EffectiveFeeStats {
static calcEffectiveFeeStatistics(transactions: { weight: number, fee: number, effectiveFeePerVsize?: number, txid: string, acceleration?: boolean }[]): EffectiveFeeStats {
const sortedTxs = transactions.map(tx => { return { txid: tx.txid, weight: tx.weight, rate: tx.effectiveFeePerVsize || ((tx.fee || 0) / (tx.weight / 4)) }; }).sort((a, b) => a.rate - b.rate);
let weightCount = 0;
let medianFee = 0;
let medianWeight = 0;
// calculate the "medianFee" as the average fee rate of the middle 10000 weight units of transactions
const leftBound = 1995000;
const rightBound = 2005000;
// calculate the "medianFee" as the average fee rate of the middle 0.25% weight units of transactions
const halfWidth = config.MEMPOOL.BLOCK_WEIGHT_UNITS / 800;
const leftBound = Math.floor((config.MEMPOOL.BLOCK_WEIGHT_UNITS / 2) - halfWidth);
const rightBound = Math.ceil((config.MEMPOOL.BLOCK_WEIGHT_UNITS / 2) + halfWidth);
for (let i = 0; i < sortedTxs.length && weightCount < rightBound; i++) {
const left = weightCount;
const right = weightCount + sortedTxs[i].weight;
@ -536,6 +933,33 @@ export class Common {
return this.validateTransactionHex(matches[1].toLowerCase());
}
static getTransactionsFromRequest(req: Request, limit: number = 25): string[] {
if (!Array.isArray(req.body) || req.body.some(hex => typeof hex !== 'string')) {
throw Object.assign(new Error('Invalid request body (should be an array of hexadecimal strings)'), { code: -1 });
}
if (limit && req.body.length > limit) {
throw Object.assign(new Error('Exceeded maximum of 25 transactions'), { code: -1 });
}
const txs = req.body;
return txs.map(rawTx => {
// Support both upper and lower case hex
// Support both txHash= Form and direct API POST
const reg = /^((?:[a-fA-F0-9]{2})+)$/;
const matches = reg.exec(rawTx);
if (!matches || !matches[1]) {
throw Object.assign(new Error('Invalid hex string'), { code: -2 });
}
// Guaranteed to be a hex string of multiple of 2
// Guaranteed to be lower case
// Guaranteed to pass validation (see function below)
return this.validateTransactionHex(matches[1].toLowerCase());
});
}
private static validateTransactionHex(txhex: string): string {
// Do not mutate txhex

272
backend/src/api/cpfp.ts Normal file
View File

@ -0,0 +1,272 @@
import { Ancestor, CpfpCluster, CpfpInfo, CpfpSummary, MempoolTransactionExtended, TransactionExtended } from '../mempool.interfaces';
import { GraphTx, convertToGraphTx, expandRelativesGraph, initializeRelatives, makeBlockTemplate, mempoolComparator, removeAncestors, setAncestorScores } from './mini-miner';
import memPool from './mempool';
import { Acceleration } from './acceleration/acceleration';
const CPFP_UPDATE_INTERVAL = 60_000; // update CPFP info at most once per 60s per transaction
const MAX_CLUSTER_ITERATIONS = 100;
export function calculateFastBlockCpfp(height: number, transactions: MempoolTransactionExtended[], saveRelatives: boolean = false): CpfpSummary {
const clusters: CpfpCluster[] = []; // list of all cpfp clusters in this block
const clusterMap: { [txid: string]: CpfpCluster } = {}; // map transactions to their cpfp cluster
let clusterTxs: TransactionExtended[] = []; // working list of elements of the current cluster
let ancestors: { [txid: string]: boolean } = {}; // working set of ancestors of the current cluster root
const txMap: { [txid: string]: TransactionExtended } = {};
// initialize the txMap
for (const tx of transactions) {
txMap[tx.txid] = tx;
}
// reverse pass to identify CPFP clusters
for (let i = transactions.length - 1; i >= 0; i--) {
const tx = transactions[i];
if (!ancestors[tx.txid]) {
let totalFee = 0;
let totalVSize = 0;
clusterTxs.forEach(tx => {
totalFee += tx?.fee || 0;
totalVSize += (tx.weight / 4);
});
const effectiveFeePerVsize = totalFee / totalVSize;
let cluster: CpfpCluster;
if (clusterTxs.length > 1) {
cluster = {
root: clusterTxs[0].txid,
height,
txs: clusterTxs.map(tx => { return { txid: tx.txid, weight: tx.weight, fee: tx.fee || 0 }; }),
effectiveFeePerVsize,
};
clusters.push(cluster);
}
clusterTxs.forEach(tx => {
txMap[tx.txid].effectiveFeePerVsize = effectiveFeePerVsize;
if (cluster) {
clusterMap[tx.txid] = cluster;
}
});
// reset working vars
clusterTxs = [];
ancestors = {};
}
clusterTxs.push(tx);
tx.vin.forEach(vin => {
ancestors[vin.txid] = true;
});
}
// forward pass to enforce ancestor rate caps
for (const tx of transactions) {
let minAncestorRate = tx.effectiveFeePerVsize;
for (const vin of tx.vin) {
if (txMap[vin.txid]?.effectiveFeePerVsize) {
minAncestorRate = Math.min(minAncestorRate, txMap[vin.txid].effectiveFeePerVsize);
}
}
// check rounded values to skip cases with almost identical fees
const roundedMinAncestorRate = Math.ceil(minAncestorRate);
const roundedEffectiveFeeRate = Math.floor(tx.effectiveFeePerVsize);
if (roundedMinAncestorRate < roundedEffectiveFeeRate) {
tx.effectiveFeePerVsize = minAncestorRate;
if (!clusterMap[tx.txid]) {
// add a single-tx cluster to record the dependent rate
const cluster = {
root: tx.txid,
height,
txs: [{ txid: tx.txid, weight: tx.weight, fee: tx.fee || 0 }],
effectiveFeePerVsize: minAncestorRate,
};
clusterMap[tx.txid] = cluster;
clusters.push(cluster);
} else {
// update the existing cluster with the dependent rate
clusterMap[tx.txid].effectiveFeePerVsize = minAncestorRate;
}
}
}
if (saveRelatives) {
for (const cluster of clusters) {
cluster.txs.forEach((member, index) => {
txMap[member.txid].descendants = cluster.txs.slice(0, index).reverse();
txMap[member.txid].ancestors = cluster.txs.slice(index + 1).reverse();
txMap[member.txid].effectiveFeePerVsize = cluster.effectiveFeePerVsize;
});
}
}
return {
transactions,
clusters,
version: 1,
};
}
export function calculateGoodBlockCpfp(height: number, transactions: MempoolTransactionExtended[], accelerations: Acceleration[]): CpfpSummary {
const txMap: { [txid: string]: MempoolTransactionExtended } = {};
for (const tx of transactions) {
txMap[tx.txid] = tx;
}
const template = makeBlockTemplate(transactions, accelerations, 1, Infinity, Infinity);
const clusters = new Map<string, string[]>();
for (const tx of template) {
const cluster = tx.cluster || [];
const root = cluster.length ? cluster[cluster.length - 1] : null;
if (cluster.length > 1 && root && !clusters.has(root)) {
clusters.set(root, cluster);
}
txMap[tx.txid].effectiveFeePerVsize = tx.effectiveFeePerVsize;
}
const clusterArray: CpfpCluster[] = [];
for (const cluster of clusters.values()) {
for (const txid of cluster) {
const mempoolTx = txMap[txid];
if (mempoolTx) {
const ancestors: Ancestor[] = [];
const descendants: Ancestor[] = [];
let matched = false;
cluster.forEach(relativeTxid => {
if (relativeTxid === txid) {
matched = true;
} else {
const relative = {
txid: relativeTxid,
fee: txMap[relativeTxid].fee,
weight: (txMap[relativeTxid].adjustedVsize * 4) || txMap[relativeTxid].weight,
};
if (matched) {
descendants.push(relative);
} else {
ancestors.push(relative);
}
}
});
if (mempoolTx.ancestors?.length !== ancestors.length || mempoolTx.descendants?.length !== descendants.length) {
mempoolTx.cpfpDirty = true;
}
Object.assign(mempoolTx, { ancestors, descendants, bestDescendant: null, cpfpChecked: true });
}
}
const root = cluster[cluster.length - 1];
clusterArray.push({
root: root,
height,
txs: cluster.reverse().map(txid => ({
txid,
fee: txMap[txid].fee,
weight: (txMap[txid].adjustedVsize * 4) || txMap[txid].weight,
})),
effectiveFeePerVsize: txMap[root].effectiveFeePerVsize,
});
}
return {
transactions: transactions.map(tx => txMap[tx.txid]),
clusters: clusterArray,
version: 2,
};
}
/**
* Takes a mempool transaction and a copy of the current mempool, and calculates the CPFP data for
* that transaction (and all others in the same cluster)
*/
export function calculateMempoolTxCpfp(tx: MempoolTransactionExtended, mempool: { [txid: string]: MempoolTransactionExtended }): CpfpInfo {
if (tx.cpfpUpdated && Date.now() < (tx.cpfpUpdated + CPFP_UPDATE_INTERVAL)) {
tx.cpfpDirty = false;
return {
ancestors: tx.ancestors || [],
bestDescendant: tx.bestDescendant || null,
descendants: tx.descendants || [],
effectiveFeePerVsize: tx.effectiveFeePerVsize || tx.adjustedFeePerVsize || tx.feePerVsize,
sigops: tx.sigops,
fee: tx.fee,
adjustedVsize: tx.adjustedVsize,
acceleration: tx.acceleration
};
}
const ancestorMap = new Map<string, GraphTx>();
const graphTx = convertToGraphTx(tx, memPool.getSpendMap());
ancestorMap.set(tx.txid, graphTx);
const allRelatives = expandRelativesGraph(mempool, ancestorMap, memPool.getSpendMap());
const relativesMap = initializeRelatives(allRelatives);
const cluster = calculateCpfpCluster(tx.txid, relativesMap);
let totalVsize = 0;
let totalFee = 0;
for (const tx of cluster.values()) {
totalVsize += tx.vsize;
totalFee += tx.fees.base;
}
const effectiveFeePerVsize = totalFee / totalVsize;
for (const tx of cluster.values()) {
mempool[tx.txid].effectiveFeePerVsize = effectiveFeePerVsize;
mempool[tx.txid].ancestors = Array.from(tx.ancestors.values()).map(tx => ({ txid: tx.txid, weight: tx.weight, fee: tx.fees.base }));
mempool[tx.txid].descendants = Array.from(cluster.values()).filter(entry => entry.txid !== tx.txid && !tx.ancestors.has(entry.txid)).map(tx => ({ txid: tx.txid, weight: tx.weight, fee: tx.fees.base }));
mempool[tx.txid].bestDescendant = null;
mempool[tx.txid].cpfpChecked = true;
mempool[tx.txid].cpfpDirty = true;
mempool[tx.txid].cpfpUpdated = Date.now();
}
tx = mempool[tx.txid];
return {
ancestors: tx.ancestors || [],
bestDescendant: tx.bestDescendant || null,
descendants: tx.descendants || [],
effectiveFeePerVsize: tx.effectiveFeePerVsize || tx.adjustedFeePerVsize || tx.feePerVsize,
sigops: tx.sigops,
fee: tx.fee,
adjustedVsize: tx.adjustedVsize,
acceleration: tx.acceleration
};
}
/**
* Given a root transaction and a list of in-mempool ancestors,
* Calculate the CPFP cluster
*
* @param tx
* @param ancestors
*/
function calculateCpfpCluster(txid: string, graph: Map<string, GraphTx>): Map<string, GraphTx> {
const tx = graph.get(txid);
if (!tx) {
return new Map<string, GraphTx>([]);
}
// Initialize individual & ancestor fee rates
graph.forEach(entry => setAncestorScores(entry));
// Sort by descending ancestor score
let sortedRelatives = Array.from(graph.values()).sort(mempoolComparator);
// Iterate until we reach a cluster that includes our target tx
let maxIterations = MAX_CLUSTER_ITERATIONS;
let best = sortedRelatives.shift();
let bestCluster = new Map<string, GraphTx>(best?.ancestors?.entries() || []);
while (sortedRelatives.length && best && (best.txid !== tx.txid && !best.ancestors.has(tx.txid)) && maxIterations > 0) {
maxIterations--;
if ((best && best.txid === tx.txid) || (bestCluster && bestCluster.has(tx.txid))) {
break;
} else {
// Remove this cluster (it doesn't include our target tx)
// and update scores, ancestor totals and dependencies for the survivors
removeAncestors(bestCluster, graph);
// re-sort
sortedRelatives = Array.from(graph.values()).sort(mempoolComparator);
// Grab the next highest scoring entry
best = sortedRelatives.shift();
if (best) {
bestCluster = new Map<string, GraphTx>(best?.ancestors?.entries() || []);
bestCluster.set(best?.txid, best);
}
}
}
bestCluster.set(tx.txid, tx);
return bestCluster;
}

View File

@ -7,7 +7,7 @@ import cpfpRepository from '../repositories/CpfpRepository';
import { RowDataPacket } from 'mysql2';
class DatabaseMigration {
private static currentVersion = 64;
private static currentVersion = 95;
private queryTimeout = 3600_000;
private statisticsAddedIndexed = false;
private uniqueLogs: string[] = [];
@ -548,6 +548,588 @@ class DatabaseMigration {
await this.$executeQuery('ALTER TABLE `nodes` ADD features text NULL');
await this.updateToSchemaVersion(64);
}
if (databaseSchemaVersion < 65 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD accelerated_txs JSON DEFAULT "[]"');
await this.updateToSchemaVersion(65);
}
if (databaseSchemaVersion < 66) {
await this.$executeQuery('ALTER TABLE `statistics` ADD min_fee FLOAT UNSIGNED DEFAULT NULL');
await this.updateToSchemaVersion(66);
}
if (databaseSchemaVersion < 67 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `blocks_summaries` ADD version INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `blocks_summaries` ADD INDEX `version` (`version`)');
await this.$executeQuery('ALTER TABLE `blocks_templates` ADD version INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `blocks_templates` ADD INDEX `version` (`version`)');
await this.updateToSchemaVersion(67);
}
if (databaseSchemaVersion < 68 && config.MEMPOOL.NETWORK === "liquid") {
await this.$executeQuery('TRUNCATE TABLE elements_pegs');
await this.$executeQuery('ALTER TABLE elements_pegs ADD PRIMARY KEY (txid, txindex);');
await this.$executeQuery(`UPDATE state SET number = 0 WHERE name = 'last_elements_block';`);
// Create the federation_addresses table and add the two Liquid Federation change addresses in
await this.$executeQuery(this.getCreateFederationAddressesTableQuery(), await this.$checkIfTableExists('federation_addresses'));
await this.$executeQuery(`INSERT INTO federation_addresses (bitcoinaddress) VALUES ('bc1qxvay4an52gcghxq5lavact7r6qe9l4laedsazz8fj2ee2cy47tlqff4aj4')`); // Federation change address
await this.$executeQuery(`INSERT INTO federation_addresses (bitcoinaddress) VALUES ('3EiAcrzq1cELXScc98KeCswGWZaPGceT1d')`); // Federation change address
// Create the federation_txos table that uses the federation_addresses table as a foreign key
await this.$executeQuery(this.getCreateFederationTxosTableQuery(), await this.$checkIfTableExists('federation_txos'));
await this.$executeQuery(`INSERT INTO state VALUES('last_bitcoin_block_audit', 0, NULL);`);
await this.updateToSchemaVersion(68);
}
if (databaseSchemaVersion < 69 && config.MEMPOOL.NETWORK === 'mainnet') {
await this.$executeQuery(this.getCreateAccelerationsTableQuery(), await this.$checkIfTableExists('accelerations'));
await this.updateToSchemaVersion(69);
}
if (databaseSchemaVersion < 70 && config.MEMPOOL.NETWORK === 'mainnet') {
await this.$executeQuery('ALTER TABLE accelerations MODIFY COLUMN added DATETIME;');
await this.updateToSchemaVersion(70);
}
if (databaseSchemaVersion < 71 && config.MEMPOOL.NETWORK === 'liquid') {
await this.$executeQuery('TRUNCATE TABLE elements_pegs');
await this.$executeQuery('TRUNCATE TABLE federation_txos');
await this.$executeQuery('SET FOREIGN_KEY_CHECKS = 0');
await this.$executeQuery('TRUNCATE TABLE federation_addresses');
await this.$executeQuery('SET FOREIGN_KEY_CHECKS = 1');
await this.$executeQuery(`INSERT INTO federation_addresses (bitcoinaddress) VALUES ('bc1qxvay4an52gcghxq5lavact7r6qe9l4laedsazz8fj2ee2cy47tlqff4aj4')`); // Federation change address
await this.$executeQuery(`INSERT INTO federation_addresses (bitcoinaddress) VALUES ('3EiAcrzq1cELXScc98KeCswGWZaPGceT1d')`); // Federation change address
await this.$executeQuery(`UPDATE state SET number = 0 WHERE name = 'last_elements_block';`);
await this.$executeQuery(`UPDATE state SET number = 0 WHERE name = 'last_bitcoin_block_audit';`);
await this.$executeQuery('ALTER TABLE `federation_txos` ADD timelock INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `federation_txos` ADD expiredAt INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `federation_txos` ADD emergencyKey TINYINT NOT NULL DEFAULT 0');
await this.updateToSchemaVersion(71);
}
if (databaseSchemaVersion < 72 && isBitcoin === true) {
// reindex Goggles flags for mined block templates above height 832000
await this.$executeQuery('UPDATE blocks_summaries SET version = 0 WHERE height >= 832000;');
await this.updateToSchemaVersion(72);
}
if (databaseSchemaVersion < 73 && config.MEMPOOL.NETWORK === 'mainnet') {
// Clear bad data
await this.$executeQuery(`TRUNCATE accelerations`);
this.uniqueLog(logger.notice, `'accelerations' table has been truncated`);
await this.updateToSchemaVersion(73);
}
if (databaseSchemaVersion < 74 && config.MEMPOOL.NETWORK === 'mainnet') {
await this.$executeQuery(`INSERT INTO state(name, number) VALUE ('last_acceleration_block', 0);`);
await this.updateToSchemaVersion(74);
}
if (databaseSchemaVersion < 75) {
await this.$executeQuery('ALTER TABLE `prices` ADD `BGN` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `BRL` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `CNY` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `CZK` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `DKK` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `HKD` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `HRK` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `HUF` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `IDR` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `ILS` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `INR` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `ISK` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `KRW` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `MXN` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `MYR` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `NOK` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `NZD` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `PHP` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `PLN` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `RON` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `RUB` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `SEK` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `SGD` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `THB` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `TRY` float DEFAULT "-1"');
await this.$executeQuery('ALTER TABLE `prices` ADD `ZAR` float DEFAULT "-1"');
if (isBitcoin === true) {
await this.$executeQuery('TRUNCATE hashrates');
await this.$executeQuery('TRUNCATE difficulty_adjustments');
await this.$executeQuery(`UPDATE state SET string = NULL WHERE name = 'pools_json_sha'`);
}
await this.updateToSchemaVersion(75);
}
if (databaseSchemaVersion < 76 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD prioritized_txs JSON DEFAULT "[]"');
await this.updateToSchemaVersion(76);
}
if (databaseSchemaVersion < 77 && config.MEMPOOL.NETWORK === 'mainnet') {
await this.$executeQuery('ALTER TABLE `accelerations` ADD requested datetime DEFAULT NULL');
await this.updateToSchemaVersion(77);
}
if (databaseSchemaVersion < 78) {
await this.$executeQuery('ALTER TABLE `prices` CHANGE `time` `time` datetime NOT NULL');
await this.updateToSchemaVersion(78);
}
if (databaseSchemaVersion < 79 && config.MEMPOOL.NETWORK === 'mainnet') {
// Clear bad data
await this.$executeQuery(`TRUNCATE accelerations`);
this.uniqueLog(logger.notice, `'accelerations' table has been truncated`);
await this.$executeQuery(`
UPDATE state
SET number = 0
WHERE name = 'last_acceleration_block'
`);
await this.updateToSchemaVersion(79);
}
if (databaseSchemaVersion < 80) {
await this.$executeQuery('ALTER TABLE `blocks` ADD coinbase_addresses JSON DEFAULT NULL');
await this.updateToSchemaVersion(80);
}
if (databaseSchemaVersion < 81 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD version INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD INDEX `version` (`version`)');
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD unseen_txs JSON DEFAULT "[]"');
await this.updateToSchemaVersion(81);
}
if (databaseSchemaVersion < 82 && isBitcoin === true && config.MEMPOOL.NETWORK === 'mainnet') {
await this.$fixBadV1AuditBlocks();
await this.updateToSchemaVersion(82);
}
if (databaseSchemaVersion < 83 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `blocks` ADD first_seen datetime(6) DEFAULT NULL');
await this.updateToSchemaVersion(83);
}
// add new pools indexes
if (databaseSchemaVersion < 84 && isBitcoin === true) {
await this.$executeQuery(`
ALTER TABLE \`pools\`
ADD INDEX \`slug\` (\`slug\`),
ADD INDEX \`unique_id\` (\`unique_id\`)
`);
await this.updateToSchemaVersion(84);
}
// lightning channels indexes
if (databaseSchemaVersion < 85 && isBitcoin === true) {
await this.$executeQuery(`
ALTER TABLE \`channels\`
ADD INDEX \`created\` (\`created\`),
ADD INDEX \`capacity\` (\`capacity\`),
ADD INDEX \`closing_reason\` (\`closing_reason\`),
ADD INDEX \`closing_resolved\` (\`closing_resolved\`)
`);
await this.updateToSchemaVersion(85);
}
// lightning nodes indexes
if (databaseSchemaVersion < 86 && isBitcoin === true) {
await this.$executeQuery(`
ALTER TABLE \`nodes\`
ADD INDEX \`status\` (\`status\`),
ADD INDEX \`channels\` (\`channels\`),
ADD INDEX \`country_id\` (\`country_id\`),
ADD INDEX \`as_number\` (\`as_number\`),
ADD INDEX \`first_seen\` (\`first_seen\`)
`);
await this.updateToSchemaVersion(86);
}
// lightning node sockets indexes
if (databaseSchemaVersion < 87 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `nodes_sockets` ADD INDEX `type` (`type`)');
await this.updateToSchemaVersion(87);
}
// lightning stats indexes
if (databaseSchemaVersion < 88 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD INDEX `added` (`added`)');
await this.updateToSchemaVersion(88);
}
// geo names indexes
if (databaseSchemaVersion < 89 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `geo_names` ADD INDEX `names` (`names`)');
await this.updateToSchemaVersion(89);
}
// hashrates indexes
if (databaseSchemaVersion < 90 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `hashrates` ADD INDEX `type` (`type`)');
await this.updateToSchemaVersion(90);
}
// block audits indexes
if (databaseSchemaVersion < 91 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD INDEX `time` (`time`)');
await this.updateToSchemaVersion(91);
}
// elements_pegs indexes
if (databaseSchemaVersion < 92 && config.MEMPOOL.NETWORK === 'liquid') {
await this.$executeQuery(`
ALTER TABLE \`elements_pegs\`
ADD INDEX \`block\` (\`block\`),
ADD INDEX \`datetime\` (\`datetime\`),
ADD INDEX \`amount\` (\`amount\`),
ADD INDEX \`bitcoinaddress\` (\`bitcoinaddress\`),
ADD INDEX \`bitcointxid\` (\`bitcointxid\`)
`);
await this.updateToSchemaVersion(92);
}
// federation_txos indexes
if (databaseSchemaVersion < 93 && config.MEMPOOL.NETWORK === 'liquid') {
await this.$executeQuery(`
ALTER TABLE \`federation_txos\`
ADD INDEX \`unspent\` (\`unspent\`),
ADD INDEX \`lastblockupdate\` (\`lastblockupdate\`),
ADD INDEX \`blocktime\` (\`blocktime\`),
ADD INDEX \`emergencyKey\` (\`emergencyKey\`),
ADD INDEX \`expiredAt\` (\`expiredAt\`)
`);
await this.updateToSchemaVersion(93);
}
// Unify database schema for all mempool netwoks
// versions above 94 should not use network-specific flags
if (databaseSchemaVersion < 94) {
if (!isBitcoin) {
// Apply all the bitcoin specific migrations to non-bitcoin networks: liquid, liquidtestnet and testnet4 (!)
// Version 5
await this.$executeQuery('ALTER TABLE blocks ADD `reward` double unsigned NOT NULL DEFAULT "0"');
// Version 6
await this.$executeQuery('ALTER TABLE blocks MODIFY `height` integer unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `tx_count` smallint unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `size` integer unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `weight` integer unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `difficulty` double NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks DROP FOREIGN KEY IF EXISTS `blocks_ibfk_1`');
await this.$executeQuery('ALTER TABLE pools MODIFY `id` smallint unsigned AUTO_INCREMENT');
await this.$executeQuery('ALTER TABLE blocks MODIFY `pool_id` smallint unsigned NULL');
await this.$executeQuery('ALTER TABLE blocks ADD FOREIGN KEY (`pool_id`) REFERENCES `pools` (`id`)');
await this.$executeQuery('ALTER TABLE blocks ADD `version` integer unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks ADD `bits` integer unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks ADD `nonce` bigint unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks ADD `merkle_root` varchar(65) NOT NULL DEFAULT ""');
await this.$executeQuery('ALTER TABLE blocks ADD `previous_block_hash` varchar(65) NULL');
// Version 7
await this.$executeQuery('DROP table IF EXISTS hashrates;');
await this.$executeQuery(this.getCreateDailyStatsTableQuery(), await this.$checkIfTableExists('hashrates'));
// Version 8
await this.$executeQuery('ALTER TABLE `hashrates` DROP INDEX `PRIMARY`');
await this.$executeQuery('ALTER TABLE `hashrates` ADD `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST');
await this.$executeQuery('ALTER TABLE `hashrates` ADD `share` float NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `hashrates` ADD `type` enum("daily", "weekly") DEFAULT "daily"');
// Version 9
await this.$executeQuery('ALTER TABLE `state` CHANGE `name` `name` varchar(100)');
await this.$executeQuery('ALTER TABLE `hashrates` ADD UNIQUE `hashrate_timestamp_pool_id` (`hashrate_timestamp`, `pool_id`)');
// Version 10
await this.$executeQuery('ALTER TABLE `blocks` ADD INDEX `blockTimestamp` (`blockTimestamp`)');
// Version 11
await this.$executeQuery(`ALTER TABLE blocks
ADD avg_fee INT UNSIGNED NULL,
ADD avg_fee_rate INT UNSIGNED NULL
`);
await this.$executeQuery('ALTER TABLE blocks MODIFY `reward` BIGINT UNSIGNED NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `median_fee` INT UNSIGNED NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `fees` INT UNSIGNED NOT NULL DEFAULT "0"');
// Version 12
await this.$executeQuery('ALTER TABLE blocks MODIFY `fees` BIGINT UNSIGNED NOT NULL DEFAULT "0"');
// Version 13
await this.$executeQuery('ALTER TABLE blocks MODIFY `difficulty` DOUBLE UNSIGNED NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `median_fee` BIGINT UNSIGNED NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `avg_fee` BIGINT UNSIGNED NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE blocks MODIFY `avg_fee_rate` BIGINT UNSIGNED NOT NULL DEFAULT "0"');
// Version 14
await this.$executeQuery('ALTER TABLE `hashrates` DROP FOREIGN KEY `hashrates_ibfk_1`');
await this.$executeQuery('ALTER TABLE `hashrates` MODIFY `pool_id` SMALLINT UNSIGNED NOT NULL DEFAULT "0"');
// Version 17
await this.$executeQuery('ALTER TABLE `pools` ADD `slug` CHAR(50) NULL');
// Version 18
await this.$executeQuery('ALTER TABLE `blocks` ADD INDEX `hash` (`hash`);');
// Version 20
await this.$executeQuery(this.getCreateBlocksSummariesTableQuery(), await this.$checkIfTableExists('blocks_summaries'));
// Version 22
await this.$executeQuery('DROP TABLE IF EXISTS `difficulty_adjustments`');
await this.$executeQuery(this.getCreateDifficultyAdjustmentsTableQuery(), await this.$checkIfTableExists('difficulty_adjustments'));
// Version 24
await this.$executeQuery('DROP TABLE IF EXISTS `blocks_audits`');
await this.$executeQuery(this.getCreateBlocksAuditsTableQuery(), await this.$checkIfTableExists('blocks_audits'));
// Version 25
await this.$executeQuery(this.getCreateLightningStatisticsQuery(), await this.$checkIfTableExists('lightning_stats'));
await this.$executeQuery(this.getCreateNodesQuery(), await this.$checkIfTableExists('nodes'));
await this.$executeQuery(this.getCreateChannelsQuery(), await this.$checkIfTableExists('channels'));
await this.$executeQuery(this.getCreateNodesStatsQuery(), await this.$checkIfTableExists('node_stats'));
// Version 26
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD tor_nodes int(11) NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD clearnet_nodes int(11) NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD unannounced_nodes int(11) NOT NULL DEFAULT "0"');
// Version 27
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD avg_capacity bigint(20) unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD avg_fee_rate int(11) unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD avg_base_fee_mtokens bigint(20) unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD med_capacity bigint(20) unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD med_fee_rate int(11) unsigned NOT NULL DEFAULT "0"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD med_base_fee_mtokens bigint(20) unsigned NOT NULL DEFAULT "0"');
// Version 28
await this.$executeQuery(`ALTER TABLE lightning_stats MODIFY added DATE`);
// Version 29
await this.$executeQuery(this.getCreateGeoNamesTableQuery(), await this.$checkIfTableExists('geo_names'));
await this.$executeQuery('ALTER TABLE `nodes` ADD as_number int(11) unsigned NULL DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD city_id int(11) unsigned NULL DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD country_id int(11) unsigned NULL DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD accuracy_radius int(11) unsigned NULL DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD subdivision_id int(11) unsigned NULL DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD longitude double NULL DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD latitude double NULL DEFAULT NULL');
// Version 30
await this.$executeQuery('ALTER TABLE `geo_names` CHANGE `type` `type` enum("city","country","division","continent","as_organization") NOT NULL');
// Version 31
await this.$executeQuery('ALTER TABLE `prices` ADD `id` int NULL AUTO_INCREMENT UNIQUE');
await this.$executeQuery('DROP TABLE IF EXISTS `blocks_prices`');
await this.$executeQuery(this.getCreateBlocksPricesTableQuery(), await this.$checkIfTableExists('blocks_prices'));
// Version 32
await this.$executeQuery('ALTER TABLE `blocks_summaries` ADD `template` JSON DEFAULT "[]"');
// Version 33
await this.$executeQuery('ALTER TABLE `geo_names` CHANGE `type` `type` enum("city","country","division","continent","as_organization", "country_iso_code") NOT NULL');
// Version 34
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD clearnet_tor_nodes int(11) NOT NULL DEFAULT "0"');
// Version 35
await this.$executeQuery('DELETE from `lightning_stats` WHERE added > "2021-09-19"');
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD CONSTRAINT added_unique UNIQUE (added);');
// Version 36
await this.$executeQuery('ALTER TABLE `nodes` ADD status TINYINT NOT NULL DEFAULT "1"');
// Version 37
await this.$executeQuery(this.getCreateLNNodesSocketsTableQuery(), await this.$checkIfTableExists('nodes_sockets'));
// Version 38
await this.$executeQuery(`TRUNCATE lightning_stats`);
await this.$executeQuery(`TRUNCATE node_stats`);
await this.$executeQuery('ALTER TABLE `lightning_stats` CHANGE `added` `added` timestamp NULL');
await this.$executeQuery('ALTER TABLE `node_stats` CHANGE `added` `added` timestamp NULL');
await this.updateToSchemaVersion(38);
// Version 39
await this.$executeQuery('ALTER TABLE `nodes` ADD alias_search TEXT NULL DEFAULT NULL AFTER `alias`');
await this.$executeQuery('ALTER TABLE nodes ADD FULLTEXT(alias_search)');
// Version 40
await this.$executeQuery('ALTER TABLE `nodes` ADD capacity bigint(20) unsigned DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD channels int(11) unsigned DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `nodes` ADD INDEX `capacity` (`capacity`);');
// Version 41
await this.$executeQuery('UPDATE channels SET closing_reason = NULL WHERE closing_reason = 1');
// Version 42
await this.$executeQuery('ALTER TABLE `channels` ADD closing_resolved tinyint(1) DEFAULT 0');
// Version 43
await this.$executeQuery(this.getCreateLNNodeRecordsTableQuery(), await this.$checkIfTableExists('nodes_records'));
// Version 44
await this.$executeQuery('UPDATE blocks_summaries SET template = NULL');
// Version 45
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD fresh_txs JSON DEFAULT "[]"');
// Version 48
await this.$executeQuery('ALTER TABLE `channels` ADD source_checked tinyint(1) DEFAULT 0');
await this.$executeQuery('ALTER TABLE `channels` ADD closing_fee bigint(20) unsigned DEFAULT 0');
await this.$executeQuery('ALTER TABLE `channels` ADD node1_funding_balance bigint(20) unsigned DEFAULT 0');
await this.$executeQuery('ALTER TABLE `channels` ADD node2_funding_balance bigint(20) unsigned DEFAULT 0');
await this.$executeQuery('ALTER TABLE `channels` ADD node1_closing_balance bigint(20) unsigned DEFAULT 0');
await this.$executeQuery('ALTER TABLE `channels` ADD node2_closing_balance bigint(20) unsigned DEFAULT 0');
await this.$executeQuery('ALTER TABLE `channels` ADD funding_ratio float unsigned DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `channels` ADD closed_by varchar(66) DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `channels` ADD single_funded tinyint(1) DEFAULT 0');
await this.$executeQuery('ALTER TABLE `channels` ADD outputs JSON DEFAULT "[]"');
// Version 57
await this.$executeQuery(`ALTER TABLE nodes MODIFY updated_at datetime NULL`);
// Version 60
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD sigop_txs JSON DEFAULT "[]"');
// Version 61
if (! await this.$checkIfTableExists('blocks_templates')) {
await this.$executeQuery('CREATE TABLE blocks_templates AS SELECT id, template FROM blocks_summaries WHERE template != "[]"');
}
await this.$executeQuery('ALTER TABLE blocks_templates MODIFY template JSON DEFAULT "[]"');
await this.$executeQuery('ALTER TABLE blocks_templates ADD PRIMARY KEY (id)');
await this.$executeQuery('ALTER TABLE blocks_summaries DROP COLUMN template');
// Version 62
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD expected_fees BIGINT UNSIGNED DEFAULT NULL');
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD expected_weight BIGINT UNSIGNED DEFAULT NULL');
// Version 63
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD fullrbf_txs JSON DEFAULT "[]"');
// Version 64
await this.$executeQuery('ALTER TABLE `nodes` ADD features text NULL');
// Version 65
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD accelerated_txs JSON DEFAULT "[]"');
// Version 67
await this.$executeQuery('ALTER TABLE `blocks_summaries` ADD version INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `blocks_summaries` ADD INDEX `version` (`version`)');
await this.$executeQuery('ALTER TABLE `blocks_templates` ADD version INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `blocks_templates` ADD INDEX `version` (`version`)');
// Version 76
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD prioritized_txs JSON DEFAULT "[]"');
// Version 81
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD version INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD INDEX `version` (`version`)');
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD unseen_txs JSON DEFAULT "[]"');
// Version 83
await this.$executeQuery('ALTER TABLE `blocks` ADD first_seen datetime(6) DEFAULT NULL');
// Version 84
await this.$executeQuery(`
ALTER TABLE \`pools\`
ADD INDEX \`slug\` (\`slug\`),
ADD INDEX \`unique_id\` (\`unique_id\`)
`);
// Version 85
await this.$executeQuery(`
ALTER TABLE \`channels\`
ADD INDEX \`created\` (\`created\`),
ADD INDEX \`capacity\` (\`capacity\`),
ADD INDEX \`closing_reason\` (\`closing_reason\`),
ADD INDEX \`closing_resolved\` (\`closing_resolved\`)
`);
// Version 86
await this.$executeQuery(`
ALTER TABLE \`nodes\`
ADD INDEX \`status\` (\`status\`),
ADD INDEX \`channels\` (\`channels\`),
ADD INDEX \`country_id\` (\`country_id\`),
ADD INDEX \`as_number\` (\`as_number\`),
ADD INDEX \`first_seen\` (\`first_seen\`)
`);
// Version 87
await this.$executeQuery('ALTER TABLE `nodes_sockets` ADD INDEX `type` (`type`)');
await this.updateToSchemaVersion(87);
// Version 88
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD INDEX `added` (`added`)');
// Version 89
await this.$executeQuery('ALTER TABLE `geo_names` ADD INDEX `names` (`names`)');
// Version 90
await this.$executeQuery('ALTER TABLE `hashrates` ADD INDEX `type` (`type`)');
// Version 91
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD INDEX `time` (`time`)');
}
if (config.MEMPOOL.NETWORK !== 'liquid') {
// Apply all the liquid specific migrations to all other networks
// Version 68
await this.$executeQuery('ALTER TABLE elements_pegs ADD PRIMARY KEY (txid, txindex);');
await this.$executeQuery(this.getCreateFederationAddressesTableQuery(), await this.$checkIfTableExists('federation_addresses'));
await this.$executeQuery(this.getCreateFederationTxosTableQuery(), await this.$checkIfTableExists('federation_txos'));
// Version 71
await this.$executeQuery('ALTER TABLE `federation_txos` ADD timelock INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `federation_txos` ADD expiredAt INT NOT NULL DEFAULT 0');
await this.$executeQuery('ALTER TABLE `federation_txos` ADD emergencyKey TINYINT NOT NULL DEFAULT 0');
// Version 92
await this.$executeQuery(`
ALTER TABLE \`elements_pegs\`
ADD INDEX \`block\` (\`block\`),
ADD INDEX \`datetime\` (\`datetime\`),
ADD INDEX \`amount\` (\`amount\`),
ADD INDEX \`bitcoinaddress\` (\`bitcoinaddress\`),
ADD INDEX \`bitcointxid\` (\`bitcointxid\`)
`);
// Version 93
await this.$executeQuery(`
ALTER TABLE \`federation_txos\`
ADD INDEX \`unspent\` (\`unspent\`),
ADD INDEX \`lastblockupdate\` (\`lastblockupdate\`),
ADD INDEX \`blocktime\` (\`blocktime\`),
ADD INDEX \`emergencyKey\` (\`emergencyKey\`),
ADD INDEX \`expiredAt\` (\`expiredAt\`)
`);
}
if (config.MEMPOOL.NETWORK !== 'mainnet') {
// Apply all the mainnet specific migrations to all other networks
// Version 69
await this.$executeQuery(this.getCreateAccelerationsTableQuery(), await this.$checkIfTableExists('accelerations'));
// Version 70
await this.$executeQuery('ALTER TABLE accelerations MODIFY COLUMN added DATETIME;');
// Version 77
await this.$executeQuery('ALTER TABLE `accelerations` ADD requested datetime DEFAULT NULL');
}
await this.updateToSchemaVersion(94);
}
// blocks pools-v2.json hash
if (databaseSchemaVersion < 95) {
let poolJsonSha = 'f737d86571d190cf1a1a3cf5fd86b33ba9624254';
const [poolJsonShaDb]: any[] = await DB.query(`SELECT string FROM state WHERE name = 'pools_json_sha'`);
if (poolJsonShaDb?.length > 0) {
poolJsonSha = poolJsonShaDb[0].string;
}
await this.$executeQuery(`ALTER TABLE blocks ADD definition_hash varchar(255) NOT NULL DEFAULT "${poolJsonSha}"`);
await this.$executeQuery('ALTER TABLE blocks ADD INDEX `definition_hash` (`definition_hash`)');
await this.updateToSchemaVersion(95);
}
}
/**
@ -795,6 +1377,32 @@ class DatabaseMigration {
) ENGINE=InnoDB DEFAULT CHARSET=utf8;`;
}
private getCreateFederationAddressesTableQuery(): string {
return `CREATE TABLE IF NOT EXISTS federation_addresses (
bitcoinaddress varchar(100) NOT NULL,
PRIMARY KEY (bitcoinaddress)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;`;
}
private getCreateFederationTxosTableQuery(): string {
return `CREATE TABLE IF NOT EXISTS federation_txos (
txid varchar(65) NOT NULL,
txindex int(11) NOT NULL,
bitcoinaddress varchar(100) NOT NULL,
amount bigint(20) unsigned NOT NULL,
blocknumber int(11) unsigned NOT NULL,
blocktime int(11) unsigned NOT NULL,
unspent tinyint(1) NOT NULL,
lastblockupdate int(11) unsigned NOT NULL,
lasttimeupdate int(11) unsigned NOT NULL,
pegtxid varchar(65) NOT NULL,
pegindex int(11) NOT NULL,
pegblocktime int(11) unsigned NOT NULL,
PRIMARY KEY (txid, txindex),
FOREIGN KEY (bitcoinaddress) REFERENCES federation_addresses (bitcoinaddress)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;`;
}
private getCreatePoolsTableQuery(): string {
return `CREATE TABLE IF NOT EXISTS pools (
id int(11) NOT NULL AUTO_INCREMENT,
@ -1065,6 +1673,23 @@ class DatabaseMigration {
) ENGINE=InnoDB DEFAULT CHARSET=utf8;`;
}
private getCreateAccelerationsTableQuery(): string {
return `CREATE TABLE IF NOT EXISTS accelerations (
txid varchar(65) NOT NULL,
added datetime NOT NULL,
height int(10) NOT NULL,
pool smallint unsigned NULL,
effective_vsize int(10) NOT NULL,
effective_fee bigint(20) unsigned NOT NULL,
boost_rate float unsigned,
boost_cost bigint(20) unsigned NOT NULL,
PRIMARY KEY (txid),
INDEX (added),
INDEX (height),
INDEX (pool)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;`;
}
public async $blocksReindexingTruncate(): Promise<void> {
logger.warn(`Truncating pools, blocks, hashrates and difficulty_adjustments tables for re-indexing (using '--reindex-blocks'). You can cancel this command within 5 seconds`);
await Common.sleep$(5000);
@ -1119,6 +1744,28 @@ class DatabaseMigration {
logger.warn(`Failed to migrate cpfp transaction data`);
}
}
private async $fixBadV1AuditBlocks(): Promise<void> {
const badBlocks = [
'000000000000000000011ad49227fc8c9ba0ca96ad2ebce41a862f9a244478dc',
'000000000000000000010ac1f68b3080153f2826ffddc87ceffdd68ed97d6960',
'000000000000000000024cbdafeb2660ae8bd2947d166e7fe15d1689e86b2cf7',
'00000000000000000002e1dbfbf6ae057f331992a058b822644b368034f87286',
'0000000000000000000019973b2778f08ad6d21e083302ff0833d17066921ebb',
];
for (const hash of badBlocks) {
try {
await this.$executeQuery(`
UPDATE blocks_audits
SET prioritized_txs = '[]'
WHERE hash = '${hash}'
`, true);
} catch (e) {
continue;
}
}
}
}
export default new DatabaseMigration();

View File

@ -12,12 +12,76 @@ export interface DifficultyAdjustment {
previousTime: number; // Unix time in ms
nextRetargetHeight: number; // Block Height
timeAvg: number; // Duration of time in ms
adjustedTimeAvg; // Expected block interval with hashrate implied over last 504 blocks
timeOffset: number; // (Testnet) Time since last block (cap @ 20min) in ms
expectedBlocks: number; // Block count
}
/**
* Calculate the difficulty increase/decrease by using the `bits` integer contained in two
* block headers.
*
* Warning: Only compare `bits` from blocks in two adjacent difficulty periods. This code
* assumes the maximum difference is x4 or /4 (as per the protocol) and will throw an
* error if an exponent difference of 2 or more is seen.
*
* @param {number} oldBits The 32 bit `bits` integer from a block header.
* @param {number} newBits The 32 bit `bits` integer from a block header in the next difficulty period.
* @returns {number} A floating point decimal of the difficulty change from old to new.
* (ie. 21.3 means 21.3% increase in difficulty, -21.3 is a 21.3% decrease in difficulty)
*/
export function calcBitsDifference(oldBits: number, newBits: number): number {
// Must be
// - integer
// - highest exponent is 0x20, so max value (as integer) is 0x207fffff
// - min value is 1 (exponent = 0)
// - highest bit of the number-part is +- sign, it must not be 1
const verifyBits = (bits: number): void => {
if (
Math.floor(bits) !== bits ||
bits > 0x207fffff ||
bits < 1 ||
(bits & 0x00800000) !== 0 ||
(bits & 0x007fffff) === 0
) {
throw new Error('Invalid bits');
}
};
verifyBits(oldBits);
verifyBits(newBits);
// No need to mask exponents because we checked the bounds above
const oldExp = oldBits >> 24;
const newExp = newBits >> 24;
const oldNum = oldBits & 0x007fffff;
const newNum = newBits & 0x007fffff;
// The diff can only possibly be 1, 0, -1
// (because maximum difficulty change is x4 or /4 (2 bits up or down))
let result: number;
switch (newExp - oldExp) {
// New less than old, target lowered, difficulty increased
case -1:
result = ((oldNum << 8) * 100) / newNum - 100;
break;
// Same exponent, compare numbers as is.
case 0:
result = (oldNum * 100) / newNum - 100;
break;
// Old less than new, target raised, difficulty decreased
case 1:
result = (oldNum * 100) / (newNum << 8) - 100;
break;
default:
throw new Error('Impossible exponent difference');
}
// Min/Max values
return result > 300 ? 300 : result < -75 ? -75 : result;
}
export function calcDifficultyAdjustment(
DATime: number,
quarterEpochTime: number | null,
nowSeconds: number,
blockHeight: number,
previousRetarget: number,
@ -38,8 +102,20 @@ export function calcDifficultyAdjustment(
let difficultyChange = 0;
let timeAvgSecs = blocksInEpoch ? diffSeconds / blocksInEpoch : BLOCK_SECONDS_TARGET;
let adjustedTimeAvgSecs = timeAvgSecs;
// for the first 504 blocks of the epoch, calculate the expected avg block interval
// from a sliding window over the last 504 blocks
if (quarterEpochTime && blocksInEpoch < 503) {
const timeLastEpoch = DATime - quarterEpochTime;
const adjustedTimeLastEpoch = timeLastEpoch * (1 + (previousRetarget / 100));
const adjustedTimeSpan = diffSeconds + adjustedTimeLastEpoch;
adjustedTimeAvgSecs = adjustedTimeSpan / 503;
difficultyChange = (BLOCK_SECONDS_TARGET / (adjustedTimeSpan / 504) - 1) * 100;
} else {
difficultyChange = (BLOCK_SECONDS_TARGET / (actualTimespan / (blocksInEpoch + 1)) - 1) * 100;
}
difficultyChange = (BLOCK_SECONDS_TARGET / (actualTimespan / (blocksInEpoch + 1)) - 1) * 100;
// Max increase is x4 (+300%)
if (difficultyChange > 300) {
difficultyChange = 300;
@ -64,7 +140,8 @@ export function calcDifficultyAdjustment(
}
const timeAvg = Math.floor(timeAvgSecs * 1000);
const remainingTime = remainingBlocks * timeAvg;
const adjustedTimeAvg = Math.floor(adjustedTimeAvgSecs * 1000);
const remainingTime = remainingBlocks * adjustedTimeAvg;
const estimatedRetargetDate = remainingTime + nowSeconds * 1000;
return {
@ -77,6 +154,7 @@ export function calcDifficultyAdjustment(
previousTime: DATime,
nextRetargetHeight,
timeAvg,
adjustedTimeAvg,
timeOffset,
expectedBlocks,
};
@ -93,9 +171,10 @@ class DifficultyAdjustmentApi {
return null;
}
const nowSeconds = Math.floor(new Date().getTime() / 1000);
const quarterEpochBlockTime = blocks.getQuarterEpochBlockTime();
return calcDifficultyAdjustment(
DATime, nowSeconds, blockHeight, previousRetarget,
DATime, quarterEpochBlockTime, nowSeconds, blockHeight, previousRetarget,
config.MEMPOOL.NETWORK, latestBlock.timestamp
);
}

View File

@ -29,7 +29,7 @@ class DiskCache {
};
constructor() {
if (!cluster.isPrimary) {
if (!cluster.isPrimary || !config.MEMPOOL.CACHE_ENABLED) {
return;
}
process.on('SIGINT', (e) => {
@ -39,7 +39,7 @@ class DiskCache {
}
async $saveCacheToDisk(sync: boolean = false): Promise<void> {
if (!cluster.isPrimary) {
if (!cluster.isPrimary || !config.MEMPOOL.CACHE_ENABLED) {
return;
}
if (this.isWritingCache) {
@ -175,10 +175,11 @@ class DiskCache {
}
async $loadMempoolCache(): Promise<void> {
if (!fs.existsSync(DiskCache.FILE_NAME)) {
if (!config.MEMPOOL.CACHE_ENABLED || !fs.existsSync(DiskCache.FILE_NAME)) {
return;
}
try {
const start = Date.now();
let data: any = {};
const cacheData = fs.readFileSync(DiskCache.FILE_NAME, 'utf8');
if (cacheData) {
@ -220,6 +221,8 @@ class DiskCache {
}
}
logger.info(`Loaded mempool from disk cache in ${Date.now() - start} ms`);
await memPool.$setMempool(data.mempool);
if (!this.ignoreBlocksCache) {
blocks.setBlocks(data.blocks);
@ -249,7 +252,13 @@ class DiskCache {
}
if (rbfData?.rbf) {
rbfCache.load(rbfData.rbf);
rbfCache.load({
txs: rbfData.rbf.txs.map(([txid, entry]) => ({ value: entry })),
trees: rbfData.rbf.trees,
expiring: rbfData.rbf.expiring.map(([txid, value]) => ({ key: txid, value })),
mempool: memPool.getMempool(),
spendMap: memPool.getSpendMap(),
});
}
} catch (e) {
logger.warn('Failed to parse rbf cache. Skipping. Reason: ' + (e instanceof Error ? e.message : e));

View File

@ -80,7 +80,13 @@ class ChannelsApi {
public async $searchChannelsById(search: string): Promise<any[]> {
try {
const searchStripped = search.replace('%', '') + '%';
// restrict search to valid id/short_id prefix formats
let searchStripped = search.match(/^[0-9]+[0-9x]*$/)?.[0] || '';
if (!searchStripped.length) {
return [];
}
// add wildcard to search by prefix
searchStripped += '%';
const query = `SELECT id, short_id, capacity, status FROM channels WHERE id LIKE ? OR short_id LIKE ? LIMIT 10`;
const [rows]: any = await DB.query(query, [searchStripped, searchStripped]);
return rows;
@ -117,6 +123,26 @@ class ChannelsApi {
}
}
public async $getPenaltyClosedChannels(): Promise<any[]> {
try {
const query = `
SELECT n1.alias AS alias_left,
n2.alias AS alias_right,
channels.*
FROM channels
LEFT JOIN nodes AS n1 ON n1.public_key = channels.node1_public_key
LEFT JOIN nodes AS n2 ON n2.public_key = channels.node2_public_key
WHERE channels.status = 2 AND channels.closing_reason = 3
ORDER BY closing_date DESC
`;
const [rows]: any = await DB.query(query);
return rows;
} catch (e) {
logger.err('$getPenaltyClosedChannels error: ' + (e instanceof Error ? e.message : e));
throw e;
}
}
public async $getUnresolvedClosedChannels(): Promise<any[]> {
try {
const query = `SELECT * FROM channels WHERE status = 2 AND closing_reason = 2 AND closing_resolved = 0 AND closing_transaction_id != ''`;

View File

@ -1,6 +1,9 @@
import config from '../../config';
import { Application, Request, Response } from 'express';
import channelsApi from './channels.api';
import { handleError } from '../../utils/api';
const TXID_REGEX = /^[a-f0-9]{64}$/i;
class ChannelsRoutes {
constructor() { }
@ -11,6 +14,7 @@ class ChannelsRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/channels/search/:search', this.$searchChannelsById)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/channels/:short_id', this.$getChannel)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/channels', this.$getChannelsForNode)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/penalties', this.$getPenaltyClosedChannels)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/channels-geo', this.$getAllChannelsGeo)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/channels-geo/:publicKey', this.$getAllChannelsGeo)
;
@ -21,7 +25,7 @@ class ChannelsRoutes {
const channels = await channelsApi.$searchChannelsById(req.params.search);
res.json(channels);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to search channels by id');
}
}
@ -37,7 +41,7 @@ class ChannelsRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(channel);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get channel');
}
}
@ -52,10 +56,12 @@ class ChannelsRoutes {
const status: string = typeof req.query.status === 'string' ? req.query.status : '';
if (index < -1) {
res.status(400).send('Invalid index');
handleError(req, res, 400, 'Invalid index');
return;
}
if (['open', 'active', 'closed'].includes(status) === false) {
res.status(400).send('Invalid status');
handleError(req, res, 400, 'Invalid status');
return;
}
const channels = await channelsApi.$getChannelsForNode(req.query.public_key, index, 10, status);
@ -66,20 +72,23 @@ class ChannelsRoutes {
res.header('X-Total-Count', channelsCount.toString());
res.json(channels);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get channels for node');
}
}
private async $getChannelsByTransactionIds(req: Request, res: Response): Promise<void> {
try {
if (!Array.isArray(req.query.txId)) {
res.status(400).send('Not an array');
handleError(req, res, 400, 'Not an array');
return;
}
const txIds: string[] = [];
for (const _txId in req.query.txId) {
if (typeof req.query.txId[_txId] === 'string') {
txIds.push(req.query.txId[_txId].toString());
const txid = req.query.txId[_txId].toString();
if (TXID_REGEX.test(txid)) {
txIds.push(txid);
}
}
}
const channels = await channelsApi.$getChannelsByTransactionId(txIds);
@ -104,7 +113,19 @@ class ChannelsRoutes {
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get channels by transaction ids');
}
}
private async $getPenaltyClosedChannels(req: Request, res: Response): Promise<void> {
try {
const channels = await channelsApi.$getPenaltyClosedChannels();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(channels);
} catch (e) {
handleError(req, res, 500, 'Failed to get penalty closed channels');
}
}
@ -117,7 +138,7 @@ class ChannelsRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(channels);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get channel geodata');
}
}

View File

@ -3,6 +3,8 @@ import { Application, Request, Response } from 'express';
import nodesApi from './nodes.api';
import channelsApi from './channels.api';
import statisticsApi from './statistics.api';
import { handleError } from '../../utils/api';
class GeneralLightningRoutes {
constructor() { }
@ -27,7 +29,7 @@ class GeneralLightningRoutes {
channels: channels,
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to search for nodes and channels');
}
}
@ -41,7 +43,7 @@ class GeneralLightningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(statistics);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get lightning statistics');
}
}
@ -50,7 +52,7 @@ class GeneralLightningRoutes {
const statistics = await statisticsApi.$getLatestStatistics();
res.json(statistics);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get lightning statistics');
}
}
}

View File

@ -666,7 +666,9 @@ class NodesApi {
node.last_update = null;
}
const sockets = (node.addresses?.map(a => a.addr).join(',')) ?? '';
const uniqueAddr = [...new Set(node.addresses?.map(a => a.addr))];
const formattedSockets = (uniqueAddr.join(',')) ?? '';
const query = `INSERT INTO nodes(
public_key,
first_seen,
@ -695,13 +697,13 @@ class NodesApi {
node.alias,
this.aliasToSearchText(node.alias),
node.color,
sockets,
formattedSockets,
JSON.stringify(node.features),
node.last_update,
node.alias,
this.aliasToSearchText(node.alias),
node.color,
sockets,
formattedSockets,
JSON.stringify(node.features),
]);
} catch (e) {
@ -713,7 +715,9 @@ class NodesApi {
* Update node sockets
*/
public async $updateNodeSockets(publicKey: string, sockets: {network: string; addr: string}[]): Promise<void> {
const formattedSockets = (sockets.map(a => a.addr).join(',')) ?? '';
const uniqueAddr = [...new Set(sockets.map(a => a.addr))];
const formattedSockets = (uniqueAddr.join(',')) ?? '';
try {
await DB.query(`UPDATE nodes SET sockets = ? WHERE public_key = ?`, [formattedSockets, publicKey]);
} catch (e) {

View File

@ -3,6 +3,7 @@ import { Application, Request, Response } from 'express';
import nodesApi from './nodes.api';
import DB from '../../database';
import { INodesRanking } from '../../mempool.interfaces';
import { handleError } from '../../utils/api';
class NodesRoutes {
constructor() { }
@ -31,7 +32,7 @@ class NodesRoutes {
const nodes = await nodesApi.$searchNodeByPublicKeyOrAlias(req.params.search);
res.json(nodes);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to search for node');
}
}
@ -42,6 +43,20 @@ class NodesRoutes {
switch (config.MEMPOOL.NETWORK) {
case 'testnet':
nodesList = [
'0259db43b4e4ac0ff12a805f2d81e521253ba2317f6739bc611d8e2fa156d64256',
'0352b9944b9a52bd2116c91f1ba70c4ef851ac5ba27e1b20f1d92da3ade010dd10',
'03424f5a7601eaa47482cb17100b31a84a04d14fb44b83a57eeceffd8e299878e3',
'032850492ee61a5f7006a2fda6925e4b4ec3782f2b6de2ff0e439ef5a38c3b2470',
'022c80bace98831c44c32fb69755f2b353434e0ee9e7fbda29507f7ef8abea1421',
'02c3559c833e6f99f9ca05fe503e0b4e7524dea9121344edfd3e811101e0c28680',
'02b36a324fa2dd3af2a63ac65f241907882829bed5002b4e14171d25c219e0d470',
'0231b6e8f21f9f6c057f6bf8a812f79e396ee16a66ece91939a1576ce9fb9e87a5',
'034b6aac206bffcbd651b7ead1ab8a0991c945dfafe19ff27dcdeadc6843ebd15c',
'039c065f7e344acd969ebdd4a94550915b6f24e8782ae2be540bb96c8a4fcfb86b',
'03d9f9f4803fc75920f14dd13d83fbecc53229a65d4ee4cd2d86fdf211f7337576',
'0357fe48c4dece744f70865eda66e396aab5d05e09e1145cd3b7da83f11446d4cf',
'02bca4d642eda631f2c8659758e2a2868e518b93503f2bfcd767749c6530a10679',
'03f32c99c0bb9f62dae53671d1d300565773455248f34134cc02779b881561174e',
'032c7c7819276c4f706a04df1a0f1e10a5495994a7be4c1d3d28ca766e5a2b957b',
'025a7e38c2834dd843591a4d23d5f09cdeb77ddca85f673c2d944a14220ff14cf7',
'0395e2731a1673ef21d7a16a727c4fc4d4c35a861c428ce2c819c53d2b81c8bd55',
@ -54,6 +69,14 @@ class NodesRoutes {
'039c14fdec2d958e3d14cebf657451bbd9e039196615785e82c917f274e3fb2205',
'033589bbcb233ffc416cefd5437c7f37e9d7cb7942d405e39e72c4c846d9b37f18',
'029293110441c6e2eacb57e1255bf6ef05c41a6a676fe474922d33c19f98a7d584',
'038eb09bed4532ff36d12acc1279f55cbe8d95212d19f809e057bb50de00051fba',
'027b7c0278366a0268e8bd0072b14539f6cb455a7bd588ae22d888bed541f65311',
'02f4dd78f6eda8838029b2cdbaaea6e875e2fa373cd348ee41a7c1bb177d3fca66',
'036b3fb692da214a3edaac5b67903b958f5ccd8712e09aa61b67ea7acfd94b40c2',
'023bc8915d308e0b65f8de6867f95960141372436fce3edad5cec3f364d6ac948f',
'0341690503ef21d0e203dddd9e62646380d0dfc32c499e055e7f698b9064d1c736',
'0355d573805c018a37a5b2288378d70e9b5b438f7394abd6f467cb9b47c90eeb93',
'0361aa68deb561a8b47b41165848edcccb98a1b56a5ea922d9d5b30a09bb7282ea',
'0235ad0b56ed8c42c4354444c24e971c05e769ec0b5fb0ccea42880095dc02ea2c',
'029700819a37afea630f80e6cc461f3fd3c4ace2598a21cfbbe64d1c78d0ee69a5',
'02c2d8b2dbf87c7894af2f1d321290e2fe6db5446cd35323987cee98f06e2e0075',
@ -64,6 +87,20 @@ class NodesRoutes {
break;
case 'signet':
nodesList = [
'029fe3621fc0c6e08056a14b868f8fb9acca1aa28a129512f6cea0f0d7654d9f92',
'02f60cd7a3a4f1c953dd9554a6ebd51a34f8b10b8124b7fc43a0b381139b55c883',
'03cbbf581774700865eebd1be42d022bc004ba30881274ab304e088a25d70e773d',
'0243348cb3741cfe2d8485fa8375c29c7bc7cbb67577c363cb6987a5e5fd0052cc',
'02cb73e631af44bee600d80f8488a9194c9dc5c7590e575c421a070d1be05bc8e9',
'0306f55ee631aa1e2cd4d9b2bfcbc14404faec5c541cef8b2e6f779061029d09c4',
'030bbbd8495561a894e301fe6ba5b22f8941fc661cc0e673e0206158231d8ac130',
'03ee1f08e516ed083475f39c6cae4fa1eec686d004d2f105218269e27d7f2da5a4',
'028c378b998f476ed22d6815c170dd2a3388a43fdf791a7cff70b9997349b8447a',
'036f19f044d19cb1b04f14d91b6e7e5443ce337217a8c14d43861f3e86dd07bd7f',
'03058d61869e8b88436493648b2e3e530627edf5a0b253c285cd565c1477a5c237',
'0279dfedc87b47a941f1797f2c422c03aa3108914ea6b519d76537d60860535a9a',
'0353486b8016761e58ec8aee7305ee58d5dc66b55ef5bd8cbaf49508f66d52d62e',
'03df5db8eccfabcae47ff15553cfdecb2d3f56979f43a0c3578f28d056b5e35104',
'03ddab321b760433cbf561b615ef62ac7d318630c5f51d523aaf5395b90b751956',
'033d92c7bfd213ef1b34c90e985fb5dc77f9ec2409d391492484e57a44c4aca1de',
'02ad010dda54253c1eb9efe38b0760657a3b43ecad62198c359c051c9d99d45781',
@ -76,6 +113,14 @@ class NodesRoutes {
'038310e3a786340f2bd7770704c7ccfe560fd163d9a1c99d67894597419d12cbf7',
'03e5e9d879b72c7d67ecd483bae023bd33e695bb32b981a4021260f7b9d62bc761',
'028d16e1a0ace4c0c0a421536d8d32ce484dfe6e2f726b7b0e7c30f12a195f8cc7',
'0326cf9a4ca67a5b9cdffae57293dbd6f7c5113b93010dc6f6fe4af3afde1a1739',
'034867e16f62cebb8c2c2c22b91117c173bbece9c8a1e5bd001374a3699551cd8f',
'038dfb1f1b637a8c27e342ffc6f9feca20e0b47be3244e09ae78df4998e2ae83b9',
'03cb1cea3394d973355c11bc61c2f689f9d3e1c3db60d205f27770f5ad83200f77',
'03535447b592cbdb153189b3e06a455452b1011380cb3e6511a31090c15d8efc9f',
'028e90e9984d262ebfa3c23fb3f335a2ae061a0bdedee03f45f72b438d9e7d2ce3',
'03ee0176289dc4a6111fa5ef22eed5273758c420fbe58cc1d2d76def75dd7e640c',
'0370b2cd9f0eaf436d5c25c93fb39210d8cc06b31f688fc2f54418aabe394aed79',
'02ff690d06c187ab994bf83c5a2114fe5bf50112c2c817af0f788f736be9fa2070',
'02a9f570c51a2526a5ee85802e88f9281bed771eb66a0c8a7d898430dd5d0eae45',
'038c3de773255d3bd7a50e31e58d423baac5c90826a74d75e64b74c95475de1097',
@ -86,6 +131,20 @@ class NodesRoutes {
break;
default:
nodesList = [
'02b12b889fe3c943cb05645921040ef13d6d397a2e7a4ad000e28500c505ff26d6',
'0302240ac9d71b39617cbde2764837ec3d6198bd6074b15b75d2ff33108e89d2e1',
'03364a8ace313376e5e4b68c954e287c6388e16df9e9fdbaf0363ecac41105cbf6',
'03229ab4b7f692753e094b93df90530150680f86b535b5183b0cffd75b3df583fc',
'03a696eb7acde991c1be97a58a9daef416659539ae462b897f5e9ae361f990228e',
'0248bf26cf3a63ab8870f34dc0ec9e6c8c6288cdba96ba3f026f34ec0f13ac4055',
'021b28ecdd782fd909705d6be354db268977b1a2ac5a5275186fc19e08bb8fca93',
'031bec1fbd8eb7fe94d2bda108c9c3cc8c22ecfc1c3a5c11d36f5881b01b4a81a6',
'03879c4f827a3188574d5757e002f574265a966d70aea942169785b31369b067d5',
'0228d4b5a4fd73a03967b76f8b8cb37b9d0b6e7039126a9397bb732c15bed78e9b',
'03f58dbb629f4427f5a1dbc02e6a7ec79345fdf13a0e4163d4f3b7aea2539cf095',
'021cdcb8123aa670cdfc9f43909dbb297363c093883409e9e7fc82e7267f7c72bd',
'02f2aa2c2b7b432a70dc4d0b04afa19d48715ed3b90594d49c1c8744f2e9ebb030',
'03709a02fb3ab4857689a8ea0bd489a6ab6f56f8a397be578bc6d5ad22efbe3756',
'03fbc17549ec667bccf397ababbcb4cdc0e3394345e4773079ab2774612ec9be61',
'03da9a8623241ccf95f19cd645c6cecd4019ac91570e976eb0a128bebbc4d8a437',
'03ca5340cf85cb2e7cf076e489f785410838de174e40be62723e8a60972ad75144',
@ -98,6 +157,14 @@ class NodesRoutes {
'02b6b1640fe029e304c216951af9fbefdb23b0bdc9baaf327540d31b6107841fdf',
'03694289827203a5b3156d753071ddd5bf92e371f5a462943f9555eef6d2d6606c',
'0283d850db7c3e8ea7cc9c4abc7afaab12bbdf72b677dcba1d608350d2537d7d43',
'03b4dda7878d3b7b71ecd6d4738322c7f9a9c1fb583374d2724f4ccc4947f37570',
'0279a35f05b5acf159429549e56fd426685c4fec191431c58738968bbc77a39f25',
'03cb102d796ddcf08610cd03fae8b7a1df69ff48e9e8a152af315f9edf71762eb8',
'036b89526f4d5ac4c317f4fd23cb9f8e4ad844498bc7950a41114d060101d995d4',
'0313eade145959d7036db009fd5b0bf1947a739c7c3c790b491ec9161b94e6ad1e',
'02b670ca4c4bb2c5ea89c3b691da98a194cfc48fcd5c072df02a20290bddd60610',
'02a9196d5e08598211397a83cf013a5962b84bd61198abfdd204dff987e54f7a0d',
'036d015cd2f486fb38348182980b7e596e6c9733873102ea126fed7b4152be03b8',
'02521287789f851268a39c9eccc9d6180d2c614315b583c9e6ae0addbd6d79df06',
'0258c2a7b7f8af2585b4411b1ec945f70988f30412bb1df179de941f14d0b1bc3e',
'03c3389ff1a896f84d921ed01a19fc99c6724ce8dc4b960cd3b7b2362b62cd60d7',
@ -115,13 +182,13 @@ class NodesRoutes {
}
} catch (e) {}
}
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(nodes);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get node group');
}
}
@ -129,7 +196,7 @@ class NodesRoutes {
try {
const node = await nodesApi.$getNode(req.params.public_key);
if (!node) {
res.status(404).send('Node not found');
handleError(req, res, 404, 'Node not found');
return;
}
res.header('Pragma', 'public');
@ -137,7 +204,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(node);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get node');
}
}
@ -149,7 +216,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(statistics);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical node stats');
}
}
@ -157,7 +224,7 @@ class NodesRoutes {
try {
const node = await nodesApi.$getFeeHistogram(req.params.public_key);
if (!node) {
res.status(404).send('Node not found');
handleError(req, res, 404, 'Node not found');
return;
}
res.header('Pragma', 'public');
@ -165,7 +232,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(node);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get fee histogram');
}
}
@ -181,7 +248,7 @@ class NodesRoutes {
topByChannels: topChannelsNodes,
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get nodes ranking');
}
}
@ -193,7 +260,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(topCapacityNodes);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get top nodes by capacity');
}
}
@ -205,7 +272,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(topCapacityNodes);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get top nodes by channels');
}
}
@ -217,7 +284,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(topCapacityNodes);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get oldest nodes');
}
}
@ -229,7 +296,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString());
res.json(nodesPerAs);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get ISP ranking');
}
}
@ -241,7 +308,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString());
res.json(worldNodes);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get world nodes');
}
}
@ -256,7 +323,7 @@ class NodesRoutes {
);
if (country.length === 0) {
res.status(404).send(`This country does not exist or does not host any lightning nodes on clearnet`);
handleError(req, res, 404, `This country does not exist or does not host any lightning nodes on clearnet`);
return;
}
@ -269,7 +336,7 @@ class NodesRoutes {
nodes: nodes,
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get nodes per country');
}
}
@ -283,7 +350,7 @@ class NodesRoutes {
);
if (isp.length === 0) {
res.status(404).send(`This ISP does not exist or does not host any lightning nodes on clearnet`);
handleError(req, res, 404, `This ISP does not exist or does not host any lightning nodes on clearnet`);
return;
}
@ -296,7 +363,7 @@ class NodesRoutes {
nodes: nodes,
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get nodes per ISP');
}
}
@ -308,7 +375,7 @@ class NodesRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString());
res.json(nodesPerAs);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get nodes per country');
}
}
}

View File

@ -1,23 +1,35 @@
import { MempoolBlock } from '../mempool.interfaces';
import { Common } from './common';
import config from '../config';
import mempool from './mempool';
import projectedBlocks from './mempool-blocks';
const isLiquid = config.MEMPOOL.NETWORK === 'liquid' || config.MEMPOOL.NETWORK === 'liquidtestnet';
interface RecommendedFees {
fastestFee: number,
halfHourFee: number,
hourFee: number,
economyFee: number,
minimumFee: number,
}
class FeeApi {
constructor() { }
defaultFee = Common.isLiquid() ? 0.1 : 1;
defaultFee = isLiquid ? 0.1 : 1;
minimumIncrement = isLiquid ? 0.1 : 1;
public getRecommendedFee() {
public getRecommendedFee(): RecommendedFees {
const pBlocks = projectedBlocks.getMempoolBlocks();
const mPool = mempool.getMempoolInfo();
const minimumFee = Math.ceil(mPool.mempoolminfee * 100000);
const minimumFee = this.roundUpToNearest(mPool.mempoolminfee * 100000, this.minimumIncrement);
const defaultMinFee = Math.max(minimumFee, this.defaultFee);
if (!pBlocks.length) {
return {
'fastestFee': this.defaultFee,
'halfHourFee': this.defaultFee,
'hourFee': this.defaultFee,
'fastestFee': defaultMinFee,
'halfHourFee': defaultMinFee,
'hourFee': defaultMinFee,
'economyFee': minimumFee,
'minimumFee': minimumFee,
};
@ -27,11 +39,25 @@ class FeeApi {
const secondMedianFee = pBlocks[1] ? this.optimizeMedianFee(pBlocks[1], pBlocks[2], firstMedianFee) : this.defaultFee;
const thirdMedianFee = pBlocks[2] ? this.optimizeMedianFee(pBlocks[2], pBlocks[3], secondMedianFee) : this.defaultFee;
let fastestFee = Math.max(minimumFee, firstMedianFee);
let halfHourFee = Math.max(minimumFee, secondMedianFee);
let hourFee = Math.max(minimumFee, thirdMedianFee);
const economyFee = Math.max(minimumFee, Math.min(2 * minimumFee, thirdMedianFee));
// ensure recommendations always increase w/ priority
fastestFee = Math.max(fastestFee, halfHourFee, hourFee, economyFee);
halfHourFee = Math.max(halfHourFee, hourFee, economyFee);
hourFee = Math.max(hourFee, economyFee);
// explicitly enforce a minimum of ceil(mempoolminfee) on all recommendations.
// simply rounding up recommended rates is insufficient, as the purging rate
// can exceed the median rate of projected blocks in some extreme scenarios
// (see https://bitcoin.stackexchange.com/a/120024)
return {
'fastestFee': firstMedianFee,
'halfHourFee': secondMedianFee,
'hourFee': thirdMedianFee,
'economyFee': Math.min(2 * minimumFee, thirdMedianFee),
'fastestFee': fastestFee,
'halfHourFee': halfHourFee,
'hourFee': hourFee,
'economyFee': economyFee,
'minimumFee': minimumFee,
};
}
@ -45,7 +71,11 @@ class FeeApi {
const multiplier = (pBlock.blockVSize - 500000) / 500000;
return Math.max(Math.round(useFee * multiplier), this.defaultFee);
}
return Math.ceil(useFee);
return this.roundUpToNearest(useFee, this.minimumIncrement);
}
private roundUpToNearest(value: number, nearest: number): number {
return Math.ceil(value / nearest) * nearest;
}
}

View File

@ -44,9 +44,13 @@ export enum FeatureBits {
KeysendOptional = 55,
ScriptEnforcedLeaseRequired = 2022,
ScriptEnforcedLeaseOptional = 2023,
SimpleTaprootChannelsRequiredFinal = 80,
SimpleTaprootChannelsOptionalFinal = 81,
SimpleTaprootChannelsRequiredStaging = 180,
SimpleTaprootChannelsOptionalStaging = 181,
MaxBolt11Feature = 5114,
};
export const FeaturesMap = new Map<FeatureBits, string>([
[FeatureBits.DataLossProtectRequired, 'data-loss-protect'],
[FeatureBits.DataLossProtectOptional, 'data-loss-protect'],
@ -85,6 +89,10 @@ export const FeaturesMap = new Map<FeatureBits, string>([
[FeatureBits.ZeroConfOptional, 'zero-conf'],
[FeatureBits.ShutdownAnySegwitRequired, 'shutdown-any-segwit'],
[FeatureBits.ShutdownAnySegwitOptional, 'shutdown-any-segwit'],
[FeatureBits.SimpleTaprootChannelsRequiredFinal, 'taproot-channels'],
[FeatureBits.SimpleTaprootChannelsOptionalFinal, 'taproot-channels'],
[FeatureBits.SimpleTaprootChannelsRequiredStaging, 'taproot-channels-staging'],
[FeatureBits.SimpleTaprootChannelsOptionalStaging, 'taproot-channels-staging'],
]);
/**
@ -217,7 +225,7 @@ async function buildFullChannel(clChannelA: any, clChannelB: any): Promise<ILigh
return {
channel_id: Common.channelShortIdToIntegerId(clChannelA.short_channel_id),
capacity: clChannelA.satoshis,
capacity: (clChannelA.amount_msat / 1000).toString(),
last_update: lastUpdate,
node1_policy: convertPolicy(clChannelA),
node2_policy: convertPolicy(clChannelB),
@ -241,7 +249,7 @@ async function buildIncompleteChannel(clChannel: any): Promise<ILightningApi.Cha
return {
channel_id: Common.channelShortIdToIntegerId(clChannel.short_channel_id),
capacity: clChannel.satoshis,
capacity: (clChannel.amount_msat / 1000).toString(),
last_update: clChannel.last_update ?? 0,
node1_policy: convertPolicy(clChannel),
node2_policy: null,
@ -257,8 +265,8 @@ async function buildIncompleteChannel(clChannel: any): Promise<ILightningApi.Cha
function convertPolicy(clChannel: any): ILightningApi.RoutingPolicy {
return {
time_lock_delta: clChannel.delay,
min_htlc: clChannel.htlc_minimum_msat.slice(0, -4),
max_htlc_msat: clChannel.htlc_maximum_msat.slice(0, -4),
min_htlc: clChannel.htlc_minimum_msat.toString(),
max_htlc_msat: clChannel.htlc_maximum_msat.toString(),
fee_base_msat: clChannel.base_fee_millisatoshi,
fee_rate_milli_msat: clChannel.fee_per_millionth,
disabled: !clChannel.active,

View File

@ -5,8 +5,12 @@ import { Common } from '../common';
import DB from '../../database';
import logger from '../../logger';
const federationChangeAddresses = ['bc1qxvay4an52gcghxq5lavact7r6qe9l4laedsazz8fj2ee2cy47tlqff4aj4', '3EiAcrzq1cELXScc98KeCswGWZaPGceT1d'];
const auditBlockOffsetWithTip = 1; // Wait for 1 block confirmation before processing the block in the audit process to reduce the risk of reorgs
class ElementsParser {
private isRunning = false;
private isUtxosUpdatingRunning = false;
constructor() { }
@ -32,12 +36,6 @@ class ElementsParser {
}
}
public async $getPegDataByMonth(): Promise<any> {
const query = `SELECT SUM(amount) AS amount, DATE_FORMAT(FROM_UNIXTIME(datetime), '%Y-%m-01') AS date FROM elements_pegs GROUP BY DATE_FORMAT(FROM_UNIXTIME(datetime), '%Y%m')`;
const [rows] = await DB.query(query);
return rows;
}
protected async $parseBlock(block: IBitcoinApi.Block) {
for (const tx of block.tx) {
await this.$parseInputs(tx, block);
@ -55,29 +53,30 @@ class ElementsParser {
protected async $parsePegIn(input: IBitcoinApi.Vin, vindex: number, txid: string, block: IBitcoinApi.Block) {
const bitcoinTx: IBitcoinApi.Transaction = await bitcoinSecondClient.getRawTransaction(input.txid, true);
const bitcoinBlock: IBitcoinApi.Block = await bitcoinSecondClient.getBlock(bitcoinTx.blockhash);
const prevout = bitcoinTx.vout[input.vout || 0];
const outputAddress = prevout.scriptPubKey.address || (prevout.scriptPubKey.addresses && prevout.scriptPubKey.addresses[0]) || '';
await this.$savePegToDatabase(block.height, block.time, prevout.value * 100000000, txid, vindex,
outputAddress, bitcoinTx.txid, prevout.n, 1);
outputAddress, bitcoinTx.txid, prevout.n, bitcoinBlock.height, bitcoinBlock.time, 1);
}
protected async $parseOutputs(tx: IBitcoinApi.Transaction, block: IBitcoinApi.Block) {
for (const output of tx.vout) {
if (output.scriptPubKey.pegout_chain) {
await this.$savePegToDatabase(block.height, block.time, 0 - output.value * 100000000, tx.txid, output.n,
(output.scriptPubKey.pegout_addresses && output.scriptPubKey.pegout_addresses[0] || ''), '', 0, 0);
(output.scriptPubKey.pegout_address || ''), '', 0, 0, 0, 0);
}
if (!output.scriptPubKey.pegout_chain && output.scriptPubKey.type === 'nulldata'
&& output.value && output.value > 0 && output.asset && output.asset === Common.nativeAssetId) {
await this.$savePegToDatabase(block.height, block.time, 0 - output.value * 100000000, tx.txid, output.n,
(output.scriptPubKey.pegout_addresses && output.scriptPubKey.pegout_addresses[0] || ''), '', 0, 1);
(output.scriptPubKey.pegout_address || ''), '', 0, 0, 0, 1);
}
}
}
protected async $savePegToDatabase(height: number, blockTime: number, amount: number, txid: string,
txindex: number, bitcoinaddress: string, bitcointxid: string, bitcoinindex: number, final_tx: number): Promise<void> {
const query = `INSERT INTO elements_pegs(
txindex: number, bitcoinaddress: string, bitcointxid: string, bitcoinindex: number, bitcoinblock: number, bitcoinBlockTime: number, final_tx: number): Promise<void> {
const query = `INSERT IGNORE INTO elements_pegs(
block, datetime, amount, txid, txindex, bitcoinaddress, bitcointxid, bitcoinindex, final_tx
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`;
@ -85,7 +84,22 @@ class ElementsParser {
height, blockTime, amount, txid, txindex, bitcoinaddress, bitcointxid, bitcoinindex, final_tx
];
await DB.query(query, params);
logger.debug(`Saved L-BTC peg from block height #${height} with TXID ${txid}.`);
logger.debug(`Saved L-BTC peg from Liquid block height #${height} with TXID ${txid}.`);
if (amount > 0) { // Peg-in
// Add the address to the federation addresses table
await DB.query(`INSERT IGNORE INTO federation_addresses (bitcoinaddress) VALUES (?)`, [bitcoinaddress]);
// Add the UTXO to the federation txos table
const query_utxos = `INSERT IGNORE INTO federation_txos (txid, txindex, bitcoinaddress, amount, blocknumber, blocktime, unspent, lastblockupdate, lasttimeupdate, timelock, expiredAt, emergencyKey, pegtxid, pegindex, pegblocktime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
const params_utxos: (string | number)[] = [bitcointxid, bitcoinindex, bitcoinaddress, amount, bitcoinblock, bitcoinBlockTime, 1, bitcoinblock - 1, 0, 4032, 0, 0, txid, txindex, blockTime];
await DB.query(query_utxos, params_utxos);
const [minBlockUpdate] = await DB.query(`SELECT MIN(lastblockupdate) AS lastblockupdate FROM federation_txos WHERE unspent = 1`)
await this.$saveLastBlockAuditToDatabase(minBlockUpdate[0]['lastblockupdate']);
logger.debug(`Saved new Federation UTXO ${bitcointxid}:${bitcoinindex} belonging to ${bitcoinaddress} to federation txos`);
}
}
protected async $getLatestBlockHeightFromDatabase(): Promise<number> {
@ -98,6 +112,382 @@ class ElementsParser {
const query = `UPDATE state SET number = ? WHERE name = 'last_elements_block'`;
await DB.query(query, [blockHeight]);
}
///////////// FEDERATION AUDIT //////////////
public async $updateFederationUtxos() {
if (this.isUtxosUpdatingRunning) {
return;
}
this.isUtxosUpdatingRunning = true;
try {
let auditProgress = await this.$getAuditProgress();
// If no peg in transaction was found in the database, return
if (!auditProgress.lastBlockAudit) {
logger.debug(`No Federation UTXOs found in the database. Waiting for some to be confirmed before starting the Federation UTXOs audit`);
this.isUtxosUpdatingRunning = false;
return;
}
const bitcoinBlocksToSync = await this.$getBitcoinBlockchainState();
// If the bitcoin blockchain is not synced yet, return
if (bitcoinBlocksToSync.bitcoinHeaders > bitcoinBlocksToSync.bitcoinBlocks + 1) {
logger.debug(`Bitcoin client is not synced yet. ${bitcoinBlocksToSync.bitcoinHeaders - bitcoinBlocksToSync.bitcoinBlocks} blocks remaining to sync before the Federation audit process can start`);
this.isUtxosUpdatingRunning = false;
return;
}
auditProgress.lastBlockAudit++;
// Logging
let indexedThisRun = 0;
let timer = Date.now() / 1000;
const startedAt = Date.now() / 1000;
const indexingSpeeds: number[] = [];
while (auditProgress.lastBlockAudit <= auditProgress.confirmedTip) {
// First, get the current UTXOs that need to be scanned in the block
const utxos = await this.$getFederationUtxosToScan(auditProgress.lastBlockAudit);
// Get the peg-out addresses that need to be scanned
const redeemAddresses = await this.$getRedeemAddressesToScan();
// The fast way: check if these UTXOs are still unspent as of the current block with gettxout
let spentAsTip: any[];
let unspentAsTip: any[];
if (auditProgress.confirmedTip - auditProgress.lastBlockAudit <= 150) { // If the audit status is not too far in the past, we can use gettxout (fast way)
const utxosToParse = await this.$getFederationUtxosToParse(utxos);
spentAsTip = utxosToParse.spentAsTip;
unspentAsTip = utxosToParse.unspentAsTip;
logger.debug(`Found ${utxos.length} Federation UTXOs and ${redeemAddresses.length} Peg-Out Addresses to scan in Bitcoin block height #${auditProgress.lastBlockAudit} / #${auditProgress.confirmedTip}`);
logger.debug(`${unspentAsTip.length} / ${utxos.length} Federation UTXOs are unspent as of tip`);
} else { // If the audit status is too far in the past, it is useless and wasteful to look for still unspent txos since they will all be spent as of the tip
spentAsTip = utxos;
unspentAsTip = [];
// Logging
const elapsedSeconds = (Date.now() / 1000) - timer;
if (elapsedSeconds > 5) {
const runningFor = (Date.now() / 1000) - startedAt;
const blockPerSeconds = indexedThisRun / elapsedSeconds;
indexingSpeeds.push(blockPerSeconds);
if (indexingSpeeds.length > 100) indexingSpeeds.shift(); // Keep the length of the up to 100 last indexing speeds
const meanIndexingSpeed = indexingSpeeds.reduce((a, b) => a + b, 0) / indexingSpeeds.length;
const eta = (auditProgress.confirmedTip - auditProgress.lastBlockAudit) / meanIndexingSpeed;
logger.debug(`Scanning ${utxos.length} Federation UTXOs and ${redeemAddresses.length} Peg-Out Addresses at Bitcoin block height #${auditProgress.lastBlockAudit} / #${auditProgress.confirmedTip} | ~${meanIndexingSpeed.toFixed(2)} blocks/sec | elapsed: ${(runningFor / 60).toFixed(0)} minutes | ETA: ${(eta / 60).toFixed(0)} minutes`);
timer = Date.now() / 1000;
indexedThisRun = 0;
}
}
// The slow way: parse the block to look for the spending tx
const blockHash: IBitcoinApi.ChainTips = await bitcoinSecondClient.getBlockHash(auditProgress.lastBlockAudit);
const block: IBitcoinApi.Block = await bitcoinSecondClient.getBlock(blockHash, 2);
await this.$parseBitcoinBlock(block, spentAsTip, unspentAsTip, auditProgress.confirmedTip, redeemAddresses);
// Finally, update the lastblockupdate of the remaining UTXOs and save to the database
const [minBlockUpdate] = await DB.query(`SELECT MIN(lastblockupdate) AS lastblockupdate FROM federation_txos WHERE unspent = 1`)
await this.$saveLastBlockAuditToDatabase(minBlockUpdate[0]['lastblockupdate']);
auditProgress = await this.$getAuditProgress();
auditProgress.lastBlockAudit++;
indexedThisRun++;
}
this.isUtxosUpdatingRunning = false;
} catch (e) {
this.isUtxosUpdatingRunning = false;
throw new Error(e instanceof Error ? e.message : 'Error');
}
}
// Get the UTXOs that need to be scanned in block height (UTXOs that were last updated in the block height - 1)
protected async $getFederationUtxosToScan(height: number) {
const query = `SELECT txid, txindex, bitcoinaddress, amount, blocknumber, timelock, expiredAt FROM federation_txos WHERE lastblockupdate = ? AND unspent = 1`;
const [rows] = await DB.query(query, [height - 1]);
return rows as any[];
}
// Returns the UTXOs that are spent as of tip and need to be scanned
protected async $getFederationUtxosToParse(utxos: any[]): Promise<any> {
const spentAsTip: any[] = [];
const unspentAsTip: any[] = [];
for (const utxo of utxos) {
const result = await bitcoinSecondClient.getTxOut(utxo.txid, utxo.txindex, false);
result ? unspentAsTip.push(utxo) : spentAsTip.push(utxo);
}
return {spentAsTip, unspentAsTip};
}
protected async $parseBitcoinBlock(block: IBitcoinApi.Block, spentAsTip: any[], unspentAsTip: any[], confirmedTip: number, redeemAddressesData: any[] = []) {
const redeemAddresses: string[] = redeemAddressesData.map(redeemAddress => redeemAddress.bitcoinaddress);
for (const tx of block.tx) {
let mightRedeemInThisTx = false;
// Check if the Federation UTXOs that was spent as of tip are spent in this block
for (const input of tx.vin) {
const txo = spentAsTip.find(txo => txo.txid === input.txid && txo.txindex === input.vout);
if (txo) {
mightRedeemInThisTx = true; // A Federation UTXO is spent in this block: we might find a peg-out address in the outputs
if (txo.expiredAt > 0 ) {
if (input.txinwitness?.length !== 13) { // Check if the witness data of the input contains the 11 signatures: if it doesn't, emergency keys are being used
await DB.query(`UPDATE federation_txos SET unspent = 0, lastblockupdate = ?, lasttimeupdate = ?, emergencyKey = 1 WHERE txid = ? AND txindex = ?`, [block.height, block.time, txo.txid, txo.txindex]);
logger.debug(`Expired Federation UTXO ${txo.txid}:${txo.txindex} (${txo.amount} sats) was spent in block ${block.height} using emergency keys!`);
} else {
await DB.query(`UPDATE federation_txos SET unspent = 0, lastblockupdate = ?, lasttimeupdate = ? WHERE txid = ? AND txindex = ?`, [block.height, block.time, txo.txid, txo.txindex]);
logger.debug(`Expired Federation UTXO ${txo.txid}:${txo.txindex} (${txo.amount} sats) was spent in block ${block.height} using regular 11-of-15 signatures`);
}
} else {
await DB.query(`UPDATE federation_txos SET unspent = 0, lastblockupdate = ?, lasttimeupdate = ? WHERE txid = ? AND txindex = ?`, [block.height, block.time, txo.txid, txo.txindex]);
logger.debug(`Federation UTXO ${txo.txid}:${txo.txindex} (${txo.amount} sats) was spent in block ${block.height}`);
}
// Remove the TXO from the utxo array
spentAsTip.splice(spentAsTip.indexOf(txo), 1);
}
}
// Check if an output is sent to a change address of the federation
for (const output of tx.vout) {
if (output.scriptPubKey.address && federationChangeAddresses.includes(output.scriptPubKey.address)) {
// Check that the UTXO was not already added in the DB by previous scans
const [rows_check] = await DB.query(`SELECT txid FROM federation_txos WHERE txid = ? AND txindex = ?`, [tx.txid, output.n]) as any[];
if (rows_check.length === 0) {
const timelock = output.scriptPubKey.address === federationChangeAddresses[0] ? 4032 : 2016; // P2WSH change address has a 4032 timelock, P2SH change address has a 2016 timelock
const query_utxos = `INSERT INTO federation_txos (txid, txindex, bitcoinaddress, amount, blocknumber, blocktime, unspent, lastblockupdate, lasttimeupdate, timelock, expiredAt, emergencyKey, pegtxid, pegindex, pegblocktime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
const params_utxos: (string | number)[] = [tx.txid, output.n, output.scriptPubKey.address, output.value * 100000000, block.height, block.time, 1, block.height, 0, timelock, 0, 0, '', 0, 0];
await DB.query(query_utxos, params_utxos);
// Add the UTXO to the utxo array
spentAsTip.push({
txid: tx.txid,
txindex: output.n,
bitcoinaddress: output.scriptPubKey.address,
amount: output.value * 100000000,
blocknumber: block.height,
timelock: timelock,
expiredAt: 0,
});
logger.debug(`Added new Federation UTXO ${tx.txid}:${output.n} (${Math.round(output.value * 100000000)} sats), change address: ${output.scriptPubKey.address}`);
}
}
if (mightRedeemInThisTx && output.scriptPubKey.address && redeemAddresses.includes(output.scriptPubKey.address)) {
// Find the number of times output.scriptPubKey.address appears in redeemAddresses. There can be address reuse for peg-outs...
const matchingAddress: any[] = redeemAddressesData.filter(redeemAddress => redeemAddress.bitcoinaddress === output.scriptPubKey.address && -redeemAddress.amount === Math.round(output.value * 100000000));
if (matchingAddress.length > 0) {
if (matchingAddress.length > 1) {
// If there are more than one peg out address with the same amount, we can't know which one redeemed the UTXO: we take the oldest one
matchingAddress.sort((a, b) => a.datetime - b.datetime);
logger.debug(`Found redeem txid ${tx.txid}:${output.n} to peg-out address ${matchingAddress[0].bitcoinaddress}, amount ${matchingAddress[0].amount}, datetime ${matchingAddress[0].datetime}`);
} else {
logger.debug(`Found redeem txid ${tx.txid}:${output.n} to peg-out address ${matchingAddress[0].bitcoinaddress}, amount ${matchingAddress[0].amount}`);
}
const query_add_redeem = `UPDATE elements_pegs SET bitcointxid = ?, bitcoinindex = ? WHERE bitcoinaddress = ? AND amount = ? AND datetime = ?`;
const params_add_redeem: (string | number)[] = [tx.txid, output.n, matchingAddress[0].bitcoinaddress, matchingAddress[0].amount, matchingAddress[0].datetime];
await DB.query(query_add_redeem, params_add_redeem);
const index = redeemAddressesData.indexOf(matchingAddress[0]);
redeemAddressesData.splice(index, 1);
redeemAddresses.splice(index, 1);
} else { // The output amount does not match the peg-out amount... log it
logger.debug(`Found redeem txid ${tx.txid}:${output.n} to peg-out address ${output.scriptPubKey.address} but output amount ${Math.round(output.value * 100000000)} does not match the peg-out amount!`);
}
}
}
}
for (const utxo of spentAsTip) {
if (utxo.expiredAt === 0 && block.height >= utxo.blocknumber + utxo.timelock) { // The UTXO is expiring in this block
await DB.query(`UPDATE federation_txos SET lastblockupdate = ?, expiredAt = ? WHERE txid = ? AND txindex = ?`, [block.height, block.time, utxo.txid, utxo.txindex]);
} else {
await DB.query(`UPDATE federation_txos SET lastblockupdate = ? WHERE txid = ? AND txindex = ?`, [block.height, utxo.txid, utxo.txindex]);
}
}
for (const utxo of unspentAsTip) {
if (utxo.expiredAt === 0 && block.height >= utxo.blocknumber + utxo.timelock) { // The UTXO is expiring in this block
await DB.query(`UPDATE federation_txos SET unspent = 0, lastblockupdate = ?, expiredAt = ? WHERE txid = ? AND txindex = ?`, [confirmedTip, block.time, utxo.txid, utxo.txindex]);
} else if (utxo.expiredAt === 0 && confirmedTip >= utxo.blocknumber + utxo.timelock) { // The UTXO is expiring before the tip: we need to keep track of it
await DB.query(`UPDATE federation_txos SET lastblockupdate = ? WHERE txid = ? AND txindex = ?`, [utxo.blocknumber + utxo.timelock - 1, utxo.txid, utxo.txindex]);
} else {
await DB.query(`UPDATE federation_txos SET lastblockupdate = ? WHERE txid = ? AND txindex = ?`, [confirmedTip, utxo.txid, utxo.txindex]);
}
}
}
protected async $saveLastBlockAuditToDatabase(blockHeight: number) {
const query = `UPDATE state SET number = ? WHERE name = 'last_bitcoin_block_audit'`;
await DB.query(query, [blockHeight]);
}
// Get the bitcoin block where the audit process was last updated
protected async $getAuditProgress(): Promise<any> {
const lastblockaudit = await this.$getLastBlockAudit();
const bitcoinBlocksToSync = await this.$getBitcoinBlockchainState();
return {
lastBlockAudit: lastblockaudit,
confirmedTip: bitcoinBlocksToSync.bitcoinBlocks - auditBlockOffsetWithTip,
};
}
// Get the bitcoin blocks remaining to be synced
protected async $getBitcoinBlockchainState(): Promise<any> {
const result = await bitcoinSecondClient.getBlockchainInfo();
return {
bitcoinBlocks: result.blocks,
bitcoinHeaders: result.headers,
}
}
protected async $getLastBlockAudit(): Promise<number> {
const query = `SELECT number FROM state WHERE name = 'last_bitcoin_block_audit'`;
const [rows] = await DB.query(query);
return rows[0]['number'];
}
protected async $getRedeemAddressesToScan(): Promise<any[]> {
const query = `SELECT datetime, amount, bitcoinaddress FROM elements_pegs where amount < 0 AND bitcoinaddress != '' AND bitcointxid = '';`;
const [rows]: any[] = await DB.query(query);
return rows;
}
protected isDust(amount: number, feeRate: number): boolean {
return amount <= (450 * feeRate); // A P2WSH 11-of-15 multisig input is around 450 bytes
}
///////////// DATA QUERY //////////////
public async $getAuditStatus(): Promise<any> {
const lastBlockAudit = await this.$getLastBlockAudit();
const bitcoinBlocksToSync = await this.$getBitcoinBlockchainState();
return {
bitcoinBlocks: bitcoinBlocksToSync.bitcoinBlocks,
bitcoinHeaders: bitcoinBlocksToSync.bitcoinHeaders,
lastBlockAudit: lastBlockAudit,
isAuditSynced: bitcoinBlocksToSync.bitcoinHeaders - bitcoinBlocksToSync.bitcoinBlocks <= 2 && bitcoinBlocksToSync.bitcoinBlocks - lastBlockAudit <= 3,
};
}
public async $getPegDataByMonth(): Promise<any> {
const query = `SELECT SUM(amount) AS amount, DATE_FORMAT(FROM_UNIXTIME(datetime), '%Y-%m-01') AS date FROM elements_pegs GROUP BY DATE_FORMAT(FROM_UNIXTIME(datetime), '%Y%m')`;
const [rows] = await DB.query(query);
return rows;
}
public async $getFederationReservesByMonth(): Promise<any> {
const query = `
SELECT SUM(amount) AS amount, DATE_FORMAT(FROM_UNIXTIME(blocktime), '%Y-%m-01') AS date FROM federation_txos
WHERE
(blocktime > UNIX_TIMESTAMP(LAST_DAY(FROM_UNIXTIME(blocktime) - INTERVAL 1 MONTH) + INTERVAL 1 DAY))
AND
((unspent = 1) OR (unspent = 0 AND lasttimeupdate > UNIX_TIMESTAMP(LAST_DAY(FROM_UNIXTIME(blocktime)) + INTERVAL 1 DAY)))
AND
(expiredAt = 0 OR expiredAt > UNIX_TIMESTAMP(LAST_DAY(FROM_UNIXTIME(blocktime)) + INTERVAL 1 DAY))
GROUP BY
date;`;
const [rows] = await DB.query(query);
return rows;
}
// Get the current L-BTC pegs and the last Liquid block it was updated
public async $getCurrentLbtcSupply(): Promise<any> {
const [rows] = await DB.query(`SELECT SUM(amount) AS LBTC_supply FROM elements_pegs;`);
const lastblockupdate = await this.$getLatestBlockHeightFromDatabase();
const hash = await bitcoinClient.getBlockHash(lastblockupdate);
return {
amount: rows[0]['LBTC_supply'],
lastBlockUpdate: lastblockupdate,
hash: hash
};
}
// Get the current reserves of the federation and the last Bitcoin block it was updated
public async $getCurrentFederationReserves(): Promise<any> {
const [rows] = await DB.query(`SELECT SUM(amount) AS total_balance FROM federation_txos WHERE unspent = 1 AND expiredAt = 0;`);
const lastblockaudit = await this.$getLastBlockAudit();
const hash = await bitcoinSecondClient.getBlockHash(lastblockaudit);
return {
amount: rows[0]['total_balance'],
lastBlockUpdate: lastblockaudit,
hash: hash
};
}
// Get all of the federation addresses, most balances first
public async $getFederationAddresses(): Promise<any> {
const query = `SELECT bitcoinaddress, SUM(amount) AS balance FROM federation_txos WHERE unspent = 1 AND expiredAt = 0 GROUP BY bitcoinaddress ORDER BY balance DESC;`;
const [rows] = await DB.query(query);
return rows;
}
// Get all of the UTXOs held by the federation, most recent first
public async $getFederationUtxos(): Promise<any> {
const query = `SELECT txid, txindex, bitcoinaddress, amount, blocknumber, blocktime, pegtxid, pegindex, pegblocktime, timelock, expiredAt FROM federation_txos WHERE unspent = 1 AND expiredAt = 0 ORDER BY blocktime DESC;`;
const [rows] = await DB.query(query);
return rows;
}
// Get expired UTXOs, most recent first
public async $getExpiredUtxos(): Promise<any> {
const query = `SELECT txid, txindex, bitcoinaddress, amount, blocknumber, blocktime, pegtxid, pegindex, pegblocktime, timelock, expiredAt FROM federation_txos WHERE unspent = 1 AND expiredAt > 0 ORDER BY blocktime DESC;`;
const [rows]: any[] = await DB.query(query);
const feeRate = Math.round((await bitcoinSecondClient.estimateSmartFee(1)).feerate * 100000000 / 1000);
for (const row of rows) {
row.isDust = this.isDust(row.amount, feeRate);
}
return rows;
}
// Get utxos that were spent using emergency keys
public async $getEmergencySpentUtxos(): Promise<any> {
const query = `SELECT txid, txindex, bitcoinaddress, amount, blocknumber, blocktime, pegtxid, pegindex, pegblocktime, timelock, expiredAt FROM federation_txos WHERE emergencyKey = 1 ORDER BY blocktime DESC;`;
const [rows] = await DB.query(query);
return rows;
}
// Get the total number of federation addresses
public async $getFederationAddressesNumber(): Promise<any> {
const query = `SELECT COUNT(DISTINCT bitcoinaddress) AS address_count FROM federation_txos WHERE unspent = 1 AND expiredAt = 0;`;
const [rows] = await DB.query(query);
return rows[0];
}
// Get the total number of federation utxos
public async $getFederationUtxosNumber(): Promise<any> {
const query = `SELECT COUNT(*) AS utxo_count FROM federation_txos WHERE unspent = 1 AND expiredAt = 0;`;
const [rows] = await DB.query(query);
return rows[0];
}
// Get the total number of emergency spent utxos and their total amount
public async $getEmergencySpentUtxosStats(): Promise<any> {
const query = `SELECT COUNT(*) AS utxo_count, SUM(amount) AS total_amount FROM federation_txos WHERE emergencyKey = 1;`;
const [rows] = await DB.query(query);
return rows[0];
}
// Get recent pegs in / out
public async $getPegsList(count: number = 0): Promise<any> {
const query = `SELECT txid, txindex, amount, bitcoinaddress, bitcointxid, bitcoinindex, datetime AS blocktime FROM elements_pegs ORDER BY block DESC LIMIT 15 OFFSET ?;`;
const [rows] = await DB.query(query, [count]);
return rows;
}
// Get all peg in / out from the last month
public async $getPegsVolumeDaily(): Promise<any> {
const pegInQuery = await DB.query(`SELECT SUM(amount) AS volume, COUNT(*) AS number FROM elements_pegs WHERE amount > 0 and datetime > UNIX_TIMESTAMP(TIMESTAMPADD(DAY, -1, CURRENT_TIMESTAMP()));`);
const pegOutQuery = await DB.query(`SELECT SUM(amount) AS volume, COUNT(*) AS number FROM elements_pegs WHERE amount < 0 and datetime > UNIX_TIMESTAMP(TIMESTAMPADD(DAY, -1, CURRENT_TIMESTAMP()));`);
return [
pegInQuery[0][0],
pegOutQuery[0][0]
];
}
// Get the total pegs number
public async $getPegsCount(): Promise<any> {
const [rows] = await DB.query(`SELECT COUNT(*) AS pegs_count FROM elements_pegs;`);
return rows[0];
}
}
export default new ElementsParser();

View File

@ -3,6 +3,7 @@ import { Application, Request, Response } from 'express';
import config from '../../config';
import elementsParser from './elements-parser';
import icons from './icons';
import { handleError } from '../../utils/api';
class LiquidRoutes {
public initRoutes(app: Application) {
@ -15,7 +16,21 @@ class LiquidRoutes {
if (config.DATABASE.ENABLED) {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs', this.$getElementsPegs)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs/month', this.$getElementsPegsByMonth)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs/list/:count', this.$getPegsList)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs/volume', this.$getPegsVolumeDaily)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs/count', this.$getPegsCount)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves', this.$getFederationReserves)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/month', this.$getFederationReservesByMonth)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/addresses', this.$getFederationAddresses)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/addresses/total', this.$getFederationAddressesNumber)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/utxos', this.$getFederationUtxos)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/utxos/total', this.$getFederationUtxosNumber)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/utxos/expired', this.$getExpiredUtxos)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/utxos/emergency-spent', this.$getEmergencySpentUtxos)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/utxos/emergency-spent/stats', this.$getEmergencySpentUtxosStats)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/status', this.$getFederationAuditStatus)
;
}
}
@ -28,7 +43,7 @@ class LiquidRoutes {
res.setHeader('content-length', result.length);
res.send(result);
} else {
res.status(404).send('Asset icon not found');
handleError(req, res, 404, 'Asset icon not found');
}
}
@ -37,7 +52,7 @@ class LiquidRoutes {
if (result) {
res.json(result);
} else {
res.status(404).send('Asset icons not found');
handleError(req, res, 404, 'Asset icons not found');
}
}
@ -63,11 +78,183 @@ class LiquidRoutes {
private async $getElementsPegsByMonth(req: Request, res: Response) {
try {
const pegs = await elementsParser.$getPegDataByMonth();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60 * 60).toUTCString());
res.json(pegs);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get pegs by month');
}
}
private async $getFederationReservesByMonth(req: Request, res: Response) {
try {
const reserves = await elementsParser.$getFederationReservesByMonth();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60 * 60).toUTCString());
res.json(reserves);
} catch (e) {
handleError(req, res, 500, 'Failed to get reserves by month');
}
}
private async $getElementsPegs(req: Request, res: Response) {
try {
const currentSupply = await elementsParser.$getCurrentLbtcSupply();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(currentSupply);
} catch (e) {
handleError(req, res, 500, 'Failed to get pegs');
}
}
private async $getFederationReserves(req: Request, res: Response) {
try {
const currentReserves = await elementsParser.$getCurrentFederationReserves();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(currentReserves);
} catch (e) {
handleError(req, res, 500, 'Failed to get reserves');
}
}
private async $getFederationAuditStatus(req: Request, res: Response) {
try {
const auditStatus = await elementsParser.$getAuditStatus();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(auditStatus);
} catch (e) {
handleError(req, res, 500, 'Failed to get federation audit status');
}
}
private async $getFederationAddresses(req: Request, res: Response) {
try {
const federationAddresses = await elementsParser.$getFederationAddresses();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(federationAddresses);
} catch (e) {
handleError(req, res, 500, 'Failed to get federation addresses');
}
}
private async $getFederationAddressesNumber(req: Request, res: Response) {
try {
const federationAddresses = await elementsParser.$getFederationAddressesNumber();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(federationAddresses);
} catch (e) {
handleError(req, res, 500, 'Failed to get federation addresses');
}
}
private async $getFederationUtxos(req: Request, res: Response) {
try {
const federationUtxos = await elementsParser.$getFederationUtxos();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(federationUtxos);
} catch (e) {
handleError(req, res, 500, 'Failed to get federation utxos');
}
}
private async $getExpiredUtxos(req: Request, res: Response) {
try {
const expiredUtxos = await elementsParser.$getExpiredUtxos();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(expiredUtxos);
} catch (e) {
handleError(req, res, 500, 'Failed to get expired utxos');
}
}
private async $getFederationUtxosNumber(req: Request, res: Response) {
try {
const federationUtxos = await elementsParser.$getFederationUtxosNumber();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(federationUtxos);
} catch (e) {
handleError(req, res, 500, 'Failed to get federation utxos number');
}
}
private async $getEmergencySpentUtxos(req: Request, res: Response) {
try {
const emergencySpentUtxos = await elementsParser.$getEmergencySpentUtxos();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(emergencySpentUtxos);
} catch (e) {
handleError(req, res, 500, 'Failed to get emergency spent utxos');
}
}
private async $getEmergencySpentUtxosStats(req: Request, res: Response) {
try {
const emergencySpentUtxos = await elementsParser.$getEmergencySpentUtxosStats();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(emergencySpentUtxos);
} catch (e) {
handleError(req, res, 500, 'Failed to get emergency spent utxos stats');
}
}
private async $getPegsList(req: Request, res: Response) {
try {
const recentPegs = await elementsParser.$getPegsList(parseInt(req.params?.count));
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(recentPegs);
} catch (e) {
handleError(req, res, 500, 'Failed to get pegs list');
}
}
private async $getPegsVolumeDaily(req: Request, res: Response) {
try {
const pegsVolume = await elementsParser.$getPegsVolumeDaily();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(pegsVolume);
} catch (e) {
handleError(req, res, 500, 'Failed to get pegs volume daily');
}
}
private async $getPegsCount(req: Request, res: Response) {
try {
const pegsCount = await elementsParser.$getPegsCount();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 30).toUTCString());
res.json(pegsCount);
} catch (e) {
handleError(req, res, 500, 'Failed to get pegs count');
}
}
}
export default new LiquidRoutes();

View File

@ -31,7 +31,7 @@ class MemoryCache {
}
private cleanup() {
this.cache = this.cache.filter((cache) => cache.expires < (new Date()));
this.cache = this.cache.filter((cache) => cache.expires > (new Date()));
}
}

View File

@ -1,10 +1,13 @@
import { GbtGenerator, GbtResult, ThreadTransaction as RustThreadTransaction } from '../../rust-gbt';
import { GbtGenerator, GbtResult, ThreadTransaction as RustThreadTransaction, ThreadAcceleration as RustThreadAcceleration } from 'rust-gbt';
import logger from '../logger';
import { MempoolBlock, MempoolTransactionExtended, TransactionStripped, MempoolBlockWithTransactions, MempoolBlockDelta, Ancestor, CompactThreadTransaction, EffectiveFeeStats } from '../mempool.interfaces';
import { MempoolBlock, MempoolTransactionExtended, MempoolBlockWithTransactions, MempoolBlockDelta, Ancestor, CompactThreadTransaction, EffectiveFeeStats, TransactionClassified, TransactionCompressed, MempoolDeltaChange, GbtCandidates, PoolTag } from '../mempool.interfaces';
import { Common, OnlineFeeStatsCalculator } from './common';
import config from '../config';
import { Worker } from 'worker_threads';
import path from 'path';
import mempool from './mempool';
import { Acceleration } from './services/acceleration';
import PoolsRepository from '../repositories/PoolsRepository';
const MAX_UINT32 = Math.pow(2, 32) - 1;
@ -13,10 +16,13 @@ class MempoolBlocks {
private mempoolBlockDeltas: MempoolBlockDelta[] = [];
private txSelectionWorker: Worker | null = null;
private rustInitialized: boolean = false;
private rustGbtGenerator: GbtGenerator = new GbtGenerator();
private rustGbtGenerator: GbtGenerator = new GbtGenerator(config.MEMPOOL.BLOCK_WEIGHT_UNITS, config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT);
private nextUid: number = 1;
private uidMap: Map<number, string> = new Map(); // map short numerical uids to full txids
private txidMap: Map<string, number> = new Map(); // map full txids back to short numerical uids
private pools: { [id: number]: PoolTag } = {};
public getMempoolBlocks(): MempoolBlock[] {
return this.mempoolBlocks.map((block) => {
@ -39,138 +45,24 @@ class MempoolBlocks {
return this.mempoolBlockDeltas;
}
public updateMempoolBlocks(memPool: { [txid: string]: MempoolTransactionExtended }, saveResults: boolean = false): MempoolBlockWithTransactions[] {
const latestMempool = memPool;
const memPoolArray: MempoolTransactionExtended[] = [];
for (const i in latestMempool) {
memPoolArray.push(latestMempool[i]);
public async updatePools$(): Promise<void> {
if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false) {
this.pools = {};
return;
}
const start = new Date().getTime();
// Clear bestDescendants & ancestors
memPoolArray.forEach((tx) => {
tx.bestDescendant = null;
tx.ancestors = [];
tx.cpfpChecked = false;
if (!tx.effectiveFeePerVsize) {
tx.effectiveFeePerVsize = tx.adjustedFeePerVsize;
}
});
// First sort
memPoolArray.sort((a, b) => {
if (a.adjustedFeePerVsize === b.adjustedFeePerVsize) {
// tie-break by lexicographic txid order for stability
return a.txid < b.txid ? -1 : 1;
} else {
return b.adjustedFeePerVsize - a.adjustedFeePerVsize;
}
});
// Loop through and traverse all ancestors and sum up all the sizes + fees
// Pass down size + fee to all unconfirmed children
let sizes = 0;
memPoolArray.forEach((tx) => {
sizes += tx.weight;
if (sizes > 4000000 * 8) {
return;
}
Common.setRelativesAndGetCpfpInfo(tx, memPool);
});
// Final sort, by effective fee
memPoolArray.sort((a, b) => {
if (a.effectiveFeePerVsize === b.effectiveFeePerVsize) {
// tie-break by lexicographic txid order for stability
return a.txid < b.txid ? -1 : 1;
} else {
return b.effectiveFeePerVsize - a.effectiveFeePerVsize;
}
});
const end = new Date().getTime();
const time = end - start;
logger.debug('Mempool blocks calculated in ' + time / 1000 + ' seconds');
const blocks = this.calculateMempoolBlocks(memPoolArray);
if (saveResults) {
const deltas = this.calculateMempoolDeltas(this.mempoolBlocks, blocks);
this.mempoolBlocks = blocks;
this.mempoolBlockDeltas = deltas;
const allPools = await PoolsRepository.$getPools();
this.pools = {};
for (const pool of allPools) {
this.pools[pool.uniqueId] = pool;
}
return blocks;
}
private calculateMempoolBlocks(transactionsSorted: MempoolTransactionExtended[]): MempoolBlockWithTransactions[] {
const mempoolBlocks: MempoolBlockWithTransactions[] = [];
let feeStatsCalculator: OnlineFeeStatsCalculator = new OnlineFeeStatsCalculator(config.MEMPOOL.BLOCK_WEIGHT_UNITS);
let onlineStats = false;
let blockSize = 0;
let blockWeight = 0;
let blockVsize = 0;
let blockFees = 0;
const sizeLimit = (config.MEMPOOL.BLOCK_WEIGHT_UNITS / 4) * 1.2;
let transactionIds: string[] = [];
let transactions: MempoolTransactionExtended[] = [];
transactionsSorted.forEach((tx, index) => {
if (blockWeight + tx.weight <= config.MEMPOOL.BLOCK_WEIGHT_UNITS
|| mempoolBlocks.length === config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT - 1) {
tx.position = {
block: mempoolBlocks.length,
vsize: blockVsize + (tx.vsize / 2),
};
blockWeight += tx.weight;
blockVsize += tx.vsize;
blockSize += tx.size;
blockFees += tx.fee;
if (blockVsize <= sizeLimit) {
transactions.push(tx);
}
transactionIds.push(tx.txid);
if (onlineStats) {
feeStatsCalculator.processNext(tx);
}
} else {
mempoolBlocks.push(this.dataToMempoolBlocks(transactionIds, transactions, blockSize, blockWeight, blockFees));
blockVsize = 0;
tx.position = {
block: mempoolBlocks.length,
vsize: blockVsize + (tx.vsize / 2),
};
if (mempoolBlocks.length === config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT - 1) {
const stackWeight = transactionsSorted.slice(index).reduce((total, tx) => total + (tx.weight || 0), 0);
if (stackWeight > config.MEMPOOL.BLOCK_WEIGHT_UNITS) {
onlineStats = true;
feeStatsCalculator = new OnlineFeeStatsCalculator(stackWeight, 0.5, [10, 20, 30, 40, 50, 60, 70, 80, 90]);
feeStatsCalculator.processNext(tx);
}
}
blockVsize += tx.vsize;
blockWeight = tx.weight;
blockSize = tx.size;
blockFees = tx.fee;
transactionIds = [tx.txid];
transactions = [tx];
}
});
if (transactions.length) {
const feeStats = onlineStats ? feeStatsCalculator.getRawFeeStats() : undefined;
mempoolBlocks.push(this.dataToMempoolBlocks(transactionIds, transactions, blockSize, blockWeight, blockFees, feeStats));
}
return mempoolBlocks;
}
private calculateMempoolDeltas(prevBlocks: MempoolBlockWithTransactions[], mempoolBlocks: MempoolBlockWithTransactions[]): MempoolBlockDelta[] {
const mempoolBlockDeltas: MempoolBlockDelta[] = [];
for (let i = 0; i < Math.max(mempoolBlocks.length, prevBlocks.length); i++) {
let added: TransactionStripped[] = [];
let added: TransactionClassified[] = [];
let removed: string[] = [];
const changed: { txid: string, rate: number | undefined }[] = [];
const changed: TransactionClassified[] = [];
if (mempoolBlocks[i] && !prevBlocks[i]) {
added = mempoolBlocks[i].transactions;
} else if (!mempoolBlocks[i] && prevBlocks[i]) {
@ -192,37 +84,44 @@ class MempoolBlocks {
mempoolBlocks[i].transactions.forEach(tx => {
if (!prevIds[tx.txid]) {
added.push(tx);
} else if (tx.rate !== prevIds[tx.txid].rate) {
changed.push({ txid: tx.txid, rate: tx.rate });
} else if (tx.rate !== prevIds[tx.txid].rate || tx.acc !== prevIds[tx.txid].acc) {
changed.push(tx);
}
});
}
mempoolBlockDeltas.push({
added,
added: added.map(this.compressTx),
removed,
changed,
changed: changed.map(this.compressDeltaChange),
});
}
return mempoolBlockDeltas;
}
public async $makeBlockTemplates(newMempool: { [txid: string]: MempoolTransactionExtended }, saveResults: boolean = false): Promise<MempoolBlockWithTransactions[]> {
public async $makeBlockTemplates(transactions: string[], newMempool: { [txid: string]: MempoolTransactionExtended }, candidates: GbtCandidates | undefined, saveResults: boolean = false, useAccelerations: boolean = false, accelerationPool?: number): Promise<MempoolBlockWithTransactions[]> {
const start = Date.now();
// reset mempool short ids
this.resetUids();
for (const tx of Object.values(newMempool)) {
this.setUid(tx);
if (saveResults) {
this.resetUids();
}
// set missing short ids
for (const txid of transactions) {
const tx = newMempool[txid];
this.setUid(tx, !saveResults);
}
const accelerations = useAccelerations ? mempool.getAccelerations() : {};
// prepare a stripped down version of the mempool with only the minimum necessary data
// to reduce the overhead of passing this data to the worker thread
const strippedMempool: Map<number, CompactThreadTransaction> = new Map();
Object.values(newMempool).forEach(entry => {
for (const txid of transactions) {
const entry = newMempool[txid];
if (entry.uid !== null && entry.uid !== undefined) {
const stripped = {
uid: entry.uid,
fee: entry.fee,
fee: entry.fee + (useAccelerations && (!accelerationPool || accelerations[entry.txid]?.pools?.includes(accelerationPool)) ? (accelerations[entry.txid]?.feeDelta || 0) : 0),
weight: (entry.adjustedVsize * 4),
sigops: entry.sigops,
feePerVsize: entry.adjustedFeePerVsize || entry.feePerVsize,
@ -231,7 +130,7 @@ class MempoolBlocks {
};
strippedMempool.set(entry.uid, stripped);
}
});
}
// (re)initialize tx selection worker thread
if (!this.txSelectionWorker) {
@ -262,7 +161,7 @@ class MempoolBlocks {
// clean up thread error listener
this.txSelectionWorker?.removeListener('error', threadErrorListener);
const processed = this.processBlockTemplates(newMempool, blocks, null, Object.entries(rates), Object.values(clusters), saveResults);
const processed = this.processBlockTemplates(newMempool, blocks, null, Object.entries(rates), Object.values(clusters), candidates, accelerations, accelerationPool, saveResults);
logger.debug(`makeBlockTemplates completed in ${(Date.now() - start)/1000} seconds`);
@ -273,25 +172,29 @@ class MempoolBlocks {
return this.mempoolBlocks;
}
public async $updateBlockTemplates(newMempool: { [txid: string]: MempoolTransactionExtended }, added: MempoolTransactionExtended[], removed: MempoolTransactionExtended[], saveResults: boolean = false): Promise<void> {
public async $updateBlockTemplates(transactions: string[], newMempool: { [txid: string]: MempoolTransactionExtended }, added: MempoolTransactionExtended[], removed: MempoolTransactionExtended[], candidates: GbtCandidates | undefined, accelerationDelta: string[] = [], saveResults: boolean = false, useAccelerations: boolean = false): Promise<void> {
if (!this.txSelectionWorker) {
// need to reset the worker
await this.$makeBlockTemplates(newMempool, saveResults);
await this.$makeBlockTemplates(transactions, newMempool, candidates, saveResults, useAccelerations);
return;
}
const start = Date.now();
for (const tx of Object.values(added)) {
this.setUid(tx, true);
const accelerations = useAccelerations ? mempool.getAccelerations() : {};
const addedAndChanged: MempoolTransactionExtended[] = useAccelerations ? accelerationDelta.map(txid => newMempool[txid]).filter(tx => tx != null).concat(added) : added;
for (const tx of addedAndChanged) {
this.setUid(tx, false);
}
const removedUids = removed.map(tx => this.getUid(tx)).filter(uid => (uid !== null && uid !== undefined)) as number[];
const removedTxs = removed.filter(tx => tx.uid != null) as MempoolTransactionExtended[];
// prepare a stripped down version of the mempool with only the minimum necessary data
// to reduce the overhead of passing this data to the worker thread
const addedStripped: CompactThreadTransaction[] = added.filter(entry => (entry.uid !== null && entry.uid !== undefined)).map(entry => {
const addedStripped: CompactThreadTransaction[] = addedAndChanged.filter(entry => entry.uid != null).map(entry => {
return {
uid: entry.uid || 0,
fee: entry.fee,
fee: entry.fee + (useAccelerations ? (accelerations[entry.txid]?.feeDelta || 0) : 0),
weight: (entry.adjustedVsize * 4),
sigops: entry.sigops,
feePerVsize: entry.adjustedFeePerVsize || entry.feePerVsize,
@ -310,15 +213,15 @@ class MempoolBlocks {
});
this.txSelectionWorker?.once('error', reject);
});
this.txSelectionWorker.postMessage({ type: 'update', added: addedStripped, removed: removedUids });
this.txSelectionWorker.postMessage({ type: 'update', added: addedStripped, removed: removedTxs.map(tx => tx.uid) as number[] });
const { blocks, rates, clusters } = this.convertResultTxids(await workerResultPromise);
this.removeUids(removedUids);
this.removeUids(removedTxs);
// clean up thread error listener
this.txSelectionWorker?.removeListener('error', threadErrorListener);
this.processBlockTemplates(newMempool, blocks, null, Object.entries(rates), Object.values(clusters), saveResults);
this.processBlockTemplates(newMempool, blocks, null, Object.entries(rates), Object.values(clusters), candidates, accelerations, null, saveResults);
logger.debug(`updateBlockTemplates completed in ${(Date.now() - start) / 1000} seconds`);
} catch (e) {
logger.err('updateBlockTemplates failed. ' + (e instanceof Error ? e.message : e));
@ -327,35 +230,50 @@ class MempoolBlocks {
private resetRustGbt(): void {
this.rustInitialized = false;
this.rustGbtGenerator = new GbtGenerator();
this.rustGbtGenerator = new GbtGenerator(config.MEMPOOL.BLOCK_WEIGHT_UNITS, config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT);
}
private async $rustMakeBlockTemplates(newMempool: { [txid: string]: MempoolTransactionExtended }, saveResults: boolean = false): Promise<MempoolBlockWithTransactions[]> {
public async $rustMakeBlockTemplates(txids: string[], newMempool: { [txid: string]: MempoolTransactionExtended }, candidates: GbtCandidates | undefined, saveResults: boolean = false, useAccelerations: boolean = false, accelerationPool?: number): Promise<MempoolBlockWithTransactions[]> {
const start = Date.now();
// reset mempool short ids
if (saveResults) {
this.resetUids();
}
const transactions = txids.map(txid => newMempool[txid]).filter(tx => tx != null);
// set missing short ids
for (const tx of Object.values(newMempool)) {
for (const tx of transactions) {
this.setUid(tx, !saveResults);
}
// set short ids for transaction inputs
for (const tx of Object.values(newMempool)) {
for (const tx of transactions) {
tx.inputs = tx.vin.map(v => this.getUid(newMempool[v.txid])).filter(uid => (uid !== null && uid !== undefined)) as number[];
}
const accelerations = useAccelerations ? mempool.getAccelerations() : {};
const acceleratedList = accelerationPool ? Object.values(accelerations).filter(acc => newMempool[acc.txid] && acc.pools.includes(accelerationPool)) : Object.values(accelerations).filter(acc => newMempool[acc.txid]);
const convertedAccelerations = acceleratedList.map(acc => {
this.setUid(newMempool[acc.txid], true);
return {
uid: this.getUid(newMempool[acc.txid]),
delta: acc.feeDelta,
};
});
// run the block construction algorithm in a separate thread, and wait for a result
const rustGbt = saveResults ? this.rustGbtGenerator : new GbtGenerator();
const rustGbt = saveResults ? this.rustGbtGenerator : new GbtGenerator(config.MEMPOOL.BLOCK_WEIGHT_UNITS, config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT);
try {
const { blocks, blockWeights, rates, clusters } = this.convertNapiResultTxids(
await rustGbt.make(Object.values(newMempool) as RustThreadTransaction[], this.nextUid),
const { blocks, blockWeights, rates, clusters, overflow } = this.convertNapiResultTxids(
await rustGbt.make(transactions as RustThreadTransaction[], convertedAccelerations as RustThreadAcceleration[], this.nextUid),
);
if (saveResults) {
this.rustInitialized = true;
}
const processed = this.processBlockTemplates(newMempool, blocks, blockWeights, rates, clusters, saveResults);
const expectedSize = transactions.length;
const resultMempoolSize = blocks.reduce((total, block) => total + block.length, 0) + overflow.length;
logger.debug(`RUST updateBlockTemplates returned ${resultMempoolSize} txs out of ${expectedSize} in the mempool, ${overflow.length} were unmineable`);
const processed = this.processBlockTemplates(newMempool, blocks, blockWeights, rates, clusters, candidates, accelerations, accelerationPool, saveResults);
logger.debug(`RUST makeBlockTemplates completed in ${(Date.now() - start)/1000} seconds`);
return processed;
} catch (e) {
@ -367,68 +285,91 @@ class MempoolBlocks {
return this.mempoolBlocks;
}
public async $oneOffRustBlockTemplates(newMempool: { [txid: string]: MempoolTransactionExtended }): Promise<MempoolBlockWithTransactions[]> {
return this.$rustMakeBlockTemplates(newMempool, false);
public async $oneOffRustBlockTemplates(transactions: string[], newMempool: { [txid: string]: MempoolTransactionExtended }, candidates: GbtCandidates | undefined, useAccelerations: boolean, accelerationPool?: number): Promise<MempoolBlockWithTransactions[]> {
return this.$rustMakeBlockTemplates(transactions, newMempool, candidates, false, useAccelerations, accelerationPool);
}
public async $rustUpdateBlockTemplates(newMempool: { [txid: string]: MempoolTransactionExtended }, mempoolSize: number, added: MempoolTransactionExtended[], removed: MempoolTransactionExtended[]): Promise<void> {
public async $rustUpdateBlockTemplates(transactions: string[], newMempool: { [txid: string]: MempoolTransactionExtended }, added: MempoolTransactionExtended[], removed: MempoolTransactionExtended[], candidates: GbtCandidates | undefined, useAccelerations: boolean, accelerationPool?: number): Promise<MempoolBlockWithTransactions[]> {
// GBT optimization requires that uids never get too sparse
// as a sanity check, we should also explicitly prevent uint32 uid overflow
if (this.nextUid + added.length >= Math.min(Math.max(262144, 2 * mempoolSize), MAX_UINT32)) {
if (this.nextUid + added.length >= Math.min(Math.max(262144, 2 * transactions.length), MAX_UINT32)) {
this.resetRustGbt();
}
if (!this.rustInitialized) {
// need to reset the worker
await this.$rustMakeBlockTemplates(newMempool, true);
return;
return this.$rustMakeBlockTemplates(transactions, newMempool, candidates, true, useAccelerations, accelerationPool);
}
const start = Date.now();
// set missing short ids
for (const tx of added) {
this.setUid(tx, true);
this.setUid(tx, false);
}
// set short ids for transaction inputs
for (const tx of added) {
tx.inputs = tx.vin.map(v => this.getUid(newMempool[v.txid])).filter(uid => (uid !== null && uid !== undefined)) as number[];
}
const removedUids = removed.map(tx => this.getUid(tx)).filter(uid => (uid !== null && uid !== undefined)) as number[];
const removedTxs = removed.filter(tx => tx.uid != null) as MempoolTransactionExtended[];
const accelerations = useAccelerations ? mempool.getAccelerations() : {};
const acceleratedList = accelerationPool ? Object.values(accelerations).filter(acc => newMempool[acc.txid] && acc.pools.includes(accelerationPool)) : Object.values(accelerations).filter(acc => newMempool[acc.txid]);
const convertedAccelerations = acceleratedList.map(acc => {
this.setUid(newMempool[acc.txid], true);
return {
uid: this.getUid(newMempool[acc.txid]),
delta: acc.feeDelta,
};
});
// run the block construction algorithm in a separate thread, and wait for a result
try {
const { blocks, blockWeights, rates, clusters } = this.convertNapiResultTxids(
const { blocks, blockWeights, rates, clusters, overflow } = this.convertNapiResultTxids(
await this.rustGbtGenerator.update(
added as RustThreadTransaction[],
removedUids,
removedTxs.map(tx => tx.uid) as number[],
convertedAccelerations as RustThreadAcceleration[],
this.nextUid,
),
);
const resultMempoolSize = blocks.reduce((total, block) => total + block.length, 0);
if (mempoolSize !== resultMempoolSize) {
throw new Error('GBT returned wrong number of transactions, cache is probably out of sync');
const resultMempoolSize = blocks.reduce((total, block) => total + block.length, 0) + overflow.length;
logger.debug(`RUST updateBlockTemplates returned ${resultMempoolSize} txs out of ${transactions.length} candidates, ${overflow.length} were unmineable`);
if (transactions.length !== resultMempoolSize) {
throw new Error(`GBT returned wrong number of transactions ${transactions.length} vs ${resultMempoolSize}, cache is probably out of sync`);
} else {
this.processBlockTemplates(newMempool, blocks, blockWeights, rates, clusters, true);
const processed = this.processBlockTemplates(newMempool, blocks, blockWeights, rates, clusters, candidates, accelerations, accelerationPool, true);
this.removeUids(removedTxs);
logger.debug(`RUST updateBlockTemplates completed in ${(Date.now() - start)/1000} seconds`);
return processed;
}
this.removeUids(removedUids);
logger.debug(`RUST updateBlockTemplates completed in ${(Date.now() - start)/1000} seconds`);
} catch (e) {
logger.err('RUST updateBlockTemplates failed. ' + (e instanceof Error ? e.message : e));
this.resetRustGbt();
return this.mempoolBlocks;
}
}
private processBlockTemplates(mempool: { [txid: string]: MempoolTransactionExtended }, blocks: string[][], blockWeights: number[] | null, rates: [string, number][], clusters: string[][], saveResults): MempoolBlockWithTransactions[] {
private processBlockTemplates(mempool: { [txid: string]: MempoolTransactionExtended }, blocks: string[][], blockWeights: number[] | null, rates: [string, number][], clusters: string[][], candidates: GbtCandidates | undefined, accelerations: { [txid: string]: Acceleration }, accelerationPool, saveResults): MempoolBlockWithTransactions[] {
for (const txid of Object.keys(candidates?.txs ?? mempool)) {
if (txid in mempool) {
mempool[txid].cpfpDirty = false;
mempool[txid].ancestors = [];
mempool[txid].descendants = [];
mempool[txid].bestDescendant = null;
}
}
for (const [txid, rate] of rates) {
if (txid in mempool) {
mempool[txid].cpfpDirty = (rate !== mempool[txid].effectiveFeePerVsize);
mempool[txid].effectiveFeePerVsize = rate;
mempool[txid].cpfpChecked = false;
mempool[txid].cpfpChecked = true;
}
}
const lastBlockIndex = blocks.length - 1;
let hasBlockStack = blocks.length >= 8;
let stackWeight;
let feeStatsCalculator: OnlineFeeStatsCalculator | void;
let feeStatsCalculator: OnlineFeeStatsCalculator | null = null;
if (hasBlockStack) {
if (blockWeights && blockWeights[7] !== null) {
stackWeight = blockWeights[7];
@ -439,61 +380,130 @@ class MempoolBlocks {
feeStatsCalculator = new OnlineFeeStatsCalculator(stackWeight, 0.5, [10, 20, 30, 40, 50, 60, 70, 80, 90]);
}
const ancestors: Ancestor[] = [];
const descendants: Ancestor[] = [];
let ancestor: MempoolTransactionExtended;
for (const cluster of clusters) {
for (const memberTxid of cluster) {
const mempoolTx = mempool[memberTxid];
if (mempoolTx) {
const ancestors: Ancestor[] = [];
const descendants: Ancestor[] = [];
// ugly micro-optimization to avoid allocating new arrays
ancestors.length = 0;
descendants.length = 0;
let matched = false;
cluster.forEach(txid => {
ancestor = mempool[txid];
if (txid === memberTxid) {
matched = true;
} else {
if (!ancestor) {
console.log('txid missing from mempool! ', txid, candidates?.txs[txid]);
return;
}
const relative = {
txid: txid,
fee: mempool[txid].fee,
weight: (mempool[txid].adjustedVsize * 4),
fee: ancestor.fee,
weight: (ancestor.adjustedVsize * 4),
};
if (matched) {
descendants.push(relative);
mempoolTx.lastBoosted = Math.max(mempoolTx.lastBoosted || 0, mempool[txid].firstSeen || 0);
if (!mempoolTx.lastBoosted || (ancestor.firstSeen && ancestor.firstSeen > mempoolTx.lastBoosted)) {
mempoolTx.lastBoosted = ancestor.firstSeen;
}
} else {
ancestors.push(relative);
}
}
});
Object.assign(mempoolTx, {ancestors, descendants, bestDescendant: null, cpfpChecked: true});
if (mempoolTx.ancestors?.length !== ancestors.length || mempoolTx.descendants?.length !== descendants.length) {
mempoolTx.cpfpDirty = true;
}
// ugly micro-optimization to avoid allocating new arrays or objects
if (mempoolTx.ancestors) {
mempoolTx.ancestors.length = 0;
} else {
mempoolTx.ancestors = [];
}
if (mempoolTx.descendants) {
mempoolTx.descendants.length = 0;
} else {
mempoolTx.descendants = [];
}
mempoolTx.ancestors.push(...ancestors);
mempoolTx.descendants.push(...descendants);
mempoolTx.cpfpChecked = true;
}
}
}
const isAcceleratedBy : { [txid: string]: number[] | false } = {};
const sizeLimit = (config.MEMPOOL.BLOCK_WEIGHT_UNITS / 4) * 1.2;
// update this thread's mempool with the results
let mempoolTx: MempoolTransactionExtended;
const mempoolBlocks: MempoolBlockWithTransactions[] = blocks.map((block, blockIndex) => {
let acceleration: Acceleration;
const mempoolBlocks: MempoolBlockWithTransactions[] = [];
for (let blockIndex = 0; blockIndex < blocks.length; blockIndex++) {
const block = blocks[blockIndex];
let totalSize = 0;
let totalVsize = 0;
let totalWeight = 0;
let totalFees = 0;
const transactions: MempoolTransactionExtended[] = [];
for (const txid of block) {
if (txid) {
// backfill purged transactions
if (candidates?.txs && blockIndex === blocks.length - 1) {
for (const txid of Object.keys(mempool)) {
if (!candidates.txs[txid]) {
block.push(txid);
}
}
}
for (let i = 0; i < block.length; i++) {
const txid = block[i];
if (txid in mempool) {
mempoolTx = mempool[txid];
// save position in projected blocks
mempoolTx.position = {
block: blockIndex,
vsize: totalVsize + (mempoolTx.vsize / 2),
};
if (!mempoolTx.cpfpChecked) {
if (mempoolTx.ancestors?.length) {
mempoolTx.ancestors = [];
if (txid in accelerations) {
acceleration = accelerations[txid];
if (isAcceleratedBy[txid] || (acceleration && (!accelerationPool || acceleration.pools.includes(accelerationPool)))) {
if (!mempoolTx.acceleration) {
mempoolTx.cpfpDirty = true;
}
mempoolTx.acceleration = true;
mempoolTx.acceleratedBy = isAcceleratedBy[txid] || acceleration?.pools;
mempoolTx.acceleratedAt = acceleration?.added;
mempoolTx.feeDelta = acceleration?.feeDelta;
for (const ancestor of mempoolTx.ancestors || []) {
if (!(ancestor.txid in mempool)) {
continue;
}
if (!mempool[ancestor.txid].acceleration) {
mempool[ancestor.txid].cpfpDirty = true;
}
mempool[ancestor.txid].acceleration = true;
mempool[ancestor.txid].acceleratedBy = mempoolTx.acceleratedBy;
mempool[ancestor.txid].acceleratedAt = mempoolTx.acceleratedAt;
mempool[ancestor.txid].feeDelta = mempoolTx.feeDelta;
isAcceleratedBy[ancestor.txid] = mempoolTx.acceleratedBy;
}
} else {
if (mempoolTx.acceleration) {
mempoolTx.cpfpDirty = true;
delete mempoolTx.acceleration;
}
}
if (mempoolTx.descendants?.length) {
mempoolTx.descendants = [];
} else {
if (mempoolTx.acceleration) {
mempoolTx.cpfpDirty = true;
delete mempoolTx.acceleration;
}
mempoolTx.bestDescendant = null;
mempoolTx.cpfpChecked = true;
}
// online calculation of stack-of-blocks fee stats
@ -511,7 +521,7 @@ class MempoolBlocks {
}
}
}
return this.dataToMempoolBlocks(
mempoolBlocks[blockIndex] = this.dataToMempoolBlocks(
block,
transactions,
totalSize,
@ -519,12 +529,13 @@ class MempoolBlocks {
totalFees,
(hasBlockStack && blockIndex === lastBlockIndex && feeStatsCalculator) ? feeStatsCalculator.getRawFeeStats() : undefined,
);
});
};
if (saveResults) {
const deltas = this.calculateMempoolDeltas(this.mempoolBlocks, mempoolBlocks);
this.mempoolBlocks = mempoolBlocks;
this.mempoolBlockDeltas = deltas;
this.updateAccelerationPositions(mempool, accelerations, mempoolBlocks);
}
return mempoolBlocks;
@ -542,36 +553,44 @@ class MempoolBlocks {
medianFee: feeStats.medianFee, // Common.percentile(transactions.map((tx) => tx.effectiveFeePerVsize), config.MEMPOOL.RECOMMENDED_FEE_PERCENTILE),
feeRange: feeStats.feeRange, //Common.getFeesInRange(transactions, rangeLength),
transactionIds: transactionIds,
transactions: transactions.map((tx) => Common.stripTransaction(tx)),
transactions: transactions.map((tx) => Common.classifyTransaction(tx)),
};
}
private resetUids(): void {
this.uidMap.clear();
this.txidMap.clear();
this.nextUid = 1;
}
private setUid(tx: MempoolTransactionExtended, skipSet = false): number {
if (tx.uid === null || tx.uid === undefined || !skipSet) {
if (!this.txidMap.has(tx.txid) || !skipSet) {
const uid = this.nextUid;
this.nextUid++;
this.uidMap.set(uid, tx.txid);
this.txidMap.set(tx.txid, uid);
tx.uid = uid;
return uid;
} else {
tx.uid = this.txidMap.get(tx.txid) as number;
return tx.uid;
}
}
private getUid(tx: MempoolTransactionExtended): number | void {
if (tx?.uid !== null && tx?.uid !== undefined && this.uidMap.has(tx.uid)) {
return tx.uid;
if (tx) {
return this.txidMap.get(tx.txid);
}
}
private removeUids(uids: number[]): void {
for (const uid of uids) {
this.uidMap.delete(uid);
private removeUids(txs: MempoolTransactionExtended[]): void {
for (const tx of txs) {
const uid = this.txidMap.get(tx.txid);
if (uid != null) {
this.uidMap.delete(uid);
this.txidMap.delete(tx.txid);
}
tx.uid = undefined;
}
}
@ -600,8 +619,8 @@ class MempoolBlocks {
return { blocks: convertedBlocks, rates: convertedRates, clusters: convertedClusters } as { blocks: string[][], rates: { [root: string]: number }, clusters: { [root: string]: string[] }};
}
private convertNapiResultTxids({ blocks, blockWeights, rates, clusters }: GbtResult)
: { blocks: string[][], blockWeights: number[], rates: [string, number][], clusters: string[][] } {
private convertNapiResultTxids({ blocks, blockWeights, rates, clusters, overflow }: GbtResult)
: { blocks: string[][], blockWeights: number[], rates: [string, number][], clusters: string[][], overflow: string[] } {
const convertedBlocks: string[][] = blocks.map(block => block.map(uid => {
const txid = this.uidMap.get(uid);
if (txid !== undefined) {
@ -619,7 +638,167 @@ class MempoolBlocks {
for (const cluster of clusters) {
convertedClusters.push(cluster.map(uid => this.uidMap.get(uid)) as string[]);
}
return { blocks: convertedBlocks, blockWeights, rates: convertedRates, clusters: convertedClusters };
const convertedOverflow: string[] = overflow.map(uid => {
const txid = this.uidMap.get(uid);
if (txid !== undefined) {
return txid;
} else {
throw new Error('GBT returned an unmineable transaction with unknown uid');
}
});
return { blocks: convertedBlocks, blockWeights, rates: convertedRates, clusters: convertedClusters, overflow: convertedOverflow };
}
public compressTx(tx: TransactionClassified): TransactionCompressed {
if (tx.acc) {
return [
tx.txid,
tx.fee,
tx.vsize,
tx.value,
Math.round((tx.rate || (tx.fee / tx.vsize)) * 100) / 100,
tx.flags,
tx.time || 0,
1,
];
} else {
return [
tx.txid,
tx.fee,
tx.vsize,
tx.value,
Math.round((tx.rate || (tx.fee / tx.vsize)) * 100) / 100,
tx.flags,
tx.time || 0,
];
}
}
public compressDeltaChange(tx: TransactionClassified): MempoolDeltaChange {
return [
tx.txid,
Math.round((tx.rate || (tx.fee / tx.vsize)) * 100) / 100,
tx.flags,
tx.acc ? 1 : 0,
];
}
// estimates and saves positions of accelerations in mining partner mempools
private updateAccelerationPositions(mempoolCache: { [txid: string]: MempoolTransactionExtended }, accelerations: { [txid: string]: Acceleration }, mempoolBlocks: MempoolBlockWithTransactions[]): void {
const accelerationPositions: { [txid: string]: { poolId: number, pool: string, block: number, vsize: number }[] } = {};
// keep track of simulated mempool blocks for each active pool
const pools: {
[pool: string]: { name: string, block: number, vsize: number, accelerations: string[], complete: boolean };
} = {};
// prepare a list of accelerations in ascending order (we'll pop items off the end of the list)
const accQueue: { acceleration: Acceleration, rate: number, vsize: number }[] = Object.values(accelerations).filter(acc => acc.txid in mempoolCache).map(acc => {
let vsize = mempoolCache[acc.txid].vsize;
for (const ancestor of mempoolCache[acc.txid].ancestors || []) {
vsize += (ancestor.weight / 4);
}
return {
acceleration: acc,
rate: mempoolCache[acc.txid].effectiveFeePerVsize,
vsize
};
}).sort((a, b) => a.rate - b.rate);
// initialize the pool tracker
for (const { acceleration } of accQueue) {
accelerationPositions[acceleration.txid] = [];
for (const pool of acceleration.pools) {
if (!pools[pool]) {
pools[pool] = {
name: this.pools[pool]?.name || 'unknown',
block: 0,
vsize: 0,
accelerations: [],
complete: false,
};
}
pools[pool].accelerations.push(acceleration.txid);
}
for (const ancestor of mempoolCache[acceleration.txid].ancestors || []) {
accelerationPositions[ancestor.txid] = [];
}
}
for (const pool of Object.keys(pools)) {
// if any pools accepted *every* acceleration, we can just use the GBT result positions directly
if (pools[pool].accelerations.length === Object.keys(accelerations).length) {
pools[pool].complete = true;
}
}
let block = 0;
let index = 0;
let next = accQueue.pop();
// build simulated blocks for each pool by taking the best option from
// either the mempool or the list of accelerations.
while (next && block < mempoolBlocks.length) {
while (next && index < mempoolBlocks[block].transactions.length) {
const nextTx = mempoolBlocks[block].transactions[index];
if (next.rate >= (nextTx.rate || (nextTx.fee / nextTx.vsize))) {
for (const pool of next.acceleration.pools) {
if (pools[pool].vsize + next.vsize <= 999_000) {
pools[pool].vsize += next.vsize;
} else {
pools[pool].block++;
pools[pool].vsize = next.vsize;
}
// insert the acceleration into matching pool's blocks
if (pools[pool].complete && mempoolCache[next.acceleration.txid]?.position !== undefined) {
accelerationPositions[next.acceleration.txid].push({
...mempoolCache[next.acceleration.txid].position as { block: number, vsize: number },
poolId: pool,
pool: pools[pool].name
});
} else {
accelerationPositions[next.acceleration.txid].push({
poolId: pool,
pool: pools[pool].name,
block: pools[pool].block,
vsize: pools[pool].vsize - (next.vsize / 2),
});
}
// and any accelerated ancestors
for (const ancestor of mempoolCache[next.acceleration.txid].ancestors || []) {
if (pools[pool].complete && mempoolCache[ancestor.txid]?.position !== undefined) {
accelerationPositions[ancestor.txid].push({
...mempoolCache[ancestor.txid].position as { block: number, vsize: number },
poolId: pool,
pool: pools[pool].name,
});
} else {
accelerationPositions[ancestor.txid].push({
poolId: pool,
pool: pools[pool].name,
block: pools[pool].block,
vsize: pools[pool].vsize - (next.vsize / 2),
});
}
}
}
next = accQueue.pop();
} else {
// skip accelerated transactions and their CPFP ancestors
if (accelerationPositions[nextTx.txid] == null) {
// insert into all pools' blocks
for (const pool of Object.keys(pools)) {
if (pools[pool].vsize + nextTx.vsize <= 999_000) {
pools[pool].vsize += nextTx.vsize;
} else {
pools[pool].block++;
pools[pool].vsize = nextTx.vsize;
}
}
}
index++;
}
}
block++;
index = 0;
}
mempool.setAccelerationPositions(accelerationPositions);
}
}

View File

@ -1,6 +1,6 @@
import config from '../config';
import bitcoinApi from './bitcoin/bitcoin-api-factory';
import { MempoolTransactionExtended, TransactionExtended, VbytesPerSecond } from '../mempool.interfaces';
import { MempoolTransactionExtended, TransactionExtended, VbytesPerSecond, GbtCandidates } from '../mempool.interfaces';
import logger from '../logger';
import { Common } from './common';
import transactionUtils from './transaction-utils';
@ -9,18 +9,27 @@ import loadingIndicators from './loading-indicators';
import bitcoinClient from './bitcoin/bitcoin-client';
import bitcoinSecondClient from './bitcoin/bitcoin-second-client';
import rbfCache from './rbf-cache';
import { Acceleration } from './services/acceleration';
import accelerationApi from './services/acceleration';
import redisCache from './redis-cache';
import blocks from './blocks';
class Mempool {
private inSync: boolean = false;
private mempoolCacheDelta: number = -1;
private mempoolCache: { [txId: string]: MempoolTransactionExtended } = {};
private mempoolCandidates: { [txid: string ]: boolean } = {};
private spendMap = new Map<string, MempoolTransactionExtended>();
private recentlyDeleted: MempoolTransactionExtended[][] = []; // buffer of transactions deleted in recent mempool updates
private mempoolInfo: IBitcoinApi.MempoolInfo = { loaded: false, size: 0, bytes: 0, usage: 0, total_fee: 0,
maxmempool: 300000000, mempoolminfee: 0.00001000, minrelaytxfee: 0.00001000 };
maxmempool: 300000000, mempoolminfee: Common.isLiquid() ? 0.00000100 : 0.00001000, minrelaytxfee: Common.isLiquid() ? 0.00000100 : 0.00001000 };
private mempoolChangedCallback: ((newMempool: {[txId: string]: MempoolTransactionExtended; }, newTransactions: MempoolTransactionExtended[],
deletedTransactions: MempoolTransactionExtended[]) => void) | undefined;
deletedTransactions: MempoolTransactionExtended[][], accelerationDelta: string[]) => void) | undefined;
private $asyncMempoolChangedCallback: ((newMempool: {[txId: string]: MempoolTransactionExtended; }, mempoolSize: number, newTransactions: MempoolTransactionExtended[],
deletedTransactions: MempoolTransactionExtended[]) => Promise<void>) | undefined;
deletedTransactions: MempoolTransactionExtended[][], accelerationDelta: string[], candidates?: GbtCandidates) => Promise<void>) | undefined;
private accelerations: { [txId: string]: Acceleration } = {};
private accelerationPositions: { [txid: string]: { poolId: number, pool: string, block: number, vsize: number }[] } = {};
private txPerSecondArray: number[] = [];
private txPerSecond: number = 0;
@ -36,6 +45,8 @@ class Mempool {
private missingTxCount = 0;
private mainLoopTimeout: number = 120000;
public limitGBT = config.MEMPOOL.USE_SECOND_NODE_FOR_MINFEE && config.MEMPOOL.LIMIT_GBT;
constructor() {
setInterval(this.updateTxPerSecond.bind(this), 1000);
}
@ -65,12 +76,13 @@ class Mempool {
}
public setMempoolChangedCallback(fn: (newMempool: { [txId: string]: MempoolTransactionExtended; },
newTransactions: MempoolTransactionExtended[], deletedTransactions: MempoolTransactionExtended[]) => void): void {
newTransactions: MempoolTransactionExtended[], deletedTransactions: MempoolTransactionExtended[][], accelerationDelta: string[]) => void): void {
this.mempoolChangedCallback = fn;
}
public setAsyncMempoolChangedCallback(fn: (newMempool: { [txId: string]: MempoolTransactionExtended; }, mempoolSize: number,
newTransactions: MempoolTransactionExtended[], deletedTransactions: MempoolTransactionExtended[]) => Promise<void>): void {
newTransactions: MempoolTransactionExtended[], deletedTransactions: MempoolTransactionExtended[][], accelerationDelta: string[],
candidates?: GbtCandidates) => Promise<void>): void {
this.$asyncMempoolChangedCallback = fn;
}
@ -82,27 +94,91 @@ class Mempool {
return this.spendMap;
}
public getFromSpendMap(txid, index): MempoolTransactionExtended | void {
return this.spendMap.get(`${txid}:${index}`);
}
public async $setMempool(mempoolData: { [txId: string]: MempoolTransactionExtended }) {
this.mempoolCache = mempoolData;
let count = 0;
const redisTimer = Date.now();
if (config.MEMPOOL.CACHE_ENABLED && config.REDIS.ENABLED) {
logger.debug(`Migrating ${Object.keys(this.mempoolCache).length} transactions from disk cache to Redis cache`);
}
for (const txid of Object.keys(this.mempoolCache)) {
if (this.mempoolCache[txid].sigops == null || this.mempoolCache[txid].effectiveFeePerVsize == null) {
if (!this.mempoolCache[txid].adjustedVsize || this.mempoolCache[txid].sigops == null || this.mempoolCache[txid].effectiveFeePerVsize == null) {
this.mempoolCache[txid] = transactionUtils.extendMempoolTransaction(this.mempoolCache[txid]);
}
if (this.mempoolCache[txid].order == null) {
this.mempoolCache[txid].order = transactionUtils.txidToOrdering(txid);
}
for (const vin of this.mempoolCache[txid].vin) {
transactionUtils.addInnerScriptsToVin(vin);
}
count++;
if (config.MEMPOOL.CACHE_ENABLED && config.REDIS.ENABLED) {
await redisCache.$addTransaction(this.mempoolCache[txid]);
}
this.mempoolCache[txid].flags = Common.getTransactionFlags(this.mempoolCache[txid]);
this.mempoolCache[txid].cpfpChecked = false;
this.mempoolCache[txid].cpfpDirty = true;
this.mempoolCache[txid].cpfpUpdated = undefined;
}
if (config.MEMPOOL.CACHE_ENABLED && config.REDIS.ENABLED) {
await redisCache.$flushTransactions();
logger.debug(`Finished migrating cache transactions in ${((Date.now() - redisTimer) / 1000).toFixed(2)} seconds`);
}
if (this.mempoolChangedCallback) {
this.mempoolChangedCallback(this.mempoolCache, [], []);
this.mempoolChangedCallback(this.mempoolCache, [], [], []);
}
if (this.$asyncMempoolChangedCallback) {
await this.$asyncMempoolChangedCallback(this.mempoolCache, count, [], []);
await this.$asyncMempoolChangedCallback(this.mempoolCache, count, [], [], [], this.limitGBT ? { txs: {}, added: [], removed: [] } : undefined);
}
this.addToSpendMap(Object.values(this.mempoolCache));
}
public async $reloadMempool(expectedCount: number): Promise<MempoolTransactionExtended[]> {
let count = 0;
let done = false;
let last_txid;
const newTransactions: MempoolTransactionExtended[] = [];
loadingIndicators.setProgress('mempool', count / expectedCount * 100);
while (!done) {
try {
const result = await bitcoinApi.$getAllMempoolTransactions(last_txid, config.ESPLORA.BATCH_QUERY_BASE_SIZE);
if (result) {
for (const tx of result) {
const extendedTransaction = transactionUtils.extendMempoolTransaction(tx);
if (!this.mempoolCache[extendedTransaction.txid]) {
newTransactions.push(extendedTransaction);
this.mempoolCache[extendedTransaction.txid] = extendedTransaction;
}
count++;
}
logger.info(`Fetched ${count} of ${expectedCount} mempool transactions from esplora`);
if (result.length > 0) {
last_txid = result[result.length - 1].txid;
} else {
done = true;
}
if (Math.floor((count / expectedCount) * 100) < 100) {
loadingIndicators.setProgress('mempool', count / expectedCount * 100);
}
} else {
done = true;
}
} catch(err) {
logger.err('failed to fetch bulk mempool transactions from esplora');
}
}
logger.info(`Done inserting loaded mempool transactions into local cache`);
return newTransactions;
}
public getMempoolCandidates(): { [txid: string]: boolean } {
return this.mempoolCandidates;
}
public async $updateMemPoolInfo() {
this.mempoolInfo = await this.$getMempoolInfo();
}
@ -132,7 +208,7 @@ class Mempool {
return txTimes;
}
public async $updateMempool(transactions: string[]): Promise<void> {
public async $updateMempool(transactions: string[], accelerations: Record<string, Acceleration> | null, minFeeMempool: string[], minFeeTip: number, pollRate: number): Promise<void> {
logger.debug(`Updating mempool...`);
// warn if this run stalls the main loop for more than 2 minutes
@ -143,7 +219,7 @@ class Mempool {
const currentMempoolSize = Object.keys(this.mempoolCache).length;
this.updateTimerProgress(timer, 'got raw mempool');
const diff = transactions.length - currentMempoolSize;
const newTransactions: MempoolTransactionExtended[] = [];
let newTransactions: MempoolTransactionExtended[] = [];
this.mempoolCacheDelta = Math.abs(diff);
@ -162,12 +238,35 @@ class Mempool {
};
let intervalTimer = Date.now();
for (const txid of transactions) {
if (!this.mempoolCache[txid]) {
try {
const transaction = await transactionUtils.$getMempoolTransactionExtended(txid, false, false, false);
this.updateTimerProgress(timer, 'fetched new transaction');
this.mempoolCache[txid] = transaction;
let loaded = false;
if (config.MEMPOOL.BACKEND === 'esplora' && currentMempoolSize < transactions.length * 0.5 && transactions.length > 20_000) {
this.inSync = false;
logger.info(`Missing ${transactions.length - currentMempoolSize} mempool transactions, attempting to reload in bulk from esplora`);
try {
newTransactions = await this.$reloadMempool(transactions.length);
if (config.REDIS.ENABLED) {
for (const tx of newTransactions) {
await redisCache.$addTransaction(tx);
}
}
loaded = true;
} catch (e) {
logger.err('failed to load mempool in bulk from esplora, falling back to fetching individual transactions');
}
}
if (!loaded) {
const remainingTxids = transactions.filter(txid => !this.mempoolCache[txid]);
const sliceLength = config.ESPLORA.BATCH_QUERY_BASE_SIZE;
for (let i = 0; i < Math.ceil(remainingTxids.length / sliceLength); i++) {
const slice = remainingTxids.slice(i * sliceLength, (i + 1) * sliceLength);
const txs = await transactionUtils.$getMempoolTransactionsExtended(slice, false, false, false);
logger.debug(`fetched ${txs.length} transactions`);
this.updateTimerProgress(timer, 'fetched new transactions');
for (const transaction of txs) {
this.mempoolCache[transaction.txid] = transaction;
if (this.inSync) {
this.txPerSecondArray.push(new Date().getTime());
this.vBytesPerSecondArray.push({
@ -177,26 +276,34 @@ class Mempool {
}
hasChange = true;
newTransactions.push(transaction);
} catch (e: any) {
if (config.MEMPOOL.BACKEND === 'esplora' && e.response?.status === 404) {
this.missingTxCount++;
}
logger.debug(`Error finding transaction '${txid}' in the mempool: ` + (e instanceof Error ? e.message : e));
}
}
if (Date.now() - intervalTimer > 5_000) {
if (this.inSync) {
// Break and restart mempool loop if we spend too much time processing
// new transactions that may lead to falling behind on block height
logger.debug('Breaking mempool loop because the 5s time limit exceeded.');
break;
} else {
const progress = (currentMempoolSize + newTransactions.length) / transactions.length * 100;
logger.debug(`Mempool is synchronizing. Processed ${newTransactions.length}/${diff} txs (${Math.round(progress)}%)`);
loadingIndicators.setProgress('mempool', progress);
intervalTimer = Date.now()
if (config.REDIS.ENABLED) {
await redisCache.$addTransaction(transaction);
}
}
if (txs.length < slice.length) {
const missing = slice.length - txs.length;
if (config.MEMPOOL.BACKEND === 'esplora') {
this.missingTxCount += missing;
}
logger.debug(`Error finding ${missing} transactions in the mempool: `);
}
if (Date.now() - intervalTimer > Math.max(pollRate * 2, 5_000)) {
if (this.inSync) {
// Break and restart mempool loop if we spend too much time processing
// new transactions that may lead to falling behind on block height
logger.debug('Breaking mempool loop because the 5s time limit exceeded.');
break;
} else {
const progress = (currentMempoolSize + newTransactions.length) / transactions.length * 100;
logger.debug(`Mempool is synchronizing. Processed ${newTransactions.length}/${diff} txs (${Math.round(progress)}%)`);
if (Math.floor(progress) < 100) {
loadingIndicators.setProgress('mempool', progress);
}
intervalTimer = Date.now();
}
}
}
}
@ -219,7 +326,7 @@ class Mempool {
logger.warn(`Mempool clear protection triggered because transactions.length: ${transactions.length} and currentMempoolSize: ${currentMempoolSize}.`);
setTimeout(() => {
this.mempoolProtection = 2;
logger.warn('Mempool clear protection resumed.');
logger.warn('Mempool clear protection ended, normal operation resumed.');
}, 1000 * 60 * config.MEMPOOL.CLEAR_PROTECTION_MINUTES);
}
@ -242,25 +349,44 @@ class Mempool {
}
}
const candidates = await this.getNextCandidates(minFeeMempool, minFeeTip, deletedTransactions);
const newMempoolSize = currentMempoolSize + newTransactions.length - deletedTransactions.length;
const newTransactionsStripped = newTransactions.map((tx) => Common.stripTransaction(tx));
this.latestTransactions = newTransactionsStripped.concat(this.latestTransactions).slice(0, 6);
const accelerationDelta = accelerations != null ? await this.updateAccelerations(accelerations) : [];
if (accelerationDelta.length) {
hasChange = true;
}
this.mempoolCacheDelta = Math.abs(transactions.length - newMempoolSize);
const candidatesChanged = candidates?.added?.length || candidates?.removed?.length;
this.recentlyDeleted.unshift(deletedTransactions);
this.recentlyDeleted.length = Math.min(this.recentlyDeleted.length, 10); // truncate to the last 10 mempool updates
if (this.mempoolChangedCallback && (hasChange || newTransactions.length || deletedTransactions.length)) {
this.mempoolChangedCallback(this.mempoolCache, newTransactions, this.recentlyDeleted, accelerationDelta);
}
if (this.$asyncMempoolChangedCallback && (hasChange || newTransactions.length || deletedTransactions.length || candidatesChanged)) {
this.updateTimerProgress(timer, 'running async mempool callback');
await this.$asyncMempoolChangedCallback(this.mempoolCache, newMempoolSize, newTransactions, this.recentlyDeleted, accelerationDelta, candidates);
this.updateTimerProgress(timer, 'completed async mempool callback');
}
if (!this.inSync && transactions.length === newMempoolSize) {
this.inSync = true;
logger.notice('The mempool is now in sync!');
loadingIndicators.setProgress('mempool', 100);
}
this.mempoolCacheDelta = Math.abs(transactions.length - newMempoolSize);
if (this.mempoolChangedCallback && (hasChange || deletedTransactions.length)) {
this.mempoolChangedCallback(this.mempoolCache, newTransactions, deletedTransactions);
}
if (this.$asyncMempoolChangedCallback && (hasChange || deletedTransactions.length)) {
this.updateTimerProgress(timer, 'running async mempool callback');
await this.$asyncMempoolChangedCallback(this.mempoolCache, newMempoolSize, newTransactions, deletedTransactions);
this.updateTimerProgress(timer, 'completed async mempool callback');
// Update Redis cache
if (config.REDIS.ENABLED) {
await redisCache.$flushTransactions();
await redisCache.$removeTransactions(deletedTransactions.map(tx => tx.txid));
await rbfCache.updateCache();
}
const end = new Date().getTime();
@ -270,6 +396,87 @@ class Mempool {
this.clearTimer(timer);
}
public getAccelerations(): { [txid: string]: Acceleration } {
return this.accelerations;
}
public updateAccelerations(newAccelerationMap: Record<string, Acceleration>): string[] {
try {
const accelerationDelta = accelerationApi.getAccelerationDelta(this.accelerations, newAccelerationMap);
this.accelerations = newAccelerationMap;
return accelerationDelta;
} catch (e: any) {
logger.debug(`Failed to update accelerations: ` + (e instanceof Error ? e.message : e));
return [];
}
}
public async getNextCandidates(minFeeTransactions: string[], blockHeight: number, deletedTransactions: MempoolTransactionExtended[]): Promise<GbtCandidates | undefined> {
if (this.limitGBT) {
const deletedTxsMap = {};
for (const tx of deletedTransactions) {
deletedTxsMap[tx.txid] = tx;
}
const newCandidateTxMap = {};
for (const txid of minFeeTransactions) {
if (this.mempoolCache[txid]) {
newCandidateTxMap[txid] = true;
}
}
const accelerations = this.getAccelerations();
for (const txid of Object.keys(accelerations)) {
if (this.mempoolCache[txid]) {
newCandidateTxMap[txid] = true;
}
}
const removed: MempoolTransactionExtended[] = [];
const added: MempoolTransactionExtended[] = [];
// don't prematurely remove txs included in a new block
if (blockHeight > blocks.getCurrentBlockHeight()) {
for (const txid of Object.keys(this.mempoolCandidates)) {
newCandidateTxMap[txid] = true;
}
} else {
for (const txid of Object.keys(this.mempoolCandidates)) {
if (!newCandidateTxMap[txid]) {
if (this.mempoolCache[txid]) {
removed.push(this.mempoolCache[txid]);
this.mempoolCache[txid].effectiveFeePerVsize = this.mempoolCache[txid].adjustedFeePerVsize;
this.mempoolCache[txid].ancestors = [];
this.mempoolCache[txid].descendants = [];
this.mempoolCache[txid].bestDescendant = null;
this.mempoolCache[txid].cpfpChecked = false;
this.mempoolCache[txid].cpfpUpdated = undefined;
} else if (deletedTxsMap[txid]) {
removed.push(deletedTxsMap[txid]);
}
}
}
}
for (const txid of Object.keys(newCandidateTxMap)) {
if (!this.mempoolCandidates[txid]) {
added.push(this.mempoolCache[txid]);
}
}
this.mempoolCandidates = newCandidateTxMap;
return {
txs: this.mempoolCandidates,
added,
removed
};
}
}
setAccelerationPositions(positions: { [txid: string]: { poolId: number, pool: string, block: number, vsize: number }[] }): void {
this.accelerationPositions = positions;
}
getAccelerationPositions(txid: string): { [pool: number]: { poolId: number, pool: string, block: number, vsize: number } } | undefined {
return this.accelerationPositions[txid];
}
private startTimer() {
const state: any = {
start: Date.now(),
@ -292,16 +499,7 @@ class Mempool {
}
}
public handleRbfTransactions(rbfTransactions: { [txid: string]: MempoolTransactionExtended[]; }): void {
for (const rbfTransaction in rbfTransactions) {
if (this.mempoolCache[rbfTransaction] && rbfTransactions[rbfTransaction]?.length) {
// Store replaced transactions
rbfCache.add(rbfTransactions[rbfTransaction], this.mempoolCache[rbfTransaction]);
}
}
}
public handleMinedRbfTransactions(rbfTransactions: { [txid: string]: { replaced: MempoolTransactionExtended[], replacedBy: TransactionExtended }}): void {
public handleRbfTransactions(rbfTransactions: { [txid: string]: { replaced: MempoolTransactionExtended[], replacedBy: TransactionExtended }}): void {
for (const rbfTransaction in rbfTransactions) {
if (rbfTransactions[rbfTransaction].replacedBy && rbfTransactions[rbfTransaction]?.replaced?.length) {
// Store replaced transactions

View File

@ -0,0 +1,515 @@
import { Acceleration } from './acceleration/acceleration';
import { MempoolTransactionExtended } from '../mempool.interfaces';
import logger from '../logger';
const BLOCK_WEIGHT_UNITS = 4_000_000;
const BLOCK_SIGOPS = 80_000;
const MAX_RELATIVE_GRAPH_SIZE = 100;
export interface GraphTx {
txid: string;
vsize: number;
weight: number;
depends: string[];
spentby: string[];
ancestorcount: number;
ancestorsize: number;
fees: { // in sats
base: number;
ancestor: number;
};
ancestors: Map<string, GraphTx>,
ancestorRate: number;
individualRate: number;
score: number;
}
interface TemplateTransaction {
txid: string;
order: number;
weight: number;
adjustedVsize: number; // sigop-adjusted vsize, rounded up to the nearest integer
sigops: number;
fee: number;
feeDelta: number;
ancestors: string[];
cluster: string[];
effectiveFeePerVsize: number;
}
interface MinerTransaction extends TemplateTransaction {
inputs: string[];
feePerVsize: number;
relativesSet: boolean;
ancestorMap: Map<string, MinerTransaction>;
children: Set<MinerTransaction>;
ancestorFee: number;
ancestorVsize: number;
ancestorSigops: number;
score: number;
used: boolean;
modified: boolean;
dependencyRate: number;
}
/**
* Takes a raw transaction, and builds a graph of same-block relatives,
* and returns as a GraphTx
*
* @param tx
*/
export function getSameBlockRelatives(tx: MempoolTransactionExtended, transactions: MempoolTransactionExtended[]): Map<string, GraphTx> {
const blockTxs = new Map<string, MempoolTransactionExtended>(); // map of txs in this block
const spendMap = new Map<string, string>(); // map of outpoints to spending txids
for (const tx of transactions) {
blockTxs.set(tx.txid, tx);
for (const vin of tx.vin) {
spendMap.set(`${vin.txid}:${vin.vout}`, tx.txid);
}
}
const relatives: Map<string, GraphTx> = new Map();
const stack: string[] = [tx.txid];
// build set of same-block ancestors
while (stack.length > 0) {
const nextTxid = stack.pop();
const nextTx = nextTxid ? blockTxs.get(nextTxid) : null;
if (!nextTx || relatives.has(nextTx.txid)) {
continue;
}
const mempoolTx = convertToGraphTx(nextTx, spendMap);
for (const txid of [...mempoolTx.depends, ...mempoolTx.spentby]) {
if (txid) {
stack.push(txid);
}
}
relatives.set(mempoolTx.txid, mempoolTx);
}
return relatives;
}
/**
* Takes a raw transaction and converts it to GraphTx format
* fee and ancestor data is initialized with dummy/null values
*
* @param tx
*/
export function convertToGraphTx(tx: MempoolTransactionExtended, spendMap?: Map<string, MempoolTransactionExtended | string>): GraphTx {
return {
txid: tx.txid,
vsize: Math.max(tx.sigops * 5, Math.ceil(tx.weight / 4)),
weight: tx.weight,
fees: {
base: tx.fee || 0,
ancestor: tx.fee || 0,
},
depends: (tx.vin.map(vin => vin.txid).filter(depend => depend) as string[]),
spentby: spendMap ? (tx.vout.map((vout, index) => { const spend = spendMap.get(`${tx.txid}:${index}`); return (spend?.['txid'] || spend); }).filter(spent => spent) as string[]) : [],
ancestorcount: 1,
ancestorsize: Math.max(tx.sigops * 5, Math.ceil(tx.weight / 4)),
ancestors: new Map<string, GraphTx>(),
ancestorRate: 0,
individualRate: 0,
score: 0,
};
}
/**
* Takes a map of transaction ancestors, and expands it into a full graph of up to MAX_GRAPH_SIZE in-mempool relatives
*/
export function expandRelativesGraph(mempool: { [txid: string]: MempoolTransactionExtended }, ancestors: Map<string, GraphTx>, spendMap: Map<string, MempoolTransactionExtended>): Map<string, GraphTx> {
const relatives: Map<string, GraphTx> = new Map();
const stack: GraphTx[] = Array.from(ancestors.values());
while (stack.length > 0) {
if (relatives.size > MAX_RELATIVE_GRAPH_SIZE) {
return relatives;
}
const nextTx = stack.pop();
if (!nextTx) {
continue;
}
relatives.set(nextTx.txid, nextTx);
for (const relativeTxid of [...nextTx.depends, ...nextTx.spentby]) {
if (relatives.has(relativeTxid)) {
// already processed this tx
continue;
}
let ancestorTx = ancestors.get(relativeTxid);
if (!ancestorTx && relativeTxid in mempool) {
const mempoolTx = mempool[relativeTxid];
ancestorTx = convertToGraphTx(mempoolTx, spendMap);
}
if (ancestorTx) {
stack.push(ancestorTx);
}
}
}
return relatives;
}
/**
* Recursively traverses an in-mempool dependency graph, and sets a Map of in-mempool ancestors
* for each transaction.
*
* @param tx
* @param all
*/
function setAncestors(tx: GraphTx, all: Map<string, GraphTx>, visited: Map<string, Map<string, GraphTx>>, depth: number = 0): Map<string, GraphTx> {
// sanity check for infinite recursion / too many ancestors (should never happen)
if (depth > MAX_RELATIVE_GRAPH_SIZE) {
logger.warn('cpfp dependency calculation failed: setAncestors reached depth of 100, unable to proceed');
return tx.ancestors;
}
// initialize the ancestor map for this tx
tx.ancestors = new Map<string, GraphTx>();
tx.depends.forEach(parentId => {
const parent = all.get(parentId);
if (parent) {
// add the parent
tx.ancestors?.set(parentId, parent);
// check for a cached copy of this parent's ancestors
let ancestors = visited.get(parent.txid);
if (!ancestors) {
// recursively fetch the parent's ancestors
ancestors = setAncestors(parent, all, visited, depth + 1);
}
// and add to this tx's map
ancestors.forEach((ancestor, ancestorId) => {
tx.ancestors?.set(ancestorId, ancestor);
});
}
});
visited.set(tx.txid, tx.ancestors);
return tx.ancestors;
}
/**
* Efficiently sets a Map of in-mempool ancestors for each member of an expanded relative graph
* by running setAncestors on each leaf, and caching intermediate results.
* then initializes ancestor data for each transaction
*
* @param all
*/
export function initializeRelatives(mempoolTxs: Map<string, GraphTx>): Map<string, GraphTx> {
const visited: Map<string, Map<string, GraphTx>> = new Map();
const leaves: GraphTx[] = Array.from(mempoolTxs.values()).filter(entry => entry.spentby.length === 0);
for (const leaf of leaves) {
setAncestors(leaf, mempoolTxs, visited);
}
mempoolTxs.forEach(entry => {
entry.ancestors?.forEach(ancestor => {
entry.ancestorcount++;
entry.ancestorsize += ancestor.vsize;
entry.fees.ancestor += ancestor.fees.base;
});
setAncestorScores(entry);
});
return mempoolTxs;
}
/**
* Remove a cluster of transactions from an in-mempool dependency graph
* and update the survivors' scores and ancestors
*
* @param cluster
* @param ancestors
*/
export function removeAncestors(cluster: Map<string, GraphTx>, all: Map<string, GraphTx>): void {
// remove
cluster.forEach(tx => {
all.delete(tx.txid);
});
// update survivors
all.forEach(tx => {
cluster.forEach(remove => {
if (tx.ancestors?.has(remove.txid)) {
// remove as dependency
tx.ancestors.delete(remove.txid);
tx.depends = tx.depends.filter(parent => parent !== remove.txid);
// update ancestor sizes and fees
tx.ancestorsize -= remove.vsize;
tx.fees.ancestor -= remove.fees.base;
}
});
// recalculate fee rates
setAncestorScores(tx);
});
}
/**
* Take a mempool transaction, and set the fee rates and ancestor score
*
* @param tx
*/
export function setAncestorScores(tx: GraphTx): void {
tx.individualRate = tx.fees.base / tx.vsize;
tx.ancestorRate = tx.fees.ancestor / tx.ancestorsize;
tx.score = Math.min(tx.individualRate, tx.ancestorRate);
}
// Sort by descending score
export function mempoolComparator(a: GraphTx, b: GraphTx): number {
return b.score - a.score;
}
/*
* Build a block using an approximation of the transaction selection algorithm from Bitcoin Core
* (see BlockAssembler in https://github.com/bitcoin/bitcoin/blob/master/src/node/miner.cpp)
*/
export function makeBlockTemplate(candidates: MempoolTransactionExtended[], accelerations: Acceleration[], maxBlocks: number = 8, weightLimit: number = BLOCK_WEIGHT_UNITS, sigopLimit: number = BLOCK_SIGOPS): TemplateTransaction[] {
const auditPool: Map<string, MinerTransaction> = new Map();
const mempoolArray: MinerTransaction[] = [];
candidates.forEach(tx => {
// initializing everything up front helps V8 optimize property access later
const adjustedVsize = Math.ceil(Math.max(tx.weight / 4, 5 * (tx.sigops || 0)));
const feePerVsize = (tx.fee / adjustedVsize);
auditPool.set(tx.txid, {
txid: tx.txid,
order: txidToOrdering(tx.txid),
fee: tx.fee,
feeDelta: 0,
weight: tx.weight,
adjustedVsize,
feePerVsize: feePerVsize,
effectiveFeePerVsize: feePerVsize,
dependencyRate: feePerVsize,
sigops: tx.sigops || 0,
inputs: (tx.vin?.map(vin => vin.txid) || []) as string[],
relativesSet: false,
ancestors: [],
cluster: [],
ancestorMap: new Map<string, MinerTransaction>(),
children: new Set<MinerTransaction>(),
ancestorFee: 0,
ancestorVsize: 0,
ancestorSigops: 0,
score: 0,
used: false,
modified: false,
});
mempoolArray.push(auditPool.get(tx.txid) as MinerTransaction);
});
// set accelerated effective fee
for (const acceleration of accelerations) {
const tx = auditPool.get(acceleration.txid);
if (tx) {
tx.feeDelta = acceleration.max_bid;
tx.feePerVsize = ((tx.fee + tx.feeDelta) / tx.adjustedVsize);
tx.effectiveFeePerVsize = tx.feePerVsize;
tx.dependencyRate = tx.feePerVsize;
}
}
// Build relatives graph & calculate ancestor scores
for (const tx of mempoolArray) {
if (!tx.relativesSet) {
setRelatives(tx, auditPool);
}
}
// Sort by descending ancestor score
mempoolArray.sort(priorityComparator);
// Build blocks by greedily choosing the highest feerate package
// (i.e. the package rooted in the transaction with the best ancestor score)
const blocks: number[][] = [];
let blockWeight = 0;
let blockSigops = 0;
const transactions: MinerTransaction[] = [];
let modified: MinerTransaction[] = [];
const overflow: MinerTransaction[] = [];
let failures = 0;
while (mempoolArray.length || modified.length) {
// skip invalid transactions
while (mempoolArray[0]?.used || mempoolArray[0]?.modified) {
mempoolArray.shift();
}
// Select best next package
let nextTx;
const nextPoolTx = mempoolArray[0];
const nextModifiedTx = modified[0];
if (nextPoolTx && (!nextModifiedTx || (nextPoolTx.score || 0) > (nextModifiedTx.score || 0))) {
nextTx = nextPoolTx;
mempoolArray.shift();
} else {
modified.shift();
if (nextModifiedTx) {
nextTx = nextModifiedTx;
}
}
if (nextTx && !nextTx?.used) {
// Check if the package fits into this block
if (blocks.length >= (maxBlocks - 1) || ((blockWeight + (4 * nextTx.ancestorVsize) < weightLimit) && (blockSigops + nextTx.ancestorSigops <= sigopLimit))) {
const ancestors: MinerTransaction[] = Array.from(nextTx.ancestorMap.values());
// sort ancestors by dependency graph (equivalent to sorting by ascending ancestor count)
const sortedTxSet = [...ancestors.sort((a, b) => { return (a.ancestorMap.size || 0) - (b.ancestorMap.size || 0); }), nextTx];
const clusterTxids = sortedTxSet.map(tx => tx.txid);
const effectiveFeeRate = Math.min(nextTx.dependencyRate || Infinity, nextTx.ancestorFee / nextTx.ancestorVsize);
const used: MinerTransaction[] = [];
while (sortedTxSet.length) {
const ancestor = sortedTxSet.pop();
if (!ancestor) {
continue;
}
ancestor.used = true;
ancestor.usedBy = nextTx.txid;
// update this tx with effective fee rate & relatives data
if (ancestor.effectiveFeePerVsize !== effectiveFeeRate) {
ancestor.effectiveFeePerVsize = effectiveFeeRate;
}
ancestor.cluster = clusterTxids;
transactions.push(ancestor);
blockWeight += ancestor.weight;
blockSigops += ancestor.sigops;
used.push(ancestor);
}
// remove these as valid package ancestors for any descendants remaining in the mempool
if (used.length) {
used.forEach(tx => {
modified = updateDescendants(tx, auditPool, modified, effectiveFeeRate);
});
}
failures = 0;
} else {
// hold this package in an overflow list while we check for smaller options
overflow.push(nextTx);
failures++;
}
}
// this block is full
const exceededPackageTries = failures > 1000 && blockWeight > (weightLimit - 4000);
const queueEmpty = !mempoolArray.length && !modified.length;
if (exceededPackageTries || queueEmpty) {
break;
}
}
for (const tx of transactions) {
tx.ancestors = Object.values(tx.ancestorMap);
}
return transactions;
}
// traverse in-mempool ancestors
// recursion unavoidable, but should be limited to depth < 25 by mempool policy
function setRelatives(
tx: MinerTransaction,
mempool: Map<string, MinerTransaction>,
): void {
for (const parent of tx.inputs) {
const parentTx = mempool.get(parent);
if (parentTx && !tx.ancestorMap?.has(parent)) {
tx.ancestorMap.set(parent, parentTx);
parentTx.children.add(tx);
// visit each node only once
if (!parentTx.relativesSet) {
setRelatives(parentTx, mempool);
}
parentTx.ancestorMap.forEach((ancestor) => {
tx.ancestorMap.set(ancestor.txid, ancestor);
});
}
};
tx.ancestorFee = (tx.fee + tx.feeDelta);
tx.ancestorVsize = tx.adjustedVsize || 0;
tx.ancestorSigops = tx.sigops || 0;
tx.ancestorMap.forEach((ancestor) => {
tx.ancestorFee += (ancestor.fee + ancestor.feeDelta);
tx.ancestorVsize += ancestor.adjustedVsize;
tx.ancestorSigops += ancestor.sigops;
});
tx.score = tx.ancestorFee / tx.ancestorVsize;
tx.relativesSet = true;
}
// iterate over remaining descendants, removing the root as a valid ancestor & updating the ancestor score
// avoids recursion to limit call stack depth
function updateDescendants(
rootTx: MinerTransaction,
mempool: Map<string, MinerTransaction>,
modified: MinerTransaction[],
clusterRate: number,
): MinerTransaction[] {
const descendantSet: Set<MinerTransaction> = new Set();
// stack of nodes left to visit
const descendants: MinerTransaction[] = [];
let descendantTx: MinerTransaction | undefined;
rootTx.children.forEach(childTx => {
if (!descendantSet.has(childTx)) {
descendants.push(childTx);
descendantSet.add(childTx);
}
});
while (descendants.length) {
descendantTx = descendants.pop();
if (descendantTx && descendantTx.ancestorMap && descendantTx.ancestorMap.has(rootTx.txid)) {
// remove tx as ancestor
descendantTx.ancestorMap.delete(rootTx.txid);
descendantTx.ancestorFee -= (rootTx.fee + rootTx.feeDelta);
descendantTx.ancestorVsize -= rootTx.adjustedVsize;
descendantTx.ancestorSigops -= rootTx.sigops;
descendantTx.score = descendantTx.ancestorFee / descendantTx.ancestorVsize;
descendantTx.dependencyRate = descendantTx.dependencyRate ? Math.min(descendantTx.dependencyRate, clusterRate) : clusterRate;
if (!descendantTx.modified) {
descendantTx.modified = true;
modified.push(descendantTx);
}
// add this node's children to the stack
descendantTx.children.forEach(childTx => {
// visit each node only once
if (!descendantSet.has(childTx)) {
descendants.push(childTx);
descendantSet.add(childTx);
}
});
}
}
// return new, resorted modified list
return modified.sort(priorityComparator);
}
// Used to sort an array of MinerTransactions by descending ancestor score
function priorityComparator(a: MinerTransaction, b: MinerTransaction): number {
if (b.score === a.score) {
// tie-break by txid for stability
return a.order - b.order;
} else {
return b.score - a.score;
}
}
// returns the most significant 4 bytes of the txid as an integer
function txidToOrdering(txid: string): number {
return parseInt(
txid.substring(62, 64) +
txid.substring(60, 62) +
txid.substring(58, 60) +
txid.substring(56, 58),
16
);
}

View File

@ -8,10 +8,14 @@ import HashratesRepository from '../../repositories/HashratesRepository';
import bitcoinClient from '../bitcoin/bitcoin-client';
import mining from "./mining";
import PricesRepository from '../../repositories/PricesRepository';
import AccelerationRepository from '../../repositories/AccelerationRepository';
import accelerationApi from '../services/acceleration';
import { handleError } from '../../utils/api';
class MiningRoutes {
public initRoutes(app: Application) {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/pools', this.$listPools)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/pools/:interval', this.$getPools)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool/:slug/hashrate', this.$getPoolHistoricalHashrate)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool/:slug/blocks', this.$getPoolBlocks)
@ -22,6 +26,7 @@ class MiningRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/difficulty-adjustments', this.$getDifficultyAdjustments)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/reward-stats/:blockCount', this.$getRewardStats)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/fees/:interval', this.$getHistoricalBlockFees)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/fees', this.$getBlockFeesTimespan)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/rewards/:interval', this.$getHistoricalBlockRewards)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/fee-rates/:interval', this.$getHistoricalBlockFeeRates)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/sizes-weights/:interval', this.$getHistoricalBlockSizeAndWeight)
@ -33,6 +38,13 @@ class MiningRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/audit/:hash', this.$getBlockAudit)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/timestamp/:timestamp', this.$getHeightFromTimestamp)
.get(config.MEMPOOL.API_URL_PREFIX + 'historical-price', this.$getHistoricalPrice)
.get(config.MEMPOOL.API_URL_PREFIX + 'accelerations/pool/:slug', this.$getAccelerationsByPool)
.get(config.MEMPOOL.API_URL_PREFIX + 'accelerations/block/:height', this.$getAccelerationsByHeight)
.get(config.MEMPOOL.API_URL_PREFIX + 'accelerations/recent/:interval', this.$getRecentAccelerations)
.get(config.MEMPOOL.API_URL_PREFIX + 'accelerations/total', this.$getAccelerationTotals)
.get(config.MEMPOOL.API_URL_PREFIX + 'accelerations', this.$getActiveAccelerations)
.post(config.MEMPOOL.API_URL_PREFIX + 'acceleration/request/:txid', this.$requestAcceleration)
;
}
@ -41,15 +53,26 @@ class MiningRoutes {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
if (req.query.timestamp) {
res.status(200).send(await PricesRepository.$getNearestHistoricalPrice(
parseInt(<string>req.query.timestamp ?? 0, 10)
));
} else {
res.status(200).send(await PricesRepository.$getHistoricalPrices());
if (['testnet', 'signet', 'liquidtestnet'].includes(config.MEMPOOL.NETWORK)) {
handleError(req, res, 400, 'Prices are not available on testnets.');
return;
}
const timestamp = parseInt(req.query.timestamp as string, 10) || 0;
const currency = req.query.currency as string;
let response;
if (timestamp && currency) {
response = await PricesRepository.$getNearestHistoricalPrice(timestamp, currency);
} else if (timestamp) {
response = await PricesRepository.$getNearestHistoricalPrice(timestamp);
} else if (currency) {
response = await PricesRepository.$getHistoricalPrices(currency);
} else {
response = await PricesRepository.$getHistoricalPrices();
}
res.status(200).send(response);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical prices');
}
}
@ -62,9 +85,9 @@ class MiningRoutes {
res.json(stats);
} catch (e) {
if (e instanceof Error && e.message.indexOf('This mining pool does not exist') > -1) {
res.status(404).send(e.message);
handleError(req, res, 404, e.message);
} else {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get pool');
}
}
}
@ -81,13 +104,36 @@ class MiningRoutes {
res.json(poolBlocks);
} catch (e) {
if (e instanceof Error && e.message.indexOf('This mining pool does not exist') > -1) {
res.status(404).send(e.message);
handleError(req, res, 404, e.message);
} else {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get blocks for pool');
}
}
}
private async $listPools(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
const pools = await mining.$listPools();
if (!pools) {
res.status(500).end();
return;
}
res.header('X-total-count', pools.length.toString());
if (pools.length === 0) {
res.status(204).send();
} else {
res.json(pools);
}
} catch (e) {
handleError(req, res, 500, 'Failed to get pools');
}
}
private async $getPools(req: Request, res: Response) {
try {
const stats = await mining.$getPoolsStats(req.params.interval);
@ -98,7 +144,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(stats);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get pools');
}
}
@ -112,7 +158,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
res.json(hashrates);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get pools historical hashrate');
}
}
@ -127,9 +173,9 @@ class MiningRoutes {
res.json(hashrates);
} catch (e) {
if (e instanceof Error && e.message.indexOf('This mining pool does not exist') > -1) {
res.status(404).send(e.message);
handleError(req, res, 404, e.message);
} else {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get pool historical hashrate');
}
}
}
@ -137,7 +183,7 @@ class MiningRoutes {
private async $getHistoricalHashrate(req: Request, res: Response) {
let currentHashrate = 0, currentDifficulty = 0;
try {
currentHashrate = await bitcoinClient.getNetworkHashPs();
currentHashrate = await bitcoinClient.getNetworkHashPs(1008);
currentDifficulty = await bitcoinClient.getDifficulty();
} catch (e) {
logger.debug('Bitcoin Core is not available, using zeroed value for current hashrate and difficulty');
@ -158,7 +204,7 @@ class MiningRoutes {
currentDifficulty: currentDifficulty,
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical hashrate');
}
}
@ -172,7 +218,25 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(blockFees);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical block fees');
}
}
private async $getBlockFeesTimespan(req: Request, res: Response) {
try {
if (!parseInt(req.query.from as string, 10) || !parseInt(req.query.to as string, 10)) {
throw new Error('Invalid timestamp range');
}
if (parseInt(req.query.from as string, 10) > parseInt(req.query.to as string, 10)) {
throw new Error('from must be less than to');
}
const blockFees = await mining.$getBlockFeesTimespan(parseInt(req.query.from as string, 10), parseInt(req.query.to as string, 10));
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(blockFees);
} catch (e) {
handleError(req, res, 500, 'Failed to get historical block fees');
}
}
@ -186,7 +250,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(blockRewards);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical block rewards');
}
}
@ -200,7 +264,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(blockFeeRates);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical block fee rates');
}
}
@ -218,7 +282,7 @@ class MiningRoutes {
weights: blockWeights
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical block size and weight');
}
}
@ -230,7 +294,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
res.json(difficulty.map(adj => [adj.time, adj.height, adj.difficulty, adj.adjustment]));
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical difficulty adjustments');
}
}
@ -240,7 +304,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(response);
} catch (e) {
res.status(500).end();
handleError(req, res, 500, 'Failed to get reward stats');
}
}
@ -254,7 +318,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(blocksHealth.map(health => [health.time, health.height, health.match_rate]));
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get historical blocks health');
}
}
@ -263,7 +327,7 @@ class MiningRoutes {
const audit = await BlocksAuditsRepository.$getBlockAudit(req.params.hash);
if (!audit) {
res.status(204).send(`This block has not been audited.`);
handleError(req, res, 204, `This block has not been audited.`);
return;
}
@ -272,7 +336,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24).toUTCString());
res.json(audit);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block audit');
}
}
@ -295,7 +359,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get height from timestamp');
}
}
@ -308,7 +372,7 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(await BlocksAuditsRepository.$getBlockAuditScores(height, height - 15));
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block audit scores');
}
}
@ -321,7 +385,95 @@ class MiningRoutes {
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24).toUTCString());
res.json(audit || 'null');
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get block audit score');
}
}
private async $getAccelerationsByPool(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
if (!config.MEMPOOL_SERVICES.ACCELERATIONS || ['testnet', 'signet', 'liquidtestnet', 'liquid'].includes(config.MEMPOOL.NETWORK)) {
handleError(req, res, 400, 'Acceleration data is not available.');
return;
}
res.status(200).send(await AccelerationRepository.$getAccelerationInfo(req.params.slug));
} catch (e) {
handleError(req, res, 500, 'Failed to get accelerations by pool');
}
}
private async $getAccelerationsByHeight(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24).toUTCString());
if (!config.MEMPOOL_SERVICES.ACCELERATIONS || ['testnet', 'signet', 'liquidtestnet', 'liquid'].includes(config.MEMPOOL.NETWORK)) {
handleError(req, res, 400, 'Acceleration data is not available.');
return;
}
const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10);
res.status(200).send(await AccelerationRepository.$getAccelerationInfo(null, height));
} catch (e) {
handleError(req, res, 500, 'Failed to get accelerations by height');
}
}
private async $getRecentAccelerations(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
if (!config.MEMPOOL_SERVICES.ACCELERATIONS || ['testnet', 'signet', 'liquidtestnet', 'liquid'].includes(config.MEMPOOL.NETWORK)) {
handleError(req, res, 400, 'Acceleration data is not available.');
return;
}
res.status(200).send(await AccelerationRepository.$getAccelerationInfo(null, null, req.params.interval));
} catch (e) {
handleError(req, res, 500, 'Failed to get recent accelerations');
}
}
private async $getAccelerationTotals(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
if (!config.MEMPOOL_SERVICES.ACCELERATIONS || ['testnet', 'signet', 'liquidtestnet', 'liquid'].includes(config.MEMPOOL.NETWORK)) {
handleError(req, res, 400, 'Acceleration data is not available.');
return;
}
res.status(200).send(await AccelerationRepository.$getAccelerationTotals(<string>req.query.pool, <string>req.query.interval));
} catch (e) {
handleError(req, res, 500, 'Failed to get acceleration totals');
}
}
private async $getActiveAccelerations(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
if (!config.MEMPOOL_SERVICES.ACCELERATIONS || ['testnet', 'signet', 'liquidtestnet', 'liquid'].includes(config.MEMPOOL.NETWORK)) {
handleError(req, res, 400, 'Acceleration data is not available.');
return;
}
res.status(200).send(Object.values(accelerationApi.getAccelerations() || {}));
} catch (e) {
handleError(req, res, 500, 'Failed to get active accelerations');
}
}
private async $requestAcceleration(req: Request, res: Response): Promise<void> {
res.setHeader('Pragma', 'no-cache');
res.setHeader('Cache-control', 'private, no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0');
res.setHeader('expires', -1);
try {
accelerationApi.accelerationRequested(req.params.txid);
res.status(200).send();
} catch (e) {
handleError(req, res, 500, 'Failed to request acceleration');
}
}
}

View File

@ -11,10 +11,17 @@ import DifficultyAdjustmentsRepository from '../../repositories/DifficultyAdjust
import config from '../../config';
import BlocksAuditsRepository from '../../repositories/BlocksAuditsRepository';
import PricesRepository from '../../repositories/PricesRepository';
import { bitcoinCoreApi } from '../bitcoin/bitcoin-api-factory';
import bitcoinApi from '../bitcoin/bitcoin-api-factory';
import { IEsploraApi } from '../bitcoin/esplora-api.interface';
import database from '../../database';
interface DifficultyBlock {
timestamp: number,
height: number,
bits: number,
difficulty: number,
}
class Mining {
private blocksPriceIndexingRunning = false;
public lastHashrateIndexingDate: number | null = null;
@ -26,7 +33,7 @@ class Mining {
/**
* Get historical blocks health
*/
public async $getBlocksHealthHistory(interval: string | null = null): Promise<any> {
public async $getBlocksHealthHistory(interval: string | null = null): Promise<any> {
return await BlocksAuditsRepository.$getBlocksHealthHistory(
this.getTimeRange(interval),
Common.getSqlInterval(interval)
@ -38,11 +45,22 @@ class Mining {
*/
public async $getHistoricalBlockFees(interval: string | null = null): Promise<any> {
return await BlocksRepository.$getHistoricalBlockFees(
this.getTimeRange(interval, 5),
this.getTimeRange(interval),
Common.getSqlInterval(interval)
);
}
/**
* Get timespan block total fees
*/
public async $getBlockFeesTimespan(from: number, to: number): Promise<number> {
return await BlocksRepository.$getHistoricalBlockFees(
this.getTimeRangeFromTimespan(from, to),
null,
{from, to}
);
}
/**
* Get historical block rewards
*/
@ -56,7 +74,7 @@ class Mining {
/**
* Get historical block fee rates percentiles
*/
public async $getHistoricalBlockFeeRates(interval: string | null = null): Promise<any> {
public async $getHistoricalBlockFeeRates(interval: string | null = null): Promise<any> {
return await BlocksRepository.$getHistoricalBlockFeeRates(
this.getTimeRange(interval),
Common.getSqlInterval(interval)
@ -66,7 +84,7 @@ class Mining {
/**
* Get historical block sizes
*/
public async $getHistoricalBlockSizes(interval: string | null = null): Promise<any> {
public async $getHistoricalBlockSizes(interval: string | null = null): Promise<any> {
return await BlocksRepository.$getHistoricalBlockSizes(
this.getTimeRange(interval),
Common.getSqlInterval(interval)
@ -76,7 +94,7 @@ class Mining {
/**
* Get historical block weights
*/
public async $getHistoricalBlockWeights(interval: string | null = null): Promise<any> {
public async $getHistoricalBlockWeights(interval: string | null = null): Promise<any> {
return await BlocksRepository.$getHistoricalBlockWeights(
this.getTimeRange(interval),
Common.getSqlInterval(interval)
@ -107,6 +125,7 @@ class Mining {
slug: poolInfo.slug,
avgMatchRate: poolInfo.avgMatchRate !== null ? Math.round(100 * poolInfo.avgMatchRate) / 100 : null,
avgFeeDelta: poolInfo.avgFeeDelta,
poolUniqueId: poolInfo.poolUniqueId
};
poolsStats.push(poolStat);
});
@ -117,9 +136,13 @@ class Mining {
poolsStatistics['blockCount'] = blockCount;
const totalBlock24h: number = await BlocksRepository.$blockCount(null, '24h');
const totalBlock3d: number = await BlocksRepository.$blockCount(null, '3d');
const totalBlock1w: number = await BlocksRepository.$blockCount(null, '1w');
try {
poolsStatistics['lastEstimatedHashrate'] = await bitcoinClient.getNetworkHashPs(totalBlock24h);
poolsStatistics['lastEstimatedHashrate3d'] = await bitcoinClient.getNetworkHashPs(totalBlock3d);
poolsStatistics['lastEstimatedHashrate1w'] = await bitcoinClient.getNetworkHashPs(totalBlock1w);
} catch (e) {
poolsStatistics['lastEstimatedHashrate'] = 0;
logger.debug('Bitcoin Core is not available, using zeroed value for current hashrate', logger.tags.mining);
@ -134,7 +157,7 @@ class Mining {
public async $getPoolStat(slug: string): Promise<object> {
const pool = await PoolsRepository.$getPool(slug);
if (!pool) {
throw new Error('This mining pool does not exist ' + escape(slug));
throw new Error('This mining pool does not exist');
}
const blockCount: number = await BlocksRepository.$blockCount(pool.id);
@ -201,7 +224,7 @@ class Mining {
try {
const oldestConsecutiveBlockTimestamp = 1000 * (await BlocksRepository.$getOldestConsecutiveBlock()).timestamp;
const genesisBlock: IEsploraApi.Block = await bitcoinCoreApi.$getBlock(await bitcoinClient.getBlockHash(0));
const genesisBlock: IEsploraApi.Block = await bitcoinApi.$getBlock(await bitcoinApi.$getBlockHash(0));
const genesisTimestamp = genesisBlock.timestamp * 1000;
const indexedTimestamp = await HashratesRepository.$getWeeklyHashrateTimestamps();
@ -312,7 +335,7 @@ class Mining {
const oldestConsecutiveBlockTimestamp = 1000 * (await BlocksRepository.$getOldestConsecutiveBlock()).timestamp;
try {
const genesisBlock: IEsploraApi.Block = await bitcoinCoreApi.$getBlock(await bitcoinClient.getBlockHash(0));
const genesisBlock: IEsploraApi.Block = await bitcoinApi.$getBlock(await bitcoinApi.$getBlockHash(0));
const genesisTimestamp = genesisBlock.timestamp * 1000;
const indexedTimestamp = (await HashratesRepository.$getRawNetworkDailyHashrate(null)).map(hashrate => hashrate.timestamp);
const lastMidnight = this.getDateMidnight(new Date());
@ -420,9 +443,11 @@ class Mining {
indexedHeights[height] = true;
}
// gets {time, height, difficulty, bits} of blocks in ascending order of height
const blocks: any = await BlocksRepository.$getBlocksDifficulty();
const genesisBlock: IEsploraApi.Block = await bitcoinCoreApi.$getBlock(await bitcoinClient.getBlockHash(0));
const genesisBlock: IEsploraApi.Block = await bitcoinApi.$getBlock(await bitcoinApi.$getBlockHash(0));
let currentDifficulty = genesisBlock.difficulty;
let currentBits = genesisBlock.bits;
let totalIndexed = 0;
if (config.MEMPOOL.INDEXING_BLOCKS_AMOUNT === -1 && indexedHeights[0] !== true) {
@ -434,38 +459,45 @@ class Mining {
});
}
const oldestConsecutiveBlock = await BlocksRepository.$getOldestConsecutiveBlock();
if (config.MEMPOOL.INDEXING_BLOCKS_AMOUNT !== -1) {
currentDifficulty = oldestConsecutiveBlock.difficulty;
if (!blocks?.length) {
// no blocks in database yet
return;
}
const oldestConsecutiveBlock = this.getOldestConsecutiveBlock(blocks);
currentBits = oldestConsecutiveBlock.bits;
currentDifficulty = oldestConsecutiveBlock.difficulty;
let totalBlockChecked = 0;
let timer = new Date().getTime() / 1000;
for (const block of blocks) {
if (block.difficulty !== currentDifficulty) {
if (indexedHeights[block.height] === true) { // Already indexed
if (block.height >= oldestConsecutiveBlock.height) {
currentDifficulty = block.difficulty;
}
continue;
// skip until the first block after the oldest consecutive block
if (block.height <= oldestConsecutiveBlock.height) {
continue;
}
// difficulty has changed between two consecutive blocks!
if (block.bits !== currentBits) {
// skip if already indexed
if (indexedHeights[block.height] !== true) {
let adjustment = block.difficulty / currentDifficulty;
adjustment = Math.round(adjustment * 1000000) / 1000000; // Remove float point noise
await DifficultyAdjustmentsRepository.$saveAdjustments({
time: block.time,
height: block.height,
difficulty: block.difficulty,
adjustment: adjustment,
});
totalIndexed++;
}
let adjustment = block.difficulty / currentDifficulty;
adjustment = Math.round(adjustment * 1000000) / 1000000; // Remove float point noise
await DifficultyAdjustmentsRepository.$saveAdjustments({
time: block.time,
height: block.height,
difficulty: block.difficulty,
adjustment: adjustment,
});
totalIndexed++;
if (block.height >= oldestConsecutiveBlock.height) {
currentDifficulty = block.difficulty;
}
}
// update the current difficulty
currentDifficulty = block.difficulty;
currentBits = block.bits;
}
totalBlockChecked++;
const elapsedSeconds = Math.max(1, Math.round((new Date().getTime() / 1000) - timer));
@ -590,6 +622,20 @@ class Mining {
}
}
/**
* List existing mining pools
*/
public async $listPools(): Promise<{name: string, slug: string, unique_id: number}[] | null> {
const [rows] = await database.query(`
SELECT
name,
slug,
unique_id
FROM pools`
);
return rows as {name: string, slug: string, unique_id: number}[];
}
private getDateMidnight(date: Date): Date {
date.setUTCHours(0);
date.setUTCMinutes(0);
@ -614,6 +660,35 @@ class Mining {
default: return 86400 * scale;
}
}
private getTimeRangeFromTimespan(from: number, to: number, scale = 1): number {
const timespan = to - from;
switch (true) {
case timespan > 3600 * 24 * 365 * 4: return 86400 * scale; // 24h
case timespan > 3600 * 24 * 365 * 3: return 43200 * scale; // 12h
case timespan > 3600 * 24 * 365 * 2: return 43200 * scale; // 12h
case timespan > 3600 * 24 * 365: return 28800 * scale; // 8h
case timespan > 3600 * 24 * 30 * 6: return 28800 * scale; // 8h
case timespan > 3600 * 24 * 30 * 3: return 10800 * scale; // 3h
case timespan > 3600 * 24 * 30: return 7200 * scale; // 2h
case timespan > 3600 * 24 * 7: return 1800 * scale; // 30min
case timespan > 3600 * 24 * 3: return 300 * scale; // 5min
case timespan > 3600 * 24: return 1 * scale;
default: return 1 * scale;
}
}
// Finds the oldest block in a consecutive chain back from the tip
// assumes `blocks` is sorted in ascending height order
private getOldestConsecutiveBlock(blocks: DifficultyBlock[]): DifficultyBlock {
for (let i = blocks.length - 1; i > 0; i--) {
if ((blocks[i].height - blocks[i - 1].height) > 1) {
return blocks[i];
}
}
return blocks[0];
}
}
export default new Mining();

View File

@ -5,6 +5,9 @@ import PoolsRepository from '../repositories/PoolsRepository';
import { PoolTag } from '../mempool.interfaces';
import diskCache from './disk-cache';
import mining from './mining/mining';
import transactionUtils from './transaction-utils';
import BlocksRepository from '../repositories/BlocksRepository';
import redisCache from './redis-cache';
class PoolsParser {
miningPools: any[] = [];
@ -16,15 +19,6 @@ class PoolsParser {
'addresses': '[]',
'slug': 'unknown'
};
private uniqueLogs: string[] = [];
private uniqueLog(loggerFunction: any, msg: string): void {
if (this.uniqueLogs.includes(msg)) {
return;
}
this.uniqueLogs.push(msg);
loggerFunction(msg);
}
public setMiningPools(pools): void {
for (const pool of pools) {
@ -37,28 +31,53 @@ class PoolsParser {
/**
* Populate our db with updated mining pool definition
* @param pools
* @param pools
*/
public async migratePoolsJson(): Promise<void> {
// We also need to wipe the backend cache to make sure we don't serve blocks with
// the wrong mining pool (usually happen with unknown blocks)
diskCache.setIgnoreBlocksCache();
redisCache.setIgnoreBlocksCache();
await this.$insertUnknownPool();
let reindexUnknown = false;
for (const pool of this.miningPools) {
if (!pool.id) {
logger.info(`Mining pool ${pool.name} has no unique 'id' defined. Skipping.`);
continue;
}
// One of the two fields 'addresses' or 'regexes' must be a non-empty array
if (!pool.addresses && !pool.regexes) {
logger.err(`Mining pool ${pool.name} must have at least one of the fields 'addresses' or 'regexes'. Skipping.`);
continue;
}
pool.addresses = pool.addresses || [];
pool.regexes = pool.regexes || [];
if (pool.addresses.length === 0 && pool.regexes.length === 0) {
logger.err(`Mining pool ${pool.name} has no 'addresses' nor 'regexes' defined. Skipping.`);
continue;
}
if (pool.addresses.length === 0) {
logger.warn(`Mining pool ${pool.name} has no 'addresses' defined.`);
}
if (pool.regexes.length === 0) {
logger.warn(`Mining pool ${pool.name} has no 'regexes' defined.`);
}
const poolDB = await PoolsRepository.$getPoolByUniqueId(pool.id, false);
if (!poolDB) {
// New mining pool
const slug = pool.name.replace(/[^a-z0-9]/gi, '').toLowerCase();
logger.debug(`Inserting new mining pool ${pool.name}`);
await PoolsRepository.$insertNewMiningPool(pool, slug);
await this.$deleteUnknownBlocks();
reindexUnknown = true;
} else {
if (poolDB.name !== pool.name) {
// Pool has been renamed
@ -76,7 +95,45 @@ class PoolsParser {
// Pool addresses changed or coinbase tags changed
logger.notice(`Updating addresses and/or coinbase tags for ${pool.name} mining pool.`);
await PoolsRepository.$updateMiningPoolTags(poolDB.id, pool.addresses, pool.regexes);
await this.$deleteBlocksForPool(poolDB);
reindexUnknown = true;
await this.$reindexBlocksForPool(poolDB.id);
}
}
}
if (reindexUnknown) {
logger.notice(`Updating addresses and/or coinbase tags for unknown mining pool.`);
let unknownPool;
if (config.DATABASE.ENABLED === true) {
unknownPool = await PoolsRepository.$getUnknownPool();
} else {
unknownPool = this.unknownPool;
}
await this.$reindexBlocksForPool(unknownPool.id);
}
}
public matchBlockMiner(scriptsig: string, addresses: string[], pools: PoolTag[]): PoolTag | undefined {
const asciiScriptSig = transactionUtils.hex2ascii(scriptsig);
for (let i = 0; i < pools.length; ++i) {
if (addresses.length) {
const poolAddresses: string[] = typeof pools[i].addresses === 'string' ?
JSON.parse(pools[i].addresses) : pools[i].addresses;
for (let y = 0; y < poolAddresses.length; y++) {
if (addresses.indexOf(poolAddresses[y]) !== -1) {
return pools[i];
}
}
}
const regexes: string[] = typeof pools[i].regexes === 'string' ?
JSON.parse(pools[i].regexes) : pools[i].regexes;
for (let y = 0; y < regexes.length; ++y) {
const regex = new RegExp(regexes[y], 'i');
const match = asciiScriptSig.match(regex);
if (match !== null) {
return pools[i];
}
}
}
@ -112,68 +169,47 @@ class PoolsParser {
}
/**
* Delete indexed blocks for an updated mining pool
*
* @param pool
* re-index pool assignment for blocks previously associated with pool
*
* @param pool local id of existing pool to reindex
*/
private async $deleteBlocksForPool(pool: PoolTag): Promise<void> {
// Get oldest blocks mined by the pool and assume pools-v2.json updates only concern most recent years
// Ignore early days of Bitcoin as there were no mining pool yet
const [oldestPoolBlock]: any[] = await DB.query(`
SELECT height
private async $reindexBlocksForPool(poolId: number): Promise<void> {
let firstKnownBlockPool = 130635; // https://mempool.space/block/0000000000000a067d94ff753eec72830f1205ad3a4c216a08a80c832e551a52
if (config.MEMPOOL.NETWORK === 'testnet') {
firstKnownBlockPool = 21106; // https://mempool.space/testnet/block/0000000070b701a5b6a1b965f6a38e0472e70b2bb31b973e4638dec400877581
} else if (config.MEMPOOL.NETWORK === 'signet') {
firstKnownBlockPool = 0;
}
const [blocks]: any[] = await DB.query(`
SELECT height, hash, coinbase_raw, coinbase_addresses
FROM blocks
WHERE pool_id = ?
ORDER BY height
LIMIT 1`,
[pool.id]
);
AND height >= ?
ORDER BY height DESC
`, [poolId, firstKnownBlockPool]);
let firstKnownBlockPool = 130635; // https://mempool.space/block/0000000000000a067d94ff753eec72830f1205ad3a4c216a08a80c832e551a52
if (config.MEMPOOL.NETWORK === 'testnet') {
firstKnownBlockPool = 21106; // https://mempool.space/testnet/block/0000000070b701a5b6a1b965f6a38e0472e70b2bb31b973e4638dec400877581
} else if (config.MEMPOOL.NETWORK === 'signet') {
firstKnownBlockPool = 0;
let pools: PoolTag[] = [];
if (config.DATABASE.ENABLED === true) {
pools = await PoolsRepository.$getPools();
} else {
pools = this.miningPools;
}
const oldestBlockHeight = oldestPoolBlock.length ?? 0 > 0 ? oldestPoolBlock[0].height : firstKnownBlockPool;
const [unknownPool] = await DB.query(`SELECT id from pools where slug = "unknown"`);
this.uniqueLog(logger.notice, `Deleting blocks with unknown mining pool from height ${oldestBlockHeight} for re-indexing`);
await DB.query(`
DELETE FROM blocks
WHERE pool_id = ? AND height >= ${oldestBlockHeight}`,
[unknownPool[0].id]
);
logger.notice(`Deleting blocks from ${pool.name} mining pool for re-indexing`);
await DB.query(`
DELETE FROM blocks
WHERE pool_id = ?`,
[pool.id]
);
let changed = 0;
for (const block of blocks) {
const addresses = JSON.parse(block.coinbase_addresses) || [];
const newPool = this.matchBlockMiner(block.coinbase_raw, addresses, pools);
if (newPool && newPool.id !== poolId) {
changed++;
await BlocksRepository.$savePool(block.hash, newPool.id);
}
}
logger.info(`${changed} blocks assigned to a new pool`, logger.tags.mining);
// Re-index hashrates and difficulty adjustments later
mining.reindexHashrateRequested = true;
mining.reindexDifficultyAdjustmentRequested = true;
}
private async $deleteUnknownBlocks(): Promise<void> {
let firstKnownBlockPool = 130635; // https://mempool.space/block/0000000000000a067d94ff753eec72830f1205ad3a4c216a08a80c832e551a52
if (config.MEMPOOL.NETWORK === 'testnet') {
firstKnownBlockPool = 21106; // https://mempool.space/testnet/block/0000000070b701a5b6a1b965f6a38e0472e70b2bb31b973e4638dec400877581
} else if (config.MEMPOOL.NETWORK === 'signet') {
firstKnownBlockPool = 0;
}
const [unknownPool] = await DB.query(`SELECT id from pools where slug = "unknown"`);
this.uniqueLog(logger.notice, `Deleting blocks with unknown mining pool from height ${firstKnownBlockPool} for re-indexing`);
await DB.query(`
DELETE FROM blocks
WHERE pool_id = ? AND height >= ${firstKnownBlockPool}`,
[unknownPool[0].id]
);
// Re-index hashrates and difficulty adjustments later
mining.reindexHashrateRequested = true;
mining.reindexDifficultyAdjustmentRequested = true;
}
}

View File

@ -0,0 +1,41 @@
import { Application, Request, Response } from 'express';
import config from '../../config';
import pricesUpdater from '../../tasks/price-updater';
import logger from '../../logger';
import PricesRepository from '../../repositories/PricesRepository';
class PricesRoutes {
public initRoutes(app: Application): void {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'prices', this.$getCurrentPrices.bind(this))
.get(config.MEMPOOL.API_URL_PREFIX + 'internal/usd-price-history', this.$getAllPrices.bind(this))
;
}
private $getCurrentPrices(req: Request, res: Response): void {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 360_0000 / config.MEMPOOL.PRICE_UPDATES_PER_HOUR).toUTCString());
res.json(pricesUpdater.getLatestPrices());
}
private async $getAllPrices(req: Request, res: Response): Promise<void> {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 360_0000 / config.MEMPOOL.PRICE_UPDATES_PER_HOUR).toUTCString());
try {
const usdPriceHistory = await PricesRepository.$getPricesTimesAndId();
const responseData = usdPriceHistory.map(p => {
return { time: p.time, USD: p.USD };
});
res.status(200).json(responseData);
} catch (e: any) {
logger.err(`Exception ${e} in PricesRoutes::$getAllPrices. Code: ${e.code}. Message: ${e.message}`);
res.status(403).send();
}
}
}
export default new PricesRoutes();

View File

@ -1,15 +1,18 @@
import config from "../config";
import logger from "../logger";
import { MempoolTransactionExtended, TransactionStripped } from "../mempool.interfaces";
import bitcoinApi from './bitcoin/bitcoin-api-factory';
import { IEsploraApi } from "./bitcoin/esplora-api.interface";
import { Common } from "./common";
import redisCache from "./redis-cache";
interface RbfTransaction extends TransactionStripped {
export interface RbfTransaction extends TransactionStripped {
rbf?: boolean;
mined?: boolean;
fullRbf?: boolean;
}
interface RbfTree {
export interface RbfTree {
tx: RbfTransaction;
time: number;
interval?: number;
@ -28,6 +31,35 @@ export interface ReplacementInfo {
newVsize: number;
}
enum CacheOp {
Remove = 0,
Add = 1,
Change = 2,
}
interface CacheEvent {
op: CacheOp;
type: 'tx' | 'tree' | 'exp';
txid: string,
value?: any,
}
/**
* Singleton for tracking RBF trees
*
* Maintains a set of RBF trees, where each tree represents a sequence of
* consecutive RBF replacements.
*
* Trees are identified by the txid of the root transaction.
*
* To maintain consistency, the following invariants must be upheld:
* - Symmetry: replacedBy(A) = B <=> A in replaces(B)
* - Unique id: treeMap(treeMap(X)) = treeMap(X)
* - Unique tree: A in replaces(B) => treeMap(A) == treeMap(B)
* - Existence: X in treeMap => treeMap(X) in rbfTrees
* - Completeness: X in replacedBy => X in treeMap, Y in replaces => Y in treeMap
*/
class RbfCache {
private replacedBy: Map<string, string> = new Map();
private replaces: Map<string, string[]> = new Map();
@ -36,20 +68,71 @@ class RbfCache {
private treeMap: Map<string, string> = new Map(); // map of txids to sequence ids
private txs: Map<string, MempoolTransactionExtended> = new Map();
private expiring: Map<string, number> = new Map();
private cacheQueue: CacheEvent[] = [];
private evictionCount = 0;
private staleCount = 0;
constructor() {
setInterval(this.cleanup.bind(this), 1000 * 60 * 10);
}
/**
* Low level cache operations
*/
private addTx(txid: string, tx: MempoolTransactionExtended): void {
this.txs.set(txid, tx);
this.cacheQueue.push({ op: CacheOp.Add, type: 'tx', txid });
}
private addTree(txid: string, tree: RbfTree): void {
this.rbfTrees.set(txid, tree);
this.dirtyTrees.add(txid);
this.cacheQueue.push({ op: CacheOp.Add, type: 'tree', txid });
}
private addExpiration(txid: string, expiry: number): void {
this.expiring.set(txid, expiry);
this.cacheQueue.push({ op: CacheOp.Add, type: 'exp', txid, value: expiry });
}
private removeTx(txid: string): void {
this.txs.delete(txid);
this.cacheQueue.push({ op: CacheOp.Remove, type: 'tx', txid });
}
private removeTree(txid: string): void {
this.rbfTrees.delete(txid);
this.cacheQueue.push({ op: CacheOp.Remove, type: 'tree', txid });
}
private removeExpiration(txid: string): void {
this.expiring.delete(txid);
this.cacheQueue.push({ op: CacheOp.Remove, type: 'exp', txid });
}
/**
* Basic data structure operations
* must uphold tree invariants
*/
public add(replaced: MempoolTransactionExtended[], newTxExtended: MempoolTransactionExtended): void {
if (!newTxExtended || !replaced?.length || this.txs.has(newTxExtended.txid)) {
if ( !newTxExtended
|| !replaced?.length
|| this.txs.has(newTxExtended.txid)
|| !(replaced.some(tx => !this.replacedBy.has(tx.txid)))
) {
return;
}
newTxExtended.replacement = true;
const newTx = Common.stripTransaction(newTxExtended) as RbfTransaction;
const newTime = newTxExtended.firstSeen || (Date.now() / 1000);
newTx.rbf = newTxExtended.vin.some((v) => v.sequence < 0xfffffffe);
this.txs.set(newTx.txid, newTxExtended);
this.addTx(newTx.txid, newTxExtended);
// maintain rbf trees
let txFullRbf = false;
@ -61,12 +144,16 @@ class RbfCache {
if (!replacedTx.rbf) {
txFullRbf = true;
}
if (this.replacedBy.has(replacedTx.txid)) {
// should never happen
continue;
}
this.replacedBy.set(replacedTx.txid, newTx.txid);
if (this.treeMap.has(replacedTx.txid)) {
const treeId = this.treeMap.get(replacedTx.txid);
if (treeId) {
const tree = this.rbfTrees.get(treeId);
this.rbfTrees.delete(treeId);
this.removeTree(treeId);
if (tree) {
tree.interval = newTime - tree?.time;
replacedTrees.push(tree);
@ -83,21 +170,67 @@ class RbfCache {
replaces: [],
});
treeFullRbf = treeFullRbf || !replacedTx.rbf;
this.txs.set(replacedTx.txid, replacedTxExtended);
this.addTx(replacedTx.txid, replacedTxExtended);
}
}
newTx.fullRbf = txFullRbf;
const treeId = replacedTrees[0].tx.txid;
const newTree = {
tx: newTx,
time: newTime,
fullRbf: treeFullRbf,
replaces: replacedTrees
};
this.rbfTrees.set(treeId, newTree);
this.updateTreeMap(treeId, newTree);
this.addTree(newTree.tx.txid, newTree);
this.updateTreeMap(newTree.tx.txid, newTree);
this.replaces.set(newTx.txid, replacedTrees.map(tree => tree.tx.txid));
this.dirtyTrees.add(treeId);
}
public mined(txid): void {
if (!this.txs.has(txid)) {
return;
}
const treeId = this.treeMap.get(txid);
if (treeId && this.rbfTrees.has(treeId)) {
const tree = this.rbfTrees.get(treeId);
if (tree) {
this.setTreeMined(tree, txid);
tree.mined = true;
this.dirtyTrees.add(treeId);
this.cacheQueue.push({ op: CacheOp.Change, type: 'tree', txid: treeId });
}
}
this.evict(txid);
}
// flag a transaction as removed from the mempool
public evict(txid: string, fast: boolean = false): void {
this.evictionCount++;
if (this.txs.has(txid) && (fast || !this.expiring.has(txid))) {
const expiryTime = fast ? Date.now() + (1000 * 60 * 10) : Date.now() + (1000 * 86400); // 24 hours
this.addExpiration(txid, expiryTime);
}
}
/**
* Read-only public interface
*/
public has(txId: string): boolean {
return this.txs.has(txId);
}
public anyInSameTree(txId: string, predicate: (tx: RbfTransaction) => boolean): boolean {
const tree = this.getRbfTree(txId);
if (!tree) {
return false;
}
const txs = this.getTransactionsInTree(tree);
for (const tx of txs) {
if (predicate(tx)) {
return true;
}
}
return false;
}
public getReplacedBy(txId: string): string | undefined {
@ -162,29 +295,6 @@ class RbfCache {
return changes;
}
public mined(txid): void {
if (!this.txs.has(txid)) {
return;
}
const treeId = this.treeMap.get(txid);
if (treeId && this.rbfTrees.has(treeId)) {
const tree = this.rbfTrees.get(treeId);
if (tree) {
this.setTreeMined(tree, txid);
tree.mined = true;
this.dirtyTrees.add(treeId);
}
}
this.evict(txid);
}
// flag a transaction as removed from the mempool
public evict(txid: string, fast: boolean = false): void {
if (this.txs.has(txid) && (fast || !this.expiring.has(txid))) {
this.expiring.set(txid, fast ? Date.now() + (1000 * 60 * 10) : Date.now() + (1000 * 86400)); // 24 hours
}
}
// is the transaction involved in a full rbf replacement?
public isFullRbf(txid: string): boolean {
const treeId = this.treeMap.get(txid);
@ -198,33 +308,38 @@ class RbfCache {
return tree?.fullRbf;
}
/**
* Cache maintenance & utility functions
*/
private cleanup(): void {
const now = Date.now();
for (const txid of this.expiring.keys()) {
if ((this.expiring.get(txid) || 0) < now) {
this.expiring.delete(txid);
this.removeExpiration(txid);
this.remove(txid);
}
}
logger.debug(`rbf cache contains ${this.txs.size} txs, ${this.expiring.size} due to expire`);
logger.debug(`rbf cache contains ${this.txs.size} txs, ${this.rbfTrees.size} trees, ${this.expiring.size} due to expire (${this.evictionCount} newly expired)`);
this.evictionCount = 0;
}
// remove a transaction & all previous versions from the cache
private remove(txid): void {
// don't remove a transaction if a newer version remains in the mempool
if (!this.replacedBy.has(txid)) {
const root = this.treeMap.get(txid);
const replaces = this.replaces.get(txid);
this.replaces.delete(txid);
this.treeMap.delete(txid);
this.txs.delete(txid);
this.expiring.delete(txid);
this.removeTx(txid);
this.removeExpiration(txid);
if (root === txid) {
this.removeTree(txid);
}
for (const tx of (replaces || [])) {
// recursively remove prior versions from the cache
this.replacedBy.delete(tx);
// if this is the id of a tree, remove that too
if (this.treeMap.get(tx) === tx) {
this.rbfTrees.delete(tx);
}
this.remove(tx);
}
}
@ -255,6 +370,33 @@ class RbfCache {
}
}
public async updateCache(): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
// Update the Redis cache by replaying queued events
for (const e of this.cacheQueue) {
if (e.op === CacheOp.Add || e.op === CacheOp.Change) {
let value = e.value;
switch(e.type) {
case 'tx': {
value = this.txs.get(e.txid);
} break;
case 'tree': {
const tree = this.rbfTrees.get(e.txid);
value = tree ? this.exportTree(tree) : null;
} break;
}
if (value != null) {
await redisCache.$setRbfEntry(e.type, e.txid, value);
}
} else if (e.op === CacheOp.Remove) {
await redisCache.$removeRbfEntry(e.type, e.txid);
}
}
this.cacheQueue = [];
}
public dump(): any {
const trees = Array.from(this.rbfTrees.values()).map((tree: RbfTree) => { return this.exportTree(tree); });
@ -265,19 +407,60 @@ class RbfCache {
};
}
public async load({ txs, trees, expiring }): Promise<void> {
txs.forEach(txEntry => {
this.txs.set(txEntry[0], txEntry[1]);
});
for (const deflatedTree of trees) {
await this.importTree(deflatedTree.root, deflatedTree.root, deflatedTree, this.txs);
}
expiring.forEach(expiringEntry => {
if (this.txs.has(expiringEntry[0])) {
this.expiring.set(expiringEntry[0], new Date(expiringEntry[1]).getTime());
public async load({ txs, trees, expiring, mempool, spendMap }): Promise<void> {
try {
txs.forEach(txEntry => {
this.txs.set(txEntry.value.txid, txEntry.value);
});
this.staleCount = 0;
for (const deflatedTree of trees.sort((a, b) => Object.keys(b).length - Object.keys(a).length)) {
const tree = await this.importTree(mempool, deflatedTree.root, deflatedTree.root, deflatedTree, this.txs);
if (tree) {
this.addTree(tree.tx.txid, tree);
this.updateTreeMap(tree.tx.txid, tree);
if (tree.mined) {
this.evict(tree.tx.txid);
}
}
}
});
this.cleanup();
expiring.forEach(expiringEntry => {
if (this.txs.has(expiringEntry.key)) {
this.expiring.set(expiringEntry.key, new Date(expiringEntry.value).getTime());
}
});
this.staleCount = 0;
// connect cached trees to current mempool transactions
const conflicts: Record<string, { replacedBy: MempoolTransactionExtended, replaces: Set<MempoolTransactionExtended> }> = {};
for (const tree of this.rbfTrees.values()) {
const tx = this.getTx(tree.tx.txid);
if (!tx || tree.mined) {
continue;
}
for (const vin of tx.vin) {
const conflict = spendMap.get(`${vin.txid}:${vin.vout}`);
if (conflict && conflict.txid !== tx.txid) {
if (!conflicts[conflict.txid]) {
conflicts[conflict.txid] = {
replacedBy: conflict,
replaces: new Set(),
};
}
conflicts[conflict.txid].replaces.add(tx);
}
}
}
for (const { replacedBy, replaces } of Object.values(conflicts)) {
this.add([...replaces.values()], replacedBy);
}
await this.checkTrees();
logger.debug(`loaded ${txs.length} txs, ${trees.length} trees into rbf cache, ${expiring.length} due to expire, ${this.staleCount} were stale`);
this.cleanup();
} catch (e) {
logger.err('failed to restore RBF cache: ' + (e instanceof Error ? e.message : e));
}
}
exportTree(tree: RbfTree, deflated: any = null) {
@ -301,40 +484,31 @@ class RbfCache {
return deflated;
}
async importTree(root, txid, deflated, txs: Map<string, MempoolTransactionExtended>, mined: boolean = false): Promise<RbfTree | void> {
async importTree(mempool, root, txid, deflated, txs: Map<string, MempoolTransactionExtended>, mined: boolean = false): Promise<RbfTree | void> {
const treeInfo = deflated[txid];
const replaces: RbfTree[] = [];
// check if any transactions in this tree have already been confirmed
mined = mined || treeInfo.mined;
let exists = mined;
if (!mined) {
try {
const apiTx = await bitcoinApi.$getRawTransaction(txid);
if (apiTx) {
exists = true;
}
if (apiTx?.status?.confirmed) {
mined = true;
treeInfo.txMined = true;
this.evict(txid, true);
}
} catch (e) {
// most transactions do not exist
}
// if the root tx is unknown, remove this tree and return early
if (root === txid && !txs.has(txid)) {
this.staleCount++;
this.removeTree(deflated.key);
return;
}
// if the root tx is not in the mempool or the blockchain
// evict this tree as soon as possible
if (root === txid && !exists) {
this.evict(txid, true);
// if this tx is already in the cache, return early
if (this.treeMap.has(txid)) {
this.removeTree(deflated.key);
return;
}
// recursively reconstruct child trees
for (const childId of treeInfo.replaces) {
const replaced = await this.importTree(root, childId, deflated, txs, mined);
const replaced = await this.importTree(mempool, root, childId, deflated, txs, mined);
if (replaced) {
this.replacedBy.set(replaced.tx.txid, txid);
if (mempool[replaced.tx.txid]) {
mempool[replaced.tx.txid].replacement = true;
}
replaces.push(replaced);
if (replaced.mined) {
mined = true;
@ -358,14 +532,64 @@ class RbfCache {
fullRbf: treeInfo.fullRbf,
replaces,
};
this.treeMap.set(txid, root);
if (root === txid) {
this.rbfTrees.set(root, tree);
this.dirtyTrees.add(root);
}
return tree;
}
private async checkTrees(): Promise<void> {
const found: { [txid: string]: boolean } = {};
const txids = Array.from(this.txs.values()).map(tx => tx.txid).filter(txid => {
return !this.expiring.has(txid) && !this.getRbfTree(txid)?.mined;
});
const processTxs = (txs: IEsploraApi.Transaction[]): void => {
for (const tx of txs) {
found[tx.txid] = true;
if (tx.status?.confirmed) {
const tree = this.getRbfTree(tx.txid);
if (tree) {
this.setTreeMined(tree, tx.txid);
tree.mined = true;
this.evict(tx.txid, false);
}
}
}
};
if (config.MEMPOOL.BACKEND === 'esplora') {
let processedCount = 0;
const sliceLength = Math.ceil(config.ESPLORA.BATCH_QUERY_BASE_SIZE / 40);
for (let i = 0; i < Math.ceil(txids.length / sliceLength); i++) {
const slice = txids.slice(i * sliceLength, (i + 1) * sliceLength);
processedCount += slice.length;
try {
const txs = await bitcoinApi.$getRawTransactions(slice);
processTxs(txs);
logger.debug(`fetched and processed ${processedCount} of ${txids.length} cached rbf transactions (${(processedCount / txids.length * 100).toFixed(2)}%)`);
} catch (err) {
logger.err(`failed to fetch or process ${slice.length} cached rbf transactions`);
}
}
} else {
const txs: IEsploraApi.Transaction[] = [];
for (const txid of txids) {
try {
const tx = await bitcoinApi.$getRawTransaction(txid, true, false);
txs.push(tx);
} catch (err) {
// some 404s are expected, so continue quietly
}
}
processTxs(txs);
}
// evict missing transactions
for (const txid of txids) {
if (!found[txid]) {
this.evict(txid, false);
}
}
}
public getLatestRbfSummary(): ReplacementInfo[] {
const rbfList = this.getRbfTrees(false);
return rbfList.slice(0, 6).map(rbfTree => {

View File

@ -0,0 +1,425 @@
import { createClient } from 'redis';
import memPool from './mempool';
import blocks from './blocks';
import logger from '../logger';
import config from '../config';
import { BlockExtended, BlockSummary, MempoolTransactionExtended } from '../mempool.interfaces';
import rbfCache from './rbf-cache';
import transactionUtils from './transaction-utils';
enum NetworkDB {
mainnet = 0,
testnet,
signet,
liquid,
liquidtestnet,
}
class RedisCache {
private client;
private connected = false;
private schemaVersion = 1;
private redisConfig: any;
private pauseFlush: boolean = false;
private cacheQueue: MempoolTransactionExtended[] = [];
private removeQueue: string[] = [];
private rbfCacheQueue: { type: string, txid: string, value: any }[] = [];
private rbfRemoveQueue: { type: string, txid: string }[] = [];
private txFlushLimit: number = 10000;
private ignoreBlocksCache = false;
constructor() {
if (config.REDIS.ENABLED) {
this.redisConfig = {
socket: {
path: config.REDIS.UNIX_SOCKET_PATH
},
database: NetworkDB[config.MEMPOOL.NETWORK],
};
this.$ensureConnected();
setInterval(() => { this.$ensureConnected(); }, 10000);
}
}
private async $ensureConnected(): Promise<boolean> {
if (!this.connected && config.REDIS.ENABLED) {
try {
this.client = createClient(this.redisConfig);
this.client.on('error', async (e) => {
logger.err(`Error in Redis client: ${e instanceof Error ? e.message : e}`);
this.connected = false;
await this.client.disconnect();
});
await this.client.connect().then(async () => {
try {
const version = await this.client.get('schema_version');
this.connected = true;
if (version !== this.schemaVersion) {
// schema changed
// perform migrations or flush DB if necessary
logger.info(`Redis schema version changed from ${version} to ${this.schemaVersion}`);
await this.client.set('schema_version', this.schemaVersion);
}
logger.info(`Redis client connected`);
return true;
} catch (e) {
this.connected = false;
logger.warn('Failed to connect to Redis');
return false;
}
});
await this.$onConnected();
return true;
} catch (e) {
logger.warn('Error connecting to Redis: ' + (e instanceof Error ? e.message : e));
return false;
}
} else {
try {
// test connection
await this.client.get('schema_version');
return true;
} catch (e) {
logger.warn('Lost connection to Redis: ' + (e instanceof Error ? e.message : e));
logger.warn('Attempting to reconnect in 10 seconds');
this.connected = false;
return false;
}
}
}
private async $onConnected(): Promise<void> {
await this.$flushTransactions();
await this.$removeTransactions([]);
await this.$flushRbfQueues();
}
async $updateBlocks(blocks: BlockExtended[]): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
if (!this.connected) {
logger.warn(`Failed to update blocks in Redis cache: Redis is not connected`);
return;
}
try {
await this.client.set('blocks', JSON.stringify(blocks));
logger.debug(`Saved latest blocks to Redis cache`);
} catch (e) {
logger.warn(`Failed to update blocks in Redis cache: ${e instanceof Error ? e.message : e}`);
}
}
async $updateBlockSummaries(summaries: BlockSummary[]): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
if (!this.connected) {
logger.warn(`Failed to update block summaries in Redis cache: Redis is not connected`);
return;
}
try {
await this.client.set('block-summaries', JSON.stringify(summaries));
logger.debug(`Saved latest block summaries to Redis cache`);
} catch (e) {
logger.warn(`Failed to update block summaries in Redis cache: ${e instanceof Error ? e.message : e}`);
}
}
async $addTransaction(tx: MempoolTransactionExtended): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
this.cacheQueue.push(tx);
if (this.cacheQueue.length >= this.txFlushLimit) {
if (!this.pauseFlush) {
await this.$flushTransactions();
}
}
}
async $flushTransactions(): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
if (!this.cacheQueue.length) {
return;
}
if (!this.connected) {
logger.warn(`Failed to add ${this.cacheQueue.length} transactions to Redis cache: Redis not connected`);
return;
}
this.pauseFlush = false;
const toAdd = this.cacheQueue.slice(0, this.txFlushLimit);
try {
const msetData = toAdd.map(tx => {
const minified: any = structuredClone(tx);
delete minified.hex;
for (const vin of minified.vin) {
delete vin.inner_redeemscript_asm;
delete vin.inner_witnessscript_asm;
delete vin.scriptsig_asm;
}
for (const vout of minified.vout) {
delete vout.scriptpubkey_asm;
}
return [`mempool:tx:${tx.txid}`, JSON.stringify(minified)];
});
await this.client.MSET(msetData);
// successful, remove transactions from cache queue
this.cacheQueue = this.cacheQueue.slice(toAdd.length);
logger.debug(`Saved ${toAdd.length} transactions to Redis cache, ${this.cacheQueue.length} left in queue`);
} catch (e) {
logger.warn(`Failed to add ${toAdd.length} transactions to Redis cache: ${e instanceof Error ? e.message : e}`);
this.pauseFlush = true;
}
}
async $removeTransactions(transactions: string[]): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
const toRemove = this.removeQueue.concat(transactions);
this.removeQueue = [];
let failed: string[] = [];
let numRemoved = 0;
if (this.connected) {
const sliceLength = config.REDIS.BATCH_QUERY_BASE_SIZE;
for (let i = 0; i < Math.ceil(toRemove.length / sliceLength); i++) {
const slice = toRemove.slice(i * sliceLength, (i + 1) * sliceLength);
try {
await this.client.unlink(slice.map(txid => `mempool:tx:${txid}`));
numRemoved+= sliceLength;
logger.debug(`Deleted ${slice.length} transactions from the Redis cache`);
} catch (e) {
logger.warn(`Failed to remove ${slice.length} transactions from Redis cache: ${e instanceof Error ? e.message : e}`);
failed = failed.concat(slice);
}
}
// concat instead of replace, in case more txs have been added in the meantime
this.removeQueue = this.removeQueue.concat(failed);
} else {
this.removeQueue = this.removeQueue.concat(toRemove);
}
}
async $setRbfEntry(type: string, txid: string, value: any): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
if (!this.connected) {
this.rbfCacheQueue.push({ type, txid, value });
logger.warn(`Failed to set RBF ${type} in Redis cache: Redis is not connected`);
return;
}
try {
await this.client.set(`rbf:${type}:${txid}`, JSON.stringify(value));
} catch (e) {
logger.warn(`Failed to set RBF ${type} in Redis cache: ${e instanceof Error ? e.message : e}`);
}
}
async $removeRbfEntry(type: string, txid: string): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
if (!this.connected) {
this.rbfRemoveQueue.push({ type, txid });
logger.warn(`Failed to remove RBF ${type} from Redis cache: Redis is not connected`);
return;
}
try {
await this.client.unlink(`rbf:${type}:${txid}`);
} catch (e) {
logger.warn(`Failed to remove RBF ${type} from Redis cache: ${e instanceof Error ? e.message : e}`);
}
}
private async $flushRbfQueues(): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
if (!this.connected) {
return;
}
try {
const toAdd = this.rbfCacheQueue;
this.rbfCacheQueue = [];
for (const { type, txid, value } of toAdd) {
await this.$setRbfEntry(type, txid, value);
}
logger.debug(`Saved ${toAdd.length} queued RBF entries to the Redis cache`);
const toRemove = this.rbfRemoveQueue;
this.rbfRemoveQueue = [];
for (const { type, txid } of toRemove) {
await this.$removeRbfEntry(type, txid);
}
logger.debug(`Removed ${toRemove.length} queued RBF entries from the Redis cache`);
} catch (e) {
logger.warn(`Failed to flush RBF cache event queues after reconnecting to Redis: ${e instanceof Error ? e.message : e}`);
}
}
async $getBlocks(): Promise<BlockExtended[]> {
if (!config.REDIS.ENABLED) {
return [];
}
if (!this.connected) {
logger.warn(`Failed to retrieve blocks from Redis cache: Redis is not connected`);
return [];
}
try {
const json = await this.client.get('blocks');
return JSON.parse(json);
} catch (e) {
logger.warn(`Failed to retrieve blocks from Redis cache: ${e instanceof Error ? e.message : e}`);
return [];
}
}
async $getBlockSummaries(): Promise<BlockSummary[]> {
if (!config.REDIS.ENABLED) {
return [];
}
if (!this.connected) {
logger.warn(`Failed to retrieve blocks from Redis cache: Redis is not connected`);
return [];
}
try {
const json = await this.client.get('block-summaries');
return JSON.parse(json);
} catch (e) {
logger.warn(`Failed to retrieve blocks from Redis cache: ${e instanceof Error ? e.message : e}`);
return [];
}
}
async $getMempool(): Promise<{ [txid: string]: MempoolTransactionExtended }> {
if (!config.REDIS.ENABLED) {
return {};
}
if (!this.connected) {
logger.warn(`Failed to retrieve mempool from Redis cache: Redis is not connected`);
return {};
}
const start = Date.now();
const mempool = {};
try {
const mempoolList = await this.scanKeys<MempoolTransactionExtended>('mempool:tx:*');
for (const tx of mempoolList) {
mempool[tx.key] = tx.value;
}
logger.info(`Loaded mempool from Redis cache in ${Date.now() - start} ms`);
return mempool || {};
} catch (e) {
logger.warn(`Failed to retrieve mempool from Redis cache: ${e instanceof Error ? e.message : e}`);
}
return {};
}
async $getRbfEntries(type: string): Promise<any[]> {
if (!config.REDIS.ENABLED) {
return [];
}
if (!this.connected) {
logger.warn(`Failed to retrieve Rbf ${type}s from Redis cache: Redis is not connected`);
return [];
}
try {
const rbfEntries = await this.scanKeys<MempoolTransactionExtended[]>(`rbf:${type}:*`);
return rbfEntries;
} catch (e) {
logger.warn(`Failed to retrieve Rbf ${type}s from Redis cache: ${e instanceof Error ? e.message : e}`);
return [];
}
}
async $loadCache(): Promise<void> {
if (!config.REDIS.ENABLED) {
return;
}
logger.info('Restoring mempool and blocks data from Redis cache');
// Load mempool
const loadedMempool = await this.$getMempool();
this.inflateLoadedTxs(loadedMempool);
// Load rbf data
const rbfTxs = await this.$getRbfEntries('tx');
const rbfTrees = await this.$getRbfEntries('tree');
const rbfExpirations = await this.$getRbfEntries('exp');
// Load & set block data
if (!this.ignoreBlocksCache) {
const loadedBlocks = await this.$getBlocks();
const loadedBlockSummaries = await this.$getBlockSummaries();
blocks.setBlocks(loadedBlocks || []);
blocks.setBlockSummaries(loadedBlockSummaries || []);
}
// Set other data
await memPool.$setMempool(loadedMempool);
await rbfCache.load({
txs: rbfTxs,
trees: rbfTrees.map(loadedTree => { loadedTree.value.key = loadedTree.key; return loadedTree.value; }),
expiring: rbfExpirations,
mempool: memPool.getMempool(),
spendMap: memPool.getSpendMap(),
});
}
private inflateLoadedTxs(mempool: { [txid: string]: MempoolTransactionExtended }): void {
for (const tx of Object.values(mempool)) {
for (const vin of tx.vin) {
if (vin.scriptsig) {
vin.scriptsig_asm = transactionUtils.convertScriptSigAsm(vin.scriptsig);
transactionUtils.addInnerScriptsToVin(vin);
}
}
for (const vout of tx.vout) {
if (vout.scriptpubkey) {
vout.scriptpubkey_asm = transactionUtils.convertScriptSigAsm(vout.scriptpubkey);
}
}
}
}
private async scanKeys<T>(pattern): Promise<{ key: string, value: T }[]> {
logger.info(`loading Redis entries for ${pattern}`);
let keys: string[] = [];
const result: { key: string, value: T }[] = [];
const patternLength = pattern.length - 1;
let count = 0;
const processValues = async (keys): Promise<void> => {
const values = await this.client.MGET(keys);
for (let i = 0; i < values.length; i++) {
if (values[i]) {
result.push({ key: keys[i].slice(patternLength), value: JSON.parse(values[i]) });
count++;
}
}
logger.info(`loaded ${count} entries from Redis cache`);
};
for await (const key of this.client.scanIterator({
MATCH: pattern,
COUNT: 100
})) {
keys.push(key);
if (keys.length >= 10000) {
await processValues(keys);
keys = [];
}
}
if (keys.length) {
await processValues(keys);
}
return result;
}
public setIgnoreBlocksCache(): void {
this.ignoreBlocksCache = true;
}
}
export default new RedisCache();

View File

@ -0,0 +1,322 @@
import { WebSocket } from 'ws';
import config from '../../config';
import logger from '../../logger';
import { BlockExtended } from '../../mempool.interfaces';
import axios from 'axios';
import mempool from '../mempool';
import websocketHandler from '../websocket-handler';
type MyAccelerationStatus = 'requested' | 'accelerating' | 'done';
export interface Acceleration {
txid: string,
added: number,
effectiveVsize: number,
effectiveFee: number,
feeDelta: number,
pools: number[],
positions?: {
[pool: number]: {
block: number,
vbytes: number,
},
},
};
export interface AccelerationHistory {
txid: string,
status: string,
feePaid: number,
added: number,
lastUpdated: number,
baseFee: number,
vsizeFee: number,
effectiveFee: number,
effectiveVsize: number,
feeDelta: number,
blockHash: string,
blockHeight: number,
pools: number[];
};
class AccelerationApi {
private ws: WebSocket | null = null;
private useWebsocket: boolean = config.MEMPOOL.OFFICIAL && config.MEMPOOL_SERVICES.ACCELERATIONS;
private startedWebsocketLoop: boolean = false;
private websocketConnected: boolean = false;
private onDemandPollingEnabled = !config.MEMPOOL_SERVICES.ACCELERATIONS;
private apiPath = config.MEMPOOL.OFFICIAL ? (config.MEMPOOL_SERVICES.API + '/accelerator/accelerations') : (config.EXTERNAL_DATA_SERVER.MEMPOOL_API + '/accelerations');
private websocketPath = config.MEMPOOL_SERVICES?.API ? `${config.MEMPOOL_SERVICES.API.replace('https://', 'wss://').replace('http://', 'ws://')}/accelerator/ws` : '/';
private _accelerations: Record<string, Acceleration> = {};
private lastPoll = 0;
private lastPing = Date.now();
private lastPong = Date.now();
private forcePoll = false;
private myAccelerations: Record<string, { status: MyAccelerationStatus, added: number, acceleration?: Acceleration }> = {};
public constructor() {}
public getAccelerations(): Record<string, Acceleration> {
return this._accelerations;
}
public countMyAccelerationsWithStatus(filter: MyAccelerationStatus): number {
return Object.values(this.myAccelerations).reduce((count, {status}) => { return count + (status === filter ? 1 : 0); }, 0);
}
public accelerationRequested(txid: string): void {
if (this.onDemandPollingEnabled) {
this.myAccelerations[txid] = { status: 'requested', added: Date.now() };
}
}
public accelerationConfirmed(): void {
this.forcePoll = true;
}
private async $fetchAccelerations(): Promise<Acceleration[] | null> {
try {
const response = await axios.get(this.apiPath, { responseType: 'json', timeout: 10000 });
return response?.data || [];
} catch (e) {
logger.warn('Failed to fetch current accelerations from the mempool services backend: ' + (e instanceof Error ? e.message : e));
return null;
}
}
public async $updateAccelerations(): Promise<Record<string, Acceleration> | null> {
if (this.useWebsocket && this.websocketConnected) {
return this._accelerations;
}
if (!this.onDemandPollingEnabled) {
const accelerations = await this.$fetchAccelerations();
if (accelerations) {
const latestAccelerations = {};
for (const acc of accelerations) {
latestAccelerations[acc.txid] = acc;
}
this._accelerations = latestAccelerations;
return this._accelerations;
}
} else {
return this.$updateAccelerationsOnDemand();
}
return null;
}
private async $updateAccelerationsOnDemand(): Promise<Record<string, Acceleration> | null> {
const shouldUpdate = this.forcePoll
|| this.countMyAccelerationsWithStatus('requested') > 0
|| (this.countMyAccelerationsWithStatus('accelerating') > 0 && this.lastPoll < (Date.now() - (10 * 60 * 1000)));
// update accelerations if necessary
if (shouldUpdate) {
const accelerations = await this.$fetchAccelerations();
this.lastPoll = Date.now();
this.forcePoll = false;
if (accelerations) {
const latestAccelerations: Record<string, Acceleration> = {};
// set relevant accelerations to 'accelerating'
for (const acc of accelerations) {
if (this.myAccelerations[acc.txid]) {
latestAccelerations[acc.txid] = acc;
this.myAccelerations[acc.txid] = { status: 'accelerating', added: Date.now(), acceleration: acc };
}
}
// txs that are no longer accelerating are either confirmed or canceled, so mark for expiry
for (const [txid, { status, acceleration }] of Object.entries(this.myAccelerations)) {
if (status === 'accelerating' && !latestAccelerations[txid]) {
this.myAccelerations[txid] = { status: 'done', added: Date.now(), acceleration };
}
}
}
}
// clear expired accelerations (confirmed / failed / not accepted) after 10 minutes
for (const [txid, { status, added }] of Object.entries(this.myAccelerations)) {
if (['requested', 'done'].includes(status) && added < (Date.now() - (1000 * 60 * 10))) {
delete this.myAccelerations[txid];
}
}
const latestAccelerations = {};
for (const acc of Object.values(this.myAccelerations).map(({ acceleration }) => acceleration).filter(acc => acc) as Acceleration[]) {
latestAccelerations[acc.txid] = acc;
}
this._accelerations = latestAccelerations;
return this._accelerations;
}
public async $fetchAccelerationHistory(page?: number, status?: string): Promise<AccelerationHistory[] | null> {
if (config.MEMPOOL_SERVICES.ACCELERATIONS) {
try {
const response = await axios.get(`${config.MEMPOOL_SERVICES.API}/accelerator/accelerations/history`, {
responseType: 'json',
timeout: 10000,
params: {
page,
status,
}
});
return response.data as AccelerationHistory[];
} catch (e) {
logger.warn('Failed to fetch acceleration history from the mempool services backend: ' + (e instanceof Error ? e.message : e));
return null;
}
} else {
return [];
}
}
public isAcceleratedBlock(block: BlockExtended, accelerations: Acceleration[]): boolean {
let anyAccelerated = false;
for (let i = 0; i < accelerations.length && !anyAccelerated; i++) {
anyAccelerated = anyAccelerated || accelerations[i].pools?.includes(block.extras.pool.id);
}
return anyAccelerated;
}
// get a list of accelerations that have changed between two sets of accelerations
public getAccelerationDelta(oldAccelerationMap: Record<string, Acceleration>, newAccelerationMap: Record<string, Acceleration>): string[] {
const changed: string[] = [];
const mempoolCache = mempool.getMempool();
for (const acceleration of Object.values(newAccelerationMap)) {
// skip transactions we don't know about
if (!mempoolCache[acceleration.txid]) {
continue;
}
if (oldAccelerationMap[acceleration.txid] == null) {
// new acceleration
changed.push(acceleration.txid);
} else {
if (oldAccelerationMap[acceleration.txid].feeDelta !== acceleration.feeDelta) {
// feeDelta changed
changed.push(acceleration.txid);
} else if (oldAccelerationMap[acceleration.txid].pools?.length) {
let poolsChanged = false;
const pools = new Set();
oldAccelerationMap[acceleration.txid].pools.forEach(pool => {
pools.add(pool);
});
acceleration.pools.forEach(pool => {
if (!pools.has(pool)) {
poolsChanged = true;
} else {
pools.delete(pool);
}
});
if (pools.size > 0) {
poolsChanged = true;
}
if (poolsChanged) {
// pools changed
changed.push(acceleration.txid);
}
}
}
}
for (const oldTxid of Object.keys(oldAccelerationMap)) {
if (!newAccelerationMap[oldTxid]) {
// removed
changed.push(oldTxid);
}
}
return changed;
}
private handleWebsocketMessage(msg: any): void {
if (msg?.accelerations !== null) {
const latestAccelerations = {};
for (const acc of msg?.accelerations || []) {
latestAccelerations[acc.txid] = acc;
}
this._accelerations = latestAccelerations;
websocketHandler.handleAccelerationsChanged(this._accelerations);
}
}
public async connectWebsocket(): Promise<void> {
if (this.startedWebsocketLoop) {
return;
}
while (this.useWebsocket) {
this.startedWebsocketLoop = true;
if (!this.ws) {
this.ws = new WebSocket(this.websocketPath);
this.lastPing = 0;
this.ws.on('open', () => {
logger.info(`Acceleration websocket opened to ${this.websocketPath}`);
this.websocketConnected = true;
this.ws?.send(JSON.stringify({
'watch-accelerations': true
}));
});
this.ws.on('error', (error) => {
let errMsg = `Acceleration websocket error on ${this.websocketPath}: ${error['code']}`;
if (error['errors']) {
errMsg += ' - ' + error['errors'].join(' - ');
}
logger.err(errMsg);
this.ws = null;
this.websocketConnected = false;
});
this.ws.on('close', () => {
logger.info('Acceleration websocket closed');
this.ws = null;
this.websocketConnected = false;
});
this.ws.on('message', (data, isBinary) => {
try {
const msg = (isBinary ? data : data.toString()) as string;
const parsedMsg = msg?.length ? JSON.parse(msg) : null;
this.handleWebsocketMessage(parsedMsg);
} catch (e) {
logger.warn('Failed to parse acceleration websocket message: ' + (e instanceof Error ? e.message : e));
}
});
this.ws.on('ping', () => {
logger.debug('received ping from acceleration websocket server');
});
this.ws.on('pong', () => {
logger.debug('received pong from acceleration websocket server');
this.lastPong = Date.now();
});
} else if (this.websocketConnected) {
if (this.lastPing && this.lastPing > this.lastPong && (Date.now() - this.lastPing > 10000)) {
logger.warn('No pong received within 10 seconds, terminating connection');
try {
this.ws?.terminate();
} catch (e) {
logger.warn('failed to terminate acceleration websocket connection: ' + (e instanceof Error ? e.message : e));
} finally {
this.ws = null;
this.websocketConnected = false;
this.lastPing = 0;
}
} else if (!this.lastPing || (Date.now() - this.lastPing > 30000)) {
logger.debug('sending ping to acceleration websocket server');
if (this.ws?.readyState === WebSocket.OPEN) {
try {
this.ws?.ping();
this.lastPing = Date.now();
} catch (e) {
logger.warn('failed to send ping to acceleration websocket server: ' + (e instanceof Error ? e.message : e));
}
}
}
}
await new Promise(resolve => setTimeout(resolve, 5000));
}
}
}
export default new AccelerationApi();

View File

@ -0,0 +1,27 @@
import { Application, Request, Response } from 'express';
import config from '../../config';
import WalletApi from './wallets';
import { handleError } from '../../utils/api';
class ServicesRoutes {
public initRoutes(app: Application): void {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'wallet/:walletId', this.$getWallet)
;
}
private async $getWallet(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 5).toUTCString());
const walletId = req.params.walletId;
const wallet = await WalletApi.getWallet(walletId);
res.status(200).send(wallet);
} catch (e) {
handleError(req, res, 500, 'Failed to get wallet');
}
}
}
export default new ServicesRoutes();

View File

@ -0,0 +1,105 @@
import { WebSocket } from 'ws';
import logger from '../../logger';
import config from '../../config';
import websocketHandler from '../websocket-handler';
export interface StratumJob {
pool: number;
height: number;
coinbase: string;
scriptsig: string;
reward: number;
jobId: string;
extraNonce: string;
extraNonce2Size: number;
prevHash: string;
coinbase1: string;
coinbase2: string;
merkleBranches: string[];
version: string;
bits: string;
time: string;
timestamp: number;
cleanJobs: boolean;
received: number;
}
function isStratumJob(obj: any): obj is StratumJob {
return obj
&& typeof obj === 'object'
&& 'pool' in obj
&& 'prevHash' in obj
&& 'height' in obj
&& 'received' in obj
&& 'version' in obj
&& 'timestamp' in obj
&& 'bits' in obj
&& 'merkleBranches' in obj
&& 'cleanJobs' in obj;
}
class StratumApi {
private ws: WebSocket | null = null;
private runWebsocketLoop: boolean = false;
private startedWebsocketLoop: boolean = false;
private websocketConnected: boolean = false;
private jobs: Record<string, StratumJob> = {};
public constructor() {}
public getJobs(): Record<string, StratumJob> {
return this.jobs;
}
private handleWebsocketMessage(msg: any): void {
if (isStratumJob(msg)) {
this.jobs[msg.pool] = msg;
websocketHandler.handleNewStratumJob(this.jobs[msg.pool]);
}
}
public async connectWebsocket(): Promise<void> {
if (!config.STRATUM.ENABLED) {
return;
}
this.runWebsocketLoop = true;
if (this.startedWebsocketLoop) {
return;
}
while (this.runWebsocketLoop) {
this.startedWebsocketLoop = true;
if (!this.ws) {
this.ws = new WebSocket(`${config.STRATUM.API}`);
this.websocketConnected = true;
this.ws.on('open', () => {
logger.info('Stratum websocket opened');
});
this.ws.on('error', (error) => {
logger.err('Stratum websocket error: ' + error);
this.ws = null;
this.websocketConnected = false;
});
this.ws.on('close', () => {
logger.info('Stratum websocket closed');
this.ws = null;
this.websocketConnected = false;
});
this.ws.on('message', (data, isBinary) => {
try {
const parsedMsg = JSON.parse((isBinary ? data : data.toString()) as string);
this.handleWebsocketMessage(parsedMsg);
} catch (e) {
logger.warn('Failed to parse stratum websocket message: ' + (e instanceof Error ? e.message : e));
}
});
}
await new Promise(resolve => setTimeout(resolve, 5000));
}
}
}
export default new StratumApi();

View File

@ -0,0 +1,153 @@
import config from '../../config';
import logger from '../../logger';
import { IEsploraApi } from '../bitcoin/esplora-api.interface';
import bitcoinApi from '../bitcoin/bitcoin-api-factory';
import axios from 'axios';
import { TransactionExtended } from '../../mempool.interfaces';
interface WalletAddress {
address: string;
active: boolean;
stats: {
funded_txo_count: number;
funded_txo_sum: number;
spent_txo_count: number;
spent_txo_sum: number;
tx_count: number;
};
transactions: IEsploraApi.AddressTxSummary[];
lastSync: number;
}
interface Wallet {
name: string;
addresses: Record<string, WalletAddress>;
lastPoll: number;
}
const POLL_FREQUENCY = 5 * 60 * 1000; // 5 minutes
class WalletApi {
private wallets: Record<string, Wallet> = {};
private syncing = false;
constructor() {
this.wallets = config.WALLETS.ENABLED ? (config.WALLETS.WALLETS as string[]).reduce((acc, wallet) => {
acc[wallet] = { name: wallet, addresses: {}, lastPoll: 0 };
return acc;
}, {} as Record<string, Wallet>) : {};
}
public getWallet(wallet: string): Record<string, WalletAddress> {
return this.wallets?.[wallet]?.addresses || {};
}
// resync wallet addresses from the services backend
async $syncWallets(): Promise<void> {
if (!config.WALLETS.ENABLED || this.syncing) {
return;
}
this.syncing = true;
for (const walletKey of Object.keys(this.wallets)) {
const wallet = this.wallets[walletKey];
if (wallet.lastPoll < (Date.now() - POLL_FREQUENCY)) {
try {
const response = await axios.get(config.MEMPOOL_SERVICES.API + `/wallets/${wallet.name}`);
const addresses: Record<string, WalletAddress> = response.data;
const addressList: WalletAddress[] = Object.values(addresses);
// sync all current addresses
for (const address of addressList) {
await this.$syncWalletAddress(wallet, address);
}
// remove old addresses
for (const address of Object.keys(wallet.addresses)) {
if (!addresses[address]) {
delete wallet.addresses[address];
}
}
wallet.lastPoll = Date.now();
logger.debug(`Synced ${Object.keys(wallet.addresses).length} addresses for wallet ${wallet.name}`);
} catch (e) {
logger.err(`Error syncing wallet ${wallet.name}: ${(e instanceof Error ? e.message : e)}`);
}
}
}
this.syncing = false;
}
// resync address transactions from esplora
async $syncWalletAddress(wallet: Wallet, address: WalletAddress): Promise<void> {
// fetch full transaction data if the address is new or still active and hasn't been synced in the last hour
const refreshTransactions = !wallet.addresses[address.address] || (address.active && (Date.now() - wallet.addresses[address.address].lastSync) > 60 * 60 * 1000);
if (refreshTransactions) {
try {
const summary = await bitcoinApi.$getAddressTransactionSummary(address.address);
const addressInfo = await bitcoinApi.$getAddress(address.address);
const walletAddress: WalletAddress = {
address: address.address,
active: address.active,
transactions: summary,
stats: addressInfo.chain_stats,
lastSync: Date.now(),
};
wallet.addresses[address.address] = walletAddress;
} catch (e) {
logger.err(`Error syncing wallet address ${address.address}: ${(e instanceof Error ? e.message : e)}`);
}
}
}
// check a new block for transactions that affect wallet address balances, and add relevant transactions to wallets
processBlock(block: IEsploraApi.Block, blockTxs: TransactionExtended[]): Record<string, IEsploraApi.Transaction[]> {
const walletTransactions: Record<string, IEsploraApi.Transaction[]> = {};
for (const walletKey of Object.keys(this.wallets)) {
const wallet = this.wallets[walletKey];
walletTransactions[walletKey] = [];
for (const tx of blockTxs) {
const funded: Record<string, number> = {};
const spent: Record<string, number> = {};
const fundedCount: Record<string, number> = {};
const spentCount: Record<string, number> = {};
let anyMatch = false;
for (const vin of tx.vin) {
const address = vin.prevout?.scriptpubkey_address;
if (address && wallet.addresses[address]) {
anyMatch = true;
spent[address] = (spent[address] ?? 0) + (vin.prevout?.value ?? 0);
spentCount[address] = (spentCount[address] ?? 0) + 1;
}
}
for (const vout of tx.vout) {
const address = vout.scriptpubkey_address;
if (address && wallet.addresses[address]) {
anyMatch = true;
funded[address] = (funded[address] ?? 0) + (vout.value ?? 0);
fundedCount[address] = (fundedCount[address] ?? 0) + 1;
}
}
for (const address of Object.keys({ ...funded, ...spent })) {
// update address stats
wallet.addresses[address].stats.tx_count++;
wallet.addresses[address].stats.funded_txo_count += fundedCount[address] || 0;
wallet.addresses[address].stats.spent_txo_count += spentCount[address] || 0;
wallet.addresses[address].stats.funded_txo_sum += funded[address] || 0;
wallet.addresses[address].stats.spent_txo_sum += spent[address] || 0;
// add tx to summary
const txSummary: IEsploraApi.AddressTxSummary = {
txid: tx.txid,
value: (funded[address] ?? 0) - (spent[address] ?? 0),
height: block.height,
time: block.timestamp,
};
wallet.addresses[address].transactions?.push(txSummary);
}
if (anyMatch) {
walletTransactions[walletKey].push(tx);
}
}
}
return walletTransactions;
}
}
export default new WalletApi();

View File

@ -15,6 +15,7 @@ class StatisticsApi {
mempool_byte_weight,
fee_data,
total_fee,
min_fee,
vsize_1,
vsize_2,
vsize_3,
@ -54,7 +55,7 @@ class StatisticsApi {
vsize_1800,
vsize_2000
)
VALUES (NOW(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
VALUES (NOW(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)`;
const [result]: any = await DB.query(query);
return result.insertId;
@ -63,7 +64,7 @@ class StatisticsApi {
}
}
public async $create(statistics: Statistic): Promise<number | undefined> {
public async $create(statistics: Statistic, convertToDatetime = false): Promise<number | undefined> {
try {
const query = `INSERT INTO statistics(
added,
@ -73,6 +74,7 @@ class StatisticsApi {
mempool_byte_weight,
fee_data,
total_fee,
min_fee,
vsize_1,
vsize_2,
vsize_3,
@ -112,7 +114,7 @@ class StatisticsApi {
vsize_1800,
vsize_2000
)
VALUES (${statistics.added}, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
VALUES (${convertToDatetime ? `FROM_UNIXTIME(${statistics.added})` : statistics.added}, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
const params: (string | number)[] = [
@ -122,6 +124,7 @@ class StatisticsApi {
statistics.mempool_byte_weight,
statistics.fee_data,
statistics.total_fee,
statistics.min_fee,
statistics.vsize_1,
statistics.vsize_2,
statistics.vsize_3,
@ -171,7 +174,9 @@ class StatisticsApi {
private getQueryForDaysAvg(div: number, interval: string) {
return `SELECT
UNIX_TIMESTAMP(added) as added,
CAST(avg(unconfirmed_transactions) as DOUBLE) as unconfirmed_transactions,
CAST(avg(vbytes_per_second) as DOUBLE) as vbytes_per_second,
CAST(avg(min_fee) as DOUBLE) as min_fee,
CAST(avg(vsize_1) as DOUBLE) as vsize_1,
CAST(avg(vsize_2) as DOUBLE) as vsize_2,
CAST(avg(vsize_3) as DOUBLE) as vsize_3,
@ -219,7 +224,9 @@ class StatisticsApi {
private getQueryForDays(div: number, interval: string) {
return `SELECT
UNIX_TIMESTAMP(added) as added,
CAST(avg(unconfirmed_transactions) as DOUBLE) as unconfirmed_transactions,
CAST(avg(vbytes_per_second) as DOUBLE) as vbytes_per_second,
CAST(avg(min_fee) as DOUBLE) as min_fee,
vsize_1,
vsize_2,
vsize_3,
@ -278,7 +285,7 @@ class StatisticsApi {
public async $list2H(): Promise<OptimizedStatistic[]> {
try {
const query = `SELECT *, UNIX_TIMESTAMP(added) as added FROM statistics ORDER BY statistics.added DESC LIMIT 120`;
const query = `SELECT *, UNIX_TIMESTAMP(added) as added FROM statistics WHERE added BETWEEN DATE_SUB(NOW(), INTERVAL 2 HOUR) AND NOW() ORDER BY statistics.added DESC`;
const [rows] = await DB.query({ sql: query, timeout: this.queryTimeout });
return this.mapStatisticToOptimizedStatistic(rows as Statistic[]);
} catch (e) {
@ -289,7 +296,7 @@ class StatisticsApi {
public async $list24H(): Promise<OptimizedStatistic[]> {
try {
const query = `SELECT *, UNIX_TIMESTAMP(added) as added FROM statistics ORDER BY statistics.added DESC LIMIT 1440`;
const query = `SELECT *, UNIX_TIMESTAMP(added) as added FROM statistics WHERE added BETWEEN DATE_SUB(NOW(), INTERVAL 24 HOUR) AND NOW() ORDER BY statistics.added DESC`;
const [rows] = await DB.query({ sql: query, timeout: this.queryTimeout });
return this.mapStatisticToOptimizedStatistic(rows as Statistic[]);
} catch (e) {
@ -401,9 +408,11 @@ class StatisticsApi {
return statistic.map((s) => {
return {
added: s.added,
count: s.unconfirmed_transactions,
vbytes_per_second: s.vbytes_per_second,
mempool_byte_weight: s.mempool_byte_weight,
total_fee: s.total_fee,
min_fee: s.min_fee,
vsizes: [
s.vsize_1,
s.vsize_2,
@ -447,6 +456,59 @@ class StatisticsApi {
};
});
}
public mapOptimizedStatisticToStatistic(statistic: OptimizedStatistic[]): Statistic[] {
return statistic.map((s) => {
return {
added: s.added,
unconfirmed_transactions: s.count,
tx_per_second: 0,
vbytes_per_second: s.vbytes_per_second,
mempool_byte_weight: s.mempool_byte_weight || 0,
total_fee: s.total_fee || 0,
min_fee: s.min_fee,
fee_data: '',
vsize_1: s.vsizes[0],
vsize_2: s.vsizes[1],
vsize_3: s.vsizes[2],
vsize_4: s.vsizes[3],
vsize_5: s.vsizes[4],
vsize_6: s.vsizes[5],
vsize_8: s.vsizes[6],
vsize_10: s.vsizes[7],
vsize_12: s.vsizes[8],
vsize_15: s.vsizes[9],
vsize_20: s.vsizes[10],
vsize_30: s.vsizes[11],
vsize_40: s.vsizes[12],
vsize_50: s.vsizes[13],
vsize_60: s.vsizes[14],
vsize_70: s.vsizes[15],
vsize_80: s.vsizes[16],
vsize_90: s.vsizes[17],
vsize_100: s.vsizes[18],
vsize_125: s.vsizes[19],
vsize_150: s.vsizes[20],
vsize_175: s.vsizes[21],
vsize_200: s.vsizes[22],
vsize_250: s.vsizes[23],
vsize_300: s.vsizes[24],
vsize_350: s.vsizes[25],
vsize_400: s.vsizes[26],
vsize_500: s.vsizes[27],
vsize_600: s.vsizes[28],
vsize_700: s.vsizes[29],
vsize_800: s.vsizes[30],
vsize_900: s.vsizes[31],
vsize_1000: s.vsizes[32],
vsize_1200: s.vsizes[33],
vsize_1400: s.vsizes[34],
vsize_1600: s.vsizes[35],
vsize_1800: s.vsizes[36],
vsize_2000: s.vsizes[37],
}
});
}
}
export default new StatisticsApi();

View File

@ -1,7 +1,7 @@
import { Application, Request, Response } from 'express';
import config from '../../config';
import statisticsApi from './statistics-api';
import { handleError } from '../../utils/api';
class StatisticsRoutes {
public initRoutes(app: Application) {
app
@ -65,7 +65,7 @@ class StatisticsRoutes {
}
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
handleError(req, res, 500, 'Failed to get statistics');
}
}
}

View File

@ -6,6 +6,7 @@ import statisticsApi from './statistics-api';
class Statistics {
protected intervalTimer: NodeJS.Timer | undefined;
protected lastRun: number = 0;
protected newStatisticsEntryCallback: ((stats: OptimizedStatistic) => void) | undefined;
public setNewStatisticsEntryCallback(fn: (stats: OptimizedStatistic) => void) {
@ -23,15 +24,21 @@ class Statistics {
setTimeout(() => {
this.runStatistics();
this.intervalTimer = setInterval(() => {
this.runStatistics();
this.runStatistics(true);
}, 1 * 60 * 1000);
}, difference);
}
private async runStatistics(): Promise<void> {
public async runStatistics(skipIfRecent = false): Promise<void> {
if (!memPool.isInSync()) {
return;
}
if (skipIfRecent && new Date().getTime() / 1000 - this.lastRun < 30) {
return;
}
this.lastRun = new Date().getTime() / 1000;
const currentMempool = memPool.getMempool();
const txPerSecond = memPool.getTxPerSecond();
const vBytesPerSecond = memPool.getVBytesPerSecond();
@ -89,6 +96,9 @@ class Statistics {
}
});
// get minFee and convert to sats/vb
const minFee = memPool.getMempoolInfo().mempoolminfee * 100000;
try {
const insertId = await statisticsApi.$create({
added: 'NOW()',
@ -98,6 +108,7 @@ class Statistics {
mempool_byte_weight: totalWeight,
total_fee: totalFee,
fee_data: '',
min_fee: minFee,
vsize_1: weightVsizeFees['1'] || 0,
vsize_2: weightVsizeFees['2'] || 0,
vsize_3: weightVsizeFees['3'] || 0,

View File

@ -3,6 +3,9 @@ import { IEsploraApi } from './bitcoin/esplora-api.interface';
import { Common } from './common';
import bitcoinApi, { bitcoinCoreApi } from './bitcoin/bitcoin-api-factory';
import * as bitcoinjs from 'bitcoinjs-lib';
import logger from '../logger';
import config from '../config';
import pLimit from '../utils/p-limit';
class TransactionUtils {
constructor() { }
@ -22,6 +25,23 @@ class TransactionUtils {
};
}
// Wrapper for $getTransactionExtended with an automatic retry direct to Core if the first API request fails.
// Propagates any error from the retry request.
public async $getTransactionExtendedRetry(txid: string, addPrevouts = false, lazyPrevouts = false, forceCore = false, addMempoolData = false): Promise<TransactionExtended> {
try {
const result = await this.$getTransactionExtended(txid, addPrevouts, lazyPrevouts, forceCore, addMempoolData);
if (result) {
return result;
} else {
logger.err(`Cannot fetch tx ${txid}. Reason: backend returned null data`);
}
} catch (e) {
logger.err(`Cannot fetch tx ${txid}. Reason: ` + (e instanceof Error ? e.message : e));
}
// retry direct from Core if first request failed
return this.$getTransactionExtended(txid, addPrevouts, lazyPrevouts, true, addMempoolData);
}
/**
* @param txId
* @param addPrevouts
@ -31,10 +51,17 @@ class TransactionUtils {
public async $getTransactionExtended(txId: string, addPrevouts = false, lazyPrevouts = false, forceCore = false, addMempoolData = false): Promise<TransactionExtended> {
let transaction: IEsploraApi.Transaction;
if (forceCore === true) {
transaction = await bitcoinCoreApi.$getRawTransaction(txId, true);
transaction = await bitcoinCoreApi.$getRawTransaction(txId, false, addPrevouts, lazyPrevouts);
} else {
transaction = await bitcoinApi.$getRawTransaction(txId, false, addPrevouts, lazyPrevouts);
}
if (Common.isLiquid()) {
if (!isFinite(Number(transaction.fee))) {
transaction.fee = Object.values(transaction.fee || {}).reduce((total, output) => total + output, 0);
}
}
if (addMempoolData || !transaction?.status?.confirmed) {
return this.extendMempoolTransaction(transaction);
} else {
@ -46,16 +73,37 @@ class TransactionUtils {
return (await this.$getTransactionExtended(txId, addPrevouts, lazyPrevouts, forceCore, true)) as MempoolTransactionExtended;
}
private extendTransaction(transaction: IEsploraApi.Transaction): TransactionExtended {
public async $getMempoolTransactionsExtended(txids: string[], addPrevouts = false, lazyPrevouts = false, forceCore = false): Promise<MempoolTransactionExtended[]> {
if (forceCore || config.MEMPOOL.BACKEND !== 'esplora') {
const limiter = pLimit(8); // Run 8 requests at a time
const results = await Promise.allSettled(txids.map(
txid => limiter(() => this.$getMempoolTransactionExtended(txid, addPrevouts, lazyPrevouts, forceCore))
));
return results.filter(reply => reply.status === 'fulfilled')
.map(r => (r as PromiseFulfilledResult<MempoolTransactionExtended>).value);
} else {
const transactions = await bitcoinApi.$getMempoolTransactions(txids);
return transactions.map(transaction => {
if (Common.isLiquid()) {
if (!isFinite(Number(transaction.fee))) {
transaction.fee = Object.values(transaction.fee || {}).reduce((total, output) => total + output, 0);
}
}
return this.extendMempoolTransaction(transaction);
});
}
}
public extendTransaction(transaction: IEsploraApi.Transaction): TransactionExtended {
// @ts-ignore
if (transaction.vsize) {
// @ts-ignore
return transaction;
}
const feePerVbytes = Math.max(Common.isLiquid() ? 0.1 : 1,
(transaction.fee || 0) / (transaction.weight / 4));
const feePerVbytes = (transaction.fee || 0) / (transaction.weight / 4);
const transactionExtended: TransactionExtended = Object.assign({
vsize: Math.round(transaction.weight / 4),
vsize: transaction.weight / 4,
feePerVsize: feePerVbytes,
effectiveFeePerVsize: feePerVbytes,
}, transaction);
@ -68,21 +116,20 @@ class TransactionUtils {
public extendMempoolTransaction(transaction: IEsploraApi.Transaction): MempoolTransactionExtended {
const vsize = Math.ceil(transaction.weight / 4);
const fractionalVsize = (transaction.weight / 4);
const sigops = this.countSigops(transaction);
let sigops = Common.isLiquid() ? 0 : (transaction.sigops != null ? transaction.sigops : this.countSigops(transaction));
// https://github.com/bitcoin/bitcoin/blob/e9262ea32a6e1d364fb7974844fadc36f931f8c6/src/policy/policy.cpp#L295-L298
const adjustedVsize = Math.max(fractionalVsize, sigops * 5); // adjusted vsize = Max(weight, sigops * bytes_per_sigop) / witness_scale_factor
const feePerVbytes = Math.max(Common.isLiquid() ? 0.1 : 1,
(transaction.fee || 0) / fractionalVsize);
const adjustedFeePerVsize = Math.max(Common.isLiquid() ? 0.1 : 1,
(transaction.fee || 0) / adjustedVsize);
const feePerVbytes = (transaction.fee || 0) / fractionalVsize;
const adjustedFeePerVsize = (transaction.fee || 0) / adjustedVsize;
const effectiveFeePerVsize = transaction['effectiveFeePerVsize'] || adjustedFeePerVsize || feePerVbytes;
const transactionExtended: MempoolTransactionExtended = Object.assign(transaction, {
order: this.txidToOrdering(transaction.txid),
vsize: Math.round(transaction.weight / 4),
vsize,
adjustedVsize,
sigops,
feePerVsize: feePerVbytes,
adjustedFeePerVsize: adjustedFeePerVsize,
effectiveFeePerVsize: adjustedFeePerVsize,
effectiveFeePerVsize: effectiveFeePerVsize,
});
if (!transactionExtended?.status?.confirmed && !transactionExtended.firstSeen) {
transactionExtended.firstSeen = Math.round((Date.now() / 1000));
@ -99,6 +146,10 @@ class TransactionUtils {
}
public countScriptSigops(script: string, isRawScript: boolean = false, witness: boolean = false): number {
if (!script?.length) {
return 0;
}
let sigops = 0;
// count OP_CHECKSIG and OP_CHECKSIGVERIFY
sigops += (script.match(/OP_CHECKSIG/g)?.length || 0);
@ -109,7 +160,7 @@ class TransactionUtils {
sigops += 20 * (script.match(/OP_CHECKMULTISIG/g)?.length || 0);
} else {
// in redeem scripts and witnesses, worth N if preceded by OP_N, 20 otherwise
const matches = script.matchAll(/(?:OP_(\d+))? OP_CHECKMULTISIG/g);
const matches = script.matchAll(/(?:OP_(?:PUSHNUM_)?(\d+))? OP_CHECKMULTISIG/g);
for (const match of matches) {
const n = parseInt(match[1]);
if (Number.isInteger(n)) {
@ -143,6 +194,12 @@ class TransactionUtils {
sigops += this.countScriptSigops(bitcoinjs.script.toASM(Buffer.from(input.witness[input.witness.length - 1], 'hex')), false, true);
}
break;
case input.prevout.scriptpubkey_type === 'p2sh':
if (input.inner_redeemscript_asm) {
sigops += this.countScriptSigops(input.inner_redeemscript_asm);
}
break;
}
}
}
@ -166,6 +223,203 @@ class TransactionUtils {
16
);
}
public addInnerScriptsToVin(vin: IEsploraApi.Vin): void {
if (!vin.prevout) {
return;
}
if (vin.prevout.scriptpubkey_type === 'p2sh') {
const redeemScript = vin.scriptsig_asm.split(' ').reverse()[0];
vin.inner_redeemscript_asm = this.convertScriptSigAsm(redeemScript);
if (vin.witness && vin.witness.length > 2) {
const witnessScript = vin.witness[vin.witness.length - 1];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
}
if (vin.prevout.scriptpubkey_type === 'v0_p2wsh' && vin.witness) {
const witnessScript = vin.witness[vin.witness.length - 1];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
if (vin.prevout.scriptpubkey_type === 'v1_p2tr' && vin.witness) {
const witnessScript = this.witnessToP2TRScript(vin.witness);
if (witnessScript !== null) {
vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
}
}
public convertScriptSigAsm(hex: string): string {
const buf = Buffer.from(hex, 'hex');
const b: string[] = [];
let i = 0;
while (i < buf.length) {
const op = buf[i];
if (op >= 0x01 && op <= 0x4e) {
i++;
let push: number;
if (op === 0x4c) {
push = buf.readUInt8(i);
b.push('OP_PUSHDATA1');
i += 1;
} else if (op === 0x4d) {
push = buf.readUInt16LE(i);
b.push('OP_PUSHDATA2');
i += 2;
} else if (op === 0x4e) {
push = buf.readUInt32LE(i);
b.push('OP_PUSHDATA4');
i += 4;
} else {
push = op;
b.push('OP_PUSHBYTES_' + push);
}
const data = buf.slice(i, i + push);
if (data.length !== push) {
break;
}
b.push(data.toString('hex'));
i += data.length;
} else {
if (op === 0x00) {
b.push('OP_0');
} else if (op === 0x4f) {
b.push('OP_PUSHNUM_NEG1');
} else if (op === 0xb1) {
b.push('OP_CLTV');
} else if (op === 0xb2) {
b.push('OP_CSV');
} else if (op === 0xba) {
b.push('OP_CHECKSIGADD');
} else {
const opcode = bitcoinjs.script.toASM([ op ]);
if (opcode && op < 0xfd) {
if (/^OP_(\d+)$/.test(opcode)) {
b.push(opcode.replace(/^OP_(\d+)$/, 'OP_PUSHNUM_$1'));
} else {
b.push(opcode);
}
} else {
b.push('OP_RETURN_' + op);
}
}
i += 1;
}
}
return b.join(' ');
}
/**
* This function must only be called when we know the witness we are parsing
* is a taproot witness.
* @param witness An array of hex strings that represents the witness stack of
* the input.
* @returns null if the witness is not a script spend, and the hex string of
* the script item if it is a script spend.
*/
public witnessToP2TRScript(witness: string[]): string | null {
if (witness.length < 2) return null;
// Note: see BIP341 for parsing details of witness stack
// If there are at least two witness elements, and the first byte of the
// last element is 0x50, this last element is called annex a and
// is removed from the witness stack.
const hasAnnex = witness[witness.length - 1].substring(0, 2) === '50';
// If there are at least two witness elements left, script path spending is used.
// Call the second-to-last stack element s, the script.
// (Note: this phrasing from BIP341 assumes we've *removed* the annex from the stack)
if (hasAnnex && witness.length < 3) return null;
const positionOfScript = hasAnnex ? witness.length - 3 : witness.length - 2;
return witness[positionOfScript];
}
// calculate the most parsimonious set of prioritizations given a list of block transactions
// (i.e. the most likely prioritizations and deprioritizations)
public identifyPrioritizedTransactions(transactions: any[], rateKey: string): { prioritized: string[], deprioritized: string[] } {
// find the longest increasing subsequence of transactions
// (adapted from https://en.wikipedia.org/wiki/Longest_increasing_subsequence#Efficient_algorithms)
// should be O(n log n)
const X = transactions.slice(1).reverse().map((tx) => ({ txid: tx.txid, rate: tx[rateKey] })); // standard block order is by *decreasing* effective fee rate, but we want to iterate in increasing order (and skip the coinbase)
if (X.length < 2) {
return { prioritized: [], deprioritized: [] };
}
const N = X.length;
const P: number[] = new Array(N);
const M: number[] = new Array(N + 1);
M[0] = -1; // undefined so can be set to any value
let L = 0;
for (let i = 0; i < N; i++) {
// Binary search for the smallest positive l ≤ L
// such that X[M[l]].effectiveFeePerVsize > X[i].effectiveFeePerVsize
let lo = 1;
let hi = L + 1;
while (lo < hi) {
const mid = lo + Math.floor((hi - lo) / 2); // lo <= mid < hi
if (X[M[mid]].rate > X[i].rate) {
hi = mid;
} else { // if X[M[mid]].effectiveFeePerVsize < X[i].effectiveFeePerVsize
lo = mid + 1;
}
}
// After searching, lo == hi is 1 greater than the
// length of the longest prefix of X[i]
const newL = lo;
// The predecessor of X[i] is the last index of
// the subsequence of length newL-1
P[i] = M[newL - 1];
M[newL] = i;
if (newL > L) {
// If we found a subsequence longer than any we've
// found yet, update L
L = newL;
}
}
// Reconstruct the longest increasing subsequence
// It consists of the values of X at the L indices:
// ..., P[P[M[L]]], P[M[L]], M[L]
const LIS: any[] = new Array(L);
let k = M[L];
for (let j = L - 1; j >= 0; j--) {
LIS[j] = X[k];
k = P[k];
}
const lisMap = new Map<string, number>();
LIS.forEach((tx, index) => lisMap.set(tx.txid, index));
const prioritized: string[] = [];
const deprioritized: string[] = [];
let lastRate = X[0].rate;
for (const tx of X) {
if (lisMap.has(tx.txid)) {
lastRate = tx.rate;
} else {
if (Math.abs(tx.rate - lastRate) < 0.1) {
// skip if the rate is almost the same as the previous transaction
} else if (tx.rate <= lastRate) {
prioritized.push(tx.txid);
} else {
deprioritized.push(tx.txid);
}
}
}
return { prioritized, deprioritized };
}
}
export default new TransactionUtils();

View File

@ -173,10 +173,13 @@ function makeBlockTemplates(mempool: Map<number, CompactThreadTransaction>)
// this block is full
const exceededPackageTries = failures > 1000 && blockWeight > (config.MEMPOOL.BLOCK_WEIGHT_UNITS - 4000);
const queueEmpty = top >= mempoolArray.length && modified.isEmpty();
if ((exceededPackageTries || queueEmpty) && blocks.length < 7) {
// construct this block
if (transactions.length) {
blocks.push(transactions.map(t => t.uid));
} else {
break;
}
// reset for the next block
transactions = [];

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,16 @@ const configFromFile = require(
interface IConfig {
MEMPOOL: {
ENABLED: boolean;
OFFICIAL: boolean;
NETWORK: 'mainnet' | 'testnet' | 'signet' | 'liquid' | 'liquidtestnet';
BACKEND: 'esplora' | 'electrum' | 'none';
HTTP_PORT: number;
UNIX_SOCKET_PATH: string;
SPAWN_CLUSTER_PROCS: number;
API_URL_PREFIX: string;
POLL_RATE_MS: number;
CACHE_DIR: string;
CACHE_ENABLED: boolean;
CLEAR_PROTECTION_MINUTES: number;
RECOMMENDED_FEE_PERCENTILE: number;
BLOCK_WEIGHT_UNITS: number;
@ -19,29 +22,37 @@ interface IConfig {
MEMPOOL_BLOCKS_AMOUNT: number;
INDEXING_BLOCKS_AMOUNT: number;
BLOCKS_SUMMARIES_INDEXING: boolean;
GOGGLES_INDEXING: boolean;
USE_SECOND_NODE_FOR_MINFEE: boolean;
EXTERNAL_ASSETS: string[];
EXTERNAL_MAX_RETRY: number;
EXTERNAL_RETRY_INTERVAL: number;
USER_AGENT: string;
STDOUT_LOG_MIN_PRIORITY: 'emerg' | 'alert' | 'crit' | 'err' | 'warn' | 'notice' | 'info' | 'debug';
AUTOMATIC_BLOCK_REINDEXING: boolean;
AUTOMATIC_POOLS_UPDATE: boolean;
POOLS_JSON_URL: string,
POOLS_JSON_TREE_URL: string,
POOLS_UPDATE_DELAY: number,
AUDIT: boolean;
ADVANCED_GBT_AUDIT: boolean;
ADVANCED_GBT_MEMPOOL: boolean;
RUST_GBT: boolean;
LIMIT_GBT: boolean;
CPFP_INDEXING: boolean;
MAX_BLOCKS_BULK_QUERY: number;
DISK_CACHE_BLOCK_INTERVAL: number;
MAX_PUSH_TX_SIZE_WEIGHT: number;
ALLOW_UNREACHABLE: boolean;
PRICE_UPDATES_PER_HOUR: number;
MAX_TRACKED_ADDRESSES: number;
};
ESPLORA: {
REST_API_URL: string;
UNIX_SOCKET_PATH: string | void | null;
BATCH_QUERY_BASE_SIZE: number;
RETRY_UNIX_SOCKET_AFTER: number;
REQUEST_TIMEOUT: number;
FALLBACK_TIMEOUT: number;
FALLBACK: string[];
MAX_BEHIND_TIP: number;
};
LIGHTNING: {
ENABLED: boolean;
@ -73,6 +84,9 @@ interface IConfig {
USERNAME: string;
PASSWORD: string;
TIMEOUT: number;
COOKIE: boolean;
COOKIE_PATH: string;
DEBUG_LOG_PATH: string;
};
SECOND_CORE_RPC: {
HOST: string;
@ -80,6 +94,8 @@ interface IConfig {
USERNAME: string;
PASSWORD: string;
TIMEOUT: number;
COOKIE: boolean;
COOKIE_PATH: string;
};
DATABASE: {
ENABLED: boolean;
@ -90,6 +106,8 @@ interface IConfig {
USERNAME: string;
PASSWORD: string;
TIMEOUT: number;
PID_DIR: string;
POOL_SIZE: number;
};
SYSLOG: {
ENABLED: boolean;
@ -102,10 +120,6 @@ interface IConfig {
ENABLED: boolean;
TX_PER_SECOND_SAMPLE_PERIOD: number;
};
BISQ: {
ENABLED: boolean;
DATA_PATH: string;
};
SOCKS5PROXY: {
ENABLED: boolean;
USE_ONION: boolean;
@ -114,17 +128,11 @@ interface IConfig {
USERNAME: string;
PASSWORD: string;
};
PRICE_DATA_SERVER: {
TOR_URL: string;
CLEARNET_URL: string;
};
EXTERNAL_DATA_SERVER: {
MEMPOOL_API: string;
MEMPOOL_ONION: string;
LIQUID_API: string;
LIQUID_ONION: string;
BISQ_URL: string;
BISQ_ONION: string;
};
MAXMIND: {
ENABLED: boolean;
@ -136,20 +144,47 @@ interface IConfig {
ENABLED: boolean;
AUDIT: boolean;
AUDIT_START_HEIGHT: number;
STATISTICS: boolean;
STATISTICS_START_TIME: number | string;
SERVERS: string[];
},
MEMPOOL_SERVICES: {
API: string;
ACCELERATIONS: boolean;
},
REDIS: {
ENABLED: boolean;
UNIX_SOCKET_PATH: string;
BATCH_QUERY_BASE_SIZE: number;
},
FIAT_PRICE: {
ENABLED: boolean;
PAID: boolean;
API_KEY: string;
},
WALLETS: {
ENABLED: boolean;
WALLETS: string[];
},
STRATUM: {
ENABLED: boolean;
API: string;
}
}
const defaults: IConfig = {
'MEMPOOL': {
'ENABLED': true,
'OFFICIAL': false,
'NETWORK': 'mainnet',
'BACKEND': 'none',
'HTTP_PORT': 8999,
'UNIX_SOCKET_PATH': '',
'SPAWN_CLUSTER_PROCS': 0,
'API_URL_PREFIX': '/api/v1/',
'POLL_RATE_MS': 2000,
'CACHE_DIR': './cache',
'CACHE_ENABLED': true,
'CLEAR_PROTECTION_MINUTES': 20,
'RECOMMENDED_FEE_PERCENTILE': 50,
'BLOCK_WEIGHT_UNITS': 4000000,
@ -157,29 +192,37 @@ const defaults: IConfig = {
'MEMPOOL_BLOCKS_AMOUNT': 8,
'INDEXING_BLOCKS_AMOUNT': 11000, // 0 = disable indexing, -1 = index all blocks
'BLOCKS_SUMMARIES_INDEXING': false,
'GOGGLES_INDEXING': false,
'USE_SECOND_NODE_FOR_MINFEE': false,
'EXTERNAL_ASSETS': [],
'EXTERNAL_MAX_RETRY': 1,
'EXTERNAL_RETRY_INTERVAL': 0,
'USER_AGENT': 'mempool',
'STDOUT_LOG_MIN_PRIORITY': 'debug',
'AUTOMATIC_BLOCK_REINDEXING': false,
'AUTOMATIC_POOLS_UPDATE': false,
'POOLS_JSON_URL': 'https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json',
'POOLS_JSON_TREE_URL': 'https://api.github.com/repos/mempool/mining-pools/git/trees/master',
'POOLS_UPDATE_DELAY': 604800, // in seconds, default is one week
'AUDIT': false,
'ADVANCED_GBT_AUDIT': false,
'ADVANCED_GBT_MEMPOOL': false,
'RUST_GBT': false,
'RUST_GBT': true,
'LIMIT_GBT': false,
'CPFP_INDEXING': false,
'MAX_BLOCKS_BULK_QUERY': 0,
'DISK_CACHE_BLOCK_INTERVAL': 6,
'MAX_PUSH_TX_SIZE_WEIGHT': 400000,
'ALLOW_UNREACHABLE': true,
'PRICE_UPDATES_PER_HOUR': 1,
'MAX_TRACKED_ADDRESSES': 1,
},
'ESPLORA': {
'REST_API_URL': 'http://127.0.0.1:3000',
'UNIX_SOCKET_PATH': null,
'BATCH_QUERY_BASE_SIZE': 1000,
'RETRY_UNIX_SOCKET_AFTER': 30000,
'REQUEST_TIMEOUT': 10000,
'FALLBACK_TIMEOUT': 5000,
'FALLBACK': [],
'MAX_BEHIND_TIP': 2,
},
'ELECTRUM': {
'HOST': '127.0.0.1',
@ -192,6 +235,9 @@ const defaults: IConfig = {
'USERNAME': 'mempool',
'PASSWORD': 'mempool',
'TIMEOUT': 60000,
'COOKIE': false,
'COOKIE_PATH': '/bitcoin/.cookie',
'DEBUG_LOG_PATH': '',
},
'SECOND_CORE_RPC': {
'HOST': '127.0.0.1',
@ -199,6 +245,8 @@ const defaults: IConfig = {
'USERNAME': 'mempool',
'PASSWORD': 'mempool',
'TIMEOUT': 60000,
'COOKIE': false,
'COOKIE_PATH': '/bitcoin/.cookie'
},
'DATABASE': {
'ENABLED': true,
@ -209,6 +257,8 @@ const defaults: IConfig = {
'USERNAME': 'mempool',
'PASSWORD': 'mempool',
'TIMEOUT': 180000,
'PID_DIR': '',
'POOL_SIZE': 100,
},
'SYSLOG': {
'ENABLED': true,
@ -221,10 +271,6 @@ const defaults: IConfig = {
'ENABLED': true,
'TX_PER_SECOND_SAMPLE_PERIOD': 150
},
'BISQ': {
'ENABLED': false,
'DATA_PATH': '/bisq/statsnode-data/btc_mainnet/db'
},
'LIGHTNING': {
'ENABLED': false,
'BACKEND': 'lnd',
@ -252,17 +298,11 @@ const defaults: IConfig = {
'USERNAME': '',
'PASSWORD': ''
},
'PRICE_DATA_SERVER': {
'TOR_URL': 'http://wizpriceje6q5tdrxkyiazsgu7irquiqjy2dptezqhrtu7l2qelqktid.onion/getAllMarketPrices',
'CLEARNET_URL': 'https://price.bisq.wiz.biz/getAllMarketPrices'
},
'EXTERNAL_DATA_SERVER': {
'MEMPOOL_API': 'https://mempool.space/api/v1',
'MEMPOOL_ONION': 'http://mempoolhqx4isw62xs7abwphsq7ldayuidyx2v2oethdhhj6mlo2r6ad.onion/api/v1',
'LIQUID_API': 'https://liquid.network/api/v1',
'LIQUID_ONION': 'http://liquidmom47f6s3m53ebfxn47p76a6tlnxib3wp6deux7wuzotdr6cyd.onion/api/v1',
'BISQ_URL': 'https://bisq.markets/api',
'BISQ_ONION': 'http://bisqmktse2cabavbr2xjq7xw3h6g5ottemo5rolfcwt6aly6tp5fdryd.onion/api'
'LIQUID_ONION': 'http://liquidmom47f6s3m53ebfxn47p76a6tlnxib3wp6deux7wuzotdr6cyd.onion/api/v1'
},
'MAXMIND': {
'ENABLED': false,
@ -274,7 +314,31 @@ const defaults: IConfig = {
'ENABLED': false,
'AUDIT': false,
'AUDIT_START_HEIGHT': 774000,
'STATISTICS': false,
'STATISTICS_START_TIME': 1481932800,
'SERVERS': [],
},
'MEMPOOL_SERVICES': {
'API': '',
'ACCELERATIONS': false,
},
'REDIS': {
'ENABLED': false,
'UNIX_SOCKET_PATH': '',
'BATCH_QUERY_BASE_SIZE': 5000,
},
'FIAT_PRICE': {
'ENABLED': true,
'PAID': false,
'API_KEY': '',
},
'WALLETS': {
'ENABLED': false,
'WALLETS': [],
},
'STRATUM': {
'ENABLED': false,
'API': 'http://localhost:1234',
}
};
@ -287,15 +351,18 @@ class Config implements IConfig {
DATABASE: IConfig['DATABASE'];
SYSLOG: IConfig['SYSLOG'];
STATISTICS: IConfig['STATISTICS'];
BISQ: IConfig['BISQ'];
LIGHTNING: IConfig['LIGHTNING'];
LND: IConfig['LND'];
CLIGHTNING: IConfig['CLIGHTNING'];
SOCKS5PROXY: IConfig['SOCKS5PROXY'];
PRICE_DATA_SERVER: IConfig['PRICE_DATA_SERVER'];
EXTERNAL_DATA_SERVER: IConfig['EXTERNAL_DATA_SERVER'];
MAXMIND: IConfig['MAXMIND'];
REPLICATION: IConfig['REPLICATION'];
MEMPOOL_SERVICES: IConfig['MEMPOOL_SERVICES'];
REDIS: IConfig['REDIS'];
FIAT_PRICE: IConfig['FIAT_PRICE'];
WALLETS: IConfig['WALLETS'];
STRATUM: IConfig['STRATUM'];
constructor() {
const configs = this.merge(configFromFile, defaults);
@ -307,15 +374,18 @@ class Config implements IConfig {
this.DATABASE = configs.DATABASE;
this.SYSLOG = configs.SYSLOG;
this.STATISTICS = configs.STATISTICS;
this.BISQ = configs.BISQ;
this.LIGHTNING = configs.LIGHTNING;
this.LND = configs.LND;
this.CLIGHTNING = configs.CLIGHTNING;
this.SOCKS5PROXY = configs.SOCKS5PROXY;
this.PRICE_DATA_SERVER = configs.PRICE_DATA_SERVER;
this.EXTERNAL_DATA_SERVER = configs.EXTERNAL_DATA_SERVER;
this.MAXMIND = configs.MAXMIND;
this.REPLICATION = configs.REPLICATION;
this.MEMPOOL_SERVICES = configs.MEMPOOL_SERVICES;
this.REDIS = configs.REDIS;
this.FIAT_PRICE = configs.FIAT_PRICE;
this.WALLETS = configs.WALLETS;
this.STRATUM = configs.STRATUM;
}
merge = (...objects: object[]): IConfig => {

View File

@ -1,7 +1,10 @@
import * as fs from 'fs';
import path from 'path';
import config from './config';
import { createPool, Pool, PoolConnection } from 'mysql2/promise';
import logger from './logger';
import logger, { LogLevel } from './logger';
import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } from 'mysql2/typings/mysql';
import { execSync } from 'child_process';
class DB {
constructor() {
@ -17,7 +20,7 @@ import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } fr
database: config.DATABASE.DATABASE,
user: config.DATABASE.USERNAME,
password: config.DATABASE.PASSWORD,
connectionLimit: 10,
connectionLimit: config.DATABASE.POOL_SIZE,
supportBigNumbers: true,
timezone: '+00:00',
};
@ -30,7 +33,7 @@ import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } fr
}
public async query<T extends RowDataPacket[][] | RowDataPacket[] | OkPacket |
OkPacket[] | ResultSetHeader>(query, params?, connection?: PoolConnection): Promise<[T, FieldPacket[]]>
OkPacket[] | ResultSetHeader>(query, params?, errorLogLevel: LogLevel | 'silent' = 'debug', connection?: PoolConnection): Promise<[T, FieldPacket[]]>
{
this.checkDBFlag();
let hardTimeout;
@ -52,19 +55,38 @@ import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } fr
}).then(result => {
resolve(result);
}).catch(error => {
if (errorLogLevel !== 'silent') {
logger[errorLogLevel](`database query "${query?.sql?.slice(0, 160) || (typeof(query) === 'string' || query instanceof String ? query?.slice(0, 160) : 'unknown query')}" failed!`);
}
reject(error);
}).finally(() => {
clearTimeout(timer);
});
});
} else {
const pool = await this.getPool();
return pool.query(query, params);
try {
const pool = await this.getPool();
return pool.query(query, params);
} catch (e) {
if (errorLogLevel !== 'silent') {
logger[errorLogLevel](`database query "${query?.sql?.slice(0, 160) || (typeof(query) === 'string' || query instanceof String ? query?.slice(0, 160) : 'unknown query')}" failed!`);
}
throw e;
}
}
}
private async $rollbackAtomic(connection: PoolConnection): Promise<void> {
try {
await connection.rollback();
await connection.release();
} catch (e) {
logger.warn('Failed to rollback incomplete db transaction: ' + (e instanceof Error ? e.message : e));
}
}
public async $atomicQuery<T extends RowDataPacket[][] | RowDataPacket[] | OkPacket |
OkPacket[] | ResultSetHeader>(queries: { query, params }[]): Promise<[T, FieldPacket[]][]>
OkPacket[] | ResultSetHeader>(queries: { query, params }[], errorLogLevel: LogLevel | 'silent' = 'debug'): Promise<[T, FieldPacket[]][]>
{
const pool = await this.getPool();
const connection = await pool.getConnection();
@ -73,7 +95,7 @@ import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } fr
const results: [T, FieldPacket[]][] = [];
for (const query of queries) {
const result = await this.query(query.query, query.params, connection) as [T, FieldPacket[]];
const result = await this.query(query.query, query.params, errorLogLevel, connection) as [T, FieldPacket[]];
results.push(result);
}
@ -81,9 +103,8 @@ import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } fr
return results;
} catch (e) {
logger.err('Could not complete db transaction, rolling back: ' + (e instanceof Error ? e.message : e));
connection.rollback();
connection.release();
logger.warn('Could not complete db transaction, rolling back: ' + (e instanceof Error ? e.message : e));
this.$rollbackAtomic(connection);
throw e;
} finally {
connection.release();
@ -101,6 +122,50 @@ import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } fr
}
}
public getPidLock(): boolean {
const filePath = path.join(config.DATABASE.PID_DIR || __dirname, `/mempool-${config.DATABASE.DATABASE}.pid`);
this.enforcePidLock(filePath);
fs.writeFileSync(filePath, `${process.pid}`);
return true;
}
private enforcePidLock(filePath: string): void {
if (fs.existsSync(filePath)) {
const pid = parseInt(fs.readFileSync(filePath, 'utf-8'));
if (pid === process.pid) {
logger.warn('PID file already exists for this process');
return;
}
let cmd;
try {
cmd = execSync(`ps -p ${pid} -o args=`);
} catch (e) {
logger.warn(`Stale PID file at ${filePath}, but no process running on that PID ${pid}`);
return;
}
if (cmd && cmd.toString()?.includes('node')) {
const msg = `Another mempool nodejs process is already running on PID ${pid}`;
logger.err(msg);
throw new Error(msg);
} else {
logger.warn(`Stale PID file at ${filePath}, but the PID ${pid} does not belong to a running mempool instance`);
}
}
}
public releasePidLock(): void {
const filePath = path.join(config.DATABASE.PID_DIR || __dirname, `/mempool-${config.DATABASE.DATABASE}.pid`);
if (fs.existsSync(filePath)) {
const pid = parseInt(fs.readFileSync(filePath, 'utf-8'));
// only release our own pid file
if (pid === process.pid) {
fs.unlinkSync(filePath);
}
}
}
private async getPool(): Promise<Pool> {
if (this.pool === null) {
this.pool = createPool(this.poolConfig);

View File

@ -11,8 +11,6 @@ import memPool from './api/mempool';
import diskCache from './api/disk-cache';
import statistics from './api/statistics/statistics';
import websocketHandler from './api/websocket-handler';
import bisq from './api/bisq/bisq';
import bisqMarkets from './api/bisq/markets';
import logger from './logger';
import backendInfo from './api/backend-info';
import loadingIndicators from './api/loading-indicators';
@ -30,10 +28,11 @@ import generalLightningRoutes from './api/explorer/general.routes';
import lightningStatsUpdater from './tasks/lightning/stats-updater.service';
import networkSyncService from './tasks/lightning/network-sync.service';
import statisticsRoutes from './api/statistics/statistics.routes';
import pricesRoutes from './api/prices/prices.routes';
import miningRoutes from './api/mining/mining-routes';
import bisqRoutes from './api/bisq/bisq.routes';
import liquidRoutes from './api/liquid/liquid.routes';
import bitcoinRoutes from './api/bitcoin/bitcoin.routes';
import servicesRoutes from './api/services/services-routes';
import fundingTxFetcher from './tasks/lightning/sync-tasks/funding-tx-fetcher';
import forensicsService from './tasks/lightning/forensics.service';
import priceUpdater from './tasks/price-updater';
@ -41,10 +40,21 @@ import chainTips from './api/chain-tips';
import { AxiosError } from 'axios';
import v8 from 'v8';
import { formatBytes, getBytesUnit } from './utils/format';
import redisCache from './api/redis-cache';
import accelerationApi from './api/services/acceleration';
import bitcoinCoreRoutes from './api/bitcoin/bitcoin-core.routes';
import bitcoinSecondClient from './api/bitcoin/bitcoin-second-client';
import accelerationRoutes from './api/acceleration/acceleration.routes';
import aboutRoutes from './api/about.routes';
import mempoolBlocks from './api/mempool-blocks';
import walletApi from './api/services/wallets';
import stratumApi from './api/services/stratum';
class Server {
private wss: WebSocket.Server | undefined;
private wssUnixSocket: WebSocket.Server | undefined;
private server: http.Server | undefined;
private serverUnixSocket: http.Server | undefined;
private app: Application;
private currentBackendRetryInterval = 1;
private backendRetryCount = 0;
@ -89,7 +99,24 @@ class Server {
async startServer(worker = false): Promise<void> {
logger.notice(`Starting Mempool Server${worker ? ' (worker)' : ''}... (${backendInfo.getShortCommitHash()})`);
// Register cleanup listeners for exit events
['exit', 'SIGHUP', 'SIGINT', 'SIGTERM', 'SIGUSR1', 'SIGUSR2'].forEach(event => {
process.on(event, () => { this.onExit(event); });
});
process.on('uncaughtException', (error) => {
this.onUnhandledException('uncaughtException', error);
});
process.on('unhandledRejection', (reason, promise) => {
this.onUnhandledException('unhandledRejection', reason);
});
if (config.MEMPOOL.BACKEND === 'esplora') {
bitcoinApi.startHealthChecks();
}
if (config.DATABASE.ENABLED) {
DB.getPidLock();
await DB.checkDbConnection();
try {
if (process.env.npm_config_reindex_blocks === 'true') { // Re-index requests
@ -108,21 +135,31 @@ class Server {
})
.use(express.urlencoded({ extended: true }))
.use(express.text({ type: ['text/plain', 'application/base64'] }))
.use(express.json())
;
if (config.DATABASE.ENABLED) {
if (config.DATABASE.ENABLED && config.FIAT_PRICE.ENABLED) {
await priceUpdater.$initializeLatestPriceWithDb();
}
this.server = http.createServer(this.app);
this.wss = new WebSocket.Server({ server: this.server });
if (config.MEMPOOL.UNIX_SOCKET_PATH) {
this.serverUnixSocket = http.createServer(this.app);
this.wssUnixSocket = new WebSocket.Server({ server: this.serverUnixSocket });
}
this.setUpWebsocketHandling();
await poolsUpdater.updatePoolsJson(); // Needs to be done before loading the disk cache because we sometimes wipe it
await syncAssets.syncAssets$();
await mempoolBlocks.updatePools$();
if (config.MEMPOOL.ENABLED) {
await diskCache.$loadMempoolCache();
if (config.MEMPOOL.CACHE_ENABLED) {
await diskCache.$loadMempoolCache();
} else if (config.REDIS.ENABLED) {
await redisCache.$loadCache();
}
}
if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED && cluster.isPrimary) {
@ -130,14 +167,22 @@ class Server {
}
if (Common.isLiquid()) {
try {
icons.loadIcons();
} catch (e) {
logger.err('Cannot load liquid icons. Ignoring. Reason: ' + (e instanceof Error ? e.message : e));
}
const refreshIcons = () => {
try {
icons.loadIcons();
} catch (e) {
logger.err('Cannot load liquid icons. Ignoring. Reason: ' + (e instanceof Error ? e.message : e));
}
};
// Run once on startup.
refreshIcons();
// Matches crontab refresh interval for asset db.
setInterval(refreshIcons, 3600_000);
}
priceUpdater.$run();
if (config.FIAT_PRICE.ENABLED) {
priceUpdater.$run();
}
await chainTips.updateOrphanedBlocks();
this.setUpHttpApiRoutes();
@ -148,13 +193,6 @@ class Server {
setInterval(() => { this.healthCheck(); }, 2500);
if (config.BISQ.ENABLED) {
bisq.startBisqService();
bisq.setPriceCallbackFunction((price) => websocketHandler.setExtraInitData('bsq-price', price));
blocks.setNewBlockCallback(bisq.handleNewBitcoinBlock.bind(bisq));
bisqMarkets.startBisqService();
}
if (config.LIGHTNING.ENABLED) {
this.$runLightningBackend();
}
@ -166,6 +204,18 @@ class Server {
logger.notice(`Mempool Server is running on port ${config.MEMPOOL.HTTP_PORT}`);
}
});
if (this.serverUnixSocket) {
this.serverUnixSocket.listen(config.MEMPOOL.UNIX_SOCKET_PATH, () => {
if (worker) {
logger.info(`Mempool Server worker #${process.pid} started`);
} else {
logger.notice(`Mempool Server is listening on ${config.MEMPOOL.UNIX_SOCKET_PATH}`);
}
});
}
poolsUpdater.$startService();
}
async runMainUpdateLoop(): Promise<void> {
@ -182,15 +232,26 @@ class Server {
}
}
const newMempool = await bitcoinApi.$getRawMempool();
const minFeeMempool = memPool.limitGBT ? await bitcoinSecondClient.getRawMemPool() : null;
const minFeeTip = memPool.limitGBT ? await bitcoinSecondClient.getBlockCount() : -1;
const latestAccelerations = await accelerationApi.$updateAccelerations();
const numHandledBlocks = await blocks.$updateBlocks();
const pollRate = config.MEMPOOL.POLL_RATE_MS * (indexer.indexerIsRunning() ? 10 : 1);
if (numHandledBlocks === 0) {
await memPool.$updateMempool(newMempool);
await memPool.$updateMempool(newMempool, latestAccelerations, minFeeMempool, minFeeTip, pollRate);
}
indexer.$run();
if (config.WALLETS.ENABLED) {
// might take a while, so run in the background
walletApi.$syncWallets();
}
if (config.FIAT_PRICE.ENABLED) {
priceUpdater.$run();
}
// rerun immediately if we skipped the mempool update, otherwise wait POLL_RATE_MS
const elapsed = Date.now() - start;
const remainingTime = Math.max(0, config.MEMPOOL.POLL_RATE_MS - elapsed)
const remainingTime = Math.max(0, pollRate - elapsed);
setTimeout(this.runMainUpdateLoop.bind(this), numHandledBlocks > 0 ? 0 : remainingTime);
this.backendRetryCount = 0;
} catch (e: any) {
@ -232,12 +293,17 @@ class Server {
setUpWebsocketHandling(): void {
if (this.wss) {
websocketHandler.setWebsocketServer(this.wss);
websocketHandler.addWebsocketServer(this.wss);
}
if (this.wssUnixSocket) {
websocketHandler.addWebsocketServer(this.wssUnixSocket);
}
if (Common.isLiquid() && config.DATABASE.ENABLED) {
blocks.setNewBlockCallback(async () => {
try {
await elementsParser.$parse();
await elementsParser.$updateFederationUtxos();
} catch (e) {
logger.warn('Elements parsing error: ' + (e instanceof Error ? e.message : e));
}
@ -249,21 +315,29 @@ class Server {
memPool.setAsyncMempoolChangedCallback(websocketHandler.$handleMempoolChange.bind(websocketHandler));
blocks.setNewAsyncBlockCallback(websocketHandler.handleNewBlock.bind(websocketHandler));
}
priceUpdater.setRatesChangedCallback(websocketHandler.handleNewConversionRates.bind(websocketHandler));
if (config.FIAT_PRICE.ENABLED) {
priceUpdater.setRatesChangedCallback(websocketHandler.handleNewConversionRates.bind(websocketHandler));
}
loadingIndicators.setProgressChangedCallback(websocketHandler.handleLoadingChanged.bind(websocketHandler));
accelerationApi.connectWebsocket();
if (config.STRATUM.ENABLED) {
stratumApi.connectWebsocket();
}
}
setUpHttpApiRoutes(): void {
bitcoinRoutes.initRoutes(this.app);
if (config.MEMPOOL.OFFICIAL) {
bitcoinCoreRoutes.initRoutes(this.app);
}
pricesRoutes.initRoutes(this.app);
if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED && config.MEMPOOL.ENABLED) {
statisticsRoutes.initRoutes(this.app);
}
if (Common.indexingEnabled() && config.MEMPOOL.ENABLED) {
miningRoutes.initRoutes(this.app);
}
if (config.BISQ.ENABLED) {
bisqRoutes.initRoutes(this.app);
}
if (Common.isLiquid()) {
liquidRoutes.initRoutes(this.app);
}
@ -272,6 +346,15 @@ class Server {
nodesRoutes.initRoutes(this.app);
channelsRoutes.initRoutes(this.app);
}
if (config.MEMPOOL_SERVICES.ACCELERATIONS) {
accelerationRoutes.initRoutes(this.app);
}
if (config.WALLETS.ENABLED) {
servicesRoutes.initRoutes(this.app);
}
if (!config.MEMPOOL.OFFICIAL) {
aboutRoutes.initRoutes(this.app);
}
}
healthCheck(): void {
@ -293,6 +376,25 @@ class Server {
this.lastHeapLogTime = now;
}
}
onExit(exitEvent, code = 0): void {
logger.debug(`onExit for signal: ${exitEvent}`);
if (config.DATABASE.ENABLED) {
DB.releasePidLock();
}
this.server?.close();
this.serverUnixSocket?.close();
this.wss?.close();
if (this.wssUnixSocket) {
this.wssUnixSocket.close();
}
process.exit(code);
}
onUnhandledException(type, error): void {
console.error(`${type}:`, error);
this.onExit(type, 1);
}
}
((): Server => new Server())();

View File

@ -8,6 +8,9 @@ import priceUpdater from './tasks/price-updater';
import PricesRepository from './repositories/PricesRepository';
import config from './config';
import auditReplicator from './replication/AuditReplication';
import statisticsReplicator from './replication/StatisticsReplication';
import AccelerationRepository from './repositories/AccelerationRepository';
import BlocksAuditsRepository from './repositories/BlocksAuditsRepository';
export interface CoreIndex {
name: string;
@ -15,11 +18,18 @@ export interface CoreIndex {
best_block_height: number;
}
type TaskName = 'blocksPrices' | 'coinStatsIndex';
class Indexer {
runIndexer = true;
indexerRunning = false;
tasksRunning: string[] = [];
coreIndexes: CoreIndex[] = [];
private runIndexer = true;
private indexerRunning = false;
private tasksRunning: { [key in TaskName]?: boolean; } = {};
private tasksScheduled: { [key in TaskName]?: NodeJS.Timeout; } = {};
private coreIndexes: CoreIndex[] = [];
public indexerIsRunning(): boolean {
return this.indexerRunning;
}
/**
* Check which core index is available for indexing
@ -69,33 +79,69 @@ class Indexer {
}
}
public async runSingleTask(task: 'blocksPrices' | 'coinStatsIndex'): Promise<void> {
if (!Common.indexingEnabled()) {
return;
}
if (task === 'blocksPrices' && !this.tasksRunning.includes(task) && !['testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) {
this.tasksRunning.push(task);
const lastestPriceId = await PricesRepository.$getLatestPriceId();
if (priceUpdater.historyInserted === false || lastestPriceId === null) {
logger.debug(`Blocks prices indexer is waiting for the price updater to complete`, logger.tags.mining);
setTimeout(() => {
this.tasksRunning = this.tasksRunning.filter(runningTask => runningTask !== task);
this.runSingleTask('blocksPrices');
}, 10000);
} else {
logger.debug(`Blocks prices indexer will run now`, logger.tags.mining);
await mining.$indexBlockPrices();
this.tasksRunning = this.tasksRunning.filter(runningTask => runningTask !== task);
/**
* schedules a single task to run in `timeout` ms
* only one task of each type may be scheduled
*
* @param {TaskName} task - the type of task
* @param {number} timeout - delay in ms
* @param {boolean} replace - `true` replaces any already scheduled task (works like a debounce), `false` ignores subsequent requests (works like a throttle)
*/
public scheduleSingleTask(task: TaskName, timeout: number = 10000, replace = false): void {
if (this.tasksScheduled[task]) {
if (!replace) { //throttle
return;
} else { // debounce
clearTimeout(this.tasksScheduled[task]);
}
}
this.tasksScheduled[task] = setTimeout(async () => {
try {
await this.runSingleTask(task);
} catch (e) {
logger.err(`Unexpected error in scheduled task ${task}: ` + (e instanceof Error ? e.message : e));
} finally {
clearTimeout(this.tasksScheduled[task]);
}
}, timeout);
}
if (task === 'coinStatsIndex' && !this.tasksRunning.includes(task)) {
this.tasksRunning.push(task);
logger.debug(`Indexing coinStatsIndex now`);
await mining.$indexCoinStatsIndex();
this.tasksRunning = this.tasksRunning.filter(runningTask => runningTask !== task);
/**
* Runs a single task immediately
*
* (use `scheduleSingleTask` instead to queue a task to run after some timeout)
*/
public async runSingleTask(task: TaskName): Promise<void> {
if (!Common.indexingEnabled() || this.tasksRunning[task]) {
return;
}
this.tasksRunning[task] = true;
switch (task) {
case 'blocksPrices': {
if (!['testnet', 'signet'].includes(config.MEMPOOL.NETWORK) && config.FIAT_PRICE.ENABLED) {
let lastestPriceId;
try {
lastestPriceId = await PricesRepository.$getLatestPriceId();
} catch (e) {
logger.debug('failed to fetch latest price id from db: ' + (e instanceof Error ? e.message : e));
} if (priceUpdater.historyInserted === false || lastestPriceId === null) {
logger.debug(`Blocks prices indexer is waiting for the price updater to complete`, logger.tags.mining);
this.scheduleSingleTask(task, 10000);
} else {
logger.debug(`Blocks prices indexer will run now`, logger.tags.mining);
await mining.$indexBlockPrices();
}
}
} break;
case 'coinStatsIndex': {
logger.debug(`Indexing coinStatsIndex now`);
await mining.$indexCoinStatsIndex();
} break;
}
this.tasksRunning[task] = false;
}
public async $run(): Promise<void> {
@ -105,6 +151,14 @@ class Indexer {
return;
}
if (config.FIAT_PRICE.ENABLED) {
try {
await priceUpdater.$run();
} catch (e) {
logger.err(`Running priceUpdater failed. Reason: ` + (e instanceof Error ? e.message : e));
}
}
// Do not attempt to index anything unless Bitcoin Core is fully synced
const blockchainInfo = await bitcoinClient.getBlockchainInfo();
if (blockchainInfo.blocks !== blockchainInfo.headers) {
@ -119,8 +173,6 @@ class Indexer {
await this.checkAvailableCoreIndexes();
try {
await priceUpdater.$run();
const chainValid = await blocks.$generateBlockDatabase();
if (chainValid === false) {
// Chain of block hash was invalid, so we need to reindex. Stop here and continue at the next iteration
@ -131,6 +183,7 @@ class Indexer {
}
this.runSingleTask('blocksPrices');
await blocks.$indexCoinbaseAddresses();
await mining.$indexDifficultyAdjustments();
await mining.$generateNetworkHashrateHistory();
await mining.$generatePoolHashrateHistory();
@ -138,6 +191,11 @@ class Indexer {
await blocks.$generateCPFPDatabase();
await blocks.$generateAuditStats();
await auditReplicator.$sync();
await statisticsReplicator.$sync();
await AccelerationRepository.$indexPastAccelerations();
await BlocksAuditsRepository.$migrateAuditsV0toV1();
// do not wait for classify blocks to finish
blocks.$classifyBlocks();
} catch (e) {
this.indexerRunning = false;
logger.err(`Indexer failed, trying again in 10 seconds. Reason: ` + (e instanceof Error ? e.message : e));

View File

@ -35,6 +35,7 @@ class Logger {
public tags = {
mining: 'Mining',
ln: 'Lightning',
goggles: 'Goggles',
};
// @ts-ignore
@ -85,9 +86,6 @@ class Logger {
if (config.LIGHTNING.ENABLED) {
return config.MEMPOOL.NETWORK === 'mainnet' ? 'lightning' : `${config.MEMPOOL.NETWORK}-lightning`;
}
if (config.BISQ.ENABLED) {
return 'bisq';
}
if (config.MEMPOOL.NETWORK && config.MEMPOOL.NETWORK !== 'mainnet') {
return config.MEMPOOL.NETWORK;
}
@ -157,4 +155,6 @@ class Logger {
}
}
export type LogLevel = 'emerg' | 'alert' | 'crit' | 'err' | 'warn' | 'notice' | 'info' | 'debug';
export default new Logger();

Some files were not shown because too many files have changed in this diff Show More