Skip to content

Commit 1c38ff7

Browse files
authored
Merge pull request #2107 from hirosystems/merge-master
merge master into develop
2 parents e217cea + 0360c80 commit 1c38ff7

10 files changed

+218
-63
lines changed

CHANGELOG.md

+109-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,116 @@
1-
## [7.14.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.14.0...v7.14.1) (2024-08-21)
1+
## [8.0.3](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.2...v8.0.3) (2024-10-01)
22

33

44
### Bug Fixes
55

6+
* query param `until_block` not working in several endpoints ([#2101](https://github.com/hirosystems/stacks-blockchain-api/issues/2101)) ([fce15d6](https://github.com/hirosystems/stacks-blockchain-api/commit/fce15d68377b6fe5fabeab65b34bd4e7a8d3bef6))
7+
8+
## [8.0.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.1...v8.0.2) (2024-09-27)
9+
10+
11+
### Bug Fixes
12+
13+
* tests ([689ff18](https://github.com/hirosystems/stacks-blockchain-api/commit/689ff183dd0bdd1779f0220835123a0cc99e37c6))
14+
15+
16+
## [8.0.2-beta.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.1...v8.0.2-beta.1) (2024-09-26)
17+
18+
### Bug Fixes
19+
20+
* use current circulating STX tokens for `stx_supply` endpoint, year 2050 estimate in new field ([b3e08e7](https://github.com/hirosystems/stacks-blockchain-api/commit/b3e08e7872c4a6b5a076d8bbcc22eb388ecef5ab))
21+
22+
## [8.0.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.0...v8.0.1) (2024-09-23)
23+
24+
25+
### Bug Fixes
26+
27+
* package.json & package-lock.json to reduce vulnerabilities ([159d0ca](https://github.com/hirosystems/stacks-blockchain-api/commit/159d0ca1a2b55017883661b5c6ffb3cf5aefeb9f))
28+
29+
## [8.0.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.14.1...v8.0.0) (2024-08-28)
30+
31+
32+
### ⚠ BREAKING CHANGES
33+
34+
> [!NOTE]
35+
> This is only a breaking change because significant changes were made to the JavaScript client library's interface and how its types are generated, and because its library version always matches the API version.
36+
> There are **no changes** to endpoints or database schemas that necessitate a full Stacks node event replay i.e. you may upgrade to v8.0.0 from v7.x directly.
37+
38+
* refactor from express to fastify (#2045)
39+
* refactor from Express to Fastify
40+
41+
### Features
42+
43+
* cursor-based pagination on blocks endpoint ([#2060](https://github.com/hirosystems/stacks-blockchain-api/issues/2060)) ([bfdcce1](https://github.com/hirosystems/stacks-blockchain-api/commit/bfdcce1c2936980299c90bf36f3d45fe74bd573c))
44+
* export events tsv directly to postgres instance ([#2048](https://github.com/hirosystems/stacks-blockchain-api/issues/2048)) ([f401a0f](https://github.com/hirosystems/stacks-blockchain-api/commit/f401a0f676ced14572b9f3f263dcc8559e831cdf))
45+
* refactor from Express to Fastify ([aa0e51e](https://github.com/hirosystems/stacks-blockchain-api/commit/aa0e51e557491daff1a98dd36c4e952e05c58dd4)), closes [#2042](https://github.com/hirosystems/stacks-blockchain-api/issues/2042)
46+
* refactor from express to fastify ([#2045](https://github.com/hirosystems/stacks-blockchain-api/issues/2045)) ([bd65fcf](https://github.com/hirosystems/stacks-blockchain-api/commit/bd65fcf93984c37a9de3cb284c43a49cb6b3694a)), closes [#2042](https://github.com/hirosystems/stacks-blockchain-api/issues/2042)
47+
48+
49+
### Bug Fixes
50+
51+
* missing event limit max overrides on a few endpoints ([4f70930](https://github.com/hirosystems/stacks-blockchain-api/commit/4f709308fb95721866b523142536b738aa64a3eb))
52+
* pagination and query param parsing bugs ([a382d2b](https://github.com/hirosystems/stacks-blockchain-api/commit/a382d2b80fc8d3e7ff49ce96047f1621749172b2)), closes [#2042](https://github.com/hirosystems/stacks-blockchain-api/issues/2042)
53+
* perform status endpoint sql inside transactions ([b23445c](https://github.com/hirosystems/stacks-blockchain-api/commit/b23445c85f826d0e6cf98695f985c3670d00c1db))
54+
* tx event-limit default should be 100 ([32d0670](https://github.com/hirosystems/stacks-blockchain-api/commit/32d0670a531582b8eb269790fa7a3695a8ce7610))
55+
56+
## [8.0.0-beta.6](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.0-beta.5...v8.0.0-beta.6) (2024-08-27)
57+
58+
59+
### ⚠ BREAKING CHANGES
60+
61+
* refactor from express to fastify (#2045)
62+
63+
### Features
64+
65+
* cursor-based pagination on blocks endpoint ([#2060](https://github.com/hirosystems/stacks-blockchain-api/issues/2060)) ([bfdcce1](https://github.com/hirosystems/stacks-blockchain-api/commit/bfdcce1c2936980299c90bf36f3d45fe74bd573c))
66+
* export events tsv directly to postgres instance ([#2048](https://github.com/hirosystems/stacks-blockchain-api/issues/2048)) ([f401a0f](https://github.com/hirosystems/stacks-blockchain-api/commit/f401a0f676ced14572b9f3f263dcc8559e831cdf))
67+
* export events tsv directly to postgres instance ([#2048](https://github.com/hirosystems/stacks-blockchain-api/issues/2048)) ([#2058](https://github.com/hirosystems/stacks-blockchain-api/issues/2058)) ([a1f5b12](https://github.com/hirosystems/stacks-blockchain-api/commit/a1f5b12675118f6d7742c54e3420c38151aef4a7))
68+
* refactor from express to fastify ([#2045](https://github.com/hirosystems/stacks-blockchain-api/issues/2045)) ([bd65fcf](https://github.com/hirosystems/stacks-blockchain-api/commit/bd65fcf93984c37a9de3cb284c43a49cb6b3694a)), closes [#2042](https://github.com/hirosystems/stacks-blockchain-api/issues/2042)
69+
70+
71+
### Bug Fixes
72+
73+
* index on `principal_stx_txs` table for faster `/v1/address/{addr}/transactions` lookups ([#2059](https://github.com/hirosystems/stacks-blockchain-api/issues/2059)) ([ab64ab7](https://github.com/hirosystems/stacks-blockchain-api/commit/ab64ab7148a3656f81f0a3c5a176c40caca3345a))
74+
75+
## [8.0.0-beta.5](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.0-beta.4...v8.0.0-beta.5) (2024-08-16)
76+
77+
78+
### Bug Fixes
79+
80+
* perform status endpoint sql inside transactions ([b23445c](https://github.com/hirosystems/stacks-blockchain-api/commit/b23445c85f826d0e6cf98695f985c3670d00c1db))
81+
82+
## [8.0.0-beta.4](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.0-beta.3...v8.0.0-beta.4) (2024-08-15)
83+
84+
85+
### Bug Fixes
86+
87+
* missing event limit max overrides on a few endpoints ([4f70930](https://github.com/hirosystems/stacks-blockchain-api/commit/4f709308fb95721866b523142536b738aa64a3eb))
88+
89+
## [8.0.0-beta.3](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.0-beta.2...v8.0.0-beta.3) (2024-08-15)
90+
91+
92+
### Bug Fixes
93+
94+
* tx event-limit default should be 100 ([32d0670](https://github.com/hirosystems/stacks-blockchain-api/commit/32d0670a531582b8eb269790fa7a3695a8ce7610))
95+
96+
## [8.0.0-beta.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.0-beta.1...v8.0.0-beta.2) (2024-08-15)
97+
98+
99+
### Bug Fixes
100+
101+
* pagination and query param parsing bugs ([a382d2b](https://github.com/hirosystems/stacks-blockchain-api/commit/a382d2b80fc8d3e7ff49ce96047f1621749172b2)), closes [#2042](https://github.com/hirosystems/stacks-blockchain-api/issues/2042)
102+
103+
## [8.0.0-beta.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.13.2...v8.0.0-beta.1) (2024-08-13)
104+
105+
106+
### ⚠ BREAKING CHANGES
107+
108+
* refactor from Express to Fastify
109+
110+
### Features
111+
112+
* refactor from Express to Fastify ([aa0e51e](https://github.com/hirosystems/stacks-blockchain-api/commit/aa0e51e557491daff1a98dd36c4e952e05c58dd4)), closes [#2042](https://github.com/hirosystems/stacks-blockchain-api/issues/2042)
113+
6114
* index on `principal_stx_txs` table for faster `/v1/address/{addr}/transactions` lookups ([#2059](https://github.com/hirosystems/stacks-blockchain-api/issues/2059)) ([ab64ab7](https://github.com/hirosystems/stacks-blockchain-api/commit/ab64ab7148a3656f81f0a3c5a176c40caca3345a))
7115

8116
## [7.14.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.13.2...v7.14.0) (2024-08-20)

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
### Local
1111

12-
This service requires `postgres`, `stacks-node`, `bitcoind`, and a few other components in order to run.
12+
This service requires `postgres`, `stacks-node`, `bitcoind`, and a few other components in order to run.
1313
The [`clarinet`](https://github.com/hirosystems/clarinet) project provides an easy way to spin up the API and all these services:
1414
> clarinet devnet - a local standalone development environment that simulates Bitcoin, Stacks node and other helpful components, similar to a staging environment.
1515
16-
Get started at https://docs.hiro.so/clarinet/getting-started
16+
Get started at https://docs.hiro.so/clarinet/getting-started
1717

1818
### Production
1919

@@ -36,7 +36,7 @@ Check to see if the server started successfully by visiting http://localhost:399
3636

3737
## Local Development
3838

39-
To run the server, run `npm run dev:integrated`, which uses docker-compose to deploy the service dependencies (e.g., PostgreSQL, Stacks core node, etc.).
39+
To run the server, run `npm run dev:integrated`, which uses docker-compose to deploy the service dependencies (e.g., PostgreSQL, Stacks core node, etc.).
4040

4141
You'll have a server on port 3999.
4242

@@ -52,7 +52,7 @@ We recommend running the API database on PostgreSQL version 14 or newer for opti
5252

5353
## Upgrading
5454

55-
If upgrading the API to a new major version (e.g., `3.0.0` to `4.0.0`), then the Postgres database from the previous version will not be compatible, and the process will fail to start.
55+
If upgrading the API to a new major version (e.g., `3.0.0` to `4.0.0`), then the Postgres database from the previous version will likely be incompatible, and the process will fail to start. However, in some cases, the major versions are for client library changes (which are synced with the api version number). Check the changelog if you're unclear.
5656

5757
[Event Replay](#event-replay) must be used when upgrading major versions. Follow the event replay [instructions](#event-replay-instructions) below. Failure to do so will require wiping the Stacks Blockchain chain state data and the API Postgres database and re-syncing from scratch.
5858

@@ -170,7 +170,7 @@ To run the new event-replay, please follow the instructions at [stacks-event-rep
170170
* `archival` (default): The process will import and ingest *all* blockchain events that have
171171
happened since the first block.
172172
* `pruned`: The import process will ignore some prunable events (mempool, microblocks) until the
173-
import block height has reached `chain tip - 256` blocks. This saves considerable
173+
import block height has reached `chain tip - 256` blocks. This saves considerable
174174
time during import but sacrifices some historical data. You can use this mode if you're mostly
175175
interested in running an API that prioritizes real-time information.
176176

@@ -189,7 +189,7 @@ Please **do not** use the issue tracker for personal support requests or to ask
189189
Development of this product happens in the open on GitHub, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving the product.
190190

191191
### Code of Conduct
192-
Please read our [Code of Conduct](../../../.github/blob/main/CODE_OF_CONDUCT.md) since we expect project participants to adhere to it.
192+
Please read our [Code of Conduct](../../../.github/blob/main/CODE_OF_CONDUCT.md) since we expect project participants to adhere to it.
193193

194194
### Contributing Guide
195195

@@ -199,7 +199,7 @@ Hiro welcomes all contributions to Hiro documentation. These contributions come
199199

200200
Bugs, feature requests, and development-related questions should be directed to our [GitHub issues tracker](https://github.com/hirosystems/stacks-blockchain-api/issues/new).
201201

202-
If reporting a bug, try to provide as much context as possible and anything else that might be relevant to the describe the issue. If possible include a simple test case that we can use to reproduce the problem on our own.
202+
If reporting a bug, try to provide as much context as possible and anything else that might be relevant to the describe the issue. If possible include a simple test case that we can use to reproduce the problem on our own.
203203

204204
For feature requests, please explain what you're trying to do, and how the requested feature would be a complement to the project.
205205

package-lock.json

+33-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"postgres": "3.3.1",
141141
"prom-client": "15.1.3",
142142
"rpc-bitcoin": "2.0.0",
143-
"socket.io": "4.6.2",
143+
"socket.io": "4.8.0",
144144
"source-map-support": "0.5.21",
145145
"split2": "3.2.2",
146146
"stacks-encoding-native-js": "1.1.0-beta.7",

src/api/query-helpers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ export function parseUntilBlockQuery(
4141
): undefined | number | string {
4242
if (!untilBlock) return;
4343
if (typeof untilBlock === 'string') {
44-
if (unanchored !== undefined) {
44+
if (unanchored) {
4545
// if mutually exclusive unachored is also specified, throw bad request error
4646
throw new InvalidRequestError(
47-
`can't handle both 'unanchored' and 'until_block' in the same request`,
47+
`can't handle both 'unanchored=true' and 'until_block' in the same request`,
4848
InvalidRequestErrorType.bad_request
4949
);
5050
}

0 commit comments

Comments
 (0)