Skip to content

Commit

Permalink
chore: downgrade to v1.9.5 + fix optimism tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Dec 2, 2024
1 parent b9ee997 commit 2c97861
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 66 deletions.
39 changes: 39 additions & 0 deletions .devnet-alt-da/addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"AddressManager": "0x26a942b414CBc2eBb43F9c4e68DD791B5f61b5c7",
"AnchorStateRegistry": "0x2516DAe378507FD4cbE381e04EB0dFe41308aD3e",
"AnchorStateRegistryProxy": "0x6B73DBbd13FC27bf96b2d508B6C88179D2b4c4ba",
"DataAvailabilityChallenge": "0x18A001ab37Cba856fb8352D46A96069CBA41BFb7",
"DataAvailabilityChallengeProxy": "0xc75824f5666A236720d8409461000371776c4BC3",
"DelayedWETH": "0xec557124625E001dfe2d23ddA4F48A291E8a3e3a",
"DelayedWETHProxy": "0xbff24769250E0b40fD402dcE7AC9Ec7eEb14255E",
"DisputeGameFactory": "0x8a1a5F20ADF3005022049880f799FBBF2a188cfC",
"DisputeGameFactoryProxy": "0xeCb92a686D1ab066fc4E559A305FEB75DD512377",
"FastPreimageOracle": "0xbc1b15C94465d383bB68F345bEba1F3fcD2af44B",
"FaultDisputeGame_0": "0x86a350621ED6d036E2Af9cC68865dEf4B31C13ae",
"FaultDisputeGame_254": "0x9218181FAb774F8DBD245C8a2544069F9A8C2A8a",
"FaultDisputeGame_255": "0x401deDFb8536D84096Dd617689E770cB085ADfb7",
"L1CrossDomainMessenger": "0x2CfFF1c8Df8CE2BA6CBa19699CCBa6F381734938",
"L1CrossDomainMessengerProxy": "0x3d609De69E066F85C38AC274e3EeC251EcfDeAa1",
"L1ERC721Bridge": "0x2AC24b15a2Ded48F4B51e70293589058546a11FE",
"L1ERC721BridgeProxy": "0x961a37bd2eF41Ef68932d6E1FB4113534dcACB9B",
"L1StandardBridge": "0x3857b6c6f162fDA9BD591D4CCDEF8C00093cC357",
"L1StandardBridgeProxy": "0x9D34A2610Ea283f6d9AE29f9Cad82e00c4d38507",
"Mips": "0x9848e4470F89bec8b050eCDf93F69B8660B6046C",
"OPContractsManager": "0xb32a4b81244fEd6A176f295A4787cC9cce687a5e",
"OPContractsManagerProxy": "0x5b66F1D2dC2691F9bcac54Ee8B90a9923701e553",
"OptimismMintableERC20Factory": "0x89c88ED20d4b742185185f77017182247671eE3b",
"OptimismMintableERC20FactoryProxy": "0x623C237952ea6e3cD74740a5B766F2978AEA3b54",
"OptimismPortal2": "0x8237f181A3A8C7f871174e85f499f71f2A0d5B75",
"OptimismPortalProxy": "0xA439B64360C875951478b0Cf77698038df331255",
"PermissionedDelayedWETHProxy": "0x157514fF1F55f8685083D9D83CaE4aD4E186daDa",
"PermissionedDisputeGame": "0xe5b54F119250094761d8fed8d1CF124316B47904",
"PreimageOracle": "0xc043F015EB8cA0b94D4cAde622ed7369ce4ffE4E",
"ProtocolVersions": "0xd85BdcdaE4db1FAEB8eF93331525FE68D7C8B3f0",
"ProtocolVersionsProxy": "0x856e75e9c0Da547F9753c17746D6cc139b668e5c",
"ProxyAdmin": "0xac43F7588b15fA5F2347824F0Ad0ba1BDCa5E72C",
"SuperchainConfig": "0x238213078DbD09f2D15F4c14c02300FA1b2A81BB",
"SuperchainConfigProxy": "0xDc82c0362A241Aa94d53546648EACe48C9773dAa",
"SuperchainProxyAdmin": "0xdaE97900D4B184c5D2012dcdB658c008966466DD",
"SystemConfig": "0xE3dF61CA9F27cd66880325f3C6CB789EDe857997",
"SystemConfigProxy": "0xF493e2ebb09309e2d0046a7aFc88C8eDa3c91560"
}
1 change: 1 addition & 0 deletions .devnet-alt-da/allocs-l1.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

