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

[Merge] Execution engine channel implementation with client #4588

Merged

Conversation

tbenr
Copy link
Contributor

@tbenr tbenr commented Nov 8, 2021

PR Description

fixes #4593

Provide Execution engine channel implementation with Web3J calls to eth1_ namespace and direct JSON-RPC calls for engine_ namespace.

Documentation

  • I thought about documentation and added the documentation label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@tbenr tbenr force-pushed the execution_engine_channel_implementation_with_client branch from 7746d62 to 67c06fc Compare November 9, 2021 14:02
@tbenr tbenr marked this pull request as ready for review November 10, 2021 15:21
@tbenr tbenr force-pushed the execution_engine_channel_implementation_with_client branch from 41e2fc2 to cd83058 Compare November 10, 2021 16:29

public ExecutionEngineChannelImpl(ExecutionEngineClient executionEngineClient, Spec spec) {
this.executionPayloadSchema =
spec.forMilestone(SpecMilestone.MERGE)
Copy link
Contributor Author

@tbenr tbenr Nov 10, 2021

Choose a reason for hiding this comment

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

do you think here is correct ATM? in the future should migrate to a dynamic atSlot and have a notion of the slot in getPayload

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we might get away with this but it's definitely the wrong approach. I think I'd rather work out the details of getting the correct spec version now rather than build up tech debt that will have to be fixed before the next fork. The longer we leave it to do properly the more places that may depend on this magically working without knowing the relevant slot.

Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM. I think we can merge as-is but should follow up now to fix the schema definition handling and work out how we can look it up by slot correctly.


public ExecutionEngineChannelImpl(ExecutionEngineClient executionEngineClient, Spec spec) {
this.executionPayloadSchema =
spec.forMilestone(SpecMilestone.MERGE)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we might get away with this but it's definitely the wrong approach. I think I'd rather work out the details of getting the correct spec version now rather than build up tech debt that will have to be fixed before the next fork. The longer we leave it to do properly the more places that may depend on this magically working without knowing the relevant slot.

tbenr and others added 6 commits November 12, 2021 10:09
@tbenr tbenr force-pushed the execution_engine_channel_implementation_with_client branch from d73a7b9 to 4ed32e8 Compare November 12, 2021 10:35
}

@Override
public SafeFuture<ExecutionPayload> getPayload(final Bytes8 payloadId, final UInt64 slot) {
Copy link
Contributor Author

@tbenr tbenr Nov 12, 2021

Choose a reason for hiding this comment

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

@ajsutton I changed the interface and the implementation here to lookup the schema at runtime

Comment on lines 91 to 94
if (executionPayloadSchema.isEmpty()) {
return SafeFuture.failedFuture(
new UnsupportedOperationException("getPayload not supported for non-Merge milestones"));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we now use slot here to get the right schema from Spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right, fixed

@tbenr tbenr merged commit dcbe325 into Consensys:master Nov 15, 2021
@tbenr tbenr deleted the execution_engine_channel_implementation_with_client branch November 15, 2021 09:11
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.

[MERGE] implement ExecutionEngineChannel interface and implement engine API client with new endpoint params
2 participants