Skip to content

Commit

Permalink
test(e2e): use offchainlabs nitro repo, enable automine on L1 (#895)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Migone <[email protected]>
  • Loading branch information
tmigone authored Dec 21, 2023
1 parent 54219ed commit 8b5aae6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ jobs:
uses: ./.github/actions/setup
- name: Run e2e tests
run: |
git clone https://github.com/edgeandnode/nitro
pushd nitro
git clone https://github.com/OffchainLabs/nitro-testnode/
pushd nitro-testnode
git checkout c47cb8c643bc8e63ff096f7f88f9152064d1532a
git submodule update --init --recursive
./test-node.bash --init --no-blockscout --detach
sed -i'' -e 's/^\(.*dev.period.*\)/# \1/' docker-compose.yaml
./test-node.bash --init --batchposters 0 --redundantsequencers 0 --detach
popd
L1_NETWORK=localnitrol1 L2_NETWORK=localnitrol2 yarn test:e2e
4 changes: 2 additions & 2 deletions packages/contracts/tasks/deployment/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ task(TASK_NITRO_FUND_ACCOUNTS, 'Funds protocol accounts on Arbitrum Nitro testno
// - L1 > https://github.com/OffchainLabs/nitro/blob/01c558c06ad9cbaa083bebe3e51960e195c3fd6b/test-node.bash#L136
// - L2 > https://github.com/OffchainLabs/nitro/blob/01c558c06ad9cbaa083bebe3e51960e195c3fd6b/testnode-scripts/config.ts#L22
const genesisAccountPrivateKey =
taskArgs.privateKey ?? 'e887f7d17d07cc7b8004053fb8826f6657084e88904bb61590e498ca04704cf2'
taskArgs.privateKey ?? 'b6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659'
const genesisAccount = new hre.ethers.Wallet(genesisAccountPrivateKey)

// Get protocol accounts
Expand Down Expand Up @@ -95,7 +95,7 @@ subtask(TASK_NITRO_FETCH_DEPLOYMENT_FILE, 'Fetches nitro deployment file from a
.setAction(async (taskArgs) => {
console.log(`Attempting to fetch deployment file from testnode...`)

const command = `docker exec $(docker ps -qf "name=sequencer") cat /workspace/localNetwork.json > ${taskArgs.deploymentFile}`
const command = `docker container cp $(docker ps -alqf "name=tokenbridge" --format "{{.ID}}"):/workspace/localNetwork.json .`
const stdOut = execSync(command)
console.log(stdOut.toString())

Expand Down

0 comments on commit 8b5aae6

Please sign in to comment.