github hashgraph/hedera-mirror-node v0.46.0

latest releases: v0.118.0, v0.117.1, v0.118.0-rc1...
2 years ago

0.46 is a feature-packed release and includes support for three new HIPs, three new REST APIs, a redesigned monitor dashboard, a new BDD test suite for the Rosetta API, and one new module. Let’s dive in!

HIP-222 adds support for ECDSA (secp256k1) keys to the Hedera network to help improve the developer experience of migrating a dApp to Hedera. The mirror node was updated to be able to parse and store the new key type along with its corresponding new signature. Since this key type is also considered a primitive key like ED25519 (e.g. not a complex key list or threshold key), you can now search for accounts and tokens by their 66-character ECDSA public key. As an added bonus, we now also allow searching by complex public keys that are a key list or threshold key with exactly one primitive key.

HIP-32 auto-account creation lets a new user receive ℏ via a CryptoTransfer without having already created an account on the network. The mirror node was updated to store the user's alias and map transfers that contain an alias to the newly created account ID. In an upcoming release, we'll add the ability to query for an account by its alias.

HIP-206 integrates the Hedera Token Service (HTS) into the Hedera Smart Contract Service (HSCS), allowing contracts to transfer, mint, burn, associate, and dissociate tokens programmatically. While support for consensus nodes is still being worked on, the mirror node now has preliminary support for HTS precompiled transactions. This adds a new nonce field to the transaction ID as well as the concept of parent/child relationships between transactions. In an upcoming release, we'll add nonce support and expose parent/child relationships to the REST API.

The REST API saw three new REST APIs created to support the new Smart Contracts 2.0 feature. After executing a smart contract, developers can use the /api/v1/contracts/{id}/results API to search for a contract's execution results by timestamp range or payer account (e.g. from). Once the result is located, the new /api/v1/contracts/{id}/results/{timestamp} API can retrieve detailed information about the smart contract call. If you already know the transaction's ID, you can directly retrieve the smart contract results via the new /api/v1/contracts/results/{transactionId} API. In an upcoming release, we'll add support for logs, state changes, and more to this API. Below is an example response:

/api/v1/contracts/results/{transactionId}

{
    "amount": 30,
    "block_hash": "0x6ceecd8bb224da491",
    "block_number": 17,
    "call_result": "0x0606",
    "contract_id": "0.0.5001",
    "created_contract_ids": ["0.0.7001"],
    "error_message": "",
    "from": "0x0000000000000000000000000000000000001f41",
    "function_parameters": "0x0707",
    "gas_limit": 987654,
    "gas_used": 123,
    "hash": "0x3531396130303866616264653464",
    "timestamp": "167654.000123456",
    "to": "0x0000000000000000000000000000000000001389"
}

Other miscellaneous changes include now validating the REST API tests against the OpenAPI specification. This should help keep the specification file better in sync with the code until we can fully integrate the specification. The Node.js based monitor dashboard saw a visual refresh in order to make it easier to use. The Rosetta API saw a new suite of crypto and token Behavior Driven Development (BDD) tests. As a result of these tests a number of bugs were found and addressed. Finally, we refactored some common classes into a hedera-mirror-common module to share code with a future API module.

Database Migration

Due to the aforementioned features, we had to make changes to the database schema that may take some time to complete. We've tested the migrations against a mainnet database with 1.9B+ transactions and it completed in around five hours. Mirror node operators may see the migration take more or less time depending upon the size of their data, database hardware, and database configuration flags.

Enhancements

  • Add contract results support to acceptance tests (0.46) #3009
  • Add support for HIP-32 account auto creation #2961
  • Rosetta HTS bdd tests #2957
  • Add support for HTS precompiles #2931
  • Add a hedera-mirror-common module #2927
  • Support HTS precompiles #2925
  • Add Contract Results by timestamp and transactionId REST API #2923
  • HIP-32 auto account creation #2921
  • Separate db cleanup scripts for ops and tests #2920
  • Rosetta upgrade to hedera-sdk-go v2.6.0 #2918
  • Add a hedera-mirror-common module #2912
  • Redesign monitor dashboard #2910
  • Update Contract gas and Transaction memo set logic #2896
  • OpenApi fixes based on test validation #2894
  • Add ECDSA (secp256k1) support #2892
  • Add List contract results REST API #2880
  • Rosetta bdd client #2878
  • Bump versions for v0.46.0-SNAPSHOT #2877
  • Support ECDSA(secp256k1) keys #2876
  • Rosetta add a bdd testing client for construction API #2872
  • Get contract results by transaction ID REST API #2870
  • Get contract results by timestamp REST API #2869
  • List contract results REST API #2868
  • Validate REST API tests against OpenAPI specification #2783

