Skip to content
Draft
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
5 changes: 4 additions & 1 deletion scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ RUN yarn
# Stage 2: Copy files and run build
FROM base AS pre-build
COPY ./*.ts ./tsconfig.json ./

# Stage 3: Copy resources
COPY ./resources ./resources
RUN echo "Intermediate image created before yarn build"

# Stage 3: Final build
# Stage 4: Final build
FROM pre-build AS final
RUN yarn build
ENTRYPOINT ["node", "index.js"]
159 changes: 83 additions & 76 deletions scripts/config.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions scripts/consts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const l1keystore = "/home/user/l1keystore";
export const l1passphrase = "passphrase";
export const configpath = "/config";
export const resourcespath = "./resources";
export const tokenbridgedatapath = "/tokenbridge-data";
// Not secure. Do not use for production purposes
export const l1mnemonic =
Expand Down
1 change: 1 addition & 0 deletions scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ async function main() {
validationNodeUrl: { string: true, default: "ws://validation_node:8549" },
l2owner: { string: true, default: "0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E" },
committeeMember: { string: true, default: "not_set" },
usePredeploys: { boolean: true, default: false, describe: "Whether to include predeployed contracts in the genesis allocation" },
})
.options(stressOptions)
.command(bridgeFundsCommand)
Expand Down
204 changes: 204 additions & 0 deletions scripts/resources/l2-rollupcreator-predeploys.json

Large diffs are not rendered by default.

870 changes: 870 additions & 0 deletions scripts/resources/l2-tokenbridgecreator-predeploys.json

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8
# nitro-contract workaround for testnode
# 1. authorizing validator signer key since validator wallet is buggy
# - gas estimation sent from 0x0000 lead to balance and permission error
DEFAULT_NITRO_CONTRACTS_VERSION="v3.1.0"
DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.5"
DEFAULT_NITRO_CONTRACTS_VERSION="v3.2.0-beta.0"
DEFAULT_TOKEN_BRIDGE_VERSION="e222d4cdaeefc87773e39a5fce980667a80b886b"

# Set default versions if not overriden by provided env vars
: ${NITRO_CONTRACTS_BRANCH:=$DEFAULT_NITRO_CONTRACTS_VERSION}
Expand Down Expand Up @@ -62,6 +62,7 @@ simple=true
l2anytrust=false
l2referenceda=false
l2timeboost=false
usePredeploys=true

# Use the dev versions of nitro/blockscout
dev_nitro=false
Expand Down Expand Up @@ -275,6 +276,10 @@ while [[ $# -gt 0 ]]; do
l2timeboost=true
shift
;;
--no-predeploys)
usePredeploys=false
shift
;;
--redundantsequencers)
simple=false
redundantsequencers=$2
Expand Down Expand Up @@ -320,6 +325,7 @@ while [[ $# -gt 0 ]]; do
echo --l2-anytrust run the L2 as an AnyTrust chain
echo --l2-referenceda run the L2 with reference external data availability provider
echo --l2-timeboost run the L2 with Timeboost enabled, including auctioneer and bid validator
echo --no-predeploys do not use predeploy contracts present in /scripts/resources/predeploys.json
echo --batchposters batch posters [0-3]
echo --redundantsequencers redundant sequencers [0-3]
echo --detach detach from nodes after running them
Expand Down Expand Up @@ -469,7 +475,11 @@ if $force_init; then
docker compose run --rm --entrypoint sh geth -c "chown -R 1000:1000 /config"

echo == Writing geth configs
run_script write-geth-genesis-config
if $usePredeploys; then
run_script write-geth-genesis-config --usePredeploys
else
run_script write-geth-genesis-config
fi

if $consensusclient; then
echo == Writing prysm configs
Expand Down