- 
                Notifications
    You must be signed in to change notification settings 
- Fork 88
          fix: return 32-byte block hash from eth_getFilterChanges to ensure EVM compatibility
          #3863
        
          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
Conversation
| 🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) | 
61885d8    to
    0e572d0      
    Compare
  
    | Hey @romangzz, thanks much for the PR great catch indeed! Could you kindly include some links to documentation, if any, supporting this update like from official Ethereum's JSON-RPC spec or whatnot? It’ll help provide context for future reference. If possible, please add the links to the PR description for better clarity. | 
| Codecov ReportAttention: Patch coverage is  
 
 🚀 New features to boost your workflow:
 | 
| Hey @romangzz are there any new updates on this PR? | 
0e572d0    to
    3e2ee41      
    Compare
  
    | 
 Hey @quiet-node, sorry for the delay. I've just updated the PR description to include the Ethereum JSON-RPC specification that outlines the expected format of the response. | 
| 
 Hey @romangzz thanks much! The team will review soon! Seems like the tests are failing please resolve them when you have a chance. | 
| Hi @romangzz, nice catch indeed! Please fix the failing test (it's failing because it's actually checking for 48-byte hashes) hiero-json-rpc-relay/packages/server/tests/acceptance/rpc_batch3.spec.ts Lines 1085 to 1103 in 8ef3c38 
 | 
bbad0f1    to
    15c78e8      
    Compare
  
    | Nice work @romangzz but unit test CI is still failing. Please resolve when you have a chance | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was an issue with the test
15c78e8    to
    27bb79a      
    Compare
  
    | @romangzz we just fix an issue on main that was making CI to fail. Please rebase this branch. | 
…M compatibility Signed-off-by: Javier Roman <[email protected]>
27bb79a    to
    d4a81e0      
    Compare
  
    | Hey @acuarica, I just rebased the branch. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks much for the effort!
eth_getFilterChanges to ensure EVM compatibility
      | Hi @romangzz, merged! thanks for your contribution! | 
Description:
Ensure
eth_getFilterChangesreturns a 32-byte block hash to match Ethereum's expectations.eth_getBlockByHashNotes for reviewer:
Previously,
eth_getFilterChangesreturned 48-byte block hashes, causingeth_getBlockByHashto fail with a parameter validation error. This PR ensures that only the first 32 bytes are returned, complying with Ethereum's JSON-RPC spec.Example of uncorrected output response:
{ "result": [ "0x3c08bbbee74d287b1dcd3f0ca6d1d2cb92c90883c4acf9747de9f3f3162ad25b999fc7e86699f60f2a3fb3ed9a646c6b" ], "jsonrpc": "2.0", "id": 1 }Example of corrected output response:
{ "result": [ "0x3c08bbbee74d287b1dcd3f0ca6d1d2cb92c90883c4acf9747de9f3f3162ad25b" ], "jsonrpc": "2.0", "id": 1 }Documentation:
According to the Ethereum JSON-RPC Specification, the
blockHashmust match the following pattern:^0x[0-9a-f]{64}$, which represents a 32-byte Ethereum block hash.Fixes #3975.
Checklist