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

chore: add bootnodes,external-ip cli to bridge to support hive test #1009

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

KolbyML
Copy link
Member

@KolbyML KolbyML commented Oct 25, 2023

What was wrong?

this is required for the rewrite of the hive bridge test I am writing

Without the timeout bridge closes without the finishing uTP transfers.
Without being able to set bootnodes I can't test this as it wouldn't be valid
Without being able to set external ip the trin node can't be connected to from the other docker containers

below is the chat history of the problem we are trying to solve.
ethereum/portal-hive#110 (comment)
ethereum/portal-hive#110 (comment)
ethereum/portal-hive#110 (comment)

this PR is required to make the sister pr on portal hive ethereum/portal-hive#115

How was it fixed?

By adding 2 params required to write the test

@KolbyML KolbyML self-assigned this Oct 25, 2023
@KolbyML KolbyML force-pushed the update-bridge-to-set-bootnotes branch from 007adc9 to f154a0a Compare October 29, 2023 01:44
@KolbyML KolbyML force-pushed the update-bridge-to-set-bootnotes branch from f154a0a to e72acc6 Compare October 29, 2023 03:22
@KolbyML KolbyML changed the title chore: add bootnodes cli to bridge chore: add bootnodes,external-ip cli to bridge + sleep to support hive test Oct 29, 2023
@KolbyML KolbyML marked this pull request as ready for review October 29, 2023 03:27
@@ -76,6 +76,10 @@ impl Bridge {
BridgeMode::Latest => self.launch_latest().await,
_ => self.launch_backfill().await,
}
// let test finish uTP transfer before shutting down gossip nodes
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious, but wouldn't this be a problem for all bridge mode branches?

Anyway, I do think the need for this timeout goes away after #1010 since the bridge is updated to use the portal_*TraceGossip endpoint, which implicitly waits for all utp transfers to finish before responding. If you agree, then I'd advocate for removing this sleep since it would be unnecessary

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess it would be I was just thinking from the view point of getting my test working.

Will the bridge not always use portal_*TraceGossip?

I will remove this sleep if that is the case then

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, makes sense. As of #1010, the bridge will always use portal_*TraceGossip for both beacon & history content. Idk if it'll be like this forever, but I can't think of a good enough reason to suggest it might change, especially since consuming the gossip trace is fairly important for the bridge metrics.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok I just removed the sleep

@KolbyML KolbyML changed the title chore: add bootnodes,external-ip cli to bridge + sleep to support hive test chore: add bootnodes,external-ip cli to bridge to support hive test Oct 30, 2023
Copy link
Collaborator

@njgheorghita njgheorghita left a comment

Choose a reason for hiding this comment

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

🚢

@njgheorghita
Copy link
Collaborator

Well, I guess you're kinda blocked now by #1010 ... but if you don't mind, I'll leave that up for the rest of the day in case anyone else wants to 👀. And I'll get it merged early in the morning so you'll have the change (that removed the need for the sleep) available

@KolbyML KolbyML merged commit 957e874 into ethereum:master Oct 31, 2023
1 check 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.

2 participants