From 7262485f3ba72d2ab75ac105e9a779d57bbdd0b8 Mon Sep 17 00:00:00 2001
From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
Date: Fri, 24 Jun 2022 21:51:13 -0700
Subject: [PATCH 01/16] Skip tests when the ops labeled is used
---
.github/workflows/cypress.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml
index 369b101ff..ae17a8749 100644
--- a/.github/workflows/cypress.yml
+++ b/.github/workflows/cypress.yml
@@ -3,6 +3,7 @@ name: Cypress Tests
on: [push, pull_request]
jobs:
cypress:
+ if: "!contains(github.event.pull_request.labels.*.name, 'ops')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
From 8fa0539b5a86ba5c7c306f61d3bb6272a8a43ff8 Mon Sep 17 00:00:00 2001
From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
Date: Fri, 24 Jun 2022 21:56:08 -0700
Subject: [PATCH 02/16] Update test triggers
---
.github/workflows/cypress.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml
index ae17a8749..918434a93 100644
--- a/.github/workflows/cypress.yml
+++ b/.github/workflows/cypress.yml
@@ -1,6 +1,8 @@
name: Cypress Tests
-on: [push, pull_request]
+on:
+ pull_request:
+ types: [ opened, review_requested, synchronize ]
jobs:
cypress:
if: "!contains(github.event.pull_request.labels.*.name, 'ops')"
From 5b9d6a31e5ca3f35c5b1983855b7a1dc49336dfa Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Sat, 25 Jun 2022 10:13:18 -0400
Subject: [PATCH 03/16] Remove fade animation when switching docs tabs
---
frontend/src/app/docs/docs/docs.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/app/docs/docs/docs.component.html b/frontend/src/app/docs/docs/docs.component.html
index f74cbd134..04f9bb8cf 100644
--- a/frontend/src/app/docs/docs/docs.component.html
+++ b/frontend/src/app/docs/docs/docs.component.html
@@ -3,7 +3,7 @@
Documentation
-
+
-
FAQ
From d6f594b95af5e3210f4075306458937c8161b11a Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Tue, 14 Jun 2022 10:58:17 +0200
Subject: [PATCH 04/16] Don't run the indexer unless Bitcoin Core is fully
synced
---
backend/src/api/blocks.ts | 6 +-----
backend/src/indexer.ts | 7 +++++++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts
index b1a2da18f..07ef9a669 100644
--- a/backend/src/api/blocks.ts
+++ b/backend/src/api/blocks.ts
@@ -300,12 +300,8 @@ class Blocks {
* [INDEXING] Index all blocks metadata for the mining dashboard
*/
public async $generateBlockDatabase(): Promise {
- const blockchainInfo = await bitcoinClient.getBlockchainInfo();
- if (blockchainInfo.blocks !== blockchainInfo.headers) { // Wait for node to sync
- return false;
- }
-
try {
+ const blockchainInfo = await bitcoinClient.getBlockchainInfo();
let currentBlockHeight = blockchainInfo.blocks;
let indexingBlockAmount = Math.min(config.MEMPOOL.INDEXING_BLOCKS_AMOUNT, blockchainInfo.blocks);
diff --git a/backend/src/indexer.ts b/backend/src/indexer.ts
index 96cca9f7f..6ebba5bc4 100644
--- a/backend/src/indexer.ts
+++ b/backend/src/indexer.ts
@@ -4,6 +4,7 @@ import mempool from './api/mempool';
import mining from './api/mining';
import logger from './logger';
import HashratesRepository from './repositories/HashratesRepository';
+import bitcoinClient from './api/bitcoin/bitcoin-client';
class Indexer {
runIndexer = true;
@@ -25,6 +26,12 @@ class Indexer {
return;
}
+ // Do not attempt to index anything unless Bitcoin Core is fully synced
+ const blockchainInfo = await bitcoinClient.getBlockchainInfo();
+ if (blockchainInfo.blocks !== blockchainInfo.headers) {
+ return;
+ }
+
this.runIndexer = false;
this.indexerRunning = true;
From 1c40a22416d28ac4e037562f487b57461bd85cc3 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Sun, 26 Jun 2022 15:56:24 -0400
Subject: [PATCH 05/16] Add 'usually' to feerate tooltips
---
frontend/src/app/components/fees-box/fees-box.component.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/components/fees-box/fees-box.component.html b/frontend/src/app/components/fees-box/fees-box.component.html
index 9628682c4..b56663571 100644
--- a/frontend/src/app/components/fees-box/fees-box.component.html
+++ b/frontend/src/app/components/fees-box/fees-box.component.html
@@ -5,8 +5,8 @@
- Low Priority
- Medium Priority
+ Low Priority
+ Medium Priority
High Priority
From 19ae01defbb9d61174e63eaed784725532cfb451 Mon Sep 17 00:00:00 2001
From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
Date: Mon, 27 Jun 2022 21:28:21 -0700
Subject: [PATCH 06/16] Various typing and build fixes to enable CI
---
.github/workflows/ci.yml | 48 +++++++++++++++++++++++++
backend/package-lock.json | 15 ++++----
backend/package.json | 4 +--
backend/src/api/bitcoin/electrum-api.ts | 8 ++---
backend/src/api/disk-cache.ts | 10 +++---
backend/src/index.ts | 24 ++++++-------
backend/tsconfig.json | 4 ++-
frontend/package.json | 34 +++++++++---------
8 files changed, 98 insertions(+), 49 deletions(-)
create mode 100644 .github/workflows/ci.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..a2eaeb495
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,48 @@
+name: CI Pipeline for the Backend and Frontend
+on:
+ push:
+env:
+ NODE_VERSION: 16.15.0
+jobs:
+ build_backend:
+ name: Build backend
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Setup Node
+ uses: actions/setup-node@v3
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ registry-url: 'https://registry.npmjs.org'
+ - name: Install
+ run: npm install --prod
+ working-directory: backend
+ # - name: Lint
+ # run: npm run lint
+ # - name: Test
+ # run: npm run test
+ - name: Build
+ run: npm run build
+ working-directory: backend
+ build_frontend:
+ name: Build frontend
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Setup Node
+ uses: actions/setup-node@v3
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ registry-url: 'https://registry.npmjs.org'
+ - name: Install
+ run: npm install --prod
+ working-directory: frontend
+ # - name: Lint
+ # run: npm run lint
+ # - name: Test
+ # run: npm run test
+ - name: Build
+ run: npm run build
+ working-directory: frontend
diff --git a/backend/package-lock.json b/backend/package-lock.json
index 378bb7c75..7f921f476 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -10,6 +10,7 @@
"license": "GNU Affero General Public License v3.0",
"dependencies": {
"@mempool/electrum-client": "^1.1.7",
+ "@types/node": "^16.11.41",
"axios": "~0.27.2",
"bitcoinjs-lib": "6.0.1",
"crypto-js": "^4.0.0",
@@ -119,10 +120,9 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "14.14.20",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
- "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
- "dev": true
+ "version": "16.11.41",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.41.tgz",
+ "integrity": "sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ=="
},
"node_modules/@types/qs": {
"version": "6.9.7",
@@ -1647,10 +1647,9 @@
"dev": true
},
"@types/node": {
- "version": "14.14.20",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
- "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
- "dev": true
+ "version": "16.11.41",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.41.tgz",
+ "integrity": "sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ=="
},
"@types/qs": {
"version": "6.9.7",
diff --git a/backend/package.json b/backend/package.json
index 723029e34..09a61c7cc 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -20,7 +20,6 @@
],
"main": "index.ts",
"scripts": {
- "ng": "./node_modules/@angular/cli/bin/ng",
"tsc": "./node_modules/typescript/bin/tsc",
"build": "npm run tsc",
"start": "node --max-old-space-size=2048 dist/index.js",
@@ -29,6 +28,7 @@
},
"dependencies": {
"@mempool/electrum-client": "^1.1.7",
+ "@types/node": "^16.11.41",
"axios": "~0.27.2",
"bitcoinjs-lib": "6.0.1",
"crypto-js": "^4.0.0",
@@ -41,8 +41,8 @@
},
"devDependencies": {
"@types/compression": "^1.7.2",
- "@types/ws": "~8.5.3",
"@types/express": "^4.17.13",
+ "@types/ws": "~8.5.3",
"tslint": "^6.1.0"
}
}
diff --git a/backend/src/api/bitcoin/electrum-api.ts b/backend/src/api/bitcoin/electrum-api.ts
index d6f2e1df8..54d75d67b 100644
--- a/backend/src/api/bitcoin/electrum-api.ts
+++ b/backend/src/api/bitcoin/electrum-api.ts
@@ -1,10 +1,10 @@
import config from '../../config';
+import Client from '@mempool/electrum-client';
import { AbstractBitcoinApi } from './bitcoin-api-abstract-factory';
import { IEsploraApi } from './esplora-api.interface';
import { IElectrumApi } from './electrum-api.interface';
import BitcoinApi from './bitcoin-api';
import logger from '../../logger';
-import * as ElectrumClient from '@mempool/electrum-client';
import * as sha256 from 'crypto-js/sha256';
import * as hexEnc from 'crypto-js/enc-hex';
import loadingIndicators from '../loading-indicators';
@@ -26,7 +26,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
onLog: (str) => { logger.debug(str); },
};
- this.electrumClient = new ElectrumClient(
+ this.electrumClient = new Client(
config.ELECTRUM.PORT,
config.ELECTRUM.HOST,
config.ELECTRUM.TLS_ENABLED ? 'tls' : 'tcp',
@@ -35,7 +35,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
);
this.electrumClient.initElectrum(electrumConfig, electrumPersistencePolicy)
- .then(() => {})
+ .then(() => { })
.catch((err) => {
logger.err(`Error connecting to Electrum Server at ${config.ELECTRUM.HOST}:${config.ELECTRUM.PORT}`);
});
@@ -95,7 +95,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
async $getAddressTransactions(address: string, lastSeenTxId: string): Promise {
const addressInfo = await this.bitcoindClient.validateAddress(address);
if (!addressInfo || !addressInfo.isvalid) {
- return [];
+ return [];
}
try {
diff --git a/backend/src/api/disk-cache.ts b/backend/src/api/disk-cache.ts
index fc185a31a..cf40d6952 100644
--- a/backend/src/api/disk-cache.ts
+++ b/backend/src/api/disk-cache.ts
@@ -1,6 +1,6 @@
import * as fs from 'fs';
const fsPromises = fs.promises;
-import * as cluster from 'cluster';
+import cluster from 'cluster';
import memPool from './mempool';
import blocks from './blocks';
import logger from '../logger';
@@ -19,7 +19,7 @@ class DiskCache {
constructor() { }
async $saveCacheToDisk(): Promise {
- if (!cluster.isMaster) {
+ if (!cluster.isPrimary) {
return;
}
if (this.isWritingCache) {
@@ -46,12 +46,12 @@ class DiskCache {
blockSummaries: blocks.getBlockSummaries(),
mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize),
- }), {flag: 'w'});
+ }), { flag: 'w' });
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) {
await fsPromises.writeFile(DiskCache.FILE_NAMES.replace('{number}', i.toString()), JSON.stringify({
mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize),
- }), {flag: 'w'});
+ }), { flag: 'w' });
}
logger.debug('Mempool and blocks data saved to disk cache');
this.isWritingCache = false;
@@ -67,7 +67,7 @@ class DiskCache {
fs.unlinkSync(DiskCache.FILE_NAMES.replace('{number}', i.toString()));
}
}
-
+
loadMempoolCache() {
if (!fs.existsSync(DiskCache.FILE_NAME)) {
return;
diff --git a/backend/src/index.ts b/backend/src/index.ts
index 1b7568d2e..566622055 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -1,8 +1,8 @@
-import { Express, Request, Response, NextFunction } from 'express';
-import * as express from 'express';
+import express from "express";
+import { Application, Request, Response, NextFunction, Express } from 'express';
import * as http from 'http';
import * as WebSocket from 'ws';
-import * as cluster from 'cluster';
+import cluster from 'cluster';
import axios from 'axios';
import DB from './database';
@@ -32,7 +32,7 @@ import priceUpdater from './tasks/price-updater';
class Server {
private wss: WebSocket.Server | undefined;
private server: http.Server | undefined;
- private app: Express;
+ private app: Application;
private currentBackendRetryInterval = 5;
constructor() {
@@ -43,7 +43,7 @@ class Server {
return;
}
- if (cluster.isMaster) {
+ if (cluster.isPrimary) {
logger.notice(`Mempool Server (Master) is running on port ${config.MEMPOOL.HTTP_PORT} (${backendInfo.getShortCommitHash()})`);
const numCPUs = config.MEMPOOL.SPAWN_CLUSTER_PROCS;
@@ -77,7 +77,7 @@ class Server {
})
.use(express.urlencoded({ extended: true }))
.use(express.text())
- ;
+ ;
this.server = http.createServer(this.app);
this.wss = new WebSocket.Server({ server: this.server });
@@ -105,7 +105,7 @@ class Server {
}
}
- if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED && cluster.isMaster) {
+ if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED && cluster.isPrimary) {
statistics.startStatistics();
}
@@ -260,7 +260,7 @@ class Server {
res.status(500).end();
}
})
- ;
+ ;
if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED) {
this.app
@@ -290,7 +290,7 @@ class Server {
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/rewards/:interval', routes.$getHistoricalBlockRewards)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/fee-rates/:interval', routes.$getHistoricalBlockFeeRates)
.get(config.MEMPOOL.API_URL_PREFIX + 'mining/blocks/sizes-weights/:interval', routes.$getHistoricalBlockSizeAndWeight)
- ;
+ ;
}
if (config.BISQ.ENABLED) {
@@ -340,7 +340,7 @@ class Server {
.get(config.MEMPOOL.API_URL_PREFIX + 'address/:address/txs', routes.getAddressTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'address/:address/txs/chain/:txId', routes.getAddressTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'address-prefix/:prefix', routes.getAddressPrefix)
- ;
+ ;
}
if (Common.isLiquid()) {
@@ -349,13 +349,13 @@ class Server {
.get(config.MEMPOOL.API_URL_PREFIX + 'assets/featured', routes.$getAllFeaturedLiquidAssets)
.get(config.MEMPOOL.API_URL_PREFIX + 'asset/:assetId/icon', routes.getLiquidIcon)
.get(config.MEMPOOL.API_URL_PREFIX + 'assets/group/:id', routes.$getAssetGroup)
- ;
+ ;
}
if (Common.isLiquid() && config.DATABASE.ENABLED) {
this.app
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs/month', routes.$getElementsPegsByMonth)
- ;
+ ;
}
}
}
diff --git a/backend/tsconfig.json b/backend/tsconfig.json
index 8b4cbea2e..6aa69dc08 100644
--- a/backend/tsconfig.json
+++ b/backend/tsconfig.json
@@ -1,5 +1,6 @@
{
"compilerOptions": {
+ "types": ["node"],
"module": "commonjs",
"target": "esnext",
"lib": ["es2019", "dom"],
@@ -11,7 +12,8 @@
"typeRoots": [
"node_modules/@types"
],
- "allowSyntheticDefaultImports": true
+ "allowSyntheticDefaultImports": true,
+ "esModuleInterop": true
},
"include": [
"src/**/*.ts"
diff --git a/frontend/package.json b/frontend/package.json
index e9463d88e..25b9808c6 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -20,20 +20,20 @@
],
"main": "index.ts",
"scripts": {
- "ng": "./node_modules/@angular/cli/bin/ng",
+ "ng": "./node_modules/@angular/cli/bin/ng.js",
"tsc": "./node_modules/typescript/bin/tsc",
"i18n-extract-from-source": "./node_modules/@angular/cli/bin/ng extract-i18n --out-file ./src/locale/messages.xlf",
"i18n-pull-from-transifex": "tx pull -a --parallel --minimum-perc 1 --force",
- "serve": "npm run generate-config && ng serve -c local",
- "serve:stg": "npm run generate-config && ng serve -c staging",
- "serve:local-prod": "npm run generate-config && ng serve -c local-prod",
- "serve:local-staging": "npm run generate-config && ng serve -c local-staging",
- "start": "npm run generate-config && npm run sync-assets-dev && ng serve -c local",
- "start:stg": "npm run generate-config && npm run sync-assets-dev && ng serve -c staging",
- "start:local-prod": "npm run generate-config && npm run sync-assets-dev && ng serve -c local-prod",
- "start:local-staging": "npm run generate-config && npm run sync-assets-dev && ng serve -c local-staging",
- "start:mixed": "npm run generate-config && npm run sync-assets-dev && ng serve -c mixed",
- "build": "npm run generate-config && ng build --configuration production --localize && npm run sync-assets && npm run build-mempool.js",
+ "serve": "npm run generate-config && npm run ng -- serve -c local",
+ "serve:stg": "npm run generate-config && npm run ng -- serve -c staging",
+ "serve:local-prod": "npm run generate-config && npm run ng -- serve -c local-prod",
+ "serve:local-staging": "npm run generate-config && npm run ng -- serve -c local-staging",
+ "start": "npm run generate-config && npm run sync-assets-dev && npm run ng -- serve -c local",
+ "start:stg": "npm run generate-config && npm run sync-assets-dev && npm run ng -- serve -c staging",
+ "start:local-prod": "npm run generate-config && npm run sync-assets-dev && npm run ng -- serve -c local-prod",
+ "start:local-staging": "npm run generate-config && npm run sync-assets-dev && npm run ng -- serve -c local-staging",
+ "start:mixed": "npm run generate-config && npm run sync-assets-dev && npm run ng -- serve -c mixed",
+ "build": "npm run generate-config && npm run ng -- build --configuration production --localize && npm run sync-assets && npm run build-mempool.js",
"sync-assets": "node sync-assets.js && rsync -av ./dist/mempool/browser/en-US/resources ./dist/mempool/browser/resources",
"sync-assets-dev": "node sync-assets.js dev",
"generate-config": "node generate-config.js",
@@ -41,17 +41,17 @@
"build-mempool-js": "browserify -p tinyify ./node_modules/@mempool/mempool.js/lib/index.js --standalone mempoolJS > ./dist/mempool/browser/en-US/mempool.js",
"build-mempool-bisq-js": "browserify -p tinyify ./node_modules/@mempool/mempool.js/lib/index-bisq.js --standalone bisqJS > ./dist/mempool/browser/en-US/bisq.js",
"build-mempool-liquid-js": "browserify -p tinyify ./node_modules/@mempool/mempool.js/lib/index-liquid.js --standalone liquidJS > ./dist/mempool/browser/en-US/liquid.js",
- "test": "ng test",
- "lint": "ng lint",
- "e2e": "npm run generate-config && ng e2e",
+ "test": "npm run ng -- test",
+ "lint": "npm run ng -- lint",
+ "e2e": "npm run generate-config && npm run ng -- e2e",
"e2e:ci": "npm run cypress:run:ci",
"config:defaults:mempool": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true LIQUID_TESTNET_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=mempool BLOCK_WEIGHT_UNITS=4000000 && npm run generate-config",
"config:defaults:liquid": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true LIQUID_TESTNET_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=liquid BLOCK_WEIGHT_UNITS=300000 && npm run generate-config",
"config:defaults:bisq": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=bisq BLOCK_WEIGHT_UNITS=4000000 && npm run generate-config",
- "dev:ssr": "npm run generate-config && ng run mempool:serve-ssr",
+ "dev:ssr": "npm run generate-config && npm run ng -- run mempool:serve-ssr",
"serve:ssr": "node server.run.js",
- "build:ssr": "npm run build && ng run mempool:server:production && ./node_modules/typescript/bin/tsc server.run.ts",
- "prerender": "ng run mempool:prerender",
+ "build:ssr": "npm run build && npm run ng -- run mempool:server:production && npm run tsc -- server.run.ts",
+ "prerender": "npm run ng -- run mempool:prerender",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"cypress:run:record": "cypress run --record",
From 7f01bda06d790846b35152d48dd267f3dab8da3f Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Tue, 28 Jun 2022 21:02:56 -0400
Subject: [PATCH 07/16] Tell git to ignore .swp files
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index fbf9f9101..687e9e8cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ sitemap
data
docker-compose.yml
backend/mempool-config.json
+*.swp
From 0f39b3b7d0a47cc2e90fb4f51ce1fee8a3d9de6c Mon Sep 17 00:00:00 2001
From: wiz
Date: Sun, 3 Jul 2022 12:31:18 +0400
Subject: [PATCH 08/16] [ops] Upgrade prod install to use Bitcoin v23
---
production/install | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/production/install b/production/install
index 5197ce62f..f715526c0 100755
--- a/production/install
+++ b/production/install
@@ -282,7 +282,7 @@ BITCOIN_REPO_URL=https://github.com/bitcoin/bitcoin
BITCOIN_REPO_NAME=bitcoin
BITCOIN_REPO_BRANCH=master
#BITCOIN_LATEST_RELEASE=$(curl -s https://api.github.com/repos/bitcoin/bitcoin/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
-BITCOIN_LATEST_RELEASE=v22.0
+BITCOIN_LATEST_RELEASE=v23.0
echo -n '.'
BISQ_REPO_URL=https://github.com/bisq-network/bisq
@@ -921,7 +921,7 @@ if [ "${BITCOIN_INSTALL}" = ON ];then
echo "[*] Building Bitcoin from source repo"
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && ./autogen.sh --quiet"
- osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && MAKE=gmake CC=cc CXX=c++ CPPFLAGS=-I/usr/local/include ./configure --with-gui=no --disable-wallet --disable-tests"
+ osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && MAKE=gmake CPPFLAGS=-I/usr/local/include ./configure --with-gui=no --disable-wallet --disable-tests"
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && gmake -j48"
echo "[*] Installing Bitcoin binaries into OS"
From 7f5ddaf930ea2c7ee0c34afe6d3a9fc320d9b23c Mon Sep 17 00:00:00 2001
From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
Date: Sun, 3 Jul 2022 03:29:09 -0700
Subject: [PATCH 09/16] Ignore pushes to the ops branches
---
.github/workflows/cypress.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml
index 918434a93..22031b5db 100644
--- a/.github/workflows/cypress.yml
+++ b/.github/workflows/cypress.yml
@@ -3,6 +3,8 @@ name: Cypress Tests
on:
pull_request:
types: [ opened, review_requested, synchronize ]
+ branches-ignore:
+ - 'ops/**'
jobs:
cypress:
if: "!contains(github.event.pull_request.labels.*.name, 'ops')"
From 72492c9b393d7eb5838437985ef2fd8b12a6f42f Mon Sep 17 00:00:00 2001
From: wiz
Date: Sun, 3 Jul 2022 15:27:11 +0200
Subject: [PATCH 10/16] Enable zmq for bitcoind, fix ./configure opts
---
production/bitcoin.conf | 2 ++
production/install | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/production/bitcoin.conf b/production/bitcoin.conf
index 9a46a63ad..4cb95eacc 100644
--- a/production/bitcoin.conf
+++ b/production/bitcoin.conf
@@ -22,6 +22,8 @@ bind=0.0.0.0:8333
bind=[::]:8333
rpcbind=127.0.0.1:8332
rpcbind=[::1]:8332
+zmqpubrawblock=tcp://127.0.0.1:18332
+zmqpubrawtx=tcp://127.0.0.1:18333
#addnode=[2401:b140:2::92:201]:8333
#addnode=[2401:b140:2::92:202]:8333
#addnode=[2401:b140:2::92:203]:8333
diff --git a/production/install b/production/install
index f715526c0..2ab25ac97 100755
--- a/production/install
+++ b/production/install
@@ -330,7 +330,7 @@ DEBIAN_PKG+=(nodejs npm mariadb-server nginx-core python-certbot-nginx rsync ufw
# packages needed for mempool ecosystem
FREEBSD_PKG=()
FREEBSD_PKG+=(zsh sudo git screen curl wget calc neovim)
-FREEBSD_PKG+=(openssh-portable py38-pip rust llvm90 jq base64)
+FREEBSD_PKG+=(openssh-portable py38-pip rust llvm90 jq base64 libzmq4)
FREEBSD_PKG+=(boost-libs autoconf automake gmake gcc libevent libtool pkgconf)
FREEBSD_PKG+=(nginx rsync py38-certbot-nginx mariadb105-server keybase)
@@ -921,7 +921,7 @@ if [ "${BITCOIN_INSTALL}" = ON ];then
echo "[*] Building Bitcoin from source repo"
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && ./autogen.sh --quiet"
- osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && MAKE=gmake CPPFLAGS=-I/usr/local/include ./configure --with-gui=no --disable-wallet --disable-tests"
+ osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && MAKE=gmake CC=cc CXX=c++ CPPFLAGS=-I/usr/local/include ./configure --with-gui=no --disable-wallet --disable-tests"
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && gmake -j48"
echo "[*] Installing Bitcoin binaries into OS"
From e4ac09ea57971b26de927da6b6904a84bcd5e159 Mon Sep 17 00:00:00 2001
From: Stephan Oeste
Date: Sun, 3 Jul 2022 17:06:53 +0200
Subject: [PATCH 11/16] Fixed dialog error in production installer
---
production/install | 131 +++++++++++++--------------------------------
1 file changed, 37 insertions(+), 94 deletions(-)
diff --git a/production/install b/production/install
index f715526c0..cf5c23437 100755
--- a/production/install
+++ b/production/install
@@ -320,7 +320,7 @@ LIQUIDTESTNET_ASSET_REGISTRY_DB_NAME=asset_registry_testnet_db
# packages needed for mempool ecosystem
DEBIAN_PKG=()
-DEBIAN_PKG+=(zsh vim curl screen openssl python3)
+DEBIAN_PKG+=(zsh vim curl screen openssl python3 dialog)
DEBIAN_PKG+=(build-essential git git-lfs clang cmake jq)
DEBIAN_PKG+=(autotools-dev autoconf automake pkg-config bsdmainutils)
DEBIAN_PKG+=(libevent-dev libdb-dev libssl-dev libtool-dev autotools-dev)
@@ -683,99 +683,42 @@ HOSTNAME=$(cat $tempfile)
$DIALOG --ok-label "Submit" \
--backtitle "$backtitle" "$@" \
- --form "Your fullnode will be installed as follows:" 30 70 0 \
- "BISQ_BLOCKNOTIFY_PORT" 1 1 "${BISQ_BLOCKNOTIFY_PORT}" 1 35 35 0 \
- "BISQ_GROUP" 2 1 "${BISQ_GROUP}" 2 35 35 0 \
- "BISQ_HOME" 3 1 "${BISQ_HOME}" 3 35 35 0 \
- "BISQ_INSTALL" 4 1 "${BISQ_INSTALL}" 4 35 35 0 \
- "BISQ_LATEST_RELEASE" 5 1 "${BISQ_LATEST_RELEASE}" 5 35 35 0 \
- "BISQ_MAINNET_ENABLE" 6 1 "${BISQ_MAINNET_ENABLE}" 6 35 35 0 \
- "BISQ_REPO_BRANCH" 7 1 "${BISQ_REPO_BRANCH}" 7 35 35 0 \
- "BISQ_REPO_NAME" 8 1 "${BISQ_REPO_NAME}" 8 35 35 0 \
- "BISQ_REPO_URL" 9 1 "${BISQ_REPO_URL}" 9 35 35 0 \
- "BISQ_USER" 10 1 "${BISQ_USER}" 10 35 35 0 \
- "BITCOIN_ELECTRS_COMPACTION" 11 1 "${BITCOIN_ELECTRS_COMPACTION}" 11 35 35 0 \
- "BITCOIN_ELECTRS_HOME" 12 1 "${BITCOIN_ELECTRS_HOME}" 12 35 35 0 \
- "BITCOIN_ELECTRS_LATEST_RELEASE" 13 1 "${BITCOIN_ELECTRS_LATEST_RELEASE}" 13 35 35 0 \
- "BITCOIN_ELECTRS_LIGHT_MODE" 14 1 "${BITCOIN_ELECTRS_LIGHT_MODE}" 14 35 35 0 \
- "BITCOIN_ELECTRS_REPO_BRANCH" 15 1 "${BITCOIN_ELECTRS_REPO_BRANCH}" 15 35 35 0 \
- "BITCOIN_ELECTRS_REPO_NAME" 16 1 "${BITCOIN_ELECTRS_REPO_NAME}" 16 35 35 0 \
- "BITCOIN_ELECTRS_REPO_URL" 17 1 "${BITCOIN_ELECTRS_REPO_URL}" 17 35 35 0 \
- "BITCOIN_GROUP" 18 1 "${BITCOIN_GROUP}" 18 35 35 0 \
- "BITCOIN_HOME" 19 1 "${BITCOIN_HOME}" 19 35 35 0 \
- "BITCOIN_INSTALL" 20 1 "${BITCOIN_INSTALL}" 20 35 35 0 \
- "BITCOIN_LATEST_RELEASE" 21 1 "${BITCOIN_LATEST_RELEASE}" 21 35 35 0 \
- "BITCOIN_MAINNET_ENABLE" 22 1 "${BITCOIN_MAINNET_ENABLE}" 22 35 35 0 \
- "BITCOIN_MAINNET_P2P_HOST" 23 1 "${BITCOIN_MAINNET_P2P_HOST}" 23 35 35 0 \
- "BITCOIN_MAINNET_P2P_PORT" 24 1 "${BITCOIN_MAINNET_P2P_PORT}" 24 35 35 0 \
- "BITCOIN_MAINNET_RPC_HOST" 25 1 "${BITCOIN_MAINNET_RPC_HOST}" 25 35 35 0 \
- "BITCOIN_MAINNET_RPC_PORT" 26 1 "${BITCOIN_MAINNET_RPC_PORT}" 26 35 35 0 \
- "BITCOIN_RPC_PASS" 27 1 "${BITCOIN_RPC_PASS}" 27 35 35 0 \
- "BITCOIN_RPC_USER" 28 1 "${BITCOIN_RPC_USER}" 28 35 35 0 \
- "BITCOIN_REPO_BRANCH" 29 1 "${BITCOIN_REPO_BRANCH}" 29 35 35 0 \
- "BITCOIN_REPO_NAME" 30 1 "${BITCOIN_REPO_NAME}" 30 35 35 0 \
- "BITCOIN_REPO_URL" 31 1 "${BITCOIN_REPO_URL}" 31 35 35 0 \
- "BITCOIN_TESTNET_DATA" 32 1 "${BITCOIN_TESTNET_DATA}" 32 35 35 0 \
- "BITCOIN_TESTNET_ENABLE" 33 1 "${BITCOIN_TESTNET_ENABLE}" 33 35 35 0 \
- "BITCOIN_TESTNET_P2P_HOST" 34 1 "${BITCOIN_TESTNET_P2P_HOST}" 34 35 35 0 \
- "BITCOIN_TESTNET_P2P_PORT" 35 1 "${BITCOIN_TESTNET_P2P_PORT}" 35 35 35 0 \
- "BITCOIN_TESTNET_RPC_HOST" 36 1 "${BITCOIN_TESTNET_RPC_HOST}" 36 35 35 0 \
- "BITCOIN_TESTNET_RPC_PORT" 38 1 "${BITCOIN_TESTNET_RPC_PORT}" 38 35 35 0 \
- "BITCOIN_USER" 40 1 "${BITCOIN_USER}" 40 35 35 0 \
- "ELECTRS_DATA_ROOT" 41 1 "${ELECTRS_DATA_ROOT}" 41 35 35 0 \
- "ELECTRS_LIQUID_DATA" 42 1 "${ELECTRS_LIQUID_DATA}" 42 35 35 0 \
- "ELECTRS_LIQUID_HTTP_HOST" 43 1 "${ELECTRS_LIQUID_HTTP_HOST}" 43 35 35 0 \
- "ELECTRS_LIQUID_HTTP_PORT" 44 1 "${ELECTRS_LIQUID_HTTP_PORT}" 44 35 35 0 \
- "ELECTRS_LIQUID_ZPOOL" 45 1 "${ELECTRS_LIQUID_ZPOOL}" 45 35 35 0 \
- "ELECTRS_MAINNET_DATA" 46 1 "${ELECTRS_MAINNET_DATA}" 46 35 35 0 \
- "ELECTRS_MAINNET_HTTP_HOST" 47 1 "${ELECTRS_MAINNET_HTTP_HOST}" 47 35 35 0 \
- "ELECTRS_MAINNET_HTTP_PORT" 48 1 "${ELECTRS_MAINNET_HTTP_PORT}" 48 35 35 0 \
- "ELECTRS_MAINNET_ZPOOL" 49 1 "${ELECTRS_MAINNET_ZPOOL}" 49 35 35 0 \
- "ELECTRS_TESTNET_DATA" 50 1 "${ELECTRS_TESTNET_DATA}" 50 35 35 0 \
- "ELECTRS_TESTNET_HTTP_HOST" 51 1 "${ELECTRS_TESTNET_HTTP_HOST}" 51 35 35 0 \
- "ELECTRS_TESTNET_HTTP_PORT" 52 1 "${ELECTRS_TESTNET_HTTP_PORT}" 52 35 35 0 \
- "ELECTRS_TESTNET_ZPOOL" 53 1 "${ELECTRS_TESTNET_ZPOOL}" 53 35 35 0 \
- "ELEMENTS_ELECTRS_COMPACTION" 54 1 "${ELEMENTS_ELECTRS_COMPACTION}" 54 35 35 0 \
- "ELEMENTS_ELECTRS_HOME" 55 1 "${ELEMENTS_ELECTRS_HOME}" 55 35 35 0 \
- "ELEMENTS_ELECTRS_LATEST_RELEASE" 56 1 "${ELEMENTS_ELECTRS_LATEST_RELEASE}" 56 35 35 0 \
- "ELEMENTS_ELECTRS_LIGHT_MODE" 57 1 "${ELEMENTS_ELECTRS_LIGHT_MODE}" 57 35 35 0 \
- "ELEMENTS_ELECTRS_REPO_BRANCH" 58 1 "${ELEMENTS_ELECTRS_REPO_BRANCH}" 58 35 35 0 \
- "ELEMENTS_ELECTRS_REPO_NAME" 59 1 "${ELEMENTS_ELECTRS_REPO_NAME}" 59 35 35 0 \
- "ELEMENTS_ELECTRS_REPO_URL" 60 1 "${ELEMENTS_ELECTRS_REPO_URL}" 60 35 35 0 \
- "ELEMENTS_GROUP" 61 1 "${ELEMENTS_GROUP}" 61 35 35 0 \
- "ELEMENTS_HOME" 62 1 "${ELEMENTS_HOME}" 62 35 35 0 \
- "ELEMENTS_INSTALL" 63 1 "${ELEMENTS_INSTALL}" 63 35 35 0 \
- "ELEMENTS_LATEST_RELEASE" 64 1 "${ELEMENTS_LATEST_RELEASE}" 64 35 35 0 \
- "ELEMENTS_LIQUID_ENABLE" 65 1 "${ELEMENTS_LIQUID_ENABLE}" 65 35 35 0 \
- "ELEMENTS_LIQUID_P2P_HOST" 66 1 "${ELEMENTS_LIQUID_P2P_HOST}" 66 35 35 0 \
- "ELEMENTS_LIQUID_P2P_PORT" 67 1 "${ELEMENTS_LIQUID_P2P_PORT}" 67 35 35 0 \
- "ELEMENTS_LIQUID_RPC_HOST" 68 1 "${ELEMENTS_LIQUID_RPC_HOST}" 68 35 35 0 \
- "ELEMENTS_RPC_PASS" 69 1 "${ELEMENTS_RPC_PASS}" 69 35 35 0 \
- "ELEMENTS_LIQUID_RPC_PORT" 70 1 "${ELEMENTS_LIQUID_RPC_PORT}" 70 35 35 0 \
- "ELEMENTS_RPC_USER" 71 1 "${ELEMENTS_RPC_USER}" 71 35 35 0 \
- "ELEMENTS_REPO_BRANCH" 72 1 "${ELEMENTS_REPO_BRANCH}" 72 35 35 0 \
- "ELEMENTS_REPO_NAME" 73 1 "${ELEMENTS_REPO_NAME}" 73 35 35 0 \
- "ELEMENTS_REPO_URL" 74 1 "${ELEMENTS_REPO_URL}" 74 35 35 0 \
- "ELEMENTS_USER" 75 1 "${ELEMENTS_USER}" 75 35 35 0 \
- "MEMPOOL_BISQ_HTTP_HOST" 76 1 "${MEMPOOL_BISQ_HTTP_HOST}" 76 35 35 0 \
- "MEMPOOL_BISQ_HTTP_PORT" 77 1 "${MEMPOOL_BISQ_HTTP_PORT}" 77 35 35 0 \
- "MEMPOOL_GROUP" 78 1 "${MEMPOOL_GROUP}" 78 35 35 0 \
- "MEMPOOL_HOME" 79 1 "${MEMPOOL_HOME}" 79 35 35 0 \
- "MEMPOOL_LATEST_RELEASE" 80 1 "${MEMPOOL_LATEST_RELEASE}" 80 35 35 0 \
- "MEMPOOL_LIQUID_HTTP_HOST" 81 1 "${MEMPOOL_LIQUID_HTTP_HOST}" 81 35 35 0 \
- "MEMPOOL_LIQUID_HTTP_PORT" 82 1 "${MEMPOOL_LIQUID_HTTP_PORT}" 82 35 35 0 \
- "MEMPOOL_MAINNET_HTTP_HOST" 83 1 "${MEMPOOL_MAINNET_HTTP_HOST}" 83 35 35 0 \
- "MEMPOOL_MAINNET_HTTP_PORT" 84 1 "${MEMPOOL_MAINNET_HTTP_PORT}" 84 35 35 0 \
- "MEMPOOL_REPO_BRANCH" 85 1 "${MEMPOOL_REPO_BRANCH}" 85 35 35 0 \
- "MEMPOOL_REPO_NAME" 86 1 "${MEMPOOL_REPO_NAME}" 86 35 35 0 \
- "MEMPOOL_REPO_URL" 87 1 "${MEMPOOL_REPO_URL}" 87 35 35 0 \
- "MEMPOOL_TESTNET_HTTP_HOST" 88 1 "${MEMPOOL_TESTNET_HTTP_HOST}" 88 35 35 0 \
- "MEMPOOL_TESTNET_HTTP_PORT" 89 1 "${MEMPOOL_TESTNET_HTTP_PORT}" 89 35 35 0 \
- "MEMPOOL_TOR_HS" 90 1 "${MEMPOOL_TOR_HS}" 90 35 35 0 \
- "MEMPOOL_USER" 91 1 "${MEMPOOL_USER}" 91 35 35 0 \
- "HOSTNAME" 92 1 "${HOSTNAME}" 92 35 35 0 \
- "TOR_INSTALL" 93 1 "${TOR_INSTALL}" 93 35 35 0 \
- "CERTBOT_INSTALL" 94 1 "${CERTBOT_INSTALL}" 94 35 35 0 \
+ --form "Your fullnode will be installed as follows:" 0 0 0 \
+ "BISQ_LATEST_RELEASE" 1 1 "${BISQ_LATEST_RELEASE}" 1 35 35 0 \
+ "BISQ_REPO_BRANCH" 2 1 "${BISQ_REPO_BRANCH}" 2 35 35 0 \
+ "BISQ_REPO_NAME" 3 1 "${BISQ_REPO_NAME}" 3 35 35 0 \
+ "BISQ_REPO_URL" 4 1 "${BISQ_REPO_URL}" 4 35 35 0 \
+ "BITCOIN_ELECTRS_LATEST_RELEASE" 5 1 "${BITCOIN_ELECTRS_LATEST_RELEASE}" 5 35 35 0 \
+ "BITCOIN_ELECTRS_LIGHT_MODE" 6 1 "${BITCOIN_ELECTRS_LIGHT_MODE}" 6 35 35 0 \
+ "BITCOIN_ELECTRS_REPO_BRANCH" 7 1 "${BITCOIN_ELECTRS_REPO_BRANCH}" 7 35 35 0 \
+ "BITCOIN_ELECTRS_REPO_NAME" 8 1 "${BITCOIN_ELECTRS_REPO_NAME}" 8 35 35 0 \
+ "BITCOIN_ELECTRS_REPO_URL" 9 1 "${BITCOIN_ELECTRS_REPO_URL}" 9 35 35 0 \
+ "BITCOIN_LATEST_RELEASE" 10 1 "${BITCOIN_LATEST_RELEASE}" 10 35 35 0 \
+ "BITCOIN_MAINNET_ENABLE" 11 1 "${BITCOIN_MAINNET_ENABLE}" 11 35 35 0 \
+ "BITCOIN_REPO_BRANCH" 12 1 "${BITCOIN_REPO_BRANCH}" 12 35 35 0 \
+ "BITCOIN_REPO_NAME" 13 1 "${BITCOIN_REPO_NAME}" 13 35 35 0 \
+ "BITCOIN_REPO_URL" 14 1 "${BITCOIN_REPO_URL}" 14 35 35 0 \
+ "BITCOIN_TESTNET_ENABLE" 15 1 "${BITCOIN_TESTNET_ENABLE}" 15 35 35 0 \
+ "ELEMENTS_INSTALL" 16 1 "${ELEMENTS_INSTALL}" 16 35 35 0 \
+ "ELEMENTS_LATEST_RELEASE" 17 1 "${ELEMENTS_LATEST_RELEASE}" 17 35 35 0 \
+ "ELEMENTS_LIQUID_ENABLE" 18 1 "${ELEMENTS_LIQUID_ENABLE}" 18 35 35 0 \
+ "ELEMENTS_REPO_BRANCH" 19 1 "${ELEMENTS_REPO_BRANCH}" 19 35 35 0 \
+ "ELEMENTS_REPO_NAME" 20 1 "${ELEMENTS_REPO_NAME}" 20 35 35 0 \
+ "ELEMENTS_REPO_URL" 21 1 "${ELEMENTS_REPO_URL}" 21 35 35 0 \
+ "MEMPOOL_LATEST_RELEASE" 22 1 "${MEMPOOL_LATEST_RELEASE}" 22 35 35 0 \
+ "MEMPOOL_LIQUID_HTTP_HOST" 23 1 "${MEMPOOL_LIQUID_HTTP_HOST}" 23 35 35 0 \
+ "MEMPOOL_LIQUID_HTTP_PORT" 24 1 "${MEMPOOL_LIQUID_HTTP_PORT}" 24 35 35 0 \
+ "MEMPOOL_MAINNET_HTTP_HOST" 25 1 "${MEMPOOL_MAINNET_HTTP_HOST}" 25 35 35 0 \
+ "MEMPOOL_MAINNET_HTTP_PORT" 26 1 "${MEMPOOL_MAINNET_HTTP_PORT}" 26 35 35 0 \
+ "MEMPOOL_REPO_BRANCH" 27 1 "${MEMPOOL_REPO_BRANCH}" 27 35 35 0 \
+ "MEMPOOL_REPO_NAME" 28 1 "${MEMPOOL_REPO_NAME}" 28 35 35 0 \
+ "MEMPOOL_REPO_URL" 29 1 "${MEMPOOL_REPO_URL}" 29 35 35 0 \
+ "MEMPOOL_TESTNET_HTTP_HOST" 30 1 "${MEMPOOL_TESTNET_HTTP_HOST}" 30 35 35 0 \
+ "MEMPOOL_TESTNET_HTTP_PORT" 31 1 "${MEMPOOL_TESTNET_HTTP_PORT}" 31 35 35 0 \
+ "MEMPOOL_TOR_HS" 32 1 "${MEMPOOL_TOR_HS}" 32 35 35 0 \
+ "HOSTNAME" 33 1 "${HOSTNAME}" 33 35 35 0 \
+ "TOR_INSTALL" 34 1 "${TOR_INSTALL}" 34 35 35 0 \
+ "CERTBOT_INSTALL" 35 1 "${CERTBOT_INSTALL}" 35 35 35 0 \
2> $tempfile
retval=$?
From 00bb09faaac0a3f26d23f3042533f2d403bc901b Mon Sep 17 00:00:00 2001
From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
Date: Mon, 4 Jul 2022 02:55:21 -0700
Subject: [PATCH 12/16] Skip tests if branch name starts with ops
---
.github/workflows/cypress.yml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml
index 22031b5db..b057e6141 100644
--- a/.github/workflows/cypress.yml
+++ b/.github/workflows/cypress.yml
@@ -3,11 +3,9 @@ name: Cypress Tests
on:
pull_request:
types: [ opened, review_requested, synchronize ]
- branches-ignore:
- - 'ops/**'
jobs:
cypress:
- if: "!contains(github.event.pull_request.labels.*.name, 'ops')"
+ if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
From 383e3e55a5ee93d780e58f86132e3228c54ecea3 Mon Sep 17 00:00:00 2001
From: Stephan Oeste
Date: Mon, 4 Jul 2022 16:13:04 +0200
Subject: [PATCH 13/16] Update python version for FreeBSD 13 in prod install
---
production/install | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/production/install b/production/install
index 2ab25ac97..e67b9ee6c 100755
--- a/production/install
+++ b/production/install
@@ -180,7 +180,7 @@ case $OS in
TOR_PKG=tor
TOR_USER=_tor
TOR_GROUP=_tor
- CERTBOT_PKG=py38-certbot
+ CERTBOT_PKG=py39-certbot
;;
Debian)
@@ -330,9 +330,9 @@ DEBIAN_PKG+=(nodejs npm mariadb-server nginx-core python-certbot-nginx rsync ufw
# packages needed for mempool ecosystem
FREEBSD_PKG=()
FREEBSD_PKG+=(zsh sudo git screen curl wget calc neovim)
-FREEBSD_PKG+=(openssh-portable py38-pip rust llvm90 jq base64 libzmq4)
+FREEBSD_PKG+=(openssh-portable py39-pip rust llvm90 jq base64 libzmq4)
FREEBSD_PKG+=(boost-libs autoconf automake gmake gcc libevent libtool pkgconf)
-FREEBSD_PKG+=(nginx rsync py38-certbot-nginx mariadb105-server keybase)
+FREEBSD_PKG+=(nginx rsync py39-certbot-nginx mariadb105-server keybase)
#############################
##### utility functions #####
From a7b28ca8e81652cb9a74dc580c85b79cb63d4e4e Mon Sep 17 00:00:00 2001
From: Stephan Oeste
Date: Mon, 4 Jul 2022 16:57:20 +0200
Subject: [PATCH 14/16] User creation for linux in the prod install script
---
production/install | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/production/install b/production/install
index 2ab25ac97..927ef4372 100755
--- a/production/install
+++ b/production/install
@@ -403,15 +403,31 @@ osPackageInstallAll()
esac
}
+# osUserCreate username home_directory main_groupname [additional_group]
osUserCreate()
{
case $OS in
FreeBSD)
- # pw useradd -d /mempool -g mempool -n mempool
- osSudo "${ROOT_USER}" pw useradd $*
+ # pw useradd -d /mempool -g mempool [-G additional_group] -n mampool
+ if [ $# -eq 3 ] ; then
+ osSudo "${ROOT_USER}" pw useradd -d "$2" -g "$3" -n "$1"
+ elif [ $# -eq 4 ]; then
+ osSudo "${ROOT_USER}" pw useradd -d "$2" -g "$3" -G "$4" -n "$1"
+ else
+ echo "Illegal number of parameters"
+ exit 1
+ fi
;;
Debian)
- osSudo "${ROOT_USER}" useradd $*
+ # useradd -d /mempool -g mempool [-G additional_group] mempool
+ if [ $# -eq 3 ] ; then
+ osSudo "${ROOT_USER}" useradd -d "$2" -g "$3" "$1"
+ elif [ $# -eq 4 ]; then
+ osSudo "${ROOT_USER}" useradd -d "$2" -g "$3" -G "$4" "$1"
+ else
+ echo "Illegal number of parameters"
+ exit 1
+ fi
;;
esac
}
@@ -818,7 +834,7 @@ osPackageInstallAll
echo "[*] Creating Mempool user with Tor access"
osGroupCreate "${MEMPOOL_GROUP}"
-osUserCreate -d "${MEMPOOL_HOME}" -g "${MEMPOOL_GROUP}" -n "${MEMPOOL_USER}"
+osUserCreate "${MEMPOOL_USER}" "${MEMPOOL_HOME}" "${MEMPOOL_GROUP}"
osSudo "${ROOT_USER}" chsh -s `which zsh` "${MEMPOOL_USER}"
id "${MEMPOOL_USER}"
@@ -895,12 +911,12 @@ if [ "${BITCOIN_INSTALL}" = ON ];then
echo "[*] Creating Bitcoin user with Tor access"
osGroupCreate "${BITCOIN_GROUP}"
- osUserCreate -d "${BITCOIN_HOME}" -g "${BITCOIN_GROUP}" -G "${TOR_GROUP}" -n "${BITCOIN_USER}"
+ osUserCreate "${BITCOIN_USER}" "${BITCOIN_HOME}" "${BITCOIN_GROUP}" "${TOR_GROUP}"
osSudo "${ROOT_USER}" chsh -s `which zsh` "${BITCOIN_USER}"
echo "[*] Creating Bitcoin minfee user with Tor access"
osGroupCreate "${MINFEE_GROUP}"
- osUserCreate -d "${MINFEE_HOME}" -g "${MINFEE_GROUP}" -G "${TOR_GROUP}" -n "${MINFEE_USER}"
+ osUserCreate "${MINFEE_USER}" "${MINFEE_HOME}" "${MINFEE_GROUP}" "${TOR_GROUP}"
osSudo "${ROOT_USER}" chown -R "${MINFEE_USER}:${MINFEE_GROUP}" "${MINFEE_HOME}"
osSudo "${ROOT_USER}" chsh -s `which zsh` "${MINFEE_USER}"
osSudo "${MINFEE_USER}" touch "${MINFEE_HOME}/.zshrc"
@@ -948,7 +964,7 @@ if [ "${ELEMENTS_INSTALL}" = ON ];then
echo "[*] Creating Elements user with Tor access"
osGroupCreate "${ELEMENTS_GROUP}"
- osUserCreate -d "${ELEMENTS_HOME}" -g "${ELEMENTS_GROUP}" -G "${TOR_GROUP}" -n "${ELEMENTS_USER}"
+ osUserCreate "${ELEMENTS_USER}" "${ELEMENTS_HOME}" "${ELEMENTS_GROUP}" "${TOR_GROUP}"
osSudo "${ROOT_USER}" chsh -s `which zsh` "${ELEMENTS_USER}"
echo "[*] Creating Elements data folder"
@@ -1073,7 +1089,7 @@ if [ "${BISQ_INSTALL}" = ON ];then
echo "[*] Creating Bisq user with Tor access"
osGroupCreate "${BISQ_GROUP}"
- osUserCreate -d "${BISQ_HOME}" -g "${BISQ_GROUP}" -G "${TOR_GROUP}" -n "${BISQ_USER}"
+ osUserCreate "${BISQ_USER}" "${BISQ_HOME}" "${BISQ_GROUP}" "${TOR_GROUP}"
osSudo "${ROOT_USER}" chsh -s `which zsh` "${BISQ_USER}"
echo "[*] Creating Bisq data folder"
From 3c2171efb3dcec06ebfa0fd699ca4e06e7142bf1 Mon Sep 17 00:00:00 2001
From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
Date: Mon, 4 Jul 2022 08:37:36 -0700
Subject: [PATCH 15/16] Fix WebSocket type error
---
backend/src/api/websocket-handler.ts | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/backend/src/api/websocket-handler.ts b/backend/src/api/websocket-handler.ts
index 9632b03e3..3c5b830cc 100644
--- a/backend/src/api/websocket-handler.ts
+++ b/backend/src/api/websocket-handler.ts
@@ -1,7 +1,9 @@
import logger from '../logger';
import * as WebSocket from 'ws';
-import { BlockExtended, TransactionExtended, WebsocketResponse, MempoolBlock, MempoolBlockDelta,
- OptimizedStatistic, ILoadingIndicators, IConversionRates } from '../mempool.interfaces';
+import {
+ BlockExtended, TransactionExtended, WebsocketResponse, MempoolBlock, MempoolBlockDelta,
+ OptimizedStatistic, ILoadingIndicators, IConversionRates
+} from '../mempool.interfaces';
import blocks from './blocks';
import memPool from './mempool';
import backendInfo from './backend-info';
@@ -164,7 +166,7 @@ class WebsocketHandler {
throw new Error('WebSocket.Server is not set');
}
- this.wss.clients.forEach((client: WebSocket) => {
+ this.wss.clients.forEach((client) => {
if (client.readyState !== WebSocket.OPEN) {
return;
}
@@ -179,7 +181,7 @@ class WebsocketHandler {
throw new Error('WebSocket.Server is not set');
}
- this.wss.clients.forEach((client: WebSocket) => {
+ this.wss.clients.forEach((client) => {
if (client.readyState !== WebSocket.OPEN) {
return;
}
@@ -192,7 +194,7 @@ class WebsocketHandler {
throw new Error('WebSocket.Server is not set');
}
- this.wss.clients.forEach((client: WebSocket) => {
+ this.wss.clients.forEach((client) => {
if (client.readyState !== WebSocket.OPEN) {
return;
}
@@ -224,7 +226,7 @@ class WebsocketHandler {
throw new Error('WebSocket.Server is not set');
}
- this.wss.clients.forEach((client: WebSocket) => {
+ this.wss.clients.forEach((client) => {
if (client.readyState !== WebSocket.OPEN) {
return;
}
@@ -255,7 +257,7 @@ class WebsocketHandler {
memPool.handleRbfTransactions(rbfTransactions);
const recommendedFees = feeApi.getRecommendedFee();
- this.wss.clients.forEach(async (client: WebSocket) => {
+ this.wss.clients.forEach(async (client) => {
if (client.readyState !== WebSocket.OPEN) {
return;
}
From f80b97af53dd8818ac7f7c81e72e2965feca3584 Mon Sep 17 00:00:00 2001
From: Stephan Oeste
Date: Mon, 4 Jul 2022 17:11:01 +0200
Subject: [PATCH 16/16] Create directories for Linux in prod install
---
production/install | 84 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/production/install b/production/install
index 2ab25ac97..2559758c7 100755
--- a/production/install
+++ b/production/install
@@ -536,6 +536,87 @@ zfsCreateFilesystems()
fi
}
+ext4CreateDir()
+{
+ mkdir -p "/backup" "${ELEMENTS_HOME}" "${BITCOIN_HOME}" "${MINFEE_HOME}" "${ELECTRS_HOME}" "${MEMPOOL_HOME}" "${MYSQL_HOME}" "${BITCOIN_ELECTRS_HOME}" "${ELEMENTS_HOME}/liquidv1" "${ELEMENTS_ELECTRS_HOME}"
+exit
+ # Bitcoin Mainnet
+ if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
+ for folder in chainstate indexes blocks
+ do
+ mkdir -p "${BITCOIN_HOME}/${folder}"
+ done
+ fi
+
+ # Bitcoin Testnet
+ if [ "${BITCOIN_TESTNET_ENABLE}" = ON ];then
+ mkdir -p "${BITCOIN_TESTNET_DATA}"
+ for folder in chainstate indexes blocks
+ do
+ mkdir -p "${BITCOIN_TESTNET_DATA}/${folder}"
+ done
+ fi
+
+ # Bitcoin Signet
+ if [ "${BITCOIN_SIGNET_ENABLE}" = ON ];then
+ mkdir -p "${BITCOIN_SIGNET_DATA}"
+ for folder in chainstate indexes blocks
+ do
+ mkdir -p "${BITCOIN_SIGNET_DATA}/${folder}"
+ done
+ fi
+
+ # electrs mainnet data
+ if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
+ mkdir -p "${ELECTRS_MAINNET_DATA}"
+ for folder in cache history txstore
+ do
+ mkdir -p "${ELECTRS_MAINNET_DATA}/newindex/${folder}"
+ done
+ fi
+
+ # electrs testnet data
+ if [ "${BITCOIN_TESTNET_ENABLE}" = ON ];then
+ mkdir -p "${ELECTRS_TESTNET_DATA}"
+ for folder in cache history txstore
+ do
+ mkdir -p "${ELECTRS_TESTNET_DATA}/newindex/${folder}"
+ done
+ fi
+
+ # electrs signet data
+ if [ "${BITCOIN_SIGNET_ENABLE}" = ON ];then
+ mkdir -p "${ELECTRS_SIGNET_DATA}"
+ for folder in cache history txstore
+ do
+ mkdir -p "${ELECTRS_SIGNET_DATA}/newindex/${folder}"
+ done
+ fi
+
+ # electrs liquid data
+ if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then
+ mkdir -p "${ELECTRS_LIQUID_DATA}"
+ for folder in cache history txstore
+ do
+ mkdir -p "${ELECTRS_LIQUID_DATA}/newindex/${folder}"
+ done
+ fi
+
+ # electrs liquidtestnet data
+ if [ "${ELEMENTS_LIQUIDTESTNET_ENABLE}" = ON ];then
+ mkdir -p "${ELECTRS_LIQUIDTESTNET_DATA}"
+ for folder in cache history txstore
+ do
+ mkdir -p "${ELECTRS_LIQUIDTESTNET_DATA}/newindex/${folder}"
+ done
+ fi
+
+ if [ "${BISQ_INSTALL}" = ON ];then
+ mkdir -p "${BISQ_HOME}"
+ fi
+}
+
+
##### Perform sanity checks before trying anything
# what OS running, what FS partitions, etc.
@@ -802,6 +883,9 @@ case $OS in
FreeBSD)
zfsCreateFilesystems
;;
+ Debian)
+ ext4CreateDir
+ ;;
esac
###############################