-
Notifications
You must be signed in to change notification settings - Fork 302
refactor(governance/xc_admin): add more logs on relayer #2324
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,6 @@ import { | |
| Connection, | ||
| Keypair, | ||
| PublicKey, | ||
| SystemProgram, | ||
| TransactionInstruction, | ||
| } from "@solana/web3.js"; | ||
| import * as fs from "fs"; | ||
|
|
@@ -32,9 +31,6 @@ import { | |
| REMOTE_EXECUTOR_ADDRESS, | ||
| envOrErr, | ||
| PriceStoreMultisigInstruction, | ||
| findDetermisticPublisherBufferAddress, | ||
| PRICE_STORE_BUFFER_SPACE, | ||
| PRICE_STORE_PROGRAM_ID, | ||
| createDeterministicPublisherBufferAccountInstruction, | ||
| } from "@pythnetwork/xc-admin-common"; | ||
|
|
||
|
|
@@ -101,16 +97,19 @@ async function run() { | |
| ) { | ||
| const preInstructions: TransactionInstruction[] = []; | ||
|
|
||
| console.log(`Found VAA ${lastSequenceNumber}, relaying ...`); | ||
| console.log(`Found VAA ${lastSequenceNumber}, relaying vaa ...`); | ||
|
|
||
| await postVaaSolana( | ||
| provider.connection, | ||
| signTransactionFactory(KEYPAIR), | ||
| WORMHOLE_ADDRESS[CLUSTER]!, | ||
| provider.wallet.publicKey, | ||
| Buffer.from(response.vaaBytes, "base64"), | ||
| { commitment: COMMITMENT } | ||
| { commitment: COMMITMENT, maxRetries: 10 } | ||
|
||
| ); | ||
|
|
||
| console.log(`VAA ${lastSequenceNumber} relayed. executing ...`); | ||
|
|
||
| let extraAccountMetas: AccountMeta[] = [ | ||
| { pubkey: executorKey, isSigner: false, isWritable: true }, | ||
| ]; | ||
|
|
@@ -128,6 +127,10 @@ async function run() { | |
| ); | ||
|
|
||
| const parsedInstruction = multisigParser.parseInstruction(ix); | ||
|
|
||
| console.log("Parsed instruction:"); | ||
| console.dir(parsedInstruction, { depth: null }); | ||
|
|
||
| if ( | ||
| parsedInstruction instanceof PythMultisigInstruction && | ||
| parsedInstruction.name == "addProduct" | ||
|
|
@@ -200,7 +203,7 @@ async function run() { | |
| .postInstructions([ | ||
| ComputeBudgetProgram.setComputeUnitLimit({ units: 1000000 }), | ||
| ]) | ||
| .rpc({ skipPreflight: true }); | ||
| .rpc({ skipPreflight: false }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we get better logs with simulation. Why was it true before? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I normally got the logs from explorer, but it might be nicer to get them from Grafana (like this would enable) |
||
| } catch (e) { | ||
| if (SKIP_FAILED_REMOTE_INSTRUCTIONS) { | ||
| console.error(e); | ||
|
|
||
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.
Unused imports