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

Implement eth_getBlockByNumber while downloading state. #2481

Merged
merged 21 commits into from
Jun 29, 2021

Conversation

jflo
Copy link
Contributor

@jflo jflo commented Jun 25, 2021

PR description

Introduces a dependency from eth_getBlockByNumber onto the Synchronizer, in order to determine download state, and current most recent block that we have state for. JsonRPC test classes also were refactored to provide a Synchronizer.

Fixed Issue(s)

fixes #2209

Changelog

When asking for the latest block while downloading state, will return most recent block we have state for. While still downloading block headers, will return genesis block.

jflo and others added 17 commits June 25, 2021 16:15
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
(cherry picked from commit f7d5055)
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
(cherry picked from commit faf8d05)
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
(cherry picked from commit 8f86832)
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
(cherry picked from commit 196d3ee)
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit 0ae0e0c)
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit f531299)
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit d40cdee)
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit 241eb53)
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
(cherry picked from commit 6e49458)
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit 0ba36b4)
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit f2b5ac6)
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit 337198b)
Signed-off-by: Justin Florentine <jflorentine@gmail.com>
(cherry picked from commit d187e4c)
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
@vmichalik
Copy link

Hey @jflo, it would be useful for posterity to have a descriptive PR title. How about "Implement correct behavior of eth_getBlockByNumber"?

@jflo jflo changed the title 2209 Implement eth_getBlockByNumber while downloading state. Jun 28, 2021
jflo added 3 commits June 28, 2021 10:54
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

LGTM

@matkt matkt enabled auto-merge (squash) June 29, 2021 12:48
@matkt matkt merged commit 55cde86 into hyperledger:master Jun 29, 2021
RatanRSur pushed a commit to RatanRSur/besu that referenced this pull request Jul 8, 2021
…2481)

Introduces a dependency from eth_getBlockByNumber onto the Synchronizer, in order to determine download state, and current most recent block that we have state for. JsonRPC test classes also were refactored to provide a Synchronizer.
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
RatanRSur pushed a commit to RatanRSur/besu that referenced this pull request Jul 8, 2021
…2481)

Introduces a dependency from eth_getBlockByNumber onto the Synchronizer, in order to determine download state, and current most recent block that we have state for. JsonRPC test classes also were refactored to provide a Synchronizer.
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
RatanRSur pushed a commit to RatanRSur/besu that referenced this pull request Jul 8, 2021
…2481)

Introduces a dependency from eth_getBlockByNumber onto the Synchronizer, in order to determine download state, and current most recent block that we have state for. JsonRPC test classes also were refactored to provide a Synchronizer.
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
RatanRSur pushed a commit to RatanRSur/besu that referenced this pull request Jul 8, 2021
…2481)

Introduces a dependency from eth_getBlockByNumber onto the Synchronizer, in order to determine download state, and current most recent block that we have state for. JsonRPC test classes also were refactored to provide a Synchronizer.
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…2481)

Introduces a dependency from eth_getBlockByNumber onto the Synchronizer, in order to determine download state, and current most recent block that we have state for. JsonRPC test classes also were refactored to provide a Synchronizer.
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
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.

Determine correct behavior of eth_getBlockByNumber, latest
3 participants