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

Prod <- Testnet prod Sync #5903

Merged
merged 8 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions ops/env/mainnet/core/secrets.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"infura_key": "ENC[AES256_GCM,data:CFseUllVNz5Hzc3f0ACMEXC8Vud+FpfXWSJNcNrcDWE=,iv:Gl4+q5taIn2amrgIh4didomw4vZBSYBFdgxSbGz4SAM=,tag:K5i2ZNDVKwo6UJ5iIJPiqA==,type:str]",
"graph_api_key": "ENC[AES256_GCM,data:P49Id+KJiffvtnB11Plr92aja0aj9na0v5XCWmbrcI4=,iv:Dte62MAGnvXVLaYD8id2wirAhklhBtpHMEROAjl3oOs=,tag:xkpef4z94QC4vVT5L7qOhA==,type:str]",
"admin_token_lighthouse_prover_subscriber": "ENC[AES256_GCM,data:tVQNVGxtNTu+qL0K+zsCRCg=,iv:DgwnsaSfjG4aN7zZuy4+84LEZe1qjLmRh0eK90xAdg0=,tag:mC0IWKW6drwX87dP0IvK3w==,type:str]",
"eng_safe_salt": "ENC[AES256_GCM,data:ubs06YvUrDu85g==,iv:iuWfdceLatX8Ng+n03nGOQnkNzxJxTbH4sN4/JM3A8M=,tag:dzO4GeJa53o8M78xT7J9dg==,type:str]",
"sops": {
"kms": [
{
Expand All @@ -46,10 +47,10 @@
"azure_kv": null,
"hc_vault": null,
"age": null,
"lastmodified": "2024-02-19T23:40:18Z",
"mac": "ENC[AES256_GCM,data:1qcT2O3dOTrCx+kJ9o7q89V9Vor8bv3nu3hmtTc2NfmO2MiU4BHLdC7iKmzF7pp6p86KRm/wqPGkF+hRQhSrKOuY/4Ft6txssNJaZLLAVtzLd0aGfZPzTdD1qm1JnphM86FtB1A9Zpzch1RS+dCU2tbljIjWHOT/Heknj2qnISg=,iv:wsIcGjK8FxCZxds1ANCPlIVCO4kl5I/qUaWDNtvD+Ic=,tag:qwI2QhCImy8eFUfjSL9ShQ==,type:str]",
"lastmodified": "2024-03-21T02:13:46Z",
"mac": "ENC[AES256_GCM,data:22ATjfRY1++KQkov/59z+dtxB8pkuxHK+kdUQ29JUNQmXKmN2ocK72v1klwOvS0LE4so6grDCi2pUhuF6Ph6vMzbl1FQnPnGclgWaC+qC7hNFK19tIEyg1MOI3p9iTKQ7qCAXJn6TQF3kLOWP9hCjllFGFpZV6dtrVMmIEOdgYg=,iv:K80uj9CLPWAXYjLkUSKjTfUxegwYsvq8uXa89v7XGCQ=,tag:y/zjXYSsdKduv2fIxjrPHg==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.7.3"
"version": "3.8.1"
}
}
6 changes: 5 additions & 1 deletion packages/adapters/database/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,11 @@ export const resetBackoffs = async (
const poolToUse = _pool ?? pool;
const backoff = 32;
await db
.update("transfers", { backoff, next_execution_timestamp: 0 }, { transfer_id: dc.isIn(transferIds) })
.update(
"transfers",
{ backoff, next_execution_timestamp: 0, error_status: null },
{ transfer_id: dc.isIn(transferIds) },
)
.run(poolToUse);
};

Expand Down
2 changes: 2 additions & 0 deletions packages/adapters/database/test/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1257,10 +1257,12 @@ describe("Database client", () => {
queryRes = await pool.query("SELECT * FROM transfers WHERE transfer_id = $1", [transfer1.transferId]);
expect(queryRes.rows[0].backoff).to.eq(32);
expect(queryRes.rows[0].next_execution_timestamp).to.eq(0);
expect(queryRes.rows[0].error_status).to.be.null;

queryRes = await pool.query("SELECT * FROM transfers WHERE transfer_id = $1", [transfer2.transferId]);
expect(queryRes.rows[0].backoff).to.eq(32);
expect(queryRes.rows[0].next_execution_timestamp).to.eq(0);
expect(queryRes.rows[0].error_status).to.be.null;

queryRes = await pool.query("SELECT * FROM transfers WHERE transfer_id = $1", [transfer3.transferId]);
expect(queryRes.rows[0].backoff).to.eq(64);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export const updateBackoffs = async (): Promise<void> => {
logger,
domains,
} = getContext();
const { requestContext, methodContext } = createLoggingContext("updateTransfers");
const { requestContext, methodContext } = createLoggingContext("updateBackoffs");
const subgraphRelayerFeeQueryMetaParams: Map<string, SubgraphQueryByTimestampMetaParams> = new Map();
const subgraphSlippageUpdatesQueryMetaParams: Map<string, SubgraphQueryByTimestampMetaParams> = new Map();
await Promise.all(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,8 @@ export const MAINNET_PRODUCTION_INIT_CONFIG: InitConfig = {
"0x32d63da9f776891843c90787cec54ada23abd4c2", // Ingag
"0xFaAB88015477493cFAa5DFAA533099C590876F21", // Paradox
"0x6fd84ba95525c4ccd218f2f16f646a08b4b0a598", // Dokia
"0x5f4E31F4F402E368743bF29954f80f7C4655EA68", // Amber
"0xc770eC66052fe77ff2eF9edF9558236e2D1C41Ef", // Dialectic
],
},
sequencers: {
Expand Down
7 changes: 6 additions & 1 deletion packages/deployments/contracts/src/cli/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,12 @@ export const initProtocol = async (protocol: ProtocolStack, apply: boolean, stag
desired: true,
// router admin submits (can be owner, assume router admin)
auth: [
{ method: "owner", eval: (ret: string) => ret.toLowerCase() === network.signerAddress },
{
method: "owner",
eval: (ret: string) => {
return ret.toLowerCase() === network.signerAddress.toLowerCase();
},
},
{ method: "queryRole", args: [network.signerAddress], eval: (ret) => ret === 1 },
],
read: { method: "getRouterApproval", args: [router] },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
type AddressBook = Record<"mainnet" | "testnet", Record<number, string>>;
import { constants } from "ethers";

export const ROUTER_ADMINS: AddressBook = {
mainnet: {
6648936: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // mainnet
1869640809: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // optimism
6450786: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // bnb
6778479: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // gnosis
1886350457: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // polygon
1634886255: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // arbitrum one
1818848877: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // linea x
1835365481: "", //TBD: "0x2f6e0e9212450c8d6Cd2a3BbD478855bfb464Dc0", // metis
1835101812: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // mantle
1887071085: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // polygonzk
1635148152: "0x3C9B7B1Ab56e7922c6749B420cD4210f51F3d31F", // avalanche
1650553709: "0x7bE978Cc84612E08f7844672B0E6A6F367FE2b6A", // base
2053862243: "0xE11Bd4D60EEcbbFF8494E6b274e87cB71dcdb978", // zksync-era
1836016741: "0x3C45f010512405BDEf283A32102A68114Dfc1e47", // mode
1935897199: "0x3C45f010512405BDEf283A32102A68114Dfc1e47", // scroll
},
testnet: {},
};

export const PROTOCOL_ADMINS: AddressBook = {
mainnet: {
Expand Down
Loading