Bug Fixes

  • Fix account balance file ingestion performance issue (0.46) #3001
  • Fix artifact name clash in rosetta-api.yml (0.46) #2972
  • Rosetta workflow failed due to fixed typo in configuration file #2966
  • Fix rosetta-cli configuration typo #2965
  • Fix failing pubsub tests #2963
  • Importer pubsub tests failed due to new HAPI protobuf fields #2962
  • Fix cleanup.sql causing stream reset to timeout #2959
  • Fix image build failures after adding common module #2958
  • Fix importer tests failure #2922
  • Enable TCP keepalive on JDBC connections #2911
  • Long database migrations fail in Kubernetes #2895
  • Shorten AccountCreateTransaction memo length #2890

Dependency Upgrades

  • Bump log4j2 to 2.15.0 (0.46) #2977
  • Bump testcontainers from 7.23.2 to 7.24.0 in /hedera-mirror-rest #2950
  • Bump swagger-ui-express from 4.1.6 to 4.2.0 in /hedera-mirror-rest #2948
  • Bump gorm.io/driver/postgres from 1.2.2 to 1.2.3 in /hedera-mirror-rosetta #2947
  • Bump gorm.io/gorm from 1.22.3 to 1.22.4 in /hedera-mirror-rosetta #2946
  • Bump github.com/mitchellh/mapstructure from 1.4.2 to 1.4.3 in /hedera-mirror-rosetta #2945
  • Bump jest from 27.3.1 to 27.4.3 in /hedera-mirror-rest/check-state-proof #2943
  • Bump yargs from 17.2.1 to 17.3.0 in /hedera-mirror-rest/check-state-proof #2942
  • Bump prettier from 2.5.0 to 2.5.1 in /hedera-mirror-rest #2941
  • Bump aws-sdk-mock from 5.4.0 to 5.5.0 in /hedera-mirror-rest #2940
  • Bump software.amazon.awssdk:bom from 2.17.90 to 2.17.96 #2939
  • Bump springdoc-openapi-webflux-ui from 1.5.12 to 1.5.13 #2938
  • Bump jest from 27.3.1 to 27.4.3 in /hedera-mirror-rest/monitoring/monitor_apis #2937
  • Bump express-openapi-validator from 4.13.2 to 4.13.4 in /hedera-mirror-rest #2936
  • Bump aws-sdk from 2.1037.0 to 2.1043.0 in /hedera-mirror-rest #2934
  • Bump jest from 27.3.1 to 27.4.3 in /hedera-mirror-rest #2932
  • Bump github.com/jackc/pgtype from 1.9.0 to 1.9.1 in /hedera-mirror-rosetta #2908
  • Bump github.com/ory/dockertest/v3 from 3.8.0 to 3.8.1 in /hedera-mirror-rosetta #2907
  • Bump sql-formatter from 2.0.2 to 2.0.3 #2905
  • Bump cucumber.version from 7.0.0 to 7.1.0 #2904
  • Bump eslint-plugin-jest from 25.2.4 to 25.3.0 in /hedera-mirror-rest #2903
  • Bump software.amazon.awssdk:bom from 2.17.86 to 2.17.90 #2902
  • Bump long from 5.1.0 to 5.2.0 in /hedera-mirror-rest #2901
  • Bump prettier from 2.4.1 to 2.5.0 in /hedera-mirror-rest #2899
  • Bump aws-sdk from 2.1033.0 to 2.1037.0 in /hedera-mirror-rest #2898
  • Bump github.com/jackc/pgtype from 1.8.1 to 1.9.0 in /hedera-mirror-rosetta #2888
  • Bump testcontainers from 7.23.0 to 7.23.2 in /hedera-mirror-rest #2886
  • Bump software.amazon.awssdk:bom from 2.17.81 to 2.17.86 #2884
  • Bump pretty-quick from 3.1.1 to 3.1.2 in /hedera-mirror-rest #2882
  • Bump aws-sdk from 2.1029.0 to 2.1033.0 in /hedera-mirror-rest #2881

Contributors

We'd like to thank all the contributors who worked on this release!

Don't miss a new hedera-mirror-node release

NewReleases is sending notifications on new releases.