Skip to content

Conversation

@avilagaston9
Copy link
Contributor

@avilagaston9 avilagaston9 commented Aug 23, 2024

Motivation

We are currently not matching the expected response from Hive on the eth_getBlockByHash endpoint.

Description

  • Moves BlockSerializable to the RPC module.
  • Renames BlockSerializable to RpcBlock.
  • Creates FullBlockBody which holds RpcTransaction instead of Transaction to match the Hive expected output.
  • Adds logic to calculate TotalDifficulty of blocks.

Observations

#307 was created to remove TotalDifficulty calculation logic added by this PR. This is because this field it is not being used since the merge, but it is still required to pass Hive tests.

Closes #269

@avilagaston9 avilagaston9 requested a review from a team as a code owner August 23, 2024 13:02
@avilagaston9 avilagaston9 marked this pull request as draft August 23, 2024 13:03
@avilagaston9 avilagaston9 changed the title refactor: BlockSerializable to RpcBlock fix: ethBlockByHash endpoint Aug 23, 2024
}
}

#[allow(unused)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

great refactor!

@avilagaston9 avilagaston9 marked this pull request as ready for review August 26, 2024 16:07
Copy link
Contributor

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

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

🚀

@fmoletta fmoletta added this pull request to the merge queue Aug 26, 2024
Merged via the queue into main with commit 60a89f0 Aug 26, 2024
@fmoletta fmoletta deleted the get-block-by-hash branch August 26, 2024 17:07
github-merge-queue bot pushed a commit that referenced this pull request Feb 21, 2025
#2043)

**Description**

This PR updates the hive tests suite to a new hive revision and fixes
new tests by removing the `total_difficulty` field on the block scheme.
This field was already removed in #304 and reintroduced in #566 due to
the usage in hive engine test suite.

Hive tests related to the wrong encoding of `nonce` field were also
fixed

---------

Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
JereSalo pushed a commit that referenced this pull request Feb 28, 2025
#2043)

**Description**

This PR updates the hive tests suite to a new hive revision and fixes
new tests by removing the `total_difficulty` field on the block scheme.
This field was already removed in #304 and reintroduced in #566 due to
the usage in hive engine test suite.

Hive tests related to the wrong encoding of `nonce` field were also
fixed

---------

Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
fkrause98 pushed a commit that referenced this pull request Mar 5, 2025
#2043)

**Description**

This PR updates the hive tests suite to a new hive revision and fixes
new tests by removing the `total_difficulty` field on the block scheme.
This field was already removed in #304 and reintroduced in #566 due to
the usage in hive engine test suite.

Hive tests related to the wrong encoding of `nonce` field were also
fixed

---------

Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
fkrause98 pushed a commit that referenced this pull request Mar 5, 2025
#2043)

**Description**

This PR updates the hive tests suite to a new hive revision and fixes
new tests by removing the `total_difficulty` field on the block scheme.
This field was already removed in #304 and reintroduced in #566 due to
the usage in hive engine test suite.

Hive tests related to the wrong encoding of `nonce` field were also
fixed

---------

Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
pedrobergamini pushed a commit to pedrobergamini/ethrex that referenced this pull request Aug 24, 2025
lambdaclass#2043)

**Description**

This PR updates the hive tests suite to a new hive revision and fixes
new tests by removing the `total_difficulty` field on the block scheme.
This field was already removed in lambdaclass#304 and reintroduced in lambdaclass#566 due to
the usage in hive engine test suite.

Hive tests related to the wrong encoding of `nonce` field were also
fixed

---------

Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hive Testing: eth_getBlockByHash

4 participants