Skip to content

Commit 7027f9b

Browse files
committed
Merge develop into stacks-2.1
2 parents ad7e492 + b991d52 commit 7027f9b

File tree

118 files changed

+6476
-2705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+6476
-2705
lines changed

.env

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ PG_PASSWORD=postgres
55
PG_DATABASE=stacks_blockchain_api
66
PG_SCHEMA=public
77
PG_SSL=false
8+
# Idle connection timeout in seconds, defaults to 30
9+
# PG_IDLE_TIMEOUT=30
10+
# Max connection lifetime in seconds, defaults to 60
11+
# PG_MAX_LIFETIME=60
12+
# Seconds before force-ending running queries on connection close, defaults to 5
13+
# PG_CLOSE_TIMEOUT=5
814

915
# Can be any string, use to specify a use case specific to a deployment
1016
PG_APPLICATION_NAME=stacks-blockchain-api
@@ -27,17 +33,16 @@ PG_APPLICATION_NAME=stacks-blockchain-api
2733
# PG_PRIMARY_DATABASE=
2834
# PG_PRIMARY_SCHEMA=
2935
# PG_PRIMARY_SSL=
36+
# PG_PRIMARY_IDLE_TIMEOUT=
37+
# PG_PRIMARY_MAX_LIFETIME=
38+
# PG_PRIMARY_CLOSE_TIMEOUT=
3039
# The connection URI below can be used in place of the PG variables above,
3140
# but if enabled it must be defined without others or omitted.
3241
# PG_PRIMARY_CONNECTION_URI=
3342

3443
# Limit to how many concurrent connections can be created, defaults to 10
35-
# See https://node-postgres.com/api/pool
3644
# PG_CONNECTION_POOL_MAX=10
3745

38-
# Enable to have stacks-node events streamed to a file while the application is running
39-
# STACKS_EXPORT_EVENTS_FILE=/tmp/stacks-events.tsv
40-
4146
# If specified, controls the Stacks Blockchain API mode. The possible values are:
4247
# * `readonly`: Runs the API endpoints without an Event Server that listens to events from a node and
4348
# writes them to the local database. The API will only read data from the PG database
@@ -82,14 +87,17 @@ STACKS_CORE_RPC_PORT=20443
8287
## configure the chainID/networkID; testnet: 0x80000000, mainnet: 0x00000001
8388
STACKS_CHAIN_ID=0x00000001
8489

90+
# Seconds to allow API components to shut down gracefully before force-killing them, defaults to 60
91+
# STACKS_SHUTDOWN_FORCE_KILL_TIMEOUT=60
92+
8593
BTC_RPC_HOST=http://127.0.0.1
8694
BTC_RPC_PORT=18443
8795
BTC_RPC_USER=btc
8896
BTC_RPC_PW=btc
8997
BTC_FAUCET_PK=29c028009a8331358adcc61bb6397377c995d327ac0343ed8e8f1d4d3ef85c27
9098

9199
# The contracts used to query for inbound transactions
92-
TESTNET_SEND_MANY_CONTRACT_ID=STR8P3RD1EHA8AA37ERSSSZSWKS9T2GYQFGXNA4C.send-many-memo
100+
TESTNET_SEND_MANY_CONTRACT_ID=ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many-memo
93101
MAINNET_SEND_MANY_CONTRACT_ID=SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo
94102

95103
# Enable debug logging
@@ -130,6 +138,22 @@ MAINNET_SEND_MANY_CONTRACT_ID=SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-man
130138
# IMGIX_DOMAIN=https://<your domain>.imgix.net
131139
# IMGIX_TOKEN=<your token>
132140

141+
# Web Socket ping interval to determine client availability, in seconds.
142+
# STACKS_API_WS_PING_INTERVAL=5
143+
144+
# Web Socket ping timeout, in seconds. Clients will be dropped if they do not respond with a pong
145+
# after this time has elapsed.
146+
# STACKS_API_WS_PING_TIMEOUT=5
147+
148+
# Web Socket message timeout, in seconds. Clients will be dropped if they do not acknowledge a
149+
# message after this time has elapsed.
150+
# STACKS_API_WS_MESSAGE_TIMEOUT=5
151+
152+
# Web Socket update queue timeout, in seconds. When an update is scheduled (new block, tx update,
153+
# etc.), we will allow this number of seconds to elapse to allow all subscribed clients to receive
154+
# new data.
155+
# STACKS_API_WS_UPDATE_QUEUE_TIMEOUT=5
156+
133157
# Specify max number of STX address to store in an in-memory LRU cache (CPU optimization).
134158
# Defaults to 50,000, which should result in around 25 megabytes of additional memory usage.
135159
# STACKS_ADDRESS_CACHE_SIZE=10000

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,7 @@ jobs:
774774
@semantic-release/changelog
775775
@semantic-release/git
776776
@semantic-release/exec
777+
conventional-changelog-conventionalcommits
777778
778779
- name: Set up Docker Buildx
779780
uses: docker/setup-buildx-action@v1
@@ -790,6 +791,7 @@ jobs:
790791
type=ref,event=pr
791792
type=semver,pattern={{version}},value=${{ steps.semantic.outputs.new_release_version }},enable=${{ steps.semantic.outputs.new_release_version != '' }}
792793
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semantic.outputs.new_release_version }},enable=${{ steps.semantic.outputs.new_release_version != '' }}
794+
type=raw,value=latest,enable={{is_default_branch}}
793795
794796
- name: Docker Standalone Meta
795797
id: meta_standalone
@@ -803,6 +805,7 @@ jobs:
803805
type=ref,event=pr
804806
type=semver,pattern={{version}},value=${{ steps.semantic.outputs.new_release_version }},enable=${{ steps.semantic.outputs.new_release_version != '' }}
805807
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semantic.outputs.new_release_version }},enable=${{ steps.semantic.outputs.new_release_version != '' }}
808+
type=raw,value=latest,enable={{is_default_branch}}
806809
807810
- name: Login to DockerHub
808811
uses: docker/login-action@v1
@@ -823,11 +826,11 @@ jobs:
823826
uses: docker/build-push-action@v2
824827
with:
825828
context: .
829+
build-args: |
830+
STACKS_API_VERSION=${{ github.head_ref || github.ref_name }}
826831
file: docker/stx-rosetta.Dockerfile
827832
tags: ${{ steps.meta_standalone.outputs.tags }}
828833
labels: ${{ steps.meta_standalone.outputs.labels }}
829-
cache-from: type=gha
830-
cache-to: type=gha,mode=max
831834
# Only push if (there's a new release on main branch, or if building a non-main branch) and (Only run on non-PR events or only PRs that aren't from forks)
832835
push: ${{ (github.ref != 'refs/heads/master' || steps.semantic.outputs.new_release_version != '') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
833836

.github/workflows/new-issues.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Add issues to API project
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
jobs:
9+
add-to-project:
10+
name: Add issue to project
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/add-to-project@main
14+
with:
15+
project-url: https://github.com/orgs/hirosystems/projects/11
16+
github-token: ${{ secrets.GH_TOKEN }}

.gitpod.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM blockstack/stacks-blockchain:2.05.0.0.0-stretch as corenode
1+
FROM blockstack/stacks-blockchain:2.05.0.4.0 as corenode
22

33
FROM gitpod/workspace-postgres
44

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,23 @@
195195
"preLaunchTask": "stacks-node:deploy-dev",
196196
"postDebugTask": "stacks-node:stop-dev"
197197
},
198+
{
199+
"type": "node",
200+
"request": "launch",
201+
"name": "Jest: Event Replay",
202+
"program": "${workspaceFolder}/node_modules/.bin/jest",
203+
"args": [
204+
"--testTimeout=3600000",
205+
"--runInBand",
206+
"--no-cache",
207+
"--config",
208+
"${workspaceRoot}/jest.config.event-replay.js"
209+
],
210+
"outputCapture": "std",
211+
"console": "integratedTerminal",
212+
"preLaunchTask": "stacks-node:deploy-dev",
213+
"postDebugTask": "stacks-node:stop-dev"
214+
},
198215
{
199216
"type": "node",
200217
"request": "launch",

0 commit comments

Comments
 (0)