From 9b9cf81cff095dce316029f7a9be91d1a02f3789 Mon Sep 17 00:00:00 2001 From: Jeb Bearer Date: Wed, 31 Jan 2024 14:15:33 -0500 Subject: [PATCH] Fix ABI tests --- op-node/rollup/derive/ecotone_upgrade_transactions.go | 2 +- packages/contracts-bedrock/slither-report.json | 8 ++++---- packages/contracts-bedrock/test/Specs.t.sol | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/op-node/rollup/derive/ecotone_upgrade_transactions.go b/op-node/rollup/derive/ecotone_upgrade_transactions.go index d9b88ded595c..c0f3014a8ad0 100644 --- a/op-node/rollup/derive/ecotone_upgrade_transactions.go +++ b/op-node/rollup/derive/ecotone_upgrade_transactions.go @@ -37,7 +37,7 @@ var ( eip4788CreationData = common.Hex2Bytes("0x60618060095f395ff33373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500") UpgradeToFuncBytes4 = crypto.Keccak256([]byte(UpgradeToFuncSignature))[:4] - l1BlockDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b50610696806100206000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80638381f58a116100b2578063c598591811610081578063e591b28211610066578063e591b282146102a5578063e81b2c6d146102e5578063f8206140146102ee57600080fd5b8063c59859181461026c578063dc59462c1461028c57600080fd5b80638381f58a146102265780638b239f731461023a5780639e8c496614610243578063b80777ea1461024c57600080fd5b80635cf24969116100ee5780635cf24969146101a257806361fba0ca146101ab57806364ca23ef146101c857806368d5dca6146101f557600080fd5b806309bd5a6014610120578063440a5e201461013c57806354b7325c1461014657806354fd4d5014610159575b600080fd5b61012960025481565b6040519081526020015b60405180910390f35b6101446102f7565b005b610144610154366004610587565b610355565b6101956040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161013391906105ca565b61012960015481565b6008546101b89060ff1681565b6040519015158152602001610133565b6003546101dc9067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610133565b6003546102119068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610133565b6000546101dc9067ffffffffffffffff1681565b61012960055481565b61012960065481565b6000546101dc9068010000000000000000900467ffffffffffffffff1681565b600354610211906c01000000000000000000000000900463ffffffff1681565b6008546101dc90610100900467ffffffffffffffff1681565b6102c073deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610133565b61012960045481565b61012960075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461032057633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560075560643560025560843560045560a43560801c600855565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b610409602082018261063d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055610452604082016020830161063d565b6000805467ffffffffffffffff9290921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055604081013560015560608101356002556104b860a082016080830161063d565b600380547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff9290921691909117905560a081013560045560c081013560055560e081013560065561051b61012082016101008301610667565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905561055c6101408201610120830161063d565b600860016101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b60006020828403121561059957600080fd5b813567ffffffffffffffff8111156105b057600080fd5b820161016081850312156105c357600080fd5b9392505050565b600060208083528351808285015260005b818110156105f7578581018301518582016040015282016105db565b81811115610609576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60006020828403121561064f57600080fd5b813567ffffffffffffffff811681146105c357600080fd5b60006020828403121561067957600080fd5b813580151581146105c357600080fdfea164736f6c634300080f000a") + l1BlockDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b506106a4806100206000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80638381f58a116100b2578063c598591811610081578063e591b28211610066578063e591b282146102a3578063e81b2c6d146102e3578063f8206140146102ec57600080fd5b8063c598591814610263578063dc59462c1461028357600080fd5b80638381f58a1461021d5780638b239f73146102315780639e8c49661461023a578063b80777ea1461024357600080fd5b80635cf24969116100ee5780635cf24969146101a257806361fba0ca146101ab57806364ca23ef146101d857806368d5dca6146101ec57600080fd5b806309bd5a6014610120578063440a5e201461013c57806354b7325c1461014657806354fd4d5014610159575b600080fd5b61012960025481565b6040519081526020015b60405180910390f35b6101446102f5565b005b610144610154366004610595565b610353565b6101956040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161013391906105d8565b61012960015481565b6008546101bf9067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610133565b6003546101bf9067ffffffffffffffff1681565b6003546102089068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610133565b6000546101bf9067ffffffffffffffff1681565b61012960055481565b61012960065481565b6000546101bf9068010000000000000000900467ffffffffffffffff1681565b600354610208906c01000000000000000000000000900463ffffffff1681565b6008546101bf9068010000000000000000900467ffffffffffffffff1681565b6102be73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610133565b61012960045481565b61012960075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461031e57633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560075560643560025560843560045560a43560801c600855565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b610407602082018261064b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055610450604082016020830161064b565b6000805467ffffffffffffffff9290921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055604081013560015560608101356002556104b660a082016080830161064b565b600380547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff9290921691909117905560a081013560045560c081013560055560e081013560065561051961012082016101008301610675565b610524576000610527565b60015b600880547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660ff9290921691909117905561056b6101408201610120830161064b565b6008806101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6000602082840312156105a757600080fd5b813567ffffffffffffffff8111156105be57600080fd5b820161016081850312156105d157600080fd5b9392505050565b600060208083528351808285015260005b81811015610605578581018301518582016040015282016105e9565b81811115610617576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60006020828403121561065d57600080fd5b813567ffffffffffffffff811681146105d157600080fd5b60006020828403121561068757600080fd5b813580151581146105d157600080fdfea164736f6c634300080f000a") gasPriceOracleDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b50610fb5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806354fd4d5011610097578063de26c4a111610066578063de26c4a1146101da578063f45e65d8146101ed578063f8206140146101f5578063fe173b97146101cc57600080fd5b806354fd4d501461016657806368d5dca6146101af5780636ef25c3a146101cc578063c5985918146101d257600080fd5b8063313ce567116100d3578063313ce5671461012757806349948e0e1461012e5780634ef6e22414610141578063519b4bd31461015e57600080fd5b80630c18c162146100fa57806322b90ab3146101155780632e0f26251461011f575b600080fd5b6101026101fd565b6040519081526020015b60405180910390f35b61011d61031e565b005b610102600681565b6006610102565b61010261013c366004610b73565b610541565b60005461014e9060ff1681565b604051901515815260200161010c565b610102610565565b6101a26040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161010c9190610c42565b6101b76105c6565b60405163ffffffff909116815260200161010c565b48610102565b6101b761064b565b6101026101e8366004610b73565b6106ac565b610102610760565b610102610853565b6000805460ff1615610296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103199190610cb5565b905090565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a19190610cce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610481576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a40161028d565b60005460ff1615610514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f6163746976650000000000000000000000000000000000000000000000000000606482015260840161028d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6000805460ff161561055c57610556826108b4565b92915050565b61055682610958565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610627573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103199190610d04565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610627573d6000803e3d6000fd5b6000806106b883610ab4565b60005490915060ff16156106cc5792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561072b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074f9190610cb5565b6107599082610d59565b9392505050565b6000805460ff16156107f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f6563617465640000000000000000000000000000000000000000000000000000606482015260840161028d565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b6000806108c083610ab4565b905060006108cc610565565b6108d461064b565b6108df906010610d71565b63ffffffff166108ef9190610d9d565b905060006108fb610853565b6109036105c6565b63ffffffff166109139190610d9d565b905060006109218284610d59565b61092b9085610d9d565b90506109396006600a610efa565b610944906010610d9d565b61094e9082610f06565b9695505050505050565b60008061096483610ab4565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb9190610cb5565b6109f3610565565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a769190610cb5565b610a809085610d59565b610a8a9190610d9d565b610a949190610d9d565b9050610aa26006600a610efa565b610aac9082610f06565b949350505050565b80516000908190815b81811015610b3757848181518110610ad757610ad7610f41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016600003610b1757610b10600484610d59565b9250610b25565b610b22601084610d59565b92505b80610b2f81610f70565b915050610abd565b50610aac82610440610d59565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215610b8557600080fd5b813567ffffffffffffffff80821115610b9d57600080fd5b818401915084601f830112610bb157600080fd5b813581811115610bc357610bc3610b44565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610c0957610c09610b44565b81604052828152876020848701011115610c2257600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b81811015610c6f57858101830151858201604001528201610c53565b81811115610c81576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600060208284031215610cc757600080fd5b5051919050565b600060208284031215610ce057600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461075957600080fd5b600060208284031215610d1657600080fd5b815163ffffffff8116811461075957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610d6c57610d6c610d2a565b500190565b600063ffffffff80831681851681830481118215151615610d9457610d94610d2a565b02949350505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610dd557610dd5610d2a565b500290565b600181815b80851115610e3357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610e1957610e19610d2a565b80851615610e2657918102915b93841c9390800290610ddf565b509250929050565b600082610e4a57506001610556565b81610e5757506000610556565b8160018114610e6d5760028114610e7757610e93565b6001915050610556565b60ff841115610e8857610e88610d2a565b50506001821b610556565b5060208310610133831016604e8410600b8410161715610eb6575081810a610556565b610ec08383610dda565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ef257610ef2610d2a565b029392505050565b60006107598383610e3b565b600082610f3c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610fa157610fa1610d2a565b506001019056fea164736f6c634300080f000a") ) diff --git a/packages/contracts-bedrock/slither-report.json b/packages/contracts-bedrock/slither-report.json index 425751a7b486..03a47fe3e84c 100644 --- a/packages/contracts-bedrock/slither-report.json +++ b/packages/contracts-bedrock/slither-report.json @@ -688,10 +688,10 @@ "impact": "High", "confidence": "High", "check": "uninitialized-state", - "description": "L1Block.blobBaseFee (src/L2/L1Block.sol#56) is never initialized. It is used in:\n\t- L1Block.setL1BlockValuesEcotone() (src/L2/L1Block.sol#118-137)\n", + "description": "L1Block.blobBaseFee (src/L2/L1Block.sol#50) is never initialized. It is used in:\n\t- L1Block.setL1BlockValuesEcotone() (src/L2/L1Block.sol#118-137)\n", "type": "variable", "name": "blobBaseFee", - "start": 2090, + "start": 1899, "length": 26, "filename_relative": "src/L2/L1Block.sol" }, @@ -700,10 +700,10 @@ "impact": "High", "confidence": "High", "check": "uninitialized-state", - "description": "L1Block.blobBaseFee (src/L2/L1Block.sol#56) is never initialized. It is used in:\n\t- L1Block.setL1BlockValuesEcotone() (src/L2/L1Block.sol#118-137)\n", + "description": "L1Block.blobBaseFee (src/L2/L1Block.sol#50) is never initialized. It is used in:\n\t- L1Block.setL1BlockValuesEcotone() (src/L2/L1Block.sol#118-137)\n", "type": "function", "name": "setL1BlockValuesEcotone", - "start": 4525, + "start": 4535, "length": 1085, "filename_relative": "src/L2/L1Block.sol" }, diff --git a/packages/contracts-bedrock/test/Specs.t.sol b/packages/contracts-bedrock/test/Specs.t.sol index d0f48f56298c..a86d7afb88cf 100644 --- a/packages/contracts-bedrock/test/Specs.t.sol +++ b/packages/contracts-bedrock/test/Specs.t.sol @@ -262,6 +262,8 @@ contract Specification_Test is CommonTest { _addSpec({ _name: "SystemConfig", _sel: _getSel("START_BLOCK_SLOT()") }); _addSpec({ _name: "SystemConfig", _sel: _getSel("VERSION()") }); _addSpec({ _name: "SystemConfig", _sel: _getSel("batcherHash()") }); + _addSpec({ _name: "SystemConfig", _sel: _getSel("espresso()") }); + _addSpec({ _name: "SystemConfig", _sel: _getSel("espressoL1ConfDepth()") }); _addSpec({ _name: "SystemConfig", _sel: _getSel("gasLimit()") }); _addSpec({ _name: "SystemConfig", _sel: SystemConfig.initialize.selector }); _addSpec({ _name: "SystemConfig", _sel: SystemConfig.minimumGasLimit.selector }); @@ -271,6 +273,8 @@ contract Specification_Test is CommonTest { _addSpec({ _name: "SystemConfig", _sel: SystemConfig.resourceConfig.selector }); _addSpec({ _name: "SystemConfig", _sel: _getSel("scalar()") }); _addSpec({ _name: "SystemConfig", _sel: SystemConfig.setBatcherHash.selector, _auth: Role.SYSTEMCONFIGOWNER }); + _addSpec({ _name: "SystemConfig", _sel: SystemConfig.setEspresso.selector, _auth: Role.SYSTEMCONFIGOWNER }); + _addSpec({ _name: "SystemConfig", _sel: SystemConfig.setEspressoL1ConfDepth.selector, _auth: Role.SYSTEMCONFIGOWNER }); _addSpec({ _name: "SystemConfig", _sel: SystemConfig.setGasConfig.selector, _auth: Role.SYSTEMCONFIGOWNER }); _addSpec({ _name: "SystemConfig", _sel: SystemConfig.setGasLimit.selector, _auth: Role.SYSTEMCONFIGOWNER }); _addSpec({ _name: "SystemConfig", _sel: SystemConfig.setResourceConfig.selector, _auth: Role.SYSTEMCONFIGOWNER });