HIP-367 deprecated the list of token balances for an account returned via HAPI. The mirror node has been working on its replacement for a few releases by storing the current account balance, combining contract and entity tables, and adding a history table for token_account
. This work has paved the way for a new token relationships REST API that will list all fungible and non-fungible tokens associated with a particular account. This API also returns some metadata like balance, KYC status, freeze status, and whether it's an automatic association or not. Currently the fungible token balance being returned is from the 15 minute account balance file. We are actively working towards tracking the real-time fungible token balance and it will be updated to reflect that in a future release.
GET /api/v1/accounts/{id}/tokens
{
"tokens": [{
"automatic_association": true,
"balance": 15,
"created_timestamp": "1234567890.000000002",
"freeze_status": "UNFROZEN",
"kyc_status": "GRANTED",
"token_id": "0.0.1135"
}],
"links": {
"next": null
}
}
HIP-513 details how smart contract traceability information from consensus nodes is made available via sidecar files. The contract state changes within the sidecar are persisted by mirror nodes and made available on the contract results APIs. However, these state changes do not always reflect the full list of smart contract storage values since not all slots are modified during any particular contract invocation. We now persist a rolled up view of state changes to track the latest slot key/value pairs. This contract state information is now exposed via a new /api/v1/contracts/{id}/state
REST API where id
is either the shard.realm.num
, realm.num
, num
, or a hex encoded EVM address of the smart contract.
GET /api/v1/contracts/{id}/state
{
"state": [{
"address": "0x0000000000000000000000000000000000001f41",
"contract_id": "0.0.100",
"slot": "0x0000000000000000000000000000000000000000000000000000000000000001",
"timestamp": "1676540001.234390005",
"value": "0x0000000000000000000000000000000000000000000000000000000000000010"
}],
"links": {
"next": null
}
}
In a push for further decentralization, we now randomize node used to download data files after reaching consensus. Previously, the data structure we used generally caused us to use the first node returned in the verified list, which was usually 0.0.3
. We now randomly pick a node until we can successfully download the stream file. We also internally changed all tables that used node account ID to use its node ID instead.
On the testing front, we enhanced various test and monitoring tools to add support for new APIs. We also added an acceptance test startup probe to delay the start of the tests until the network as a whole was healthy. This avoids the mirror node acceptance tests reporting a false positive when a long migration or startup process on the consensus or mirror nodes causes a delay.
Upgrading
This release contains a long running migration that is estimated to take around 3 hours to complete against a full mainnet dataset so please plan accordingly. It's recommended to use a red/black deployment to minimize downtime.
Enhancements
- Rosetta show failed transaction status (0.67) #4735
- Add token relationships API to monitor dashboard #4657
- Add blocks API to monitor dashboard #4652
- Add missing blocks endpoints in monitor dashboard #4651
- Add
hedera-evm-api
dependency tohedera-mirror-web3
module #4650 - Token Relation Rest Api - Monitor Dashboard #4618
- Create a startup probe for acceptance tests #4617
- Randomize node used to download data files #4612
- Add Contract State table #4611
- Compatibility changes to support Gradle #4600
- Bump versions for v0.67.0-SNAPSHOT #4597
- Rename FileStreamSignature to StreamFileSignature #4596
- Rename FileStreamSignature to StreamFileSignature #4595
- Token relationships REST API #4593
- Acceptance test startup probes #4579
- Add a contract state REST API #4548
- Dgraph PoC #4486
- Contract state REST API #4484
- Track current contract state #4476
- Token relationships REST API #4142
- Randomize node used to download data files #2863
Bug Fixes
- Fix BalanceReconciliationServiceTest failure (0.67) #4702
- Fix slow monitor startup #4681
- Monitor slow to startup in Kubernetes #4679
- Fix acceptance tests regression on startup #4678
- Acceptance tests fail on startup #4677
- Fix balance monitor api tests #4676
- Monitor not updated for current account balance #4674
- Don't show transactions unrelated to an account #4672
- Fix acceptance test freezing #4616
- Transactions for an account returns unrelated transactions #4614
- Acceptance tests freeze during node validation #4610
- Fix acceptance tests regression #4609
Documentation
- Update the HIP-573 documentation #4648
Dependency Upgrades
- Bump mathjs from 11.2.1 to 11.3.0 in /hedera-mirror-rest #4644
- Bump aws-sdk-mock from 5.7.0 to 5.8.0 in /hedera-mirror-rest #4641
- Bump body-parser from 1.20.0 to 1.20.1 in /hedera-mirror-rest #4640
- Bump express from 4.18.1 to 4.18.2 in /hedera-mirror-rest #4639
- Bump supertest from 6.2.4 to 6.3.0 in /hedera-mirror-rest #4638
- Bump axios from 0.27.2 to 1.1.2 in /hedera-mirror-rest #4637
- Bump junit-jupiter from 1.17.4 to 1.17.5 #4636
- Bump grpc.version from 1.49.2 to 1.50.0 #4635
- Bump gorm.io/gorm from 1.23.10 to 1.24.0 in /hedera-mirror-rosetta #4631
- Bump gorm.io/driver/postgres from 1.3.10 to 1.4.4 in /hedera-mirror-rosetta #4630
- Bump
@hashgraph
/proto from 2.10.0 to 2.11.0 in /hedera-mirror-rest/check-state-proof #4629 - Bump chalk from 5.0.1 to 5.1.0 in /hedera-mirror-rest/check-state-proof #4628
- Bump
@hashgraph
/proto from 2.10.0 to 2.11.0 in /hedera-mirror-rest #4627 - Bump evm from 22.7.4 to 22.7.6 #4626
- Bump software.amazon.awssdk:bom from 2.17.286 to 2.17.290 #4624
- Bump aws-sdk from 2.1227.0 to 2.1231.0 in /hedera-mirror-rest #4623
- Bump sinon from 14.0.0 to 14.0.1 in /hedera-mirror-rest #4622
- Bump eslint-plugin-jest from 27.0.4 to 27.1.1 in /hedera-mirror-rest #4621
- Bump express from 4.18.1 to 4.18.2 in /hedera-mirror-rest/monitoring/monitor_apis #4620
- Bump body-parser from 1.20.0 to 1.20.1 in /hedera-mirror-rest/monitoring/monitor_apis #4619
- Bump evm from 22.7.3 to 22.7.4 #4605
- Bump vertx-pg-client from 4.3.3 to 4.3.4 #4604
- Bump sdk from 2.17.3 to 2.18.0 #4603
- Bump software.amazon.awssdk:bom from 2.17.281 to 2.17.286 #4602
- Bump junit-jupiter from 1.17.3 to 1.17.4 #4601
- Bump cucumber.version from 7.8.0 to 7.8.1 #4599
- Bump swagger-annotations from 1.6.6 to 1.6.7 #4598
- Bump log4js from 6.6.1 to 6.7.0 in /hedera-mirror-rest/check-state-proof #4591
- Bump yargs from 17.5.1 to 17.6.0 in /hedera-mirror-rest/check-state-proof #4590
- Bump jest from 29.0.3 to 29.1.2 in /hedera-mirror-rest/check-state-proof #4589
- Bump log4js from 6.6.1 to 6.7.0 in /hedera-mirror-rest #4588
- Bump jest from 29.0.3 to 29.1.2 in /hedera-mirror-rest #4587
- Bump embedded.testcontainers.version from 2.2.8 to 2.2.9 #4586
- Bump grpc.version from 1.49.1 to 1.49.2 #4585
- Bump aws-sdk from 2.1223.0 to 2.1227.0 in /hedera-mirror-rest #4584
- Bump log4js from 6.6.1 to 6.7.0 in /hedera-mirror-rest/monitoring/monitor_apis #4583
- Bump jest-circus from 29.0.3 to 29.1.2 in /hedera-mirror-rest #4582
- Bump jest from 29.0.3 to 29.1.2 in /hedera-mirror-rest/monitoring/monitor_apis #4581
- Bump spring-cloud-dependencies from 2021.0.3 to 2021.0.4 #4441
Contributors
We'd like to thank all the contributors who worked on this release!