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

adapt to teleporter v1.0.3 #373

Merged
merged 6 commits into from
Jul 19, 2024
Merged

adapt to teleporter v1.0.3 #373

merged 6 commits into from
Jul 19, 2024

Conversation

feuGeneA
Copy link
Contributor

Why this should be merged

How this works

How this was tested

How is this documented

@feuGeneA feuGeneA changed the title adapt to teleporter v1.0.2 adapt to teleporter v1.0.3 Jul 19, 2024
because the go.mod version string is assumed to be a github ref, eg to be
checked out during CI's e2e workflow, but currently we're using a reference
that was created by using `go get` with a branch name, which resolves to a
pseudo version in the go.mod file, which doesn't refer to any git ref in the
subnet-evm repo.
@feuGeneA feuGeneA marked this pull request as ready for review July 19, 2024 15:22
@feuGeneA feuGeneA requested a review from a team as a code owner July 19, 2024 15:22
@feuGeneA feuGeneA marked this pull request as draft July 19, 2024 15:25
geoff-vball
geoff-vball previously approved these changes Jul 19, 2024
sentTo := r.network.Network.Send(outMsg, vdrSet, r.sourceBlockchain.GetSubnetID(), subnets.NoOpAllower)
sentTo := r.network.Network.Send(
outMsg,
// TODO: consider whether we need to specify the other
Copy link
Collaborator

Choose a reason for hiding this comment

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

My understanding is that the other fields are used to specify the number of additional nodes to sample. Since we are making requests to specific nodes explicitly, I don't think additional sampling is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the input, removed the TODO in e0794af

Comment on lines 51 to 52
addrPort, err := i.client.GetNodeIP(ctx, i.options...)
return addrPort.Addr().String(), err
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's have InfoAPI continue to be a passthrough to InfoClient, and have GetNodeIP have the same return values as InfoClient's method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in 641e532

@geoff-vball
Copy link
Contributor

I made an issue for this here #376

@feuGeneA feuGeneA marked this pull request as ready for review July 19, 2024 16:27
@@ -47,7 +48,7 @@ func (i *InfoAPI) GetNodeID(ctx context.Context) (ids.NodeID, *signer.ProofOfPos
return i.client.GetNodeID(ctx, i.options...)
}

func (i *InfoAPI) GetNodeIP(ctx context.Context) (string, error) {
func (i *InfoAPI) GetNodeIP(ctx context.Context) (netip.AddrPort, error) {
Copy link
Contributor

@geoff-vball geoff-vball Jul 19, 2024

Choose a reason for hiding this comment

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

Are we able to change the name of this function, or is it part of an interface?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not part of an interface, but our InfoAPI type is written as an extension to InfoClient that embeds the rpc options in the object, rather than leaving it to the caller. As such, matching the InfoClient interface makes the code more readable.

What's the motivation for changing the function name?

Copy link
Contributor

Choose a reason for hiding this comment

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

The function is named GetNodeIP but we're returning both the IP and the port

Copy link
Collaborator

Choose a reason for hiding this comment

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

My preference would be to keep parity with the underlying client interface, even if the name could be improved. That greatly helps code discovery when referencing existing usages as examples.

Copy link
Contributor

@iansuvak iansuvak left a comment

Choose a reason for hiding this comment

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

Excited to have this merged and speed up the e2e tests!

@feuGeneA feuGeneA merged commit ec6a1c3 into main Jul 19, 2024
7 checks passed
@feuGeneA feuGeneA deleted the teleporter-v1.0.2 branch July 19, 2024 19:53
0xchainlover pushed a commit to avalabsorg/awm-relayer that referenced this pull request Aug 1, 2024
0xchainlover pushed a commit to avalabsorg/awm-relayer that referenced this pull request Aug 1, 2024
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.

4 participants