Skip to content

Conversation

@ali-behjati
Copy link
Collaborator

No description provided.

@ali-behjati ali-behjati requested review from jayantk and thmzlt May 11, 2023 12:54
@vercel
Copy link

vercel bot commented May 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) Visit Preview May 17, 2023 5:48pm
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview May 17, 2023 5:48pm

mainnet: {
index: 3,
addresses: [
"0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5",
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this break when the guardian set changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah it will break. Hopefully by the next guardian set change we won't have this service running anymore 😅 But if we had this running we should let it accept both the old and the new. We can periodically check the source of truth for the guardian (the wormhole eth contract) but to have 0 downtime we still need to support transition.

Copy link
Contributor

@swimricky swimricky May 11, 2023

Choose a reason for hiding this comment

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

you should be able to use the grpc call to get the current guardian set
something similar to how these work - https://github.com/wormhole-foundation/wormhole/tree/main/sdk/js/src/rpc

import { publicrpc } from "@certusone/wormhole-sdk-proto-web";
const { GrpcWebImpl, PublicRPCServiceClientImpl } = publicrpc;
import { NodeHttpTransport } from "@improbable-eng/grpc-web-node-http-transport";

// need to use the NodeHttpTransport when running this in a node environment
export async function getGuardianSet(
  host: string,
  extraGrpcOpts = {transport: NodeHttpTransport()}
) {
  const rpc = new GrpcWebImpl(host, extraGrpcOpts);
  const api = new PublicRPCServiceClientImpl(rpc);
  return await api.GetCurrentGuardianSet({});
}

@ali-behjati ali-behjati force-pushed the price-service/improve-vaa-validation branch from 204ce92 to 8e1e860 Compare May 17, 2023 17:48
@ali-behjati ali-behjati merged commit e283b15 into main May 17, 2023
@ali-behjati ali-behjati deleted the price-service/improve-vaa-validation branch May 17, 2023 18:20
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.

5 participants