github hashgraph/hedera-mirror-node v0.50.0

latest releases: v0.117.0-rc1, v0.116.1, v0.116.0...
2 years ago

This release adds support for three new improvement proposals: HIP-260 Smart Contract Traceability, HIP-329 CREATE2 Opcode, and HIP-336 Allowance APIs. It also updates the REST API to reflect the latest phases of HIP-226 and HIP-227 and updates the Rosetta API for HIP-31.

HIP-260 describes a need for improving the traceability of smart contracts by providing a verifiable trail of contract state changes in the transaction record. The mirror node can now store these state changes and expose them via the contract results REST API to show the values read and written for each slot. This information was added to both /api/v1/contracts/results/{transactionId} and /api/v1/contracts/{id}/results/{timestamp}. Below is an example, with other fields omitted for brevity:

{
  "state_changes": [{
      "address": "0x0000000000000000000000000000000000001f41",
      "contract_id": "0.0.8001",
      "slot": "0x0000000000000000000000000000000000000000000000000000000000000002",
      "value_read": "0xaf846d22986843e3d25981b94ce181adc556b334ccfdd8225762d7f709841df0",
      "value_written": "0x000000000000000000000000000000000000000000c2a8c408d0e29d623347c5"
    }, {
      "address": "0x0000000000000000000000000000000000001f42",
      "contract_id": "0.0.8002",
      "slot": "0xe1b094dec1b7d360498fa8130bf1944104b7b5d8a48f9ca88c3fc0f96c2d7225",
      "value_read": "0x000000000000000000000000000000000000000000000001eafa3aaed1d27246",
      "value_written": null
   }]
}

HIP-329 adds support for EIP-1014 generated contract addresses via the CREATE2 opcode. As part of this, a new evm_address is added to the transaction record that will be present for contract create transactions. Additionally, this evm_address can be populated in any ContractID that appears in the transaction body. The mirror node was updated to be able to map this evm_address to its corresponding contract number and to expose this property on the contracts REST API. We also store full contract information for child contracts since they now appear as separate internal transactions in the record stream, filling a long-standing gap in missing smart contract data.

HIP-336 allowance functionality allows an account owner to delegate another account to spend hbars or tokens on his or her behalf. This feature provides an implementation of ERC20, IERC20, and ERC721 on the Hedera network. The mirror node was updated to support these new transaction types and store the absolute or relative crypto, fungible or non-fungible allowances. In a later release we will expose this information via a REST API as detailed in the design document.

Multiple new fields were added to the contract REST APIs as outlined in HIP-226 and HIP-227. The fields bloom, result, and status were added to the contract results API response. result and status show similar information with the former being the HAPI response enum while the latter returning 0x1 or 0x0 to show if the transaction was successful or not, as is common in web3 APIs. We also added bloom to the contract logs API response. Finally, we now return a partial response for contract calls without a result.

The importer component added a new hedera.mirror.importer.parser.record.entity.persist.topics property to control persistence of topic messages. This can be set to false for mirror node operators if topic message data is not being used. On mainnet alone, this data currently takes up to 2TB worth of storage.

The Monitor component gained support for parallel node validation to improve startup performance. Now all validation is done in a background thread, adding and removing nodes as necessary while the publisher thread continues publishing transactions without any interruptions. This re-work also fixed issues with subscription halting during node validation and taking too long to validate a down node.

Rosetta saw a few important improvements including adding support for HIP-31 expected token decimals. The Rosetta unified Docker image saw functionality added to automatically restore the database using a database snapshot on initial startup.

Breaking Changes

As part of HIP-329 CREATE2, we renamed the existing solidity_address in the contract REST API to evm_address. This new name accurately reflects the naming in the HIP and protobuf and avoids tying the address to Solidity when Hedera supports more than just Solidity contracts.

Enhancements

  • Update acceptance tests to use evmAddress (v0.50) #3275
  • Add a property to control persistence of topic messages #3255
  • Add auto restore functionality to Rosetta unified image #3253
  • Support HIP-336 Allowance APIs #3252
  • Update Pubsub message strings based on updated hedera protobuf 0.23.0-SNAPSHOT #3229
  • Support HIP-31 expected token decimals in rosetta #3228
  • Increase default gas limit used by acceptance tests #3227
  • Update postgresql data migration guide #3223
  • Update topicMessage REST response to use transactionId json format #3222
  • Add contract state change support to contract REST API endpoints #3219
  • Support HIP-329 CREATE2 opcode #3217
  • Add contract state change support to common and importer modules #3189
  • Return partial response for contract calls without a result #3182
  • Bump versions for v0.50.0-SNAPSHOT #3179
  • Add bloom, result and status to contract results API and bloom to contract logs API #3176
  • Rosetta support HIP-31 #3167
  • HIP-336 Approval/allowance feature #3163
  • HIP-329 CREATE2 opcode #3161
  • HIP-260 Smart Contract Traceability #3160
  • Add bloom, result and status to contract results API #3159
  • Return partial response for contract calls without a result #3158
  • Parallelize monitor node validation #2642

