Skip to content

Commit

Permalink
Merge branch 'master' into merge-in-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-Wilson authored Sep 27, 2024
2 parents d4811c4 + d4244cd commit 4355636
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
runs-on: ubuntu-8
strategy:
matrix:
pos: [true, false]
pos: [pos, no-pos]
l3node: [l3node, l3node-token-6, no-l3node]
tokenbridge: [tokenbridge, no-tokenbridge]

steps:
- name: Checkout
Expand All @@ -36,4 +38,4 @@ jobs:
restore-keys: ${{ runner.os }}-buildx-

- name: Startup Nitro testnode
run: ${{ github.workspace }}/.github/workflows/testnode.bash ${{ matrix.pos == true && '--pos' || '' }}
run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force ${{ (matrix.l3node == 'l3node' && '--l3node') || (matrix.l3node == 'l3node-token-6' && '--l3node --l3-fee-token --l3-token-bridge --l3-fee-token-decimals 6') || '' }} ${{ matrix.tokenbridge == 'tokenbridge' && '--tokenbridge' || '--no-tokenbridge' }} --no-simple --detach ${{ matrix.pos == 'pos' && '--pos' || '' }}
34 changes: 11 additions & 23 deletions .github/workflows/testnode.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,36 @@
# Start the test node and get PID, to terminate it once send-l2 is done.
cd ${GITHUB_WORKSPACE}

while [[ $# -gt 0 ]]; do
case $1 in
--pos)
pos=true
shift
;;
*)
echo "Unknown option $1"
exit 1
;;
esac
done

# TODO once develop is merged into nitro-contract's master, remove the NITRO_CONTRACTS_BRANCH env var
if [ "$pos" = true ]; then
echo "Running with --pos"
./test-node.bash --init-force --l3node --no-simple --detach --pos
else
./test-node.bash --init-force --l3node --no-simple --detach
fi
./test-node.bash "$@"

if [ $? -ne 0 ]; then
echo "test-node.bash failed"
docker compose logs --tail=1000
exit 1
fi


START=$(date +%s)
L2_TRANSACTION_SUCCEEDED=false
L3_TRANSACTION_SUCCEEDED=false
# if we're not running an l3node then we just set l3 to success by default
L3_TRANSACTION_SUCCEEDED=true
for arg in "$@"; do
if [ "$arg" = "--l3node" ]; then
L3_TRANSACTION_SUCCEEDED=false
fi
done
SUCCEEDED=false

while true; do
if [ "$L2_TRANSACTION_SUCCEEDED" = false ]; then
if ${GITHUB_WORKSPACE}/test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait; then
if ${GITHUB_WORKSPACE}/test-node.bash script send-l2 --ethamount 2 --to user_l2user --wait; then
echo "Sending l2 transaction succeeded"
L2_TRANSACTION_SUCCEEDED=true
fi
fi

if [ "$L3_TRANSACTION_SUCCEEDED" = false ]; then
if ${GITHUB_WORKSPACE}/test-node.bash script send-l3 --ethamount 100 --to user_l3user --wait; then
if ${GITHUB_WORKSPACE}/test-node.bash script send-l3 --ethamount 2 --to user_l3user --wait; then
echo "Sending l3 transaction succeeded"
L3_TRANSACTION_SUCCEEDED=true
fi
Expand Down
2 changes: 1 addition & 1 deletion blockscout
2 changes: 1 addition & 1 deletion scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function writeL2ChainConfig(argv: any) {
"EnableArbOS": true,
"AllowDebugPrecompiles": true,
"DataAvailabilityCommittee": false,
"InitialArbOSVersion": 31,
"InitialArbOSVersion": 32,
"InitialChainOwner": argv.l2owner,
"GenesisBlockNum": 0
}
Expand Down
2 changes: 1 addition & 1 deletion test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eu

NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.1.2-309340a-dev
NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.2.1-d81324d-dev
BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8

# This commit matches v2.1.0 release of nitro-contracts, with additional support to set arb owner through upgrade executor
Expand Down

0 comments on commit 4355636

Please sign in to comment.