Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AA] Only allow max 10 User Operation per sender, Implement op fee replacement #3799

Merged
merged 4 commits into from
Feb 9, 2022

Conversation

kristofgazso
Copy link
Contributor

@kristofgazso kristofgazso commented Feb 8, 2022

Resolves #3790
Resolves #3798

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests??

  • Yes
  • No

@kristofgazso kristofgazso marked this pull request as ready for review February 8, 2022 18:31
Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small issues to fix

}

[Test]
public void should_not_allow_more_than_max_capacity_per_sender_ops_from_same_sender_()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is duplicated - same as above

_userOperationPool.AddUserOperation(op);
}

UserOperation higherGasPriceOp = Build.A.UserOperation.WithSender(Address.SystemUser).WithNonce(9).WithMaxFeePerGas(5).WithMaxPriorityFeePerGas(5).SignedAndResolved(TestItem.PrivateKeyA).TestObject;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor - lowerGasPriceOp actually

@kristofgazso kristofgazso merged commit 157f820 into master Feb 9, 2022
@kristofgazso kristofgazso deleted the aa_max_10_ops_per_sender branch February 9, 2022 10:34
kristofgazso added a commit that referenced this pull request Mar 11, 2022
* 🔥 Changing vars in Plugin file (does not compile)

* Support added for multiple entry points-1

* Updating Fast Sync config files (#3780)

Co-authored-by: matilote <matilote@users.noreply.github.com>

* Update and fix ethereum tests (#3778)

* updated tests

* update tests reference to the most recent commit

* update tests reference

* fix loaders

* delete stale tests

* update tests

* fix BerlinToLondon tests

* ignore 12 transactions tests for now (passing hive tests, failing here)

* update TransactionTests runner

* disable difficulty tests with broken loader

* move VM tests from Blockchain.Test project to VM.Test project

* clean

* fix workflow and add missing tests

* remove duplicated tests

* fix MetaTest

* add MetaTest for VM.Test

* cosmetics

* suggested changes

* use dotnet-dump only

* Update Dockerfile.dev

* Update Dockerfile.dev

* Update Dockerfile.dev

* Update Dockerfile.dev

* Update Dockerfile.dev

* Update Dockerfile.dev

* Updating Fast Sync config files (#3784)

Co-authored-by: matilote <matilote@users.noreply.github.com>

* Updating Fast Sync config files (#3787)

Co-authored-by: matilote <matilote@users.noreply.github.com>

* Updating Fast Sync config files (#3788)

Co-authored-by: matilote <matilote@users.noreply.github.com>

* Full pruning (#3096)

* Add HighestPersistedState to BlockTree

* RocksDbSettings cloning

* MemDbFactoryAdapter to use IRocksDbFactory

* Pruning Triggers

* Add StateDbDuplicateWrites metrics

* Add FullPruningDb

* Add FullPruner and CopyTreeVisitor

* CopyTreeVisitor add logs

* CopyTreeVisitor add tests

* Rename RocksDbSizePruningTrigger to PathSizePruningTrigger

* add tests for PathSizePruningTrigger

* Move test projects to c# 9

* Add DiskFreeSpacePruningTrigger Tests

* Add Build.A.Trie and TrieBuilder

* Move PruningConfig add PruningMode

* FullPruningInnerDbFactory to correctly read db index

* Add RocksDbSettings clone test

* Change FullPruningDb, add tests for it

* Rename MemDbFactoryToRocksDbAdapter

* Change StandardDbInitializer to support full pruning

* Add FullPruner tests

* Add TrieStoreBondryWatcher to encapsulate and reuse connection between TrieStore and BlockTree

* Fix HighestPersistedState null serialization

* Fix DbOnTheRocks Clear by delete (needed dispose first) and special prefix for State db

* Add FullPruningDiskTest

* Add PruningConfig.FullPruningThresholdMb and PruningConfig.FullPruningTrigger

* Add IFullPruningDb.GetPath

* Initialize FullPruner

* Better metrics

* BlockTree highest persisted state fix

* fixes

* Duplicate batches in pruning, start full pruning only between blocks, fix tests

* Fix FullPruningDb canellation

* Fix indexing db in PathSizePruningTrigger

* Fix FullPruner, use head.StateRoot

* fix delete database

* fix tests

* fix tests

* Change config a bit

* Make CopyTreeVisitor parallel

* Move to VisitingOptions

* add FullPruningMaxDegreeOfParallelism config option

* Remove SupportsParallelVisits

* changes

* Add full pruned configs

* Fix issues with TrieStore with both archive and mem pruning modes.

Add Full pruning RPC.

* Refactor + comments

* FIx initialize pruning trigger when only Manual pruning is enabled

* Move parallelism to be based on Semaphore

* PruningTriggerPersistenceStrategy experiment

* Add description how Full Pruning works

* Fix issues with hybrid pruning

* fix resolving storage root

* refactor merge

* Add pruning delay to make sure we won't break ssds

* optimize ShouldPersist

* Add TrieStats Levels

* Make TrieStats collecting parallel

* Make Trie Stats collecting in the background

* Hide PruningConfig.Enabled from docs

* Log Exception when collecting trie stats

* Always register FullPruningDb if someone disables it in the future

* small refactor

* Set VisitContext.MaxDegreeOfParallelism default to 1

* Remove IDb.Innermost

* Remove non-default module types

* fix tests

* review comments

Co-authored-by: Jorge Mederos Alvarado <jmederosalvarado@gmail.com>
Co-authored-by: DCeleda <dceleda@hotmail.com>

* Updating Fast Sync config files (#3792)

Co-authored-by: matilote <matilote@users.noreply.github.com>

* Accept underpaid local txs in FeeTooLowFilter (#3794)

* always accept local txs in FeeTooLowFilter

* add test

* fix typo

* cosmetic

* add own txs length check to test

* Update rocks db pointer (#3795)

* Clone BlockHeader before executing RPC (#3800)

* Sepolia - DifficultyBombDisabled (#3789)

* Fix sepolia

* more tests

* cosmetic

* fix test

* move disabled to sepolia chainspec

* review fix

* review fix v2

* Updating Fast Sync config files (#3803)

Co-authored-by: matilote <matilote@users.noreply.github.com>

* [AA] Only allow max 10 User Operation per sender, Implement op fee replacement (#3799)

* Support added for multiple entry points-1

* Support added for multiple entry points-2

* AccountAbstractionRpcModule modified

* Some Tests fixed

* wrote p2p logic

* Made changes to other functions wrt the p2p commit

* Errors Fixed

* Prep for adding tests for checking support for multiple entry points

* Tests updated

* fixed deployment

* Added Tests-2

* merge conflict WIP

* Tests added for AaPeerManager

* fixes

* fixes

* New tests added

* Finalized the tests

* fixing user op tx source

* fix stateprovider issue

* fixed jorge notes

* update configs

* update rocksdb

* Rollback rocksdb update (#3850)

* add accountabstraction plugins to default plugins

* fixed null reference bug

Co-authored-by: Parinay Chauhan <parinayc20@iitk.ac.in>
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: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>
Co-authored-by: Mateusz Jędrzejewski <33068017+matilote@users.noreply.github.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Jorge Mederos Alvarado <jmederosalvarado@gmail.com>
Co-authored-by: DCeleda <dceleda@hotmail.com>
Co-authored-by: Marek Moraczyński <marekm2504@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants