Compare commits

...

16 Commits

Author SHA1 Message Date
wiz
541555051b Merge branch 'master' into knorrium/update-node-matrix 2025-01-20 19:26:56 +09: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
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
Felipe Knorr Kuhn
5f5e96984a Merge branch 'master' into knorrium/update-node-matrix 2025-01-19 23:41:46 -08: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
Felipe Knorr Kuhn
f5a54ae62b Update the local nvmrc to node 22 2025-01-15 21:52:54 -08:00
Felipe Knorr Kuhn
4da145ff5c Update the node version to run e2e tests 2025-01-15 21:52:38 -08:00
Felipe Knorr Kuhn
a898701830 Update node matrix to v20 and v22 2025-01-15 21:33:25 -08:00
nymkappa
72ddb8c6a4 [accelerator] display payment errors, auto reload after 10 secs instead of 3 secs 2024-11-14 16:46:18 +01:00
8 changed files with 47 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ jobs:
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')" if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
strategy: strategy:
matrix: matrix:
node: ["20", "21"] node: ["20", "22"]
flavor: ["dev", "prod"] flavor: ["dev", "prod"]
fail-fast: false fail-fast: false
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
@@ -160,7 +160,7 @@ jobs:
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')" if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
strategy: strategy:
matrix: matrix:
node: ["20", "21"] node: ["20", "22"]
flavor: ["dev", "prod"] flavor: ["dev", "prod"]
fail-fast: false fail-fast: false
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
@@ -263,7 +263,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 22
cache: "npm" cache: "npm"
cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json

2
.nvmrc
View File

@@ -1 +1 @@
v20.8.0 v22.13.0

View File

@@ -1,10 +1,18 @@
<div class="box card w-100 accelerate-checkout-inner" [class.input-disabled]="isCheckoutLocked > 0" style="background: var(--box-bg)" id=acceleratePreviewAnchor> <div class="box card w-100 accelerate-checkout-inner" [class.input-disabled]="isCheckoutLocked > 0" style="background: var(--box-bg)" id=acceleratePreviewAnchor>
@if (accelerateError) { @if (accelerateError) {
<div class="row mb-1 text-center"> @if (accelerateError.includes('Payment declined')) {
<div class="col-sm"> <div class="row mb-1 text-center">
<h1 style="font-size: larger;" i18n="accelerator.sorry-error-title">Sorry, something went wrong!</h1> <div class="col-sm">
<h1 style="font-size: larger;">{{ accelerateError }}</h1>
</div>
</div> </div>
</div> } @else {
<div class="row mb-1 text-center">
<div class="col-sm">
<h1 style="font-size: larger;" i18n="accelerator.sorry-error-title">Sorry, something went wrong!</h1>
</div>
</div>
}
<div class="row text-center mt-1"> <div class="row text-center mt-1">
<div class="col-sm"> <div class="col-sm">
<div class="d-flex flex-row justify-content-center align-items-center"> <div class="d-flex flex-row justify-content-center align-items-center">

View File

@@ -559,7 +559,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
// Reset everything by reloading the page :D, can be improved // Reset everything by reloading the page :D, can be improved
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
window.location.assign(window.location.toString().replace(`?cash_request_id=${urlParams.get('cash_request_id')}`, ``)); window.location.assign(window.location.toString().replace(`?cash_request_id=${urlParams.get('cash_request_id')}`, ``));
}, 3000); }, 10000);
} }
} }
}); });
@@ -686,7 +686,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
// Reset everything by reloading the page :D, can be improved // Reset everything by reloading the page :D, can be improved
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
window.location.assign(window.location.toString().replace(`?cash_request_id=${urlParams.get('cash_request_id')}`, ``)); window.location.assign(window.location.toString().replace(`?cash_request_id=${urlParams.get('cash_request_id')}`, ``));
}, 3000); }, 10000);
} }
} }
}); });
@@ -785,7 +785,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
// Reset everything by reloading the page :D, can be improved // Reset everything by reloading the page :D, can be improved
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
window.location.assign(window.location.toString().replace(`?cash_request_id=${urlParams.get('cash_request_id')}`, ``)); window.location.assign(window.location.toString().replace(`?cash_request_id=${urlParams.get('cash_request_id')}`, ``));
}, 3000); }, 10000);
} }
} }
}); });

View File