Bug Fixes

  • Handle invalid entity ID in GCP Pub/Sub #3257
  • Fix URL in test pod yaml #3224
  • Fix wrong sort order for contract logs in OpenAPI #3221
  • Default order for api/v1/contracts/{contractid}/results/logs does not match swagger #3218
  • Remove streamFileActivity from importer liveness probe #3216
  • Set importer replicas to 1 to workaround leader election bugs #3190
  • Add NetworkService to grpc ingress #3186
  • Optimize schedules query #3185
  • /api/v1/schedules is slow in testnet #3184
  • Fix monitor validation issues #3181
  • Monitor takes too long to validate a down node #3157
  • Monitor subscription halts during node validation #2914

Dependency Upgrades

  • Upgrade hedera-sdk-go to v2.8.0 #3254
  • Bump software.amazon.awssdk:bom from 2.17.117 to 2.17.121 #3242
  • Bump springdoc-openapi-webflux-ui from 1.6.4 to 1.6.5 #3241
  • Bump github.com/prometheus/client_golang from 1.12.0 to 1.12.1 in /hedera-mirror-rosetta #3239
  • Bump spring-native from 0.11.1 to 0.11.2 #3238
  • Bump aws-sdk-mock from 5.6.0 to 5.6.2 in /hedera-mirror-rest #3237
  • Bump spring-cloud-gcp-dependencies from 3.0.0 to 3.1.0 #3236
  • Bump grpc.version from 1.43.2 to 1.44.0 #3235
  • Bump jest-extended from 1.2.0 to 2.0.0 in /hedera-mirror-rest #3234
  • Bump eslint-plugin-jest from 25.7.0 to 26.0.0 in /hedera-mirror-rest #3233
  • Bump protobuf-java from 3.19.3 to 3.19.4 #3232
  • Bump aws-sdk from 2.1062.0 to 2.1066.0 in /hedera-mirror-rest #3231
  • Bump sinon from 12.0.1 to 13.0.0 in /hedera-mirror-rest #3230
  • Bump vertx-pg-client from 4.2.3 to 4.2.4 #3215
  • Bump junit-jupiter from 1.16.2 to 1.16.3 #3214
  • Bump embedded.testcontainers.version from 2.0.19 to 2.0.20 #3213
  • Bump download-maven-plugin from 1.6.7 to 1.6.8 #3212
  • Bump software.amazon.awssdk:bom from 2.17.112 to 2.17.117 #3211
  • Bump node-fetch from 2.6.1 to 2.6.7 in /hedera-mirror-rest/check-state-proof #3210
  • Bump node-fetch to 2.6.7 & fix LoggingFilterTest #3209
  • Bump log4js from 6.4.0 to 6.4.1 in /hedera-mirror-rest/check-state-proof #3207
  • Bump github.com/prometheus/client_golang from 1.11.0 to 1.12.0 in /hedera-mirror-rosetta #3204
  • Bump supertest from 6.2.1 to 6.2.2 in /hedera-mirror-rest #3203
  • Bump spring-boot-starter-parent from 2.6.2 to 2.6.3 #3202
  • Bump jib-maven-plugin from 3.1.4 to 3.2.0 #3201
  • Bump @godaddy/terminus from 4.10.1 to 4.10.2 in /hedera-mirror-rest #3199
  • Bump aws-sdk from 2.1058.0 to 2.1062.0 in /hedera-mirror-rest #3198
  • Bump aws-sdk-mock from 5.5.1 to 5.6.0 in /hedera-mirror-rest #3197
  • Bump log4js from 6.4.0 to 6.4.1 in /hedera-mirror-rest #3195
  • Bump log4js from 6.4.0 to 6.4.1 in /hedera-mirror-rest/monitoring/monitor_apis #3194
  • Bump log4js from 6.3.0 to 6.4.0 in /hedera-mirror-rest/check-state-proof #3193
  • Bump log4js from 6.3.0 to 6.4.0 in /hedera-mirror-rest/monitoring/monitor_apis #3192
  • Bump log4js from 6.3.0 to 6.4.0 in /hedera-mirror-rest #3191
  • Bump spring-cloud-gcp-dependencies from 2.0.7 to 3.0.0 #3150

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.