HIP-331 is a community contributed improvement proposal requesting the addition of a new REST API to retrieve an account's list of owned non-fungible tokens (NFTs). The mirror node has an existing /api/v1/tokens/{tokenId}/nfts
API to retrieve all NFTs for a given token, but it didn't satisfy the requirement to show NFTs across token classes. This release adds the new /api/v1/accounts/{accountId}/nfts
API to satisfy this need. It is our first API with multiple query parameters required for paging and as such has a few restrictions around their use. Please see the OpenAPI description for this API for further details.
GET /api/v1/accounts/0.0.1001/nfts?token.id=gte:1500&serialnumber=gte:2&order=asc&limit=2
{
"nfts": [
{
"account_id": "0.0.1001",
"created_timestamp": "1234567890.000000006",
"deleted": false,
"metadata": "bTI=",
"modified_timestamp": "1234567890.000000006",
"serial_number": 2,
"token_id": "0.0.1500"
},
{
"account_id": "0.0.1001",
"created_timestamp": "1234567890.000000008",
"deleted": false,
"metadata": "bTM=",
"modified_timestamp": "1234567890.000000008",
"serial_number": 3,
"token_id": "0.0.1500"
}
],
"links": {
"next": "/api/v1/accounts/0.0.1001/nfts?order=asc&limit=2&token.id=gte:0.0.1500&serialnumber=gt:3"
}
}
The mirror node now has performance tests written using k6 for all of our APIs. These tests can be used to verify the performance doesn't regress from release to release. In the future, we plan to integrate these into a nightly regression test suite to improve our current approach of testing each release.
A number of deployment issues were addressed in this release. We now disable leader election by default until we can fix the issues with its implementation. Likewise we changed the importer Kubernetes deployment strategy from a rolling update to recreate to avoid ever having multiple importer pods running concurrently. A migration readiness probe was added to the importer. This will mark importer pods as unready until it completes all database migrations. Doing this will ensure Helm doesn't finish its release and run its tests before the migrations are completed.
We continue to fine tune our Rosetta implementation with a number of performance improvements and bug fixes. The performance of the Rosetta get genesis balance script was improved to reduce initial startup time. The embedded PostgreSQL container was upgraded to PostgreSQL 14. The Rosetta unified Docker image was updated to comply with the Rosetta persistence requirements.
Enhancements
- Increase max data retries in rosetta bdd-test #3346
- Return 200 instead of error for unimplemented methods #3334
- Add HIP-331 Account NFT REST API support #3331
- Add a migration readiness probe #3306
- Bump versions for v0.52.0-SNAPSHOT #3303
- Improve perf of Rosetta get genesis balance script #3256
- Add k6 tests #3174
- Add k6 performance tests #3173
- HIP-331 Account NFTs REST API #3081
Bug Fixes
- Fix circular bean reference on startup (0.52) #3359
- Workaround alias not found issue #3339
- Fix importer helm deployment #3337
- Workaround CREATE2 invalid contract ID issue #3335
- Fix rosetta all-in-one docker image persistent data location #3333
- Disable importer leader election #3330
- Fix PostgreSQL & Redis metrics #3305
Documentation
- Fix broken doc link #3354
Dependency Upgrades
- Bump dependency-check-maven from 6.5.3 to 7.0.0 #3348
- Bump software.amazon.awssdk:bom from 2.17.134 to 2.17.138 #3347
- Bump
@hashgraph
/proto from 2.1.4 to 2.1.5 in /hedera-mirror-rest/check-state-proof #3345 - Bump embedded.testcontainers.version from 2.0.20 to 2.1.0 #3344
- Bump spring-boot-starter-parent from 2.6.3 to 2.6.4 #3343
- Bump docker-maven-plugin from 0.39.0 to 0.39.1 #3342
- Bump
@hashgraph
/proto from 2.1.4 to 2.1.5 in /hedera-mirror-rest #3341 - Bump aws-sdk from 2.1078.0 to 2.1082.0 in /hedera-mirror-rest #3340
- Bump eslint-plugin-jest from 26.1.0 to 26.1.1 in /hedera-mirror-rest #3328
- Bump follow-redirects from 1.14.8 to 1.14.9 in /hedera-mirror-rest #3327
- Bump eslint-config-prettier from 8.3.0 to 8.4.0 in /hedera-mirror-rest #3326
- Bump aws-sdk from 2.1073.0 to 2.1078.0 in /hedera-mirror-rest #3325
- Bump software.amazon.awssdk:bom from 2.17.129 to 2.17.134 #3323
- Bump
@hashgraph
/proto from 2.1.3 to 2.1.4 in /hedera-mirror-rest/check-state-proof #3322 - Bump gorm.io/driver/postgres from 1.2.3 to 1.3.1 in /hedera-mirror-rosetta #3321
- Bump github.com/hashgraph/hedera-sdk-go/v2 from 2.8.0 to 2.9.0 in /hedera-mirror-rosetta #3320
- Bump grpc.version from 1.44.0 to 1.44.1 #3318
- Bump vertx-pg-client from 4.2.4 to 4.2.5 #3317
- Bump spring-cloud-dependencies from 2021.0.0 to 2021.0.1 #3315
- Bump
@hashgraph
/proto from 2.1.3 to 2.1.4 in /hedera-mirror-rest #3311 - Bump express from 4.17.2 to 4.17.3 in /hedera-mirror-rest #3309
- Bump express from 4.17.2 to 4.17.3 in /hedera-mirror-rest/monitoring/monitor_apis #3308
Contributors
We'd like to thank all the contributors who worked on this release!