pyth-network / pyth-crosschain

Crosschain Pyth programs and utilities
https://pyth.network
Other
152 stars 206 forks source link

Price Pusher failed to execute message #1123

Closed 0xForerunner closed 1 year ago

0xForerunner commented 1 year ago

I'm running the Dockerfile public.ecr.aws/pyth-network/xc-price-pusher:v5.7.0 on injective and running into an error.

config:

{
  "grpc-endpoint": "https://testnet.chain.grpc-web.injective.network",
  "pyth-contract-address": "inj1z60tg0tekdzcasenhuuwq3htjcd5slmgf7gpez",
  "price-service-endpoint": "https://hermes-beta.pyth.network",
  "mnemonic-file": "./mnemonic",
  "price-config-file": "./price-config.testnet.sample.yaml",
  "network": "testnet"
}

and price-config

- alias: INJ/USD
  id: "0x2d9315a88f3019f8efa88dfe9c0f0843712da0bac814461e27733f6b83eb51b3"
  time_difference: 60
  price_deviation: 0.5
  confidence_ratio: 1
  early_update:
    time_difference: 30
    price_deviation: 0.5
    confidence_ratio: 0.1
- alias: USDC/USD
  id: "0x41f3625971ca2ed2263e78573fe5ce23e13d2558ed3f2e47ab0f84fb9e7ae722"
  time_difference: 60
  price_deviation: 1
  confidence_ratio: 1
  early_update:
    time_difference: 30
    price_deviation: 0.5
    confidence_ratio: 0.1
- alias: USDT/USD
  id: "0x1fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c1588"
  time_difference: 60
  price_deviation: 1
  confidence_ratio: 1
  early_update:
    time_difference: 30
    price_deviation: 0.5
    confidence_ratio: 0.1

I get this notice at the top (probably unrelated)

secp256k1 unavailable, reverting to browser version

and the error message

Error executing messages
Error: failed to execute message; message index: 0: Generic error: Querier contract error: codespace: wasm, code: 9: execute wasm contract failed [!injective!labs/wasmd@v0.40.0-inj/x/wasm/keeper/keeper.go:394] With gas wanted: '50000000' and gas used: '232359'
    at TxGrpcApi.<anonymous> (/home/node/price_pusher/node_modules/@injectivelabs/sdk-ts/dist/cjs/core/modules/tx/api/TxGrpcApi.js:109:61)
    at Generator.throw (<anonymous>)
    at rejected (/home/node/price_pusher/node_modules/@injectivelabs/sdk-ts/dist/cjs/core/modules/tx/api/TxGrpcApi.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'chain-error',
  code: -1,
  originalMessage: "Generic error: Querier contract error: codespace: wasm, code: 9: execute wasm contract failed [!injective!labs/wasmd@v0.40.0-inj/x/wasm/keeper/keeper.go:394] With gas wanted: '50000000' and gas used: '232359'",
  name: 'TransactionException',
  errorClass: 'TransactionException',
  context: '',
  contextModule: '',
  contextCode: 5
}

There isn't much information in the error message so I'm not really sure where to go from here.

0xForerunner commented 1 year ago

Ah classic I solved the problem right after posting. The issue was the pyth-contract-address. In the examples provided it uses the above address. but the correct one is inj18rlflp3735h25jmjx97d22c72sxk260amdjxlu. Easy fix. Probably worth updating the example. Thanks!