Skip to content

Commit

Permalink
Enable MinGasPriceContractTxFilter for AuRa post-merge (#4223)
Browse files Browse the repository at this point in the history
* Decorate AuRaTxFilters in order to disable them post merge

* Fix decorator for MinGasPriceContractTxFilter

* Redesign & Refactor

* Remove unused usings

* Re-enable MinGasPriceContractTxFilter

* revert submodule changes

Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com>
  • Loading branch information
jmederosalvarado and LukaszRozmej authored Jun 28, 2022
1 parent fe23992 commit 6ec56f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static ITxFilter CreateBaseAuRaTxFilter(
{
RegisterContract registerContract = new(api.AbiEncoder, registrar, readOnlyTxProcessorSource);
CertifierContract certifierContract = new(api.AbiEncoder, registerContract, readOnlyTxProcessorSource);
return CreateFilter(new TxCertifierFilter(certifierContract, gasPriceTxFilter, specProvider, api.LogManager));
return CreateFilter(new TxCertifierFilter(certifierContract, gasPriceTxFilter, specProvider, api.LogManager), gasPriceTxFilter);
}

return gasPriceTxFilter;
Expand Down
4 changes: 3 additions & 1 deletion src/Nethermind/Nethermind.Merge.AuRa/AuRaMergePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Threading.Tasks;
using Nethermind.Api;
using Nethermind.Api.Extensions;
using Nethermind.Consensus.AuRa.Transactions;

namespace Nethermind.Merge.AuRa
{
Expand All @@ -34,7 +35,8 @@ public override async Task Init(INethermindApi nethermindApi)

// this runs before all init steps that use tx filters
TxAuRaFilterBuilders.CreateFilter = (originalFilter, fallbackFilter) =>
new AuRaMergeTxFilter(_poSSwitcher, originalFilter, fallbackFilter);
originalFilter is MinGasPriceContractTxFilter ? originalFilter
: new AuRaMergeTxFilter(_poSSwitcher, originalFilter, fallbackFilter);
}
}

Expand Down

0 comments on commit 6ec56f2

Please sign in to comment.