diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 5e82690e3c..58a8156fca 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -21,7 +21,8 @@ jobs: container: # A Docker image with Semgrep installed. Do not change this. - image: returntocorp/semgrep + # TODO: Remove version pinning after https://github.com/returntocorp/semgrep/issues/9091 is resolved + image: returntocorp/semgrep:1.45.0 # Skip any PR created by dependabot to avoid permission issues: if: (github.actor != 'dependabot[bot]') diff --git a/Makefile b/Makefile index 3f1709c1a7..b950497b1a 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,9 @@ logs-live-%: print-config: $(compose) config -build: build-app-registry build-connector build-indexer build-coordinator build-statistics build-fees build-market build-export build-gateway +build: build-local build-images + +build-images: build-app-registry build-connector build-indexer build-coordinator build-statistics build-fees build-market build-export build-gateway build-all: build build-template build-tests diff --git a/README.md b/README.md index e7ab2869c3..54d028b219 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ cd lisk-service If you wish to build the local version of Lisk Service execute the following command below: ```bash -make build +make build-images ``` > This step is only necessary if you wish to build a custom or pre-release version of Lisk Service that does not have a pre-built Docker image published on the Docker Hub. The installation script chooses the last available stable version on Docker Hub, **unless** there is no local image. If you are unsure about any local builds, use the `make clean` command to remove all locally built docker images. diff --git a/docker-compose.yml b/docker-compose.yml index cc328c8478..4ad9ff8cc9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -196,12 +196,14 @@ services: - SERVICE_LOG_FILE=${SERVICE_LOG_FILE} - SERVICE_LOG_LEVEL=${SERVICE_LOG_LEVEL} - ENABLE_APPLY_SNAPSHOT=${ENABLE_APPLY_SNAPSHOT} + - DURABILITY_VERIFY_FREQUENCY=${DURABILITY_VERIFY_FREQUENCY} - INDEX_SNAPSHOT_URL=${INDEX_SNAPSHOT_URL} - ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP=${ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP} - DOCKER_HOST=${DOCKER_HOST} - MAINCHAIN_SERVICE_URL=${MAINCHAIN_SERVICE_URL} - LISK_STATIC=${LISK_STATIC} - DEVNET_MAINCHAIN_URL=${DEVNET_MAINCHAIN_URL} + - ACCOUNT_BALANCE_UPDATE_BATCH_SIZE=${ACCOUNT_BALANCE_UPDATE_BATCH_SIZE} - JOB_INTERVAL_DELETE_SERIALIZED_EVENTS=${JOB_INTERVAL_DELETE_SERIALIZED_EVENTS} - JOB_SCHEDULE_DELETE_SERIALIZED_EVENTS=${JOB_SCHEDULE_DELETE_SERIALIZED_EVENTS} - JOB_INTERVAL_REFRESH_VALIDATORS=${JOB_INTERVAL_REFRESH_VALIDATORS} diff --git a/docker/example.env b/docker/example.env index def1887202..82323cf5f5 100644 --- a/docker/example.env +++ b/docker/example.env @@ -55,8 +55,10 @@ ENABLE_PERSIST_EVENTS=false # DEVNET_MAINCHAIN_URL='http://devnet-service.liskdev.net:9901' # ESTIMATES_BUFFER_BYTES_LENGTH=0 # ENABLE_APPLY_SNAPSHOT=false +# DURABILITY_VERIFY_FREQUENCY=20 # INDEX_SNAPSHOT_URL= '' # ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP=false +# ACCOUNT_BALANCE_UPDATE_BATCH_SIZE=1000 # Moleculer jobs configuration # JOB_INTERVAL_DELETE_SERIALIZED_EVENTS=0 diff --git a/docs/antora/modules/ROOT/pages/configuration/index.adoc b/docs/antora/modules/ROOT/pages/configuration/index.adoc index 15c507de1c..2038a68383 100644 --- a/docs/antora/modules/ROOT/pages/configuration/index.adoc +++ b/docs/antora/modules/ROOT/pages/configuration/index.adoc @@ -391,9 +391,9 @@ Only to be used when the genesis block is large enough to be transmitted over AP | `ENABLE_BLOCK_CACHING` | boolean | Boolean flag to enable block caching. -Enabled by default. -To disable it, set it to `false`. -| true +Disabled by default. +To enable it, set it to `true`. +| false | `EXPIRY_IN_HOURS` | number @@ -698,6 +698,12 @@ By default, it is set to run every 15 minutes. By default, it is set to `0`. | 0 +| `ACCOUNT_BALANCE_UPDATE_BATCH_SIZE` +| number +| Number of accounts for which the balance index is updated at a time. +By default, it is set to `1000`. +| 1000 + | `MAINCHAIN_SERVICE_URL` | string | Mainchain service URL for custom deployments. @@ -722,6 +728,11 @@ To accelerate the indexing process, the blockchain-indexer microservice also sup |Enable or disable auto-apply snapshot feature. By default, the value is false. |false +|`DURABILITY_VERIFY_FREQUENCY` +|number +|Frequency in milliseconds to verify if a block is indexed or rolled-back successfully. By default, it is set to 20. +|false + |`INDEX_SNAPSHOT_URL` |string |Custom snapshot download URL (expected to end with sql.gz). @@ -756,6 +767,7 @@ module.exports = { ENABLE_INDEXING_MODE: 'true', ENABLE_PERSIST_EVENTS: 'false', // ENABLE_APPLY_SNAPSHOT: 'false', + // DURABILITY_VERIFY_FREQUENCY: 20, // INDEX_SNAPSHOT_URL: '', // ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP: 'true', // SERVICE_INDEXER_MYSQL_READ_REPLICA: 'mysql://lisk:password@127.0.0.1:3306/lisk', @@ -770,6 +782,7 @@ module.exports = { // LISK_STATIC: 'https://static-data.lisk.com', // DEVNET_MAINCHAIN_URL: 'http://devnet-service.liskdev.net:9901', // ESTIMATES_BUFFER_BYTES_LENGTH: 0, + // ACCOUNT_BALANCE_UPDATE_BATCH_SIZE: 1000, // JOB_INTERVAL_DELETE_SERIALIZED_EVENTS: 0, // JOB_SCHEDULE_DELETE_SERIALIZED_EVENTS: '*/5 * * * *', // JOB_INTERVAL_REFRESH_VALIDATORS: 0, diff --git a/docs/antora/modules/ROOT/pages/index.adoc b/docs/antora/modules/ROOT/pages/index.adoc index f80c218be4..a063512c11 100644 --- a/docs/antora/modules/ROOT/pages/index.adoc +++ b/docs/antora/modules/ROOT/pages/index.adoc @@ -220,7 +220,7 @@ The Gateway service provides the following APIs, which all users of Lisk Service // [source,bash] // ---- -// make build +// make build-images // ---- // Please note, this step is only necessary if you wish to build a custom or pre-release version of Lisk Service that does not have a pre-built Docker image published on the Docker Hub. // The installation script chooses the last available stable version on the Docker Hub, *unless* there is no local image. diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 6f2b9aefff..aabc359c51 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -18,7 +18,7 @@ Mona Bärenfänger <mona@lightcurve.io> .Inside the lisk-service root folder ---- -make build +make build-images ---- This creates the necessary Docker images to start Lisk Service in the containers. @@ -348,7 +348,7 @@ git checkout v0.7.0 . Build the required updated Docker images + ---- -make build +make build-images ---- . Start Lisk Service in the containers diff --git a/docs/antora/modules/ROOT/pages/setup/docker.adoc b/docs/antora/modules/ROOT/pages/setup/docker.adoc index 8e52d6d411..2dae5df5e7 100644 --- a/docs/antora/modules/ROOT/pages/setup/docker.adoc +++ b/docs/antora/modules/ROOT/pages/setup/docker.adoc @@ -172,12 +172,12 @@ To build Lisk Service from local files, first, navigate to the `lisk-service` re .Working directory: lisk-service/ ---- -make build +make build-images ---- Lisk Service is now ready to use on your machine. -TIP: If you skipped the step to configure Docker to run without `*sudo*` rights, you need to prepend `*sudo*` with aforementioned command: `*sudo make build*` +TIP: If you skipped the step to configure Docker to run without `*sudo*` rights, you need to prepend `*sudo*` with aforementioned command: `*sudo make build-images*` == Connecting Lisk Service to a blockchain node diff --git a/docs/api/version3.md b/docs/api/version3.md index 1b9b0da304..9ce55481df 100644 --- a/docs/api/version3.md +++ b/docs/api/version3.md @@ -169,6 +169,7 @@ _Supports pagination._ "transactionRoot": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "assetsRoot": "6e904b2f678eb3b6c3042acb188a607d903d441d61508d047fe36b3c982995c8", "stateRoot": "95d9b1773b78034b8df9ac741c903b881da761d8ba002a939de28a4b86982c04", + "eventRoot": "7dee8ae1899582aabb0c4b967ceda6874329dba57b5eb23d7c62890917a55cbd", "maxHeightGenerated": 559421, "maxHeightPrevoted": 559434, "validatorsHash": "ad0076aa444f6cda608bb163c3bd77d9bf172f1d2803d53095bc0f277db6bcb3", @@ -5826,6 +5827,7 @@ Proxy request to directly invoke application endpoint. Returns endpoint response "transactionRoot": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "assetsRoot": "6e904b2f678eb3b6c3042acb188a607d903d441d61508d047fe36b3c982995c8", "stateRoot": "95d9b1773b78034b8df9ac741c903b881da761d8ba002a939de28a4b86982c04", + "eventRoot": "7dee8ae1899582aabb0c4b967ceda6874329dba57b5eb23d7c62890917a55cbd", "maxHeightGenerated": 559421, "maxHeightPrevoted": 559434, "validatorsHash": "ad0076aa444f6cda608bb163c3bd77d9bf172f1d2803d53095bc0f277db6bcb3", diff --git a/docs/api/websocket_subscribe_api.md b/docs/api/websocket_subscribe_api.md index a4e89702c0..ee2c646848 100644 --- a/docs/api/websocket_subscribe_api.md +++ b/docs/api/websocket_subscribe_api.md @@ -96,6 +96,7 @@ Updates about a newly generated block. "transactionRoot": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "assetsRoot": "6e904b2f678eb3b6c3042acb188a607d903d441d61508d047fe36b3c982995c8", "stateRoot": "95d9b1773b78034b8df9ac741c903b881da761d8ba002a939de28a4b86982c04", + "eventRoot": "7dee8ae1899582aabb0c4b967ceda6874329dba57b5eb23d7c62890917a55cbd", "maxHeightGenerated": 559421, "maxHeightPrevoted": 559434, "validatorsHash": "ad0076aa444f6cda608bb163c3bd77d9bf172f1d2803d53095bc0f277db6bcb3", @@ -146,6 +147,7 @@ Updates about a deleted block. This usually happens when the chain switches fork "transactionRoot": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "assetsRoot": "6e904b2f678eb3b6c3042acb188a607d903d441d61508d047fe36b3c982995c8", "stateRoot": "95d9b1773b78034b8df9ac741c903b881da761d8ba002a939de28a4b86982c04", + "eventRoot": "7dee8ae1899582aabb0c4b967ceda6874329dba57b5eb23d7c62890917a55cbd", "maxHeightGenerated": 559421, "maxHeightPrevoted": 559434, "validatorsHash": "ad0076aa444f6cda608bb163c3bd77d9bf172f1d2803d53095bc0f277db6bcb3", diff --git a/docs/build_from_source.md b/docs/build_from_source.md index a762f8f5bf..040b37b5d4 100644 --- a/docs/build_from_source.md +++ b/docs/build_from_source.md @@ -185,4 +185,4 @@ yarn run test It is now possible to use your preferred editor to make changes in the source files. Take a look at the [template](../services/template) project in order to find some suitable examples. -Once completed, it is also possible to build Docker images with `make build` and run them using the method from the main [README](../README.md). +Once completed, it is also possible to build Docker images with `make build-images` and run them using the method from the main [README](../README.md). diff --git a/docs/prerequisites_docker_debian.md b/docs/prerequisites_docker_debian.md index 4b474c48e2..6ac08d458c 100644 --- a/docs/prerequisites_docker_debian.md +++ b/docs/prerequisites_docker_debian.md @@ -34,6 +34,6 @@ Follow the official [documentation](https://docs.docker.com/compose/install/) to ## Next steps -If you have all dependencies installed properly, it is possible to run pre-build Docker images with Lisk Service. It is also possible to build those images locally by using the `make build` command. +If you have all dependencies installed properly, it is possible to run pre-build Docker images with Lisk Service. It is also possible to build those images locally by using the `make build-images` command. Refer to the main [README](../README.md) file regarding the next steps. diff --git a/docs/prerequisites_docker_macos.md b/docs/prerequisites_docker_macos.md index 800791f30f..5e16db3cd4 100644 --- a/docs/prerequisites_docker_macos.md +++ b/docs/prerequisites_docker_macos.md @@ -39,6 +39,6 @@ The most recent version of Docker Desktop already contains docker-compose tool. ## Next steps -If you have all dependencies installed properly, it is possible to run pre-build Docker images with Lisk Service. It is also possible to build those images locally by using the `make build` command. +If you have all dependencies installed properly, it is possible to run pre-build Docker images with Lisk Service. It is also possible to build those images locally by using the `make build-images` command. Refer to the main [README](../README.md) file regarding the next steps. diff --git a/docs/prerequisites_docker_ubuntu.md b/docs/prerequisites_docker_ubuntu.md index 158682a364..d555d0fc22 100644 --- a/docs/prerequisites_docker_ubuntu.md +++ b/docs/prerequisites_docker_ubuntu.md @@ -34,6 +34,6 @@ Please follow the official [documentation](https://docs.docker.com/compose/insta ## Next steps -When all of the dependencies are correctly installed, it will then be possible to run pre-build Docker images with Lisk Service. It is also possible to build those images locally by executing the `make build` command from within the `lisk-service` directory. +When all of the dependencies are correctly installed, it will then be possible to run pre-build Docker images with Lisk Service. It is also possible to build those images locally by executing the `make build-images` command from within the `lisk-service` directory. Refer to the main [README](../README.md) file regarding the next steps. diff --git a/ecosystem.config.js b/ecosystem.config.js index 2c634a7223..5d7ab49c39 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -156,6 +156,7 @@ module.exports = { ENABLE_INDEXING_MODE: true, ENABLE_PERSIST_EVENTS: false, // ENABLE_APPLY_SNAPSHOT: false, + // DURABILITY_VERIFY_FREQUENCY: 20, // INDEX_SNAPSHOT_URL: '', // ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP: true, // SERVICE_INDEXER_MYSQL_READ_REPLICA: 'mysql://lisk:password@127.0.0.1:3306/lisk', @@ -170,6 +171,7 @@ module.exports = { // LISK_STATIC: 'https://static-data.lisk.com', // DEVNET_MAINCHAIN_URL: 'http://devnet-service.liskdev.net:9901', // ESTIMATES_BUFFER_BYTES_LENGTH: 0, + // ACCOUNT_BALANCE_UPDATE_BATCH_SIZE: 1000, // JOB_INTERVAL_DELETE_SERIALIZED_EVENTS: 0, // JOB_SCHEDULE_DELETE_SERIALIZED_EVENTS: '*/5 * * * *', // JOB_INTERVAL_REFRESH_VALIDATORS: 0, diff --git a/framework/dist/lisk-service-framework-1.6.4.tgz b/framework/dist/lisk-service-framework-1.6.4.tgz new file mode 100644 index 0000000000..135b1511a8 Binary files /dev/null and b/framework/dist/lisk-service-framework-1.6.4.tgz differ diff --git a/framework/dist/lisk-service-framework-1.6.5.tgz b/framework/dist/lisk-service-framework-1.6.5.tgz new file mode 100644 index 0000000000..cedef91522 Binary files /dev/null and b/framework/dist/lisk-service-framework-1.6.5.tgz differ diff --git a/framework/index.js b/framework/index.js index 476ee43a62..67537afe5b 100644 --- a/framework/index.js +++ b/framework/index.js @@ -33,12 +33,12 @@ module.exports = { sqlite3: require('./src/database/sqlite3'), }, Utils: { + delay: require('./src/delay'), requireAllJs: require('./src/requireAllJs'), waitForIt: require('./src/waitForIt'), Data: require('./src/data'), fs: require('./src/fs'), ...require('./src/data'), - delay: require('./src/delay'), }, Constants: { ...require('./constants/ErrorCodes'), diff --git a/framework/package.json b/framework/package.json index b776f5021b..a51c70040c 100644 --- a/framework/package.json +++ b/framework/package.json @@ -1,6 +1,6 @@ { "name": "lisk-service-framework", - "version": "1.6.3", + "version": "1.6.5", "description": "Lisk Service Framework", "keywords": [ "lisk", diff --git a/framework/src/database/sqlite3.js b/framework/src/database/sqlite3.js index 2c6eca1c8b..b6e89931a8 100644 --- a/framework/src/database/sqlite3.js +++ b/framework/src/database/sqlite3.js @@ -70,24 +70,24 @@ const createDBConnection = async (dbDataDir, tableName) => { return knex; }; -const getDBConnection = async (tableName, dbDataDir = DB_DATA_DIR) => { - if (!connectionPool[dbDataDir]) { +const getDBConnection = async (tableName, dbDataDir) => { + if (!connectionPool[tableName]) { if (!(await exists(dbDataDir))) { await mkdir(dbDataDir, { recursive: true }); } - connectionPool[dbDataDir] = await createDBConnection(dbDataDir, tableName); + connectionPool[tableName] = await createDBConnection(dbDataDir, tableName); } - const knex = connectionPool[dbDataDir]; + const knex = connectionPool[tableName]; return knex; }; -const createTableIfNotExists = async (tableConfig, dbDataDir = DB_DATA_DIR) => { +const createTableIfNotExists = async tableConfig => { const { tableName } = tableConfig; if (!tablePool[tableName]) { logger.info(`Creating schema for ${tableName}`); - const knex = await getDBConnection(tableName, dbDataDir); + const knex = await getDBConnection(tableName); await util.loadSchema(knex, tableName, tableConfig); tablePool[tableName] = true; } @@ -100,7 +100,7 @@ const getTableInstance = async (tableConfig, dbDataDir = DB_DATA_DIR) => { const createDefaultTransaction = async connection => util.startDBTransaction(connection); - await createTableIfNotExists(tableConfig, dbDataDir); + await createTableIfNotExists(tableConfig); const dbOperations = util.getTableInstance(tableConfig, knex); diff --git a/framework/src/queue.js b/framework/src/queue.js index d3feffb509..623807525a 100644 --- a/framework/src/queue.js +++ b/framework/src/queue.js @@ -67,7 +67,7 @@ const queueInstance = ( queue.on('failed', (job, err) => { logger.warn(`${job.name} job failed`, err.message); - logger.warn(`${job.name} job failed`, err.stack); + logger.debug(`${job.name} job failed`, err.stack); }); setInterval(async () => { diff --git a/framework/src/waitForIt.js b/framework/src/waitForIt.js index bcd524c96b..564384905c 100644 --- a/framework/src/waitForIt.js +++ b/framework/src/waitForIt.js @@ -17,14 +17,17 @@ const Logger = require('./logger').get; const logger = Logger(); -const waitForIt = (fn, intervalMs = 1000) => +const waitForIt = (fn, intervalMs = 1000, resolveUndefined = false) => // eslint-disable-next-line implicit-arrow-linebreak new Promise(resolve => { + // eslint-disable-next-line consistent-return const timeout = setInterval(async () => { try { const result = await fn(); clearInterval(timeout); - resolve(result); + if (resolveUndefined || result !== undefined) { + return resolve(result); + } } catch (err) { logger.debug(`Waiting ${intervalMs}...`); } diff --git a/framework/tests/unit/database/sqlite3.spec.js b/framework/tests/unit/database/sqlite3.spec.js index 764ee4cf37..ac0031c78a 100644 --- a/framework/tests/unit/database/sqlite3.spec.js +++ b/framework/tests/unit/database/sqlite3.spec.js @@ -23,29 +23,22 @@ const { } = require('../../../src/database/sqlite3'); const schema = require('../../constants/blocksSchema'); -const transactionsSchema = require('../../constants/transactionsSchema'); const tableName = 'functional_test'; -const transactionsTableName = 'transactions_functional_test'; const testDir = 'testDir'; schema.tableName = tableName; -transactionsSchema.tableName = transactionsTableName; const getTable = () => getTableInstance(schema, testDir); -const getTransactionsTable = () => getTableInstance(transactionsSchema, testDir); const { blockWithoutTransaction, blockWithTransaction } = require('../../constants/blocks'); describe('Test sqlite3 implementation', () => { - // eslint-disable-next-line no-unused-vars - let transactionsTable; let testTable; beforeAll(async () => { // Create table - transactionsTable = await getTransactionsTable(); testTable = await getTable(); }); @@ -59,12 +52,6 @@ describe('Test sqlite3 implementation', () => { const result = await testTable.find(); expect(result.length).toBe(0); }); - - it('should return same connection for two different table from same db', async () => { - const functionalTableConn = await getDBConnection(tableName, testDir); - const transactionsTableConn = await getDBConnection(transactionsTableName, testDir); - expect(functionalTableConn).toBe(transactionsTableConn); - }); }); describe('With IMPLICIT DB transaction (auto-commit mode)', () => { @@ -291,7 +278,7 @@ describe('Test sqlite3 implementation', () => { it('should insert row', async () => { const preUpsertResult = await testTable.find(); expect(preUpsertResult.length).toBe(0); - const connection = await getDBConnection(tableName, testDir); + const connection = await getDBConnection(tableName); const trx = await startDBTransaction(connection); await testTable.upsert([blockWithoutTransaction.header], trx); await commitDBTransaction(trx); @@ -309,7 +296,7 @@ describe('Test sqlite3 implementation', () => { }); it('should update row', async () => { - const connection = await getDBConnection(tableName, testDir); + const connection = await getDBConnection(tableName); const trx = await startDBTransaction(connection); const { id } = blockWithTransaction.header; await testTable.upsert([{ ...blockWithTransaction.header, height: 20 }], trx); @@ -332,7 +319,7 @@ describe('Test sqlite3 implementation', () => { }); it('should increment column value', async () => { - const connection = await getDBConnection(tableName, testDir); + const connection = await getDBConnection(tableName); const trx = await startDBTransaction(connection); const { id } = blockWithoutTransaction.header; await testTable.increment( @@ -349,7 +336,7 @@ describe('Test sqlite3 implementation', () => { }); it('should delete row by primary key', async () => { - const connection = await getDBConnection(tableName, testDir); + const connection = await getDBConnection(tableName); const trx = await startDBTransaction(connection); const [existingBlock] = await testTable.find(); const existingBlockId = existingBlock[`${schema.primaryKey}`]; @@ -364,7 +351,7 @@ describe('Test sqlite3 implementation', () => { }); it('should delete rows', async () => { - const connection = await getDBConnection(tableName, testDir); + const connection = await getDBConnection(tableName); const trx = await startDBTransaction(connection); await testTable.upsert([blockWithoutTransaction.header, blockWithTransaction.header]); @@ -385,7 +372,7 @@ describe('Test sqlite3 implementation', () => { }); it('should delete row', async () => { - const connection = await getDBConnection(tableName, testDir); + const connection = await getDBConnection(tableName); const trx = await startDBTransaction(connection); await testTable.upsert([blockWithoutTransaction.header]); @@ -406,7 +393,7 @@ describe('Test sqlite3 implementation', () => { }); it('should insert rows in a batch', async () => { - const connection = await getDBConnection(tableName, testDir); + const connection = await getDBConnection(tableName); const trx = await startDBTransaction(connection); const preUpsertResult = await testTable.find(); expect(preUpsertResult.length).toBe(0); diff --git a/framework/tests/unit/waitForIt.spec.js b/framework/tests/unit/waitForIt.spec.js index 174ef8917d..82f9668bf2 100644 --- a/framework/tests/unit/waitForIt.spec.js +++ b/framework/tests/unit/waitForIt.spec.js @@ -66,4 +66,9 @@ describe('Test waitForIt method', () => { it('should throw error when passing function as empty string', async () => { expect(waitForIt('')).rejects.toThrow(); }); + + // Unable to add test for 'resolveUndefined = false' as jest complaints of long running test + it('should resolve undefined with resolveUndefined = true', async () => { + expect(waitForIt(() => undefined, 1000, true)).resolves.toBe(undefined); + }); }); diff --git a/framework/yarn.lock b/framework/yarn.lock index 87535c0297..68ba83f275 100644 --- a/framework/yarn.lock +++ b/framework/yarn.lock @@ -639,11 +639,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/prettier@^2.1.5": version "2.7.3" @@ -706,9 +706,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -1362,9 +1362,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -4120,10 +4120,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universalify@^0.1.0: version "0.1.2" diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 320c952a74..97567b1404 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -35,7 +35,7 @@ pipeline { steps { script { echoBanner(STAGE_NAME) } nvm(readFile('.nvmrc').trim()) { - sh 'yarn run eslint' + sh 'yarn lint' } } } diff --git a/jenkins/Jenkinsfile.nightly b/jenkins/Jenkinsfile.nightly index 6954559b3b..6b407761e0 100644 --- a/jenkins/Jenkinsfile.nightly +++ b/jenkins/Jenkinsfile.nightly @@ -80,7 +80,6 @@ pipeline { nvm(readFile('.nvmrc').trim()) { sh ''' make build - make build-local make down make up ''' @@ -176,7 +175,7 @@ pipeline { script { echoBanner(STAGE_NAME) } dir('lisk-service') { nvm(readFile('.nvmrc').trim()) { - sh 'yarn run eslint' + sh 'yarn lint' } } } @@ -249,6 +248,7 @@ pipeline { pm2 stop jenkins/lisk-core/pm2.config.json pm2 delete jenkins/lisk-core/pm2.config.json pm2 flush + make clean ''' dir('./jenkins/mysql') { sh "make down" } dir('./jenkins/redis') { sh "make down" } diff --git a/jenkins/xJenkinsfile.deployment b/jenkins/xJenkinsfile.deployment index 5cd7652f1d..1065bda3dd 100644 --- a/jenkins/xJenkinsfile.deployment +++ b/jenkins/xJenkinsfile.deployment @@ -8,7 +8,7 @@ pipeline { agent { node { label 'lisk-service-dev' } } when { branch 'development' } steps { - sh 'make build' + sh 'make build-images' } } stage('Deploy lisk-service') { diff --git a/jenkins/xJenkinsfile.deployment.mainnet b/jenkins/xJenkinsfile.deployment.mainnet index 67ed8a1958..6ff48267d6 100644 --- a/jenkins/xJenkinsfile.deployment.mainnet +++ b/jenkins/xJenkinsfile.deployment.mainnet @@ -9,7 +9,7 @@ pipeline { agent any when { branch 'development' } steps { - sh 'make build' + sh 'make build-images' } } stage('Deploy lisk-service Mainnet') { diff --git a/package.json b/package.json index 9e3a1d557a..ad33f330fa 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "start": "pm2 start ecosystem.config.js", "stop": "pm2 delete ecosystem.config.js", "format": "prettier --write '**/*'", - "eslint": "eslint \"./framework/**/*.js\" \"./services/**/*.js\" \"./tests/**/*.js\"", - "eslint-fix": "eslint --fix \"./framework/**/*.js\" \"./services/**/*.js\" \"./tests/**/*.js\"", + "lint": "eslint \"./framework/**/*.js\" \"./services/**/*.js\" \"./tests/**/*.js\"", + "lint:fix": "eslint --fix \"./framework/**/*.js\" \"./services/**/*.js\" \"./tests/**/*.js\"", "test:coverage": "jest --config=jest.config.unit.js --coverage=true --verbose --forceExit" }, "devDependencies": { diff --git a/services/blockchain-app-registry/package.json b/services/blockchain-app-registry/package.json index 4951d2b97a..df872556ba 100644 --- a/services/blockchain-app-registry/package.json +++ b/services/blockchain-app-registry/package.json @@ -24,8 +24,6 @@ }, "scripts": { "start": "node app.js", - "eslint": "eslint . --ext .js", - "eslint-fix": "eslint . --fix --ext .js", "clean": "rm -rf ./node_modules", "watch": "supervisor -w . -i ./node_modules app.js", "test:unit": "jest --config=jest.config.unit.js --detectOpenHandles --forceExit", @@ -33,7 +31,7 @@ }, "dependencies": { "bluebird": "^3.7.2", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "lodash": "^4.17.21", "octokit": "^2.0.4", "tar": "^6.1.11" diff --git a/services/blockchain-app-registry/yarn.lock b/services/blockchain-app-registry/yarn.lock index 78236a6b30..5f2a1f14b8 100644 --- a/services/blockchain-app-registry/yarn.lock +++ b/services/blockchain-app-registry/yarn.lock @@ -879,11 +879,11 @@ "@types/node" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/prettier@^2.1.5": version "2.7.3" @@ -939,9 +939,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -1645,9 +1645,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -3087,9 +3087,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -4498,10 +4498,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universal-github-app-jwt@^1.1.1: version "1.1.1" diff --git a/services/blockchain-connector/README.md b/services/blockchain-connector/README.md index 5363f7ccc3..8b48613154 100644 --- a/services/blockchain-connector/README.md +++ b/services/blockchain-connector/README.md @@ -32,7 +32,7 @@ A list of the most commonly used environment variables is presented below: - `LISK_APP_DATA_PATH`: Data path to connect with the Lisk SDK-based application node over IPC. Not applicable to a docker-based setup. - `GENESIS_BLOCK_URL`: URL of the Lisk SDK-based application' genesis block. Only to be used when the genesis block is large enough to be transmitted over API calls within the timeout. - `GEOIP_JSON`: URL of GeoIP server -- `ENABLE_BLOCK_CACHING`: Boolean flag to enable the block caching. Enabled by default. To disable, set it to `false`. +- `ENABLE_BLOCK_CACHING`: Boolean flag to enable the block caching. Disabled by default. To enable, set it to `true`. - `EXPIRY_IN_HOURS`: Expiry time (in hours) for block cache. By default, it is set to 12. - `JOB_INTERVAL_CACHE_CLEANUP`: Job run interval to cleanup block cache. By default, it is set to 0. - `JOB_SCHEDULE_CACHE_CLEANUP`: Job run cron schedule to cleanup block cache. By default, it is set to run every 12 hours (`0 */12 * * *`). diff --git a/services/blockchain-connector/config.js b/services/blockchain-connector/config.js index 85ef97f96b..0702194eda 100644 --- a/services/blockchain-connector/config.js +++ b/services/blockchain-connector/config.js @@ -93,9 +93,7 @@ config.enableTestingMode = Boolean( ); config.cache = { - isBlockCachingEnabled: Boolean( - String(process.env.ENABLE_BLOCK_CACHING).toLowerCase() !== 'false', - ), // Enabled by default + isBlockCachingEnabled: Boolean(String(process.env.ENABLE_BLOCK_CACHING).toLowerCase() === 'true'), // Disabled by default expiryInHours: process.env.EXPIRY_IN_HOURS || 12, dbDataDir: 'data/db_cache', }; diff --git a/services/blockchain-connector/events/controller/blockchain.js b/services/blockchain-connector/events/controller/blockchain.js index 30936d56f9..713c78c055 100644 --- a/services/blockchain-connector/events/controller/blockchain.js +++ b/services/blockchain-connector/events/controller/blockchain.js @@ -14,6 +14,7 @@ * */ const { Signals } = require('lisk-service-framework'); +const { formatBlock: formatBlockFromFormatter } = require('../../shared/sdk/formatter'); const appReadyController = async cb => { const appReadyListener = async payload => cb(payload); @@ -50,13 +51,20 @@ const chainValidatorsChangeController = async cb => { Signals.get('chainValidatorsChanged').add(chainValidatorsChangeListener); }; +const formatBlock = payload => + formatBlockFromFormatter({ + header: payload.blockHeader, + assets: [], + transactions: [], + }); + const chainNewBlockController = async cb => { - const chainNewBlockListener = async payload => cb(payload); + const chainNewBlockListener = async payload => cb(formatBlock(payload)); Signals.get('chainNewBlock').add(chainNewBlockListener); }; const chainDeleteBlockController = async cb => { - const chainDeleteBlockListener = async payload => cb(payload); + const chainDeleteBlockListener = async payload => cb(formatBlock(payload)); Signals.get('chainDeleteBlock').add(chainDeleteBlockListener); }; diff --git a/services/blockchain-connector/package.json b/services/blockchain-connector/package.json index 974c6a39bd..65d868325c 100644 --- a/services/blockchain-connector/package.json +++ b/services/blockchain-connector/package.json @@ -39,7 +39,7 @@ "big-json": "^3.1.0", "bluebird": "^3.7.2", "knex": "^2.4.0", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "moment": "^2.29.4", "signals": "^1.0.0", "tar": "^6.1.11" diff --git a/services/blockchain-connector/yarn.lock b/services/blockchain-connector/yarn.lock index 4873b4a13c..70da8ef3d9 100644 --- a/services/blockchain-connector/yarn.lock +++ b/services/blockchain-connector/yarn.lock @@ -1387,11 +1387,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://npm.lisk.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://npm.lisk.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@11.11.6": version "11.11.6" @@ -1465,9 +1465,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://npm.lisk.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://npm.lisk.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6, agent-base@^6.0.2: version "6.0.2" @@ -2348,9 +2348,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://npm.lisk.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://npm.lisk.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -3929,9 +3929,9 @@ lines-and-columns@^1.1.6: resolved "https://npm.lisk.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -5640,10 +5640,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://npm.lisk.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://npm.lisk.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" diff --git a/services/blockchain-coordinator/package.json b/services/blockchain-coordinator/package.json index 36961fdc82..40d181961f 100644 --- a/services/blockchain-coordinator/package.json +++ b/services/blockchain-coordinator/package.json @@ -31,7 +31,7 @@ "dependencies": { "bluebird": "^3.7.2", "bull": "^4.8.1", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz" + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz" }, "devDependencies": { "@babel/preset-env": "^7.14.0", diff --git a/services/blockchain-coordinator/shared/eventsScheduler.js b/services/blockchain-coordinator/shared/eventsScheduler.js index 5bf2d258af..ef13255071 100644 --- a/services/blockchain-coordinator/shared/eventsScheduler.js +++ b/services/blockchain-coordinator/shared/eventsScheduler.js @@ -25,17 +25,17 @@ const eventMessageQueue = new MessageQueue(config.queue.event.name, config.endpo }); const scheduleUpdatesOnNewBlock = async payload => { - const { blockHeader } = payload; - logger.debug(`Scheduling indexing new block at height: ${blockHeader.height}.`); - await eventMessageQueue.add({ blockHeader, isNewBlock: true }); - logger.info(`Finished scheduling indexing new block at height: ${blockHeader.height}.`); + const { header } = payload; + logger.debug(`Scheduling indexing new block at height: ${header.height}.`); + await eventMessageQueue.add({ header, isNewBlock: true }); + logger.info(`Finished scheduling indexing new block at height: ${header.height}.`); }; const scheduleDeleteBlock = async payload => { - const { blockHeader } = payload; - logger.debug(`Scheduling updates for the delete block at height: ${blockHeader.height}.`); - await eventMessageQueue.add({ blockHeader, isDeleteBlock: true }); - logger.info(`Finished scheduling updates for the delete block at height: ${blockHeader.height}.`); + const { header } = payload; + logger.debug(`Scheduling updates for the delete block at height: ${header.height}.`); + await eventMessageQueue.add({ header, isDeleteBlock: true }); + logger.info(`Finished scheduling updates for the delete block at height: ${header.height}.`); }; const scheduleUpdatesOnNewRound = async payload => { diff --git a/services/blockchain-coordinator/yarn.lock b/services/blockchain-coordinator/yarn.lock index 7d17ac0c8d..f9ae846f13 100644 --- a/services/blockchain-coordinator/yarn.lock +++ b/services/blockchain-coordinator/yarn.lock @@ -1321,11 +1321,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/prettier@^2.1.5": version "2.7.3" @@ -1381,9 +1381,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -2088,9 +2088,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -3485,9 +3485,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -4883,10 +4883,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" diff --git a/services/blockchain-indexer/README.md b/services/blockchain-indexer/README.md index 95ea116643..4177e44663 100644 --- a/services/blockchain-indexer/README.md +++ b/services/blockchain-indexer/README.md @@ -40,10 +40,12 @@ A list of the most commonly used environment variables is presented below: - `ENABLE_INDEXING_MODE`: Boolean flag to enable the Data Indexing mode. - `ENABLE_PERSIST_EVENTS`: Boolean flag to permanently maintain the events in the MySQL database. - `ENABLE_APPLY_SNAPSHOT`: Boolean flag to enable initialization of the index with the Lisk Service DB snapshot. +- `DURABILITY_VERIFY_FREQUENCY`: Frequency in milliseconds to verify if a block is indexed or rolled-back successfully. By default, it is set to 20. - `INDEX_SNAPSHOT_URL`: URL from where the Lisk Service DB snapshot will be downloaded. - `ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP`: Boolean flag to enable downloading snapshot from an (unsecured) HTTP URL. - `LISK_STATIC`: URL of Lisk static assets. - `SERVICE_INDEXER_CACHE_REDIS`: URL of the cache storage (Redis). +- `ACCOUNT_BALANCE_UPDATE_BATCH_SIZE`: Number of accounts for which the balance index is updated at a time. By default, it is set to 1000. - `JOB_INTERVAL_DELETE_SERIALIZED_EVENTS`: Job run interval to delete serialized events. By default, it is set to 0. - `JOB_SCHEDULE_DELETE_SERIALIZED_EVENTS`: Job run cron schedule to delete serialized events. By default, it is set to run every 5th minute (`*/5 * * * *`). - `JOB_INTERVAL_REFRESH_VALIDATORS`: Job run interval to refresh validators cache. By default, it is set to 0. diff --git a/services/blockchain-indexer/config.js b/services/blockchain-indexer/config.js index 752b1035de..7487ceac3b 100644 --- a/services/blockchain-indexer/config.js +++ b/services/blockchain-indexer/config.js @@ -22,7 +22,6 @@ const config = { name: packageJson.name, version: packageJson.version, }, - db: {}, }; /** @@ -111,6 +110,13 @@ config.queue = { }, }; +config.set = { + accountBalanceUpdate: { + name: 'AccountBalanceUpdate', + batchSize: Number(process.env.ACCOUNT_BALANCE_UPDATE_BATCH_SIZE) || 1000, + }, +}; + config.operations = { isDataRetrievalModeEnabled: Boolean( String(process.env.ENABLE_DATA_RETRIEVAL_MODE).toLowerCase() !== 'false', @@ -148,9 +154,10 @@ config.networks = Object.freeze({ ], }); -config.db.isPersistEvents = Boolean( - String(process.env.ENABLE_PERSIST_EVENTS).toLowerCase() === 'true', -); +config.db = { + isPersistEvents: Boolean(String(process.env.ENABLE_PERSIST_EVENTS).toLowerCase() === 'true'), + durabilityVerifyFrequency: Number(process.env.DURABILITY_VERIFY_FREQUENCY) || 20, // In millisecs +}; config.snapshot = { enable: Boolean(String(process.env.ENABLE_APPLY_SNAPSHOT).toLowerCase() === 'true'), // Disabled by default diff --git a/services/blockchain-indexer/package.json b/services/blockchain-indexer/package.json index 83e1c032c3..2ae45cfca2 100644 --- a/services/blockchain-indexer/package.json +++ b/services/blockchain-indexer/package.json @@ -38,7 +38,7 @@ "bull": "^4.8.1", "camelcase": "^6.3.0", "ioredis": "^4.28.5", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "lodash": "^4.17.21", "require-all": "^3.0.0" }, diff --git a/services/blockchain-indexer/shared/constants.js b/services/blockchain-indexer/shared/constants.js index 6115913416..ac78e5fb66 100644 --- a/services/blockchain-indexer/shared/constants.js +++ b/services/blockchain-indexer/shared/constants.js @@ -193,6 +193,9 @@ const TRANSACTION_VERIFY_RESULT = { }; const initNodeConstants = async () => { + // Initialize the finalizedHeight at init + await updateFinalizedHeight(); + const nodeInfoListener = async payload => { // Caching all node constants genesisHeight = payload.genesisHeight; diff --git a/services/blockchain-indexer/shared/dataService/blocks.js b/services/blockchain-indexer/shared/dataService/blocks.js index 0e7d51f824..07f524655b 100644 --- a/services/blockchain-indexer/shared/dataService/blocks.js +++ b/services/blockchain-indexer/shared/dataService/blocks.js @@ -60,17 +60,9 @@ const getBlocksFromServer = async params => { return blocks; }; -const getBlocks = async (params = {}) => { - const blocksResponse = { - data: [], - meta: {}, - }; - - const response = await getBlocksFromServer(params); - if (response.data) blocksResponse.data = response.data; - if (response.meta) blocksResponse.meta = response.meta; - +const getBlocksTotal = async (params, blocksResponse) => { let total; + if (params.generatorAddress) { total = blocksResponse.meta.total || null; } else if (params.blockID || !Number.isNaN(Number(params.height))) { @@ -84,12 +76,44 @@ const getBlocks = async (params = {}) => { total = await getTotalNumberOfBlocks(); } + return total; +}; + +const formatBlock = async header => { + const blocksResponse = { + data: [], + meta: {}, + }; + + const response = await business.formatBlock({ header, assets: [], transactions: [] }); + blocksResponse.data.push(response); + + return { + data: blocksResponse.data, + meta: { + count: blocksResponse.data.length, + offset: 0, + total: await getBlocksTotal({}, blocksResponse), + }, + }; +}; + +const getBlocks = async (params = {}) => { + const blocksResponse = { + data: [], + meta: {}, + }; + + const response = await getBlocksFromServer(params); + if (response.data) blocksResponse.data = response.data; + if (response.meta) blocksResponse.meta = response.meta; + return { data: blocksResponse.data, meta: { count: blocksResponse.data.length, offset: parseInt(params.offset, 10) || 0, - total, + total: await getBlocksTotal(params, blocksResponse), }, }; }; @@ -117,6 +141,7 @@ const performLastBlockUpdate = async newBlock => { }; module.exports = { + formatBlock, getBlocks, getBlocksAssets, setLastBlock, diff --git a/services/blockchain-indexer/shared/dataService/business/blocks.js b/services/blockchain-indexer/shared/dataService/business/blocks.js index 589aeda1b9..9f70e753e6 100644 --- a/services/blockchain-indexer/shared/dataService/business/blocks.js +++ b/services/blockchain-indexer/shared/dataService/business/blocks.js @@ -189,6 +189,8 @@ const isQueryFromIndex = params => { return !isDirectQuery && !isLatestBlockFetch; }; +const formatBlock = async block => normalizeBlock(block); + const getBlocks = async params => { const blocksTable = await getBlocksTable(); const blocks = { @@ -318,6 +320,7 @@ const getBlocksAssets = async params => { }; module.exports = { + formatBlock, getBlocks, getFinalizedHeight, normalizeBlocks, diff --git a/services/blockchain-indexer/shared/dataService/business/events.js b/services/blockchain-indexer/shared/dataService/business/events.js index 95afe22bfe..987130bf3f 100644 --- a/services/blockchain-indexer/shared/dataService/business/events.js +++ b/services/blockchain-indexer/shared/dataService/business/events.js @@ -179,7 +179,9 @@ const getEvents = async params => { const topics = topic.split(','); const numUniqueTopics = dropDuplicates(topics).length; topics.forEach(t => { - if ( + if (t.length === LENGTH_ID) { + topics.push(EVENT_TOPIC_PREFIX.TX_ID.concat(t), EVENT_TOPIC_PREFIX.CCM_ID.concat(t)); + } else if ( t.startsWith(EVENT_TOPIC_PREFIX.TX_ID) && t.length === EVENT_TOPIC_PREFIX.TX_ID.length + LENGTH_ID ) { diff --git a/services/blockchain-indexer/shared/dataService/business/index.js b/services/blockchain-indexer/shared/dataService/business/index.js index f5343ff308..1f8609a3dc 100644 --- a/services/blockchain-indexer/shared/dataService/business/index.js +++ b/services/blockchain-indexer/shared/dataService/business/index.js @@ -16,6 +16,7 @@ const { getGenerators, getNumberOfGenerators, reloadGeneratorsCache } = require('./generators'); const { + formatBlock, getBlocks, getFinalizedHeight, normalizeBlocks, @@ -108,6 +109,7 @@ module.exports = { reloadGeneratorsCache, // Blocks + formatBlock, getBlocks, getFinalizedHeight, normalizeBlocks, diff --git a/services/blockchain-indexer/shared/dataService/business/pos/stakers.js b/services/blockchain-indexer/shared/dataService/business/pos/stakers.js index b43571b732..00d2b7a902 100644 --- a/services/blockchain-indexer/shared/dataService/business/pos/stakers.js +++ b/services/blockchain-indexer/shared/dataService/business/pos/stakers.js @@ -120,17 +120,16 @@ const getStakers = async params => { } // Fetch list of stakes - const stakes = await stakesTable.find( - { - ...stakerAddressQueryFilter, - validatorAddress: params.validatorAddress, - limit: params.limit, - offset: params.offset, - sort: 'amount:desc', - order: 'stakerAddress:asc', // Amount sorting tie-breaker - }, - ['stakerAddress', 'amount'], - ); + const stakesQueryParams = Object.freeze({ + ...stakerAddressQueryFilter, + validatorAddress: params.validatorAddress, + propBetweens: [{ property: 'amount', greaterThan: BigInt('0') }], + limit: params.limit, + offset: params.offset, + sort: 'amount:desc', + order: 'stakerAddress:asc', // Amount sorting tie-breaker + }); + const stakes = await stakesTable.find(stakesQueryParams, ['stakerAddress', 'amount']); // Populate stakers name and prepare response stakersResponse.data.stakers = await BluebirdPromise.map( @@ -164,10 +163,7 @@ const getStakers = async params => { stakersResponse.meta.count = stakersResponse.data.stakers.length; stakersResponse.meta.offset = params.offset; - stakersResponse.meta.total = await stakesTable.count({ - ...stakerAddressQueryFilter, - validatorAddress: params.validatorAddress, - }); + stakersResponse.meta.total = await stakesTable.count(stakesQueryParams); return stakersResponse; }; diff --git a/services/blockchain-indexer/shared/dataService/index.js b/services/blockchain-indexer/shared/dataService/index.js index 704bcb0c10..fb42d677f5 100644 --- a/services/blockchain-indexer/shared/dataService/index.js +++ b/services/blockchain-indexer/shared/dataService/index.js @@ -38,6 +38,7 @@ const { } = require('./business'); const { + formatBlock, getBlocks, getBlocksAssets, setLastBlock, @@ -109,6 +110,7 @@ const { invokeEndpoint } = require('./invoke'); module.exports = { // Blocks + formatBlock, getBlocks, getBlocksAssets, setLastBlock, diff --git a/services/blockchain-indexer/shared/indexer/accountBalanceIndex.js b/services/blockchain-indexer/shared/indexer/accountBalanceIndex.js index 48ff5291a0..52ce7ad70c 100644 --- a/services/blockchain-indexer/shared/indexer/accountBalanceIndex.js +++ b/services/blockchain-indexer/shared/indexer/accountBalanceIndex.js @@ -32,9 +32,6 @@ const redis = new Redis(config.endpoints.cache); const MYSQL_ENDPOINT = config.endpoints.mysql; -const ACCOUNTS_BALANCE_UPDATE_SET_NAME = 'AccountsBalanceUpdate'; -const MAX_ACCOUNT_COUNT_IN_ONE_EXECUTION = 1000; // 1e3 - const getAccountBalancesTable = () => getTableInstance(accountBalancesTableSchema, MYSQL_ENDPOINT); const updateAccountBalances = async address => { @@ -53,7 +50,7 @@ const updateAccountBalances = async address => { const scheduleAddressesBalanceUpdate = async addresses => { if (addresses.length) { - redis.sadd(ACCOUNTS_BALANCE_UPDATE_SET_NAME, addresses); + redis.sadd(config.set.accountBalanceUpdate.name, addresses); } }; @@ -79,8 +76,8 @@ const getAddressesFromTokenEvents = events => { const triggerAccountsBalanceUpdate = async () => { const addresses = await redis.spop( - ACCOUNTS_BALANCE_UPDATE_SET_NAME, - MAX_ACCOUNT_COUNT_IN_ONE_EXECUTION, + config.set.accountBalanceUpdate.name, + config.set.accountBalanceUpdate.batchSize, ); try { diff --git a/services/blockchain-indexer/shared/indexer/blockchainIndex.js b/services/blockchain-indexer/shared/indexer/blockchainIndex.js index 231ac2f80e..e978eb0d8f 100644 --- a/services/blockchain-indexer/shared/indexer/blockchainIndex.js +++ b/services/blockchain-indexer/shared/indexer/blockchainIndex.js @@ -29,7 +29,7 @@ const { KVStore: { getKeyValueTable }, }, }, - Utils: { delay }, + Utils: { waitForIt }, } = require('lisk-service-framework'); const { applyTransaction, revertTransaction } = require('./transactionProcessor'); @@ -89,6 +89,49 @@ const INDEX_VERIFIED_HEIGHT = 'indexVerifiedHeight'; const validateBlock = block => !!block && block.height >= 0; +const DB_STATUS = Object.freeze({ + COMMIT: 'commit', + ROLLBACK: 'rollback', +}); + +// eslint-disable-next-line consistent-return +const checkBlockHeightIndexStatusInDB = async (blockHeight, status) => { + const blocksTable = await getBlocksTable(); + const [{ height } = {}] = await blocksTable.find({ height: blockHeight }, ['height']); + + const isCommit = DB_STATUS.COMMIT === status; + const isRollback = DB_STATUS.ROLLBACK === status; + + if ((isCommit && height === blockHeight) || (isRollback && height === undefined)) { + logger.debug(`Block at height ${blockHeight} is ${isCommit ? 'committed' : 'rolled back'}.`); + return true; + } + + logger.debug( + `Block at height ${blockHeight} is not yet ${isCommit ? 'committed' : 'rolled back'}.`, + ); +}; + +// eslint-disable-next-line consistent-return +const checkBlockIDsDeleteStatusInDB = async (blockIDs, status) => { + const blocksTable = await getBlocksTable(); + const resultSet = await blocksTable.find({ whereIn: { property: 'id', values: blockIDs } }); + const numResults = resultSet.length; + + const isCommit = DB_STATUS.COMMIT === status; + const isRollback = DB_STATUS.ROLLBACK === status; + + const blockIDString = blockIDs.join(' ,'); + if ((isCommit && numResults === 0) || (isRollback && numResults !== 0)) { + logger.debug(`Deleting block(s) ${blockIDString} ${isCommit ? 'committed' : 'rolled back'}.`); + return true; + } + + logger.debug( + `Deleting block(s) ${blockIDString} not yet ${isCommit ? 'committed' : 'rolled back'}.`, + ); +}; + const indexBlock = async job => { const { height: blockHeightFromJobData } = job.data; let blockHeightToIndex = blockHeightFromJobData; @@ -268,7 +311,7 @@ const indexBlock = async job => { [EVENT.LOCK, EVENT.UNLOCK].includes(event.name) && !(eventData.tokenID in tokenIDLockedAmountChangeMap) ) { - tokenIDLockedAmountChangeMap[eventData.tokenID] = BigInt(0); + tokenIDLockedAmountChangeMap[eventData.tokenID] = BigInt('0'); } if (event.name === EVENT.LOCK) { @@ -292,11 +335,19 @@ const indexBlock = async job => { await blocksTable.upsert(blockToIndex, dbTrx); await commitDBTransaction(dbTrx); - // Only schedule address balance updates if the block is indexed successfully - await scheduleAddressesBalanceUpdate(addressesToUpdateBalance); logger.debug( `Committed MySQL transaction to index block ${block.id} at height ${block.height}.`, ); + + // Add safety check to ensure that the DB transaction is actually committed + await waitForIt( + checkBlockHeightIndexStatusInDB.bind(null, block.height, DB_STATUS.COMMIT), + config.db.durabilityVerifyFrequency, + ); + + // Only schedule address balance updates if the block is indexed successfully + await scheduleAddressesBalanceUpdate(addressesToUpdateBalance); + logger.info(`Successfully indexed block ${block.id} at height ${block.height}.`); } catch (error) { // Reschedule the block for indexing // eslint-disable-next-line no-use-before-define @@ -314,6 +365,12 @@ const indexBlock = async job => { logger.debug( `Rolled back MySQL transaction to index block ${failedBlockInfo.id} at height ${failedBlockInfo.height}.`, ); + + // Add safety check to ensure that the DB transaction is rolled back successfully + await waitForIt( + checkBlockHeightIndexStatusInDB.bind(null, block.height, DB_STATUS.ROLLBACK), + config.db.durabilityVerifyFrequency, + ); } if ( @@ -321,15 +378,17 @@ const indexBlock = async job => { error.message.includes(e), ) ) { - const errMessage = `Deadlock encountered while indexing block ${failedBlockInfo.id} at height ${failedBlockInfo.height}. Will retry later. sql:${error.sql}`; + const errMessage = `Deadlock encountered while indexing block ${failedBlockInfo.id} at height ${failedBlockInfo.height}. Will retry later.`; logger.warn(errMessage); + logger.debug(`SQL query: ${error.sql}`); + throw new Error(errMessage); } logger.warn( `Error occurred while indexing block ${failedBlockInfo.id} at height ${failedBlockInfo.height}. Will retry later.`, ); - logger.warn(error.stack); + logger.debug(error.stack); throw error; } }; @@ -353,15 +412,14 @@ const deleteIndexedBlocks = async job => { const blockFromNode = await getBlockByHeight(block.height); if (blockFromNode.id === block.id) return; - // Check if deleted block is indexed + // Check if deleted block is indexed and reschedule job if not deleted block is not indexed const [deletedBlockFromDB] = await blocksTable.find({ height: block.height, limit: 1 }); - - // Reschedule job if not deleted block is not indexed if (!deletedBlockFromDB) { // eslint-disable-next-line no-use-before-define await scheduleBlockDeletion(block); return; } + // If deleted block is indexed, check for the blockID // Continue only when blockID matches else skip if (deletedBlockFromDB.id !== block.id) return; @@ -373,12 +431,10 @@ const deleteIndexedBlocks = async job => { if (Array.isArray(forkedTransactions)) { const { assets, ...blockHeader } = block; + // Invoke 'revertTransaction' to execute command specific reverting logic await BluebirdPromise.map( forkedTransactions, - async tx => { - // Invoke 'revertTransaction' to execute command specific reverting logic - await revertTransaction(blockHeader, tx, events, dbTrx); - }, + async tx => revertTransaction(blockHeader, tx, events, dbTrx), { concurrency: 1 }, ); } @@ -407,7 +463,7 @@ const deleteIndexedBlocks = async job => { await eventsTable.delete(eventsInfo, dbTrx); await eventTopicsTable.delete(eventTopicsInfo, dbTrx); - // Update the generator's rewards + // Update block generator's rewards const blockRewardEvent = events.find( e => [MODULE.REWARD, MODULE.DYNAMIC_REWARD].includes(e.module) && @@ -483,8 +539,7 @@ const deleteIndexedBlocks = async job => { addressesToUpdateBalance = getAddressesFromTokenEvents(events); } - // Invalidate cached events for this block - // This must be done after processing all event related calculations + // Invalidate cached events for this block. Must be done after processing all event related calculations await deleteEventsFromCacheByBlockID(block.id); }, { concurrency: 1 }, @@ -492,6 +547,13 @@ const deleteIndexedBlocks = async job => { await blocksTable.deleteByPrimaryKey(blockIDs, dbTrx); await commitDBTransaction(dbTrx); + + // Add safety check to ensure that the DB transaction is actually committed + await waitForIt( + checkBlockIDsDeleteStatusInDB.bind(null, blockIDs, DB_STATUS.COMMIT), + config.db.durabilityVerifyFrequency, + ); + // Only schedule address balance updates if the block is deleted successfully await scheduleAddressesBalanceUpdate(addressesToUpdateBalance); logger.debug(`Committed MySQL transaction to delete block(s) with ID(s): ${blockIDs}.`); @@ -499,6 +561,12 @@ const deleteIndexedBlocks = async job => { logger.debug(`Rolled back MySQL transaction to delete block(s) with ID(s): ${blockIDs}.`); await rollbackDBTransaction(dbTrx); + // Add safety check to ensure that the DB transaction is actually rolled back + await waitForIt( + checkBlockIDsDeleteStatusInDB.bind(null, blockIDs, DB_STATUS.ROLLBACK), + config.db.durabilityVerifyFrequency, + ); + if (error.message.includes('ER_LOCK_DEADLOCK')) { const errMessage = `Deadlock encountered while deleting block(s) with ID(s): ${blockIDs}. Will retry later.`; logger.warn(errMessage); @@ -512,38 +580,11 @@ const deleteIndexedBlocks = async job => { } }; -let isIndexingRunning = false; -const BLOCKCHAIN_INDEX_RESCHEDULE_DELAY = 1000; - -const indexBlockAtomicWrapper = async job => { - if (isIndexingRunning) { - logger.trace('Already indexing another block!'); - await delay(BLOCKCHAIN_INDEX_RESCHEDULE_DELAY); - // eslint-disable-next-line no-use-before-define - await addHeightToIndexBlocksQueue(job.data.height); - return; - } - - isIndexingRunning = true; - - try { - await indexBlock(job); - } catch (err) { - isIndexingRunning = false; - logger.error( - `Error occurred during indexing block.\nError: ${err.message}\nStack:${err.stack}`, - ); - throw new Error(err); - } - - isIndexingRunning = false; -}; - // Initialize queues const indexBlocksQueue = Queue( config.endpoints.cache, config.queue.indexBlocks.name, - indexBlockAtomicWrapper, + indexBlock, config.queue.indexBlocks.concurrency, ); @@ -565,13 +606,13 @@ const scheduleBlockDeletion = async block => deleteIndexedBlocksQueue.add({ bloc const indexNewBlock = async block => { const blocksTable = await getBlocksTable(); - logger.info(`Indexing new block: ${block.id} at height ${block.height}.`); - const [blockInfo] = await blocksTable.find({ height: block.height, limit: 1 }, ['id', 'isFinal']); + // Schedule indexing of incoming block if it is not indexed before // Or the indexed block is not final yet (chain fork) if (!blockInfo || !blockInfo.isFinal) { // Index if doesn't exist, or update if it isn't set to final + logger.info(`Queuing block ${block.id} at height ${block.height} to index.`); await indexBlocksQueue.add({ height: block.height }); // Update finality status for the parent blocks @@ -680,7 +721,9 @@ const getMissingBlocks = async params => { }; const addHeightToIndexBlocksQueue = async (height, priority) => - priority ? indexBlocksQueue.add({ height }, { priority }) : indexBlocksQueue.add({ height }); + typeof priority === 'number' + ? indexBlocksQueue.add({ height }, { priority }) + : indexBlocksQueue.add({ height }); const setIndexVerifiedHeight = ({ height }) => keyValueTable.set(INDEX_VERIFIED_HEIGHT, height); diff --git a/services/blockchain-indexer/shared/indexer/genesisBlock.js b/services/blockchain-indexer/shared/indexer/genesisBlock.js index 824a323b66..9b051e9d94 100644 --- a/services/blockchain-indexer/shared/indexer/genesisBlock.js +++ b/services/blockchain-indexer/shared/indexer/genesisBlock.js @@ -18,21 +18,26 @@ const { MySQL: { getTableInstance }, }, Signals, + Logger, } = require('lisk-service-framework'); const { MODULE, MODULE_SUB_STORE, getGenesisHeight } = require('../constants'); const { updateTotalStake, updateTotalSelfStake } = require('./transactionProcessor/pos/stake'); const { requestConnector } = require('../utils/request'); -const { accountBalanceIndexQueue } = require('./accountBalanceIndex'); +const { updateAccountBalances } = require('./accountBalanceIndex'); const { updateTotalLockedAmounts } = require('./utils/blockchainIndex'); const requestAll = require('../utils/requestAll'); const config = require('../../config'); +const stakesTableSchema = require('../database/schema/stakes'); const commissionsTableSchema = require('../database/schema/commissions'); const { getIndexStats } = require('./indexStatus'); +const logger = Logger(); + const MYSQL_ENDPOINT = config.endpoints.mysql; +const getStakesTable = () => getTableInstance(stakesTableSchema, MYSQL_ENDPOINT); const getCommissionsTable = () => getTableInstance(commissionsTableSchema, MYSQL_ENDPOINT); const allAccountsAddresses = []; @@ -98,10 +103,12 @@ const indexPosValidatorsInfo = async (numValidators, dbTrx) => { }; const indexPosStakesInfo = async (numStakers, dbTrx) => { - let totalStakeChange = BigInt(0); - let totalSelfStakeChange = BigInt(0); + let totalStake = BigInt(0); + let totalSelfStake = BigInt(0); if (numStakers > 0) { + const stakesTable = await getStakesTable(); + const posModuleData = await requestAll( requestConnector, 'getGenesisAssetByModule', @@ -110,21 +117,34 @@ const indexPosStakesInfo = async (numStakers, dbTrx) => { ); const stakers = posModuleData[MODULE_SUB_STORE.POS.STAKERS]; + const allStakes = []; stakers.forEach(staker => { const { address: stakerAddress, stakes } = staker; - stakes.forEach(stake => { const { validatorAddress, amount } = stake; - totalStakeChange += BigInt(amount); + + allStakes.push({ + stakerAddress, + validatorAddress, + amount: BigInt(amount), + }); + + totalStake += BigInt(amount); if (stakerAddress === validatorAddress) { - totalSelfStakeChange += BigInt(amount); + totalSelfStake += BigInt(amount); } }); }); + + await stakesTable.upsert(allStakes, dbTrx); + logger.info(`Updated ${allStakes.length} stakes from the genesis block.`); } - await updateTotalStake(totalStakeChange, dbTrx); - await updateTotalSelfStake(totalSelfStakeChange, dbTrx); + await updateTotalStake(totalStake, dbTrx); + logger.info(`Updated total stakes at genesis: ${totalStake.toString()}.`); + + await updateTotalSelfStake(totalSelfStake, dbTrx); + logger.info(`Updated total self-stakes information at genesis: ${totalSelfStake.toString()}.`); }; const indexPosModuleAssets = async dbTrx => { @@ -144,7 +164,16 @@ const indexGenesisBlockAssets = async dbTrx => { }; const indexTokenBalances = async () => { - allAccountsAddresses.forEach(async address => accountBalanceIndexQueue.add({ address })); + // eslint-disable-next-line no-restricted-syntax + for (const address of allAccountsAddresses) { + await updateAccountBalances(address).catch(err => { + const errorMessage = `Updating account balance for ${address} failed. Retrying.\nError: ${err.message}.`; + logger.warn(errorMessage); + logger.debug(err.stack); + + allAccountsAddresses.push(address); + }); + } isTokensBalanceIndexed = true; }; diff --git a/services/blockchain-indexer/shared/indexer/indexStatus.js b/services/blockchain-indexer/shared/indexer/indexStatus.js index 3f8969e2e3..9aad2d2cf5 100644 --- a/services/blockchain-indexer/shared/indexer/indexStatus.js +++ b/services/blockchain-indexer/shared/indexer/indexStatus.js @@ -21,9 +21,7 @@ const { Signals, } = require('lisk-service-framework'); -const { indexValidatorCommissionInfo, indexStakersInfo } = require('./validatorIndex'); - -const { getCurrentHeight, getGenesisHeight, updateFinalizedHeight } = require('../constants'); +const { getCurrentHeight, getGenesisHeight } = require('../constants'); const logger = Logger(); @@ -115,11 +113,6 @@ const init = async () => { // Register event listeners Signals.get('newBlock').add(checkIndexReadiness); - Signals.get('chainNewBlock').add(updateFinalizedHeight); - - // Index stakers and commission information available in genesis block - await indexValidatorCommissionInfo(); - await indexStakersInfo(); }; module.exports = { diff --git a/services/blockchain-indexer/shared/indexer/transactionProcessor/pos/stake.js b/services/blockchain-indexer/shared/indexer/transactionProcessor/pos/stake.js index b829ba0916..725c5b8b9f 100644 --- a/services/blockchain-indexer/shared/indexer/transactionProcessor/pos/stake.js +++ b/services/blockchain-indexer/shared/indexer/transactionProcessor/pos/stake.js @@ -52,7 +52,7 @@ const getStakeIndexingInfo = async tx => { stakeEntry.stakerAddress = getLisk32AddressFromPublicKey(tx.senderPublicKey); stakeEntry.validatorAddress = stake.validatorAddress; - stakeEntry.amount = stake.amount; + stakeEntry.amount = BigInt(stake.amount); return stakeEntry; }, { concurrency: tx.params.stakes.length }, @@ -158,6 +158,7 @@ const revertTransaction = async (blockHeader, tx, events, dbTrx) => { stakes, async stake => { await decrementStakeTrx(stake, dbTrx); + // Subtract to reverse the impact if (stake.stakerAddress === stake.validatorAddress) { totalSelfStakeChange -= BigInt(stake.amount); diff --git a/services/blockchain-indexer/shared/indexer/validatorIndex.js b/services/blockchain-indexer/shared/indexer/validatorIndex.js deleted file mode 100644 index 7b6ca4c72c..0000000000 --- a/services/blockchain-indexer/shared/indexer/validatorIndex.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * LiskHQ/lisk-service - * Copyright © 2022 Lisk Foundation - * - * See the LICENSE file at the top-level directory of this distribution - * for licensing information. - * - * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, - * no part of this software, including this file, may be copied, modified, - * propagated, or distributed except according to the terms contained in the - * LICENSE file. - * - * Removal or modification of this copyright notice is prohibited. - * - */ -const { - DB: { - MySQL: { getTableInstance }, - }, -} = require('lisk-service-framework'); - -const { requestConnector } = require('../utils/request'); -const commissionsTableSchema = require('../database/schema/commissions'); -const stakesTableSchema = require('../database/schema/stakes'); - -const { getBlockByHeight } = require('../dataService'); -const { getGenesisHeight } = require('../constants'); - -const config = require('../../config'); - -const MYSQL_ENDPOINT = config.endpoints.mysql; - -const getCommissionsTable = () => getTableInstance(commissionsTableSchema, MYSQL_ENDPOINT); -const getStakesTable = () => getTableInstance(stakesTableSchema, MYSQL_ENDPOINT); - -const indexValidatorCommissionInfo = async () => { - const genesisBlock = await getBlockByHeight(await getGenesisHeight()); - const commissionsTable = await getCommissionsTable(); - const validators = await requestConnector('getPoSGenesisValidators'); - const commissionInfo = validators.map(validator => ({ - address: validator.address, - height: genesisBlock.height, - commission: validator.commission, - })); - if (commissionInfo.length) await commissionsTable.upsert(commissionInfo); -}; - -const indexStakersInfo = async () => { - const stakesTable = await getStakesTable(); - const stakers = await requestConnector('getPoSGenesisStakers'); - const stakesToIndex = []; - await stakers.forEach(async staker => - staker.stakes.forEach(stake => { - stakesToIndex.push({ - stakerAddress: staker.address, - validatorAddress: stake.validatorAddress, - amount: stake.amount, - }); - }), - ); - - if (stakesToIndex.length) await stakesTable.upsert(stakesToIndex); -}; - -module.exports = { - indexValidatorCommissionInfo, - indexStakersInfo, -}; diff --git a/services/blockchain-indexer/shared/messageProcessor.js b/services/blockchain-indexer/shared/messageProcessor.js index 5d24cc9090..47a6239fde 100644 --- a/services/blockchain-indexer/shared/messageProcessor.js +++ b/services/blockchain-indexer/shared/messageProcessor.js @@ -30,7 +30,7 @@ const { } = require('./indexer/blockchainIndex'); const { - getBlocks, + formatBlock, performLastBlockUpdate, reloadGeneratorsCache, reloadValidatorCache, @@ -53,7 +53,7 @@ const blockMessageQueue = new MessageQueue(config.queue.block.name, config.endpo defaultJobOptions: config.queue.defaultJobOptions, }); -// Newly mined blocks +// Newly generated blocks const eventMessageQueue = new MessageQueue(config.queue.event.name, config.endpoints.messageQueue, { defaultJobOptions: config.queue.defaultJobOptions, }); @@ -76,27 +76,27 @@ const initQueueStatus = async () => { await queueStatus(eventMessageQueue); }; -const newBlockProcessor = async block => { - logger.debug(`New block arrived at height ${block.height}, id: ${block.id}`); - const response = await getBlocks({ height: block.height }); +const newBlockProcessor = async header => { + logger.debug(`New block arrived at height ${header.height}, id: ${header.id}`); + const response = await formatBlock(header); const [newBlock] = response.data; await indexNewBlock(newBlock); await performLastBlockUpdate(newBlock); Signals.get('newBlock').dispatch(response); }; -const deleteBlockProcessor = async block => { +const deleteBlockProcessor = async header => { let response; try { logger.debug( - `Processing the delete block event for the block at height: ${block.height}, id: ${block.id}`, + `Processing the delete block event for the block at height: ${header.height}, id: ${header.id}`, ); - response = await getBlocks({ blockID: block.id }); - await scheduleBlockDeletion(block); + response = await formatBlock(header); + await scheduleBlockDeletion(header); } catch (error) { const normalizedBlocks = await normalizeBlocks([ { - header: block, + header, transactions: [], assets: [], }, @@ -140,11 +140,11 @@ const initMessageProcessors = async () => { const { isNewBlock, isDeleteBlock, isNewRound } = job.data; if (isNewBlock) { - const { blockHeader } = job.data; - await newBlockProcessor(blockHeader); + const { header } = job.data; + await newBlockProcessor(header); } else if (isDeleteBlock) { - const { blockHeader } = job.data; - await deleteBlockProcessor(blockHeader); + const { header } = job.data; + await deleteBlockProcessor(header); } else if (isNewRound) { await newRoundProcessor(); } diff --git a/services/blockchain-indexer/tests/unit/shared/constants/events.js b/services/blockchain-indexer/tests/unit/shared/constants/events.js index 05338d579a..a876b7b4c9 100644 --- a/services/blockchain-indexer/tests/unit/shared/constants/events.js +++ b/services/blockchain-indexer/tests/unit/shared/constants/events.js @@ -347,6 +347,8 @@ const mockEventTopicsQueryParams = { '03', 'c8ee3933cc841287d834f74f278ac12f145f320d0593a612e11b67b4a58cd17b', 'lskw68y3kyus7ota9mykr726aby44mw574m8dkngu', + '04c8ee3933cc841287d834f74f278ac12f145f320d0593a612e11b67b4a58cd17b', + '05c8ee3933cc841287d834f74f278ac12f145f320d0593a612e11b67b4a58cd17b', ], }, groupBy: 'eventID', diff --git a/services/blockchain-indexer/yarn.lock b/services/blockchain-indexer/yarn.lock index ff01d89cde..670446c7d9 100644 --- a/services/blockchain-indexer/yarn.lock +++ b/services/blockchain-indexer/yarn.lock @@ -1375,11 +1375,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@11.11.6": version "11.11.6" @@ -1440,9 +1440,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -2220,9 +2220,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -3641,9 +3641,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -5099,10 +5099,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" diff --git a/services/export/package.json b/services/export/package.json index 5d993848df..133abcc0a4 100644 --- a/services/export/package.json +++ b/services/export/package.json @@ -36,7 +36,7 @@ "bull": "^3.29.2", "exceljs": "^4.3.0", "json2csv": "^5.0.6", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "minio": "^7.0.21", "moment": "^2.29.4", "moment-range": "^4.0.2", diff --git a/services/export/yarn.lock b/services/export/yarn.lock index 45e8fad3b7..e9c9d98d10 100644 --- a/services/export/yarn.lock +++ b/services/export/yarn.lock @@ -670,11 +670,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@11.11.6": version "11.11.6" @@ -745,9 +745,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -1614,9 +1614,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -3161,9 +3161,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -4749,10 +4749,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universalify@^0.1.0: version "0.1.2" diff --git a/services/fee-estimator/package.json b/services/fee-estimator/package.json index 1fbd4565b1..0491afe3f6 100644 --- a/services/fee-estimator/package.json +++ b/services/fee-estimator/package.json @@ -34,7 +34,7 @@ "@liskhq/lisk-cryptography": "4.0.0-rc.2", "@liskhq/lisk-transactions": "6.0.0-rc.2", "bluebird": "^3.7.2", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz" + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz" }, "devDependencies": { "@babel/preset-env": "^7.14.0", diff --git a/services/fee-estimator/yarn.lock b/services/fee-estimator/yarn.lock index 39fa2ed547..e8551cf810 100644 --- a/services/fee-estimator/yarn.lock +++ b/services/fee-estimator/yarn.lock @@ -1345,11 +1345,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@11.11.6": version "11.11.6" @@ -1410,9 +1410,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -2188,9 +2188,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -3614,9 +3614,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -5075,10 +5075,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" diff --git a/services/gateway/apis/http-version3/swagger/definitions/blocks.json b/services/gateway/apis/http-version3/swagger/definitions/blocks.json index dcf50e588a..7edc57d9d2 100644 --- a/services/gateway/apis/http-version3/swagger/definitions/blocks.json +++ b/services/gateway/apis/http-version3/swagger/definitions/blocks.json @@ -10,6 +10,7 @@ "transactionRoot", "assetsRoot", "stateRoot", + "eventRoot", "maxHeightPrevoted", "maxHeightGenerated", "validatorsHash", @@ -86,6 +87,11 @@ "example": "95d9b1773b78034b8df9ac741c903b881da761d8ba002a939de28a4b86982c04", "description": "The root of the Sparse Merkle Tree that is computed from the state of the blockchain." }, + "eventRoot": { + "type": "string", + "example": "7dee8ae1899582aabb0c4b967ceda6874329dba57b5eb23d7c62890917a55cbd", + "description": "Merkle root of the events array." + }, "maxHeightGenerated": { "type": "integer", "example": 559421 diff --git a/services/gateway/package.json b/services/gateway/package.json index f550817d72..06611108d7 100644 --- a/services/gateway/package.json +++ b/services/gateway/package.json @@ -33,7 +33,7 @@ "bluebird": "^3.7.2", "fastest-validator": "^1.10.1", "ioredis": "^4.27.1", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "moleculer": "^0.14.13", "moment": "^2.29.4", "rate-limiter-flexible": "^2.2.4", diff --git a/services/gateway/sources/version3/mappings/block.js b/services/gateway/sources/version3/mappings/block.js index 23ff8cc542..7361a9bf72 100644 --- a/services/gateway/sources/version3/mappings/block.js +++ b/services/gateway/sources/version3/mappings/block.js @@ -27,6 +27,7 @@ module.exports = { transactionRoot: '=,string', assetRoot: '=,string', stateRoot: '=,string', + eventRoot: '=,string', maxHeightPrevoted: '=,number', maxHeightGenerated: '=,number', validatorsHash: '=,string', diff --git a/services/gateway/yarn.lock b/services/gateway/yarn.lock index b9960dbae6..ba6c3e1580 100644 --- a/services/gateway/yarn.lock +++ b/services/gateway/yarn.lock @@ -628,11 +628,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/prettier@^2.1.5": version "2.7.3" @@ -688,9 +688,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -1344,9 +1344,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -2731,9 +2731,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -4067,10 +4067,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universalify@^0.1.0: version "0.1.2" diff --git a/services/market/package.json b/services/market/package.json index 5b4af35166..0d07d926e6 100644 --- a/services/market/package.json +++ b/services/market/package.json @@ -32,7 +32,7 @@ "dependencies": { "bluebird": "^3.7.2", "joi": "^17.4.0", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "moment": "^2.29.4", "node-cron": "=2.0.3" }, diff --git a/services/market/yarn.lock b/services/market/yarn.lock index ae16938116..f8a88d22ca 100644 --- a/services/market/yarn.lock +++ b/services/market/yarn.lock @@ -657,11 +657,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/prettier@^2.1.5": version "2.7.3" @@ -717,9 +717,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -1373,9 +1373,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -2771,9 +2771,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -4090,10 +4090,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universalify@^0.1.0: version "0.1.2" diff --git a/services/template/package.json b/services/template/package.json index f9161642d6..9495ec7b6c 100644 --- a/services/template/package.json +++ b/services/template/package.json @@ -24,13 +24,11 @@ }, "scripts": { "start": "node app.js", - "eslint": "eslint . --ext .js", - "eslint-fix": "eslint . --fix --ext .js", "clean": "rm -rf ./node_modules", "watch": "supervisor -w . -i ./node_modules app.js" }, "dependencies": { - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "node-cron": "=2.0.3" } } diff --git a/services/template/yarn.lock b/services/template/yarn.lock index b95091847a..43120d88a8 100644 --- a/services/template/yarn.lock +++ b/services/template/yarn.lock @@ -45,11 +45,11 @@ "@types/node" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" accepts@~1.3.4: version "1.3.8" @@ -1025,9 +1025,9 @@ leven@2.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" integrity sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -1919,10 +1919,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universalify@^0.1.0: version "0.1.2" diff --git a/services/transaction-statistics/package.json b/services/transaction-statistics/package.json index ac10c44e24..37d69dc322 100644 --- a/services/transaction-statistics/package.json +++ b/services/transaction-statistics/package.json @@ -32,7 +32,7 @@ "dependencies": { "big-number": "=2.0.0", "bluebird": "^3.7.2", - "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz", + "lisk-service-framework": "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz", "moment": "^2.29.4" }, "devDependencies": { diff --git a/services/transaction-statistics/yarn.lock b/services/transaction-statistics/yarn.lock index e50fbdd4c1..83f1eb6767 100644 --- a/services/transaction-statistics/yarn.lock +++ b/services/transaction-statistics/yarn.lock @@ -1291,11 +1291,11 @@ "@types/istanbul-lib-report" "*" "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/prettier@^2.1.5": version "2.7.3" @@ -1351,9 +1351,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -2043,9 +2043,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -3440,9 +3440,9 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz": - version "1.6.3" - resolved "https://github.com/LiskHQ/lisk-service/raw/b73fbbf7ff44398b0ce1e0f542b408326bb834db/framework/dist/lisk-service-framework-1.6.3.tgz#f29759d295ee9b913213387fdb32d97985e2d6f3" +"lisk-service-framework@https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz": + version "1.6.5" + resolved "https://github.com/LiskHQ/lisk-service/raw/d73f6bc04a9796de563f031d11d0c132483398a0/framework/dist/lisk-service-framework-1.6.5.tgz#ede42fba5886da2ecefd8b23772c821bf208e255" dependencies: "@keyv/redis" "^2.1.2" "@log4js-node/gelf" "github:MichalTuleja/log4js-node-gelf#89d9933" @@ -4807,10 +4807,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" diff --git a/tests/schemas/api_v3/block.schema.js b/tests/schemas/api_v3/block.schema.js index a0c04e3fa8..7ab42ea12b 100644 --- a/tests/schemas/api_v3/block.schema.js +++ b/tests/schemas/api_v3/block.schema.js @@ -38,6 +38,7 @@ const blockSchema = { generator: Joi.object(generator).required(), assetRoot: Joi.string().pattern(regex.HASH_SHA256).required(), stateRoot: Joi.string().pattern(regex.HASH_SHA256).required(), + eventRoot: Joi.string().pattern(regex.HASH_SHA256).required(), transactionRoot: Joi.string().pattern(regex.HASH_SHA256).required(), previousBlockID: Joi.string().pattern(regex.HASH_SHA256).required(), signature: Joi.string().allow(EMPTY_STRING).pattern(regex.HASH_SHA512).required(), diff --git a/tests/yarn.lock b/tests/yarn.lock index f2433228e7..9297e356bc 100644 --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -1533,11 +1533,11 @@ integrity sha512-1tkBErlP1oNVh1QbTkXnSeTy4qYjQYRFvwrV/JBeaaO6oqQZHAE2Ah3ygMckCM8hC8oOjYZpB0jylPnc8Co0QA== "@types/node@*", "@types/node@>=10.0.0": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@11.11.6": version "11.11.6" @@ -1842,9 +1842,9 @@ await-to-js@=2.1.1: integrity sha512-CHBC6gQGCIzjZ09tJ+XmpQoZOn4GdWePB4qUweCaKNJ0D3f115YdhmYVTZ4rMVpiJ3cFzZcTYK1VMYEICV4YXw== axios-retry@^3.1.9: - version "3.8.0" - resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.8.0.tgz#a174af633ef143a9f5642b9e4afe65c2017936b5" - integrity sha512-CfIsQyWNc5/AE7x/UEReRUadiBmQeoBpSEC+4QyGLJMswTsP1tz0GW2YYPnE7w9+ESMef5zOgLDFpHynNyEZ1w== + version "3.8.1" + resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.8.1.tgz#4bb53f87ea537bce904c477e5c2808571066acbb" + integrity sha512-4XseuArB4CEbfLRtMpUods2q8MLBvD4r8ifKgK4SP2FRgzQIPUDpzZ+cjQ/19eu3w2UpKgkJA+myEh2BYDSjqQ== dependencies: "@babel/runtime" "^7.15.4" is-retry-allowed "^2.2.0" @@ -2786,9 +2786,9 @@ duplexer3@^0.1.4: integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.13.1: version "0.13.1" @@ -3515,19 +3515,12 @@ invert-kv@^2.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== +is-accessor-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz#3223b10628354644b86260db29b3e693f5ceedd4" + integrity sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA== dependencies: - kind-of "^6.0.0" + hasown "^2.0.0" is-arguments@^1.0.4: version "1.1.1" @@ -3568,19 +3561,12 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.0" -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== +is-data-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz#2109164426166d32ea38c405c1e0945d9e6a4eeb" + integrity sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw== dependencies: - kind-of "^6.0.0" + hasown "^2.0.0" is-date-object@^1.0.1: version "1.0.5" @@ -3590,22 +3576,20 @@ is-date-object@^1.0.1: has-tostringtag "^1.0.0" is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + version "0.1.7" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.7.tgz#2727eb61fd789dcd5bdf0ed4569f551d2fe3be33" + integrity sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg== dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.3.tgz#92d27cb3cd311c4977a4db47df457234a13cb306" + integrity sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw== dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" @@ -4407,12 +4391,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -6084,10 +6063,10 @@ underscore@1.12.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" diff --git a/yarn.lock b/yarn.lock index a5a839ba92..cab23a27bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -310,9 +310,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.6.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" - integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== "@eslint/eslintrc@^0.4.0": version "0.4.3" @@ -695,11 +695,11 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/node@*": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/prettier@^2.1.5": version "2.7.3" @@ -926,9 +926,9 @@ acorn@^7.1.1, acorn@^7.4.0: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4, acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -1486,9 +1486,9 @@ domexception@^2.0.1: webidl-conversions "^5.0.0" electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== + version "1.4.568" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.568.tgz#6ab444e120dd7fd9c3789eac54d3132b6cfcd0f9" + integrity sha512-3TCOv8+BY6Ltpt1/CmGBMups2IdKOyfEmz4J8yIS4xLSeMm0Rf+psSaxLuswG9qMKt+XbNbmADybtXGpTFlbDg== emittery@^0.8.1: version "0.8.1" @@ -4098,10 +4098,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== universalify@^0.2.0: version "0.2.0"