Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
gruve-p committed Dec 1, 2023
2 parents 9401310 + 16a8581 commit 6051a5e
Show file tree
Hide file tree
Showing 15 changed files with 141 additions and 37 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
##### v3.5.0
###### Unreleased

* Tweak display of miner "notes" (disclaimer for Patoshi)
* Updated miner IDs (including removal of 3 probably false positives from the "Patoshi" list)
* Updated dependencies


##### v3.4.0
###### 2023-06-14

Expand Down
8 changes: 4 additions & 4 deletions app/resourceIntegrityHashes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports =
{
"bootstrap.bundle.min.js": "sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4",
"bootstrap.bundle.min.js": "sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL",
"chart.min.js": "sha384-9R67RXFKxJXd/+QmlkaEyOhcfa0gbkwDQ4LUr1RvuTZp9u4VDylkCdExAVOi6zqz",
"chartjs-adapter-moment.min.js": "sha384-Z9r2EsEmivx0l8T8TvYoqqGcpO0cCjKbqVXB8tYUa0hIWKtGVl0TmaF263CjS6XR",
"dataTables.bootstrap4.min.js": "sha384-uiSTMvD1kcI19sAHJDVf68medP9HA2E2PzGis9Efmfsdb8p9+mvbQNgFhzii1MEX",
Expand All @@ -12,11 +12,11 @@ module.exports =
"sentry.min.js": "sha384-da/Bo2Ah6Uw3mlhl6VINMblg2SyGbSnULKrukse3P5D9PTJi4np9HoKvR19D7zOL",
"site.js": "sha384-G8o2io5zIdQiiVN+4CAGGXPO4UvV8jGkSMlfddSPbqIUd3x5Rv01pNH6ec8QOATu",
"bootstrap-icons.css": "sha384-rJFhkIguED0Z4GX6r6ReHpTCkwWtiPHZnQtWVP0DQWcKHzeJAlYb1m/xdYkeEk+f",
"dark-v1.min.css": "sha384-N4vpIzX+w8OiVt/PRWfSTxIBA/r/2wp/9H3d3Qxmb/6woHCt9/HZQl9Nc3XByIqU",
"dark.min.css": "sha384-CZz6XiKcNpqio2wvNlCOZ/wEbjjS0Z7W7+zn6bzl5kfs5VS9nFi/jzIAxIobXrtg",
"dark-v1.min.css": "sha384-YAnJ97Ktnj5VP4JJWI6ie2pIXTkTxArPAavrrJDC9Hp6JEBQVuCOq+S6ULhUJmdF",
"dark.min.css": "sha384-TDs2KDkDUgC3PKKRq0QJyPNcZ6659YWAgbGDGhusUnAmfWc/iGmQe4bY5BOcGP+b",
"dataTables.bootstrap4.min.css": "sha384-EkHEUZ6lErauT712zSr0DZ2uuCmi3DoQj6ecNdHQXpMpFNGAQ48WjfXCE5n20W+R",
"highlight.min.css": "sha384-s4RLYRjGGbVqKOyMGGwfxUTMOO6D7r2eom7hWZQ6BjK2Df4ZyfzLXEkonSm0KLIQ",
"light.min.css": "sha384-oFtx78mBk7Y/IOR4rl1Ij5Wf3/5FnXjwqcmvYpdvI/piekQkeaq72KSZjWUc3Uaw",
"light.min.css": "sha384-B8TFOLb3Jl/lhUDMEs3R3/VvWnX++Afva74ooEFJfCjewXxQ4Lz1K9H9yEW5TpWA",
"leaflet.css": "sha384-6wKUKNzA6h/S6gZ1lWQppeGaVXvK1AUAsEznGBghzlEu1fNcxJGYVRiroSHr+OwU",
"leaflet.js": "sha384-RFZC58YeKApoNsIbBxf4z6JJXmh+geBSgkCQXFyh+4tiFSJmJBt+2FbjxW7Ar16M"
};
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
"test": "node ./bin/test.js",
"miners": "node ./bin/refresh-mining-pool-configs.js",
"integrity": "node ./bin/frontend-resource-integrity.js",
"css-light-debug": "sass --style expanded --source-map scss ./public/scss/light.scss ./public/style/light.css",
"css-dark-debug": "sass --style expanded --source-map scss ./public/scss/dark.scss ./public/style/dark.css",
"css-dark-v1-debug": "sass --style expanded --source-map scss ./public/scss/dark-v1.scss ./public/style/dark-v1.css",
"lint": "eslint app routes",

