-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add MevBudler * Use trigger approach for bundler instead of harcoded timer * Rename PeriodicMevBundler to just MevBundler * Add head block as bundle event arg * Add OnNewBlockBundleTrigger trigger * Add flashbotsBundler based on ContinuousBundleSender * Rename BundleEventArgs in Bundler to BundleUserOpsEventArgs * Add MevBundler Test * Delete PeriodicBundleTrigger * Change the way we detect if MevPlugin is enabled * Move MevBundler to InitRpcModules hook `MevBundler` depends on `InitBlockchain` step, which still hasn't been run when `Init` hook is called. * Add some logging in MevBundler * Change debug logs to info just for debugging ;) * fix MevBundler instantiation MevBundlerTest * Changed blockCount parameter in eth_feeHistory to long. (#3670) * Updating Fast Sync config files (#3671) Co-authored-by: matilote <matilote@users.noreply.github.com> * Make FielterStore and id's thread safe * Fixing the incorrect path * CI: Build solution files on GHA (#3652) * CI: Build baseline.sln on GHA * CI: Build cortex.sln on GHA * CI: Build Benchmarks.sln on GHA * Fix some build errors after merge from master * Fix test failing at ...Evm.Test/Tracing/AccessTxTracerTests.cs(50,40) * Adding additional instructions for Ubuntu 21.10 * Add additional symlink for Fedora 35 (#3678) This fixes usage with Fedora 35. Same as Ubuntu 21.10 fix. Matched "find" usage with existing Fedora symlinks * testing rocksdb latest builds * fixing path * adding file execution permissions * trying with windows one more time * checking the other way around * testing rocksdb windows build * something wrong with chdir on gha * trying different way for executing script * another way * define full path * Complete path to sh * Update the bash path * Random Attempt * Update build-rocksdb-libs.yml * Update build-rocksdb-libs.yml * Update the path of bash * Update build-rocksdb-libs.yml * Update build-rocksdb-libs.yml * Fixed path * Fixed path in ubuntu and mac flows * fixing uplaod paths * fixing linux-x64 path * trying with full path * updating rocksdb shared libraries to 6.26.1 * trying diff path * another try * fixing path * Update to mainnet_pruned in readme * Updating Fast Sync config files (#3683) Co-authored-by: matilote <matilote@users.noreply.github.com> * fix pool tests * Added PeriodicBundleTrigger again (very usefull for testing locally) * Fix null signature in BundleTransaction * Add spaceneth with aa enabled config * Enable PeriodicBundleTrigger * Logs for trigger * logs * More logs * Enable autoreset in periodic bundle trigger * fix * logs =) * Add try catch to trigger * Add exception handling to OnNewBlockBundleTrigger * update rocksdb * Log stack trace * log * Log only block author * added configs * fix mev? Co-authored-by: Klaudia Jazgar <67744705+kjazgar@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: matilote <matilote@users.noreply.github.com> Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com> Co-authored-by: 1swaraj <36474630+1swaraj@users.noreply.github.com> Co-authored-by: Harsh Mishra <erbeusgriffincasper@gmail.com> Co-authored-by: Mateusz Jędrzejewski <33068017+matilote@users.noreply.github.com> Co-authored-by: Dave <13626476+DaveWK@users.noreply.github.com> Co-authored-by: Mateusz Jędrzejewski <mateusz.jedrzejewski@yahoo.pl> Co-authored-by: kristofgazso <kristof.gazso@gmail.com>
- Loading branch information
1 parent
bc62530
commit 624d7a0
Showing
68 changed files
with
783 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build Solution | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
defaults: | ||
run: | ||
working-directory: src/Nethermind | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Install dependencies | ||
run: | | ||
dotnet restore Baseline.sln | ||
dotnet restore Cortex.sln | ||
dotnet restore Benchmarks.sln | ||
- name: Build | ||
run: | | ||
dotnet build --configuration Release --no-restore Baseline.sln | ||
dotnet build --configuration Release --no-restore Cortex.sln | ||
dotnet build --configuration Release --no-restore Benchmarks.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Math.Gmp.Native
updated
5 files
+2 −2 | MathGmp.Native.UnitTests/MathGmp.Native.UnitTests.csproj | |
+1 −1 | MathGmp.Native/MathGmp.Native.csproj | |
+1 −1 | MathGmp.Native/mpf_t.cs | |
+1 −1 | MathGmp.Native/mpq_t.cs | |
+1 −1 | MathGmp.Native/mpz_t.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
src/Nethermind/Nethermind.AccountAbstraction.Test/MevBundlerTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using Nethermind.AccountAbstraction.Bundler; | ||
using Nethermind.Consensus.Transactions; | ||
using Nethermind.Core; | ||
using Nethermind.Int256; | ||
using Nethermind.Mev.Data; | ||
using Nethermind.Mev.Source; | ||
using NSubstitute; | ||
using NUnit.Framework; | ||
using Nethermind.Logging; | ||
|
||
namespace Nethermind.AccountAbstraction.Test | ||
{ | ||
[TestFixture] | ||
public class MevBundlerTests | ||
{ | ||
private ITxSource GetTxSource(params Transaction[] transactions) | ||
{ | ||
var txSource = Substitute.For<ITxSource>(); | ||
txSource.GetTransactions(Arg.Any<BlockHeader>(), Arg.Any<long>()).Returns(transactions); | ||
return txSource; | ||
} | ||
|
||
private IBundlePool GetBundlePool(List<MevBundle> bundles) | ||
{ | ||
var bundlePool = Substitute.For<IBundlePool>(); | ||
bundlePool.AddBundle(Arg.Any<MevBundle>()).Returns(true).AndDoes(info => bundles.Add(info.Arg<MevBundle>())); | ||
bundlePool.GetBundles(Arg.Any<long>(), Arg.Any<UInt256>()).Returns(bundles); | ||
return bundlePool; | ||
} | ||
|
||
private IBundleTrigger GetBundleTrigger() | ||
{ | ||
return Substitute.For<IBundleTrigger>(); | ||
} | ||
|
||
[Test] | ||
public void adds_bundles_to_mev_pool_when_mev_plugin_is_enabled() | ||
{ | ||
var transactions = new Transaction[] { }; | ||
|
||
var bundleTrigger = GetBundleTrigger(); | ||
var txSource = GetTxSource(transactions); | ||
|
||
var bundles = new List<MevBundle>(); | ||
var bundlePool = GetBundlePool(bundles); | ||
|
||
var bundler = new MevBundler(bundleTrigger, txSource, bundlePool, NullLogger.Instance); | ||
var bundleEventArgs = new BundleUserOpsEventArgs(Core.Test.Builders.Build.A.Block.TestObject); | ||
|
||
bundleTrigger.TriggerBundle += Raise.EventWith(this, bundleEventArgs); | ||
|
||
var bundledTxs = bundles.SelectMany(bundle => bundle.Transactions); | ||
Assert.That(bundledTxs.SequenceEqual(transactions)); | ||
} | ||
} | ||
} |
Oops, something went wrong.