Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master into develop #2107

Merged
merged 39 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
aa0e51e
feat!: refactor from Express to Fastify
zone117x Aug 13, 2024
183ddd0
chore(release): 8.0.0-beta.1 [skip ci]
semantic-release-bot Aug 13, 2024
a382d2b
fix: pagination and query param parsing bugs
zone117x Aug 15, 2024
9dee0c0
chore(release): 8.0.0-beta.2 [skip ci]
semantic-release-bot Aug 15, 2024
32d0670
fix: tx event-limit default should be 100
zone117x Aug 15, 2024
f3071a3
chore(release): 8.0.0-beta.3 [skip ci]
semantic-release-bot Aug 15, 2024
4f70930
fix: missing event limit max overrides on a few endpoints
zone117x Aug 15, 2024
2ec1338
chore(release): 8.0.0-beta.4 [skip ci]
semantic-release-bot Aug 15, 2024
0110f6f
chore: use PrincipalSchema in multiple areas
zone117x Aug 16, 2024
a0df9fb
chore: use UntilBlockSchema in multiple areas
zone117x Aug 16, 2024
b23445c
fix: perform status endpoint sql inside transactions
zone117x Aug 16, 2024
3d5697e
chore: do not commit openapi schema files
zone117x Aug 16, 2024
eacb5a2
chore: fix tests
zone117x Aug 16, 2024
fc8657a
chore(release): 8.0.0-beta.5 [skip ci]
semantic-release-bot Aug 16, 2024
5163a67
chore: merge develop into beta
zone117x Aug 27, 2024
a0f3dca
Merge pull request #2063 from hirosystems/chore/merge-dev-beta
zone117x Aug 27, 2024
be5a889
chore(release): 8.0.0-beta.6 [skip ci]
semantic-release-bot Aug 27, 2024
329a198
Merge pull request #2065 from hirosystems/beta
rafaelcr Aug 28, 2024
a38a35f
chore(release): 8.0.0 [skip ci]
semantic-release-bot Aug 28, 2024
10fd266
chore: improve upgrade documentation in readme and changelog note (#2…
tippenein Sep 4, 2024
99c8456
docs: update CHANGELOG v8.0.0 breaking change note
rafaelcr Sep 6, 2024
159d0ca
fix: package.json & package-lock.json to reduce vulnerabilities
snyk-bot Sep 21, 2024
3e9a1b6
Merge pull request #2082 from hirosystems/snyk-fix-66ac368462855c6b5d…
zone117x Sep 23, 2024
ad4e1ca
chore(release): 8.0.1 [skip ci]
semantic-release-bot Sep 23, 2024
b3e08e7
fix: use current circulating STX tokens for `stx_supply` endpoint, ye…
zone117x Sep 26, 2024
ecfb6c9
chore: deprecate several old stx_supply endpoints
zone117x Sep 26, 2024
4f5a1d2
chore: fix lint error
zone117x Sep 26, 2024
94f5da7
chore: doc update
zone117x Sep 26, 2024
2506eab
chore: docs update
zone117x Sep 26, 2024
ff13799
Merge pull request #2093 from hirosystems/fix/stx-supply
zone117x Sep 26, 2024
1a57f3a
chore(release): 8.0.2-beta.1 [skip ci]
semantic-release-bot Sep 26, 2024
689ff18
fix: tests
zone117x Sep 26, 2024
58cd8b2
Merge pull request #2092 from hirosystems/fix/stx-supply
zone117x Sep 27, 2024
bdbb41f
chore(release): 8.0.2 [skip ci]
semantic-release-bot Sep 27, 2024
fce15d6
fix: query param `until_block` not working in several endpoints (#2101)
zone117x Oct 1, 2024
46e1ae2
chore(release): 8.0.3 [skip ci]
semantic-release-bot Oct 1, 2024
3c07fd5
Merge branch 'master' into beta
rafaelcr Oct 4, 2024
f3615c8
Merge pull request #2105 from hirosystems/beta
rafaelcr Oct 4, 2024
0360c80
Merge branch 'master' into merge-master
rafaelcr Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading