Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
201f62f
Added v3 support
yahgwai Feb 9, 2025
58aa64c
Added buildx tmp file
yahgwai Feb 9, 2025
2a50b00
Use test branch
yahgwai Feb 9, 2025
5b05cf8
Comment out bold upgrade ci
yahgwai Feb 9, 2025
7cd51d0
Dont fail fast for matrix combos
yahgwai Feb 9, 2025
04f52f5
fix: config race workaround
gzeoneth Feb 10, 2025
2c0949a
revert: sleep
gzeoneth Feb 10, 2025
695a854
fix: nitro contract pin with correct stakeToken deployment
gzeoneth Feb 10, 2025
811cae8
workaround: dark magic
gzeoneth Feb 10, 2025
58ebd03
fix: enable bold
gzeoneth Feb 10, 2025
7d91c28
docs: explain dark magic
gzeoneth Feb 10, 2025
c15a9dc
feat: bold make nodes
gzeoneth Feb 10, 2025
ff58019
workaround: black magic for l3
gzeoneth Feb 10, 2025
c64ebf7
fix: enable block-validator in simple mode for bold
gzeoneth Feb 11, 2025
6e03e48
fix: remove dark magic
gzeoneth Feb 11, 2025
ba45e37
Revert "fix: remove dark magic"
gzeoneth Feb 11, 2025
d3e1fab
docs: explain
gzeoneth Feb 11, 2025
f277d70
Merge branch 'release' into v3-support
gzeoneth Feb 11, 2025
335ff17
wip: so far
gzeoneth Feb 11, 2025
caf6cc2
Merge remote-tracking branch 'origin/v3-support' into v3-support
gzeoneth Feb 11, 2025
28c8160
Merge remote-tracking branch 'origin/master' into v3-support
gzeoneth Mar 17, 2025
cca465f
chore: update contract pin
gzeoneth Mar 17, 2025
dd3ffdb
chore: bump nitro
gzeoneth Mar 18, 2025
f6497a2
chore: use nitro v3.5.4-rc.1
gzeoneth Mar 21, 2025
9c8e25a
chore: update nitro-contract pin
gzeoneth Mar 21, 2025
7bafc5b
chore: use v3.5.4-rc.1 again
gzeoneth Mar 21, 2025
683351a
set latest nitro version
godzillaba Mar 26, 2025
ef577ec
Merge remote-tracking branch 'origin/release' into v3-support
gzeoneth Mar 28, 2025
aaf7be5
chore: use contract develop
gzeoneth Mar 28, 2025
3e4dfc2
revert: remove workaround
gzeoneth Mar 28, 2025
6a8bd3d
chore: remove bold upgrader
gzeoneth Mar 28, 2025
08ff5c2
workaround: disable use-smart-contract-wallet
gzeoneth Mar 29, 2025
57eaafc
fix: typo
gzeoneth Mar 29, 2025
a7b1654
fix: use same staker for l3
gzeoneth Mar 29, 2025
e120565
fix: generate l3 traffic
gzeoneth Mar 29, 2025
965bc97
workaround: slower activity
gzeoneth Mar 29, 2025
0a45f78
feat: deploy stylue deployer using create2 (#121)
gzeoneth Apr 16, 2025
15b3ac7
chore: use v3.6.0-rc.1
gzeoneth Apr 16, 2025
cb5bc8c
chore: use v3.1.0 contracts
gzeoneth Apr 16, 2025
a856bae
chore: workaround and todos
gzeoneth Apr 16, 2025
e12abbd
Merge branch 'master' into v3-support
gzeoneth Apr 16, 2025
de8cf4e
revert: workaround no longer required
gzeoneth Apr 17, 2025
fec8805
chore: use nitro-node v3.6.0
gzeoneth Apr 29, 2025
445db7f
Merge branch 'master' into v3-support
TucksonDev May 6, 2025
1fe1b72
Smol clarification comment
TucksonDev May 6, 2025
8fe6b9d
Update the blockscount pin
eljobe May 9, 2025
4f5f447
Update the blockscout pin
eljobe May 13, 2025
9a67adb
Update to use latest nitro 3.5.5 release
joshuacolvin0 Apr 9, 2025
e2ec126
chore: git submodule update
gzeoneth Jun 12, 2025
f155eb1
chore: bump nitro-contracts to 3.1.1 for new stylus factory
gzeoneth Jun 17, 2025
931bbef
Merge remote-tracking branch 'origin/release' into v3-support
gzeoneth Jun 17, 2025
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
20 changes: 2 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- master
- develop
- release
# run this job on the default branch daily
# run this job on the default branch (release) daily
# the docker compose file contains some images with tags like 'latest' and 'stable'
# we nightly run here just to double check no bugs have been merged into those tags and are now on release
schedule:
Expand All @@ -20,6 +20,7 @@ jobs:
build_and_run:
runs-on: ubuntu-8
strategy:
fail-fast: false
matrix:
pos: [pos, no-pos]
l3node: [l3node, l3node-token-6, no-l3node]
Expand All @@ -46,20 +47,3 @@ jobs:

- name: Startup Nitro testnode
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' }} --detach ${{ matrix.pos == 'pos' && '--pos' || '' }} --simple ${{ (matrix.simple == 'simple' && '--simple') || (matrix.simple == 'no-simple' && '--no-simple') || '' }}

bold_upgrade:
runs-on: ubuntu-8

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Startup Nitro testnode
run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force --bold-upgrade --simple --detach
14 changes: 0 additions & 14 deletions boldupgrader/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions docker-compose-ci-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@
"type=docker"
]
},
"boldupgrader": {
"cache-from": [
"type=local,src=/tmp/.buildx-cache"
],
"cache-to": [
"type=local,dest=/tmp/.buildx-cache,mode=max"
],
"output": [
"type=docker"
]
},
"tokenbridge": {
"cache-from": [
"type=local,src=/tmp/.buildx-cache"
Expand Down
23 changes: 1 addition & 22 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- "127.0.0.1:6379:6379"

geth:
image: ethereum/client-go:stable
image: ethereum/client-go:v1.14.13
ports:
- "127.0.0.1:8545:8545"
- "127.0.0.1:8551:8551"
Expand Down Expand Up @@ -370,26 +370,6 @@ services:
- "tokenbridge-data:/workspace"
- /var/run/docker.sock:/var/run/docker.sock

boldupgrader:
depends_on:
- geth
- sequencer
pid: host
build:
context: boldupgrader/
args:
BOLD_CONTRACTS_BRANCH: ${BOLD_CONTRACTS_BRANCH:-}
environment:
- L1_RPC_URL=http://geth:8545
- L1_PRIV_KEY=0xdc04c5399f82306ec4b4d654a342f40e2e0620fe39950d967e1e574b32d4dd36
- CONFIG_NETWORK_NAME=local
- DEPLOYED_CONTRACTS_DIR=./scripts/files/
- DISABLE_VERIFICATION=true
volumes:
- "config:/config"
- "boldupgrader-data:/workspace"
- /var/run/docker.sock:/var/run/docker.sock

rollupcreator:
depends_on:
- geth
Expand Down Expand Up @@ -502,4 +482,3 @@ volumes:
das-committee-b-data:
das-mirror-data:
timeboost-auctioneer-data:
boldupgrader-data:
1 change: 1 addition & 0 deletions rollupcreator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG NITRO_CONTRACTS_BRANCH=main
WORKDIR /workspace
RUN git clone --no-checkout https://github.com/OffchainLabs/nitro-contracts.git ./
RUN git checkout ${NITRO_CONTRACTS_BRANCH}
RUN git submodule update --init --recursive
RUN yarn install && yarn cache clean
RUN curl -L https://foundry.paradigm.xyz | bash
ENV PATH="${PATH}:/root/.foundry/bin"
Expand Down
16 changes: 11 additions & 5 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ function writeConfigs(argv: any) {
"info-files": [chainInfoFile],
},
"node": {
"bold": {
"rpc-block-number": "latest",
"strategy": "makeNodes",
"assertion-posting-interval": "10s"
},
"staker": {
"dangerous": {
"without-block-validator": false
Expand Down Expand Up @@ -292,7 +297,7 @@ function writeConfigs(argv: any) {
if (argv.simple) {
let simpleConfig = JSON.parse(baseConfJSON)
simpleConfig.node.staker.enable = true
simpleConfig.node.staker["use-smart-contract-wallet"] = true
simpleConfig.node.staker["use-smart-contract-wallet"] = false // TODO: set to true when fixed
simpleConfig.node.staker.dangerous["without-block-validator"] = true
simpleConfig.node.sequencer = true
simpleConfig.node.dangerous["no-sequencer-coordinator"] = true
Expand All @@ -307,7 +312,7 @@ function writeConfigs(argv: any) {
} else {
let validatorConfig = JSON.parse(baseConfJSON)
validatorConfig.node.staker.enable = true
validatorConfig.node.staker["use-smart-contract-wallet"] = true
validatorConfig.node.staker["use-smart-contract-wallet"] = false // TODO: set to true when fixed
let validconfJSON = JSON.stringify(validatorConfig)
fs.writeFileSync(path.join(consts.configpath, "validator_config.json"), validconfJSON)

Expand Down Expand Up @@ -340,13 +345,14 @@ function writeConfigs(argv: any) {

let l3Config = JSON.parse(baseConfJSON)
l3Config["parent-chain"].connection.url = argv.l2url
l3Config.node.staker["parent-chain-wallet"].account = namedAddress("l3owner")
// use the same account for l2 and l3 staker
// l3Config.node.staker["parent-chain-wallet"].account = namedAddress("l3owner")
l3Config.node["batch-poster"]["parent-chain-wallet"].account = namedAddress("l3sequencer")
l3Config.chain.id = 333333
const l3ChainInfoFile = path.join(consts.configpath, "l3_chain_info.json")
l3Config.chain["info-files"] = [l3ChainInfoFile]
l3Config.node.staker.enable = true
l3Config.node.staker["use-smart-contract-wallet"] = true
l3Config.node.staker["use-smart-contract-wallet"] = false // TODO: set to true when fixed
l3Config.node.sequencer = true
l3Config.execution["sequencer"].enable = true
l3Config.node["dangerous"]["no-sequencer-coordinator"] = true
Expand Down Expand Up @@ -436,7 +442,7 @@ function writeL3ChainConfig(argv: any) {
"EnableArbOS": true,
"AllowDebugPrecompiles": true,
"DataAvailabilityCommittee": false,
"InitialArbOSVersion": 31,
"InitialArbOSVersion": 32,
"InitialChainOwner": argv.l2owner,
"GenesisBlockNum": 0
}
Expand Down
56 changes: 56 additions & 0 deletions scripts/ethcommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import * as fs from "fs";
import { ARB_OWNER } from "./consts";
import * as TransparentUpgradeableProxy from "@openzeppelin/contracts/build/contracts/TransparentUpgradeableProxy.json"
import * as ExpressLaneAuctionContract from "@arbitrum/nitro-contracts/build/contracts/src/express-lane-auction/ExpressLaneAuction.sol/ExpressLaneAuction.json"
import * as StylusDeployerContract from "@arbitrum/nitro-contracts/build/contracts/src/stylus/StylusDeployer.sol/StylusDeployer.json"

const path = require("path");

async function sendTransaction(argv: any, threadId: number) {
Expand Down Expand Up @@ -185,6 +187,36 @@ async function deployWETHContract(deployerWallet: Wallet): Promise<string> {
return weth.address;
}

async function createStylusDeployer(deployerWallet: Wallet): Promise<string> {
// this factory should be deployed by the rollupcreator when deploy helper is used
const create2factory = '0x4e59b44847b379578588920ca78fbf26c0b4956c'
if (await deployerWallet.provider.getCode(create2factory) === '0x') {
// wait for 30 seconds, check again before throwing an error
await new Promise(resolve => setTimeout(resolve, 30000));
if (await deployerWallet.provider.getCode(create2factory) === '0x') {
throw new Error('Create2 factory not yet deployed')
}
}

const salt = ethers.constants.HashZero
const stylusDeployerBytecode = StylusDeployerContract.bytecode
const stylusDeployerAddress = ethers.utils.getCreate2Address(create2factory, salt, ethers.utils.keccak256(stylusDeployerBytecode))

// check if the address is already deployed
const code = await deployerWallet.provider.getCode(stylusDeployerAddress)
if (code !== '0x') {
console.log("Stylus deployer already deployed")
} else {
const stylusDeployerTx = await deployerWallet.sendTransaction({
to: create2factory,
data: ethers.utils.concat([salt, stylusDeployerBytecode])
})
await stylusDeployerTx.wait()
}

return stylusDeployerAddress
}

export const bridgeFundsCommand = {
command: "bridge-funds",
describe: "sends funds from l1 to l2",
Expand Down Expand Up @@ -593,6 +625,30 @@ export const createWETHCommand = {
},
};

export const createStylusDeployerCommand = {
command: "create-stylus-deployer",
describe: "deploys the stylus deployer contract",
builder: {
deployer: { string: true, describe: "account (see general help)" },
l3: { boolean: false, describe: "deploy on L3, otherwise deploy on L2" },
},
handler: async (argv: any) => {
console.log("create-stylus-deployer");

const provider = new ethers.providers.WebSocketProvider(argv.l3 ? argv.l3url : argv.l2url);
const deployerWallet = namedAccount(argv.deployer).connect(provider);

const stylusDeployerAddress = await createStylusDeployer(deployerWallet);
if (argv.l3) {
console.log("Stylus deployer deployed at L3 address:", stylusDeployerAddress);
} else {
console.log("Stylus deployer deployed at L2 address:", stylusDeployerAddress);
}

provider.destroy();
}
};

export const sendL1Command = {
command: "send-l1",
describe: "sends funds between l1 accounts",
Expand Down
2 changes: 2 additions & 0 deletions scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
createERC20Command,
deployExpressLaneAuctionContractCommand,
createWETHCommand,
createStylusDeployerCommand,
transferERC20Command,
sendL1Command,
sendL2Command,
Expand Down Expand Up @@ -56,6 +57,7 @@ async function main() {
.command(createFeeTokenPricerCommand)
.command(deployExpressLaneAuctionContractCommand)
.command(createWETHCommand)
.command(createStylusDeployerCommand)
.command(transferERC20Command)
.command(sendL1Command)
.command(sendL2Command)
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Offchain Labs, Inc.",
"license": "Apache-2.0",
"dependencies": {
"@arbitrum/nitro-contracts": "^2.1.1",
"@arbitrum/nitro-contracts": "^3.1.1",
"@arbitrum/token-bridge-contracts": "1.2.0",
"@node-redis/client": "^1.0.4",
"@openzeppelin/contracts": "^4.9.3",
Expand Down
18 changes: 17 additions & 1 deletion scripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
optionalDependencies:
sol2uml "2.2.0"

"@arbitrum/nitro-contracts@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@arbitrum/nitro-contracts/-/nitro-contracts-3.1.1.tgz#f2efac5329e3f187ade998bbbbad93070e2e90a3"
integrity sha512-30s5ocUZbDx22MybngvO7WZtCgYoPYmkHnnBl07FZnN3gOv+oy4WQB0Ln2QG4aBzPp6hCg76Yw9mQJDN/+OkCg==
dependencies:
"@offchainlabs/upgrade-executor" "1.1.0-beta.0"
"@openzeppelin/contracts" "4.7.3"
"@openzeppelin/contracts-upgradeable" "4.7.3"
patch-package "^6.5.1"
solady "0.0.182"

"@arbitrum/[email protected]":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@arbitrum/token-bridge-contracts/-/token-bridge-contracts-1.2.0.tgz#b1dc02e123393848d0d8e5c167028bafa0ac8229"
Expand Down Expand Up @@ -2198,7 +2209,7 @@ parse5@^7.0.0:
dependencies:
entities "^4.4.0"

patch-package@^6.4.7:
patch-package@^6.4.7, patch-package@^6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.5.1.tgz#3e5d00c16997e6160291fee06a521c42ac99b621"
integrity sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==
Expand Down Expand Up @@ -2522,6 +2533,11 @@ [email protected]:
js-graph-algorithms "^1.0.18"
klaw "^4.0.1"

[email protected]:
version "0.0.182"
resolved "https://registry.yarnpkg.com/solady/-/solady-0.0.182.tgz#bd8c47f128a3a752358ad052782773966d74c400"
integrity sha512-FW6xo1akJoYpkXMzu58/56FcNU3HYYNamEbnFO3iSibXk0nSHo0DV2Gu/zI3FPg3So5CCX6IYli1TT1IWATnvg==

solidity-ast@^0.4.51:
version "0.4.55"
resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.55.tgz#00b685e6eefb2e8dfb67df1fe0afbe3b3bfb4b28"
Expand Down
Loading