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

Upto date with reth upstream changes #10

Conversation

ankitchiplunkar
Copy link

No description provided.

Copy link
Collaborator

@ckoopmann ckoopmann left a comment

Choose a reason for hiding this comment

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

Thanks a lot of the PR. Updating the reth dependency and removing the unnecessary type clutter would be great.

However we will have to keep the custom serialization of the u64 types for the reason given below, so I suggest removing those changes and limiting it only to what is necessary to keep compatibility with the updated reth dependency.

Also please run cargo fmt and cargo clippy to make the CI happy. ( We should probably document this in the README or a separate CONTRIBUTING.md - feel free to open a PR / Issue for any documentation that you feel is missing for a new contributor)

pub gas_used: u64,
#[serde(deserialize_with = "as_u64")]
pub timestamp: u64,
pub prev_randao: B256,
Copy link
Collaborator

@ckoopmann ckoopmann Oct 23, 2023

Choose a reason for hiding this comment

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

The reason why we had the custom serialization above is because we are currently still aiming to be consistent with the current flashbots builder api. (See: #8)

In their api, numbers are encoded as decimal strings whereas the default deserialization of reth U64 type is hex. Therefore these changes would break the api.

I suggest removing these changes and limiting the PR to only what is necessary to make it compatible with the updated reth dependency.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that this referes to the u64 fields only. The change from H256 to B256 is fine imo.

) -> eyre::Result<()>
where
Conf: RethRpcConfig,
Provider: BlockReaderIdExt
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIce, this does remove a lot of verbose type noise. Good stuff 👍

@@ -11,6 +11,6 @@ clap = "4.4.5"
derivative = "2.2.0"
eyre = "0.6.8"
jsonrpsee = "0.20.1"
reth = { git = "https://github.com/ultrasoundmoney/reth-block-validator", branch = "changes-to-enable-validation-api-extension" }
reth = { git = "https://github.com/paradigmxyz/reth.git", rev = "1cccd09" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the other pr (#8) I also changed to using the reth repo directly, without fixing the commit hash.

Looking at the frequency of breaking api changes on the reth side, it might be better though to go with the fixed commit as you did here.

@alextes
Copy link
Member

alextes commented Oct 23, 2023

Thanks for the contribution Ankit 🙏

@ckoopmann
Copy link
Collaborator

@ankitchiplunkar Thanks again for the contribution.
Closing this for now though since #13 should have brought the validator up to date with reth changes.

@ckoopmann ckoopmann closed this Nov 8, 2023
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.

3 participants