Skip to content

Commit 42e25e6

Browse files
ImTeispacesailor24
authored andcommitted
Use engine API that matches hardfork version (#9253)
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
1 parent bac4d10 commit 42e25e6

File tree

14 files changed

+91
-51
lines changed

14 files changed

+91
-51
lines changed

.circleci/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,10 @@ workflows:
15161516
name: op-challenger-tests
15171517
module: op-challenger
15181518
requires: ["go-mod-download"]
1519+
- go-test:
1520+
name: op-dispute-mon-tests
1521+
module: op-dispute-mon
1522+
requires: ["go-mod-download"]
15191523
- go-test:
15201524
name: op-conductor-tests
15211525
module: op-conductor

op-bindings/bindings/faultdisputegame.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

op-bindings/bindings/faultdisputegame_more.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

op-chain-ops/cmd/check-ecotone/main.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,10 @@ func execTx(ctx context.Context, to *common.Address, data []byte, expectRevert b
335335
if err != nil {
336336
return fmt.Errorf("failed to get chainID: %w", err)
337337
}
338-
tx := types.NewTx(&types.DynamicFeeTx{ChainID: chainID, Nonce: nonce,
339-
GasTipCap: tip, GasFeeCap: maxFee, Gas: 500000, To: to, Data: data})
338+
tx := types.NewTx(&types.DynamicFeeTx{
339+
ChainID: chainID, Nonce: nonce,
340+
GasTipCap: tip, GasFeeCap: maxFee, Gas: 500000, To: to, Data: data,
341+
})
340342
signer := types.NewCancunSigner(chainID)
341343
signedTx, err := types.SignTx(tx, signer, env.key)
342344
if err != nil {
@@ -657,8 +659,9 @@ func checkL1Fees(ctx context.Context, env *actionEnv) error {
657659
return fmt.Errorf("failed to retrieve matching L1 block %s: %w", headRef, err)
658660
}
659661
gasTip := big.NewInt(2 * params.GWei)
662+
baseFee := (*uint256.Int)(&payload.ExecutionPayload.BaseFeePerGas).ToBig()
660663
gasMaxFee := new(big.Int).Add(
661-
new(big.Int).Mul(big.NewInt(2), payload.ExecutionPayload.BaseFeePerGas.ToBig()), gasTip)
664+
new(big.Int).Mul(big.NewInt(2), baseFee), gasTip)
662665
to := common.Address{1, 2, 3, 5}
663666
txData := &types.DynamicFeeTx{
664667
ChainID: rollupCfg.L2ChainID,

op-chain-ops/cmd/receipt-reference-builder/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import (
66

77
"github.com/mattn/go-isatty"
88
"github.com/urfave/cli/v2"
9+
"golang.org/x/exp/slog"
910

1011
"github.com/ethereum/go-ethereum/common"
1112
"github.com/ethereum/go-ethereum/log"
1213

1314
opservice "github.com/ethereum-optimism/optimism/op-service"
15+
oplog "github.com/ethereum-optimism/optimism/op-service/log"
1416
)
1517

1618
const EnvPrefix = "OP_CHAIN_OPS_RECEIPT_REFERENCE_BUILDER"
@@ -75,7 +77,8 @@ var (
7577
)
7678

7779
func main() {
78-
log.Root().SetHandler(log.StreamHandler(os.Stderr, log.TerminalFormat(isatty.IsTerminal(os.Stderr.Fd()))))
80+
color := isatty.IsTerminal(os.Stderr.Fd())
81+
oplog.SetGlobalLogHandler(log.NewTerminalHandlerWithLevel(os.Stdout, slog.LevelDebug, color))
7982

8083
app := &cli.App{
8184
Name: "receipt-reference-builder",

op-e2e/faultproofs/output_cannon_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,6 @@ func TestOutputCannonDefendStep(t *testing.T) {
213213
}
214214

215215
func TestOutputCannonStepWithLargePreimage(t *testing.T) {
216-
// TODO(client-pod#525): Investigate and fix flakiness
217-
t.Skip("Skipping until the flakiness can be resolved")
218-
219216
op_e2e.InitParallel(t, op_e2e.UsesCannon)
220217

221218
ctx := context.Background()

op-e2e/faultproofs/util.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ type faultDisputeConfigOpts func(cfg *op_e2e.SystemConfig)
1212

1313
func withBatcherStopped() faultDisputeConfigOpts {
1414
return func(cfg *op_e2e.SystemConfig) {
15-
maxTxDataSize := uint64(131072) // As per the Ethereum spec.
16-
// Allow the batcher to produce really huge calldata transactions.
17-
// Make the max deliberately bigger than the target but still with some padding below the actual limit
18-
cfg.BatcherTargetL1TxSizeBytes = maxTxDataSize - 5000
19-
cfg.BatcherMaxL1TxSizeBytes = maxTxDataSize - 1000
15+
cfg.DisableBatcher = true
2016
}
2117
}
2218

packages/contracts-bedrock/deploy-config/devnetL1-template.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
2525
"l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
2626
"sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
27-
"baseFeeVaultWithdrawalNetwork": "remote",
28-
"l1FeeVaultWithdrawalNetwork": "remote",
29-
"sequencerFeeVaultWithdrawalNetwork": "remote",
27+
"baseFeeVaultWithdrawalNetwork": 0,
28+
"l1FeeVaultWithdrawalNetwork": 0,
29+
"sequencerFeeVaultWithdrawalNetwork": 0,
3030
"proxyAdminOwner": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
3131
"finalSystemOwner": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
3232
"superchainConfigGuardian": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",

packages/contracts-bedrock/deploy-config/hardhat.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@
5555
"proofMaturityDelaySeconds": 12,
5656
"disputeGameFinalityDelaySeconds": 6,
5757
"respectedGameType": 0,
58-
"useFaultProofs": false
58+
"useFaultProofs": false,
59+
"fundDevAccounts": true
5960
}

packages/contracts-bedrock/scripts/DeployConfig.s.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ contract DeployConfig is Script {
3535
address public l2OutputOracleProposer;
3636
address public l2OutputOracleChallenger;
3737
uint256 public finalizationPeriodSeconds;
38+
bool public fundDevAccounts;
3839
address public proxyAdminOwner;
3940
address public baseFeeVaultRecipient;
4041
uint256 public baseFeeVaultMinimumWithdrawalAmount;
4142
address public l1FeeVaultRecipient;
4243
uint256 public l1FeeVaultMinimumWithdrawalAmount;
4344
address public sequencerFeeVaultRecipient;
4445
uint256 public sequencerFeeVaultMinimumWithdrawalAmount;
46+
uint256 public sequencerFeeVaultWithdrawalNetwork;
4547
string public governanceTokenName;
4648
string public governanceTokenSymbol;
4749
address public governanceTokenOwner;
@@ -95,13 +97,15 @@ contract DeployConfig is Script {
9597
l2OutputOracleProposer = stdJson.readAddress(_json, "$.l2OutputOracleProposer");
9698
l2OutputOracleChallenger = stdJson.readAddress(_json, "$.l2OutputOracleChallenger");
9799
finalizationPeriodSeconds = stdJson.readUint(_json, "$.finalizationPeriodSeconds");
100+
fundDevAccounts = stdJson.readBool(_json, "$.fundDevAccounts");
98101
proxyAdminOwner = stdJson.readAddress(_json, "$.proxyAdminOwner");
99102
baseFeeVaultRecipient = stdJson.readAddress(_json, "$.baseFeeVaultRecipient");
100103
baseFeeVaultMinimumWithdrawalAmount = stdJson.readUint(_json, "$.baseFeeVaultMinimumWithdrawalAmount");
101104
l1FeeVaultRecipient = stdJson.readAddress(_json, "$.l1FeeVaultRecipient");
102105
l1FeeVaultMinimumWithdrawalAmount = stdJson.readUint(_json, "$.l1FeeVaultMinimumWithdrawalAmount");
103106
sequencerFeeVaultRecipient = stdJson.readAddress(_json, "$.sequencerFeeVaultRecipient");
104107
sequencerFeeVaultMinimumWithdrawalAmount = stdJson.readUint(_json, "$.sequencerFeeVaultMinimumWithdrawalAmount");
108+
sequencerFeeVaultWithdrawalNetwork = stdJson.readUint(_json, "$.sequencerFeeVaultWithdrawalNetwork");
105109
governanceTokenName = stdJson.readString(_json, "$.governanceTokenName");
106110
governanceTokenSymbol = stdJson.readString(_json, "$.governanceTokenSymbol");
107111
governanceTokenOwner = stdJson.readAddress(_json, "$.governanceTokenOwner");

0 commit comments

Comments
 (0)