Skip to content

Commit

Permalink
Revert "Add support for signing pre cel2 DynamicFeeTxs (#176)" (#179)
Browse files Browse the repository at this point in the history
This reverts commit 4a67833.
  • Loading branch information
piersy authored Jul 19, 2024
1 parent 4a67833 commit 184b30a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
14 changes: 0 additions & 14 deletions core/types/celo_transaction_signing_forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 0 additions & 12 deletions core/types/celo_transaction_signing_tx_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 184b30a

Please sign in to comment.