Merge branch 'master' into nymkappa/feature/merge-blocks

This commit is contained in:
wiz 2022-05-25 18:55:13 +09:00 committed by GitHub
commit aac9dda9ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 161 additions and 158 deletions

View File

@ -475,9 +475,9 @@ class BlocksRepository {
public async $getHistoricalBlockFees(div: number, interval: string | null): Promise<any> {
try {
let query = `SELECT
CAST(AVG(height) as INT) as avg_height,
CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(fees) as INT) as avg_fees
CAST(AVG(fees) as INT) as avgFees
FROM blocks`;
if (interval !== null) {
@ -500,9 +500,9 @@ class BlocksRepository {
public async $getHistoricalBlockRewards(div: number, interval: string | null): Promise<any> {
try {
let query = `SELECT
CAST(AVG(height) as INT) as avg_height,
CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(reward) as INT) as avg_rewards
CAST(AVG(reward) as INT) as avgRewards
FROM blocks`;
if (interval !== null) {
@ -525,15 +525,15 @@ class BlocksRepository {
public async $getHistoricalBlockFeeRates(div: number, interval: string | null): Promise<any> {
try {
let query = `SELECT
CAST(AVG(height) as INT) as avg_height,
CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(JSON_EXTRACT(fee_span, '$[0]')) as INT) as avg_fee_0,
CAST(AVG(JSON_EXTRACT(fee_span, '$[1]')) as INT) as avg_fee_10,
CAST(AVG(JSON_EXTRACT(fee_span, '$[2]')) as INT) as avg_fee_25,
CAST(AVG(JSON_EXTRACT(fee_span, '$[3]')) as INT) as avg_fee_50,
CAST(AVG(JSON_EXTRACT(fee_span, '$[4]')) as INT) as avg_fee_75,
CAST(AVG(JSON_EXTRACT(fee_span, '$[5]')) as INT) as avg_fee_90,
CAST(AVG(JSON_EXTRACT(fee_span, '$[6]')) as INT) as avg_fee_100
CAST(AVG(JSON_EXTRACT(fee_span, '$[0]')) as INT) as avgFee_0,
CAST(AVG(JSON_EXTRACT(fee_span, '$[1]')) as INT) as avgFee_10,
CAST(AVG(JSON_EXTRACT(fee_span, '$[2]')) as INT) as avgFee_25,
CAST(AVG(JSON_EXTRACT(fee_span, '$[3]')) as INT) as avgFee_50,
CAST(AVG(JSON_EXTRACT(fee_span, '$[4]')) as INT) as avgFee_75,
CAST(AVG(JSON_EXTRACT(fee_span, '$[5]')) as INT) as avgFee_90,
CAST(AVG(JSON_EXTRACT(fee_span, '$[6]')) as INT) as avgFee_100
FROM blocks`;
if (interval !== null) {
@ -556,9 +556,9 @@ class BlocksRepository {
public async $getHistoricalBlockSizes(div: number, interval: string | null): Promise<any> {
try {
let query = `SELECT
CAST(AVG(height) as INT) as avg_height,
CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(size) as INT) as avg_size
CAST(AVG(size) as INT) as avgSize
FROM blocks`;
if (interval !== null) {
@ -581,9 +581,9 @@ class BlocksRepository {
public async $getHistoricalBlockWeights(div: number, interval: string | null): Promise<any> {
try {
let query = `SELECT
CAST(AVG(height) as INT) as avg_height,
CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(weight) as INT) as avg_weight
CAST(AVG(weight) as INT) as avgWeight
FROM blocks`;
if (interval !== null) {

View File

@ -250,6 +250,10 @@
<img class="image" src="/resources/profile/marina.svg" />
<span>Marina</span>
</a>
<a href="https://github.com/bitcoin-wallet/bitcoin-wallet/" target="_blank" title="Bitcoin Wallet (Schildbach)">
<img class="image" src="/resources/profile/schildbach.svg" />
<span>Schildbach</span>
</a>
</div>
</div>

View File

@ -89,13 +89,13 @@ export class BlockFeeRatesGraphComponent implements OnInit {
};
for (const rate of data.blockFeeRates) {
const timestamp = rate.timestamp * 1000;
seriesData['Min'].push([timestamp, rate.avg_fee_0, rate.avg_height]);
seriesData['10th'].push([timestamp, rate.avg_fee_10, rate.avg_height]);
seriesData['25th'].push([timestamp, rate.avg_fee_25, rate.avg_height]);
seriesData['Median'].push([timestamp, rate.avg_fee_50, rate.avg_height]);
seriesData['75th'].push([timestamp, rate.avg_fee_75, rate.avg_height]);
seriesData['90th'].push([timestamp, rate.avg_fee_90, rate.avg_height]);
seriesData['Max'].push([timestamp, rate.avg_fee_100, rate.avg_height]);
seriesData['Min'].push([timestamp, rate.avgFee_0, rate.avgHeight]);
seriesData['10th'].push([timestamp, rate.avgFee_10, rate.avgHeight]);
seriesData['25th'].push([timestamp, rate.avgFee_25, rate.avgHeight]);
seriesData['Median'].push([timestamp, rate.avgFee_50, rate.avgHeight]);
seriesData['75th'].push([timestamp, rate.avgFee_75, rate.avgHeight]);
seriesData['90th'].push([timestamp, rate.avgFee_90, rate.avgHeight]);
seriesData['Max'].push([timestamp, rate.avgFee_100, rate.avgHeight]);
}
// Prepare chart

View File

@ -71,7 +71,7 @@ export class BlockFeesGraphComponent implements OnInit {
.pipe(
tap((response) => {
this.prepareChartOptions({
blockFees: response.body.map(val => [val.timestamp * 1000, val.avg_fees / 100000000]),
blockFees: response.body.map(val => [val.timestamp * 1000, val.avgFees / 100000000]),
});
this.isLoading = false;
}),

View File

@ -69,7 +69,7 @@ export class BlockRewardsGraphComponent implements OnInit {
.pipe(
tap((response) => {
this.prepareChartOptions({
blockRewards: response.body.map(val => [val.timestamp * 1000, val.avg_rewards / 100000000]),
blockRewards: response.body.map(val => [val.timestamp * 1000, val.avgRewards / 100000000]),
});
this.isLoading = false;
}),

View File

@ -83,8 +83,8 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
tap((response) => {
const data = response.body;
this.prepareChartOptions({
sizes: data.sizes.map(val => [val.timestamp * 1000, val.avg_size / 1000000, val.avg_height]),
weights: data.weights.map(val => [val.timestamp * 1000, val.avg_weight / 1000000, val.avg_height]),
sizes: data.sizes.map(val => [val.timestamp * 1000, val.avgSize / 1000000, val.avgHeight]),
weights: data.weights.map(val => [val.timestamp * 1000, val.avgWeight / 1000000, val.avgHeight]),
});
this.isLoading = false;
}),

View File

@ -1,7 +1,7 @@
<div class="mb-3 d-flex menu" style="padding: 0px 35px;">
<div *ngIf="stateService.env.MINING_DASHBOARD" class="mb-3 d-flex menu" style="padding: 0px 35px;">
<a routerLinkActive="active" class="btn btn-primary w-50 mr-1"
[routerLink]="['/graphs/mempool' | relativeUrl]">Mempool</a>
<div ngbDropdown *ngIf="stateService.env.MINING_DASHBOARD" class="w-50">
<div ngbDropdown class="w-50">
<button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="mining">Mining</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/mining/pools' | relativeUrl]"

View File

@ -198,9 +198,7 @@
display: none;
text-align: right;
width: 20%;
@media (min-width: 376px) {
display: table-cell;
}
display: table-cell;
}
.table-cell-size {
display: none;

View File

@ -3834,34 +3834,34 @@ export const restApiDocsData = [
curl: [`1w`],
response: `[
{
"avg_height": 735644,
"avgHeight": 735644,
"timestamp": 1652119111,
"avg_fees": 24212890
"avgFees": 24212890
},
{
"avg_height": 735646,
"avgHeight": 735646,
"timestamp": 1652120252,
"avg_fees": 21655996
"avgFees": 21655996
},
{
"avg_height": 735648,
"avgHeight": 735648,
"timestamp": 1652121214,
"avg_fees": 20678859
"avgFees": 20678859
},
{
"avg_height": 735649,
"avgHeight": 735649,
"timestamp": 1652121757,
"avg_fees": 21020140
"avgFees": 21020140
},
{
"avg_height": 735650,
"avgHeight": 735650,
"timestamp": 1652122367,
"avg_fees": 23064200
"avgFees": 23064200
},
{
"avg_height": 735652,
"avgHeight": 735652,
"timestamp": 1652122893,
"avg_fees": 17620723
"avgFees": 17620723
},
...
]`
@ -3872,14 +3872,14 @@ export const restApiDocsData = [
curl: [`1w`],
response: `[
{
"avg_height": 2224253,
"avgHeight": 2224253,
"timestamp": 1652346420,
"avg_fees": 211686
"avgFees": 211686
},
{
"avg_height": 2224254,
"avgHeight": 2224254,
"timestamp": 1652346850,
"avg_fees": 2565952
"avgFees": 2565952
},
...
]`
@ -3890,14 +3890,14 @@ export const restApiDocsData = [
curl: [`1w`],
response: `[
{
"avg_height": 89978,
"avgHeight": 89978,
"timestamp": 1652346573,
"avg_fees": 1071
"avgFees": 1071
},
{
"avg_height": 89979,
"avgHeight": 89979,
"timestamp": 1652346970,
"avg_fees": 1224
"avgFees": 1224
},
...
]`
@ -3933,29 +3933,29 @@ export const restApiDocsData = [
curl: [`1d`],
response: `[
{
"avg_height": 599992,
"avgHeight": 599992,
"timestamp": 1571438412,
"avg_rewards": 1260530933
"avgRewards": 1260530933
},
{
"avg_height": 600000,
"avgHeight": 600000,
"timestamp": 1571443398,
"avg_rewards": 1264314538
"avgRewards": 1264314538
},
{
"avg_height": 725441,
"avgHeight": 725441,
"timestamp": 1646139035,
"avg_rewards": 637067563
"avgRewards": 637067563
},
{
"avg_height": 725585,
"avgHeight": 725585,
"timestamp": 1646222444,
"avg_rewards": 646519104
"avgRewards": 646519104
},
{
"avg_height": 725727,
"avgHeight": 725727,
"timestamp": 1646308374,
"avg_rewards": 638709605
"avgRewards": 638709605
},
...
]`
@ -3966,14 +3966,14 @@ export const restApiDocsData = [
curl: [`1d`],
response: `[
{
"avg_height": 12,
"avgHeight": 12,
"timestamp": 1296689648,
"avg_rewards": 5000000000
"avgRewards": 5000000000
},
{
"avg_height": 269,
"avgHeight": 269,
"timestamp": 1296717674,
"avg_rewards": 5000091820
"avgRewards": 5000091820
},
...
]`
@ -3984,14 +3984,14 @@ export const restApiDocsData = [
curl: [`1d`],
response: `[
{
"avg_height": 183,
"avgHeight": 183,
"timestamp": 1598962247,
"avg_rewards": 5000000000
"avgRewards": 5000000000
},
{
"avg_height": 576,
"avgHeight": 576,
"timestamp": 1599047892,
"avg_rewards": 5000000000
"avgRewards": 5000000000
},
...
]`
@ -4029,37 +4029,37 @@ export const restApiDocsData = [
"oldestIndexedBlockTimestamp": 1571434851,
"blockFeeRates": [
{
"avg_height": 732152,
"avgHeight": 732152,
"timestamp": 1650132959,
"avg_fee_0": 1,
"avg_fee_10": 2,
"avg_fee_25": 2,
"avg_fee_50": 3,
"avg_fee_75": 4,
"avg_fee_90": 8,
"avg_fee_100": 393
"avgFee_0": 1,
"avgFee_10": 2,
"avgFee_25": 2,
"avgFee_50": 3,
"avgFee_75": 4,
"avgFee_90": 8,
"avgFee_100": 393
},
{
"avg_height": 732158,
"avgHeight": 732158,
"timestamp": 1650134432,
"avg_fee_0": 1,
"avg_fee_10": 1,
"avg_fee_25": 2,
"avg_fee_50": 4,
"avg_fee_75": 6,
"avg_fee_90": 10,
"avg_fee_100": 240
"avgFee_0": 1,
"avgFee_10": 1,
"avgFee_25": 2,
"avgFee_50": 4,
"avgFee_75": 6,
"avgFee_90": 10,
"avgFee_100": 240
},
{
"avg_height": 732161,
"avgHeight": 732161,
"timestamp": 1650135818,
"avg_fee_0": 1,
"avg_fee_10": 1,
"avg_fee_25": 1,
"avg_fee_50": 2,
"avg_fee_75": 5,
"avg_fee_90": 8,
"avg_fee_100": 251
"avgFee_0": 1,
"avgFee_10": 1,
"avgFee_25": 1,
"avgFee_50": 2,
"avgFee_75": 5,
"avgFee_90": 8,
"avgFee_100": 251
},
...
]
@ -4073,26 +4073,26 @@ export const restApiDocsData = [
"oldestIndexedBlockTimestamp": 1296688602,
"blockFeeRates": [
{
"avg_height": 2196306,
"avgHeight": 2196306,
"timestamp": 1650360168,
"avg_fee_0": 1,
"avg_fee_10": 1,
"avg_fee_25": 1,
"avg_fee_50": 1,
"avg_fee_75": 2,
"avg_fee_90": 28,
"avg_fee_100": 2644
"avgFee_0": 1,
"avgFee_10": 1,
"avgFee_25": 1,
"avgFee_50": 1,
"avgFee_75": 2,
"avgFee_90": 28,
"avgFee_100": 2644
},
{
"avg_height": 2196308,
"avgHeight": 2196308,
"timestamp": 1650361209,
"avg_fee_0": 1,
"avg_fee_10": 1,
"avg_fee_25": 1,
"avg_fee_50": 4,
"avg_fee_75": 12,
"avg_fee_90": 65,
"avg_fee_100": 102
"avgFee_0": 1,
"avgFee_10": 1,
"avgFee_25": 1,
"avgFee_50": 4,
"avgFee_75": 12,
"avgFee_90": 65,
"avgFee_100": 102
},
...
]
@ -4106,26 +4106,26 @@ export const restApiDocsData = [
"oldestIndexedBlockTimestamp": 1598918400,
"blockFeeRates": [
{
"avg_height": 86620,
"avgHeight": 86620,
"timestamp": 1650360010,
"avg_fee_0": 1,
"avg_fee_10": 1,
"avg_fee_25": 1,
"avg_fee_50": 1,
"avg_fee_75": 1,
"avg_fee_90": 1,
"avg_fee_100": 1
"avgFee_0": 1,
"avgFee_10": 1,
"avgFee_25": 1,
"avgFee_50": 1,
"avgFee_75": 1,
"avgFee_90": 1,
"avgFee_100": 1
},
{
"avg_height": 86623,
"avgHeight": 86623,
"timestamp": 1650361330,
"avg_fee_0": 1,
"avg_fee_10": 1,
"avg_fee_25": 1,
"avg_fee_50": 1,
"avg_fee_75": 1,
"avg_fee_90": 1,
"avg_fee_100": 1
"avgFee_0": 1,
"avgFee_10": 1,
"avgFee_25": 1,
"avgFee_50": 1,
"avgFee_75": 1,
"avgFee_90": 1,
"avgFee_100": 1
},
...
]
@ -4163,47 +4163,47 @@ export const restApiDocsData = [
response: `{
"sizes": [
{
"avg_height": 576650,
"avgHeight": 576650,
"timestamp": 1558212081,
"avg_size": 1271404
"avgSize": 1271404
},
{
"avg_height": 576715,
"avgHeight": 576715,
"timestamp": 1558246272,
"avg_size": 1105893
"avgSize": 1105893
},
{
"avg_height": 576797,
"avgHeight": 576797,
"timestamp": 1558289379,
"avg_size": 1141071
"avgSize": 1141071
},
{
"avg_height": 576885,
"avgHeight": 576885,
"timestamp": 1558330184,
"avg_size": 1108166
"avgSize": 1108166
},
...
],
"weights": [
{
"avg_height": 576650,
"avgHeight": 576650,
"timestamp": 1558212081,
"avg_weight": 3994002
"avgWeight": 3994002
},
{
"avg_height": 576715,
"avgHeight": 576715,
"timestamp": 1558246272,
"avg_weight": 3756312
"avgWeight": 3756312
},
{
"avg_height": 576797,
"avgHeight": 576797,
"timestamp": 1558289379,
"avg_weight": 3719625
"avgWeight": 3719625
},
{
"avg_height": 576885,
"avgHeight": 576885,
"timestamp": 1558330184,
"avg_weight": 3631381
"avgWeight": 3631381
},
...
]
@ -4216,27 +4216,27 @@ export const restApiDocsData = [
response: `{
"sizes": [
{
"avg_height": 1517188,
"avgHeight": 1517188,
"timestamp": 1558262730,
"avg_size": 25089
"avgSize": 25089
},
{
"avg_height": 1517275,
"avgHeight": 1517275,
"timestamp": 1558290933,
"avg_size": 21679
"avgSize": 21679
},
...
],
"weights": [
{
"avg_height": 1517188,
"avgHeight": 1517188,
"timestamp": 1558262730,
"avg_weight": 74921
"avgWeight": 74921
},
{
"avg_height": 1517275,
"avgHeight": 1517275,
"timestamp": 1558290933,
"avg_weight": 65164
"avgWeight": 65164
},
...
]
@ -4249,27 +4249,27 @@ export const restApiDocsData = [
response: `{
"sizes": [
{
"avg_height": 83,
"avgHeight": 83,
"timestamp": 1598937527,
"avg_size": 329
"avgSize": 329
},
{
"avg_height": 266,
"avgHeight": 266,
"timestamp": 1598982991,
"avg_size": 330
"avgSize": 330
},
...
],
"weights": [
{
"avg_height": 83,
"avgHeight": 83,
"timestamp": 1598937527,
"avg_weight": 1209
"avgWeight": 1209
},
{
"avg_height": 266,
"avgHeight": 266,
"timestamp": 1598982991,
"avg_weight": 1212
"avgWeight": 1212
},
...
]

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="-0.015 -0.015 1.03 1.03" preserveAspectRatio="xMidYMid"><defs><filter id="b"><feGaussianBlur in="SourceAlpha" result="blur-out" stdDeviation=".5"/><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter><filter id="c"><feGaussianBlur in="SourceAlpha" result="blur-out" stdDeviation="1.3"/><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter><linearGradient id="a" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:#f9b949"/><stop offset="100%" style="stop-color:#f7931a"/></linearGradient></defs><path d="M63.036 39.741c-4.274 17.143-21.637 27.576-38.782 23.301C7.116 58.768-3.317 41.404.959 24.262 5.23 7.117 22.594-3.317 39.734.957c17.144 4.274 27.576 21.64 23.302 38.784z" style="fill:url(#a)" filter="url(#b)" transform="scale(.01563)"/><path d="M46.1 27.441c.638-4.258-2.604-6.547-7.037-8.074l1.438-5.768-3.511-.875-1.4 5.616c-.923-.23-1.871-.447-2.813-.662l1.41-5.653-3.51-.875-1.438 5.766c-.764-.174-1.514-.346-2.242-.527l.004-.018-4.842-1.209-.934 3.75s2.605.597 2.55.634c1.422.355 1.679 1.296 1.636 2.042l-1.638 6.571c.098.025.225.061.365.117l-.371-.092-2.296 9.205c-.174.432-.615 1.08-1.61.834.036.051-2.551-.637-2.551-.637l-1.743 4.019 4.569 1.139c.85.213 1.683.436 2.503.646l-1.453 5.834 3.507.875 1.439-5.772c.958.26 1.888.5 2.798.726l-1.434 5.745 3.51.875 1.454-5.823c5.987 1.133 10.489.676 12.384-4.739 1.527-4.36-.076-6.875-3.226-8.515 2.294-.529 4.022-2.038 4.483-5.155zM38.08 38.69c-1.085 4.36-8.426 2.003-10.806 1.412l1.928-7.729c2.38.594 10.012 1.77 8.878 6.317zm1.086-11.312c-.99 3.966-7.1 1.951-9.082 1.457l1.748-7.01c1.982.494 8.365 1.416 7.334 5.553z" style="fill:#fff" filter="url(#c)" transform="scale(.01563)"/></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB