Skip to content

Commit 45a0806

Browse files
authored
Merge pull request #1941 from hirosystems/develop
Release v7.10.0 stable
2 parents c7c9869 + 49a4d25 commit 45a0806

File tree

103 files changed

+5071
-1504
lines changed

Some content is hidden

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

103 files changed

+5071
-1504
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ STACKS_NODE_TYPE=L1
178178
# IBD_MODE_UNTIL_BLOCK=
179179

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

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,6 @@ jobs:
855855
- lint
856856
- lint-docs
857857
- test
858-
- test-2_5
859858
- test-bns
860859
- test-rosetta
861860
- test-rosetta-cli-construction

.gitpod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tasks:
1212
- init: npm ci
1313
command: npm run dev
1414
- openMode: split-right
15-
command: stacks-node start --config=stacks-blockchain/Stacks-dev.toml
15+
command: stacks-node start --config stacks-blockchain/Stacks-dev.toml
1616

1717
github:
1818
prebuilds:

.vscode/launch.json

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"skipFiles": [
5656
"<node_internals>/**"
5757
],
58+
"runtimeVersion": "20",
5859
"runtimeArgs": ["-r", "ts-node/register/transpile-only", "-r", "tsconfig-paths/register"],
5960
"args": ["${workspaceFolder}/src/index.ts"],
6061
"outputCapture": "std",

client/src/generated/models/RosettaOptions.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* eslint-disable */
33
/**
44
* Stacks Blockchain API
5-
* Welcome to the API reference overview for the <a href=\"https://docs.hiro.so/get-started/stacks-blockchain-api\">Stacks Blockchain API</a>. <a href=\"https://hirosystems.github.io/stacks-blockchain-api/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
5+
* Welcome to the API reference overview for the [Stacks Blockchain API](https://docs.hiro.so/get-started/stacks-blockchain-api). [Download Postman collection](https://hirosystems.github.io/stacks-blockchain-api/collection.json)
66
*
77
* The version of the OpenAPI document: STACKS_API_VERSION
88
*
@@ -139,6 +139,12 @@ export interface RosettaOptions {
139139
* @memberof RosettaOptions
140140
*/
141141
pox_addr?: string;
142+
/**
143+
* The hex-encoded signer key (buff 33) for PoX.
144+
* @type {string}
145+
* @memberof RosettaOptions
146+
*/
147+
signer_key?: string;
142148
}
143149

144150
export function RosettaOptionsFromJSON(json: any): RosettaOptions {
@@ -171,6 +177,7 @@ export function RosettaOptionsFromJSONTyped(json: any, ignoreDiscriminator: bool
171177
'burn_block_height': !exists(json, 'burn_block_height') ? undefined : json['burn_block_height'],
172178
'delegate_to': !exists(json, 'delegate_to') ? undefined : json['delegate_to'],
173179
'pox_addr': !exists(json, 'pox_addr') ? undefined : json['pox_addr'],
180+
'signer_key': !exists(json, 'signer_key') ? undefined : json['signer_key'],
174181
};
175182
}
176183

@@ -203,6 +210,7 @@ export function RosettaOptionsToJSON(value?: RosettaOptions | null): any {
203210
'burn_block_height': value.burn_block_height,
204211
'delegate_to': value.delegate_to,
205212
'pox_addr': value.pox_addr,
213+
'signer_key': value.signer_key,
206214
};
207215
}
208216

docker/docker-compose.dev.stacks-blockchain-follower.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
stacks-blockchain:
44
build:
55
context: ../stacks-blockchain/docker
6-
command: stacks-node start --config=/app/config/Stacks-follower.toml
6+
command: stacks-node start --config /app/config/Stacks-follower.toml
77
restart: on-failure
88
environment:
99
STACKS_EVENT_OBSERVER: host.docker.internal:3700
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
version: '3.7'
22
services:
33
stacks-blockchain:
4-
image: "hirosystems/stacks-api-e2e:stacks3.0-800259e"
4+
image: 'hirosystems/stacks-api-e2e:stacks3.0-4d11d85'
55
restart: on-failure
66
environment:
77
STACKS_EVENT_OBSERVER: host.docker.internal:3700
88
BLOCKSTACK_USE_TEST_GENESIS_CHAINSTATE: 1
99
NOP_BLOCKSTACK_DEBUG: 1
1010
ports:
11-
- "20443:20443"
12-
- "20444:20444"
11+
- '20443:20443'
12+
- '20444:20444'
1313
volumes:
1414
- ../stacks-blockchain/:/app/config
1515
- ../stacks-blockchain/.chaindata:/tmp/stacks-blockchain-data
1616
extra_hosts:
17-
- "host.docker.internal:host-gateway" # fixes `host.docker.internal` on linux hosts
17+
- 'host.docker.internal:host-gateway' # fixes `host.docker.internal` on linux hosts
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
version: '3.7'
22
services:
33
stacks-blockchain:
4-
image: "hirosystems/stacks-api-e2e:stacks3.0-800259e"
4+
image: 'hirosystems/stacks-api-e2e:stacks3.0-4d11d85'
55
ports:
6-
- "18443:18443" # bitcoin regtest JSON-RPC interface
7-
- "18444:18444" # bitcoin regtest p2p
8-
- "20443:20443" # stacks-node RPC interface
9-
- "20444:20444" # stacks-node p2p
6+
- '18443:18443' # bitcoin regtest JSON-RPC interface
7+
- '18444:18444' # bitcoin regtest p2p
8+
- '20443:20443' # stacks-node RPC interface
9+
- '20444:20444' # stacks-node p2p
1010
environment:
1111
MINE_INTERVAL: 0.1s
1212
STACKS_EVENT_OBSERVER: host.docker.internal:3700
1313
# STACKS_LOG_TRACE: 1
1414
# STACKS_LOG_DEBUG: 1
1515
extra_hosts:
16-
- "host.docker.internal:host-gateway" # fixes `host.docker.internal` on linux hosts
16+
- 'host.docker.internal:host-gateway' # fixes `host.docker.internal` on linux hosts

docker/docker-compose.dev.subnets.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
image: "hirosystems/stacks-subnets:7012d22"
2323
# build:
2424
# dockerfile: ./subnet-node.Dockerfile
25-
command: subnet-node start --config=/app/config/Stacks-subnet.toml
25+
command: subnet-node start --config /app/config/Stacks-subnet.toml
2626
ports:
2727
- "30443:30443" # subnet-node RPC interface
2828
- "30444:30444" # subnet-node p2p

docker/docker-compose.override.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
version: '3.7'
22
services:
33
stacks-blockchain:
4-
command: stacks-node start --config=/app/config/Stacks-mocknet.toml
4+
command: stacks-node start --config /app/config/Stacks-mocknet.toml

docker/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
stacks-blockchain:
1515
build:
1616
context: ../stacks-blockchain/docker
17-
command: stacks-node start --config=/app/config/Stacks-follower.toml
17+
command: stacks-node start --config /app/config/Stacks-follower.toml
1818
restart: on-failure
1919
environment:
2020
STACKS_EVENT_OBSERVER: stacks-blockchain-api:3700

docker/rosetta.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ case "${STACKS_NETWORK}" in
152152
;;
153153
esac
154154
# start stacks-blockchain and store pid
155-
${STACKS_BLOCKCHAIN_DIR}/stacks-node start --config=${STACKS_BLOCKCHAIN_DIR}/${STACKS_NETWORK}-follower-conf.toml 2>&1 &
155+
${STACKS_BLOCKCHAIN_DIR}/stacks-node start --config ${STACKS_BLOCKCHAIN_DIR}/${STACKS_NETWORK}-follower-conf.toml 2>&1 &
156156
STACKS_BLOCKCHAIN_PID=$!
157157

158158
# start stacks-blockchain-api and store pid

docker/standalone-regtest.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ RUN <<EOF
295295

