Skip to content

Commit 95155d5

Browse files
authored
Merge pull request #1906 from hirosystems/nakamoto
Release Nakamoto beta
2 parents 5aab1ef + a67dbcd commit 95155d5

File tree

89 files changed

+3415
-1246
lines changed

Some content is hidden

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

89 files changed

+3415
-1246
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

.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",

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## [7.10.0-nakamoto.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.9.0...v7.10.0-nakamoto.1) (2024-03-21)
2+
3+
4+
### Features
5+
6+
* add signer-keys from pox4 events ([#1857](https://github.com/hirosystems/stacks-blockchain-api/issues/1857)) ([c17ad23](https://github.com/hirosystems/stacks-blockchain-api/commit/c17ad23d3f451d7c072ff94f4cb1ae7a2f78705d))
7+
* ingest signer_bitvec ([#1900](https://github.com/hirosystems/stacks-blockchain-api/issues/1900)) ([aa1750f](https://github.com/hirosystems/stacks-blockchain-api/commit/aa1750f7ebbdfe4c2a84583f98c3ff465236f8aa))
8+
* nakamoto block timestamps ([#1886](https://github.com/hirosystems/stacks-blockchain-api/issues/1886)) ([f547832](https://github.com/hirosystems/stacks-blockchain-api/commit/f5478329d7267a65b5f3c557b197feadff298afb))
9+
* pox 4 revoke events and signer-key support ([#1829](https://github.com/hirosystems/stacks-blockchain-api/issues/1829)) ([5e5650a](https://github.com/hirosystems/stacks-blockchain-api/commit/5e5650a29bcc5950f061ed0a84961075c855a863)), closes [#1849](https://github.com/hirosystems/stacks-blockchain-api/issues/1849)
10+
* pox stacker & signer cycle details ([#1873](https://github.com/hirosystems/stacks-blockchain-api/issues/1873)) ([d2c2805](https://github.com/hirosystems/stacks-blockchain-api/commit/d2c28059cfca99cd9b9a35cb8c96074a60fedd35))
11+
12+
13+
### Bug Fixes
14+
15+
* event-replay readiness for nakamoto & fix for [#1879](https://github.com/hirosystems/stacks-blockchain-api/issues/1879) ([#1903](https://github.com/hirosystems/stacks-blockchain-api/issues/1903)) ([1572e73](https://github.com/hirosystems/stacks-blockchain-api/commit/1572e737337680510850b23662e1f36c57ebc198))
16+
* remove signer columns from tenure-change transactions ([#1845](https://github.com/hirosystems/stacks-blockchain-api/issues/1845)) ([8ec726b](https://github.com/hirosystems/stacks-blockchain-api/commit/8ec726b05531abb7787d035d21f7afc276574b9c))
17+
* sql transactional consistency bug with fetching chaintip in various areas ([#1853](https://github.com/hirosystems/stacks-blockchain-api/issues/1853)) ([ada8536](https://github.com/hirosystems/stacks-blockchain-api/commit/ada85364b5465b59e1dba0e82815bd8b8057f23f))
18+
119
## [7.9.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.8.2...v7.9.0) (2024-03-15)
220

321

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

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-457f270'
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-457f270'
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
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.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/rosetta/rosetta-construction-options.schema.json

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
"pox_addr": {
8484
"type": "string",
8585
"description": "The reward address for stacking transaction. It should be a valid Bitcoin address"
86+
},
87+
"signer_key": {
88+
"type": "string",
89+
"description": "The hex-encoded signer key (buff 33) for PoX."
8690
}
8791
}
8892
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"block_height": 50,
3+
"cycle_number": 14,
4+
"index_block_hash": "0xf5be33abc4e508bdaf2191e88339372edcb3358c44e2a31e1b9b44f2880dde09",
5+
"total_signers": 3,
6+
"total_stacked_amount": "1372502700000000000",
7+
"total_weight": 9
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"title": "PoxCycle",
3+
"type": "object",
4+
"additionalProperties": false,
5+
"required": [
6+
"block_height",
7+
"index_block_hash",
8+
"cycle_number",
9+
"total_weight",
10+
"total_stacked_amount",
11+
"total_signers"
12+
],
13+
"properties": {
14+
"block_height": {
15+
"type": "integer"
16+
},
17+
"index_block_hash": {
18+
"type": "string"
19+
},
20+
"cycle_number": {
21+
"type": "integer"
22+
},
23+
"total_weight": {
24+
"type": "integer"
25+
},
26+
"total_stacked_amount": {
27+
"type": "string"
28+
},
29+
"total_signers": {
30+
"type": "integer"
31+
}
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"signing_key": "0x038e3c4529395611be9abf6fa3b6987e81d402385e3d605a073f42f407565a4a3d",
3+
"stacked_amount": "686251350000000000",
4+
"stacked_amount_percent": 50,
5+
"weight": 5,
6+
"weight_percent": 55.55555555555556
7+
}

0 commit comments

Comments
 (0)