"css-light-debug": "sass --style expanded ./public/scss/light.scss ./public/style/light.css",
"css-dark-debug": "sass --style expanded ./public/scss/dark.scss ./public/style/dark.css",
"css-dark-v1-debug": "sass --style expanded ./public/scss/dark-v1.scss ./public/style/dark-v1.css",

"css-debug": "npm-run-all css-light-debug css-dark-debug css-dark-v1-debug",

"css-light": "sass --style compressed ./public/scss/light.scss ./public/style/light.min.css",
"css-dark": "sass --style compressed ./public/scss/dark.scss ./public/style/dark.min.css",
"css-dark-v1": "sass --style compressed ./public/scss/dark-v1.scss ./public/style/dark-v1.min.css",
"css": "npm-run-all css-light css-dark css-dark-v1 integrity",
"lint": "eslint app routes"

"css": "npm-run-all css-light css-dark css-dark-v1 integrity"
},
"keywords": [
"groestlcoin",
Expand All @@ -44,7 +48,7 @@
"chart.js": "^4.3.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
"crypto-js": "^4.1.1",
"crypto-js": "^4.2.0",
"csurf": "^1.11.0",
"debug": "^4.3.4",
"decimal.js": "^10.4.3",
Expand All @@ -54,7 +58,7 @@
"express-async-handler": "^1.2.0",
"express-session": "^1.17.3",
"jayson": "^4.1.0",
"lru-cache": "^9.1.1",
"lru-cache": "^10.0.0",
"markdown-it": "^13.0.1",
"md5": "^2.3.0",
"memorystore": "^1.6.7",
Expand All @@ -67,7 +71,7 @@
"pug": "^3.0.2",
"qrcode": "^1.5.3",
"redis": "^4.6.6",
"semver": "^7.5.0",
"semver": "^7.5.2",
"serve-favicon": "^2.5.0",
"simple-git": "^3.18.0",
"tiny-secp256k1": "^2.2.1",
Expand Down
6 changes: 3 additions & 3 deletions public/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions public/scss/dark-v1.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ $nav-tabs-border-color: $body-color;
@import "./main";


.table {
--bs-table-color-state: $body-color;
}





.alert-primary {
Expand Down
25 changes: 24 additions & 1 deletion public/scss/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@ $nav-tabs-border-color: $body-color;




@import "./main";


.table {
--bs-table-color-state: $body-color;
}



Expand Down Expand Up @@ -156,6 +160,10 @@ $nav-tabs-border-color: $body-color;
background-color: $main-bg !important;
}

.bg-darken {
background-color: darken($body-bg, 4%) !important;
}


$header-footer-bg: #112138;

Expand Down Expand Up @@ -206,6 +214,21 @@ $header-footer-bg: #112138;
code {
padding: 0px 3px;
border-radius: 3px;
background-color: lighten($card-bg, 15%);
color: #198754;
}




.bs-callout-danger {
background-color: #66121a;
border-color: #921925;
}
.bs-callout-warning {
background-color: #876500;
border-color: #ba8b00;
}
.bs-callout-info {
background-color: #08798f;
border-color: #0aa1c0;
}
19 changes: 19 additions & 0 deletions public/scss/light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ $nav-tabs-border-color: lighten($body-color, 45%);
background-color: $main-bg !important;
}

.bg-darken {
background-color: darken($body-bg, 6%) !important;
}

.bg-header-footer {
background-color: #212529 !important;
}
Expand Down Expand Up @@ -77,4 +81,19 @@ $nav-tabs-border-color: lighten($body-color, 45%);
background-color: darken($card-bg, 3%);
border: solid 1px darken($card-bg, 10%) !important;
color: $body-color;
}



.bs-callout-danger {
background-color: #f8d7da;
border-color: #f1aeb5;
}
.bs-callout-warning {
background-color: #fff3cd;
border-color: #ffe69c;
}
.bs-callout-info {
background-color: #cff4fc;
border-color: #9eeaf9;
}
1 change: 0 additions & 1 deletion public/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ $dropdown-min-width: 11rem;
}

code {
background-color: $body-bg !important;
}

