Skip to content

Commit 7329413

Browse files
authored
Merge pull request #1210 from hirosystems/chore/merge-master
merge master into develop
2 parents 5f8bc9f + 11b4791 commit 7329413

File tree

268 files changed

+3318
-4713
lines changed

Some content is hidden

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

268 files changed

+3318
-4713
lines changed

.env

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,21 @@ MAINNET_SEND_MANY_CONTRACT_ID=SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-man
105105
# STACKS_API_ENABLE_FT_METADATA=1
106106
# STACKS_API_ENABLE_NFT_METADATA=1
107107

108+
# If token metadata processing is enabled, this variable determines how the API reacts to metadata processing failures.
109+
# When strict mode is enabled, any failures caused by recoverable errors will be retried indefinitely. Otherwise,
110+
# the API will give up after `STACKS_API_TOKEN_METADATA_MAX_RETRIES` is reached for that smart contract.
111+
# STACKS_API_TOKEN_METADATA_STRICT_MODE=1
112+
113+
# Maximum number of times we'll try processing FT/NFT metadata for a specific smart contract if we've failed
114+
# because of a recoverable error.
115+
# Only used if `STACKS_API_TOKEN_METADATA_STRICT_MODE` is disabled.
116+
# STACKS_API_TOKEN_METADATA_MAX_RETRIES=5
117+
108118
# Controls the token metadata error handling mode. The possible values are:
109119
# * `warning`: If required metadata is not found, the API will issue a warning and not display data for that token.
110120
# * `error`: If required metadata is not found, the API will throw an error.
111121
# If not specified or any other value is provided, the mode will be set to `warning`.
112-
# STACKS_API_TOKEN_METADATA_ERROR_MODE=
122+
# STACKS_API_TOKEN_METADATA_ERROR_MODE=warning
113123

114124
# Configure a script to handle image URLs during token metadata processing.
115125
# This example script uses the `imgix.net` service to create CDN URLs.

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
"env": {
9191
"STACKS_BLOCKCHAIN_API_PORT": "3998",
9292
"STACKS_API_MODE": "readonly",
93-
"STACKS_CHAIN_ID": "0x80000000",
94-
"NODE_ENV": "development",
93+
"STACKS_CHAIN_ID": "0x00000001",
94+
"NODE_ENV": "production",
9595
"TS_NODE_SKIP_IGNORE": "true"
9696
},
9797
"killBehavior": "polite",

CHANGELOG.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,118 @@
1+
## [4.0.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0...v4.0.1) (2022-06-01)
2+
3+
4+
### Bug Fixes
5+
6+
* contract-call txs returning null args in some situations, closes [#1188](https://github.com/hirosystems/stacks-blockchain-api/issues/1188) ([#1192](https://github.com/hirosystems/stacks-blockchain-api/issues/1192)) ([9b77ca2](https://github.com/hirosystems/stacks-blockchain-api/commit/9b77ca22fcaa814ef0266ce3ab4efd32d5ae2da7))
7+
8+
# [4.0.0](https://github.com/hirosystems/stacks-blockchain-api/compare/v3.0.3...v4.0.0) (2022-05-26)
9+
10+
11+
### Bug Fixes
12+
13+
* `/v1/names/[:name]` name resolution ([#1159](https://github.com/hirosystems/stacks-blockchain-api/issues/1159)) ([e656520](https://github.com/hirosystems/stacks-blockchain-api/commit/e656520701bea584fe7336c1a26388406cd167fe))
14+
* bns download script download path ([#1091](https://github.com/hirosystems/stacks-blockchain-api/issues/1091)) ([55fa41e](https://github.com/hirosystems/stacks-blockchain-api/commit/55fa41eb31fcc1869a4c16de36ad4f01be9565a9))
15+
* disable notifier for tests that don't need it ([#1102](https://github.com/hirosystems/stacks-blockchain-api/issues/1102)) ([9765cf0](https://github.com/hirosystems/stacks-blockchain-api/commit/9765cf06819767cae88eab6c106bc1d0bd87e47e))
16+
* propagate chain id correctly to bns router ([#1180](https://github.com/hirosystems/stacks-blockchain-api/issues/1180)) ([3a0ead1](https://github.com/hirosystems/stacks-blockchain-api/commit/3a0ead18fd3d65ec8221feada334477ebb576805))
17+
* resolve bns names correctly in `/v1/addresses/stacks/[:address]` ([#1175](https://github.com/hirosystems/stacks-blockchain-api/issues/1175)) ([8797ded](https://github.com/hirosystems/stacks-blockchain-api/commit/8797ded691acab322c6c671403ea60bf1bc27294))
18+
* shorten token metadata pg notifications ([#1143](https://github.com/hirosystems/stacks-blockchain-api/issues/1143)) ([1f09c0e](https://github.com/hirosystems/stacks-blockchain-api/commit/1f09c0e2bffb42a680e899848980b13a6652d51f))
19+
* treat incorrect `get-token-uri` none values as undefined ([#1183](https://github.com/hirosystems/stacks-blockchain-api/issues/1183)) ([33313b1](https://github.com/hirosystems/stacks-blockchain-api/commit/33313b1d78e75a1900de9162cd97a76ff0a64ee0))
20+
* use 128 max size when deserializing contract principals [#1181](https://github.com/hirosystems/stacks-blockchain-api/issues/1181) ([#1182](https://github.com/hirosystems/stacks-blockchain-api/issues/1182)) ([f4d4733](https://github.com/hirosystems/stacks-blockchain-api/commit/f4d4733ad4956c6acc36f73337cc55b6aae5c5fb))
21+
22+
23+
* feat!: prune garbage collected (256 blocks old) mempool txs (#1101) ([fe56756](https://github.com/hirosystems/stacks-blockchain-api/commit/fe56756cdeb3c71dbd2ebbbf820bc2a56fc35f02)), closes [#1101](https://github.com/hirosystems/stacks-blockchain-api/issues/1101)
24+
25+
26+
### Features
27+
28+
* [CPU optimizations] use native rust module for decoding Clarity values, binary transaction blobs, post-condition binary blobs, Stacks addresses ([#1094](https://github.com/hirosystems/stacks-blockchain-api/issues/1094)) ([f5c4da7](https://github.com/hirosystems/stacks-blockchain-api/commit/f5c4da7b87e7eacecc6cd5d7075ecd0a39127ea0))
29+
* add `pruned` event import mode that ignores some historical events ([#1125](https://github.com/hirosystems/stacks-blockchain-api/issues/1125)) ([da992d7](https://github.com/hirosystems/stacks-blockchain-api/commit/da992d77b18bd49eef36e32b1d96d7e924d84cfc))
30+
* add block height to responses in `/extended/v1/tokens/nft/holdings` ([#1151](https://github.com/hirosystems/stacks-blockchain-api/issues/1151)) ([7cc8bd0](https://github.com/hirosystems/stacks-blockchain-api/commit/7cc8bd06339a9bf53ef5d133ef4885b26e48cd18))
31+
* add strict ft/nft metadata processing mode for better error handling ([#1165](https://github.com/hirosystems/stacks-blockchain-api/issues/1165)) ([b9ca4bb](https://github.com/hirosystems/stacks-blockchain-api/commit/b9ca4bb69d7f78c634c076855652937e0e1743f1))
32+
* events-only endpoint for address and tx_id ([#1027](https://github.com/hirosystems/stacks-blockchain-api/issues/1027)) ([508afc7](https://github.com/hirosystems/stacks-blockchain-api/commit/508afc7b09641b79d5c8136b70088fc471f94433))
33+
* fetch subdomain list for bns name ([#1132](https://github.com/hirosystems/stacks-blockchain-api/issues/1132)) ([e34120f](https://github.com/hirosystems/stacks-blockchain-api/commit/e34120f70bcad5c6474f7631cad31fb04b9dfdfa))
34+
* pin exact dependencies in package.json ([#1068](https://github.com/hirosystems/stacks-blockchain-api/issues/1068)) ([303eaaa](https://github.com/hirosystems/stacks-blockchain-api/commit/303eaaa8cd520cf8db89a4ef359ca739a945cbbc))
35+
36+
37+
### BREAKING CHANGES
38+
39+
* use event-replay to upgrade, this version includes breaking changes to the db sql schema
40+
41+
# [4.0.0-beta.8](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2022-05-26)
42+
43+
44+
### Bug Fixes
45+
46+
* treat incorrect `get-token-uri` none values as undefined ([#1183](https://github.com/hirosystems/stacks-blockchain-api/issues/1183)) ([33313b1](https://github.com/hirosystems/stacks-blockchain-api/commit/33313b1d78e75a1900de9162cd97a76ff0a64ee0))
47+
48+
# [4.0.0-beta.7](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2022-05-25)
49+
50+
51+
### Bug Fixes
52+
53+
* use 128 max size when deserializing contract principals [#1181](https://github.com/hirosystems/stacks-blockchain-api/issues/1181) ([#1182](https://github.com/hirosystems/stacks-blockchain-api/issues/1182)) ([f4d4733](https://github.com/hirosystems/stacks-blockchain-api/commit/f4d4733ad4956c6acc36f73337cc55b6aae5c5fb))
54+
55+
# [4.0.0-beta.6](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2022-05-20)
56+
57+
58+
### Bug Fixes
59+
60+
* propagate chain id correctly to bns router ([#1180](https://github.com/hirosystems/stacks-blockchain-api/issues/1180)) ([3a0ead1](https://github.com/hirosystems/stacks-blockchain-api/commit/3a0ead18fd3d65ec8221feada334477ebb576805))
61+
62+
# [4.0.0-beta.5](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2022-05-17)
63+
64+
65+
### Features
66+
67+
* add strict ft/nft metadata processing mode for better error handling ([#1165](https://github.com/hirosystems/stacks-blockchain-api/issues/1165)) ([b9ca4bb](https://github.com/hirosystems/stacks-blockchain-api/commit/b9ca4bb69d7f78c634c076855652937e0e1743f1))
68+
69+
# [4.0.0-beta.4](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2022-05-17)
70+
71+
72+
### Bug Fixes
73+
74+
* resolve bns names correctly in `/v1/addresses/stacks/[:address]` ([#1175](https://github.com/hirosystems/stacks-blockchain-api/issues/1175)) ([8797ded](https://github.com/hirosystems/stacks-blockchain-api/commit/8797ded691acab322c6c671403ea60bf1bc27294))
75+
76+
# [4.0.0-beta.3](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0-beta.2...v4.0.0-beta.3) (2022-05-11)
77+
78+
79+
### Features
80+
81+
* add block height to responses in `/extended/v1/tokens/nft/holdings` ([#1151](https://github.com/hirosystems/stacks-blockchain-api/issues/1151)) ([7cc8bd0](https://github.com/hirosystems/stacks-blockchain-api/commit/7cc8bd06339a9bf53ef5d133ef4885b26e48cd18))
82+
83+
# [4.0.0-beta.2](https://github.com/hirosystems/stacks-blockchain-api/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2022-05-04)
84+
85+
86+
### Bug Fixes
87+
88+
* `/v1/names/[:name]` name resolution ([#1159](https://github.com/hirosystems/stacks-blockchain-api/issues/1159)) ([e656520](https://github.com/hirosystems/stacks-blockchain-api/commit/e656520701bea584fe7336c1a26388406cd167fe))
89+
90+
# [4.0.0-beta.1](https://github.com/hirosystems/stacks-blockchain-api/compare/v3.0.3...v4.0.0-beta.1) (2022-04-20)
91+
92+
93+
### Bug Fixes
94+
95+
* bns download script download path ([#1091](https://github.com/hirosystems/stacks-blockchain-api/issues/1091)) ([55fa41e](https://github.com/hirosystems/stacks-blockchain-api/commit/55fa41eb31fcc1869a4c16de36ad4f01be9565a9))
96+
* disable notifier for tests that don't need it ([#1102](https://github.com/hirosystems/stacks-blockchain-api/issues/1102)) ([9765cf0](https://github.com/hirosystems/stacks-blockchain-api/commit/9765cf06819767cae88eab6c106bc1d0bd87e47e))
97+
* shorten token metadata pg notifications ([#1143](https://github.com/hirosystems/stacks-blockchain-api/issues/1143)) ([1f09c0e](https://github.com/hirosystems/stacks-blockchain-api/commit/1f09c0e2bffb42a680e899848980b13a6652d51f))
98+
99+
100+
* feat!: prune garbage collected (256 blocks old) mempool txs (#1101) ([fe56756](https://github.com/hirosystems/stacks-blockchain-api/commit/fe56756cdeb3c71dbd2ebbbf820bc2a56fc35f02)), closes [#1101](https://github.com/hirosystems/stacks-blockchain-api/issues/1101)
101+
102+
103+
### Features
104+
105+
* [CPU optimizations] use native rust module for decoding Clarity values, binary transaction blobs, post-condition binary blobs, Stacks addresses ([#1094](https://github.com/hirosystems/stacks-blockchain-api/issues/1094)) ([f5c4da7](https://github.com/hirosystems/stacks-blockchain-api/commit/f5c4da7b87e7eacecc6cd5d7075ecd0a39127ea0))
106+
* add `pruned` event import mode that ignores some historical events ([#1125](https://github.com/hirosystems/stacks-blockchain-api/issues/1125)) ([da992d7](https://github.com/hirosystems/stacks-blockchain-api/commit/da992d77b18bd49eef36e32b1d96d7e924d84cfc))
107+
* events-only endpoint for address and tx_id ([#1027](https://github.com/hirosystems/stacks-blockchain-api/issues/1027)) ([508afc7](https://github.com/hirosystems/stacks-blockchain-api/commit/508afc7b09641b79d5c8136b70088fc471f94433))
108+
* fetch subdomain list for bns name ([#1132](https://github.com/hirosystems/stacks-blockchain-api/issues/1132)) ([e34120f](https://github.com/hirosystems/stacks-blockchain-api/commit/e34120f70bcad5c6474f7631cad31fb04b9dfdfa))
109+
* pin exact dependencies in package.json ([#1068](https://github.com/hirosystems/stacks-blockchain-api/issues/1068)) ([303eaaa](https://github.com/hirosystems/stacks-blockchain-api/commit/303eaaa8cd520cf8db89a4ef359ca739a945cbbc))
110+
111+
112+
### BREAKING CHANGES
113+
114+
* use event-replay to upgrade, this version includes breaking changes to the db sql schema
115+
1116
## [3.0.3](https://github.com/hirosystems/stacks-blockchain-api/compare/v3.0.2...v3.0.3) (2022-04-04)
2117

3118

docs/.validaterc

Lines changed: 0 additions & 74 deletions
This file was deleted.

docs/api/address/get-address-assets.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns address assets",
43
"title": "AddressAssetsListResponse",
54
"type": "object",
5+
"additionalProperties": false,
66
"required": ["results", "limit", "offset", "total"],
77
"properties": {
88
"limit": {

docs/api/address/get-address-balances.schema.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns address balances",
43
"title": "AddressBalanceResponse",
4+
"additionalProperties": false,
55
"type": "object",
66
"required": ["stx", "fungible_tokens", "non_fungible_tokens"],
77
"properties": {
@@ -10,18 +10,22 @@
1010
},
1111
"fungible_tokens": {
1212
"type": "object",
13-
"patternProperties": {
14-
"*": {
15-
"$ref": "../../entities/balance/ft-balance.schema.json"
16-
}
13+
"additionalProperties": {
14+
"anyOf": [
15+
{
16+
"$ref": "../../entities/balance/ft-balance.schema.json"
17+
}
18+
]
1719
}
1820
},
1921
"non_fungible_tokens": {
2022
"type": "object",
21-
"patternProperties": {
22-
"*": {
23-
"$ref": "../../entities/balance/nft-balance.schema.json"
24-
}
23+
"additionalProperties": {
24+
"anyOf": [
25+
{
26+
"$ref": "../../entities/balance/nft-balance.schema.json"
27+
}
28+
]
2529
}
2630
},
2731
"token_offering_locked": {

docs/api/address/get-address-nft-events.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
32
"type": "object",
43
"title": "AddressNftListResponse",
4+
"additionalProperties": false,
55
"required": [
66
"limit",
77
"offset",

docs/api/address/get-address-stx-balance.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns address balances",
43
"title": "AddressStxBalanceResponse",
54
"type": "object",
@@ -8,6 +7,8 @@
87
"$ref": "../../entities/balance/stx-balance.schema.json"
98
},
109
{
10+
"type": "object",
11+
"additionalProperties": false,
1112
"properties": {
1213
"token_offering_locked": {
1314
"$ref": "../../entities/address/token-offering-locked.schema.json"

docs/api/address/get-address-stx-inbound.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns a list of inbound STX transfers with a memo",
43
"title": "AddressStxInboundListResponse",
4+
"additionalProperties": false,
55
"type": "object",
66
"required": ["results", "limit", "offset", "total"],
77
"properties": {

docs/api/address/get-address-transactions-with-transfers.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns account transactions",
43
"title": "AddressTransactionsWithTransfersListResponse",
54
"type": "object",

0 commit comments

Comments
 (0)