@@ -8,8 +8,10 @@ import { SinglePoolStats } from '../../../interfaces/node-api.interface';
type MerkleCellType = ' ' | '┬' | '├' | '└' | '│' | '─' | 'leaf'; type MerkleCellType = ' ' | '┬' | '├' | '└' | '│' | '─' | 'leaf';
interface TaggedStratumJob extends StratumJob { interface TaggedStratumJob extends StratumJob {
tag: string; tag: string;
merkleBranchIds: string[];
} }
interface MerkleCell { interface MerkleCell {
@@ -46,6 +48,18 @@ function parseTag(scriptSig: string): string {
return (ascii.match(/\/.*\//)?.[0] || ascii).trim(); return (ascii.match(/\/.*\//)?.[0] || ascii).trim();
} }
function getMerkleBranchIds(merkleBranches: string[], numBranches: number): string[] {
let lastHash = '';
const ids: string[] = [];
for (let i = 0; i < numBranches; i++) {
if (merkleBranches[i]) {
lastHash = merkleBranches[i];
}
ids.push(`${i}-${lastHash}`);
}
return ids;
}
@Component({ @Component({
selector: 'app-stratum-list', selector: 'app-stratum-list',
templateUrl: './stratum-list.component.html', templateUrl: './stratum-list.component.html',
@@ -81,16 +95,15 @@ export class StratumList implements OnInit, OnDestroy {
} }
processJobs(rawJobs: Record<string, StratumJob>): PoolRow[] { processJobs(rawJobs: Record<string, StratumJob>): PoolRow[] {
const numBranches = Math.max(...Object.values(rawJobs).map(job => job.merkleBranches.length));
const jobs: Record<string, TaggedStratumJob> = {}; const jobs: Record<string, TaggedStratumJob> = {};
for (const [id, job] of Object.entries(rawJobs)) { for (const [id, job] of Object.entries(rawJobs)) {
jobs[id] = { ...job, tag: parseTag(job.scriptsig) }; jobs[id] = { ...job, tag: parseTag(job.scriptsig), merkleBranchIds: getMerkleBranchIds(job.merkleBranches, numBranches) };
} }
if (Object.keys(jobs).length === 0) { if (Object.keys(jobs).length === 0) {
return []; return [];
} }
const numBranches = Math.max(...Object.values(jobs).map(job => job.merkleBranches.length));
let trees: MerkleTree[] = Object.keys(jobs).map(job => ({ let trees: MerkleTree[] = Object.keys(jobs).map(job => ({
job, job,
size: 1, size: 1,
@@ -100,12 +113,13 @@ export class StratumList implements OnInit, OnDestroy {
for (let col = numBranches - 1; col >= 0; col--) { for (let col = numBranches - 1; col >= 0; col--) {
const groups: Record<string, MerkleTree[]> = {}; const groups: Record<string, MerkleTree[]> = {};
for (const tree of trees) { for (const tree of trees) {
const hash = jobs[tree.job].merkleBranches[col]; const branchId = jobs[tree.job].merkleBranchIds[col];
if (!groups[hash]) { if (!groups[branchId]) {
groups[hash] = []; groups[branchId] = [];
} }
groups[hash].push(tree); groups[branchId].push(tree);
} }
trees = Object.values(groups).map(group => ({ trees = Object.values(groups).map(group => ({
hash: jobs[group[0].job].merkleBranches[col], hash: jobs[group[0].job].merkleBranches[col],
job: group[0].job, job: group[0].job,

View File

@@ -7,7 +7,7 @@ import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, fa
faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft, faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft,
faFastForward, faWallet, faUserClock, faWrench, faUserFriends, faQuestionCircle, faHistory, faSignOutAlt, faKey, faSuitcase, faIdCardAlt, faNetworkWired, faUserCheck, faFastForward, faWallet, faUserClock, faWrench, faUserFriends, faQuestionCircle, faHistory, faSignOutAlt, faKey, faSuitcase, faIdCardAlt, faNetworkWired, faUserCheck,
faCircleCheck, faUserCircle, faCheck, faRocket, faScaleBalanced, faHourglassStart, faHourglassHalf, faHourglassEnd, faWandMagicSparkles, faFaucetDrip, faTimeline, faCircleCheck, faUserCircle, faCheck, faRocket, faScaleBalanced, faHourglassStart, faHourglassHalf, faHourglassEnd, faWandMagicSparkles, faFaucetDrip, faTimeline,
faCircleXmark, faCalendarCheck, faMoneyBillTrendUp, faRobot } from '@fortawesome/free-solid-svg-icons'; faCircleXmark, faCalendarCheck, faMoneyBillTrendUp, faRobot, faShareNodes } from '@fortawesome/free-solid-svg-icons';
import { InfiniteScrollModule } from 'ngx-infinite-scroll'; import { InfiniteScrollModule } from 'ngx-infinite-scroll';
import { MenuComponent } from '@components/menu/menu.component'; import { MenuComponent } from '@components/menu/menu.component';
import { PreviewTitleComponent } from '@components/master-page-preview/preview-title.component'; import { PreviewTitleComponent } from '@components/master-page-preview/preview-title.component';
@@ -459,5 +459,6 @@ export class SharedModule {
library.addIcons(faCalendarCheck); library.addIcons(faCalendarCheck);
library.addIcons(faMoneyBillTrendUp); library.addIcons(faMoneyBillTrendUp);
library.addIcons(faRobot); library.addIcons(faRobot);
library.addIcons(faShareNodes);
} }
} }

View File

@@ -154,5 +154,9 @@
"WALLETS": { "WALLETS": {
"ENABLED": true, "ENABLED": true,
"WALLETS": ["BITB", "3350"] "WALLETS": ["BITB", "3350"]
},
"STRATUM": {
"ENABLED": true,
"API": "http://127.0.0.1:81/api/v1/stratum/ws"
} }
} }

View File

@@ -4,8 +4,7 @@
"TESTNET4_ENABLED": true, "TESTNET4_ENABLED": true,
"LIQUID_ENABLED": false, "LIQUID_ENABLED": false,
"LIQUID_TESTNET_ENABLED": false, "LIQUID_TESTNET_ENABLED": false,
"BISQ_ENABLED": true, "STRATUM_ENABLED": true,
"BISQ_SEPARATE_BACKEND": true,
"SIGNET_ENABLED": true, "SIGNET_ENABLED": true,
"MEMPOOL_WEBSITE_URL": "https://mempool.space", "MEMPOOL_WEBSITE_URL": "https://mempool.space",
"LIQUID_WEBSITE_URL": "https://liquid.network", "LIQUID_WEBSITE_URL": "https://liquid.network",