Skip to content

Commit

Permalink
Merge branch 'master' into merge-master
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Oct 4, 2024
2 parents e217cea + f3615c8 commit 0360c80
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 63 deletions.
110 changes: 109 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,116 @@
## [7.14.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.14.0...v7.14.1) (2024-08-21)
## [8.0.3](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.2...v8.0.3) (2024-10-01)


### Bug Fixes

* 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))

## [8.0.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.1...v8.0.2) (2024-09-27)


### Bug Fixes

* tests ([689ff18](https://github.com/hirosystems/stacks-blockchain-api/commit/689ff183dd0bdd1779f0220835123a0cc99e37c6))


## [8.0.2-beta.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.1...v8.0.2-beta.1) (2024-09-26)

### Bug Fixes

* 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))

## [8.0.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v8.0.0...v8.0.1) (2024-09-23)


### Bug Fixes

* package.json & package-lock.json to reduce vulnerabilities ([159d0ca](https://github.com/hirosystems/stacks-blockchain-api/commit/159d0ca1a2b55017883661b5c6ffb3cf5aefeb9f))

## [8.0.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.14.1...v8.0.0) (2024-08-28)


### ⚠ BREAKING CHANGES

> [!NOTE]
> 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.
> 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.
* refactor from express to fastify (#2045)
* refactor from Express to Fastify

### Features

* 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))
* 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))
* 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)
* 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)


### Bug Fixes

* missing event limit max overrides on a few endpoints ([4f70930](https://github.com/hirosystems/stacks-blockchain-api/commit/4f709308fb95721866b523142536b738aa64a3eb))
* 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)
* perform status endpoint sql inside transactions ([b23445c](https://github.com/hirosystems/stacks-blockchain-api/commit/b23445c85f826d0e6cf98695f985c3670d00c1db))
* tx event-limit default should be 100 ([32d0670](https://github.com/hirosystems/stacks-blockchain-api/commit/32d0670a531582b8eb269790fa7a3695a8ce7610))

## [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)


### ⚠ BREAKING CHANGES

* refactor from express to fastify (#2045)

### Features

* 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))
* 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))
* 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))
* 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)


### Bug Fixes

* 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))

## [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)


### Bug Fixes

* perform status endpoint sql inside transactions ([b23445c](https://github.com/hirosystems/stacks-blockchain-api/commit/b23445c85f826d0e6cf98695f985c3670d00c1db))

## [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)


### Bug Fixes

* missing event limit max overrides on a few endpoints ([4f70930](https://github.com/hirosystems/stacks-blockchain-api/commit/4f709308fb95721866b523142536b738aa64a3eb))

## [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)


### Bug Fixes

* tx event-limit default should be 100 ([32d0670](https://github.com/hirosystems/stacks-blockchain-api/commit/32d0670a531582b8eb269790fa7a3695a8ce7610))

## [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)


### Bug Fixes

* 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)

## [8.0.0-beta.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.13.2...v8.0.0-beta.1) (2024-08-13)


### ⚠ BREAKING CHANGES

* refactor from Express to Fastify

### Features

* 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)

* 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))

## [7.14.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v7.13.2...v7.14.0) (2024-08-20)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

### Local

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

### Production

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

## Local Development

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.).
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.).

You'll have a server on port 3999.

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

## Upgrading

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

[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.

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

Expand All @@ -189,7 +189,7 @@ Please **do not** use the issue tracker for personal support requests or to ask
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.

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

### Contributing Guide

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

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

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

For feature requests, please explain what you're trying to do, and how the requested feature would be a complement to the project.
Expand Down
50 changes: 33 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"postgres": "3.3.1",
"prom-client": "15.1.3",
"rpc-bitcoin": "2.0.0",
"socket.io": "4.6.2",
"socket.io": "4.8.0",
"source-map-support": "0.5.21",
"split2": "3.2.2",
"stacks-encoding-native-js": "1.1.0-beta.7",
Expand Down
4 changes: 2 additions & 2 deletions src/api/query-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export function parseUntilBlockQuery(
): undefined | number | string {
if (!untilBlock) return;
if (typeof untilBlock === 'string') {
if (unanchored !== undefined) {
if (unanchored) {
// if mutually exclusive unachored is also specified, throw bad request error
throw new InvalidRequestError(
`can't handle both 'unanchored' and 'until_block' in the same request`,
`can't handle both 'unanchored=true' and 'until_block' in the same request`,
InvalidRequestErrorType.bad_request
);
}
Expand Down
Loading

0 comments on commit 0360c80

Please sign in to comment.