.icon-shadow {
Expand Down
4 changes: 2 additions & 2 deletions public/style/dark-v1.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/style/dark.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/style/light.min.css

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion views/block.pug
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ block content
+copyTextButton(result.getblock.miner.name)

else if (result.getblock.miner.identifiedBy)
span.badge.bg-primary(data-bs-toggle="tooltip", data-bs-html="true", title=`Identified by: ${result.getblock.miner.identifiedBy}${result.getblock.miner.note ? ("<br/><br/>" + result.getblock.miner.note) : ""}`) #{result.getblock.miner.name}
span.badge.bg-primary(data-bs-toggle="tooltip", data-bs-html="true", title=`Identified by: ${result.getblock.miner.identifiedBy}`) #{result.getblock.miner.name}

if (result.getblock.miner.note)
i.bi-asterisk.ms-2(data-bs-toggle="tooltip", title=result.getblock.miner.note)

else
small.badge.bg-primary #{result.getblock.miner.name}
Expand Down
10 changes: 8 additions & 2 deletions views/includes/blocks-list.pug
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@

else
.d-inline.d-sm-none
span.badge.bg-primary(data-bs-toggle="tooltip", data-bs-html="true", title=`Identified by: ${block.miner.identifiedBy}${block.miner.note ? ("<br/><br/>" + block.miner.note) : ""}`) #{utils.ellipsize(block.miner.name, 12)}
span.badge.bg-primary(data-bs-toggle="tooltip", data-bs-html="true", title=`Identified by: ${block.miner.identifiedBy}`) #{utils.ellipsize(block.miner.name, 12)}

if (block.miner.note)
i.bi-asterisk.ms-2(data-bs-toggle="tooltip", title=block.miner.note)

.d-none.d-sm-inline
span.badge.bg-primary(data-bs-toggle="tooltip", data-bs-html="true", title=`Identified by: ${block.miner.identifiedBy}${block.miner.note ? ("<br/><br/>" + block.miner.note) : ""}`) #{utils.ellipsize(block.miner.name, 14)}
span.badge.bg-primary(data-bs-toggle="tooltip", data-bs-html="true", title=`Identified by: ${block.miner.identifiedBy}`) #{utils.ellipsize(block.miner.name, 14)}

if (block.miner.note)
i.bi-asterisk.ms-2(data-bs-toggle="tooltip", title=block.miner.note)

else if (block.height < global.pruneHeight)
span(title="This data is unavailable due to blockchain pruning", data-bs-toggle="tooltip")
Expand Down
56 changes: 46 additions & 10 deletions views/includes/index-network-summary.pug
Original file line number Diff line number Diff line change
Expand Up @@ -246,23 +246,59 @@ if (exchangeRates)

+summaryRow((mempoolInfo == undefined ? 0 : 1) + (smartFeeEstimateStrings.length > 0 ? 1 : 0) + ((mempoolInfo && global.activeBlockchain != "signet") ? 1 : 0))
if (mempoolInfo)
- var thresholds = [11000, 7000];
- var colorClass_txCount = (mempoolInfo.size > 11000) ? "text-danger" : (mempoolInfo.size > 7000 ? "text-warning" : "text-success");
- var blockCount = new Decimal(mempoolInfo.bytes).dividedBy(coinConfig.maxBlockSize);
- var colorClass_blockCount = (blockCount > 20) ? "text-danger" : (blockCount > 10 ? "text-warning" : "text-success");
- const thresholds_txCount = {warning: 7000, danger: 11000}
- const colorClass_txCount = (mempoolInfo.size > thresholds_txCount.danger) ? "text-danger" : (mempoolInfo.size > thresholds_txCount.warning ? "text-warning" : "text-success")
- const blockCount = new Decimal(mempoolInfo.bytes).dividedBy(coinConfig.maxBlockSize)
- const thresholds_blockCount = {warning: 10, danger: 20}
- const colorClass_blockCount = (blockCount > thresholds_blockCount.danger) ? "text-danger" : (blockCount > thresholds_blockCount.warning ? "text-warning" : "text-success");
- const thresholds_totalFees = {warning: 1, danger: 5}
- const colorClass_totalFees = (mempoolInfo.total_fee > thresholds_totalFees.danger) ? "text-danger" : (mempoolInfo.total_fee > thresholds_totalFees.warning ? "text-warning" : "text-success");

+summaryItem("Mempool", "The number of unconfirmed transactions in your node's mempool, and the number of blocks needed to confirm those transactions", null, null, "icon:bi-hourglass-split", "./mempool-summary", "View mempool summary details")

span(class=colorClass_txCount) #{mempoolInfo.size.toLocaleString()}
span.text-tiny.text-muted.ms-1 tx
span.border-dotted(title=`<b># Unconfirmed Transactions</b><br/><span class='text-success'>Low (N ≤ ${thresholds_txCount.warning.toLocaleString()})</span><br/><span class='text-warning'>High (${thresholds_txCount.warning.toLocaleString()} < N ≤ ${thresholds_txCount.danger.toLocaleString()})</span><br/><span class='text-danger'>Very High (N > ${thresholds_txCount.danger.toLocaleString()})</span>`, data-bs-toggle="tooltip", data-bs-html="true")
span(class=colorClass_txCount) #{mempoolInfo.size.toLocaleString()}
span.text-tiny.text-muted.ms-1 tx

span.small.text-muted.ms-2
| (
span.border-dotted(title="Number of blocks needed to clear your node's mempool.", data-bs-toggle="tooltip")
span.mx-2.text-muted /

span.small
span.border-dotted(title=`<b># Blocks to clear this node's mempool</b><br/><span class='text-success'>Low (N ≤ ${thresholds_blockCount.warning.toLocaleString()})</span><br/><span class='text-warning'>High (${thresholds_blockCount.warning.toLocaleString()} < N ≤ ${thresholds_blockCount.danger.toLocaleString()})</span><br/><span class='text-danger'>Very High (N > ${thresholds_blockCount.danger.toLocaleString()})</span>`, data-bs-toggle="tooltip", data-bs-html="true")
span(class=colorClass_blockCount) #{blockCount.toDP(2)}
span.text-tiny.text-muted.ms-1
i.bi-box
| )

span.mx-2.text-muted /

span.small
-
// Code inspired from shared-mixins.pug and adapted for inclusion in a tooltip
const formatFees = (inputVal) => {
const displayCurrency = userSettings.displayCurrency == "local" ? userSettings.localCurrency : userSettings.displayCurrency;
const parts = utils.formatCurrencyAmount(inputVal, displayCurrency)
const currencyType = currencyTypes[parts.currencyUnit.toLowerCase()]
let val = parts.val
if (currencyType.type == "exchanged") {
// Remove any decimals
val = val.split('.')[0]
// Currency symbol followed by amount with a non-breaking space in-between
// so that the two elements remain on the same line
return `${currencyType.symbol}&nbsp;${val}`
}
if (parts.currencyUnit == "sat") {
// Add K, M, G, ... suffix to amount
const largeNumberData = utils.formatLargeNumberSignificant(parts.intVal, 3);
val = `${largeNumberData[0]}${largeNumberData[1].abbreviation}`
}
// Amount followed by minimized currency name (BTC or sat) with a non-breaking space in-between
return `${val}&nbsp;<span class='text-tiny'>${currencyType.name}</span>`
}
- const warningFees = formatFees(thresholds_totalFees.warning)
- const dangerFees = formatFees(thresholds_totalFees.danger)
span.border-dotted(title=`<b>Unconfirmed Transactions' total fees</b><br/><span class='text-success'>Low (N ≤ ${warningFees})</span><br/><span class='text-warning'>High (${warningFees} < N ≤ ${dangerFees})</span><br/><span class='text-danger'>Very High (N > ${dangerFees})</span>`, data-bs-toggle="tooltip", data-bs-html="true") &Sigma;
// Don't embed this span inside previous one to avoid collision of their tooltips
span.ms-1(class=colorClass_totalFees)
+valueDisplay(mempoolInfo.total_fee, {hideLessSignificantDigits:true})

if (mempoolInfo && global.activeBlockchain != "signet")
+summaryRow
Expand Down
2 changes: 1 addition & 1 deletion views/peers.pug
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ block content
td
if (item.servicesnames)
- var serviceItems = item.servicesnames;
- var abbreviations = {"NETWORK":"NET", "NETWORK_LIMITED":"NET_LIM", "WITNESS":"WIT", "BLOOM":"BLM"};
- var abbreviations = {"NETWORK":"NET", "NETWORK_LIMITED":"NET_LIM", "WITNESS":"WIT", "BLOOM":"BLM", "P2P_V2":"P2P_V2"};

each itemAbbr, itemName in abbreviations
if (item.servicesnames.includes(itemName))
Expand Down

0 comments on commit 6051a5e

Please sign in to comment.