This release broadens our support for non-fungible tokens (NFTs) with new NFT-specific REST APIs. A new API was added to return a list of NFTs for a particular token ID. We also added a new API to return a single NFT by its token ID and serial number. Finally, we added an API to see the transaction history for a particular NFT. In an effort to have more manageable REST API code, we now adopt a more object-oriented approach by utilizing models, view-models and services. Below is an example of the three new APIs:
GET /api/v1/tokens/0.0.1500/nfts
{
"nfts": [{
"account_id": "0.0.1002",
"created_timestamp": "1234567890.000000010",
"deleted": false,
"metadata": "ahf=",
"modified_timestamp": "1234567890.000000010",
"serial_number": 2,
"token_id": "0.0.1500"
},{
"account_id": "0.0.1001",
"created_timestamp": "1234567890.000000009",
"deleted": false,
"metadata": "bTM=",
"modified_timestamp": "1234567890.000000008",
"serial_number": 1,
"token_id": "0.0.1500"
}],
"links": {
"next": null
}
}
GET /api/v1/tokens/0.0.1500/nfts/1
{
"account_id": "0.0.1001",
"created_timestamp": "1234567890.000000008",
"deleted": false,
"metadata": "bTM=",
"modified_timestamp": "1234567890.000000009",
"serial_number": 1,
"token_id": "0.0.1500"
}
GET /api/v1/tokens/0.0.1500/nfts/1/transactions
{
"transactions": [{
"consensus_timestamp": "1234567890.000000009",
"transaction_id": "0.0.8-1234567890-000000009",
"receiver_account_id": "0.0.1001",
"sender_account_id": "0.0.2001",
"type": "CRYPTOTRANSFER"
}, {
"consensus_timestamp": "1234567890.000000008",
"transaction_id": "0.0.8-1234567890-000000008",
"receiver_account_id": "0.0.2001",
"sender_account_id": null,
"type": "TOKENMINT"
}],
"links": {
"next": null
}
}
This release also adds support for custom fees for HTS as defined in HIP-18. After the mirror node design was completed, the necessary custom fee tables were added and the importer modified to ingest the transactions. A list of assessed custom fees was added to the /api/v1/transactions/{transactionId}
endpoint. The ability to find a token's custom fee schedule at a point in time was added to the /api/v1/tokens/{tokenId}
endpoint.
We optimized the balance file parsing performance to be able to process files with a large numbers of accounts. We previously loaded every account balance into memory before persisting. When testing files with tens of millions account this would cause the importer process to slow down and run out of memory. This has now been optimized to load the items one by one into memory then batch persist them to the database.
Breaking Changes
If you're using our monitor tool to verify or performance test the network, you should be aware of some breaking changes to its configuration format. In order to make it easier to override the default behavior without having to duplicate its configuration, we changed the scenario properties from a list to a map where the key is the scenario name. Specifically we changed hedera.mirror.monitor.publish.scenarios
, hedera.mirror.monitor.subscribe.grpc
, and hedera.mirror.monitor.subscribe.rest
. Also, the content of the elapsed
duration in the monitor REST API changed slightly to a format like 1h2m57s
.
Enhancements
- Add ReceiptStatusException retry and account checksum support to acceptance tests #2253
- Custom fees REST api #2247
- Run GitHub actions on main #2241
- Support NFT treasury account updates #2239
- Custom fees importer #2236
- Add an alert for missing balance file #2219
- Add Upsert support to NFTs #2218
- Support NFT treasury account updates #2215
- Adding config to swagger stats #2204
- Add custom fees to existing REST APIs #2199
- Remove nft transferlist from transactions list endpoint #2181
- NFT transaction history REST API #2177
- Update README with min versions for tools #2175
- Add IP metrics to REST #2174
- Custom fees support design #2173
- NFTs list and get REST API #2171
- Custom Fee Support Importer #2166
- Improve acceptance accountId and retry logic #2162
- Change monitor scenario properties from list to map #2160
- Rename master to main #2158
- Bump versions for v0.37.0-SNAPSHOT #2151
- Rename master branch to main #2137
- REST API get NFT transaction history #2136
- REST API list/get NFTs #2135
- Refactor importer NFT logic to use upsert #2133
- REST API metrics by client IP #2130
Bug Fixes
- Fix monitor transaction publisher not recording error metrics #2240
- Retry monitor entity creation #2216
- Fix RedisEntityListenerTest.onSlowPublish #2214
- Remove broken AccountBalanceFileParserTest.keepFiles test #2213
- Fix "New Issue" only showing "Ask a Question" #2211
- Fix helm test failing during retry #2200
- Stream account balances to the database #2182
- Mitigate the impact of pgcopy timeout #2176
- Deduplicate NFT transfers #2164
- Fix Grafana & adjust alerts #2163
- Fix rosetta db integration test failure #2161
- Set entity createdTimestamp and modifiedTimestamp in transaction handlers #2159
- Add multi batch support to upsert pgcopy flow #2153
- Increase RedisEntityListenerTest.onSlowPublish timeout #2152
- Entity created and modify timestamps are null #2131
- AccountBalanceFileParserTest & RecordFileParserIntegrationTest failing in CI #1947
- Slow account balance file processing at high number of accounts #1927
Documentation
- Remove GitHub docs in favor of organization level configuration #2210
- Add example values to docker compose application.yml #2208
Dependency Upgrades
- [Cherry-pick 0.37.0] Bump protobuf to 0.16.0-alpha.4 and add new response codes #2271
- Update to hedera-protobuf-java-api 0.16.0-alpha.3 #2254
- Bump husky from 6.0.0 to 7.0.1 in /hedera-mirror-rest #2238
- Bump aws-sdk from 2.935.0 to 2.939.0 in /hedera-mirror-rest #2237
- Bump github.com/hashgraph/hedera-sdk-go/v2 from 2.1.7 to 2.1.10 in /hedera-mirror-rosetta #2235
- Bump google.golang.org/protobuf from 1.27.0 to 1.27.1 in /hedera-mirror-rosetta #2234
- Bump
@hashgraph
/proto from 1.0.25 to 1.1.4 in /hedera-mirror-rest/check-state-proof #2233 - Bump husky from 6.0.0 to 7.0.0 in /hedera-mirror-rest #2232
- Bump jest from 27.0.5 to 27.0.6 in /hedera-mirror-rest/check-state-proof #2231
- Bump nodemon from 2.0.7 to 2.0.9 in /hedera-mirror-rest #2230
- Bump jest-circus from 27.0.5 to 27.0.6 in /hedera-mirror-rest #2229
- Bump swagger-stats from 0.99.1 to 0.99.2 in /hedera-mirror-rest #2228
- Bump vertx-pg-client from 4.1.0 to 4.1.1 #2227
- Bump sdk from 2.0.7 to 2.0.8 #2226
- Bump mvn-golang-wrapper from 2.3.8 to 2.3.9 #2224
- Bump software.amazon.awssdk:bom from 2.16.91 to 2.16.95 #2223
- Bump grpc.version from 1.38.1 to 1.39.0 #2222
- Bump jest from 27.0.5 to 27.0.6 in /hedera-mirror-rest/monitoring/monitor_apis #2221
- Bump nodemon from 2.0.7 to 2.0.9 in /hedera-mirror-rest/monitoring/monitor_apis #2220
- Bump jest from 27.0.4 to 27.0.6 in /hedera-mirror-rest #2201
- Bump google.golang.org/protobuf from 1.26.0 to 1.27.0 in /hedera-mirror-rosetta #2198
- Bump jest from 27.0.4 to 27.0.5 in /hedera-mirror-rest/check-state-proof #2196
- Bump jest-circus from 27.0.4 to 27.0.5 in /hedera-mirror-rest #2195
- Bump mathjs from 9.4.2 to 9.4.3 in /hedera-mirror-rest #2194
- Bump prettier from 2.3.1 to 2.3.2 in /hedera-mirror-rest #2193
- Bump aws-sdk from 2.932.0 to 2.935.0 in /hedera-mirror-rest #2191
- Bump sdk from 2.0.6 to 2.0.7 #2190
- Bump software.amazon.awssdk:bom from 2.16.87 to 2.16.91 #2189
- Bump download-maven-plugin from 1.6.3 to 1.6.6 #2188
- Bump spring-boot-starter-parent from 2.5.1 to 2.5.2 #2187
- Bump jest from 27.0.4 to 27.0.5 in /hedera-mirror-rest/monitoring/monitor_apis #2186
- Bump docker-maven-plugin from 0.36.0 to 0.36.1 #2185
- Bump mathjs from 9.4.2 to 9.4.3 in /hedera-mirror-rest/monitoring/monitor_apis #2184
- Bump aws-sdk from 2.931.0 to 2.932.0 in /hedera-mirror-rest #2157
- Bump aws-sdk-mock from 5.1.0 to 5.2.1 in /hedera-mirror-rest #2156
- Bump github.com/lib/pq from 1.8.0 to 1.10.2 in /hedera-mirror-rosetta #2149
- Bump github.com/hashgraph/hedera-sdk-go/v2 from 2.1.5 to 2.1.7 in /hedera-mirror-rosetta #2148
- Bump gorm.io/gorm from 1.21.10 to 1.21.11 in /hedera-mirror-rosetta #2147
- Bump aws-sdk from 2.927.0 to 2.931.0 in /hedera-mirror-rest #2146
- Bump pretty-quick from 3.1.0 to 3.1.1 in /hedera-mirror-rest #2144
- Bump software.amazon.awssdk:bom from 2.16.84 to 2.16.87 #2141
Contributors
We'd like to thank all the contributors who worked on this release!