-
Notifications
You must be signed in to change notification settings - Fork 278
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
[Merge] Execution engine channel implementation with client #4588
Conversation
.../main/java/tech/pegasys/teku/services/executionengine/client/schema/PayloadAttributesV1.java
Show resolved
Hide resolved
7746d62
to
67c06fc
Compare
41e2fc2
to
cd83058
Compare
|
||
public ExecutionEngineChannelImpl(ExecutionEngineClient executionEngineClient, Spec spec) { | ||
this.executionPayloadSchema = | ||
spec.forMilestone(SpecMilestone.MERGE) |
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.
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
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.
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.
...ain/src/main/java/tech/pegasys/teku/services/executionengine/ExecutionEngineChannelImpl.java
Outdated
Show resolved
Hide resolved
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. 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.
...eum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/ExecutionPayload.java
Outdated
Show resolved
Hide resolved
|
||
public ExecutionEngineChannelImpl(ExecutionEngineClient executionEngineClient, Spec spec) { | ||
this.executionPayloadSchema = | ||
spec.forMilestone(SpecMilestone.MERGE) |
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.
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.
...ain/src/main/java/tech/pegasys/teku/services/executionengine/ExecutionEngineChannelImpl.java
Outdated
Show resolved
Hide resolved
...ain/src/main/java/tech/pegasys/teku/services/executionengine/ExecutionEngineChannelImpl.java
Outdated
Show resolved
Hide resolved
...owchain/src/main/java/tech/pegasys/teku/services/executionengine/client/schema/Response.java
Outdated
Show resolved
Hide resolved
implement additional logic in StubExecutionEngineChannel
…eanup, toString() removed from ExecutionPayload ssz, Response holds more readable error field.
d73a7b9
to
4ed32e8
Compare
} | ||
|
||
@Override | ||
public SafeFuture<ExecutionPayload> getPayload(final Bytes8 payloadId, final UInt64 slot) { |
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.
@ajsutton I changed the interface and the implementation here to lookup the schema at runtime
if (executionPayloadSchema.isEmpty()) { | ||
return SafeFuture.failedFuture( | ||
new UnsupportedOperationException("getPayload not supported for non-Merge milestones")); | ||
} |
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.
Shouldn't we now use slot
here to get the right schema from Spec?
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.
right, fixed
PR Description
fixes #4593
Provide Execution engine channel implementation with Web3J calls to
eth1_
namespace and direct JSON-RPC calls forengine_
namespace.Documentation
documentation
label to this PR if updates are required.Changelog