From 184b30a5fcbbdedfe5485937aa2e05fc96f80588 Mon Sep 17 00:00:00 2001 From: piersy Date: Fri, 19 Jul 2024 09:55:04 +0100 Subject: [PATCH] Revert "Add support for signing pre cel2 DynamicFeeTxs (#176)" (#179) This reverts commit 4a67833dc75d666409f57ae287967477649d83ec. --- core/types/celo_transaction_signing_forks.go | 14 -------------- core/types/celo_transaction_signing_tx_funcs.go | 12 ------------ 2 files changed, 26 deletions(-) diff --git a/core/types/celo_transaction_signing_forks.go b/core/types/celo_transaction_signing_forks.go index 69a138ca70..5aa3c79dd3 100644 --- a/core/types/celo_transaction_signing_forks.go +++ b/core/types/celo_transaction_signing_forks.go @@ -64,11 +64,6 @@ func (c *cel2) txFuncs(tx *Transaction) *txFuncs { switch { case t == LegacyTxType && tx.IsCeloLegacy(): return deprecatedTxFuncs - case t == DynamicFeeTxType: - // We deprecate celo support of the DynamicFeeTxType in the cel2 fork - // since at this point it will be supported by the upstream London - // hardfork. - return deprecatedTxFuncs case t == CeloDynamicFeeTxType: return deprecatedTxFuncs } @@ -102,15 +97,6 @@ func (c *celoLegacy) txFuncs(tx *Transaction) *txFuncs { return celoLegacyProtectedTxFuncs } return celoLegacyUnprotectedTxFuncs - case t == DynamicFeeTxType: - // We handle the dynamic fee tx type here because we need to handle - // migrated dynamic fee txs. These were enabeled in celo in the Espresso - // hardfork, which doesn't have any analogue in op-geth. Even though - // op-geth does enable support for dynamic fee txs in the London - // hardfork (which we set to the cel2 block) that fork contains a lot of - // changes that were not part of Espresso. So instead we handle - // DynamicFeeTxTypes ocurring before the cel2 block here. - return dynamicFeeTxFuncs case t == CeloDynamicFeeTxV2Type: return celoDynamicFeeTxV2Funcs case t == CeloDynamicFeeTxType: diff --git a/core/types/celo_transaction_signing_tx_funcs.go b/core/types/celo_transaction_signing_tx_funcs.go index 6f631e4fc4..9f22b43439 100644 --- a/core/types/celo_transaction_signing_tx_funcs.go +++ b/core/types/celo_transaction_signing_tx_funcs.go @@ -61,18 +61,6 @@ var ( }, } - dynamicFeeTxFuncs = &txFuncs{ - hash: func(tx *Transaction, chainID *big.Int) common.Hash { - return NewLondonSigner(chainID).Hash(tx) - }, - signatureValues: func(tx *Transaction, sig []byte, signerChainID *big.Int) (r *big.Int, s *big.Int, v *big.Int, err error) { - return NewLondonSigner(signerChainID).SignatureValues(tx, sig) - }, - sender: func(tx *Transaction, hashFunc func(tx *Transaction, chainID *big.Int) common.Hash, signerChainID *big.Int) (common.Address, error) { - return NewLondonSigner(signerChainID).Sender(tx) - }, - } - celoDynamicFeeTxFuncs = &txFuncs{ hash: func(tx *Transaction, chainID *big.Int) common.Hash { return prefixedRlpHash(