Skip to content

Commit

Permalink
Merge remote-tracking branch 'hl/main' into pb/zksync
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalaji committed Dec 18, 2024
2 parents dc5bf76 + edc4e68 commit a2df21c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
15 changes: 9 additions & 6 deletions rust/main/agents/relayer/src/msg/op_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ impl OpQueue {
/// it's very likely that its status has just changed, so this forces the caller to consider the new status
#[instrument(skip(self), ret, fields(queue_label=%self.queue_metrics_label), level = "trace")]
pub async fn push(&self, mut op: QueueOperation, new_status: Option<PendingOperationStatus>) {
op.set_status_and_update_metrics(
new_status,
Arc::new(self.get_operation_metric(op.as_ref())),
);
let new_metric = Arc::new(self.get_new_operation_metric(op.as_ref(), new_status.clone()));
op.set_status_and_update_metrics(new_status, new_metric);

self.queue.lock().await.push(Reverse(op));
}
Expand Down Expand Up @@ -99,12 +97,17 @@ impl OpQueue {
}

/// Get the metric associated with this operation
fn get_operation_metric(&self, operation: &dyn PendingOperation) -> IntGauge {
fn get_new_operation_metric(
&self,
operation: &dyn PendingOperation,
new_status: Option<PendingOperationStatus>,
) -> IntGauge {
let (destination, app_context) = operation.get_operation_labels();
let new_metric_status = new_status.unwrap_or(operation.status());
self.metrics.with_label_values(&[
&destination,
&self.queue_metrics_label,
&operation.status().to_string(),
&new_metric_status.to_string(),
&app_context,
])
}
Expand Down
6 changes: 3 additions & 3 deletions typescript/infra/config/environments/mainnet3/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ const hyperlane: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '16d5869-20241217-160358',
tag: '7c0c967-20241218-173053',
},
blacklist,
gasPaymentEnforcement: gasPaymentEnforcement,
Expand All @@ -566,7 +566,7 @@ const hyperlane: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '05e90bc-20241216-180035',
tag: 'd84d8da-20241217-172447',
},
resources: scraperResources,
},
Expand All @@ -581,7 +581,7 @@ const releaseCandidate: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '16d5869-20241217-160358',
tag: '7c0c967-20241218-173053',
},
blacklist,
// We're temporarily (ab)using the RC relayer as a way to increase
Expand Down
6 changes: 6 additions & 0 deletions typescript/infra/config/environments/mainnet3/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export const chainMetadataOverrides: ChainMap<Partial<ChainMetadata>> = {
// gasPrice: 20 * 10 ** 9, // 20 gwei
// },
// },
// degenchain: {
// transactionOverrides: {
// maxFeePerGas: 100 * 10 ** 9, // 100 gwei
// maxPriorityFeePerGas: 10 * 10 ** 9, // 10 gwei
// },
// },
};

export const getRegistry = async (
Expand Down
8 changes: 4 additions & 4 deletions typescript/infra/config/environments/mainnet3/funding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const keyFunderConfig: KeyFunderConfig<
ink: '0.05',
kaia: '250',
kroma: '0.05',
linea: '0.2',
linea: '1',
lisk: '0.05',
lukso: '20',
lumia: '1',
Expand All @@ -89,12 +89,12 @@ export const keyFunderConfig: KeyFunderConfig<
mint: '0.05',
mode: '0.2',
molten: '3',
moonbeam: '5',
moonbeam: '100',
morph: '0.05',
oortmainnet: '2000',
optimism: '0.5',
orderly: '0.05',
polygon: '20',
polygon: '40',
polygonzkevm: '0.5',
polynomialfi: '0.05',
prom: '5',
Expand All @@ -119,7 +119,7 @@ export const keyFunderConfig: KeyFunderConfig<
taiko: '0.2',
tangle: '2',
telos: '100',
treasure: '100',
treasure: '800',
unichain: '0.05',
// temporarily low until we're able to fund more
vana: '0.001',
Expand Down
2 changes: 1 addition & 1 deletion typescript/infra/config/environments/mainnet3/owners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const safes: ChainMap<Address> = {
export const icaOwnerChain = 'ethereum';

// Found by running:
// yarn tsx ./scripts/get-owner-ica.ts -e mainnet3 --ownerChain ethereum --destinationChains <chain1> <chain2> ...
// yarn tsx ./scripts/keys/get-owner-ica.ts -e mainnet3 --ownerChain ethereum --destinationChains <chain1> <chain2> ...
export const icas: Partial<
Record<(typeof supportedChainNames)[number], Address>
> = {
Expand Down
8 changes: 4 additions & 4 deletions typescript/infra/config/environments/testnet4/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig<
alephzeroevmtestnet: true,
alfajores: true,
arbitrumsepolia: true,
arcadiatestnet2: true,
arcadiatestnet2: false,
basesepolia: true,
berabartio: true,
bsctestnet: true,
Expand Down Expand Up @@ -219,7 +219,7 @@ const hyperlane: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '16d5869-20241217-160358',
tag: '7c0c967-20241218-173053',
},
blacklist: [...releaseCandidateHelloworldMatchingList, ...relayBlacklist],
gasPaymentEnforcement,
Expand Down Expand Up @@ -250,7 +250,7 @@ const hyperlane: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '4b280cd-20241206-130519',
tag: 'd84d8da-20241217-172447',
},
resources: scraperResources,
},
Expand All @@ -265,7 +265,7 @@ const releaseCandidate: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '16d5869-20241217-160358',
tag: '7c0c967-20241218-173053',
},
whitelist: [...releaseCandidateHelloworldMatchingList],
blacklist: relayBlacklist,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async function getTokenBridgedBalance(

const adapter = token.getHypAdapter(warpCore.multiProvider);
const bridgedSupply = await adapter.getBridgedSupply();
if (!bridgedSupply) {
if (bridgedSupply === undefined) {
logger.warn('Bridged supply not found for token', token);
return undefined;
}
Expand Down Expand Up @@ -273,7 +273,7 @@ async function tryGetTokenPrice(
// We only get a price if the token defines a CoinGecko ID.
// This way we can ignore values of certain types of collateralized warp routes,
// e.g. Native warp routes on rollups that have been pre-funded.
let coinGeckoId = token.coinGeckoId;
const coinGeckoId = token.coinGeckoId;

if (!coinGeckoId) {
logger.warn('CoinGecko ID missing for token', token.symbol);
Expand Down

0 comments on commit a2df21c

Please sign in to comment.