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

Added l2 single/batch timelock stage #223

Merged
merged 25 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from 23 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
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: OffchainLabs/actions/run-nitro-test-node@main
- uses: OffchainLabs/actions/run-nitro-test-node@output-logging

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: OffchainLabs/actions/run-nitro-test-node@main
- uses: OffchainLabs/actions/run-nitro-test-node@output-logging

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
4 changes: 3 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
// undici - only used in hardhat, not used in prod
"GHSA-wqq4-5wpv-mx2g",
// get-func-name - only used in chai, not used in prod
"GHSA-4q6p-r6v2-jvc5"
"GHSA-4q6p-r6v2-jvc5",
// axios used only in sol2uml
"GHSA-wf5p-g6vw-rhxx"
]
}
6 changes: 3 additions & 3 deletions files/local/.env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ARB_URL="http://localhost:8547"
NOVA_URL="http://localhost:8547"
ETH_URL="http://localhost:8545"
## Test keys
ARB_KEY="cb5790da63720727af975f42c79f69918580209889225fa7128c92402a6d3a65"
ETH_KEY="cb5790da63720727af975f42c79f69918580209889225fa7128c92402a6d3a65"
NOVA_KEY="cb5790da63720727af975f42c79f69918580209889225fa7128c92402a6d3a65"
ARB_KEY="b6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659"
ETH_KEY="b6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659"
NOVA_KEY="b6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659"

DEPLOY_CONFIG_FILE_LOCATION="./files/local/deployConfig.json"
VESTED_RECIPIENTS_FILE_LOCATION="./files/local/vestingWalletRecipients.json"
Expand Down
4 changes: 2 additions & 2 deletions scripts/genNetwork.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Wallet, ethers } from "ethers";
import { ethers } from "ethers";
import { setupNetworks, config, getSigner } from "../test-ts/testSetup";
import * as fs from "fs";

Expand All @@ -8,7 +8,7 @@ async function main() {

const ethDeployer = getSigner(ethProvider, config.ethKey);
const arbDeployer = getSigner(arbProvider, config.arbKey);

const { l1Network, l2Network } = await setupNetworks(
ethDeployer,
arbDeployer,
Expand Down
4 changes: 2 additions & 2 deletions scripts/proposalTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ async function main() {
const currentBlock = await arbProvider.getBlockNumber();
while ((await arbProvider.getBlockNumber()) - currentBlock < 2) {
if (isLocal) {
await mineBlock(ethDeployer);
await mineBlock(arbDeployer);
await mineBlock(ethDeployer, "2blocketh");
await mineBlock(arbDeployer, "2blockarb");
}
await wait(1000);
}
Expand Down
6 changes: 4 additions & 2 deletions src-ts/proposalPipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
UnreachableCaseError,
getProvider,
BaseGovernorExecuteStage,
L2TimelockExecutionSingleStage,
} from "./proposalStage";
import { Signer } from "ethers";
import { Provider, TransactionReceipt } from "@ethersproject/abstract-provider";
Expand All @@ -28,6 +29,7 @@ export class StageFactory {
return [
...(await BaseGovernorExecuteStage.extractStages(receipt, this.arbOneSignerOrProvider)),
...(await L2TimelockExecutionBatchStage.extractStages(receipt, this.arbOneSignerOrProvider)),
...(await L2TimelockExecutionSingleStage.extractStages(receipt, this.arbOneSignerOrProvider)),
...(await L1TimelockExecutionSingleStage.extractStages(receipt, this.l1SignerOrProvider)),
...(await L1TimelockExecutionBatchStage.extractStages(receipt, this.l1SignerOrProvider)),
...(await RetryableExecutionStage.extractStages(receipt, this.arbOneSignerOrProvider)),
Expand Down Expand Up @@ -94,7 +96,7 @@ export class StageTracker extends EventEmitter {
while (polling) {
try {
const status = await this.stage.status();
if (currentStatus !== status) {
// if (currentStatus !== status) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woops, good catch

// emit an event if the status changes
this.emit(TrackerEventName.TRACKER_STATUS, {
status,
Expand All @@ -108,7 +110,7 @@ export class StageTracker extends EventEmitter {
this.stage instanceof GovernorQueueStage ? this.stage.description : undefined,
});
currentStatus = status;
}
// }
switch (status) {
case ProposalStageStatus.TERMINATED:
// end of the road
Expand Down
Loading