Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,10 @@ STACKS_NODE_TYPE=L1

# Folder with events to be imported by the event-replay.
STACKS_EVENTS_DIR=./events

# If enabled this service will connect to the specified SNP redis server and consume events from the SNP stream.
# This is an alternative to consuming events directly from a stacks-node.
# SNP_EVENT_STREAMING=true
# SNP_REDIS_URL=redis://127.0.0.1:6379
# Only specify `SNP_REDIS_STREAM_KEY_PREFIX` if `REDIS_STREAM_KEY_PREFIX` is configured on the SNP server.
# SNP_REDIS_STREAM_KEY_PREFIX=
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
event-replay,
rpc,
# subnets,
snp
]
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
19 changes: 18 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"skipFiles": [
"<node_internals>/**"
],
"runtimeVersion": "20",
"runtimeVersion": "22",
"runtimeArgs": ["-r", "ts-node/register/transpile-only", "-r", "tsconfig-paths/register"],
"args": ["${workspaceFolder}/src/index.ts"],
"outputCapture": "std",
Expand Down Expand Up @@ -446,6 +446,23 @@
"STACKS_CHAIN_ID": "0x80000000"
}
},
{
"type": "node",
"request": "launch",
"name": "Jest: SNP",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--testTimeout=3600000",
"--runInBand",
"--no-cache",
"--config",
"${workspaceRoot}/tests/jest.config.snp.js"
],
"outputCapture": "std",
"console": "integratedTerminal",
"nodeVersionHint": 22,
"runtimeVersion": "22"
},
{
"type": "node",
"request": "launch",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-bookworm-slim
FROM node:22-bookworm-slim

WORKDIR /app
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion docker/rosetta.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG ARCHIVE_VERSION=latest

#######################################################################
## Build the stacks-blockchain-api
FROM node:20-bookworm-slim as stacks-blockchain-api-build
FROM node:22-bookworm-slim as stacks-blockchain-api-build
ARG STACKS_API_VERSION
ENV STACKS_API_REPO=hirosystems/stacks-blockchain-api
ENV STACKS_API_VERSION=${STACKS_API_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion docker/standalone-regtest.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM node:20-bookworm-slim as api-builder
FROM node:22-bookworm-slim as api-builder

ARG API_GIT_COMMIT
ARG STACKS_API_VERSION
Expand Down
25 changes: 25 additions & 0 deletions migrations/1748256987656_snp-state.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// @ts-check
/** @param { import("node-pg-migrate").MigrationBuilder } pgm */
exports.up = pgm => {
pgm.createTable('snp_state', {
id: {
type: 'boolean',
primaryKey: true,
default: true,
},
last_redis_msg_id: {
type: 'text',
notNull: true,
default: '0',
},
});
// Ensure only a single row can exist
pgm.addConstraint('snp_state', 'snp_state_one_row', 'CHECK(id)');
// Create the single row
pgm.sql('INSERT INTO snp_state VALUES(DEFAULT)');
};

/** @param { import("node-pg-migrate").MigrationBuilder } pgm */
exports.down = pgm => {
pgm.dropTable('snp_state');
};
Loading
Loading