Skip to content

Commit 297a7c8

Browse files
authored
Merge pull request #1839 from hirosystems/beta
release into master
2 parents 2df5115 + 14e6acb commit 297a7c8

34 files changed

+1283
-432
lines changed

.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ PG_APPLICATION_NAME=stacks-blockchain-api
4343
# Limit to how many concurrent connections can be created, defaults to 10
4444
# PG_CONNECTION_POOL_MAX=10
4545

46+
# Insert concurrency when processing new blocks
47+
# If your PostgreSQL is operating on SSD and has multiple CPU cores, consider raising this value, for instance, to 8 or 16.
48+
# STACKS_BLOCK_DATA_INSERT_CONCURRENCY=4
49+
4650
# If specified, controls the Stacks Blockchain API mode. The possible values are:
4751
# * `readonly`: Runs the API endpoints without an Event Server that listens to events from a node and
4852
# writes them to the local database. The API will only read data from the PG database

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v20

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
## [7.8.0-beta.4](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.8.0-beta.3...v7.8.0-beta.4) (2024-01-16)
2+
3+
4+
### Features
5+
6+
* upgrade to node 20, use bookworm-slim image ([#1832](https://github.com/hirosystems/stacks-blockchain-api/issues/1832)) ([0a42109](https://github.com/hirosystems/stacks-blockchain-api/commit/0a42109242ab5804004e01338f236f61ef07651b))
7+
8+
## [7.8.0-beta.3](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.8.0-beta.2...v7.8.0-beta.3) (2024-01-12)
9+
10+
11+
### Bug Fixes
12+
13+
* change all HASH indexes to BTREE to optimize writes ([#1825](https://github.com/hirosystems/stacks-blockchain-api/issues/1825)) ([234936b](https://github.com/hirosystems/stacks-blockchain-api/commit/234936b430640fb7108e6cb57bdb21d1085a65b2))
14+
15+
## [7.8.0-beta.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.8.0-beta.1...v7.8.0-beta.2) (2024-01-12)
16+
17+
18+
### Bug Fixes
19+
20+
* optimize re-org queries and indexes ([#1821](https://github.com/hirosystems/stacks-blockchain-api/issues/1821)) ([5505d35](https://github.com/hirosystems/stacks-blockchain-api/commit/5505d354ecae6e52c751b3b634752fd56d24642f))
21+
22+
## [7.8.0-beta.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.7.1...v7.8.0-beta.1) (2024-01-11)
23+
24+
25+
### Features
26+
27+
* run inserts in batch and in parallel when processing new block ([#1818](https://github.com/hirosystems/stacks-blockchain-api/issues/1818)) ([86dfdb5](https://github.com/hirosystems/stacks-blockchain-api/commit/86dfdb5d536fee8d7490ca5213f7005a8800f9fa))
28+
29+
### Bug Fixes
30+
31+
* log block event counts after processing ([#1820](https://github.com/hirosystems/stacks-blockchain-api/issues/1820)) ([9c39743](https://github.com/hirosystems/stacks-blockchain-api/commit/9c397439e6eb2830186cda90a213b3ab3d5a4301)), closes [#1819](https://github.com/hirosystems/stacks-blockchain-api/issues/1819) [#1819](https://github.com/hirosystems/stacks-blockchain-api/issues/1819)
32+
33+
134
## [7.7.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.7.1...v7.7.2) (2024-01-16)
235

336

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM node:18-bullseye
1+
FROM node:20-bookworm-slim
22

33
WORKDIR /app
44
COPY . .
55
COPY --from=qldrsc/duckdb /usr/local/bin/duckdb /bin/duckdb
66

77
RUN apt-get update && \
8-
apt-get install -y git openjdk-11-jre && \
8+
apt-get install -y git openjdk-17-jre && \
99
apt-get clean && \
1010
rm -rf /var/lib/apt/lists/*
1111
RUN echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env

docker/rosetta.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ ARG ARCHIVE_VERSION=latest
1212

1313
#######################################################################
1414
## Build the stacks-blockchain-api
15-
FROM node:18-buster as stacks-blockchain-api-build
15+
FROM node:20-bookworm-slim as stacks-blockchain-api-build
1616
ARG STACKS_API_VERSION
1717
ENV STACKS_API_REPO=hirosystems/stacks-blockchain-api
1818
ENV STACKS_API_VERSION=${STACKS_API_VERSION}
1919
ENV DEBIAN_FRONTEND noninteractive
2020
WORKDIR /app
2121
RUN apt-get update -y \
2222
&& apt-get install -y \
23+
git \
2324
curl \
2425
jq \
25-
openjdk-11-jre-headless \
26+
openjdk-17-jre-headless \
2627
cmake \
2728
&& git clone -b ${STACKS_API_VERSION} https://github.com/${STACKS_API_REPO} . \
2829
&& echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env \
@@ -102,7 +103,7 @@ RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
102103

103104
RUN curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
104105
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
105-
&& curl -sL https://deb.nodesource.com/setup_16.x | bash -
106+
&& curl -sL https://deb.nodesource.com/setup_20.x | bash -
106107
RUN apt-get update \
107108
&& apt-get install -y \
108109
postgresql-${PG_VERSION} \

docker/standalone-regtest.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM node:18-bullseye as api-builder
3+
FROM node:20-bookworm-slim as api-builder
44

55
ARG API_GIT_COMMIT
66
ARG STACKS_API_VERSION
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-bridged-v1-1": {
3+
"found": true,
4+
"result": {
5+
"contract_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.swap-helper-bridged-v1-1",
6+
"status": "success",
7+
"tx_id": "0x8542d28e427256ea3c29dcd8793222891999ceff4ef1bb062e2f21cb6def6884",
8+
"block_height": 111021
9+
}
10+
},
11+
"SP1JTCR202ECC6333N7ZXD7MK7E3ZTEEE1MJ73C60.name-registrar": {
12+
"found": true,
13+
"result": {
14+
"contract_id": "SP1JTCR202ECC6333N7ZXD7MK7E3ZTEEE1MJ73C60.name-registrar",
15+
"status": "success",
16+
"tx_id": "0x6e1114cce8c6f2e9c8130f9acd75d67bb667ae584f882acdd2db6dd74e6cbe5e",
17+
"block_height": 113010
18+
}
19+
},
20+
"SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core-v1": {
21+
"found": true,
22+
"result": {
23+
"contract_id": "SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core-v1",
24+
"status": "pending",
25+
"tx_id": "0x10bdcf10ffee72994f493ac36760f4e95a76c8471370182fd4705c2153dc173d"
26+
}
27+
},
28+
"SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core": {
29+
"found": false
30+
}
31+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"description": "GET request that returns the deployment status of multiple smart contracts",
3+
"title": "SmartContractsStatusResponse",
4+
"type": "object",
5+
"additionalProperties": {
6+
"anyOf": [
7+
{
8+
"$ref": "./smart-contract-found.schema.json"
9+
},
10+
{
11+
"$ref": "./smart-contract-not-found.schema.json"
12+
}
13+
]
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "object",
3+
"title": "SmartContractFound",
4+
"additionalProperties": false,
5+
"required": ["found", "result"],
6+
"properties": {
7+
"found": {
8+
"type": "boolean",
9+
"enum": [true]
10+
},
11+
"result": {
12+
"$ref": "../../entities/smart-contracts/smart-contract-status.schema.json"
13+
}
14+
}
15+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"type": "object",
3+
"title": "SmartContractNotFound",
4+
"additionalProperties": false,
5+
"properties": {
6+
"found": {
7+
"type": "boolean",
8+
"enum": [false]
9+
}
10+
},
11+
"required": ["found"]
12+
}

0 commit comments

Comments
 (0)