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

simulators/ethereum/engine/cancun: Maintain devp2p client peering #1052

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

spencer-tb
Copy link
Contributor

Description

@marioevz marioevz self-requested a review March 14, 2024 15:35
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Some comments, thanks!

@@ -27,6 +27,7 @@ import (
type CancunTestContext struct {
Copy link
Member

Choose a reason for hiding this comment

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

Could we take this opportunity to rename this to something more generic, like TestContext.

And also create a func NewTestContext() *TestContext { that performs all init operations required such as the t.DevP2PConnections = make(map[uint64]*devp2p.Conn) that we do in line 782.

Copy link
Member

Choose a reason for hiding this comment

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

We could also create a func (t *TestContext) Close() error { that we could defer t.Close() after we call NewTestContext() when creating the context to do some proper cleanup such as the closing of the connections that are still open in t.DevP2PConnections.

Copy link
Contributor Author

@spencer-tb spencer-tb Mar 15, 2024

Choose a reason for hiding this comment

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

Very happy to extend to this!

My only rebutle is that we'd be adding the extra initialization steps for all the CancunBaseSpec tests, where its only required for 2 of them.

Maybe we have a generic TestContext and additionally a specific DevP2PTestContext, the latter having the init steps you mentioned. Where we only init these steps for the DevP2P tests?

(edited) What I wrote above didn't make sense, will implement your suggestions.

Copy link
Contributor Author

@spencer-tb spencer-tb Mar 26, 2024

Choose a reason for hiding this comment

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

I added your suggestions in: 25ffdf9

Let me know what you think :)

@spencer-tb spencer-tb force-pushed the simulators/ethereum/engine/cancun branch from 5178de4 to 25ffdf9 Compare March 26, 2024 09:10
@spencer-tb spencer-tb requested a review from marioevz March 26, 2024 09:13
@fjl fjl merged commit 6ba6f42 into ethereum:master Jun 10, 2024
6 checks passed
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