296296
export STACKS_EVENT_OBSERVER="127.0.0.1:3998"
297297
envsubst < config.toml.in > config.toml
298-
stacks-node start --config=config.toml &
298+
stacks-node start --config config.toml &
299299
STACKS_PID=$!
300300

301301
while true; do
@@ -359,7 +359,7 @@ cat > run.sh <<'EOM'
359359

360360
export STACKS_EVENT_OBSERVER="127.0.0.1:3700"
361361
envsubst < config.toml.in > config.toml
362-
stacks-node start --config=config.toml &
362+
stacks-node start --config config.toml &
363363
STACKS_PID=$!
364364

365365
while true; do
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"limit": 20,
3+
"offset": 0,
4+
"total": 1,
5+
"results": [
6+
{
7+
"pox_address": "15Z2sAvjgVDpcBh4vx9g2XKU8FVHYcXNaj",
8+
"stacked_amount": "686251350000000000",
9+
"stacker_address": "STRYYQQ9M8KAF4NS7WNZQYY59X93XEKR31JP64CP"
10+
}
11+
]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"description": "GET request that returns stackers for a signer in a PoX cycle",
3+
"additionalProperties": false,
4+
"title": "PoxCycleSignerStackersListResponse",
5+
"type": "object",
6+
"required": ["results", "limit", "offset", "total"],
7+
"properties": {
8+
"limit": {
9+
"type": "integer",
10+
"maximum": 200,
11+
"description": "The number of stackers to return"
12+
},
13+
"offset": {
14+
"type": "integer",
15+
"description": "The number to stackers to skip (starting at `0`)",
16+
"default": 0
17+
},
18+
"total": {
19+
"type": "integer",
20+
"description": "The total number of stackers"
21+
},
22+
"results": {
23+
"type": "array",
24+
"items": {
25+
"$ref": "../../entities/stacking/stacker.schema.json"
26+
}
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"limit": 20,
3+
"offset": 0,
4+
"total": 3,
5+
"results": [
6+
{
7+
"signing_key": "0x038e3c4529395611be9abf6fa3b6987e81d402385e3d605a073f42f407565a4a3d",
8+
"stacked_amount": "686251350000000000",
9+
"stacked_amount_percent": 50,
10+
"weight": 5,
11+
"weight_percent": 55.55555555555556
12+
},
13+
{
14+
"signing_key": "0x029874497a7952483aa23890e9d0898696f33864d3df90939930a1f45421fe3b09",
15+
"stacked_amount": "457500900000000000",
16+
"stacked_amount_percent": 33.333333333333336,
17+
"weight": 3,
18+
"weight_percent": 33.33333333333333
19+
},
20+
{
21+
"signing_key": "0x02dcde79b38787b72d8e5e0af81cffa802f0a3c8452d6b46e08859165f49a72736",
22+
"stacked_amount": "228750450000000000",
23+
"stacked_amount_percent": 16.666666666666668,
24+
"weight": 1,
25+
"weight_percent": 11.11111111111111
26+
}
27+
]
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"description": "GET request that returns signers for a PoX cycle",
3+
"additionalProperties": false,
4+
"title": "PoxCycleSignersListResponse",
5+
"type": "object",
6+
"required": ["results", "limit", "offset", "total"],
7+
"properties": {
8+
"limit": {
9+
"type": "integer",
10+
"maximum": 200,
11+
"description": "The number of signers to return"
12+
},
13+
"offset": {
14+
"type": "integer",
15+
"description": "The number to signers to skip (starting at `0`)",
16+
"default": 0
17+
},
18+
"total": {
19+
"type": "integer",
20+
"description": "The total number of signers"
21+
},
22+
"results": {
23+
"type": "array",
24+
"items": {
25+
"$ref": "../../entities/stacking/signer.schema.json"
26+
}
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"limit": 20,
3+
"offset": 0,
4+
"total": 3,
5+
"results": [
6+
{
7+
"block_height": 50,
8+
"cycle_number": 14,
9+
"index_block_hash": "0xf5be33abc4e508bdaf2191e88339372edcb3358c44e2a31e1b9b44f2880dde09",
10+
"total_signers": 3,
11+
"total_stacked_amount": "1372502700000000000",
12+
"total_weight": 9
13+
},
14+
{
15+
"block_height": 22,
16+
"cycle_number": 13,
17+
"index_block_hash": "0x5077c7d971dd83cd3ba19dca579e3cc8dcf17913186b66093c94520e50d3b7b2",
18+
"total_signers": 3,
19+
"total_stacked_amount": "1372502700000000000",
20+
"total_weight": 9
21+
},
22+
{
23+
"block_height": 13,
24+
"cycle_number": 12,
25+
"index_block_hash": "0x62d06851fe03f17cb45a488ae70bd8e0c5c308c523f37814ad4df36bd2108713",
26+
"total_signers": 3,
27+
"total_stacked_amount": "1372502700000000000",
28+
"total_weight": 9
29+
}
30+
]
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"description": "GET request that returns PoX cycles",
3+
"additionalProperties": false,
4+
"title": "PoxCycleListResponse",
5+
"type": "object",
6+
"required": ["results", "limit", "offset", "total"],
7+
"properties": {
8+
"limit": {
9+
"type": "integer",
10+
"maximum": 200,
11+
"description": "The number of cycles to return"
12+
},
13+
"offset": {
14+
"type": "integer",
15+
"description": "The number to cycles to skip (starting at `0`)",
16+
"default": 0
17+
},
18+
"total": {
19+
"type": "integer",
20+
"description": "The total number of cycles"
21+
},
22+
"results": {
23+
"type": "array",
24+
"items": {
25+
"$ref": "../../entities/stacking/pox-cycle.schema.json"
26+
}
27+
}
28+
}
29+
}

docs/entities/blocks/block.example.json

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"canonical": true,
33
"height": 3275,
44
"hash": "0xe77ba8cf6bb7c0e4f64adc83356289ed467d31a22354907b4bb814590058430f",
5+
"block_time": 1594233639,
6+
"block_time_iso": "2020-08-27T16:41:26.000Z",
57
"index_block_hash": "0x918697ef63f9d8bdf844c3312b299e72a231cde542f3173f7755bb8c1cdaf3a7",
68
"parent_block_hash": "0x75ab21ef25cbff2caa14c27d830ed7886a4d1522e1b6f9e5dc3b59ccf73ed49f",
79
"burn_block_time": 1594233639,

docs/entities/blocks/block.schema.json

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"canonical",
88
"height",
99
"hash",
10+
"block_time",
11+
"block_time_iso",
1012
"index_block_hash",
1113
"parent_block_hash",
1214
"txs",
@@ -39,6 +41,14 @@
3941
"type": "string",
4042
"description": "Hash representing the block"
4143
},
44+
"block_time": {
45+
"type": "number",
46+
"description": "Unix timestamp (in seconds) indicating when this block was mined."
47+
},
48+
"block_time_iso": {
49+
"type": "string",
50+
"description": "An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined."
51+
},
4252
"index_block_hash": {
4353
"type": "string",
4454
"description": "The only hash that can uniquely identify an anchored block or an unconfirmed state trie"

docs/entities/blocks/nakamoto-block.example.json

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"canonical": true,
33
"height": 3275,
44
"hash": "0xe77ba8cf6bb7c0e4f64adc83356289ed467d31a22354907b4bb814590058430f",
5+
"block_time": 1594233639,
6+
"block_time_iso": "2020-08-27T16:41:26.000Z",
57
"index_block_hash": "0x918697ef63f9d8bdf844c3312b299e72a231cde542f3173f7755bb8c1cdaf3a7",
68
"parent_block_hash": "0x75ab21ef25cbff2caa14c27d830ed7886a4d1522e1b6f9e5dc3b59ccf73ed49f",
79
"parent_index_block_hash": "0x4262db117659d1ca9406970c8f44ffd3d8f11f8e18c591d2e3960f4070107756",

0 commit comments

Comments
 (0)