36 changes: 0 additions & 36 deletions .devnet/addresses.json

This file was deleted.

1 change: 0 additions & 1 deletion .devnet/allocs-l1.json

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@
"go.testFlags": [
"-test.parallel",
"4",
// Comment the following 2 lines to run unit tests.
"-deploy-config",
"../.devnet/devnetL1.json"
]
}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ test:
go test ./... -parallel 4

e2e-test:
INTEGRATION=true go test -timeout 1m ./e2e -parallel 4 -deploy-config ../.devnet/devnetL1.json
INTEGRATION=true go test -timeout 1m ./e2e -parallel 4

holesky-test:
TESTNET=true go test -timeout 50m ./e2e -parallel 4 -deploy-config ../.devnet/devnetL1.json
TESTNET=true go test -timeout 50m ./e2e -parallel 4

.PHONY: lint
lint:
Expand Down Expand Up @@ -67,7 +67,7 @@ op-devnet-allocs:
@./scripts/op-devnet-allocs.sh

benchmark:
go test -benchmem -run=^$ -bench . ./e2e -test.parallel 4 -deploy-config ../.devnet/devnetL1.json
go test -benchmem -run=^$ -bench . ./e2e -test.parallel 4

.PHONY: \
clean \
Expand Down
2 changes: 1 addition & 1 deletion e2e/optimism_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func NewL2AltDA(t actions.Testing, daHost string, altDA bool) *L2AltDA {
enabled := sd.RollupCfg.AltDAEnabled()
require.True(t, enabled)

sequencer := actions.NewL2Sequencer(t, log, l1F, nil, daMgr, engCl, sd.RollupCfg, 0, nil)
sequencer := actions.NewL2Sequencer(t, log, l1F, miner.BlobStore(), daMgr, engCl, sd.RollupCfg, 0, nil)
miner.ActL1SetFeeRecipient(common.Address{'A'})
sequencer.ActL2PipelineFull(t)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/Layr-Labs/eigenda v0.8.5-rc.0.0.20241101212705-fa8776ae648c
github.com/avast/retry-go/v4 v4.6.0
github.com/consensys/gnark-crypto v0.12.1
github.com/ethereum-optimism/optimism v1.10.0
github.com/ethereum-optimism/optimism v1.9.5
github.com/ethereum/go-ethereum v1.14.11
github.com/go-redis/redis/v8 v8.11.5
github.com/golang/mock v1.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101411.2 h1:XLTYMgmG1p1SNJzG9ZjEIdJTPZt08utw1vfqMJors4o=
github.com/ethereum-optimism/op-geth v1.101411.2/go.mod h1:dITJzx1KXsV2KusscsktidEb00blTSyFhalq8CjfsUY=
github.com/ethereum-optimism/optimism v1.10.0 h1:XXwVgEohp5/NBaKOp55CnDLHgVLxFalnzBj2uXL5I+Q=
github.com/ethereum-optimism/optimism v1.10.0/go.mod h1:2XBIvnbfV/NEDHcgjUBI944XzZ2gHYEd/hpAo9Jr08g=
github.com/ethereum-optimism/optimism v1.9.5 h1:gOziQfmW+l0CUSZ3C8WUsVphUmBY9tIOvukWGX4j0kY=
github.com/ethereum-optimism/optimism v1.9.5/go.mod h1:2KDyI2zWYRa8evoMXWd3/iSC50MMbpHs75MLTCJYCQ0=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241119111730-bee358f6d6e6 h1:+AIYWDX7FeWRLnBVqPiwireTacLLGGww1slGyv+YN0o=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241119111730-bee358f6d6e6/go.mod h1:9feO8jcL5OZ1tvRjEfNAHz4Aggvd6373l+ZxmZZAyZs=
github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA=
Expand Down
2 changes: 2 additions & 0 deletions packages/contracts-bedrock/deploy-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This weird path is only needed here because we're using optimism's e2e testing framework, and they hardcode the path to the devnetL1.json file.
See https://github.com/ethereum-optimism/optimism/blob/3f43f039a9e68b777045d7e2446947acbd9b0592/op-e2e/config/init.go#L156
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sequencerWindowSize": 200,
"channelTimeout": 120,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"batchInboxAddress": "0xff00000000000000000000000000000000000901",
"batchInboxAddress": "0x00289C189bEE4E70334629f04Cd5eD602B6600eB",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
"l1StartingBlockTag": "earliest",
"l2OutputOracleSubmissionInterval": 10,
Expand Down Expand Up @@ -46,11 +46,13 @@
"l2GenesisRegolithTimeOffset": "0x0",
"l2GenesisCanyonTimeOffset": "0x0",
"l2GenesisDeltaTimeOffset": "0x0",
"l2GenesisEcotoneTimeOffset": "0x40",
"l1CancunTimeOffset": "0x30",
"l2GenesisEcotoneTimeOffset": "0x0",
"l2GenesisFjordTimeOffset": "0x0",
"l2GenesisGraniteTimeOffset": "0x0",
"l1CancunTimeOffset": "0x0",
"systemConfigStartBlock": 0,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000001",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000001",
"faultGameAbsolutePrestate": "0x03c7ae758795765c6664a5d39bf63841c71ff191e9189522bad8ebff5d4eca98",
"faultGameMaxDepth": 50,
"faultGameClockExtension": 0,
Expand All @@ -65,7 +67,7 @@
"disputeGameFinalityDelaySeconds": 6,
"respectedGameType": 254,
"useFaultProofs": true,
"useAltDA": true,
"useAltDA": false,
"daCommitmentType": "KeccakCommitment",
"daChallengeWindow": 16,
"daResolveWindow": 16,
Expand Down
19 changes: 11 additions & 8 deletions scripts/op-devnet-allocs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION=$(cat go.mod | grep ethereum-optimism/optimism | awk '{print $2}' | sed 's/\/v//g')
VERSION=$(cat go.mod | grep -m 1 ethereum-optimism/optimism | awk '{print $2}' | sed 's/\/v//g')
VERSION=$(echo ${VERSION} | sed 's/v//g')

REPO_NAME=optimism-$(echo ${VERSION} | sed 's/v//g')
Expand All @@ -11,19 +11,22 @@ cd ${REPO_NAME}

echo "Initializing monorepo..."
make install-geth &&
git submodule update --init --recursive &&
make DEVNET_ALTDA=true GENERIC_ALTDA=false devnet-allocs &&
cp -R .devnet ../. &&
mv packages/contracts-bedrock/deploy-config/devnetL1.json ../.devnet/devnetL1.json
git submodule update --init --recursive &&
# make devnet-allocs creates allocs for different configurations: .devnet-alt-da, .devnet-l200, .devnet-mt-cannon, etc.
# we only need the .devnet-alt-da (although we could use .devnet-alt-da-generic once the PR that adds it is merged)
make devnet-allocs &&
cp -R .devnet-alt-da ../. &&
# op's e2e test suite hardcodes this path so we need to copy it to this awkward location
mv packages/contracts-bedrock/deploy-config/devnetL1.json ../packages/contracts-bedrock/deploy-config/devnetL1.json

STATUS=$?

## Force cleanup of monorepo
## Force cleanup of monorepo
echo "${STATUS} Cleaning up ${REPO_NAME} repo ..."
cd ../ &&
rm -rf ${REPO_NAME}
rm -rf ${REPO_NAME}

if [ $? -eq 0 ] ; then
if [ $? -eq 0 ]; then
echo "Successfully cleaned up ${REPO_NAME} repo"
exit ${STATUS}
else
Expand Down

0 comments on commit 2c97861

Please sign in to comment.