configure relayer engine for tilt
This commit is contained in:
parent
e3c4ea0088
commit
c4282f38cd
|
@ -1,7 +1,16 @@
|
|||
{
|
||||
"mode": "BOTH",
|
||||
"storeType": "InMemory",
|
||||
"storeType": "Redis",
|
||||
"logLevel": "debug",
|
||||
"redis": {
|
||||
"port": 6379,
|
||||
"host": "localhost"
|
||||
},
|
||||
"defaultWorkflowOptions": {
|
||||
"maxRetries": 3
|
||||
},
|
||||
"wormholeRpc": "https://wormhole-v2-testnet-api.certus.one",
|
||||
"numGuardians": 1,
|
||||
"readinessPort": 2000,
|
||||
"supportedChains": [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"privateKeys": {
|
||||
"6": ["0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"],
|
||||
"14": ["0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"]
|
||||
"2": ["0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"],
|
||||
"4": ["0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,7 @@
|
|||
"shouldRest": false,
|
||||
"logWatcherSleepMs": 300000,
|
||||
"supportedChains": {
|
||||
"2": {
|
||||
"relayerAddress": "0xdC78afe9cFDe0576Ff236667DC8c380615c24Ca9"
|
||||
},
|
||||
"4": {
|
||||
"relayerAddress": "0xdC78afe9cFDe0576Ff236667DC8c380615c24Ca9"
|
||||
}
|
||||
"2": {},
|
||||
"4": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import * as ethers from "ethers"
|
|||
import { Implementation__factory } from "@certusone/wormhole-sdk/lib/cjs/ethers-contracts"
|
||||
import * as grpcWebNodeHttpTransport from "@improbable-eng/grpc-web-node-http-transport"
|
||||
import { retryAsyncUntilDefined } from "ts-retry/lib/cjs/retry"
|
||||
import { hexToNativeStringAlgorand } from "@certusone/wormhole-sdk/lib/cjs/algorand"
|
||||
|
||||
const wormholeRpc = "https://wormhole-v2-testnet-api.certus.one"
|
||||
|
||||
|
@ -380,7 +381,7 @@ export class GenericRelayerPlugin implements Plugin<WorkflowPayload> {
|
|||
await this.addEntryToPendingQueue(hash, newEntry, db)
|
||||
|
||||
// do not create workflow until we have collected all VAAs
|
||||
return
|
||||
return
|
||||
}
|
||||
|
||||
async addEntryToPendingQueue(hash: string, newEntry: Entry, db: StagingAreaKeyLock) {
|
||||
|
@ -427,11 +428,14 @@ export class GenericRelayerPlugin implements Plugin<WorkflowPayload> {
|
|||
const coreWHContract = config.coreContract!
|
||||
const filter = coreWHContract.filters.LogMessagePublished(config.relayerAddress)
|
||||
|
||||
this.logger.info(`Relayer address: ${config.relayerAddress}`)
|
||||
console.log(JSON.stringify(coreWHContract.provider, undefined, 2))
|
||||
|
||||
const blockNumber = await coreWHContract.provider.getBlockNumber()
|
||||
for (let i = 0; i < 20; ++i) {
|
||||
let paginatedLogs
|
||||
if (i === 0) {
|
||||
paginatedLogs = await coreWHContract.queryFilter(filter, -20)
|
||||
paginatedLogs = await coreWHContract.queryFilter(filter, -30)
|
||||
} else {
|
||||
paginatedLogs = await coreWHContract.queryFilter(
|
||||
filter,
|
||||
|
@ -439,6 +443,7 @@ export class GenericRelayerPlugin implements Plugin<WorkflowPayload> {
|
|||
blockNumber - i * 20
|
||||
)
|
||||
}
|
||||
console.log(paginatedLogs)
|
||||
const log = paginatedLogs.find(
|
||||
(log) => log.args.sequence.toString() === sequence.toString()
|
||||
)
|
||||
|
@ -449,7 +454,8 @@ export class GenericRelayerPlugin implements Plugin<WorkflowPayload> {
|
|||
try {
|
||||
return await retryAsyncUntilDefined(
|
||||
async () => {
|
||||
const paginatedLogs = await coreWHContract.queryFilter(filter, -20)
|
||||
const paginatedLogs = await coreWHContract.queryFilter(filter, -50)
|
||||
console.log(paginatedLogs)
|
||||
const log = paginatedLogs.find(
|
||||
(log) => log.args.sequence.toString() === sequence.toString()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue