Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed length of root field in tx receipt response #1339

Merged
merged 3 commits into from Nov 9, 2020

Conversation

Vovchyk
Copy link
Contributor

@Vovchyk Vovchyk commented Oct 20, 2020

This sets the length of the root field that's being returned by eth_getTransactionReceipt JSON-RPC call to 32 bytes.

Description

Right now rskj returns 0x00,0x01 instead of 0x0...0 and 0x0...1 (32 bytes) for the root field. This makes some js libraries incompatible with rskj.

Motivation and Context

This change is required for the rskj node to be compatible with client libraries at the JSON-RPC level.

How Has This Been Tested?

JSON-RPC response of eth_getTransactionReceipt has been checked.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)
  • Other information:

Copy link
Contributor

@patogallaiovlabs patogallaiovlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a test for the final DTO, that we currently dont have

@fedejinich
Copy link
Contributor

is it posible to add a test case for testToBytesWithLeadingZeros_TxReceiptRoot?

@sonarcloud
Copy link

sonarcloud bot commented Nov 9, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

92.0% 92.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_272) you have used to run this analysis is deprecated and we will stop accepting it accepting it soon.Please update to at least Java 11.
Read more here

@ajlopezrsk ajlopezrsk merged commit 31db6b6 into master Nov 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the txreceipt-root-compat branch November 9, 2020 15:39
@aeidelman aeidelman added this to the Iris v3.0.0 milestone Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants