Skip to content
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

ci: testnet prod sync #4667

Merged
merged 70 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
dfc2a84
Sdk wrapper 2.1.0 alpha.0 (#4560)
just-a-node Jun 21, 2023
ab8f1c1
Sdk options pattern (#4558)
just-a-node Jun 21, 2023
de9cf42
feat: add confirmation blocks msg poller (#4562)
preethamr Jun 21, 2023
d7849c5
Alchemix Next tokens (#4510)
Hesnicewithit Jun 21, 2023
e3cd557
feat: admin connector wip
rhlsthrm Jun 21, 2023
b8879d1
ci: commitlint
rhlsthrm Jun 21, 2023
7465e35
fix: review updates
rhlsthrm Jun 22, 2023
12b4da3
chore: build artifacts
rhlsthrm Jun 22, 2023
e7c1a33
feat: structure new tests
rhlsthrm Jun 22, 2023
f2f2a03
fix: change test to check that root is able to be propagated
rhlsthrm Jun 22, 2023
c199519
fix: sanity check; comments
LayneHaber Jun 22, 2023
ffb76a8
fix: cleaner test utilities; add fuzzing; add proper asserts
LayneHaber Jun 22, 2023
2150775
feat: move fork tests to fork dir and ignore in ci
LayneHaber Jun 23, 2023
c50d5ed
fix: stronger assertions in units
LayneHaber Jun 23, 2023
f6e6a3e
feat: add deployment
LayneHaber Jun 23, 2023
ecce107
Tf vars (#4531)
just-a-node Jun 23, 2023
0871942
feat(ladao-xocolatl): add xoc to prod allowlisting
0xdcota Jun 9, 2023
90c30f2
fix(ladao-xocolatl): add local and adopted to all domains for xoc
0xdcota Jun 10, 2023
64b635f
chore(ladao-xocolatl): update xoc config with local and adopted equal…
0xdcota Jun 12, 2023
bb3657a
Sdk server cors (#4576)
just-a-node Jun 23, 2023
9af1a92
feat: bump sdk-wrapper version
just-a-node Jun 23, 2023
097530e
Merge pull request #4580 from connext/sdk-v.2.1.0-alpha.1
LayneHaber Jun 23, 2023
c79411d
ci: publish sdk from sdk-wrapper (#4588)
just-a-node Jun 26, 2023
dfa8ee2
Sdk wrapper publish (#4589)
just-a-node Jun 26, 2023
14c25c3
ci: commitlint (#4590)
just-a-node Jun 27, 2023
82636d3
Merge branch 'testnet-prod'
rhlsthrm Jun 27, 2023
44163b8
Merge branch 'testnet-prod'
rhlsthrm Jun 27, 2023
50e7bd8
fix: 4574 carto graph query errors (#4599)
liu-zhipeng Jun 27, 2023
890be10
feat: hardhat tasks to add + enroll connector
LayneHaber Jun 27, 2023
17874db
chore: rebuild
LayneHaber Jun 27, 2023
b403bdb
feat: deploy admin connector
LayneHaber Jun 27, 2023
93ebed5
fix: temporarily prevent messaging init from running
LayneHaber Jun 27, 2023
cd102bb
fix: spacing
LayneHaber Jun 27, 2023
6dc8610
Merge branch 'main' into 4564-create-admin-connector-to-receive-bnb-c…
LayneHaber Jun 27, 2023
523dfca
feat: deploy admin hub connector
LayneHaber Jun 27, 2023
fde2ff9
chore: export deployment
LayneHaber Jun 27, 2023
65fd470
fix: simplify inputs
LayneHaber Jun 28, 2023
3253a0a
4254 slippage (#4542)
prathmeshkhandelwal1 Jun 28, 2023
1193bfd
fix: hard exit on mq disruption (#4600)
Jun 28, 2023
2435602
ci: add sdk-core to publish step
just-a-node Jun 28, 2023
7931fea
build: bump sdk-core version
just-a-node Jun 28, 2023
9ff23fb
build: bump sdk version
just-a-node Jun 28, 2023
d63aaa8
Merge pull request #4608 from connext/sdk-v2.1.0-alpha.3
LayneHaber Jun 28, 2023
96df6d9
Merge pull request #4569 from connext/4564-create-admin-connector-to-…
LayneHaber Jun 28, 2023
a6d303b
Merge pull request Sdk wrapper bn conversion (#4604)
just-a-node Jun 28, 2023
8853f32
Merge pull request #4457 from La-DAO/feat/add-ladao-xocolatl-to-prod-…
LayneHaber Jun 28, 2023
fb339d1
build: bump sdk version (#4610)
just-a-node Jun 29, 2023
6dcbe7a
Chain abstraction v1.0.2 alpha.20 (#4624)
just-a-node Jun 30, 2023
16febd9
ci: commitlint (#4625)
just-a-node Jun 30, 2023
d161e36
build: sdk stable latest (#4620)
just-a-node Jun 30, 2023
89f201d
feat: add fitler by domain getTransfers() (#4615)
sanchaymittal Jul 3, 2023
f719524
chore: remove unused parts (#4380)
wanglonghong Jul 4, 2023
735ad08
chore: slow down lighthouse (#4630)
LayneHaber Jul 5, 2023
a6fb2fd
ci: add mainnet ops (#4636)
wanglonghong Jul 5, 2023
cb859b9
fix: add pagination on message status check
preethamr Jul 5, 2023
e4d4559
fix: increase page size
preethamr Jul 6, 2023
c846ca6
Merge pull request #4643 from connext/4621-carto-not-updating-message…
preethamr Jul 7, 2023
ae066bb
Merge branch 'testnet-prod' into main
preethamr Jul 7, 2023
614782b
feat: add ability to search by execute and reconcile hash (#4653)
Jul 7, 2023
6fd72f7
add ecr lifecycle policy
carlomazzaferro Jul 7, 2023
7d1ec45
fix: expire images
carlomazzaferro Jul 7, 2023
0f0b46b
Merge branch 'fix/remove-old-images' of https://github.com/connext/nx…
carlomazzaferro Jul 7, 2023
5d16212
Merge pull request #4662 from connext/fix/remove-old-images
carlomazzaferro Jul 7, 2023
99852d4
Sdk server mainnet ops (#4652)
just-a-node Jul 7, 2023
1fc8a52
fix: commitlint
rhlsthrm Jul 7, 2023
8c79eaf
chore: add new excluded address
rhlsthrm Jul 7, 2023
b4eccab
fix: historical price poller check to timestamp (#4664)
liu-zhipeng Jul 7, 2023
7a9f5c8
Merge pull request #4663 from connext/4654-sequencer-add-supported-co…
preethamr Jul 7, 2023
47d43c7
chore: exempt satellite on mumbai
LayneHaber Jul 7, 2023
76f8c3a
Merge pull request #4669 from connext/60-exempt-satellite
LayneHaber Jul 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

## Connext Architecture

The Connext architecture can be seen as a layered system, as follows:
The Connext architecture can be seen as a layered system, as follows.

| Layer | Protocol/Stakeholders |
| -------------------------------- | -------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion ops/mainnet/prod/backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ module "sdk-server" {
ingress_cdir_blocks = ["0.0.0.0/0"]
ingress_ipv6_cdir_blocks = []
service_security_groups = flatten([module.network.allow_all_sg, module.network.ecs_task_sg])
cert_arn = var.certificate_arn_testnet
cert_arn = var.certificate_arn
container_env_vars = local.sdk_server_env_vars
domain = var.domain
}
Expand Down
2 changes: 1 addition & 1 deletion ops/mainnet/prod/core/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ module "lighthouse_propagate_cron" {
environment = var.environment
stage = var.stage
container_env_vars = merge(local.lighthouse_env_vars, { LIGHTHOUSE_SERVICE = "propagate" })
memory_size = 2048
schedule_expression = "rate(120 minutes)"
memory_size = 2048
}

module "lighthouse_sendoutboundroot_cron" {
Expand Down
25 changes: 25 additions & 0 deletions ops/modules/ecr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,31 @@ resource "aws_ecr_repository" "name" {
name = each.value
}

resource "aws_ecr_lifecycle_policy" "remove_old_images" {
for_each = aws_ecr_repository.name
repository = each.value.name

policy = <<EOF
{
"rules": [
{
"rulePriority": 1,
"description": "Expire images older than 20 days",
"selection": {
"tagStatus": "any",
"countType": "sinceImagePushed",
"countUnit": "days",
"countNumber": 20
},
"action": {
"type": "expire"
}
}
]
}
EOF
}


resource "aws_ecr_replication_configuration" "this" {
replication_configuration {
Expand Down
4 changes: 2 additions & 2 deletions ops/testnet/prod/core/config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ locals {
}
"1735353714" = {
providers = ["https://eth-goerli.blastapi.io/${var.blast_key}", "https://rpc.ankr.com/eth_goerli"]
excludeListFromRelayerFee = ["0x79D5007F9782eE0407DB4C7a9fC6AE030586afac"]
excludeListFromRelayerFee = ["0x79D5007F9782eE0407DB4C7a9fC6AE030586afac", "0xc8D125853346a389A8a68390dd23D719c08BF8F8"]
}
"9991" = {
providers = ["https://rpc.ankr.com/polygon_mumbai", "https://polygon-testnet.blastapi.io/${var.blast_key}"]
excludeListFromRelayerFee = ["0x6c461C0296eBE3715820F1Cbde856219e06ac3B8"]
excludeListFromRelayerFee = ["0x6c461C0296eBE3715820F1Cbde856219e06ac3B8", "0x5Ee7Acd9E57f81a08d361b3Dc516f30964601068"]
}
"1734439522" = {
providers = ["https://arb-goerli.g.alchemy.com/v2/${var.arbgoerli_alchemy_key_0}", "https://goerli-rollup.arbitrum.io/rpc"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,29 @@ export const updateMessageStatus = async () => {
const { requestContext, methodContext } = createLoggingContext(updateMessageStatus.name);

for (const domain of domains) {
const limit = 100;
logger.debug("Updating message status", requestContext, methodContext, { domain, limit });
const pendingTransfersByMessageStatus = await database.getPendingTransfersByMessageStatus(domain, 0, limit);
const updatedTransfers = await Promise.all(
pendingTransfersByMessageStatus.map(async (transfer) => {
const messageStatus = await getMessageStatus(transfer);
const _transfer = transfer;
if (_transfer.origin) _transfer.origin!.messageStatus = messageStatus;
return _transfer;
}),
);
const limit = 1000;
let end = false;
let offset = 0;
while (!end) {
logger.debug("Updating message status", requestContext, methodContext, { domain, offset, limit });
const pendingTransfersByMessageStatus = await database.getPendingTransfersByMessageStatus(domain, offset, limit);
const updatedTransfers = await Promise.all(
pendingTransfersByMessageStatus.map(async (transfer) => {
const messageStatus = await getMessageStatus(transfer);
const _transfer = transfer;
if (_transfer.origin) _transfer.origin!.messageStatus = messageStatus;
return _transfer;
}),
);

await database.saveTransfers(updatedTransfers);
await database.saveTransfers(updatedTransfers);
offset += pendingTransfersByMessageStatus.length;
if (pendingTransfersByMessageStatus.length < limit) {
end = true;
break;
}
}
logger.debug("Updated message status for domain", requestContext, methodContext, { domain });
}
};

Expand Down
62 changes: 32 additions & 30 deletions packages/agents/cartographer/poller/src/lib/operations/prices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,41 +92,43 @@ export const updateHistoricAssetPrices = async () => {

const latestTimestamp =
(await database.getCheckPoint("asset_price_timestamp_" + canonicalDomain)) || ASSET_PRICE_START_TIMESTAMP;
const toTimestamp = latestTimestamp + 90 * 24 * 3600;
const toTimestamp = Math.min(latestTimestamp + 90 * 24 * 3600, getNtpTimeSeconds());

for (const asset of assetsOnCanonical) {
let response: any;
try {
response = await axiosGet(`https://api.coingecko.com/api/v3/coins/${asset.coingeckoId}/market_chart/range`, {
params: { from: latestTimestamp, to: toTimestamp, vs_currency: "usd" },
});
if (response && response.data) {
logger.debug("Got historical prices from Coingecko API", requestContext, methodContext, {
coingeckoId: asset.coingeckoId,
from: latestTimestamp,
to: toTimestamp,
length: response.data.prices.length,
if (latestTimestamp < toTimestamp) {
for (const asset of assetsOnCanonical) {
let response: any;
try {
response = await axiosGet(`https://api.coingecko.com/api/v3/coins/${asset.coingeckoId}/market_chart/range`, {
params: { from: latestTimestamp, to: toTimestamp, vs_currency: "usd" },
});
if (response && response.data) {
logger.debug("Got historical prices from Coingecko API", requestContext, methodContext, {
coingeckoId: asset.coingeckoId,
from: latestTimestamp,
to: toTimestamp,
length: response.data.prices.length,
});

const prices = response.data.prices as unknown as [number, number][];
const assetPrices: AssetPrice[] = prices.map(([timestamp, price]) => {
return {
canonicalId: asset.canonicalId,
canonicalDomain: asset.canonicalDomain,
timestamp: Math.floor(timestamp / 1000),
price: price,
};
});
const prices = response.data.prices as unknown as [number, number][];
const assetPrices: AssetPrice[] = prices.map(([timestamp, price]) => {
return {
canonicalId: asset.canonicalId,
canonicalDomain: asset.canonicalDomain,
timestamp: Math.floor(timestamp / 1000),
price: price,
};
});

await database.saveAssetPrice(assetPrices);
await database.saveCheckPoint("asset_price_timestamp_" + canonicalDomain, toTimestamp);
logger.debug("Saved Asset Prices", requestContext, methodContext, { assetPrices });
await database.saveAssetPrice(assetPrices);
await database.saveCheckPoint("asset_price_timestamp_" + canonicalDomain, toTimestamp);
logger.debug("Saved Asset Prices", requestContext, methodContext, { assetPrices });
}
} catch (e: unknown) {
logger.debug("Coingecko API not responding correctly", requestContext, methodContext, {
res: response ? (response?.data ? response.data : response) : undefined,
error: jsonifyError(e as NxtpError),
});
}
} catch (e: unknown) {
logger.debug("Coingecko API not responding correctly", requestContext, methodContext, {
res: response ? (response?.data ? response.data : response) : undefined,
error: jsonifyError(e as NxtpError),
});
}
}
};
2 changes: 1 addition & 1 deletion packages/agents/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Next Release

## v2.1.0-alpha.2
## v2.1.1-alpha.0

- Add filtering by domain to getTransfers

Expand Down
2 changes: 2 additions & 0 deletions packages/agents/sdk/src/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,8 @@ export const SdkGetTransfersParamsSchema = Type.Optional(
errorStatus: Type.Optional(XTransferErrorStatus),
transferId: Type.Optional(Type.String()),
transactionHash: Type.Optional(Type.String()),
executeTransactionHash: Type.Optional(Type.String()),
reconcileTransactionHash: Type.Optional(Type.String()),
xcallCaller: Type.Optional(Type.String()),
range: Type.Optional(TRange),
}),
Expand Down
14 changes: 13 additions & 1 deletion packages/agents/sdk/src/sdkUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ export class SdkUtils extends SdkShared {
errorStatus?: XTransferErrorStatus;
transferId?: string;
transactionHash?: string;
executeTransactionHash?: string;
reconcileTransactionHash?: string;
xcallCaller?: string;
originDomain?: string;
destinationDomain?: string;
Expand All @@ -230,6 +232,8 @@ export class SdkUtils extends SdkShared {
errorStatus,
originDomain,
destinationDomain,
executeTransactionHash,
reconcileTransactionHash,
} = params ?? {};

const userIdentifier = userAddress ? `xcall_tx_origin=eq.${userAddress.toLowerCase()}&` : "";
Expand All @@ -243,6 +247,12 @@ export class SdkUtils extends SdkShared {
const xcallCallerIdentifier = xcallCaller ? `xcall_caller=eq.${xcallCaller.toLowerCase()}&` : "";
const originDomainIdentifier = originDomain ? `origin_domain.in.(${originDomain})&` : "";
const destinationDomainIdentifier = destinationDomain ? `destination_domain.in.(${destinationDomain})&` : "";
const executeTransactionHashIdentifier = executeTransactionHash
? `execute_transaction_hash=eq.${executeTransactionHash.toLowerCase()}&`
: "";
const reconcileTransactionHashIdentifier = reconcileTransactionHash
? `reconcile_transaction_hash=eq.${reconcileTransactionHash.toLowerCase()}&`
: "";

const searchIdentifier =
userIdentifier +
Expand All @@ -253,7 +263,9 @@ export class SdkUtils extends SdkShared {
transactionHashIdentifier +
xcallCallerIdentifier +
originDomainIdentifier +
destinationDomainIdentifier;
destinationDomainIdentifier +
executeTransactionHashIdentifier +
reconcileTransactionHashIdentifier;

const limit = range?.limit ? range.limit : 10;
const offset = range?.offset ? range.offset : 0;
Expand Down