-
Notifications
You must be signed in to change notification settings - Fork 95
sync master and release branches #153
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
The head ref may contain hidden characters: "\u201Csync-master-release-10-01-2025\u201D"
Changes from all commits
cab5714
39869a1
dc28df9
fed1d70
3ba7308
6a93346
c7a5862
b7ccba4
e148d9a
34f0e1c
b73bd81
b02599a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -9,7 +9,7 @@ BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 | |||
# 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.2" | ||||
DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.5" | ||||
|
||||
# Set default versions if not overriden by provided env vars | ||||
: ${NITRO_CONTRACTS_BRANCH:=$DEFAULT_NITRO_CONTRACTS_VERSION} | ||||
|
@@ -74,6 +74,10 @@ build_utils=false | |||
force_build_utils=false | ||||
build_node_images=false | ||||
|
||||
# Create some traffic on L2 and L3 so blocks are reliably produced | ||||
l2_traffic=true | ||||
l3_traffic=true | ||||
|
||||
while [[ $# -gt 0 ]]; do | ||||
case $1 in | ||||
--init) | ||||
|
@@ -284,6 +288,14 @@ while [[ $# -gt 0 ]]; do | |||
simple=false | ||||
shift | ||||
;; | ||||
--no-l2-traffic) | ||||
l2_traffic=false | ||||
shift | ||||
;; | ||||
--no-l3-traffic) | ||||
l3_traffic=false | ||||
shift | ||||
;; | ||||
*) | ||||
echo Usage: $0 \[OPTIONS..] | ||||
echo $0 script [SCRIPT-ARGS] | ||||
|
@@ -310,6 +322,8 @@ while [[ $# -gt 0 ]]; do | |||
echo --tokenbridge deploy L1-L2 token bridge. | ||||
echo --no-tokenbridge don\'t build or launch tokenbridge | ||||
echo --no-run does not launch nodes \(useful with build or init\) | ||||
echo --no-l2-traffic disables L2 spam transaction traffic \(default: enabled\) | ||||
echo --no-l3-traffic disables L3 spam transaction traffic \(default: enabled\) | ||||
echo --no-simple run a full configuration with separate sequencer/batch-poster/validator/relayer | ||||
echo --build-dev-nitro rebuild dev nitro docker image | ||||
echo --no-build-dev-nitro don\'t rebuild dev nitro docker image | ||||
|
@@ -594,6 +608,12 @@ if $force_init; then | |||
run_script send-l1 --ethamount 1 --to address_0x0000000000000000000000000000000000000000 --wait | ||||
run_script send-l2 --ethamount 1 --to address_0x0000000000000000000000000000000000000000 --wait | ||||
|
||||
if $l2_traffic; then | ||||
pmikolajczyk41 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
echo == create l2 traffic | ||||
run_script send-l2 --ethamount 100 --to user_traffic_generator --wait | ||||
run_script send-l2 --ethamount 0.0001 --from user_traffic_generator --to user_traffic_generator --wait --delay 500 --times 1000000 > /dev/null & | ||||
fi | ||||
|
||||
if $l3node; then | ||||
echo == Funding l3 users | ||||
run_script send-l2 --ethamount 1000 --to validator --wait | ||||
|
@@ -608,10 +628,6 @@ if $force_init; then | |||
run_script send-l1 --ethamount 100 --to user_fee_token_deployer --wait | ||||
run_script send-l2 --ethamount 100 --to user_fee_token_deployer --wait | ||||
|
||||
echo == create l2 traffic | ||||
run_script send-l2 --ethamount 100 --to user_traffic_generator --wait | ||||
run_script send-l2 --ethamount 0.0001 --from user_traffic_generator --to user_traffic_generator --wait --delay 500 --times 1000000 > /dev/null & | ||||
|
||||
echo == Writing l3 chain config | ||||
l3owneraddress=`run_script print-address --account l3owner | tail -n 1 | tr -d '\r\n'` | ||||
echo l3owneraddress $l3owneraddress | ||||
|
@@ -649,7 +665,7 @@ if $force_init; then | |||
if $tokenbridge; then | ||||
# we deployed an L1 L2 token bridge | ||||
# we need to pull out the L2 WETH address and pass it as an override to the L2 L3 token bridge deployment | ||||
l2Weth=`docker compose run --rm --entrypoint sh tokenbridge -c "cat l1l2_network.json" | jq -r '.l2Network.tokenBridge.l2Weth'` | ||||
l2Weth=`docker compose run --rm --entrypoint sh tokenbridge -c "cat l1l2_network.json" | jq -r '.l2Network.tokenBridge.childWeth'` | ||||
fi | ||||
docker compose run --rm -e PARENT_WETH_OVERRIDE=$l2Weth -e ROLLUP_OWNER_KEY=$l3ownerkey -e ROLLUP_ADDRESS=$rollupAddress -e PARENT_RPC=http://sequencer:8547 -e PARENT_KEY=$deployer_key -e CHILD_RPC=http://l3node:3347 -e CHILD_KEY=$deployer_key tokenbridge deploy:local:token-bridge | ||||
docker compose run --rm --entrypoint sh tokenbridge -c "cat network.json && cp network.json l2l3_network.json" | ||||
|
@@ -676,9 +692,11 @@ if $force_init; then | |||
echo == Deploy Stylus Deployer on L3 | ||||
run_script create-stylus-deployer --deployer l3owner --l3 | ||||
|
||||
echo == create l3 traffic | ||||
run_script send-l3 --ethamount 10 --to user_traffic_generator --wait | ||||
run_script send-l3 --ethamount 0.0001 --from user_traffic_generator --to user_traffic_generator --wait --delay 5000 --times 1000000 > /dev/null & | ||||
if $l3_traffic; then | ||||
echo == create l3 traffic | ||||
run_script send-l3 --ethamount 10 --to user_traffic_generator --wait | ||||
run_script send-l3 --ethamount 0.0001 --from user_traffic_generator --to user_traffic_generator --wait --delay 5000 --times 1000000 > /dev/null & | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. out of curiosity - why do we need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think its duration between successive transactions- nitro-testnode/scripts/ethcommands.ts Line 33 in 34f0e1c
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I apologize for the poor wording of the question. Why do we need to set any delay? It looks like we have to do 1M transactions and sleep for 5s after every one I see that this has already been the case, so of course I'm not treating this as a blocker or anything; it's just my curiosity... 🙈 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we set the delay between tx to move the chain in regular interval so that the chain keeps progressing- like new tx keep coming in causing the batch poster to post batches regularly, assertions being posted too etc etc... Without the delay 1M txs would be completed pretty quickly beating the purpose of traffic.. does that make sense? |
||||
fi | ||||
fi | ||||
fi | ||||
|
||||
|
Uh oh!
There was an error while loading. Please reload this page.