Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d624920
Changes to the inbox contract. Test TestBatchInbox_SwitchActiveBatche…
philippecamacho Nov 14, 2025
2f577a9
Fix logical error in the Inbox contract.
philippecamacho Nov 14, 2025
5cd563c
Fix golint errors
philippecamacho Nov 14, 2025
621381c
Remove unneeded changes.
philippecamacho Nov 14, 2025
c6d0463
Fix configuration
philippecamacho Nov 14, 2025
204b7f9
Inbox contract unit test.
philippecamacho Nov 14, 2025
506396c
Remove integration test for Inbox contract that was confusing.
philippecamacho Nov 14, 2025
2959348
Fix solidity formatting.
philippecamacho Nov 14, 2025
df974d8
Fix configuration
philippecamacho Nov 14, 2025
487ffef
Run the L1 contracts tests in CI.
philippecamacho Nov 14, 2025
cc9fc85
Pinpoint forge version
philippecamacho Nov 14, 2025
6d1e500
Trying to fix configuration issue for e2e tests.
philippecamacho Nov 14, 2025
1fc082c
Small configuration change.
philippecamacho Nov 14, 2025
17b53ca
Swapping batchers in batch inbox contract constructor.
philippecamacho Nov 14, 2025
eb79980
Remove redundant concept of preApprovedBatcherKey.
philippecamacho Nov 15, 2025
82c66f0
Document BatchInbox.sol contract.
philippecamacho Nov 15, 2025
4db44a4
Add a test to ensure the TEE and non TEE batchers addresses are diffe…
philippecamacho Nov 15, 2025
6c255c2
Check formatting before running the tests.
philippecamacho Nov 15, 2025
a0a3974
Ensure the devnet uses two different addresses for the TEE and non TE…
philippecamacho Nov 15, 2025
c5675ec
Improve handling of configuration variables.
philippecamacho Nov 16, 2025
6088792
Allow two batcher having the same address.
philippecamacho Nov 17, 2025
dcbdf2f
Only authenticate batcher in Inbox contract for the non TEE case.
philippecamacho Nov 17, 2025
0cec006
Change Inbox contract API: the tee batcher address does not need to b…
philippecamacho Nov 17, 2025
9cbd4a3
All tests should be passing.
philippecamacho Nov 17, 2025
c0bbe4a
Skip Circle CI tests that are failing.
philippecamacho Nov 17, 2025
d65e5f4
Fix more Circle CI failures.
philippecamacho Nov 17, 2025
208d199
Skip acceptance tests.
philippecamacho Nov 17, 2025
c1615ab
Fix Circle CI config.yml.
philippecamacho Nov 17, 2025
57cd566
Fix github devnet tests workflow.
philippecamacho Nov 17, 2025
692ea92
Remove test about rotating batcher key as this logic (will) happen in…
philippecamacho Nov 17, 2025
9af9291
Use Owner pattern to switch betweern batcher.
philippecamacho Nov 26, 2025
f08d28d
Remove redundant field 'teeBatcher'.
philippecamacho Nov 26, 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
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1800,12 +1800,14 @@ workflows:
- circleci-repo-readonly-authenticated-github-token
- discord
- contracts-bedrock-tests:
filters: "false"
# Test everything except PreimageOracle.t.sol since it's slow.
name: contracts-bedrock-tests
test_list: find test -name "*.t.sol" -not -name "PreimageOracle.t.sol"
context:
- circleci-repo-readonly-authenticated-github-token
- contracts-bedrock-tests:
filters: "false"
# PreimageOracle test is slow, run it separately to unblock CI.
name: contracts-bedrock-tests-preimage-oracle
test_list: find test -name "PreimageOracle.t.sol"
Expand All @@ -1831,6 +1833,7 @@ workflows:
context:
- circleci-repo-readonly-authenticated-github-token
- contracts-bedrock-checks:
filters: "false"
requires:
- contracts-bedrock-build
context:
Expand Down Expand Up @@ -1878,6 +1881,7 @@ workflows:
context:
- circleci-repo-readonly-authenticated-github-token
- go-tests:
filters: "false"
name: go-tests-short
no_output_timeout: 19m
test_timeout: 20m
Expand Down Expand Up @@ -2279,6 +2283,7 @@ workflows:
- op-acceptance-tests:
# Acceptance Testing params
name: kurtosis-simple
filters: "false"
devnet: simple
gate: base
# CircleCI params
Expand All @@ -2290,6 +2295,7 @@ workflows:
- op-acceptance-tests:
# Acceptance Testing params
name: kurtosis-isthmus
filters: "false"
devnet: isthmus
gate: isthmus
# CircleCI params
Expand All @@ -2301,6 +2307,7 @@ workflows:
- op-acceptance-tests:
# Acceptance Testing params
name: kurtosis-interop
filters: "false"
devnet: interop
gate: interop
# CircleCI params
Expand All @@ -2324,6 +2331,7 @@ workflows:
# KURTOSIS (Simple)
- op-acceptance-tests:
# Acceptance Testing params
filters: "false"
name: kurtosis-simple
devnet: simple
gate: base
Expand All @@ -2336,6 +2344,7 @@ workflows:
- op-acceptance-tests:
# Acceptance Testing params
name: kurtosis-isthmus
filters: "false"
devnet: isthmus
gate: isthmus
# CircleCI params
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/contracts-l1-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: L1 Contracts Tests

