| 
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 |  |  | #!/usr/bin/env zsh | 
					
						
							|  |  |  | hostname=$(hostname) | 
					
						
							| 
									
										
										
										
											2023-02-26 13:54:45 +09:00
										 |  |  | slugs=(`curl -sSL https://${hostname}/api/v1/mining/pools/3y|jq -r -S '(.pools[].slug)'`) | 
					
						
							| 
									
										
										
										
											2022-03-29 11:34:49 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-28 13:04:40 +02:00
										 |  |  | warm() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	echo "$1" | 
					
						
							|  |  |  | 	curl -i -s "$1" | head -1 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 |  |  | while true | 
					
						
							| 
									
										
										
										
											2022-01-28 13:32:03 +00:00
										 |  |  | do for url in / \ | 
					
						
							| 
									
										
										
										
											2022-05-20 20:24:55 +02:00
										 |  |  | 	'/api/v1/blocks' \ | 
					
						
							| 
									
										
										
										
											2022-01-28 13:32:03 +00:00
										 |  |  | 	'/api/v1/statistics/2h' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/24h' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/1w' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/1m' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/statistics/3y' \ | 
					
						
							| 
									
										
										
										
											2023-03-04 18:48:16 +09:00
										 |  |  | 	'/api/v1/statistics/4y' \ | 
					
						
							| 
									
										
										
										
											2023-06-21 09:49:54 -04:00
										 |  |  | 	'/api/v1/statistics/all' \ | 
					
						
							| 
									
										
										
										
											2022-02-02 19:03:07 +09:00
										 |  |  | 	'/api/v1/mining/pools/24h' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/3d' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/1w' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/1m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/pools/all' \ | 
					
						
							| 
									
										
										
										
											2022-02-21 18:01:09 +09:00
										 |  |  | 	'/api/v1/mining/hashrate/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/all' \ | 
					
						
							| 
									
										
										
										
											2022-02-25 10:21:16 +09:00
										 |  |  | 	'/api/v1/mining/hashrate/pools/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/pools/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/pools/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/pools/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/pools/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/hashrate/pools/all' \ | 
					
						
							| 
									
										
										
										
											2022-03-22 12:34:29 +09:00
										 |  |  | 	'/api/v1/mining/reward-stats/144' \ | 
					
						
							| 
									
										
										
										
											2022-04-09 01:17:25 +09:00
										 |  |  | 	'/api/v1/mining/blocks/fees/24h' \ | 
					
						
							| 
									
										
										
										
											2022-04-11 18:17:36 +09:00
										 |  |  | 	'/api/v1/mining/blocks/fees/3d' \ | 
					
						
							| 
									
										
										
										
											2022-04-09 01:17:25 +09:00
										 |  |  | 	'/api/v1/mining/blocks/fees/1w' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fees/1m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fees/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fees/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fees/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fees/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fees/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fees/all' \ | 
					
						
							| 
									
										
										
										
											2022-04-11 21:20:20 +09:00
										 |  |  | 	'/api/v1/mining/blocks/rewards/24h' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/3d' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/1w' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/1m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/rewards/all' \ | 
					
						
							| 
									
										
										
										
											2022-04-15 18:05:58 +09:00
										 |  |  | 	'/api/v1/mining/blocks/fee-rates/24h' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/3d' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/1w' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/1m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/blocks/fee-rates/all' \ | 
					
						
							| 
									
										
										
										
											2022-06-25 12:14:32 +02:00
										 |  |  | 	'/api/v1/mining/difficulty-adjustments/24h' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/3d' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/1w' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/1m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/mining/difficulty-adjustments/all' \ | 
					
						
							| 
									
										
										
										
											2022-08-22 17:55:19 +02:00
										 |  |  | 	'/api/v1/lightning/channels-geo?style=widget' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/channels-geo?style=graph' \ | 
					
						
							| 
									
										
										
										
											2022-08-29 09:46:23 +02:00
										 |  |  | 	'/api/v1/lightning/statistics/latest' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/statistics/1m' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/statistics/3m' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/statistics/6m' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/statistics/1y' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/statistics/2y' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/statistics/3y' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/statistics/all' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp-ranking' \ | 
					
						
							| 
									
										
										
										
											2023-03-10 09:21:44 +09:00
										 |  |  | 	'/api/v1/lightning/nodes/isp/15169,396982' `# Google` \ | 
					
						
							| 
									
										
										
										
											2022-08-29 09:46:23 +02:00
										 |  |  | 	'/api/v1/lightning/nodes/isp/14618,16509' `# Amazon` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/39572' `# DataWeb` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/14061' `# Digital Ocean` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/24940,213230' `# Hetzner` \ | 
					
						
							| 
									
										
										
										
											2022-08-29 23:36:18 +02:00
										 |  |  | 	'/api/v1/lightning/nodes/isp/394745' `# LunaNode` \ | 
					
						
							| 
									
										
										
										
											2022-08-29 09:46:23 +02:00
										 |  |  | 	'/api/v1/lightning/nodes/isp/45102' `# Alibaba` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/3209' `# Vodafone Germany` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/7922' `# Comcast Cable` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/34197' `# SHRD SARL` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/42275' `# Three Fourteen SASU` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/16276' `# OVH SAS` \ | 
					
						
							| 
									
										
										
										
											2023-03-10 09:21:44 +09:00
										 |  |  | 	'/api/v1/lightning/nodes/isp/10796,11351,11426,11427,12271,20001,20115,33363' `# Spectrum` \ | 
					
						
							| 
									
										
										
										
											2022-08-29 09:46:23 +02:00
										 |  |  | 	'/api/v1/lightning/nodes/isp/701' `# Verizon` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/12876' `# Scaleway` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/33915' `# Ziggo` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/3320' `# Deutsche Telekom AG` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/8075' `# Microsoft Azure` \ | 
					
						
							| 
									
										
										
										
											2023-03-10 09:21:44 +09:00
										 |  |  | 	'/api/v1/lightning/nodes/isp/212531', `# UAB Interneto vizija` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/63949', `# Linode` \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/isp/51167', `# Contabo GmbH` \ | 
					
						
							| 
									
										
										
										
											2022-08-29 09:46:23 +02:00
										 |  |  | 	'/api/v1/lightning/nodes/countries' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/rankings' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/rankings/liquidity' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/rankings/connectivity' \ | 
					
						
							|  |  |  | 	'/api/v1/lightning/nodes/rankings/age' \ | 
					
						
							| 
									
										
										
										
											2022-01-28 13:32:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 |  |  | 	do | 
					
						
							| 
									
										
										
										
											2022-08-28 13:04:40 +02:00
										 |  |  | 		warm "https://${hostname}${url}" | 
					
						
							| 
									
										
										
										
											2023-02-21 18:41:12 +09:00
										 |  |  | 		sleep 0.25 # wait 250ms between queries to not DoS mariadb | 
					
						
							| 
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 |  |  | 	done | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-30 01:06:42 +09:00
										 |  |  | 	for slug in $slugs | 
					
						
							| 
									
										
										
										
											2022-03-08 16:55:49 +01:00
										 |  |  | 	do | 
					
						
							| 
									
										
										
										
											2022-08-28 13:04:40 +02:00
										 |  |  | 		warm "https://${hostname}/api/v1/mining/pool/${slug}" | 
					
						
							| 
									
										
										
										
											2023-02-21 18:41:12 +09:00
										 |  |  | 		sleep 0.25 # wait 250ms between queries to not DoS mariadb | 
					
						
							| 
									
										
										
										
											2022-08-28 13:04:40 +02:00
										 |  |  | 		warm "https://${hostname}/api/v1/mining/pool/${slug}/hashrate" | 
					
						
							| 
									
										
										
										
											2023-02-21 18:41:12 +09:00
										 |  |  | 		sleep 0.25 # wait 250ms between queries to not DoS mariadb | 
					
						
							| 
									
										
										
										
											2022-08-28 13:04:40 +02:00
										 |  |  | 		warm "https://${hostname}/api/v1/mining/pool/${slug}/blocks" | 
					
						
							| 
									
										
										
										
											2023-02-21 18:41:12 +09:00
										 |  |  | 		sleep 0.25 # wait 250ms between queries to not DoS mariadb | 
					
						
							| 
									
										
										
										
											2022-03-08 16:55:49 +01:00
										 |  |  | 	done | 
					
						
							| 
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 |  |  | done |