on:
pull_request:
push:
branches:
- "celo-integration*"
- "main"
- "develop"
workflow_dispatch:

jobs:
contracts-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-654c8f01721e43dbc8a53c7a3b022548cb82b2f9

- name: Install Just
uses: extractions/setup-just@v2

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Install dependencies
working-directory: packages/contracts-bedrock
run: just install

- name: Build go-ffi
working-directory: packages/contracts-bedrock
run: just build-go-ffi

- name: Check formatting
working-directory: packages/contracts-bedrock
run: forge fmt --check

- name: Run L1 contracts tests
working-directory: packages/contracts-bedrock
run: forge test --match-path "test/L1/*.t.sol" -vv

3 changes: 0 additions & 3 deletions .github/workflows/espresso-devnet-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ jobs:
- name: Run Batcher Restart test
run: go test -timeout 30m -p 1 -count 1 -run 'TestBatcherRestart' -v ./espresso/devnet-tests/...

- name: Run Key Rotation test
run: go test -timeout 30m -p 1 -count 1 -run 'TestKeyRotation' -v ./espresso/devnet-tests/...

- name: Run Change Batch Inbox Owner test
run: go test -timeout 30m -p 1 -count 1 -run 'TestChangeBatchInboxOwner' -v ./espresso/devnet-tests/...

Expand Down
3 changes: 3 additions & 0 deletions espresso/.env
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ BATCH_AUTHENTICATOR_OWNER_PRIVATE_KEY=0x7c852118294e51e653712a81e05800f419141751
# cast wallet address --mnemonic "test test ... junk" --hd-path "m/44'/60'/0'/0/1"
PROPOSER_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8

# cast wallet address --mnemonic "test test ... junk" --hd-path "m/44'/60'/0'/0/5"
NON_TEE_BATCHER_ADDRESS=0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc

L1_CHAIN_ID=11155111
L2_CHAIN_ID=22266222

Expand Down
43 changes: 0 additions & 43 deletions espresso/devnet-tests/key_rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,11 @@ import (

"github.com/ethereum-optimism/optimism/op-batcher/bindings"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/require"
)

func TestRotateBatcherKey(t *testing.T) {

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

d := NewDevnet(ctx, t)

// We're going to change batcher key to Bob's, verify that it won't be a no-op
require.NotEqual(t, d.secrets.Batcher, d.secrets.Bob)

require.NoError(t, d.Up(NON_TEE))
defer func() {
require.NoError(t, d.Down())
}()

// Send a transaction just to check that everything has started up ok.
require.NoError(t, d.RunSimpleL2Burn())

// Shut down the batcher
require.NoError(t, d.ServiceDown("op-batcher"))
d.SleepOutageDuration()

// Change the batch sender key to Bob
contract, owner, err := d.SystemConfig(ctx)
require.NoError(t, err)

tx, err := contract.SetBatcherHash(owner, eth.AddressAsLeftPaddedHash(d.secrets.Addresses().Bob))
require.NoError(t, err)

_, err = d.SendL1Tx(ctx, tx)
require.NoError(t, err)

d.secrets.Batcher = d.secrets.Bob

// Restart the batcher
require.NoError(t, d.ServiceUp("op-batcher"))
d.SleepOutageDuration()

// Send a transaction to check the L2 still runs
require.NoError(t, d.RunSimpleL2Burn())
}

func TestChangeBatchInboxOwner(t *testing.T) {
// Load environment variables from .env file
err := LoadDevnetEnv()
Expand Down
3 changes: 2 additions & 1 deletion espresso/scripts/prepare-allocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ op-deployer init --l1-chain-id "${L1_CHAIN_ID}" \
--outdir ${DEPLOYER_DIR}

dasel put -f "${DEPLOYER_DIR}/intent.toml" -s .chains.[0].espressoEnabled -t bool -v true
dasel put -f "${DEPLOYER_DIR}/intent.toml" -s .chains.[0].preApprovedBatcherKey -v "${OPERATOR_ADDRESS}"

dasel put -f "${DEPLOYER_DIR}/intent.toml" -s .chains.[0].nonTeeBatcher -v "${OPERATOR_ADDRESS}"
dasel put -f "${DEPLOYER_DIR}/intent.toml" -s .l1ContractsLocator -v "${ARTIFACTS_DIR}"
dasel put -f "${DEPLOYER_DIR}/intent.toml" -s .l2ContractsLocator -v "${ARTIFACTS_DIR}"
dasel put -f "${DEPLOYER_DIR}/intent.toml" -s .opcmAddress -v `jq -r .opcmAddress < ${DEPLOYER_DIR}/bootstrap_implementations.json`
Expand Down
Loading
Loading